Skip to content

Commit

Permalink
Add deploy-kind make target and kustomize overlay.
Browse files Browse the repository at this point in the history
  • Loading branch information
MirahImage committed Mar 16, 2021
1 parent dcff8de commit e13fae1
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 -

Expand Down
14 changes: 14 additions & 0 deletions config/default/overlays/kind/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -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
19 changes: 19 additions & 0 deletions config/default/overlays/kind/manager_image_patch.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit e13fae1

Please sign in to comment.