Skip to content
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

THREESCALE-11346 Backport support for Backend CRs using wss protocol #1019

Open
wants to merge 1 commit into
base: 3scale-2.14-stable
Choose a base branch
from

Conversation

carlkyrillos
Copy link
Contributor

Issue Link

JIRA: THREESCALE-11346

What

This PR backports #994 to the 3scale-2.14-stable branch for the 2.14.3 release.

This PR allows users to create a Backend CR that uses the WSS protocol for the privateBaseURL. This was already allowed for Backends created through the 3scale portal.

Verification Steps

  1. Checkout this PR

  2. Run the operator locally or via OLM using prebuilt image

BUNDLE_IMG=quay.io/ckyrillo/3scale-operator-bundles:threescale-11346 make bundle-run
  1. Create a Namespace, dummy s3 Secret, and APIManager CR:
export NAMESPACE=3scale-test
oc new-project $NAMESPACE
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
EOF
  1. Wait for the install to complete:
oc get apimanager 3scale -n 3scale-test -oyaml -w
  1. Create a Backend CR with a privateBaseURL that uses WSS:
cat << EOF | oc create -f -
kind: Backend
apiVersion: capabilities.3scale.net/v1beta1
metadata:
  name: wss-backend
  namespace: $NAMESPACE
spec:
  name: WSS Backend
  privateBaseURL: 'wss://api.examplewss.com'
  systemName: wssbackend
EOF
  1. Verify that the Backend CR is ready
oc get backend wss-backend -n 3scale-test -oyaml | yq e '.status.conditions[] | select(.type == "Synced")' 
  1. Login to the admin portal and confirm the WSS Backend exists

@carlkyrillos carlkyrillos requested a review from a team as a code owner September 11, 2024 18:44
@austincunningham
Copy link
Contributor

austincunningham commented Sep 12, 2024

@carlkyrillos do we need to verify this again. I would say its verified and on master and if the e2e pass we are good. WDYT?

@carlkyrillos
Copy link
Contributor Author

carlkyrillos commented Sep 12, 2024

@carlkyrillos do we need to verify this again. I would say its verified and on master and if the e2e pass we are good. WDYT?

@austincunningham I verified it myself yesterday and it was already verified on master like you said so I think it's fine to merge

@austincunningham
Copy link
Contributor

/lgtm

@austincunningham
Copy link
Contributor

/approve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants