8000 THREESCALE-8502 3scale operator to have an ability to deal with multiple release paths by eguzki · Pull Request #781 · 3scale/3scale-operator · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

THREESCALE-8502 3scale operator to have an ability to deal with multiple release paths #781

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

Merged
merged 3 commits into from
Sep 6, 2022

Conversation

eguzki
Copy link
Member
@eguzki eguzki commented Aug 23, 2022

what

THREESCALE-8502 3scale operator to have an ability to deal with multiple release paths

how

Upgrade procedure in reconciliation loop. Actually, most of it was already in the normal reconciliation loop. Only DC triggers and pod template labels were moved

custom release upgrade procedure has been removed.

verification steps

Deploy 2.12

git checkout 3scale-2.12.0-GA
make run
k apply -f - <<EOF
apiVersion: v1
kind: Secret
metadata:
  creationTimestamp: null
  name: aws-auth
stringData:
  AWS_ACCESS_KEY_ID: testID
  AWS_SECRET_ACCESS_KEY: testkey
  AWS_BUCKET: testbucket
  AWS_REGION: us-east-1
type: Opaque
EOF
k apply -f - <<EOF
---
apiVersion: apps.3scale.net/v1alpha1
kind: APIManager
metadata:
  name: apimanager1
spec:
  wildcardDomain: eguzki.apps.dev-eng-ocp4-operator.dev.3sca.net
  resourceRequirementsEnabled: false
  system:
    fileStorage:
      simpleStorageService:
        configurationSecretRef:
          name: aws-auth
EOF

wait for deployment to be ready

oc wait --for=condition=available apimanager/apimanager1 --timeout=-1s
apimanager.apps.3scale.net/apimanager1 condition met

Check apimanager version

k get apimanager apimanager1 -o yaml | yq e '.metadata.annotations' -
apps.3scale.net/apimanager-threescale-version: "2.12"
apps.3scale.net/threescale-operator-version: 0.9.0

Check imagestreams, for instance amp-apicast

k get is amp-apicast -o yaml | yq e '.spec.tags' -
- annotations:
    openshift.io/display-name: AMP APIcast 2.12
  from:
    kind: DockerImage
    name: quay.io/3scale/3scale212:apicast-3scale-2.12.0-GA
  generation: 2
  importPolicy: {}
  name: "2.12"
  referencePolicy:
    type: Source

Check deployment config's triggers, for instance, apicast-production

k get dc apicast-production -o yaml | yq e '.spec.triggers' -
- type: ConfigChange
- imageChangeParams:
    automatic: true
    containerNames:
      - system-master-svc
      - apicast-production
    from:
      kind: ImageStreamTag
      name: amp-apicast:2.12
      namespace: eguzki
    lastTriggeredImage: quay.io/3scale/3scale212@sha256:f19731b5fe9bf4ba60977d1498eff5082836a152662d7fe310928f10e7e5658a
  type: ImageChange

Kill 2.12 operator with CTRL+c and move git workspace to apimanager-upgrade-in-main-reconciler-loop branch

git checkout apimanager-upgrade-in-main-reconciler-loop

Run the controller to perform upgrade

make run

wait for deployment to be ready

oc wait --for=condition=available apimanager/apimanager1 --timeout=-1s
apimanager.apps.3scale.net/apimanager1 condition met

Check apimanager version has been updated to 2.13

k get apimanager apimanager1 -o yaml | yq e '.metadata.annotations' -
apps.3scale.net/apimanager-threescale-version: "2.13"
apps.3scale.net/threescale-operator-version: 0.10.0

Check that imagestream objects have a new tag for the 2.13

k get is amp-apicast -o yaml | yq e '.spec.tags' -
- annotations:
    openshift.io/display-name: AMP APIcast 2.12
  from:
    kind: DockerImage
    name: quay.io/3scale/3scale212:apicast-3scale-2.12.0-GA
  generation: 2
  importPolicy: {}
  name: "2.12"
  referencePolicy:
    type: Source
- annotations:
    openshift.io/display-name: AMP APIcast 2.13
  from:
    kind: DockerImage
    name: quay.io/3scale/apicast:latest
  generation: 4
  importPolicy: {}
  name: "2.13"
  referencePolicy:
    type: Source

Check that deployment config triggers has reference updated to 2.13

- imageChangeParams:
    automatic: true
    containerNames:
      - system-master-svc
      - apicast-production
    from:
      kind: ImageStreamTag
      name: amp-apicast:2.13
      namespace: eguzki
    lastTriggeredImage: quay.io/3scale/apicast@sha256:31c9d27750f0ddc3e08269058ac07e0d490b38f25c1ab6f36431f93d99acb9ed
  type: ImageChange

@openshift-ci
Copy link
openshift-ci bot commented Aug 23, 2022

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@eguzki eguzki changed the title apimanager upgrade in reconciliation loop THREESCALE-8502 3scale operator to have an ability to deal with multiple release paths Aug 24, 2022
@eguzki eguzki force-pushed the apimanager-upgrade-in-main-reconciler-loop branch 2 times, most recently from f44bf3b to 3197cf9 Compare August 26, 2022 08:56
@eguzki eguzki marked this pull request as ready for review August 26, 2022 14:04
@KevFan
Copy link
Contributor
KevFan commented Sep 5, 2022

Verified ! 👍 Just have one minor comment

@eguzki eguzki removed the request for review from Patryk-Stefanski September 6, 2022 07:56
@eguzki eguzki force-pushed the apimanager-upgrade-in-main-reconciler-loop branch from 4298b0c to 9ac98cf Compare September 6, 2022 08:55
@codeclimate
Copy link
codeclimate bot commented Sep 6, 2022

Code Climate has analyzed commit 9ac98cf and detected 9 issues on this pull request.

Here's the issue category breakdown:

Category Count
Duplication 5
Style 4

View more on Code Climate.

Copy link
Contributor
@KevFan KevFan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

@eguzki eguzki merged commit 235b58e into master Sep 6, 2022
@eguzki eguzki deleted the apimanager-upgrade-in-main-reconciler-loop branch September 6, 2022 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0