Skip to content

Conversation

@tkan145
Copy link
Contributor

@tkan145 tkan145 commented Oct 2, 2025

What

Fix https://issues.redhat.com/browse/THREESCALE-11951

Verification steps

  • Checkout this branch
  • Prepare 3scale
make cluster/prepare/local
  • 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
  system:
    fileStorage:
      simpleStorageService:
        configurationSecretRef:
          name: s3-credentials
  externalComponents:
    backend:
      redis: true
    system:
      database: true
      redis: true
EOF
  • Start operator
make run
  • Wait for the installation to finish
  • In another terminal, append the system config file
oc patch configmap system --type merge -p "{\"data\": {\"currencies.yml\": \"production:\n  'USD - American Dollar': 'USD'\n  'EUR - Euro': 'EUR'\n  'GBP - British Pound': 'GBP'\n  'NZD - New Zealand dollar': 'NZD'\n  'CNY - Chinese Yuan Renminbi': 'CNY'\n  'CAD - Canadian Dollar': 'CAD'\n  'AUD - Australian Dollar': 'AUD'\n  'JPY - Japanese Yen': 'JPY'\n  'CHF - Swiss Franc': 'CHF'\n  'SAR - Saudi Riyal': 'SAR'\n  'ARS - Argentine peso': 'ARS'\n\"}}"
  • Include the new ConfigMap entry currencies.yml in the system-config volume of system-(app|sidekiq)
export PATCH_SYSTEM_VOLUMES='{"spec":{"template":{"spec":{"volumes":[{"configMap":{"items":[{"key":"zync.yml","path":"zync.yml"},{"key":"rolling_updates.yml","path":"rolling_updates.yml"},{"key":"service_discovery.yml","path":"service_discovery.yml"},{"key":"currencies.yml","path":"currencies.yml"}],"name":"system"},"name":"system-config"}]}}}}'
$ oc patch deployment system-app -p $PATCH_SYSTEM_VOLUMES
$ oc patch deployment system-sidekiq -p $PATCH_SYSTEM_VOLUMES
  • Wait for the rollout to finish
  • Check system-app and system-sidekiq volume mount, you should see currencies.yml file there
oc get deployment system-sidekiq -o json | jq -r .spec.template.spec.volumes
oc get deployment system-app -o json | jq -r .spec.template.spec.volumes

3scale enables customisation of billing behaviour by adding an entry to the
system configmap and mounting its value inside the pod. However, while the
official documentation recommends using system-config volume mount, the current
operator version will revert this change, causing issues for anyone upgrading
to a newer 3scale version.

With this PR we will only reconcile the DB's TLS volume and leave the rest as is
@tkan145 tkan145 requested a review from a team as a code owner October 2, 2025 05:27
@briangallagher
Copy link
Contributor

briangallagher commented Oct 2, 2025

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

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

@tkan145 tkan145 merged commit a3d4b43 into 3scale:master Oct 2, 2025
18 checks passed
@tkan145 tkan145 changed the title Only reconcile DB's TLS volume THREESCALE-11951 - Only reconcile DB's TLS volume Oct 2, 2025
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