Skip to content
Snippets Groups Projects
Unverified Commit bd3c64d6 authored by groundhog2k's avatar groundhog2k Committed by GitHub
Browse files

Removed node selector and improved chart configuration (#132)

parent 164385d1
No related branches found
Tags rabbitmq-0.2.1
No related merge requests found
...@@ -7,8 +7,6 @@ type: application ...@@ -7,8 +7,6 @@ type: application
maintainers: maintainers:
- name: groundhog2k - name: groundhog2k
# This is the chart version. version: 0.2.1
version: 0.2.0
# This is the version number of the application being deployed.
appVersion: 3.8.9 appVersion: 3.8.9
# RabbitMQ # RabbitMQ
![Version: 0.2.0](https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.8.9](https://img.shields.io/badge/AppVersion-3.8.9-informational?style=flat-square) ![Version: 0.2.1](https://img.shields.io/badge/Version-0.2.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.8.9](https://img.shields.io/badge/AppVersion-3.8.9-informational?style=flat-square)
A Helm chart for a RabbitMQ cluster on Kubernetes A Helm chart for a RabbitMQ cluster on Kubernetes
...@@ -15,7 +15,7 @@ $ helm install my-release groundhog2k/rabbitmq ...@@ -15,7 +15,7 @@ $ helm install my-release groundhog2k/rabbitmq
This chart uses the original [RabbitMQ image from Docker Hub](https://hub.docker.com/_/rabbitmq) to deploy a stateful RabbitMQ cluster in Kubernetes. This chart uses the original [RabbitMQ image from Docker Hub](https://hub.docker.com/_/rabbitmq) to deploy a stateful RabbitMQ cluster in Kubernetes.
It fully supports deployment of arm64v8 and amd64 multi-architecture docker image. Just set the `nodeSelector` value to `kubernetes.io/arch: "arm64"` (default is `"amd64"`) It fully supports deployment of the multi-architecture docker image.
## Prerequisites ## Prerequisites
...@@ -57,11 +57,12 @@ $ helm uninstall my-release ...@@ -57,11 +57,12 @@ $ helm uninstall my-release
| livenessProbe | object | `see values.yaml` | Liveness probe configuration | | livenessProbe | object | `see values.yaml` | Liveness probe configuration |
| readinessProbe | object | `see values.yaml` | Readiness probe configuration | | readinessProbe | object | `see values.yaml` | Readiness probe configuration |
| resources | object | `{}` | Resource limits and requests | | resources | object | `{}` | Resource limits and requests |
| nodeSelector."kubernetes.io/arch" | string | `"amd64"` | Deployment node selector | | nodeSelector | object | `{}` | Deployment node selector |
| podAnnotations | object | `{}` | Additional pod annotations | | podAnnotations | object | `{}` | Additional pod annotations |
| podSecurityContext | object | `{}` | Pod security context | | podSecurityContext | object | `{}` | Pod security context |
| securityContext | object | `see values.yaml` | Container security context | | securityContext | object | `see values.yaml` | Container security context |
| env | list | `[]` | Additional container environmment variables | | env | list | `[]` | Additional container environmment variables |
| args | list | `[]` | Additional container command arguments |
| rbac.create | bool | `true` | Enable creation of RBAC | | rbac.create | bool | `true` | Enable creation of RBAC |
| serviceAccount.create | bool | `false` | Enable service account creation | | serviceAccount.create | bool | `false` | Enable service account creation |
| serviceAccount.name | string | `""` | Optional name of the service account | | serviceAccount.name | string | `""` | Optional name of the service account |
...@@ -75,17 +76,21 @@ $ helm uninstall my-release ...@@ -75,17 +76,21 @@ $ helm uninstall my-release
| Key | Type | Default | Description | | Key | Type | Default | Description |
|-----|------|---------|-------------| |-----|------|---------|-------------|
| service.type | string | `"ClusterIP"` | Service type |
| service.clusterIP | string | `nil` | Service cluster IP (only relevant for type LoadBalancer) |
| service.amqp.port | int | `5672` | AMQP port | | service.amqp.port | int | `5672` | AMQP port |
| service.amqp.nodePort | int | `nil` | Service node port (only relevant for type NodePort) |
| service.mgmt.port | int | `15672` | Management UI port | | service.mgmt.port | int | `15672` | Management UI port |
| service.mgmt.nodePort | int | `nil` | Service node port (only relevant for type NodePort) |
## Storage parameters ## Storage parameters
| Key | Type | Default | Description | | Key | Type | Default | Description |
|-----|------|---------|-------------| |-----|------|---------|-------------|
| storage.accessModes[0] | string | `"ReadWriteOnce"` | Storage access mode | | storage.accessModes[0] | string | `"ReadWriteOnce"` | Storage access mode |
| storage.persistentVolumeClaimName | string | `""` | PVC name when existing storage volume should be used | | storage.persistentVolumeClaimName | string | `nil` | PVC name when existing storage volume should be used |
| storage.requestedSize | string | `""` | Size for new PVC, when no existing PVC is used | | storage.requestedSize | string | `nil` | Size for new PVC, when no existing PVC is used |
| storage.className | string | `""` | Storage class name | | storage.className | string | `nil` | Storage class name |
## Ingress parameters ## Ingress parameters
......
...@@ -10,8 +10,17 @@ spec: ...@@ -10,8 +10,17 @@ spec:
- port: {{ .Values.service.amqp.port }} - port: {{ .Values.service.amqp.port }}
targetPort: amqp targetPort: amqp
name: amqp name: amqp
{{- if and (eq .Values.service.type "NodePort") (.Values.service.amqp.nodePort) }}
nodePort: {{ .Values.service.amqp.nodePort }}
{{- end }}
- port: {{ .Values.service.mgmt.port }} - port: {{ .Values.service.mgmt.port }}
targetPort: mgmt targetPort: mgmt
name: mgmt name: mgmt
{{- if and (eq .Values.service.type "NodePort") (.Values.service.mgmt.nodePort) }}
nodePort: {{ .Values.service.mgmt.nodePort }}
{{- end }}
{{- if and (eq .Values.service.type "LoadBalancer") (.Values.service.clusterIP) }}
clusterIP: {{ .Values.service.clusterIP }}
{{- end }}
selector: selector:
{{- include "rabbitmq.selectorLabels" . | nindent 4 }} {{- include "rabbitmq.selectorLabels" . | nindent 4 }}
...@@ -27,12 +27,16 @@ spec: ...@@ -27,12 +27,16 @@ spec:
imagePullSecrets: imagePullSecrets:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
{{- with .Values.podSecurityContext }}
securityContext: securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }}
containers: containers:
- name: {{ .Chart.Name }} - name: {{ .Chart.Name }}
{{- with .Values.securityContext }}
securityContext: securityContext:
{{- toYaml .Values.securityContext | nindent 12 }} {{- toYaml . | nindent 12 }}
{{- end }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pullPolicy }}
ports: ports:
...@@ -70,8 +74,10 @@ spec: ...@@ -70,8 +74,10 @@ spec:
successThreshold: {{ .Values.readinessProbe.successThreshold }} successThreshold: {{ .Values.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.readinessProbe.failureThreshold }} failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
{{- end }} {{- end }}
{{- with .Values.resources }}
resources: resources:
{{- toYaml .Values.resources | nindent 12 }} {{- toYaml . | nindent 12 }}
{{- end }}
lifecycle: lifecycle:
{{- if and .Values.clustering.rebalance (gt (.Values.replicaCount | int) 1) }} {{- if and .Values.clustering.rebalance (gt (.Values.replicaCount | int) 1) }}
postStart: postStart:
...@@ -112,6 +118,12 @@ spec: ...@@ -112,6 +118,12 @@ spec:
envFrom: envFrom:
- secretRef: - secretRef:
name: {{ include "rabbitmq.fullname" . }} name: {{ include "rabbitmq.fullname" . }}
{{- if .Values.args }}
args:
{{- range .Values.args }}
- {{ . }}
{{- end }}
{{- end }}
volumeMounts: volumeMounts:
- name: logs - name: logs
mountPath: /var/log/rabbitmq mountPath: /var/log/rabbitmq
......
...@@ -36,10 +36,17 @@ securityContext: ...@@ -36,10 +36,17 @@ securityContext:
## Default RabbitMq service ports (default: AMQP port 5672, Management UI port 15672) ## Default RabbitMq service ports (default: AMQP port 5672, Management UI port 15672)
service: service:
type: ClusterIP
amqp: amqp:
port: 5672 port: 5672
## The node port (only relevant for type NodePort)
nodePort: {}
mgmt: mgmt:
port: 15672 port: 15672
## The node port (only relevant for type NodePort)
nodePort: {}
## The cluster ip address (only relevant for type LoadBalancer)
clusterIP: {}
## Ingress configuration ## Ingress configuration
ingress: ingress:
...@@ -68,10 +75,8 @@ resources: {} ...@@ -68,10 +75,8 @@ resources: {}
# cpu: 100m # cpu: 100m
# memory: 128Mi # memory: 128Mi
## Default node type for the image ## Additional node selector
## use arm64 for the arm64v8 image nodeSelector: {}
nodeSelector:
kubernetes.io/arch: amd64
tolerations: [] tolerations: []
affinity: {} affinity: {}
...@@ -107,6 +112,9 @@ rbac: ...@@ -107,6 +112,9 @@ rbac:
## Additional environment variables ## Additional environment variables
env: [] env: []
## Arguments for the container entrypoint process
args: []
## Default Kubernetes cluster domain ## Default Kubernetes cluster domain
clusterDomain: cluster.local clusterDomain: cluster.local
...@@ -144,13 +152,13 @@ clustering: ...@@ -144,13 +152,13 @@ clustering:
## Storage parameters ## Storage parameters
storage: storage:
## Set persistentVolumenClaimName to reference an existing PVC ## Set persistentVolumenClaimName to reference an existing PVC
# persistentVolumeClaimName: <own-pvc-name> persistentVolumeClaimName: {}
## Alternative set requestedSize to define a size for a dynamically created PVC ## Alternative set requestedSize to define a size for a dynamically created PVC
# requestedSize: <volume-size> requestedSize: {}
## the storage class name ## the storage class name
# className: className: {}
## Default access mode (ReadWriteOnce) ## Default access mode (ReadWriteOnce)
accessModes: accessModes:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment