Open surendar-b opened 2 years ago
Describe the bug If the cluster has ConfigMap that is not used by any of the deployment, configurator not is creating a version (CCM). This needs to be verified. To Reproduce
1.Create a ConfigMaps to be used in a deployment
apiVersion: v1 kind: ConfigMap metadata: name: demo-config-1 data: # file-like keys user-interface.properties: | color.good=purple color.bad=yellow
$ kubectl apply -f demo-config-1.yaml
2.Create a ConfigMap that will not be used in a deployment
apiVersion: v1 kind: ConfigMap metadata: name: demo-config-2 data: # file-like keys game.properties: | android.apk=free fire,bgmi computer=stambled guys
$ kubectl apply -f demo-config-2.yaml
apiVersion: apps/v1 kind: Deployment metadata: name: demo-deployment spec: replicas: 1 selector: matchLabels: app: service-nginx template: metadata: labels: app: service-nginx spec: containers: - name: nginx image: nginx:1.14 ports: - containerPort: 80 volumeMounts: - name: nginx mountPath: "/config" readOnly: true volumes: - name: nginx configMap: name: demo-config-1
$ kubectl apply -f deployment.yaml
Install configurator
helm install configurator gopaddle_configurator/configurator --version 0.4.0-alpha
Verify annotation added in 'spec.template.metadata.annotation' level in deployment.
$ kubectl get deployment demo-deployment -o yaml
template: metadata: annotations: ccm-demo-config-1: qds24
Verify the new version created for the 'demo-config-1' and 'demo-config-2'.
$ kubectl get customconfigmap
delete the demo-config-2
kubectl delete configmap demo-config-2
Create demo-config-2 again
kubectl apply -f demo-config-2.yaml
List the custom configmaps
kubectl get customconfigmap
Expected behavior In steps 6 & 9 configurator must create a new version for demo-config-2 ConfigMap
Please send pull requests to SODACODE-2022
Describe the bug If the cluster has ConfigMap that is not used by any of the deployment, configurator not is creating a version (CCM). This needs to be verified. To Reproduce
1.Create a ConfigMaps to be used in a deployment
2.Create a ConfigMap that will not be used in a deployment
Install configurator
Verify annotation added in 'spec.template.metadata.annotation' level in deployment.
Verify the new version created for the 'demo-config-1' and 'demo-config-2'.
delete the demo-config-2
Create demo-config-2 again
List the custom configmaps
Expected behavior In steps 6 & 9 configurator must create a new version for demo-config-2 ConfigMap