Skip to content

Commit 3a4a4b5

Browse files
committed
fix: remove tag with yq
1 parent f157699 commit 3a4a4b5

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

Makefile

+9
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,13 @@ KUSTOMIZE ?= $(LOCALBIN)/kustomize
182182
CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen
183183
ENVTEST ?= $(LOCALBIN)/setup-envtest
184184
HELMIFY ?= $(LOCALBIN)/helmify
185+
YQ ?= $(LOCALBIN)/yq
185186

186187
## Tool Versions
187188
KUSTOMIZE_VERSION ?= v5.1.1
188189
CONTROLLER_TOOLS_VERSION ?= v0.13.0
189190
HELMIFY_VERSION ?= v0.4.10
191+
YQ_VERSION ?= v4.40.3
190192

191193
KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
192194
.PHONY: kustomize
@@ -276,9 +278,16 @@ $(HELMIFY): $(LOCALBIN)
276278
test -s $(LOCALBIN)/helmify && $(LOCALBIN)/helmify --version | grep -q $(HELMIFY_VERSION) || \
277279
GOBIN=$(LOCALBIN) go install -ldflags "-X main.version=$(HELMIFY_VERSION)" github.com/arttor/helmify/cmd/helmify@$(HELMIFY_VERSION)
278280

281+
.PHONY: yq
282+
yq: $(YQ) ## Download yq locally if necessary. If wrong version is installed, it will be overwritten.
283+
$(YQ): $(LOCALBIN)
284+
test -s $(LOCALBIN)/yq && $(LOCALBIN)/yq --version | grep -q $(YQ_VERSION) || \
285+
GOBIN=$(LOCALBIN) go install -ldflags "-X cmd.Version=$(YQ_VERSION)" github.com/mikefarah/yq/v4@$(YQ_VERSION)
286+
279287
.PHONY: helm
280288
helm: manifests kustomize license helmify
281289
$(KUSTOMIZE) build config/helm | $(HELMIFY) -crd-dir -generate-defaults -image-pull-secrets charts/atlas-operator
290+
$(YQ) -i '.controllerManager.manager.image.tag = ""' charts/atlas-operator/values.yaml
282291

283292
.PHONY: cli-gen
284293
cli-gen: generate manifests helm license

charts/atlas-operator/values.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
controllerManager:
22
manager:
33
args:
4-
- --leader-elect
4+
- --leader-elect
55
containerSecurityContext:
66
allowPrivilegeEscalation: false
77
capabilities:
88
drop:
9-
- ALL
9+
- ALL
1010
runAsUser: 1000
1111
env:
1212
prewarmDevdb: "true"
1313
image:
1414
repository: arigaio/atlas-operator
15-
tag: latest
15+
tag: ""
1616
resources:
1717
limits:
1818
cpu: 500m

0 commit comments

Comments
 (0)