Skip to content

Commit 27b85ff

Browse files
authored
allow user to set kube-rbac-proxy image (#358)
1 parent 98467a7 commit 27b85ff

File tree

6 files changed

+24
-6
lines changed

6 files changed

+24
-6
lines changed

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ OPERATOR_SDK_VERSION ?= v1.34.2
5454
# Image URL to use all building/pushing image targets
5555
IMG ?= $(IMAGE_TAG_BASE):$(VERSION)
5656

57+
# kube-rbac-proxy image base
58+
KRP_IMAGE_BASE ?= quay.io/brancz/kube-rbac-proxy
59+
60+
# kube-rbac-proxy image tag
61+
KRP_IMAGE_TAG ?= v0.18.0
62+
5763
.PHONY: all
5864
all: docker-build
5965

@@ -179,6 +185,8 @@ endif
179185
bundle: kustomize operator-sdk ## Generate bundle manifests and metadata, then validate generated files.
180186
$(OPERATOR_SDK) generate kustomize manifests --interactive=false -q
181187
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
188+
cd config/manifests/bases && $(KUSTOMIZE) edit set annotation containerImage:$(IMG)
189+
cd config/default && $(KUSTOMIZE) edit set image kube-rbac-proxy=$(KRP_IMAGE_BASE):$(KRP_IMAGE_TAG)
182190
$(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle $(BUNDLE_GEN_FLAGS)
183191
@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
184192
@printf "%s\n" '' ' # OpenShift annotations.' ' com.redhat.openshift.versions: v4.12' >> bundle/metadata/annotations.yaml

config/default/kustomization.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
2828
kind: Kustomization
2929
patches:
3030
- path: manager_auth_proxy_patch.yaml
31+
images:
32+
- name: kube-rbac-proxy
33+
newName: quay.io/brancz/kube-rbac-proxy
34+
newTag: v0.18.0

config/default/manager_auth_proxy_patch.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ spec:
3131
capabilities:
3232
drop:
3333
- "ALL"
34-
image: quay.io/brancz/kube-rbac-proxy:v0.18.0
34+
image: kube-rbac-proxy:latest
3535
args:
3636
- "--secure-listen-address=0.0.0.0:8443"
3737
- "--upstream=http://127.0.0.1:8080/"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
resources:
2+
- nginx-ingress-operator.clusterserviceversion.yaml
3+
apiVersion: kustomize.config.k8s.io/v1beta1
4+
kind: Kustomization
5+
commonAnnotations:
6+
containerImage: quay.io/nginx/nginx-ingress-operator:2.3.1

config/manifests/bases/nginx-ingress-operator.clusterserviceversion.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ metadata:
66
capabilities: Basic Install
77
categories: Monitoring, Networking
88
certified: "true"
9-
containerImage: quay.io/nginx/nginx-ingress-operator:2.3.1
9+
containerImage: nginx-ingress-operator:latest
1010
createdAt: placeholder
1111
description: The NGINX Ingress Operator is a Kubernetes/OpenShift component which
1212
deploys and manages one or more NGINX/NGINX Plus Ingress Controllers
@@ -185,7 +185,7 @@ spec:
185185
- --metrics-bind-address=127.0.0.1:8080
186186
- --leader-elect
187187
- --leader-election-id=nginx-ingress-operator
188-
image: quay.io/nginx/nginx-ingress-operator:2.3.1
188+
image: nginx-ingress-operator:latest
189189
livenessProbe:
190190
httpGet:
191191
path: /healthz
@@ -288,7 +288,7 @@ spec:
288288
289289
name: NGINX Inc
290290
maturity: alpha
291-
minKubeVersion: 1.23.0
291+
minKubeVersion: 1.26.0
292292
provider:
293293
name: NGINX Inc
294-
version: 2.3.1
294+
version: 0.0.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# These resources constitute the fully configured set of manifests
22
# used to generate the 'manifests/' directory in a bundle.
33
resources:
4-
- bases/nginx-ingress-operator.clusterserviceversion.yaml
4+
- bases
55
- ../default
66
- ../samples
77
- ../scorecard

0 commit comments

Comments
 (0)