Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
8b71c2f
added objectstorageConfig to the sidecar container
Cellebyte Mar 5, 2020
73dae2e
Merge branch 'master' of github.com:bitnami/charts
Cellebyte Mar 5, 2020
9320720
Bumped version and added documentation of the added values.
Cellebyte Mar 5, 2020
1e01619
Fixed indentation of environment variables
Cellebyte Mar 5, 2020
c29ff24
Rename ConfigMap to Secret and added to production-values
Cellebyte Mar 5, 2020
aed0b29
Fixed missing space
Cellebyte Mar 5, 2020
d298494
Merged upstream
Cellebyte Mar 17, 2020
dd14741
added the metallb chart
Cellebyte Mar 17, 2020
2a63ad7
Update bitnami/metallb/Chart.yaml
Cellebyte Mar 18, 2020
27cdbbe
Update bitnami/metallb/README.md
Cellebyte Mar 18, 2020
767ada9
Update bitnami/metallb/templates/tests/test-connection.yaml
Cellebyte Mar 18, 2020
9e982a2
Update bitnami/metallb/values.yaml
Cellebyte Mar 18, 2020
9304c19
Update bitnami/metallb/values.yaml
Cellebyte Mar 18, 2020
6ce2a0c
Update README.md
Cellebyte Mar 18, 2020
67f34eb
Update bitnami/metallb/README.md
Cellebyte Mar 18, 2020
b36ec66
fixed `---`
Cellebyte Mar 20, 2020
f104ce4
Added templating
Cellebyte Mar 21, 2020
e0827e6
Fixed some bugs and added securityContext also bumped metallb appVersion
Cellebyte Mar 21, 2020
7f9bcaf
Bumped versions
Cellebyte Mar 21, 2020
a8ab815
Added metallb templates
Cellebyte Mar 23, 2020
5a3ed8d
Added metallb 0.9.2 changes to the chart
Cellebyte Mar 23, 2020
3861669
Added metallb 0.9.2 changes to the chart
Cellebyte Mar 23, 2020
ee4b750
Added missing EOL
Cellebyte Mar 23, 2020
4572be9
Fixed the appVersion
Cellebyte Mar 23, 2020
38f238f
added secret autogeneration for the members to join
Cellebyte Mar 23, 2020
7b86733
Bumped version accordingly to cellebyte/helm
Cellebyte Mar 23, 2020
14e7d32
Fixed missing EOL
Cellebyte Mar 23, 2020
968f1f9
Bumped templates to the new versiona and bumped metallb version
Cellebyte Mar 27, 2020
11f3c28
Fixed some template behaviour
Cellebyte Mar 30, 2020
cd32f7e
Bumped chart version
Cellebyte Mar 30, 2020
b1b6c69
Bumped image tags to use the latest version
Cellebyte Mar 30, 2020
4adf30e
Run the container as Root because the speaker needs the capability to…
Cellebyte Apr 3, 2020
cb92295
fixed typo and email
Cellebyte Apr 20, 2020
e15ed43
use bitnami images
Cellebyte Apr 20, 2020
f4549f1
added app.kubernetes.io/component app.kubernetes.io/app
Cellebyte Apr 20, 2020
ba204e9
Use nindent
Cellebyte Apr 20, 2020
f2f60f3
Fixed nindent and some old labels
Cellebyte Apr 20, 2020
db3a5d2
added more configurable options
Cellebyte Apr 20, 2020
79fe7d4
Fixed nindent stuff
Cellebyte Apr 20, 2020
38e6d04
Fixed trim-suffix
Cellebyte Apr 20, 2020
73a3da5
added templates to handle secrets and configmaps the proper way
Cellebyte Apr 21, 2020
76018ab
fixed wrong documentation
Cellebyte Apr 21, 2020
ba3b8ba
Fixed template executing if configInline defined
Cellebyte Apr 21, 2020
5712cfa
fixed the psps
Cellebyte Apr 21, 2020
1b28d68
Make psp also autogenerated
Cellebyte Apr 21, 2020
cf67fbe
remove one eol
Cellebyte Apr 21, 2020
8ada22a
Added eol
Cellebyte Apr 21, 2020
4d687a0
Added the missing doc pieces
Cellebyte Apr 21, 2020
faaa025
added ref for securityContext
Cellebyte Apr 21, 2020
bca4222
Fixed securityContext
Cellebyte Apr 21, 2020
de23221
added some NOTES after the deployment
Cellebyte Apr 21, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions bitnami/metallb/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# 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
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
23 changes: 23 additions & 0 deletions bitnami/metallb/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: v1
name: metallb
description: The Metal LB for Kubernetes
appVersion: 0.9.3
keywords:
- "load-balancer"
- "balancer"
- "lb"
- "bgp"
- "arp"
- "vrrp"
- "vip"
home: https://metallb.universe.tf
icon: https://metallb.universe.tf/images/logo.png
sources:
- https://github.com/metallb/metallb
- https://github.com/bitnami/bitnami-docker-metallb
version: 0.1.10
maintainers:
- name: cellebyte
email: cellebyte@gmail.com
- name: Bitnami
email: containers@bitnami.com
160 changes: 160 additions & 0 deletions bitnami/metallb/README.md

Large diffs are not rendered by default.

39 changes: 39 additions & 0 deletions bitnami/metallb/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
MetalLB is now running in the cluster

Comment thread
Cellebyte marked this conversation as resolved.
Comment thread
Cellebyte marked this conversation as resolved.
LoadBalancer Services in your cluster are now available on the IPs you
defined in MetalLB's configuration. To see IP assignments,

kubectl get services -o wide --all-namespaces | grep --color=never -E 'LoadBalancer|NAMESPACE'

should be executed.

To see the currently configured configuration for metallb run

kubectl get configmaps --namespace {{ .Release.Namespace }} {{ include "metallb.configMapName" . }} -o yaml

in your preferred shell.

{{- if .Values.existingConfigMap }}
WARNING: you specified a ConfigMap that isn't managed by
Helm. LoadBalancer services will not function until you add that
ConfigMap to your cluster yourself.

Ensure you put the configmap in place

kubectl get configmaps --namespace {{ .Release.Namespace }} | grep --color=never -E "{{ include "metallb.configMapName" . }}|NAME"

If it is missing create it with:

kubectl create configmap {{ include "metallb.configMapName" . }} --namespace {{ .Release.Namespace }} --from-file=config
{{- end }}

{{- if .Values.speaker.secretName }}
WARNING: you specified a secretName that isn't managed by
Helm. The MetalLB speakers will not join without the secret in place.

kubectl get secrets --namespace {{ .Release.Namespace }} | grep --color=never -E "{{ include "metallb.secretName" .}}|NAME"

If it is missing create it with:

kubectl create secret {{ include "metallb.secretName" .}} --from-file={{ include "metallb.secretKey" . }}
{{- end }}
212 changes: 212 additions & 0 deletions bitnami/metallb/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "metallb.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Return the proper metallb controller image name
*/}}
{{- define "metallb.controller.image" -}}
{{- $registryName := .Values.controller.image.registry -}}
{{- $repositoryName := .Values.controller.image.repository -}}
{{- $tag := .Values.controller.image.tag | toString -}}
{{/*
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
Also, we can't use a single if because lazy evaluation is not an option
*/}}
{{- if .Values.global }}
{{- if .Values.global.imageRegistry }}
{{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- end -}}

{{/*
Return the proper metallb speaker image name
*/}}
{{- define "metallb.speaker.image" -}}
{{- $registryName := .Values.speaker.image.registry -}}
{{- $repositoryName := .Values.speaker.image.repository -}}
{{- $tag := .Values.speaker.image.tag | toString -}}
{{/*
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
Also, we can't use a single if because lazy evaluation is not an option
*/}}
{{- if .Values.global }}
{{- if .Values.global.imageRegistry }}
{{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- else -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}
{{- end -}}

{{/*
Common labels
*/}}
{{- define "metallb.labels" -}}
app.kubernetes.io/name: {{ include "metallb.name" . }}
helm.sh/chart: {{ include "metallb.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}

{{/*
Labels to use on deploy.spec.selector.matchLabels and svc.spec.selector
*/}}
{{- define "metallb.matchLabels" -}}
app.kubernetes.io/name: {{ include "metallb.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- 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 "metallb.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 -}}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "metallb.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Return the proper Docker Image Registry Secret Names
*/}}
{{- define "metallb.controller.imagePullSecrets" -}}
{{/*
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic.
Also, we can not use a single if because lazy evaluation is not an option
*/}}
{{- if .Values.global }}
{{- if .Values.global.imagePullSecrets }}
imagePullSecrets:
{{- range .Values.global.imagePullSecrets }}
- name: {{ . }}
{{- end }}
{{- else if .Values.controller.image.pullSecrets }}
imagePullSecrets:
{{- range .Values.controller.image.pullSecrets }}
- name: {{ . }}
{{- end }}
{{- end -}}
{{- else if .Values.controller.image.pullSecrets }}
imagePullSecrets:
{{- range .Values.controller.image.pullSecrets }}
- name: {{ . }}
{{- end }}
{{- end -}}
{{- end -}}


{{/*
Return the proper Docker Image Registry Secret Names
*/}}
{{- define "metallb.speaker.imagePullSecrets" -}}
{{/*
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic.
Also, we can not use a single if because lazy evaluation is not an option
*/}}
{{- if .Values.global }}
{{- if .Values.global.imagePullSecrets }}
imagePullSecrets:
{{- range .Values.global.imagePullSecrets }}
- name: {{ . }}
{{- end }}
{{- else if .Values.speaker.image.pullSecrets }}
imagePullSecrets:
{{- range .Values.speaker.image.pullSecrets }}
- name: {{ . }}
{{- end }}
{{- end -}}
{{- else if .Values.speaker.image.pullSecrets }}
imagePullSecrets:
{{- range .Values.speaker.image.pullSecrets }}
- name: {{ . }}
{{- end }}
{{- end -}}
{{- end -}}

{{/*
Create the name of the controller service account to use
*/}}
{{- define "metallb.controllerServiceAccountName" -}}
{{- if .Values.controller.serviceAccount.create -}}
{{ default (printf "%s-controller" (include "metallb.fullname" .)) .Values.controller.serviceAccount.name | trunc 63 | trimSuffix "-" }}
{{- else -}}
{{ default "default" .Values.controller.serviceAccount.name }}
{{- end -}}
{{- end -}}

{{/*
Create the name of the speaker service account to use
*/}}
{{- define "metallb.speakerServiceAccountName" -}}
{{- if .Values.speaker.serviceAccount.create -}}
{{ default (printf "%s-speaker" (include "metallb.fullname" .)) .Values.speaker.serviceAccount.name | trunc 63 | trimSuffix "-" }}
{{- else -}}
{{ default "default" .Values.speaker.serviceAccount.name }}
{{- end -}}
{{- end -}}

{{/*
Create the name of the settings ConfigMap to use.
*/}}
{{- define "metallb.configMapName" -}}
{{ default ( printf "%s" (include "metallb.fullname" .)) .Values.existingConfigMap | trunc 63 | trimSuffix "-" }}
{{- end -}}

{{/*
Create the name of the settings Secret to use.
*/}}
{{- define "metallb.secretName" -}}
{{ default ( printf "%s-memberlist" (include "metallb.fullname" .)) .Values.speaker.secretName | trunc 63 | trimSuffix "-" }}
{{- end -}}


{{/*
Create the key of the settings Secret to use.
*/}}
{{- define "metallb.secretKey" -}}
{{ default "secretkey" .Values.speaker.secretKey | trunc 63 | trimSuffix "-" }}
{{- end -}}

{{/*
Renders a value that contains template.
Usage:
{{ include "metallb.tplValue" ( dict "value" .Values.path.to.the.Value "context" $) }}
*/}}
{{- define "metallb.tplValue" -}}
{{- if typeIs "string" .value }}
{{- tpl .value .context }}
{{- else }}
{{- tpl (.value | toYaml) .context }}
{{- end }}
{{- end -}}
10 changes: 10 additions & 0 deletions bitnami/metallb/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{- if not .Values.existingConfigMap }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "metallb.configMapName" . }}
labels: {{- include "metallb.labels" . | nindent 4}}
data:
config: |
{{ include "metallb.tplValue" ( dict "value" .Values.configInline "context" $) | indent 4 }}
{{- end }}
Loading