Skip to content

Commit

Permalink
allow user to set kube-rbac-proxy image (#358)
Browse files Browse the repository at this point in the history
  • Loading branch information
pdabelf5 authored Aug 9, 2024
1 parent 98467a7 commit 27b85ff
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 6 deletions.
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions config/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion config/default/manager_auth_proxy_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
Expand Down
6 changes: 6 additions & 0 deletions config/manifests/bases/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
capabilities: Basic Install
categories: Monitoring, Networking
certified: "true"
containerImage: quay.io/nginx/nginx-ingress-operator:2.3.1
containerImage: nginx-ingress-operator:latest
createdAt: placeholder
description: The NGINX Ingress Operator is a Kubernetes/OpenShift component which
deploys and manages one or more NGINX/NGINX Plus Ingress Controllers
Expand Down Expand Up @@ -185,7 +185,7 @@ spec:
- --metrics-bind-address=127.0.0.1:8080
- --leader-elect
- --leader-election-id=nginx-ingress-operator
image: quay.io/nginx/nginx-ingress-operator:2.3.1
image: nginx-ingress-operator:latest
livenessProbe:
httpGet:
path: /healthz
Expand Down Expand Up @@ -288,7 +288,7 @@ spec:
- email: kubernetes@nginx.com
name: NGINX Inc
maturity: alpha
minKubeVersion: 1.23.0
minKubeVersion: 1.26.0
provider:
name: NGINX Inc
version: 2.3.1
version: 0.0.0
2 changes: 1 addition & 1 deletion config/manifests/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 27b85ff

Please sign in to comment.