Skip to content

Commit f0e5d69

Browse files
authored
Merge pull request #193 from rabbitmq/67-kustomize
Remove deprecated `bases` from kustomization files
2 parents ed3b9a6 + 28ce005 commit f0e5d69

File tree

8 files changed

+21
-23
lines changed

8 files changed

+21
-23
lines changed

Makefile

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,21 @@ manager: generate fmt vet
4040
go build -o bin/manager main.go
4141

4242
deploy-manager: ## Deploy manager
43-
kubectl apply -k config/crd
44-
kubectl apply -k config/default/base
43+
kustomize build config/crd | kubectl apply -f -
44+
kustomize build config/default/base | kubectl apply -f -
4545

4646
deploy-manager-dev:
47-
kubectl apply -k config/crd
48-
kubectl apply -k config/default/overlays/dev
47+
kustomize build config/crd | kubectl apply -f -
48+
kustomize build config/default/overlays/dev | kubectl apply -f -
4949

5050
deploy-sample: ## Deploy RabbitmqCluster defined in config/sample/base
51-
kubectl apply -k config/samples/base
51+
kustomize build config/samples/base | kubectl apply -f -
5252

5353
destroy: ## Cleanup all controller artefacts
54-
kubectl delete -k config/crd/ --ignore-not-found=true
55-
kubectl delete -k config/default/base/ --ignore-not-found=true
56-
kubectl delete -k config/rbac/ --ignore-not-found=true
57-
kubectl delete -k config/namespace/base/ --ignore-not-found=true
54+
kustomize build config/crd/ | kubectl delete --ignore-not-found=true -f -
55+
kustomize build config/default/base/ | kubectl delete --ignore-not-found=true -f -
56+
kustomize build config/rbac/ | kubectl delete --ignore-not-found=true -f -
57+
kustomize build config/namespace/base/ | kubectl delete --ignore-not-found=true -f -
5858

5959
run: generate manifests fmt vet install deploy-namespace-rbac just-run ## Run operator binary locally against the configured Kubernetes cluster in ~/.kube/config
6060

@@ -71,11 +71,11 @@ install: manifests
7171
kubectl apply -f config/crd/bases
7272

7373
deploy-namespace-rbac:
74-
kubectl apply -k config/namespace/base
75-
kubectl apply -k config/rbac
74+
kustomize build config/namespace/base | kubectl apply -f -
75+
kustomize build config/rbac | kubectl apply -f -
7676

7777
deploy-master: install deploy-namespace-rbac docker-registry-secret
78-
kubectl apply -k config/default/base
78+
kustomize build config/default/base | kubectl apply -f -
7979

8080
deploy: manifests deploy-namespace-rbac docker-registry-secret deploy-manager ## Deploy operator in the configured Kubernetes cluster in ~/.kube/config
8181

@@ -84,8 +84,8 @@ deploy-dev: docker-build-dev patch-dev manifests deploy-namespace-rbac docker-re
8484
deploy-kind: git-commit-sha patch-kind manifests deploy-namespace-rbac ## Load operator image and deploy operator into current KinD cluster
8585
docker build --build-arg=GIT_COMMIT=$(GIT_COMMIT) -t $(DOCKER_REGISTRY_SERVER)/$(OPERATOR_IMAGE):$(GIT_COMMIT) .
8686
kind load docker-image $(DOCKER_REGISTRY_SERVER)/$(OPERATOR_IMAGE):$(GIT_COMMIT)
87-
kubectl apply -k config/crd
88-
kubectl apply -k config/default/overlays/kind
87+
kustomize build config/crd | kubectl apply -f -
88+
kustomize build config/default/overlays/kind | kubectl apply -f -
8989

9090
generate-installation-manifests:
9191
mkdir -p installation

config/default/base/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
namespace: rabbitmq-system
1010
namePrefix: rabbitmq-cluster-
11-
bases:
11+
resources:
1212
# - ../../rbac
1313
- ../../manager
1414
# [WEBHOOK] Uncomment all the sections with [WEBHOOK] prefix to enable webhook.

config/default/overlays/dev/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file.
88
namespace: rabbitmq-system
99

10-
bases:
10+
resources:
1111
- ../../base
1212

1313
patches:

config/default/overlays/helm/kustomization.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@
77
# This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file.
88
namespace: rabbitmq-system
99

10-
bases:
11-
- ../../base
12-
1310
resources:
1411
- image_pull_secret.yml
12+
- ../../base
1513

1614
patches:
1715
- image_as_helm_template.yml

config/default/overlays/kind/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file.
88
namespace: rabbitmq-system
99

10-
bases:
10+
resources:
1111
- ../../base
1212

1313
patches:

config/installation/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file.
88
#
99

10-
bases:
10+
resources:
1111
- ../default/base
1212

1313
namespace: rabbitmq-system

config/installation/overlay/ci/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# This product is licensed to you under the Mozilla Public license, Version 2.0 (the "License"). You may not use this product except in compliance with the Mozilla Public License.
66
#
77
# This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file.
8-
bases:
8+
resources:
99
- ../../../default/base
1010

1111
namespace: rabbitmq-system

config/samples/overlays/ci/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
#
88
# This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file.
99
namespace: rabbitmq-system-ci
10-
bases:
10+
resources:
1111
- ../../base

0 commit comments

Comments
 (0)