3scale / apicast-operator

Apache License 2.0
8 stars 15 forks source link

THREESCALE-11385 Community release of APIcast Operator v0.8.0 (2.14.1) #228

Closed valerymo closed 6 days ago

valerymo commented 1 month ago

Jira: https://issues.redhat.com/browse/THREESCALE-11385

Validation - fresh install

#### Prerequisites, Useful links - Doc: [Apicast-operator quickstart-guide](https://github.com/3scale/apicast-operator/blob/master/doc/quickstart-guide.md) - Install 3scale-operator (can be locall installation) 3scale systemp-seed secret data will be used to create a secret for apicast that contains a 3scale Porta admin portal endpoint information ```sh cd 3scale-operator make install export NAMESPACE=3scale-test oc new-project $NAMESPACE oc project $NAMESPACE make download make run -------- $ oc project Using project "3scale-test" on server "https://api.vmo01.mjhc.s1.devshift.org:6443". $ oc apply -f s3-creds-secret.yaml secret/s3-credentials created $ oc apply -f apimanagerCR.yaml apimanager.apps.3scale.net/example-apimanager created ``` #### Create CatalogSource CatalogSource.yaml ```yaml apiVersion: operators.coreos.com/v1alpha1 kind: CatalogSource metadata: name: communityapicast namespace: openshift-marketplace spec: displayName: Community Apicast 0.8.0 sourceType: grpc image: quay.io/vmogilev_rhmi/apicast-operator-index:v0.8.0 ``` ```sh oc apply -f CatalogSource.yaml catalogsource.operators.coreos.com/communityapicast created ``` ### Install Apicast - Install Apicast Operator from Operators Hub ```sh $ oc get deploy NAME READY UP-TO-DATE AVAILABLE AGE apicast-operator-controller-manager-v2 1/1 1 1 22s $ oc describe deploy apicast-operator-controller-manager-v2 |grep Image containerImage: quay.io/vmogilev_rhmi/apicast-operator:v0.8.0 Image: quay.io/vmogilev_rhmi/apicast-operator:v0.8.0 $ oc get pod NAME READY STATUS RESTARTS AGE apicast-operator-controller-manager-v2-5bd6876657-8vr65 1/1 Running 0 54s $ ``` - Create a kubernetes secret that contains a 3scale Porta admin portal endpoint information `kubectl create secret generic ${SOME_SECRET_NAME} --from-literal=AdminPortalURL=MY_3SCALE_URL` ``` $ oc create secret generic 3scaleportal --from-literal=AdminPortalURL=https://XXXXX@3scale-admin.apps.vmo01.mjhc.s1.devshift.org secret/3scaleportal created ``` - Apply Apicast CR ```yaml apiVersion: apps.3scale.net/v1alpha1 kind: APIcast metadata: name: example-apicast namespace: apicast-test spec: adminPortalCredentialsRef: name: 3scaleportal hpa: true ``` ```sh $ oc apply -f APIcastCR.yml apicast.apps.3scale.net/example-apicast created ``` - Check APIcast ```sh $ oc get pod NAME READY STATUS RESTARTS AGE apicast-example-apicast-78bd4db9c7-bzns5 1/1 Running 0 61s apicast-operator-controller-manager-v2-5bd6876657-8vr65 1/1 Running 0 9m22s $ oc describe pod apicast-example-apicast-78bd4db9c7-bzns5 |grep Image: Image: quay.io/3scale/apicast:3scale-2.14.1-GA $ oc rsh apicast-example-apicast-78bd4db9c7-bzns5 sh-4.4$ ls app bin http.d lib scripts src sh-4.4$ ls -l scripts/ total 16 -rwxr-xr-x. 1 default root 2866 Mar 5 2024 apicast -rwxr-xr-x. 1 default root 1571 Mar 5 2024 apicast_cli.lua -rwxr-xr-x. 1 default root 22 Mar 5 2024 container-entrypoint -rwxr-xr-x. 1 default root 363 Mar 5 2024 run sh-4.4$ sh-4.4$ uname -a Linux apicast-example-apicast-78bd4db9c7-bzns5 5.14.0-427.37.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Sep 13 12:41:50 EDT 2024 x86_64 x86_64 x86_64 GNU/Linux sh-4.4$ scripts/run loading production environment configuration: /opt/app-root/src/config/production.lua 2024/10/07 07:52:48 [emerg] 90#90: bind() to 0.0.0.0:8090 failed (98: Address already in use) 2024/10/07 07:52:48 [emerg] 90#90: bind() to 0.0.0.0:8081 failed (98: Address already in use) ...... ```

Validation - Upgrade

- Intall apicast-operator Release v0.7.1 ```sh $ oc get pod NAME READY STATUS RESTARTS AGE apicast-example-apicast-85fddcbf5c-h6l5w 1/1 Running 0 110s apicast-operator-controller-manager-v2-dcddbd6b6-8v74t 1/1 Running 0 2m46s $ $ oc describe pod apicast-example-apicast-85fddcbf5c-h6l5w |grep Image: Image: quay.io/3scale/apicast:v3.13.2 $ oc describe pod apicast-operator-controller-manager-v2-dcddbd6b6-8v74t |grep Image: containerImage: quay.io/vmogilev_rhmi/apicast-operator:v0.7.1 Image: quay.io/vmogilev_rhmi/apicast-operator:v0.7.1 $ oc rsh apicast-example-apicast-85fddcbf5c-h6l5w sh-4.4$ ls app bin http.d scripts src sh-4.4$ ./scripts/apicast --help Usage: ./scripts/apicast start ([-b] | [-l]) ([-v] | [-q]) [--template