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-10683 Bump Go, controller-runtime, and k8s dependencies #936

Merged
merged 4 commits into from
Mar 20, 2024

Conversation

carlkyrillos
Copy link
Contributor

@carlkyrillos carlkyrillos commented Mar 1, 2024

Issue Link

JIRA: THREESCALE-10683

NOTE: The e2e and unit tests will fail until this PR to openshift/release is merged - it bumps the version of Go that PROW uses to 1.20.

What

This PR bumps a number of dependencies, the notable ones being:

  • go: 1.19 -> 1.20
  • ginkgo: 1.16.5 -> 2.13.0
  • client-go: 0.24.3 -> 0.28.3
  • apimachinery: 0.24.3 -> 0.28.3
  • controller-runtime: 0.12.2 -> 0.16.5

NOTE: This PR doesn't bump the version of operator-sdk, that will be done in a separate PR.

Verification Steps

Prerequisites

  1. Go v1.20 - I recommend using the gvm CLI to quickly switch between Go versions
  2. Provisioned OSD cluster

Cluster Scoped Scenario

  1. Create the CatalogSource and install the operator (note: feel free to build your own images or use the ones provided)
make bundle-run quay.io/ckyrillo/3scale-operator-bundles:threescale-10683
  1. Create a Namespace and s3-credentials Secret:
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
  1. Create the APIManager CR (make sure to replace <REPLACE_WITH_CLUSTER_NAME> with the name of your cluster):
export CLUSTER_NAME=<REPLACE_WITH_CLUSTER_NAME>
export WILDCARD_DOMAIN=$(ocm get /api/clusters_mgmt/v1/clusters --parameter search="name is '$CLUSTER_NAME'" | jq -r '.items[].console.url' | cut -d'.' -f2-)

cat << EOF | oc create -f -
kind: APIManager
apiVersion: apps.3scale.net/v1alpha1
metadata:
  name: 3scale
  namespace: $NAMESPACE
spec:
  wildcardDomain: $WILDCARD_DOMAIN
  monitoring:
    enabled: true
  system:
    fileStorage:
      simpleStorageService:
        configurationSecretRef:
          name: s3-credentials
EOF
  1. Verify the installation completes successfully:
oc get apimanager -n $NAMESPACE -o yaml -w
  1. Delete the test namespace to prepare for the namespace scoped scenario
oc delete project $NAMESPACE
  1. Uninstall the cluster scoped operator to prepare for the namespace scoped scenario

Namespace Scoped Scenario

  1. Create a fresh Namespace and s3-credentials Secret:
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
  1. Navigate to the OperatorHub in the OpenShift UI, search for 3scale, and install the dev version the 3scale-operator in the 3scale-test Namespace.

  2. Create the APIManager CR:

cat << EOF | oc create -f -
kind: APIManager
apiVersion: apps.3scale.net/v1alpha1
metadata:
  name: 3scale
  namespace: $NAMESPACE
spec:
  wildcardDomain: $WILDCARD_DOMAIN
  monitoring:
    enabled: true
  system:
    fileStorage:
      simpleStorageService:
        configurationSecretRef:
          name: s3-credentials
EOF
  1. Verify the installation completes successfully:
oc get apimanager -n $NAMESPACE -o yaml -w

@carlkyrillos carlkyrillos requested a review from a team as a code owner March 1, 2024 19:08
@carlkyrillos
Copy link
Contributor Author

/retest

@MStokluska
Copy link
Contributor

Verified with target ns, cluster scoped and own ns installations. All looks good.
Given the code changes are pretty much same as the apicast operator one (already merged) and I see no issues with them
/lgtm
lets wait for e2e to pass before merging please

@MStokluska
Copy link
Contributor

/retest

@carlkyrillos carlkyrillos merged commit 8a20800 into 3scale:master Mar 20, 2024
13 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.

None yet

2 participants