Skip to content

CustomPolicy reconcilliation issue #709

@eguzki

Description

@eguzki

Steps to reproduce

  1. Create APIManager CR with custom policy
spec:
  apicast:
    stagingSpec:
       customPolicies:
           - name: Example
             version: "0.1"
             secretRef:
                name: policy
  1. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions