-
Notifications
You must be signed in to change notification settings - Fork 10.4k
[bitnami/metallb] Adding the MetalLB Helm Chart. #2068
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
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 73dae2e
Merge branch 'master' of github.com:bitnami/charts
Cellebyte 9320720
Bumped version and added documentation of the added values.
Cellebyte 1e01619
Fixed indentation of environment variables
Cellebyte c29ff24
Rename ConfigMap to Secret and added to production-values
Cellebyte aed0b29
Fixed missing space
Cellebyte d298494
Merged upstream
Cellebyte dd14741
added the metallb chart
Cellebyte 2a63ad7
Update bitnami/metallb/Chart.yaml
Cellebyte 27cdbbe
Update bitnami/metallb/README.md
Cellebyte 767ada9
Update bitnami/metallb/templates/tests/test-connection.yaml
Cellebyte 9e982a2
Update bitnami/metallb/values.yaml
Cellebyte 9304c19
Update bitnami/metallb/values.yaml
Cellebyte 6ce2a0c
Update README.md
Cellebyte 67f34eb
Update bitnami/metallb/README.md
Cellebyte b36ec66
fixed `---`
Cellebyte f104ce4
Added templating
Cellebyte e0827e6
Fixed some bugs and added securityContext also bumped metallb appVersion
Cellebyte 7f9bcaf
Bumped versions
Cellebyte a8ab815
Added metallb templates
Cellebyte 5a3ed8d
Added metallb 0.9.2 changes to the chart
Cellebyte 3861669
Added metallb 0.9.2 changes to the chart
Cellebyte ee4b750
Added missing EOL
Cellebyte 4572be9
Fixed the appVersion
Cellebyte 38f238f
added secret autogeneration for the members to join
Cellebyte 7b86733
Bumped version accordingly to cellebyte/helm
Cellebyte 14e7d32
Fixed missing EOL
Cellebyte 968f1f9
Bumped templates to the new versiona and bumped metallb version
Cellebyte 11f3c28
Fixed some template behaviour
Cellebyte cd32f7e
Bumped chart version
Cellebyte b1b6c69
Bumped image tags to use the latest version
Cellebyte 4adf30e
Run the container as Root because the speaker needs the capability to…
Cellebyte cb92295
fixed typo and email
Cellebyte e15ed43
use bitnami images
Cellebyte f4549f1
added app.kubernetes.io/component app.kubernetes.io/app
Cellebyte ba204e9
Use nindent
Cellebyte f2f60f3
Fixed nindent and some old labels
Cellebyte db3a5d2
added more configurable options
Cellebyte 79fe7d4
Fixed nindent stuff
Cellebyte 38e6d04
Fixed trim-suffix
Cellebyte 73a3da5
added templates to handle secrets and configmaps the proper way
Cellebyte 76018ab
fixed wrong documentation
Cellebyte ba3b8ba
Fixed template executing if configInline defined
Cellebyte 5712cfa
fixed the psps
Cellebyte 1b28d68
Make psp also autogenerated
Cellebyte cf67fbe
remove one eol
Cellebyte 8ada22a
Added eol
Cellebyte 4d687a0
Added the missing doc pieces
Cellebyte faaa025
added ref for securityContext
Cellebyte bca4222
Fixed securityContext
Cellebyte de23221
added some NOTES after the deployment
Cellebyte File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| MetalLB is now running in the cluster | ||
|
|
||
|
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 }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 -}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 }} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.