Skip to content

Instantly share code, notes, and snippets.

@ebuildy
Created September 8, 2021 06:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ebuildy/159aea149385f51b3bbf40beed4dd551 to your computer and use it in GitHub Desktop.
Save ebuildy/159aea149385f51b3bbf40beed4dd551 to your computer and use it in GitHub Desktop.
Customize and deploy rabbitMQ messaging topology kubernetes operator
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: rabbitmq-system
resources:
- ./tmp/all.yaml
patchesStrategicMerge:
- |-
apiVersion: apps/v1
kind: Deployment
metadata:
name: messaging-topology-operator
namespace: rabbitmq-system
spec:
template:
metadata:
labels:
app.kubernetes.io/operator: messaging-topology
X.com/fw.kubernetes: allow
X.com/fw.kube-dns: allow
- |-
apiVersion: v1
kind: Namespace
metadata:
labels:
prometheus: infra
name: rabbitmq-system
name: rabbitmq-system
#!/bin/sh -ex
TMP_DIR=./tmp
# where the YAML files to deploy are
BUILD_DIR=./build
mkdir -p ${TMP_DIR} ${BUILD_DIR}
curl -sL https://github.com/rabbitmq/messaging-topology-operator/releases/latest/download/messaging-topology-operator-with-certmanager.yaml > ${TMP_DIR}/all.yaml
kustomize build > ${TMP_DIR}/all_k.yaml
rm -rf ${BUILD_DIR}/*
kubernetes-split-yaml --outdir ${BUILD_DIR} ${TMP_DIR}/all_k.yaml
# Remove NS definition if needed
rm ${BUILD_DIR}/rabbitmq-system-namespace.yaml
# copy extra resources
cp -r src/. ${BUILD_DIR}/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment