3scale-operator
3scale-operator copied to clipboard
CustomPolicy reconcilliation issue
Steps to reproduce
- Create APIManager CR with custom policy
spec:
apicast:
stagingSpec:
customPolicies:
- name: Example
version: "0.1"
secretRef:
name: policy
- Edit APIMamanger CR: just update the letter case of the custom policy name
spec:
apicast:
stagingSpec:
customPolicies:
- name: example
version: "0.1"
secretRef:
name: policy
Then, the deploymnent config has two volumemounts. It is expected to have only one.
Initially, with the original CR, the deployment config looked like this:
apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
annotations:
apps.3scale.net/apicast-policy-volume-550ce71bf15f7ab80906b5e066d2fc30: policy-01-example
spec:
template:
spec:
volumes:
- name: policy-01-example
secret:
defaultMode: 420
secretName: policy
containers:
- volumeMounts:
- mountPath: /opt/app-root/src/policies/Example/0.1
name: policy-01-example
readOnly: true
After the CR change, it looks like this:
apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
annotations:
apps.3scale.net/apicast-policy-volume-550ce71bf15f7ab80906b5e066d2fc30: policy-01-example
spec:
template:
spec:
volumes:
- name: policy-01-example
secret:
defaultMode: 420
secretName: policy
containers:
- volumeMounts:
- mountPath: /opt/app-root/src/policies/Example/0.1
name: policy-01-example
readOnly: true
- volumeMounts:
- mountPath: /opt/app-root/src/policies/example/0.1
name: policy-01-example
readOnly: true