In a recent fix in the Kubewarden admission controller we change the controller to forward the secrets used to authenticate in private registries into the Policy Server deployments. During this process we noticed that the field imagePullSecret in the Policy Server CRD can me misleading. This field contains the secret name used to configure the policy server to authenticate into the registry where it downloads the policies. There is no relation with the secret used to pull the policy server container image itself.
In this issue we want to fix this potential confusion doing two main changes:
- Rename the field: rename the field to properly reflact its goal (e.g.
policiesPullSecrets or sourceRegistriesAuth)
- Allow a list of secrets names: this follow the common Kubernetes community/documentation practice where each registry has it's own secret with authentication data
This is a breaking change. The migration process should be defined before any change in the CRDs. One option is to add a new field, deprecate the old one and add a code in the controller to migrate the values from the old field to the new one. After some time, remove the deprecated field and keep only the new one.
Acceptance criteria
- Rename field in the Policy Server CRD
- Allow a list of string in the field
- Add tests
- Write documentation about how to use the "new" field
- Write documentation to cover the migration from old field the the "new" one
In a recent fix in the Kubewarden admission controller we change the controller to forward the secrets used to authenticate in private registries into the Policy Server deployments. During this process we noticed that the field
imagePullSecretin the Policy Server CRD can me misleading. This field contains the secret name used to configure the policy server to authenticate into the registry where it downloads the policies. There is no relation with the secret used to pull the policy server container image itself.In this issue we want to fix this potential confusion doing two main changes:
policiesPullSecretsorsourceRegistriesAuth)This is a breaking change. The migration process should be defined before any change in the CRDs. One option is to add a new field, deprecate the old one and add a code in the controller to migrate the values from the old field to the new one. After some time, remove the deprecated field and keep only the new one.
Acceptance criteria