From ced108ac23418b256c505ef1463cf8497c07e1f5 Mon Sep 17 00:00:00 2001 From: David Ansari Date: Tue, 1 Sep 2020 09:00:40 +0200 Subject: [PATCH] Remove operator Helm chart (#296) We implement one step installation of the operator in #228. In addition, 'kubectl rabbitmq install-cluster-operator' can be used to install the operator. We don't want to support another installation method via helm because it requires maintenance and suffers from CRD upgrade issues. The rabbitmq chart is still kept, in particular for KSM integration. --- Makefile | 6 - charts/Makefile | 41 - charts/README.md | 9 +- charts/operator/.gitignore | 1 - charts/operator/Chart.yaml | 21 - charts/operator/templates/_helpers.tpl | 5 - charts/operator/templates/crd.yaml | 856 ------------------ charts/operator/templates/deployment.yaml | 79 -- charts/operator/templates/namespace.yaml | 16 - charts/operator/templates/pre-delete.yaml | 86 -- charts/operator/templates/rbac.yaml | 298 ------ charts/operator/values.yaml | 21 - .../overlays/helm/image_as_helm_template.yml | 21 - .../overlays/helm/image_pull_secret.yml | 15 - .../default/overlays/helm/kustomization.yaml | 15 - 15 files changed, 2 insertions(+), 1488 deletions(-) delete mode 100644 charts/Makefile delete mode 100644 charts/operator/.gitignore delete mode 100644 charts/operator/Chart.yaml delete mode 100644 charts/operator/templates/_helpers.tpl delete mode 100644 charts/operator/templates/crd.yaml delete mode 100644 charts/operator/templates/deployment.yaml delete mode 100644 charts/operator/templates/namespace.yaml delete mode 100644 charts/operator/templates/pre-delete.yaml delete mode 100644 charts/operator/templates/rbac.yaml delete mode 100644 charts/operator/values.yaml delete mode 100644 config/default/overlays/helm/image_as_helm_template.yml delete mode 100644 config/default/overlays/helm/image_pull_secret.yml delete mode 100644 config/default/overlays/helm/kustomization.yaml diff --git a/Makefile b/Makefile index fa2441bd5..51d9ec646 100644 --- a/Makefile +++ b/Makefile @@ -97,12 +97,6 @@ generate-installation-manifests: kustomize build config/rbac/ > installation/rbac.yaml kustomize build config/installation > installation/operator.yaml -generate-helm-manifests: - kustomize build config/namespace/base/ > charts/operator/templates/namespace.yaml - kustomize build config/crd/ > charts/operator/templates/crd.yaml - kustomize build config/rbac/ > charts/operator/templates/rbac.yaml - kustomize build config/default/overlays/helm/ > charts/operator/templates/deployment.yaml - # Build the docker image docker-build: check-env-docker-repo git-commit-sha docker build --build-arg=GIT_COMMIT=$(GIT_COMMIT) -t $(DOCKER_REGISTRY_SERVER)/$(OPERATOR_IMAGE):latest . diff --git a/charts/Makefile b/charts/Makefile deleted file mode 100644 index 0e6b53929..000000000 --- a/charts/Makefile +++ /dev/null @@ -1,41 +0,0 @@ -# runs the target list by default -.DEFAULT_GOAL = list -.PHONY: list - -# Insert a comment starting with '##' after a target, and it will be printed by 'make' and 'make list' -list: - @echo "The most used targets: \n" - @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' - -# helm setup/configure -DEPLOYMENT_NAME=rabbitmq-operator - -setup: ## register the registry with helm - @echo "Registering chart repo" - @helm repo add "$$CHARTREPO_NAME" \ - "$$HELM_REPO" \ - --username="$$HELM_REPO_USERNAME" \ - --password="$$HELM_REPO_PASSWORD" - -CHART_NAME=${CHARTREPO_NAME}/rabbitmq-operator -destroy: ## helm uninstall operator chart - helm -n default uninstall "${DEPLOYMENT_NAME}" - -deploy: ## helm install latest version of operator chart hosted in Dev PivNet - helm -n default install "${DEPLOYMENT_NAME}" "${CHART_NAME}" \ - --set global.imageUsername="$$DOCKER_REGISTRY_USERNAME" \ - --set global.imagePassword="$$DOCKER_REGISTRY_PASSWORD" \ - --set global.imageRegistry="$$DOCKER_REGISTRY_SERVER" \ - --set images.operator.name="$$DOCKER_REGISTRY_SERVER"/"$$OPERATOR_IMAGE" \ - --set images.operator.tag="latest" - -deploy-local: - @echo "\e[1;31mThis target is expecting a file operator/values-local.yaml. Have you created this file?\e[0m" - touch operator/values-local.yaml - helm -n default install "${DEPLOYMENT_NAME}" operator/ -f operator/values-local.yaml - -template: ## helm template the operator chart - @helm template "${CHART_NAME}" - -values: ## show helm operator chart values - @helm show values "${CHART_NAME}" diff --git a/charts/README.md b/charts/README.md index 4fd1010d6..b045e1387 100644 --- a/charts/README.md +++ b/charts/README.md @@ -1,10 +1,5 @@ # RabbitMQ Cluster Operator Helm charts -This folder contains Helm charts to deploy our components: +This folder contains the `rabbitmq` Helm chart to deploy a `RabbitmqCluster` resource. -* `operator` chart deploys RabbitMQ Cluster Operator and the Custom Resource Definition (CRD) -* `rabbitmq` chart deploys a `RabbitmqCluster` resource - -`rabbitmq` chart can also be used in combination with [Container Services Manager (KSM)](https://docs.pivotal.io/ksm/) for OSBAPI integration. - -Please refer to the [rabbitmq.com/install-cluster-operator.html](https://www.rabbitmq.com/install-cluster-operator.html) to install RabbitMQ Cluster Operator using these charts. +The `rabbitmq` Helm chart can also be used in combination with [Container Services Manager for VMware Tanzu (KSM)](https://docs.pivotal.io/ksm/) for [Open Service Broker API](https://www.openservicebrokerapi.org/) integration. diff --git a/charts/operator/.gitignore b/charts/operator/.gitignore deleted file mode 100644 index bbe76696c..000000000 --- a/charts/operator/.gitignore +++ /dev/null @@ -1 +0,0 @@ -values-local.yaml diff --git a/charts/operator/Chart.yaml b/charts/operator/Chart.yaml deleted file mode 100644 index f6d70c665..000000000 --- a/charts/operator/Chart.yaml +++ /dev/null @@ -1,21 +0,0 @@ -# RabbitMQ Cluster Operator -# -# Copyright 2020 VMware, Inc. All Rights Reserved. -# -# 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. -# - -name: rabbitmq-cluster-operator -description: RabbitMQ Cluster Operator -version: 0.8.0 -apiVersion: v2 -keywords: -- rabbitmq -- operator -- message queue -- AMQP -home: https://www.rabbitmq.com -icon: https://www.rabbitmq.com/img/rabbitmq_logo_strap.png -engine: gotpl diff --git a/charts/operator/templates/_helpers.tpl b/charts/operator/templates/_helpers.tpl deleted file mode 100644 index bd8c2b6a1..000000000 --- a/charts/operator/templates/_helpers.tpl +++ /dev/null @@ -1,5 +0,0 @@ -{{/* vim: set filetype=mustache: */}} - -{{- define "imagePullSecret" }} -{{- printf "{\"auths\": {\"%s\": {\"auth\": \"%s\"}}}" .Values.global.imageRegistry (printf "%s:%s" .Values.global.imageUsername .Values.global.imagePassword | b64enc) | b64enc }} -{{- end }} diff --git a/charts/operator/templates/crd.yaml b/charts/operator/templates/crd.yaml deleted file mode 100644 index 25a7cc4e1..000000000 --- a/charts/operator/templates/crd.yaml +++ /dev/null @@ -1,856 +0,0 @@ -# RabbitMQ Cluster Operator -# -# Copyright 2020 VMware, Inc. All Rights Reserved. -# -# 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: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.2.5 - creationTimestamp: null - labels: - app.kubernetes.io/component: rabbitmq-cluster-operator - app.kubernetes.io/name: rabbitmq-cluster-operator - app.kubernetes.io/part-of: rabbitmq - name: rabbitmqclusters.rabbitmq.com -spec: - additionalPrinterColumns: - - JSONPath: .metadata.creationTimestamp - name: Age - type: date - - JSONPath: .status.clusterStatus - name: Status - type: string - group: rabbitmq.com - names: - kind: RabbitmqCluster - listKind: RabbitmqClusterList - plural: rabbitmqclusters - singular: rabbitmqcluster - preserveUnknownFields: false - scope: Namespaced - subresources: - status: {} - validation: - openAPIV3Schema: - description: RabbitmqCluster is the Schema for the rabbitmqclusters API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: Spec is the desired state of the RabbitmqCluster Custom Resource. - properties: - affinity: - description: Affinity is a group of affinity scheduling rules. - properties: - nodeAffinity: - description: Describes node affinity scheduling rules for the pod. - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to nodes - that satisfy the affinity expressions specified by this field, - but it may choose a node that violates one or more of the - expressions. The node that is most preferred is the one with - the greatest sum of weights, i.e. for each node that meets - all of the scheduling requirements (resource request, requiredDuringScheduling - affinity expressions, etc.), compute a sum by iterating through - the elements of this field and adding "weight" to the sum - if the node matches the corresponding matchExpressions; the - node(s) with the highest sum are the most preferred. - items: - description: An empty preferred scheduling term matches all - objects with implicit weight 0 (i.e. it's a no-op). A null - preferred scheduling term matches no objects (i.e. is also - a no-op). - properties: - preference: - description: A node selector term, associated with the - corresponding weight. - properties: - matchExpressions: - description: A list of node selector requirements - by node's labels. - items: - description: A node selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators are In, - NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the - operator is In or NotIn, the values array - must be non-empty. If the operator is Exists - or DoesNotExist, the values array must be - empty. If the operator is Gt or Lt, the values - array must have a single element, which will - be interpreted as an integer. This array is - replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements - by node's fields. - items: - description: A node selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators are In, - NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the - operator is In or NotIn, the values array - must be non-empty. If the operator is Exists - or DoesNotExist, the values array must be - empty. If the operator is Gt or Lt, the values - array must have a single element, which will - be interpreted as an integer. This array is - replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - weight: - description: Weight associated with matching the corresponding - nodeSelectorTerm, in the range 1-100. - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this - field are not met at scheduling time, the pod will not be - scheduled onto the node. If the affinity requirements specified - by this field cease to be met at some point during pod execution - (e.g. due to an update), the system may or may not try to - eventually evict the pod from its node. - properties: - nodeSelectorTerms: - description: Required. A list of node selector terms. The - terms are ORed. - items: - description: A null or empty node selector term matches - no objects. The requirements of them are ANDed. The - TopologySelectorTerm type implements a subset of the - NodeSelectorTerm. - properties: - matchExpressions: - description: A list of node selector requirements - by node's labels. - items: - description: A node selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators are In, - NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the - operator is In or NotIn, the values array - must be non-empty. If the operator is Exists - or DoesNotExist, the values array must be - empty. If the operator is Gt or Lt, the values - array must have a single element, which will - be interpreted as an integer. This array is - replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchFields: - description: A list of node selector requirements - by node's fields. - items: - description: A node selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: The label key that the selector - applies to. - type: string - operator: - description: Represents a key's relationship - to a set of values. Valid operators are In, - NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: An array of string values. If the - operator is In or NotIn, the values array - must be non-empty. If the operator is Exists - or DoesNotExist, the values array must be - empty. If the operator is Gt or Lt, the values - array must have a single element, which will - be interpreted as an integer. This array is - replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - type: object - type: array - required: - - nodeSelectorTerms - type: object - type: object - podAffinity: - description: Describes pod affinity scheduling rules (e.g. co-locate - this pod in the same node, zone, etc. as some other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to nodes - that satisfy the affinity expressions specified by this field, - but it may choose a node that violates one or more of the - expressions. The node that is most preferred is the one with - the greatest sum of weights, i.e. for each node that meets - all of the scheduling requirements (resource request, requiredDuringScheduling - affinity expressions, etc.), compute a sum by iterating through - the elements of this field and adding "weight" to the sum - if the node has pods which matches the corresponding podAffinityTerm; - the node(s) with the highest sum are the most preferred. - items: - description: The weights of all of the matched WeightedPodAffinityTerm - fields are added per-node to find the most preferred node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated - with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement is - a selector that contains values, a key, and - an operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If - the operator is Exists or DoesNotExist, - the values array must be empty. This array - is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, - whose key field is "key", the operator is "In", - and the values array contains only "value". - The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies which namespaces - the labelSelector applies to (matches against); - null or empty list means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) - or not co-located (anti-affinity) with the pods - matching the labelSelector in the specified namespaces, - where co-located is defined as running on a node - whose value of the label with key topologyKey matches - that of any node on which any of the selected pods - is running. Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching the corresponding - podAffinityTerm, in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the affinity requirements specified by this - field are not met at scheduling time, the pod will not be - scheduled onto the node. If the affinity requirements specified - by this field cease to be met at some point during pod execution - (e.g. due to a pod label update), the system may or may not - try to eventually evict the pod from its node. When there - are multiple elements, the lists of nodes corresponding to - each podAffinityTerm are intersected, i.e. all terms must - be satisfied. - items: - description: Defines a set of pods (namely those matching - the labelSelector relative to the given namespace(s)) that - this pod should be co-located (affinity) or not co-located - (anti-affinity) with, where co-located is defined as running - on a node whose value of the label with key - matches that of any node on which a pod of the set of pods - is running - properties: - labelSelector: - description: A label query over a set of resources, in - this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, - NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values - array must be non-empty. If the operator is - Exists or DoesNotExist, the values array must - be empty. This array is replaced during a - strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field - is "key", the operator is "In", and the values array - contains only "value". The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies which namespaces the - labelSelector applies to (matches against); null or - empty list means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) - or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where - co-located is defined as running on a node whose value - of the label with key topologyKey matches that of any - node on which any of the selected pods is running. Empty - topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - type: array - type: object - podAntiAffinity: - description: Describes pod anti-affinity scheduling rules (e.g. - avoid putting this pod in the same node, zone, etc. as some other - pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: The scheduler will prefer to schedule pods to nodes - that satisfy the anti-affinity expressions specified by this - field, but it may choose a node that violates one or more - of the expressions. The node that is most preferred is the - one with the greatest sum of weights, i.e. for each node that - meets all of the scheduling requirements (resource request, - requiredDuringScheduling anti-affinity expressions, etc.), - compute a sum by iterating through the elements of this field - and adding "weight" to the sum if the node has pods which - matches the corresponding podAffinityTerm; the node(s) with - the highest sum are the most preferred. - items: - description: The weights of all of the matched WeightedPodAffinityTerm - fields are added per-node to find the most preferred node(s) - properties: - podAffinityTerm: - description: Required. A pod affinity term, associated - with the corresponding weight. - properties: - labelSelector: - description: A label query over a set of resources, - in this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement is - a selector that contains values, a key, and - an operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If - the operator is Exists or DoesNotExist, - the values array must be empty. This array - is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, - whose key field is "key", the operator is "In", - and the values array contains only "value". - The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies which namespaces - the labelSelector applies to (matches against); - null or empty list means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) - or not co-located (anti-affinity) with the pods - matching the labelSelector in the specified namespaces, - where co-located is defined as running on a node - whose value of the label with key topologyKey matches - that of any node on which any of the selected pods - is running. Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: weight associated with matching the corresponding - podAffinityTerm, in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - requiredDuringSchedulingIgnoredDuringExecution: - description: If the anti-affinity requirements specified by - this field are not met at scheduling time, the pod will not - be scheduled onto the node. If the anti-affinity requirements - specified by this field cease to be met at some point during - pod execution (e.g. due to a pod label update), the system - may or may not try to eventually evict the pod from its node. - When there are multiple elements, the lists of nodes corresponding - to each podAffinityTerm are intersected, i.e. all terms must - be satisfied. - items: - description: Defines a set of pods (namely those matching - the labelSelector relative to the given namespace(s)) that - this pod should be co-located (affinity) or not co-located - (anti-affinity) with, where co-located is defined as running - on a node whose value of the label with key - matches that of any node on which a pod of the set of pods - is running - properties: - labelSelector: - description: A label query over a set of resources, in - this case pods. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, - NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values - array must be non-empty. If the operator is - Exists or DoesNotExist, the values array must - be empty. This array is replaced during a - strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field - is "key", the operator is "In", and the values array - contains only "value". The requirements are ANDed. - type: object - type: object - namespaces: - description: namespaces specifies which namespaces the - labelSelector applies to (matches against); null or - empty list means "this pod's namespace" - items: - type: string - type: array - topologyKey: - description: This pod should be co-located (affinity) - or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where - co-located is defined as running on a node whose value - of the label with key topologyKey matches that of any - node on which any of the selected pods is running. Empty - topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - type: array - type: object - type: object - image: - description: Image is the name of the RabbitMQ docker image to use for - RabbitMQ nodes in the RabbitmqCluster. - type: string - imagePullSecret: - description: Name of the Secret resource containing access credentials - to the registry for the RabbitMQ image. Required if the docker registry - is private. - type: string - persistence: - description: The settings for the persistent storage desired for each - Pod in the RabbitmqCluster. - properties: - storage: - anyOf: - - type: integer - - type: string - description: The requested size of the persistent volume attached - to each Pod in the RabbitmqCluster. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - storageClassName: - description: StorageClassName is the name of the StorageClass to - claim a PersistentVolume from. - type: string - type: object - rabbitmq: - description: Rabbitmq related configurations - properties: - additionalConfig: - description: Modify to add to the rabbitmq.conf file in addition - to default configurations set by the operator. Modify this property - on an existing RabbitmqCluster will trigger a StatefulSet rolling - restart and will cause rabbitmq downtime. - maxLength: 2000 - type: string - additionalPlugins: - description: 'List of plugins to enable in addition to essential - plugins: rabbitmq_management, rabbitmq_prometheus, and rabbitmq_peer_discovery_k8s.' - items: - description: kubebuilder validating tags 'Pattern' and 'MaxLength' - must be specified on string type. Alias type 'string' as 'Plugin' - to specify schema validation on items of the list 'AdditionalPlugins' - maxLength: 100 - pattern: ^\w+$ - type: string - maxItems: 100 - type: array - type: object - replicas: - description: Replicas is the number of nodes in the RabbitMQ cluster. - Each node is deployed as a Replica in a StatefulSet. Only 1, 3, 5 - replicas clusters are tested. - format: int32 - minimum: 0 - type: integer - resources: - description: ResourceRequirements describes the compute resource requirements. - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute resources - allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute resources - required. If Requests is omitted for a container, it defaults - to Limits if that is explicitly specified, otherwise to an implementation-defined - value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - type: object - service: - description: Settable attributes for the Client Service resource. - properties: - annotations: - additionalProperties: - type: string - description: Annotations to add to the Client Service. - type: object - type: - description: Service Type string describes ingress methods for a - service - enum: - - ClusterIP - - LoadBalancer - - NodePort - type: string - type: object - tls: - properties: - caCertName: - type: string - caSecretName: - type: string - secretName: - type: string - type: object - tolerations: - description: Tolerations is the list of Toleration resources attached - to each Pod in the RabbitmqCluster. - items: - description: The pod this Toleration is attached to tolerates any - taint that matches the triple using the matching - operator . - properties: - effect: - description: Effect indicates the taint effect to match. Empty - means match all taint effects. When specified, allowed values - are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: Key is the taint key that the toleration applies - to. Empty means match all taint keys. If the key is empty, operator - must be Exists; this combination means to match all values and - all keys. - type: string - operator: - description: Operator represents a key's relationship to the value. - Valid operators are Exists and Equal. Defaults to Equal. Exists - is equivalent to wildcard for value, so that a pod can tolerate - all taints of a particular category. - type: string - tolerationSeconds: - description: TolerationSeconds represents the period of time the - toleration (which must be of effect NoExecute, otherwise this - field is ignored) tolerates the taint. By default, it is not - set, which means tolerate the taint forever (do not evict). - Zero and negative values will be treated as 0 (evict immediately) - by the system. - format: int64 - type: integer - value: - description: Value is the taint value the toleration matches to. - If the operator is Exists, the value should be empty, otherwise - just a regular string. - type: string - type: object - type: array - required: - - replicas - type: object - status: - description: Status presents the observed state of RabbitmqCluster - properties: - admin: - description: Identifying information on internal resources - properties: - secretReference: - properties: - keys: - additionalProperties: - type: string - type: object - name: - type: string - namespace: - type: string - required: - - keys - - name - - namespace - type: object - serviceReference: - properties: - name: - type: string - namespace: - type: string - required: - - name - - namespace - type: object - type: object - clusterStatus: - type: string - conditions: - description: Set of Conditions describing the current state of the RabbitmqCluster - items: - properties: - lastTransitionTime: - description: The last time this Condition type changed. - format: date-time - type: string - message: - description: Full text reason for current status of the condition. - type: string - reason: - description: One word, camel-case reason for current status of - the condition. - type: string - status: - description: True, False, or Unknown - type: string - type: - description: Type indicates the scope of RabbitmqCluster status - addressed by the condition. - type: string - required: - - status - - type - type: object - type: array - required: - - conditions - type: object - type: object - version: v1beta1 - versions: - - name: v1beta1 - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/charts/operator/templates/deployment.yaml b/charts/operator/templates/deployment.yaml deleted file mode 100644 index fef7931c0..000000000 --- a/charts/operator/templates/deployment.yaml +++ /dev/null @@ -1,79 +0,0 @@ -# /* -# RabbitMQ Cluster Operator -# -# Copyright 2020 VMware, Inc. All Rights Reserved. -# -# 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: v1 -data: - .dockerconfigjson: '{{ template "imagePullSecret" . }}' -kind: Secret -metadata: - name: myregistry - namespace: rabbitmq-system -type: kubernetes.io/dockerconfigjson ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app.kubernetes.io/component: rabbitmq-cluster-operator - app.kubernetes.io/name: rabbitmq-cluster-operator - app.kubernetes.io/part-of: rabbitmq - name: rabbitmq-cluster-operator - namespace: rabbitmq-system -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/name: rabbitmq-cluster-operator - template: - metadata: - labels: - app.kubernetes.io/component: rabbitmq-cluster-operator - app.kubernetes.io/name: rabbitmq-cluster-operator - app.kubernetes.io/part-of: rabbitmq - spec: - containers: - - args: - - --metrics-addr=0 - command: - - /manager - env: - - name: OPERATOR_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - {{- if .Values.leaseDuration }} - - name: LEASE_DURATION - value: {{ .Values.leaseDuration | quote }} - {{- end }} - {{- if .Values.retryPeriod }} - - name: RETRY_PERIOD - value: {{ .Values.retryPeriod | quote }} - {{- end }} - {{- if .Values.renewDeadline }} - - name: RENEW_DEADLINE - value: {{ .Values.renewDeadline | quote }} - {{- end }} - image: '{{printf "%s:%s" .Values.images.operator.name .Values.images.operator.tag}}' - name: operator - resources: - limits: - cpu: 200m - memory: 500Mi - requests: - cpu: 200m - memory: 500Mi - imagePullSecrets: - - name: myregistry - securityContext: - fsGroup: 1000 - runAsGroup: 1000 - runAsUser: 1000 - serviceAccountName: rabbitmq-cluster-operator - terminationGracePeriodSeconds: 10 diff --git a/charts/operator/templates/namespace.yaml b/charts/operator/templates/namespace.yaml deleted file mode 100644 index 1f31eeb82..000000000 --- a/charts/operator/templates/namespace.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# RabbitMQ Cluster Operator -# -# Copyright 2020 VMware, Inc. All Rights Reserved. -# -# 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: v1 -kind: Namespace -metadata: - labels: - app.kubernetes.io/component: rabbitmq-cluster-operator - app.kubernetes.io/name: rabbitmq-system - app.kubernetes.io/part-of: rabbitmq - name: rabbitmq-system diff --git a/charts/operator/templates/pre-delete.yaml b/charts/operator/templates/pre-delete.yaml deleted file mode 100644 index 400d0f40b..000000000 --- a/charts/operator/templates/pre-delete.yaml +++ /dev/null @@ -1,86 +0,0 @@ -# RabbitMQ Cluster Operator -# -# Copyright 2020 VMware, Inc. All Rights Reserved. -# -# 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: v1 -kind: ServiceAccount -metadata: - labels: - app.kubernetes.io/component: rabbitmq-cluster-operator - app.kubernetes.io/name: rabbitmq-cluster-operator-pre-delete - app.kubernetes.io/part-of: rabbitmq - name: rabbitmq-cluster-operator-pre-delete - annotations: - "helm.sh/hook": pre-delete - "helm.sh/hook-delete-policy": hook-succeeded,hook-failed ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - annotations: - "helm.sh/hook": pre-delete - "helm.sh/hook-weight": "-2" - "helm.sh/hook-delete-policy": hook-succeeded,hook-failed - creationTimestamp: null - labels: - app.kubernetes.io/component: rabbitmq-cluster-operator - app.kubernetes.io/name: rabbitmq-cluster-operator-pre-delete - app.kubernetes.io/part-of: rabbitmq - name: rabbitmq-cluster-operator-pre-delete -rules: -- apiGroups: - - rabbitmq.com - resources: - - rabbitmqclusters - verbs: - - delete - - get - - list - - watch ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - labels: - app.kubernetes.io/component: rabbitmq-cluster-operator - app.kubernetes.io/name: rabbitmq-cluster-operator-pre-delete - app.kubernetes.io/part-of: rabbitmq - annotations: - "helm.sh/hook": pre-delete - "helm.sh/hook-weight": "-1" - "helm.sh/hook-delete-policy": hook-succeeded,hook-failed - name: rabbitmq-cluster-operator-pre-delete-rolebinding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: rabbitmq-cluster-operator-pre-delete -subjects: -- kind: ServiceAccount - name: rabbitmq-cluster-operator-pre-delete - namespace: {{ .Release.Namespace }} ---- -apiVersion: batch/v1 -kind: Job -metadata: - name: rabbitmq-cluster-operator-pre-delete - labels: - app.kubernetes.io/component: rabbitmq-cluster-operator - app.kubernetes.io/name: rabbitmq-cluster-operator-pre-delete - app.kubernetes.io/part-of: rabbitmq - annotations: - "helm.sh/hook": pre-delete - "helm.sh/hook-delete-policy": hook-succeeded,hook-failed -spec: - backoffLimit: 1 - template: - spec: - serviceAccountName: rabbitmq-cluster-operator-pre-delete - restartPolicy: OnFailure - containers: - - name: pre-delete-job - image: "bitnami/kubectl:latest" - command: ["kubectl", "delete", "rabbitmqclusters", "--all", "--all-namespaces", "--wait"] diff --git a/charts/operator/templates/rbac.yaml b/charts/operator/templates/rbac.yaml deleted file mode 100644 index 5a848b31c..000000000 --- a/charts/operator/templates/rbac.yaml +++ /dev/null @@ -1,298 +0,0 @@ -# RabbitMQ Cluster Operator -# -# Copyright 2020 VMware, Inc. All Rights Reserved. -# -# 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: v1 -kind: ServiceAccount -metadata: - name: rabbitmq-cluster-operator - namespace: rabbitmq-system ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - labels: - app.kubernetes.io/component: rabbitmq-cluster-operator - app.kubernetes.io/name: rabbitmq-cluster-operator - app.kubernetes.io/part-of: rabbitmq - name: rabbitmq-cluster-leader-election-role - namespace: rabbitmq-system -rules: -- apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete -- apiGroups: - - "" - resources: - - configmaps/status - verbs: - - get - - update - - patch -- apiGroups: - - "" - resources: - - events - verbs: - - create ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - creationTimestamp: null - labels: - app.kubernetes.io/component: rabbitmq-cluster-operator - app.kubernetes.io/name: rabbitmq-cluster-operator - app.kubernetes.io/part-of: rabbitmq - name: rabbitmq-cluster-operator-role -rules: -- apiGroups: - - "" - resources: - - configmaps - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - "" - resources: - - configmaps/status - verbs: - - get - - patch - - update -- apiGroups: - - "" - resources: - - endpoints - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - "" - resources: - - endpoints/status - verbs: - - get - - patch - - update -- apiGroups: - - "" - resources: - - events - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - "" - resources: - - persistentvolumeclaims - verbs: - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - "" - resources: - - persistentvolumeclaims/status - verbs: - - get - - patch - - update -- apiGroups: - - "" - resources: - - pods - verbs: - - get - - list - - update - - watch -- apiGroups: - - "" - resources: - - pods/exec - verbs: - - create -- apiGroups: - - "" - resources: - - secrets - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - "" - resources: - - secrets/status - verbs: - - get - - patch - - update -- apiGroups: - - "" - resources: - - serviceaccounts - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - "" - resources: - - services - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - "" - resources: - - services/status - verbs: - - get - - patch - - update -- apiGroups: - - apps - resources: - - statefulsets - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - apps - resources: - - statefulsets/status - verbs: - - get - - patch - - update -- apiGroups: - - rabbitmq.com - resources: - - rabbitmqclusters - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - rabbitmq.com - resources: - - rabbitmqclusters/status - verbs: - - get - - patch - - update -- apiGroups: - - rbac.authorization.k8s.io - resources: - - rolebindings - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - rbac.authorization.k8s.io - resources: - - roles - verbs: - - create - - delete - - get - - list - - patch - - update - - watch ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - labels: - app.kubernetes.io/component: rabbitmq-cluster-operator - app.kubernetes.io/name: rabbitmq-cluster-operator - app.kubernetes.io/part-of: rabbitmq - name: rabbitmq-cluster-leader-election-rolebinding - namespace: rabbitmq-system -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: rabbitmq-cluster-leader-election-role -subjects: -- kind: ServiceAccount - name: rabbitmq-cluster-operator - namespace: rabbitmq-system ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - labels: - app.kubernetes.io/component: rabbitmq-cluster-operator - app.kubernetes.io/name: rabbitmq-cluster-operator - app.kubernetes.io/part-of: rabbitmq - name: rabbitmq-cluster-operator-rolebinding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: rabbitmq-cluster-operator-role -subjects: -- kind: ServiceAccount - name: rabbitmq-cluster-operator - namespace: rabbitmq-system diff --git a/charts/operator/values.yaml b/charts/operator/values.yaml deleted file mode 100644 index a937dc55e..000000000 --- a/charts/operator/values.yaml +++ /dev/null @@ -1,21 +0,0 @@ -# RabbitMQ Cluster Operator -# -# Copyright 2020 VMware, Inc. All Rights Reserved. -# -# 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. -# - -global: - # provide these values if you want to pull the image from a local registry - imageRegistry: - imageUsername: - imagePassword: -images: - operator: - name: rabbitmqoperator/rabbitmq-cluster-kubernetes-operator - tag: "latest" -leaseDuration: -retryPeriod: -renewDeadline: diff --git a/config/default/overlays/helm/image_as_helm_template.yml b/config/default/overlays/helm/image_as_helm_template.yml deleted file mode 100644 index 45bacd0cc..000000000 --- a/config/default/overlays/helm/image_as_helm_template.yml +++ /dev/null @@ -1,21 +0,0 @@ -# RabbitMQ Cluster Operator -# -# Copyright 2020 VMware, Inc. All Rights Reserved. -# -# 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: - imagePullSecrets: - - name: myregistry - containers: - - name: operator - # Make sure the output of 'kustomize build' returns the 'image' string in a single line - image: '{{printf "%s:%s" .Values.images.operator.name .Values.images.operator.tag}}' diff --git a/config/default/overlays/helm/image_pull_secret.yml b/config/default/overlays/helm/image_pull_secret.yml deleted file mode 100644 index c87c2294a..000000000 --- a/config/default/overlays/helm/image_pull_secret.yml +++ /dev/null @@ -1,15 +0,0 @@ -# RabbitMQ Cluster Operator -# -# Copyright 2020 VMware, Inc. All Rights Reserved. -# -# 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: v1 -kind: Secret -metadata: - name: myregistry - namespace: rabbitmq-system -type: kubernetes.io/dockerconfigjson -data: - .dockerconfigjson: '{{ template "imagePullSecret" . }}' diff --git a/config/default/overlays/helm/kustomization.yaml b/config/default/overlays/helm/kustomization.yaml deleted file mode 100644 index 87aec0c41..000000000 --- a/config/default/overlays/helm/kustomization.yaml +++ /dev/null @@ -1,15 +0,0 @@ -# RabbitMQ Cluster Operator -# -# Copyright 2020 VMware, Inc. All Rights Reserved. -# -# 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: -- image_pull_secret.yml -- ../../base - -patches: -- image_as_helm_template.yml