Skip to content

Commit

Permalink
label Deployment, ReplicaSet, Pod, and Service with operator name Ram…
Browse files Browse the repository at this point in the history
…enDR#277

	- increase kustomize version from 3.8.7 to 3.8.8 for inline transformer support
		- https://github.com/kubernetes-sigs/kustomize/releases/tag/kustomize%2Fv3.8.8
		- https://github.com/kubernetes-sigs/kustomize/releases/tag/api%2Fv0.6.6
		- kubernetes-sigs/kustomize#3225
		- user must remove existing bin/kustomize if its version is less than 3.8.8

Signed-off-by: hatfieldbrian <bhatfiel@redhat.com>
  • Loading branch information
hatfieldbrian committed Sep 23, 2021
1 parent cea2012 commit 8224f2d
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ controller-gen: ## Download controller-gen locally if necessary.

KUSTOMIZE = $(shell pwd)/bin/kustomize
kustomize: ## Download kustomize locally if necessary.
$(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v3@v3.8.7)
$(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v3@v3.8.8)

# go-get-tool will 'go get' any package $2 and install it to $1.
PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
Expand Down
20 changes: 20 additions & 0 deletions config/dr-cluster/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,26 @@ namePrefix: ramen-dr-cluster-
#commonLabels:
# someName: someValue

transformers:
- |-
apiVersion: builtin
kind: LabelTransformer
metadata:
name: temporary
labels:
app: ramen-dr-cluster
fieldSpecs:
- kind: Deployment
path: metadata/labels
- kind: Deployment
path: spec/selector/matchLabels
- kind: Deployment
path: spec/template/metadata/labels
- kind: Service
path: metadata/labels
- kind: Service
path: spec/selector
bases:
- ../crd
- ../rbac
Expand Down
20 changes: 20 additions & 0 deletions config/hub/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,26 @@ namePrefix: ramen-hub-
#commonLabels:
# someName: someValue

transformers:
- |-
apiVersion: builtin
kind: LabelTransformer
metadata:
name: temporary
labels:
app: ramen-hub
fieldSpecs:
- kind: Deployment
path: metadata/labels
- kind: Deployment
path: spec/selector/matchLabels
- kind: Deployment
path: spec/template/metadata/labels
- kind: Service
path: metadata/labels
- kind: Service
path: spec/selector
bases:
- ../crd
- ../rbac
Expand Down

0 comments on commit 8224f2d

Please sign in to comment.