rucc-controller

by mattmattox503

Helm chartv1756683361.0.0-rc.1App v1756683361-rc.1

Rancher Upgrade Controller (RUCC) - Manages Rancher upgrades with pre-flight checks and approval workflows

About this chart

RUCC Controller Helm Chart

A comprehensive Helm chart for deploying the Rancher Upgrade Controller (RUCC) on Kubernetes clusters.

Overview

The RUCC Controller manages Rancher and RKE2 upgrades with advanced safety checks, approval workflows, and comprehensive monitoring. This Helm chart provides production-ready deployment of both the RUCC Controller and an optional Meta Server component.

Features

  • RUCC Controller: Main upgrade controller with comprehensive safety checks
  • Meta Server: Optional centralized metadata and version management service
  • Frontend: Web UI for upgrade management and monitoring
  • Production Ready: HA deployment, security hardening, monitoring integration
  • CRD Management: Automatic installation and management of Custom Resource Definitions
  • Comprehensive Security: RBAC, Network Policies, Security Contexts, Pod Security Standards
  • Observability: Prometheus metrics, Grafana dashboards, comprehensive logging
  • Auto-scaling: HPA support for all components
  • Disaster Recovery: Pod Disruption Budgets, backup integration

Prerequisites

  • Kubernetes 1.25+
  • Helm 3.8+
  • Prometheus Operator (optional, for monitoring)
  • PostgreSQL database (for Meta Server, if enabled)

Installation

Quick Start

# Add the Helm repository
helm repo add support-tools https://charts.support.tools/
helm repo update

# Install RUCC Controller
helm install rucc-controller support-tools/rucc-controller \
  --namespace cattle-system \
  --create-namespace

Production Installation

# Create values file for production
cat > production-values.yaml <<EOF
# Production configuration
controller:
  replicaCount: 3
  resources:
    requests:
      cpu: 500m
      memory: 512Mi
    limits:
      cpu: 2000m
      memory: 2Gi

# Enable Meta Server for centralized management
metaServer:
  enabled: true
  replicaCount: 2
  database:
    host: postgresql-service
    name: rucc_meta
    username: rucc_meta
    password: "secure-password"

# Enable monitoring
monitoring:
  enabled: true
  serviceMonitor:
    enabled: true
  prometheusRule:
    enabled: true
  grafanaDashboard:
    enabled: true

# Enable autoscaling
autoscaling:
  controller:
    enabled: true
    maxReplicas: 10
  metaServer:
    enabled: true
    maxReplicas: 5

# Configure ingress
ingress:
  enabled: true
  className: "nginx"
  hosts:
    - host: rucc.example.com
      paths:
        - path: /
          pathType: Prefix
          service: frontend
EOF

# Install with production values
helm install rucc-controller support-tools/rucc-controller \
  --namespace cattle-system \
  --create-namespace \
  -f production-values.yaml

Configuration

Controller Configuration

The controller is the main component that manages upgrade workflows:

controller:
  # High availability setup
  replicaCount: 3
  
  # Image configuration
  image:
    repository: cube8021/rucc-controller
    tag: "latest"
    pullPolicy: IfNotPresent
  
  # Resource requirements
  resources:
    requests:
      cpu: 200m
      memory: 256Mi
    limits:
      cpu: 1000m
      memory: 1Gi
  
  # Meta server connection
  metaServer:
    url: https://meta-server.example.com
    token: "secure-token"
    channel: stable

Meta Server Configuration

Optional component for centralized version management:

metaServer:
  # Enable internal meta server deployment
  enabled: true
  replicaCount: 2
  
  # Image configuration
  image:
    repository: cube8021/rucc-meta-server
    tag: "latest"
  
  # Database configuration
  database:
    host: postgresql
    port: 5432
    name: rucc_meta
    username: rucc_meta
    password: "secure-password"  # Use secrets in production
  
  # Persistence for data storage
  persistence:
    enabled: true
    size: 10Gi
    storageClass: "fast-ssd"

Frontend Configuration

Web UI for managing upgrades:

frontend:
  enabled: true
  replicaCount: 2
  
  # Nginx configuration
  nginx:
    config: |
      # Custom nginx configuration
      server {
          listen 80;
          # ... custom configuration
      }

Security Configuration

Production-grade security settings:

# RBAC configuration
rbac:
  create: true
  additionalRules:
    - apiGroups: ["custom.io"]
      resources: ["*"]
      verbs: ["get", "list"]

# Network policies
networkPolicy:
  enabled: true
  ingress:
    - from:
      - namespaceSelector:
          matchLabels:
            name: monitoring
  egress:
    - to: []
      ports:
      - protocol: TCP
        port: 443

# Pod security contexts
controller:
  podSecurityContext:
    runAsNonRoot: true
    runAsUser: 65534
    fsGroup: 65534
  securityContext:
    allowPrivilegeEscalation: false
    readOnlyRootFilesystem: true
    capabilities:
      drop: ["ALL"]

Monitoring Configuration

Comprehensive observability:

monitoring:
  enabled: true
  
  # Prometheus ServiceMonitor
  serviceMonitor:
    enabled: true
    interval: 30s
    scrapeTimeout: 10s
  
  # Prometheus alerting rules
  prometheusRule:
    enabled: true
    customRules:
      - alert: RUCCControllerDown
        expr: up{job="rucc-controller"} == 0
        for: 5m
        labels:
          severity: critical
        annotations:
          summary: "RUCC Controller is down"
  
  # Grafana dashboard
  grafanaDashboard:
    enabled: true
    labels:
      grafana_dashboard: "1"

Upgrade Scenarios

Rolling Upgrade

# Update to new version
helm upgrade rucc-controller support-tools/rucc-controller \
  --namespace cattle-system \
  --set controller.image.tag=v2.0.0

RC Version Testing

# Deploy RC version for testing
helm upgrade rucc-controller support-tools/rucc-controller \
  --namespace cattle-system \
  --set controller.image.tag=v2.0.0-rc.1 \
  --set frontend.image.tag=v2.0.0-rc.1

Blue-Green Deployment

# Install new version in parallel
helm install rucc-controller-blue support-tools/rucc-controller \
  --namespace cattle-system-blue \
  --create-namespace \
  --set controller.image.tag=v2.0.0

# Test and validate
# Then switch traffic and remove old version
helm uninstall rucc-controller --namespace cattle-system

Troubleshooting

Common Issues

Controller Pod Not Starting

# Check pod status
kubectl get pods -n cattle-system -l app.kubernetes.io/name=rucc-controller

# Check logs
kubectl logs -n cattle-system -l app.kubernetes.io/component=controller

# Check events
kubectl get events -n cattle-system --sort-by='.lastTimestamp'

CRD Installation Issues

# Manually install CRDs if needed
helm template rucc-controller support-tools/rucc-controller \
  --show-only crds.yaml | kubectl apply -f -

# Check CRD status
kubectl get crd | grep rucc.cattle.io

Meta Server Connection Issues

# Check meta server connectivity
kubectl exec -n cattle-system deployment/rucc-controller-controller -- \
  curl -v http://rucc-controller-meta-server:8080/health

# Check meta server logs
kubectl logs -n cattle-system -l app.kubernetes.io/component=meta-server

Performance Tuning

Resource Optimization

# For high-load environments
controller:
  resources:
    requests:
      cpu: 1000m
      memory: 1Gi
    limits:
      cpu: 4000m
      memory: 4Gi
  
  # Enable autoscaling
autoscaling:
  controller:
    enabled: true
    minReplicas: 3
    maxReplicas: 20
    targetCPUUtilizationPercentage: 60

Database Tuning (Meta Server)

metaServer:
  database:
    # Connection pooling
    maxConnections: 100
    connectionTimeout: 30s
    
  # Caching configuration
  config:
    cacheSize: "128MB"
    cacheExpiry: "1h"

Development

Local Development

# Clone the repository
git clone https://github.com/rancherlabs/rucc-private.git
cd rucc-private/rucc-controller

# Install chart locally
helm install rucc-controller charts/rucc-controller \
  --namespace cattle-system \
  --create-namespace \
  --set controller.image.tag=dev

Chart Development

# Lint the chart
make helm-lint

# Package the chart
make helm-package

# Test with different values
helm template rucc-controller charts/rucc-controller \
  --values test-values.yaml

Security Considerations

Secrets Management

  • Use Kubernetes secrets for sensitive data
  • Consider external secret management (Vault, etc.)
  • Regularly rotate credentials
  • Use RBAC with least privilege principle

Network Security

  • Enable Network Policies in production
  • Use TLS for all communications
  • Implement proper ingress controls
  • Monitor network traffic

Pod Security

  • Use non-root containers
  • Enable read-only root filesystem
  • Drop all capabilities
  • Use security contexts and Pod Security Standards

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make changes and test
  4. Submit a pull request

Support

  • GitHub Issues: https://github.com/rancherlabs/rucc-private/issues
  • Documentation: https://docs.rancher.com/
  • Community: https://forums.rancher.com/

License

Copyright © 2024 Rancher Labs. All rights reserved.

Deploy rucc-controller with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has rucc-controller on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartrucc-controller is pinned at v1756683361.0.0-rc.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply