-
Notifications
You must be signed in to change notification settings - Fork 100
Threescale 6735 - Reconcile Secrets (replace PR 845) #861
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Hi @MStokluska , @austincunningham, @eguzki . This PR is based on PR of Patryk - #845 and fixes issues with DCs update. |
|
attaching more test logs, adding more secrets and updating CR. |
|
Needs a rebase |
1e71eb8 to
c86f89d
Compare
@austincunningham |
c86f89d to
b7ca67b
Compare
b7ca67b to
154cfbb
Compare
5df7e11 to
9605838
Compare
|
Code Climate has analyzed commit 9605838 and detected 9 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
|
Looks good to me, once e2e passes it's ready to merge, good job! |
|
/approve |
What
THREESCALE-6735
additionalPodAnnotations. It has been split toStagingAdditionalPodAnnotationsandProductionAdditionalPodAnnotationsHow
apimanager.apps.3scale.net/watched-by=apimanagerlabel. The operator will get notified of the changes in the secret only when this label is present.Verification
These are steps to prepare for policy secrets creation:
apicast-policy.jsonfile{ "$schema": "http://apicast.io/policy-v1/schema#manifest#", "name": "APIcast Example Policy", "summary": "This is just an example.", "description": "This policy is just an example how to write your custom policy.", "version": "0.1", "configuration": { "type": "object", "properties": { } } }example.luafileinit.luafileAt this point we are ready to create customPolicy secrets
check annotations in DCs and compare with CR confuguration:
apicast-stagingdc will have 1 annotation (+ pod template annotation)- for custom-policy1-secretapicast-productiondc will have annotations (+ pod template annotations) - for custom-policy2-secret and custom-policy3-secretExamples of DCs:
custom-policy1-secretused forapicast-stagingoc label secret custom-policy1-secret newlabel=newlabel oc get deploymentconfig apicast-production -o=jsonpath='{@.spec.template.metadata.annotations}'apicast-stagingDC has new Revision and apicast-production has not changed:Expected: apicast-production version has increased, but apicast-staging version has not changed.
Notes In this test we could see that DCs of apicast-production and apicast-staging updated independently. It's working this way if they are using different custom policies/secrets.
If apicast-production and apicast-staging will have same policies / same secrets, as in example below -
both DCs will be updated in case one of secrets changed.