Skip to content

Commit 2c830e9

Browse files
authored
[skip ci] Merge pull request #942 from rabbitmq/ytt-patch
Helper overlay to patch the Operator image
2 parents de847e8 + 56dcbe3 commit 2c830e9

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,12 @@ deploy-kind: check-env-docker-repo git-commit-sha manifests deploy-namespace-rba
102102
kustomize build config/crd | kubectl apply -f -
103103
kustomize build config/default/overlays/kind | sed 's@((operator_docker_image))@"$(DOCKER_REGISTRY_SERVER)/$(OPERATOR_IMAGE):$(GIT_COMMIT)"@' | kubectl apply -f -
104104

105+
QUAY_IO_OPERATOR_IMAGE ?= quay.io/rabbitmqoperator/cluster-operator:latest
105106
# Builds a single-file installation manifest to deploy the Operator
106107
generate-installation-manifest:
107108
mkdir -p releases
108109
kustomize build config/installation/ > releases/rabbitmq-cluster-operator.yaml
110+
ytt -f releases/rabbitmq-cluster-operator.yaml -f config/ytt/overlay-manager-image.yaml --data-value operator_image=$(QUAY_IO_OPERATOR_IMAGE) > releases/rabbitmq-cluster-operator-quay-io.yaml
109111

110112
# Build the docker image
111113
docker-build: check-env-docker-repo git-commit-sha
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#@ load("@ytt:overlay", "overlay")
2+
#@ load("@ytt:data", "data")
3+
4+
#@overlay/match by=overlay.subset({"kind": "Deployment", "metadata":{"name": "rabbitmq-cluster-operator"}}), expects="1+"
5+
---
6+
spec:
7+
template:
8+
spec:
9+
containers:
10+
#@overlay/match by="name", expects="1+"
11+
- name: operator
12+
image: #@ data.values.operator_image
13+

0 commit comments

Comments
 (0)