What's the user value of this feature request?
As a user, when I perform cf push with a manifest, I'd like a way for the manifest to be the absolute truth for the application's configuration.
Who is the functionality for?
Humans, CI/CD systems, compliance and auditing folks, anyone wanting configuration as code stored in git, anyone and anything which performs a cf push with a manifest
How often will this functionality be used by the user?
Every cf push or apply-manifest
Who else is affected by the change?
Shouldn't cause a breaking change as long as it's behind a flag like --remove-undeclared or something to that effect.
Is your feature request related to a problem? Please describe.
I feel that since application manifests are declarative, they should be able to describe desired state, not just additive state.
Currently when performing a push or apply-manifest (or cf7 push, v3-zdt-push, etc.), options like env key/values, service bindings, metadata labels/annotations, etc., are additive & won't be removed from the app if they're removed from the manifest:
Apply changes specified in a manifest to the named apps and their underlying processes. These changes are additive and will not modify any unspecified properties or remove any existing environment variables, routes, or services.
This makes it harder to reason about the actual service bindings, labels, etc. that an app is using, since the only way to remove no-longer-desired config is to manually imperatively go remove it with cf unbind-service..., etc.
Describe the solution you'd like
cf push -f manifest.yml --remove-unknown
Basically, if a service binding, env value, metadata value, etc. doesn't exist in the manifest.yml during push, but does exist on the current revision/deployment of the app already deployed, then they should be removed from the app. The manifest should be able to be the absolute source of truth.
Describe alternatives you've considered
Pushing an entirely new instance of the app and using blue/green deployments is an option (e.g., what the autopilot plugin would do) because it creates an entirely new app ID, and thus all new service bindings, labels, env vars, etc... But it also blows away revision history, any metrics history, etc. It entirely defeats the purpose of being able to do revisions and zdt-push and such.
Thoughts?
What's the user value of this feature request?
As a user, when I perform
cf pushwith a manifest, I'd like a way for the manifest to be the absolute truth for the application's configuration.Who is the functionality for?
Humans, CI/CD systems, compliance and auditing folks, anyone wanting configuration as code stored in git, anyone and anything which performs a
cf pushwith a manifestHow often will this functionality be used by the user?
Every cf push or apply-manifest
Who else is affected by the change?
Shouldn't cause a breaking change as long as it's behind a flag like
--remove-undeclaredor something to that effect.Is your feature request related to a problem? Please describe.
I feel that since application manifests are declarative, they should be able to describe desired state, not just additive state.
Currently when performing a
pushorapply-manifest(or cf7 push, v3-zdt-push, etc.), options likeenvkey/values, service bindings, metadata labels/annotations, etc., are additive & won't be removed from the app if they're removed from the manifest:This makes it harder to reason about the actual service bindings, labels, etc. that an app is using, since the only way to remove no-longer-desired config is to manually imperatively go remove it with
cf unbind-service..., etc.Describe the solution you'd like
Basically, if a service binding, env value, metadata value, etc. doesn't exist in the
manifest.ymlduring push, but does exist on the current revision/deployment of the app already deployed, then they should be removed from the app. The manifest should be able to be the absolute source of truth.Describe alternatives you've considered
Pushing an entirely new instance of the app and using blue/green deployments is an option (e.g., what the autopilot plugin would do) because it creates an entirely new app ID, and thus all new service bindings, labels, env vars, etc... But it also blows away revision history, any metrics history, etc. It entirely defeats the purpose of being able to do
revisionsandzdt-pushand such.Thoughts?