From f5bce2c5ae9b5c2460478e07e7b659c89f82aa2f Mon Sep 17 00:00:00 2001 From: Yi Rae Kim Date: Mon, 13 Nov 2023 20:21:39 -0500 Subject: [PATCH] reset Signed-off-by: Yi Rae Kim --- .github/workflows/olm_tests.yaml | 4 ++-- Makefile | 4 ++-- ...keeper-operator.clusterserviceversion.yaml | 2 +- config/manager/kustomization.yaml | 2 +- config/olm-install/install-resources.yaml | 20 ++++++++++++------- 5 files changed, 19 insertions(+), 13 deletions(-) diff --git a/.github/workflows/olm_tests.yaml b/.github/workflows/olm_tests.yaml index cbe8dd67..5a1528ad 100644 --- a/.github/workflows/olm_tests.yaml +++ b/.github/workflows/olm_tests.yaml @@ -42,7 +42,7 @@ jobs: # TODO: Use operator-sdk run bundle and bundle-upgrade commands for # testing with OLM. OPERATOR_VERSION=$(awk '/^VERSION \?=/ {print $3}' Makefile) - REPO=http://localhost:5000 + REPO=localhost:5000 IMG=${REPO}/gatekeeper-operator:${GITHUB_SHA} PREV_BUNDLE_INDEX_IMG=quay.io/gatekeeper/gatekeeper-operator-bundle-index:$(make get-replaces-version) make build-and-push-bundle-images IMG=${IMG} REPO=${REPO} VERSION=${GITHUB_SHA} OPERATOR_VERSION=${OPERATOR_VERSION} @@ -58,7 +58,7 @@ jobs: echo "Waiting for operator deployment"; \ sleep 2; \ done - kubectl -n mygatekeeper wait deployment/gatekeeper-operator-controller --for condition=Available --timeout=90s + kubectl -n mygatekeeper wait pod -l olm.catalogSource=gatekeeper-operator --for condition=ready --timeout=300s - name: E2E Tests run: | diff --git a/Makefile b/Makefile index 36e0843d..6c1368e3 100644 --- a/Makefile +++ b/Makefile @@ -54,7 +54,7 @@ DOCKER ?= docker # # For example, running 'make bundle-build bundle-push catalog-build catalog-push' will build and push both # gatekeeper.sh/gatekeeper-operator-bundle:$VERSION and gatekeeper.sh/gatekeeper-operator-catalog:$VERSION. -REPO ?= localhost:5000 +REPO ?= quay.io/gatekeeper IMAGE_TAG_BASE ?= $(REPO)/gatekeeper-operator # BUNDLE_IMG defines the image:tag used for the bundle. @@ -376,7 +376,7 @@ endif # Generate and push bundle image and bundle index image # Note: OPERATOR_VERSION is an arbitrary number and does not need to match any official versions .PHONY: build-and-push-bundle-images -build-and-push-bundle-images: # docker-build docker-push +build-and-push-bundle-images: #docker-build docker-push $(MAKE) bundle VERSION=$(OPERATOR_VERSION) $(MAKE) bundle-build $(MAKE) docker-push IMG=$(BUNDLE_IMG) diff --git a/bundle/manifests/gatekeeper-operator.clusterserviceversion.yaml b/bundle/manifests/gatekeeper-operator.clusterserviceversion.yaml index f0b5e053..da5d808b 100644 --- a/bundle/manifests/gatekeeper-operator.clusterserviceversion.yaml +++ b/bundle/manifests/gatekeeper-operator.clusterserviceversion.yaml @@ -378,7 +378,7 @@ spec: env: - name: RELATED_IMAGE_GATEKEEPER value: openpolicyagent/gatekeeper:v3.11.1 - image: localhost:5000/gatekeeper-operator:v3.11.1 + image: quay.io/gatekeeper/gatekeeper-operator:v3.11.1 imagePullPolicy: Always livenessProbe: httpGet: diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 299a52e5..59afe760 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -13,5 +13,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization images: - name: controller - newName: localhost:5000/gatekeeper-operator + newName: quay.io/gatekeeper/gatekeeper-operator newTag: v3.11.1 diff --git a/config/olm-install/install-resources.yaml b/config/olm-install/install-resources.yaml index ce281abb..2d6546f8 100644 --- a/config/olm-install/install-resources.yaml +++ b/config/olm-install/install-resources.yaml @@ -2,16 +2,22 @@ apiVersion: v1 kind: Namespace metadata: - name: mygatekeeper + name: gatekeeper-system + labels: + pod-security.kubernetes.io/audit: baseline + pod-security.kubernetes.io/audit-version: latest + pod-security.kubernetes.io/enforce: baseline + pod-security.kubernetes.io/warn: baseline + pod-security.kubernetes.io/warn-version: latest --- apiVersion: operators.coreos.com/v1alpha1 kind: CatalogSource metadata: name: gatekeeper-operator - namespace: mygatekeeper + namespace: gatekeeper-system spec: displayName: Gatekeeper Operator Upstream - image: 'quay.io/gatekeeper/gatekeeper-operator-bundle-index:latest' + image: 'quay.io/yikim/gatekeeper-operator-bundle-index:v3.11.1' publisher: github.com/gatekeeper/gatekeeper-operator sourceType: grpc --- @@ -19,15 +25,15 @@ apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: name: gatekeeper-operator - namespace: mygatekeeper + namespace: gatekeeper-system --- apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: gatekeeper-operator-sub - namespace: mygatekeeper + namespace: gatekeeper-system spec: name: gatekeeper-operator - channel: "3.11" + channel: stable source: gatekeeper-operator - sourceNamespace: mygatekeeper + sourceNamespace: gatekeeper-system