Skip to content

Conversation

@Ravio1i
Copy link

@Ravio1i Ravio1i commented Jul 16, 2025

/kind feature

What does this pull request do? Which issues does it resolve? (use resolves #<issue_number> if possible)
resolves #2622

This PR adds support for storing vCluster configuration in a ConfigMap instead of a Secret, providing better transparency and easier debugging capabilities.

Key Changes:

  • Added useConfigAsSecret configuration option (defaults to false for ConfigMap storage)
  • Created new Helm template config-configmap.yaml for ConfigMap-based storage
  • Updated StatefulSet template to conditionally use ConfigMap or Secret based on configuration
  • Enhanced CLI tools (create, describe) to automatically detect and work with both storage types
  • Added comprehensive helper utilities in pkg/util/confighelper for unified config retrieval
  • Updated Go struct ControlPlaneAdvanced to include UseConfigAsSecret field
  • Added extensive test coverage for both ConfigMap and Secret scenarios

Please provide a short message that should be published in the vcluster release notes
Fixed an issue where vcluster ...

Added support for storing vCluster configuration in ConfigMaps instead of Secrets, improving configuration transparency and debugging capabilities

What else do we need to know?

  • Default Behavior: New vClusters will use ConfigMaps by default (useConfigAsSecret: false) We can change that to whatever we want

Testing

This feature was thoroughly tested using a local idpbuilder setup:

  1. Built vcluster binary with the new ConfigMap functionality

  2. Built vclusterctl binary

  3. Created Docker image and pushed to local idpbuilder registry (gitea.cnoe.localtest.me:8443)

  4. Deployed using built vclusterctl with a config containing

      controlPlane:
        advanced:
          useConfigAsSecret: false
    helm package ./chart -d .tmp-chart
    cd .tmp-chart
    helm repo index . --url http://localhost:8080
    python3 -m http.server 8080
    
    ./vclusterctl create test-vcluster \
       --chart-repo http://localhost:8080 \
       --chart-version $(helm show chart ../chart | grep version | awk '{print $2}') \
     -f _vcluster-config.yml
  5. Confirmed that configuration is properly stored in plaintext ConfigMap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant