|
15 | 15 | ### |
16 | 16 | # Global settings |
17 | 17 |
|
18 | | -## RELEASE_TAG is the public image tag for the operator |
19 | | -RELEASE_TAG_PATH=cloud-sql-connectors/cloud-sql-operator/cloud-sql-proxy-operator:$(VERSION) |
20 | | -RELEASE_TAG=gcr.io/$(RELEASE_TAG_PATH) |
21 | | - |
22 | | -# When the environment variable IS_RELEASE_BUILD is set, the IMG will be set |
23 | | -# to the RELEASE_TAG, overriding the IMG environment variable. This is intended |
24 | | -# to be used only in a release job to publish artifacts. |
25 | | -ifdef IS_RELEASE_BUILD |
26 | | -IMG=$(RELEASE_TAG) |
| 18 | +# INSTALLER_IMG in inserted into the installer script as the operator image. |
| 19 | +# If $IMG is set, it INSTALLER_IMG defaults to $IMG. If $IMG, then INSTALLER_IMG |
| 20 | +# is assigned a placeholder. |
| 21 | +ifdef IMG |
| 22 | + INSTALLER_IMG=$(IMG) |
27 | 23 | endif |
28 | | - |
| 24 | +INSTALLER_IMG ?= cloud-sql-proxy-operator:latest |
29 | 25 |
|
30 | 26 | # IMG is used by build to determine where to push the docker image for the |
31 | 27 | # operator. You must set the IMG environment variable when you run make build |
32 | 28 | # or other dependent targets. |
33 | 29 | IMG ?= |
34 | 30 |
|
| 31 | + |
35 | 32 | # Import the local build environment file. This holds configuration specific |
36 | 33 | # to the local environment. build.sample.env describes the required configuration |
37 | 34 | # environment variables. |
@@ -233,7 +230,7 @@ installer: installer/cloud-sql-proxy-operator.yaml installer/install.sh |
233 | 230 |
|
234 | 231 | .PHONY: installer/cloud-sql-proxy-operator.yaml |
235 | 232 | installer/cloud-sql-proxy-operator.yaml: kustomize # Build the single yaml file for deploying the operator |
236 | | - cd config/manager && $(KUSTOMIZE) edit set image controller=$(RELEASE_TAG) |
| 233 | + cd config/manager && $(KUSTOMIZE) edit set image controller=$(INSTALLER_IMG) |
237 | 234 | mkdir -p installer |
238 | 235 | $(KUSTOMIZE) build config/default > $@ |
239 | 236 | cd config/manager && $(KUSTOMIZE) edit set image controller=$(SOURCE_CODE_IMAGE) |
|
0 commit comments