From e13fae1a9939321116910c99a2385e4d544db2cf Mon Sep 17 00:00:00 2001 From: Mirah Gary Date: Mon, 15 Mar 2021 15:24:58 +0100 Subject: [PATCH] Add deploy-kind make target and kustomize overlay. --- Makefile | 6 ++++++ .../default/overlays/kind/kustomization.yaml | 14 ++++++++++++++ .../overlays/kind/manager_image_patch.yaml | 19 +++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 config/default/overlays/kind/kustomization.yaml create mode 100644 config/default/overlays/kind/manager_image_patch.yaml diff --git a/Makefile b/Makefile index dcf2656a..30d792db 100644 --- a/Makefile +++ b/Makefile @@ -48,6 +48,12 @@ destroy: deploy-dev: check-env-docker-credentials docker-build-dev manifests deploy-rbac docker-registry-secret set-operator-image-repo kustomize build config/default/overlays/dev | sed 's@((operator_docker_image))@"$(DOCKER_REGISTRY_SERVER)/$(OPERATOR_IMAGE):$(GIT_COMMIT)"@' | kubectl apply -f - +# Load operator image and deploy operator into current KinD cluster +deploy-kind: manifests deploy-rbac + docker build --build-arg=GIT_COMMIT=$(GIT_COMMIT) -t $(DOCKER_REGISTRY_SERVER)/$(OPERATOR_IMAGE):$(GIT_COMMIT) . + kind load docker-image $(DOCKER_REGISTRY_SERVER)/$(OPERATOR_IMAGE):$(GIT_COMMIT) + kustomize build config/default/overlays/kind | sed 's@((operator_docker_image))@"$(DOCKER_REGISTRY_SERVER)/$(OPERATOR_IMAGE):$(GIT_COMMIT)"@' | kubectl apply -f - + deploy-rbac: kustomize build config/rbac | kubectl apply -f - diff --git a/config/default/overlays/kind/kustomization.yaml b/config/default/overlays/kind/kustomization.yaml new file mode 100644 index 00000000..8cc717bd --- /dev/null +++ b/config/default/overlays/kind/kustomization.yaml @@ -0,0 +1,14 @@ +# RabbitMQ Messaging Topology Kubernetes Operator + +# Copyright 2021 VMware, Inc. +# +# 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. +# +# 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. +namespace: rabbitmq-system + +resources: +- ../../base + +patches: +- manager_image_patch.yaml \ No newline at end of file diff --git a/config/default/overlays/kind/manager_image_patch.yaml b/config/default/overlays/kind/manager_image_patch.yaml new file mode 100644 index 00000000..e3321cac --- /dev/null +++ b/config/default/overlays/kind/manager_image_patch.yaml @@ -0,0 +1,19 @@ +# RabbitMQ Messaging Topology Kubernetes Operator + +# Copyright 2021 VMware, Inc. +# +# 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. +# +# 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. +apiVersion: apps/v1 +kind: Deployment +metadata: + name: operator + namespace: system +spec: + template: + spec: + containers: + - image: ((operator_docker_image)) + name: manager + imagePullPolicy: IfNotPresent \ No newline at end of file