Skip to content

Cluster manifest should not be used as config base on re-deploy #301

Open

Description

@mclasmeier

Problem

When re-deploying to a cluster that already has a roxie manifest secret, roxie deploy uses the stored manifest config as the base configuration instead of starting from DefaultConfig(). This causes settings from the previous deployment to silently carry over, even when the user didn't request them.

Concrete example: A cluster was previously deployed with --image-registry quay.io/stackrox-io. On a subsequent roxie deploy --konflux, the stored roxie.imageRegistry: quay.io/stackrox-io from the manifest is loaded as the base config. The validation gate then rejects the deploy:

Error: using Konflux images with a custom image registry (quay.io/stackrox-io) is not supported

The user never passed --image-registry — the value leaked from the previous deployment's manifest.

Root cause

In cmd/deploy.go, retrieveClusterConfigForComponents loads the manifest secret and returns it as configBase. In assembleConfigForCommand (cmd/config.go), when configBase is non-nil, it is used directly instead of DefaultConfig():

if configBase == nil {
    config = deployer.DefaultConfig()
} else {
    config = *configBase
}

This means every field from the previous deployment's config — including imageRegistry, clusterType, feature flags, etc. — silently becomes the starting point.

Expected behavior

  1. roxie deploy should start from DefaultConfig() as the base, not from the cluster manifest. A re-deploy should behave identically to a fresh deploy given the same CLI flags and config files.
  2. If roxie does apply settings from the cluster manifest, it should be transparent about it — log which values were inherited and from where.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions