From 9476136611d510742203631f1139fdbb26dfc80c Mon Sep 17 00:00:00 2001 From: Daniel Polito Date: Tue, 6 Oct 2020 11:32:30 -0300 Subject: [PATCH] rabbitmq 1.0.0 --- charts/rabbitmq/.helmignore | 23 +++++++++++++++ charts/rabbitmq/Chart.yaml | 8 ++++++ charts/rabbitmq/templates/NOTES.txt | 20 +++++++++++++ charts/rabbitmq/templates/_helpers.tpl | 25 +++++++++++++++++ charts/rabbitmq/values.yaml | 39 ++++++++++++++++++++++++++ 5 files changed, 115 insertions(+) create mode 100644 charts/rabbitmq/.helmignore create mode 100644 charts/rabbitmq/Chart.yaml create mode 100644 charts/rabbitmq/templates/NOTES.txt create mode 100644 charts/rabbitmq/templates/_helpers.tpl create mode 100644 charts/rabbitmq/values.yaml diff --git a/charts/rabbitmq/.helmignore b/charts/rabbitmq/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/charts/rabbitmq/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/rabbitmq/Chart.yaml b/charts/rabbitmq/Chart.yaml new file mode 100644 index 0000000..72024ab --- /dev/null +++ b/charts/rabbitmq/Chart.yaml @@ -0,0 +1,8 @@ +apiVersion: v2 +name: rabbitmq +description: RabbitMQ helm chart +version: 1.0.0 +dependencies: +- name: generic + version: 1.2.1 + repository: https://charts.kool.dev diff --git a/charts/rabbitmq/templates/NOTES.txt b/charts/rabbitmq/templates/NOTES.txt new file mode 100644 index 0000000..eb2f6b6 --- /dev/null +++ b/charts/rabbitmq/templates/NOTES.txt @@ -0,0 +1,20 @@ +{{- if .Values.generic.ingresses }} + Ingresses: + {{- range $ingress := .Values.generic.ingresses }} + {{- range $host := .hosts }} + {{- range .paths }} + http{{ if $ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} + {{- end }} + {{- end }} + {{- end }} +{{- else if .Values.generic.services }} + Services: + {{- $fullName := include "rabbitmq.fullname" . -}} + {{- range $service := .Values.generic.services }} + {{- if .fullName }} + {{ .fullName }} + {{- else }} + {{ $fullName }}-{{ .name | default "default" }}:{{ .port }} + {{- end }} + {{- end }} +{{- end }} diff --git a/charts/rabbitmq/templates/_helpers.tpl b/charts/rabbitmq/templates/_helpers.tpl new file mode 100644 index 0000000..2355892 --- /dev/null +++ b/charts/rabbitmq/templates/_helpers.tpl @@ -0,0 +1,25 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "rabbitmq.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "rabbitmq.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} diff --git a/charts/rabbitmq/values.yaml b/charts/rabbitmq/values.yaml new file mode 100644 index 0000000..d2a838a --- /dev/null +++ b/charts/rabbitmq/values.yaml @@ -0,0 +1,39 @@ +generic: + nameOverride: rabbitmq + # strategy: + # type: Recreate + + containers: + default: + image: + repository: rabbitmq + pullPolicy: Always + tag: 3-management-alpine + ports: + - containerPort: 5672 + livenessProbe: + tcpSocket: + port: 5672 + env: + - name: RABBITMQ_DEFAULT_USER + value: user + - name: RABBITMQ_DEFAULT_PASS + value: pass + # volumeMounts: + # - name: default + # mountPath: /var/lib/rabbitmq + # subPath: rabbitmq + + # storages: + # - accessModes: + # - ReadWriteOnce + # size: 1Gi + + # volumes: + # - persistentVolumeClaim: + # claimName: default + + services: + default: + type: ClusterIP + port: 5672