Repository navigation
Replies: 1 comment 1 reply
|
There's no such flag today, but you can get the same result with the inline In fluxcd/pkg So for a local build, copy the ConfigMap values into postBuild:
substitute:
cluster_region: "eu-west-1" # already inline
cluster_env: "production" # copied from ConfigMap cluster-vars
substituteFrom:
- kind: ConfigMap
name: cluster-varsflux build kustomization my-app --path ./apps/my-app \
--kustomization-file ./my-app.dry-run.yaml --dry-run --strict-substituteI checked this with a CLI built from flux2@79cdd85. Without the copied value, Two details when copying: inline values take precedence over ConfigMap/Secret values in the controller as well (same lines above), so keep existing inline keys as they are; and Secret A |
Uh oh!
There was an error while loading. Please reload this page.
Currently,
flux build kustomization --dry-runskips variable substitutions from secrets and configMaps.This is a reasonable approach given, they cannot be read from the cluster with
--dry-run.However, I think it could be useful to allow users to optionally pass those configmaps and/or secrets to the dry-run manually.
E.g. via additional params like
--with myConfigMap.yaml.Does this make sense?
All reactions