Skip to content

Conversation

@tkan145
Copy link
Contributor

@tkan145 tkan145 commented Nov 20, 2025

What

Fix THREESCALE-12013

We rely heavily on the Deployment revision to trigger the migration, however during an upgrade the revision will not change until the operator updates the Deployment with the new image first, then causes the migration to run after the Deployment has been deployed.

Verification steps

  • Prepare namespace
make cluster/prepare/project
make cluster/create/system-redis
make cluster/create/backend-redis
make cluster/create/provision-database
  • Create a new catalog source
cat << EOF | oc create -f -
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: threescale-dev
  namespace: 3scale-test
spec:
  sourceType: grpc
  image: 'quay.io/an_tran/3scale-index:v0.71.0'
EOF
  • Wait for the installation to finish then install threescale-dev from the catalog, pick version 2.15.5
  • Install APIM
export NAMESPACE=3scale-test

cat << EOF | oc create -f -
kind: Secret
apiVersion: v1
metadata:
  name: s3-credentials
  namespace: $NAMESPACE
data:
  AWS_ACCESS_KEY_ID: c29tZXRoaW5nCg==
  AWS_BUCKET: c29tZXRoaW5nCg==
  AWS_REGION: dXMtd2VzdC0xCg==
  AWS_SECRET_ACCESS_KEY: c29tZXRoaW5nCg==
type: Opaque
EOF

DOMAIN=$(oc get routes console -n openshift-console -o json | jq -r '.status.ingress[0].routerCanonicalHostname' | sed 's/router-default.//')
cat << EOF | oc create -f -
kind: APIManager
apiVersion: apps.3scale.net/v1alpha1
metadata:
  name: 3scale
  namespace: $NAMESPACE
spec:
  wildcardDomain: $DOMAIN
  apicast:
    stagingSpec:
      replicas: 0
    productionSpec:
      replicas: 0
  system:
    fileStorage:
      simpleStorageService:
        configurationSecretRef:
          name: s3-credentials
  externalComponents:
    backend:
      redis: true
    system:
      database: true
      redis: true
EOF  
  • Wait for the installation to finish
  • Trigger an upgrade
  • You will see the system-app-pre job fired before the new system-app is deployed and then the system-app-post job

@tkan145 tkan145 requested a review from a team as a code owner November 20, 2025 06:25
@briangallagher
Copy link
Contributor

briangallagher commented Nov 20, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Copy link
Member

@eguzki eguzki left a comment

Choose a reason for hiding this comment

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

LGTM

Left minor comment

@tkan145 tkan145 merged commit 9dbdd51 into 3scale:master Nov 20, 2025
16 checks passed
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.

3 participants