Skip to content

Commit

Permalink
allow customer to set kube-rbac-proxy image
Browse files Browse the repository at this point in the history
  • Loading branch information
pdabelf5 committed Aug 8, 2024
1 parent 8405cba commit c68699b
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 2 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
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 c68699b

Please sign in to comment.