diff --git a/Makefile b/Makefile index 73252831..5c369fb9 100644 --- a/Makefile +++ b/Makefile @@ -54,6 +54,12 @@ OPERATOR_SDK_VERSION ?= v1.34.2 # Image URL to use all building/pushing image targets IMG ?= $(IMAGE_TAG_BASE):$(VERSION) +# kube-rbac-proxy image base +KRP_IMAGE_BASE ?= quay.io/brancz/kube-rbac-proxy + +# kube-rbac-proxy image tag +KRP_IMAGE_TAG ?= v0.18.0 + .PHONY: all all: docker-build @@ -179,6 +185,8 @@ endif bundle: kustomize operator-sdk ## Generate bundle manifests and metadata, then validate generated files. $(OPERATOR_SDK) generate kustomize manifests --interactive=false -q cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG) + cd config/manifests/bases && $(KUSTOMIZE) edit set annotation containerImage:$(IMG) + cd config/default && $(KUSTOMIZE) edit set image kube-rbac-proxy=$(KRP_IMAGE_BASE):$(KRP_IMAGE_TAG) $(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle $(BUNDLE_GEN_FLAGS) @printf "%s\n" '' 'LABEL com.redhat.openshift.versions="v4.12"' 'LABEL com.redhat.delivery.operator.bundle=true' 'LABEL com.redhat.delivery.backport=true' >> bundle.Dockerfile @printf "%s\n" '' ' # OpenShift annotations.' ' com.redhat.openshift.versions: v4.12' >> bundle/metadata/annotations.yaml diff --git a/config/default/kustomization.yaml b/config/default/kustomization.yaml index 6c923544..37ba23c2 100644 --- a/config/default/kustomization.yaml +++ b/config/default/kustomization.yaml @@ -28,3 +28,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization patches: - path: manager_auth_proxy_patch.yaml +images: +- name: kube-rbac-proxy + newName: quay.io/brancz/kube-rbac-proxy + newTag: v0.18.0 diff --git a/config/default/manager_auth_proxy_patch.yaml b/config/default/manager_auth_proxy_patch.yaml index d3ef6a37..c656eaeb 100644 --- a/config/default/manager_auth_proxy_patch.yaml +++ b/config/default/manager_auth_proxy_patch.yaml @@ -31,7 +31,7 @@ spec: capabilities: drop: - "ALL" - image: quay.io/brancz/kube-rbac-proxy:v0.18.0 + image: kube-rbac-proxy:latest args: - "--secure-listen-address=0.0.0.0:8443" - "--upstream=http://127.0.0.1:8080/" diff --git a/config/manifests/bases/kustomization.yaml b/config/manifests/bases/kustomization.yaml new file mode 100644 index 00000000..140d51c1 --- /dev/null +++ b/config/manifests/bases/kustomization.yaml @@ -0,0 +1,6 @@ +resources: +- nginx-ingress-operator.clusterserviceversion.yaml +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +commonAnnotations: + containerImage: quay.io/nginx/nginx-ingress-operator:2.3.1 diff --git a/config/manifests/kustomization.yaml b/config/manifests/kustomization.yaml index 098845dd..96753aea 100644 --- a/config/manifests/kustomization.yaml +++ b/config/manifests/kustomization.yaml @@ -1,7 +1,7 @@ # These resources constitute the fully configured set of manifests # used to generate the 'manifests/' directory in a bundle. resources: -- bases/nginx-ingress-operator.clusterserviceversion.yaml +- bases - ../default - ../samples - ../scorecard