Skip to content

Commit

Permalink
fix: remove tag with yq
Browse files Browse the repository at this point in the history
  • Loading branch information
giautm committed Nov 28, 2023
1 parent e3d4fca commit d4b7d83
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,13 @@ KUSTOMIZE ?= $(LOCALBIN)/kustomize
CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen
ENVTEST ?= $(LOCALBIN)/setup-envtest
HELMIFY ?= $(LOCALBIN)/helmify
YQ ?= $(LOCALBIN)/yq

## Tool Versions
KUSTOMIZE_VERSION ?= v5.1.1
CONTROLLER_TOOLS_VERSION ?= v0.13.0
HELMIFY_VERSION ?= v0.4.10
YQ_VERSION ?= v4.40.3

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

.PHONY: yq
yq: $(YQ) ## Download yq locally if necessary. If wrong version is installed, it will be overwritten.
$(YQ): $(LOCALBIN)
test -s $(LOCALBIN)/yq && $(LOCALBIN)/yq --version | grep -q $(YQ_VERSION) || \
GOBIN=$(LOCALBIN) go install -ldflags "-X cmd.Version=$(YQ_VERSION)" github.com/mikefarah/yq/v4@$(YQ_VERSION)

.PHONY: helm
helm: manifests kustomize license helmify
$(KUSTOMIZE) build config/helm | $(HELMIFY) -crd-dir -generate-defaults -image-pull-secrets charts/atlas-operator
$(YQ) -i '.controllerManager.manager.image.tag = ""' charts/atlas-operator/values.yaml

.PHONY: cli-gen
cli-gen: generate manifests helm license
6 changes: 3 additions & 3 deletions charts/atlas-operator/values.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
controllerManager:
manager:
args:
- --leader-elect
- --leader-elect
containerSecurityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
- ALL
runAsUser: 1000
env:
prewarmDevdb: "true"
image:
repository: arigaio/atlas-operator
tag: latest
tag: ""
imagePullPolicy: IfNotPresent
resources:
limits:
Expand Down

0 comments on commit d4b7d83

Please sign in to comment.