mirror of
https://github.com/bitnami/charts.git
synced 2026-03-07 08:07:55 +08:00
[bitnami/metallb] Add support for FRR in speaker (#25282)
* Initial changes Signed-off-by: Rafael Rios Saavedra <rrios@vmware.com> * Added initcontainers and containers Signed-off-by: Rafael Rios Saavedra <rrios@vmware.com> * Working chart Signed-off-by: Rafael Rios Saavedra <rrios@vmware.com> * Some clean up Signed-off-by: Rafael Rios Saavedra <rrios@vmware.com> * Test with pipeline image Signed-off-by: Rafael Rios Saavedra <rrios@vmware.com> * Add securityContext, remove unneeded file Signed-off-by: Rafael Rios Saavedra <rrios@vmware.com> * Fix missing parameter comments in values.yaml. Regenerate README.md Signed-off-by: Rafael Rios Saavedra <rrios@vmware.com> * Updates metallb container images versions Signed-off-by: Rafael Rios Saavedra <rrios@vmware.com> * Create its own servicemonitor for frr metrics Signed-off-by: Rafael Rios Saavedra <rrios@vmware.com> * Fix comments from the review (imagename, log messages, volume, servicemonitor port) Signed-off-by: Rafael Rios Saavedra <rrios@vmware.com> --------- Signed-off-by: Rafael Rios Saavedra <rrios@vmware.com>
This commit is contained in:
committed by
GitHub
parent
aff45b2f5d
commit
9d36bbda48
@@ -8,7 +8,7 @@ annotations:
|
||||
- name: metallb-controller
|
||||
image: docker.io/bitnami/metallb-controller:0.14.5-debian-12-r1
|
||||
- name: metallb-speaker
|
||||
image: docker.io/bitnami/metallb-speaker:0.14.5-debian-12-r1
|
||||
image: docker.io/bitnami/metallb-speaker:0.14.5-debian-12-r2
|
||||
apiVersion: v2
|
||||
appVersion: 0.14.5
|
||||
dependencies:
|
||||
@@ -35,4 +35,4 @@ maintainers:
|
||||
name: metallb
|
||||
sources:
|
||||
- https://github.com/bitnami/charts/tree/main/bitnami/metallb
|
||||
version: 6.0.1
|
||||
version: 6.1.0
|
||||
|
||||
@@ -324,6 +324,62 @@ spec:
|
||||
| `speaker.customReadinessProbe` | Custom readiness probe for the Web component | `{}` |
|
||||
| `speaker.logLevel` | Sets the speaker log level. Does not work if the args are overridden | `info` |
|
||||
|
||||
### FRR Speaker
|
||||
|
||||
| Name | Description | Value |
|
||||
| ------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- |
|
||||
| `speaker.frr.enabled` | Whether to enable FRR mode | `false` |
|
||||
| `speaker.frr.image.registry` | MetalLB Speaker image registry | `REGISTRY_NAME` |
|
||||
| `speaker.frr.image.repository` | MetalLB Speaker image repository | `REPOSITORY_NAME/metallb-speaker` |
|
||||
| `speaker.frr.image.digest` | MetalLB Speaker image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | `""` |
|
||||
| `speaker.frr.image.pullPolicy` | MetalLB Speaker image pull policy | `IfNotPresent` |
|
||||
| `speaker.frr.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` |
|
||||
| `speaker.frr.resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if speaker.resources is set (speaker.resources is recommended for production). | `micro` |
|
||||
| `speaker.frr.resources` | Set container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
|
||||
| `speaker.frr.containerSecurityContext.enabled` | Enabled Speaker containers' Security Context | `true` |
|
||||
| `speaker.frr.containerSecurityContext.capabilities.add` | Add capabilities for the securityContext | `[]` |
|
||||
| `speaker.frr.containerSecurityContext.runAsUser` | Set containers' Security Context runAsUser | `0` |
|
||||
| `speaker.frr.containerSecurityContext.runAsGroup` | Set containers' Security Context runAsGroup | `0` |
|
||||
| `speaker.frr.containerPorts.metrics` | HTTP Metrics Endpoint | `7473` |
|
||||
|
||||
### FRR Speaker Prometheus metrics export
|
||||
|
||||
| Name | Description | Value |
|
||||
| ------------------------------------------------------ | --------------------------------------------------------------------------- | ------------------------ |
|
||||
| `speaker.frr.metrics.service.port` | Prometheus metrics service port | `7473` |
|
||||
| `speaker.frr.metrics.service.annotations` | Annotations for the Prometheus Exporter service service | `{}` |
|
||||
| `speaker.frr.metrics.serviceMonitor.enabled` | Enable support for Prometheus Operator | `false` |
|
||||
| `speaker.frr.metrics.serviceMonitor.namespace` | Namespace which Prometheus is running in | `""` |
|
||||
| `speaker.frr.metrics.serviceMonitor.jobLabel` | Job label for scrape target | `app.kubernetes.io/name` |
|
||||
| `speaker.frr.metrics.serviceMonitor.interval` | Scrape interval. If not set, the Prometheus default scrape interval is used | `""` |
|
||||
| `speaker.frr.metrics.serviceMonitor.scrapeTimeout` | Timeout after which the scrape is ended | `""` |
|
||||
| `speaker.frr.metrics.serviceMonitor.metricRelabelings` | Specify additional relabeling of metrics | `[]` |
|
||||
| `speaker.frr.metrics.serviceMonitor.relabelings` | Specify general relabeling | `[]` |
|
||||
| `speaker.frr.metrics.serviceMonitor.selector` | ServiceMonitor selector labels | `{}` |
|
||||
| `speaker.frr.metrics.serviceMonitor.labels` | Extra labels for the ServiceMonitor | `{}` |
|
||||
| `speaker.frr.metrics.serviceMonitor.honorLabels` | honorLabels chooses the metric's labels on collisions with target labels | `false` |
|
||||
| `speaker.frr.livenessProbe.enabled` | Enable livenessProbe | `true` |
|
||||
| `speaker.frr.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `10` |
|
||||
| `speaker.frr.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `10` |
|
||||
| `speaker.frr.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `1` |
|
||||
| `speaker.frr.livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `3` |
|
||||
| `speaker.frr.livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` |
|
||||
| `speaker.frr.readinessProbe.enabled` | Enable readinessProbe | `true` |
|
||||
| `speaker.frr.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `10` |
|
||||
| `speaker.frr.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `10` |
|
||||
| `speaker.frr.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `1` |
|
||||
| `speaker.frr.readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `3` |
|
||||
| `speaker.frr.readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` |
|
||||
| `speaker.frr.startupProbe.enabled` | Enable startupProbe | `true` |
|
||||
| `speaker.frr.startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `10` |
|
||||
| `speaker.frr.startupProbe.periodSeconds` | Period seconds for startupProbe | `10` |
|
||||
| `speaker.frr.startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `1` |
|
||||
| `speaker.frr.startupProbe.failureThreshold` | Failure threshold for startupProbe | `3` |
|
||||
| `speaker.frr.startupProbe.successThreshold` | Success threshold for startupProbe | `1` |
|
||||
| `speaker.frr.customStartupProbe` | Custom liveness probe for the Web component | `{}` |
|
||||
| `speaker.frr.customLivenessProbe` | Custom liveness probe for the Web component | `{}` |
|
||||
| `speaker.frr.customReadinessProbe` | Custom readiness probe for the Web component | `{}` |
|
||||
|
||||
### Speaker Prometheus metrics export
|
||||
|
||||
| Name | Description | Value |
|
||||
@@ -440,4 +496,4 @@ Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
limitations under the License.
|
||||
|
||||
@@ -116,6 +116,10 @@ spec:
|
||||
- name: METALLB_DEPLOYMENT
|
||||
value: {{ printf "%s-controller" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
{{- if .Values.speaker.frr.enabled }}
|
||||
- name: METALLB_BGP_TYPE
|
||||
value: frr
|
||||
{{- end }}
|
||||
{{- if .Values.controller.extraEnvVars }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.controller.extraEnvVars "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
|
||||
108
bitnami/metallb/templates/speaker/configmap.yaml
Normal file
108
bitnami/metallb/templates/speaker/configmap.yaml
Normal file
@@ -0,0 +1,108 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if .Values.speaker.frr.enabled }}
|
||||
# FRR expects to have these files owned by frr:frr on startup.
|
||||
# Having them in a ConfigMap allows us to modify behaviors: for example enabling more daemons on startup.
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ printf "%s-speaker-frr-startup" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
namespace: {{ default .Release.Namespace .Values.speaker.metrics.serviceMonitor.namespace | quote }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/component: speaker
|
||||
data:
|
||||
daemons: |
|
||||
# This file tells the frr package which daemons to start.
|
||||
#
|
||||
# Sample configurations for these daemons can be found in
|
||||
# /usr/share/doc/frr/examples/.
|
||||
#
|
||||
# ATTENTION:
|
||||
#
|
||||
# When activating a daemon for the first time, a config file, even if it is
|
||||
# empty, has to be present *and* be owned by the user and group "frr", else
|
||||
# the daemon will not be started by /etc/init.d/frr. The permissions should
|
||||
# be u=rw,g=r,o=.
|
||||
# When using "vtysh" such a config file is also needed. It should be owned by
|
||||
# group "frrvty" and set to ug=rw,o= though. Check /etc/pam.d/frr, too.
|
||||
#
|
||||
# The watchfrr and zebra daemons are always started.
|
||||
#
|
||||
bgpd=yes
|
||||
ospfd=no
|
||||
ospf6d=no
|
||||
ripd=no
|
||||
ripngd=no
|
||||
isisd=no
|
||||
pimd=no
|
||||
ldpd=no
|
||||
nhrpd=no
|
||||
eigrpd=no
|
||||
babeld=no
|
||||
sharpd=no
|
||||
pbrd=no
|
||||
bfdd=yes
|
||||
fabricd=no
|
||||
vrrpd=no
|
||||
|
||||
#
|
||||
# If this option is set the /etc/init.d/frr script automatically loads
|
||||
# the config via "vtysh -b" when the servers are started.
|
||||
# Check /etc/pam.d/frr if you intend to use "vtysh"!
|
||||
#
|
||||
vtysh_enable=yes
|
||||
zebra_options=" -A 127.0.0.1 -s 90000000"
|
||||
bgpd_options=" -A 127.0.0.1 -p 0"
|
||||
ospfd_options=" -A 127.0.0.1"
|
||||
ospf6d_options=" -A ::1"
|
||||
ripd_options=" -A 127.0.0.1"
|
||||
ripngd_options=" -A ::1"
|
||||
isisd_options=" -A 127.0.0.1"
|
||||
pimd_options=" -A 127.0.0.1"
|
||||
ldpd_options=" -A 127.0.0.1"
|
||||
nhrpd_options=" -A 127.0.0.1"
|
||||
eigrpd_options=" -A 127.0.0.1"
|
||||
babeld_options=" -A 127.0.0.1"
|
||||
sharpd_options=" -A 127.0.0.1"
|
||||
pbrd_options=" -A 127.0.0.1"
|
||||
staticd_options="-A 127.0.0.1"
|
||||
bfdd_options=" -A 127.0.0.1"
|
||||
fabricd_options="-A 127.0.0.1"
|
||||
vrrpd_options=" -A 127.0.0.1"
|
||||
|
||||
# configuration profile
|
||||
#
|
||||
#frr_profile="traditional"
|
||||
#frr_profile="datacenter"
|
||||
|
||||
#
|
||||
# This is the maximum number of FD's that will be available.
|
||||
# Upon startup this is read by the control files and ulimit
|
||||
# is called. Uncomment and use a reasonable value for your
|
||||
# setup if you are expecting a large number of peers in
|
||||
# say BGP.
|
||||
#MAX_FDS=1024
|
||||
|
||||
# The list of daemons to watch is automatically generated by the init script.
|
||||
#watchfrr_options=""
|
||||
|
||||
# for debugging purposes, you can specify a "wrap" command to start instead
|
||||
# of starting the daemon directly, e.g. to use valgrind on ospfd:
|
||||
# ospfd_wrap="/usr/bin/valgrind"
|
||||
# or you can use "all_wrap" for all daemons, e.g. to use perf record:
|
||||
# all_wrap="/usr/bin/perf record --call-graph -"
|
||||
# the normal daemon command is added to this at the end.
|
||||
vtysh.conf: |+
|
||||
service integrated-vtysh-config
|
||||
frr.conf: |+
|
||||
! This file gets overriden the first time the speaker renders a config.
|
||||
! So anything configured here is only temporary.
|
||||
frr version 7.5.1
|
||||
frr defaults traditional
|
||||
hostname Router
|
||||
line vty
|
||||
log file /etc/frr/frr.log informational
|
||||
{{- end }}
|
||||
@@ -67,8 +67,46 @@ spec:
|
||||
{{- if .Values.speaker.terminationGracePeriodSeconds }}
|
||||
terminationGracePeriodSeconds: {{ .Values.speaker.terminationGracePeriodSeconds }}
|
||||
{{- end }}
|
||||
{{- if .Values.speaker.initContainers }}
|
||||
initContainers: {{- include "common.tplvalues.render" (dict "value" .Values.speaker.initContainers "context" $) | nindent 8 }}
|
||||
{{- if or .Values.speaker.initContainers .Values.speaker.frr.enabled }}
|
||||
initContainers:
|
||||
{{- if .Values.speaker.initContainers }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.speaker.initContainers "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.speaker.frr.enabled }}
|
||||
# Copies the initial config files with the right permissions to the shared volume.
|
||||
- name: cp-frr-files
|
||||
image: {{ include "common.images.image" (dict "imageRoot" .Values.speaker.frr.image "global" .Values.global) }}
|
||||
{{- if .Values.speaker.frr.image.pullPolicy }}
|
||||
imagePullPolicy: {{ .Values.speaker.frr.image.pullPolicy }}
|
||||
{{- end }}
|
||||
command: ["/bin/sh", "-c", "cp -rLf /tmp/frr/* /etc/frr/"]
|
||||
volumeMounts:
|
||||
- name: frr-startup
|
||||
mountPath: /tmp/frr
|
||||
- name: frr-conf
|
||||
mountPath: /etc/frr
|
||||
# Copies the reloader to the shared volume between the speaker and reloader.
|
||||
- name: cp-reloader
|
||||
image: {{ include "common.images.image" (dict "imageRoot" .Values.speaker.frr.image "global" .Values.global) }}
|
||||
{{- if .Values.speaker.frr.image.pullPolicy }}
|
||||
imagePullPolicy: {{ .Values.speaker.frr.image.pullPolicy }}
|
||||
{{- end }}
|
||||
command: ["/bin/sh", "-c", "cp -f /opt/bitnami/metallb-speaker/bin/frr-reloader.sh /etc/frr_reloader/"]
|
||||
volumeMounts:
|
||||
- name: reloader
|
||||
mountPath: /etc/frr_reloader
|
||||
# Copies the metrics exporter
|
||||
- name: cp-metrics
|
||||
image: {{ include "common.images.image" (dict "imageRoot" .Values.speaker.frr.image "global" .Values.global) }}
|
||||
{{- if .Values.speaker.frr.image.pullPolicy }}
|
||||
imagePullPolicy: {{ .Values.speaker.frr.image.pullPolicy }}
|
||||
{{- end }}
|
||||
command: ["/bin/sh", "-c", "cp -f /opt/bitnami/metallb-speaker/bin/frr-metrics /etc/frr_metrics/"]
|
||||
volumeMounts:
|
||||
- name: metrics
|
||||
mountPath: /etc/frr_metrics
|
||||
shareProcessNamespace: true
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: metallb-speaker
|
||||
@@ -164,9 +202,121 @@ spec:
|
||||
- name: memberlist-secret
|
||||
mountPath: /etc/memberlist
|
||||
readOnly: true
|
||||
{{- if .Values.speaker.frr.enabled }}
|
||||
- name: reloader
|
||||
mountPath: /etc/frr_reloader
|
||||
{{- end }}
|
||||
{{- if .Values.speaker.extraVolumeMounts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.speaker.extraVolumeMounts "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.speaker.frr.enabled }}
|
||||
- name: frr
|
||||
image: {{ include "common.images.image" (dict "imageRoot" .Values.speaker.frr.image "global" .Values.global) }}
|
||||
imagePullPolicy: {{ .Values.speaker.frr.image.pullPolicy }}
|
||||
{{- if .Values.speaker.frr.containerSecurityContext.enabled }}
|
||||
securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.speaker.frr.containerSecurityContext "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.speaker.frr.image.pullPolicy }}
|
||||
imagePullPolicy: {{ .Values.speaker.frr.image.pullPolicy }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: frr-sockets
|
||||
mountPath: /var/run/frr
|
||||
- name: frr-conf
|
||||
mountPath: /etc/frr
|
||||
# The command is FRR's default entrypoint & waiting for the log file to appear and tailing it.
|
||||
# If the log file isn't created in 60 seconds the tail fails and the container is restarted.
|
||||
# This workaround is needed to have the frr logs as part of kubectl logs -c frr < speaker_pod_name >.
|
||||
command:
|
||||
- /bin/bash
|
||||
- -c
|
||||
- |
|
||||
. /usr/lib/frr/frrcommon.sh
|
||||
/usr/lib/frr/watchfrr $(daemon_list) &
|
||||
attempts=0
|
||||
until [[ -f /etc/frr/frr.log || $attempts -eq 60 ]]; do
|
||||
sleep 1
|
||||
attempts=$(( $attempts + 1 ))
|
||||
done
|
||||
tail -f /etc/frr/frr.log
|
||||
{{- if .Values.speaker.frr.resources }}
|
||||
resources: {{- toYaml .Values.speaker.frr.resources | nindent 12 }}
|
||||
{{- else if ne .Values.speaker.frr.resourcesPreset "none" }}
|
||||
resources: {{- include "common.resources.preset" (dict "type" .Values.speaker.frr.resourcesPreset) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.speaker.frr.resources }}
|
||||
resources: {{- toYaml .Values.speaker.frr.resources | nindent 12 }}
|
||||
{{- else if ne .Values.speaker.frr.resourcesPreset "none" }}
|
||||
resources: {{- include "common.resources.preset" (dict "type" .Values.speaker.frr.resourcesPreset) | nindent 12 }}
|
||||
{{- end }}
|
||||
- name: reloader
|
||||
image: {{ include "common.images.image" (dict "imageRoot" .Values.speaker.frr.image "global" .Values.global) }}
|
||||
imagePullPolicy: {{ .Values.speaker.frr.image.pullPolicy }}
|
||||
command: ["/etc/frr_reloader/frr-reloader.sh"]
|
||||
volumeMounts:
|
||||
- name: frr-sockets
|
||||
mountPath: /var/run/frr
|
||||
- name: frr-conf
|
||||
mountPath: /etc/frr
|
||||
- name: reloader
|
||||
mountPath: /etc/frr_reloader
|
||||
{{- if .Values.speaker.frr.resources }}
|
||||
resources: {{- toYaml .Values.speaker.frr.resources | nindent 12 }}
|
||||
{{- else if ne .Values.speaker.frr.resourcesPreset "none" }}
|
||||
resources: {{- include "common.resources.preset" (dict "type" .Values.speaker.frr.resourcesPreset) | nindent 12 }}
|
||||
{{- end }}
|
||||
- name: frr-metrics
|
||||
image: {{ include "common.images.image" (dict "imageRoot" .Values.speaker.frr.image "global" .Values.global) }}
|
||||
imagePullPolicy: {{ .Values.speaker.frr.image.pullPolicy }}
|
||||
command: ["/etc/frr_metrics/frr-metrics"]
|
||||
{{- if .Values.speaker.frr.containerSecurityContext.enabled }}
|
||||
securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.speaker.frr.containerSecurityContext "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
args:
|
||||
- --metrics-port={{ .Values.speaker.frr.containerPorts.metrics }}
|
||||
ports:
|
||||
- containerPort: {{ .Values.speaker.frr.containerPorts.metrics }}
|
||||
name: monitoring
|
||||
volumeMounts:
|
||||
- name: frr-sockets
|
||||
mountPath: /var/run/frr
|
||||
- name: frr-conf
|
||||
mountPath: /etc/frr
|
||||
- name: metrics
|
||||
mountPath: /etc/frr_metrics
|
||||
{{- if not .Values.diagnosticMode.enabled }}
|
||||
{{- if .Values.speaker.frr.customLivenessProbe }}
|
||||
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.speaker.frr.customLivenessProbe "context" $) | nindent 12 }}
|
||||
{{- else if .Values.speaker.frr.livenessProbe.enabled }}
|
||||
livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.speaker.frr.livenessProbe "enabled") "context" $) | nindent 12 }}
|
||||
httpGet:
|
||||
path: /livez
|
||||
port: {{ .Values.speaker.frr.containerPorts.metrics }}
|
||||
{{- end }}
|
||||
{{- if .Values.speaker.frr.customReadinessProbe }}
|
||||
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.speaker.frr.customReadinessProbe "context" $) | nindent 12 }}
|
||||
{{- else if .Values.speaker.frr.readinessProbe.enabled }}
|
||||
readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.speaker.frr.readinessProbe "enabled") "context" $) | nindent 12 }}
|
||||
httpGet:
|
||||
path: /livez
|
||||
port: {{ .Values.speaker.frr.containerPorts.metrics }}
|
||||
{{- end }}
|
||||
{{- if .Values.speaker.frr.customStartupProbe }}
|
||||
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.speaker.frr.customStartupProbe "context" $) | nindent 12 }}
|
||||
{{- else if .Values.speaker.frr.startupProbe.enabled }}
|
||||
startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.speaker.frr.startupProbe "enabled") "context" $) | nindent 12 }}
|
||||
httpGet:
|
||||
path: /livez
|
||||
port: {{ .Values.speaker.frr.containerPorts.metrics }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.speaker.frr.resources }}
|
||||
resources: {{- toYaml .Values.speaker.frr.resources | nindent 12 }}
|
||||
{{- else if ne .Values.speaker.frr.resourcesPreset "none" }}
|
||||
resources: {{- include "common.resources.preset" (dict "type" .Values.speaker.frr.resourcesPreset) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.speaker.sidecars }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.speaker.sidecars "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
@@ -178,6 +328,19 @@ spec:
|
||||
items:
|
||||
- key: {{ include "metallb.speaker.secretKey" . }}
|
||||
path: secretkey
|
||||
{{- if .Values.speaker.frr.enabled }}
|
||||
- name: frr-sockets
|
||||
emptyDir: {}
|
||||
- name: frr-startup
|
||||
configMap:
|
||||
name: {{ printf "%s-speaker-frr-startup" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
- name: frr-conf
|
||||
emptyDir: {}
|
||||
- name: reloader
|
||||
emptyDir: {}
|
||||
- name: metrics
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
{{- if .Values.speaker.extraVolumes }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.speaker.extraVolumes "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
|
||||
31
bitnami/metallb/templates/speaker/service-frr.yaml
Normal file
31
bitnami/metallb/templates/speaker/service-frr.yaml
Normal file
@@ -0,0 +1,31 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.speaker.frr.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ printf "%s-speaker-frr-metrics" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.speaker.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/component: speaker
|
||||
{{- if or .Values.speaker.frr.metrics.service.annotations .Values.commonAnnotations }}
|
||||
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.speaker.frr.metrics.service.annotations .Values.commonAnnotations ) "context" . ) }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: ClusterIP
|
||||
clusterIP: "None"
|
||||
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.speaker.podLabels .Values.commonLabels ) "context" . ) }}
|
||||
selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/component: speaker
|
||||
ports:
|
||||
- name: frrmetrics
|
||||
port: {{ .Values.speaker.frr.metrics.service.port }}
|
||||
protocol: TCP
|
||||
targetPort: {{ .Values.speaker.frr.containerPorts.metrics }}
|
||||
{{- end }}
|
||||
47
bitnami/metallb/templates/speaker/servicemonitor-frr.yaml
Normal file
47
bitnami/metallb/templates/speaker/servicemonitor-frr.yaml
Normal file
@@ -0,0 +1,47 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.speaker.enabled .Values.speaker.frr.metrics.serviceMonitor.enabled }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: {{ printf "%s-speaker-frr" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
namespace: {{ default .Release.Namespace .Values.speaker.frr.metrics.serviceMonitor.namespace | quote }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.speaker.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.speaker.frr.metrics.serviceMonitor.labels .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/component: speaker
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
jobLabel: {{ .Values.speaker.frr.metrics.serviceMonitor.jobLabel | quote }}
|
||||
selector:
|
||||
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }}
|
||||
app.kubernetes.io/component: speaker
|
||||
{{- if .Values.speaker.frr.metrics.serviceMonitor.selector }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.speaker.frr.metrics.serviceMonitor.selector "context" $) | nindent 6 }}
|
||||
{{- end }}
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- {{ include "common.names.namespace" .| quote }}
|
||||
endpoints:
|
||||
- port: frrmetrics
|
||||
{{- if .Values.speaker.frr.metrics.serviceMonitor.interval }}
|
||||
interval: {{ .Values.speaker.frr.metrics.serviceMonitor.interval }}
|
||||
{{- end }}
|
||||
{{- if .Values.speaker.frr.metrics.serviceMonitor.scrapeTimeout }}
|
||||
scrapeTimeout: {{ .Values.speaker.frr.metrics.serviceMonitor.scrapeTimeout }}
|
||||
{{- end }}
|
||||
{{- if .Values.speaker.frr.metrics.serviceMonitor.honorLabels }}
|
||||
honorLabels: {{ .Values.speaker.frr.metrics.serviceMonitor.honorLabels }}
|
||||
{{- end }}
|
||||
{{- if .Values.speaker.frr.metrics.serviceMonitor.metricRelabelings }}
|
||||
metricRelabelings: {{- include "common.tplvalues.render" ( dict "value" .Values.speaker.frr.metrics.serviceMonitor.metricRelabelings "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.speaker.frr.metrics.serviceMonitor.relabelings }}
|
||||
relabelings: {{- include "common.tplvalues.render" ( dict "value" .Values.speaker.frr.metrics.serviceMonitor.relabelings "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
@@ -554,7 +554,7 @@ speaker:
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/metallb-speaker
|
||||
tag: 0.14.5-debian-12-r1
|
||||
tag: 0.14.5-debian-12-r2
|
||||
digest: ""
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
@@ -915,6 +915,179 @@ speaker:
|
||||
## @param speaker.logLevel Sets the speaker log level. Does not work if the args are overridden
|
||||
##
|
||||
logLevel: "info"
|
||||
## @section FRR Speaker
|
||||
frr:
|
||||
## @param speaker.frr.enabled Whether to enable FRR mode
|
||||
## ref: https://metallb.universe.tf/concepts/bgp/#frr-mode
|
||||
##
|
||||
enabled: false
|
||||
image:
|
||||
## @param speaker.frr.image.registry [default: REGISTRY_NAME] MetalLB Speaker image registry
|
||||
## @param speaker.frr.image.repository [default: REPOSITORY_NAME/metallb-speaker] MetalLB Speaker image repository
|
||||
## @skip speaker.frr.image.tag MetalLB Speaker image tag (immutable tags are recommended)
|
||||
## @param speaker.frr.image.digest MetalLB Speaker image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
|
||||
## @param speaker.frr.image.pullPolicy MetalLB Speaker image pull policy
|
||||
## @param speaker.frr.image.pullSecrets Specify docker-registry secret names as an array
|
||||
##
|
||||
registry: docker.io
|
||||
repository: bitnami/metallb-speaker
|
||||
tag: 0.14.5-debian-12-r2
|
||||
digest: ""
|
||||
pullPolicy: IfNotPresent
|
||||
pullSecrets: []
|
||||
## Speaker container resource requests and limits
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
|
||||
## We usually recommend not to specify default resources and to leave this as a conscious
|
||||
## choice for the user. This also increases chances charts run on environments with little
|
||||
## resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
## lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
## @param speaker.frr.resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if speaker.resources is set (speaker.resources is recommended for production).
|
||||
## More information: https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15
|
||||
##
|
||||
resourcesPreset: "micro"
|
||||
## @param speaker.frr.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads)
|
||||
## Example:
|
||||
## resources:
|
||||
## requests:
|
||||
## cpu: 2
|
||||
## memory: 512Mi
|
||||
## limits:
|
||||
## cpu: 3
|
||||
## memory: 1024Mi
|
||||
##
|
||||
resources: {}
|
||||
## Configure Container Security Context
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
|
||||
## @param speaker.frr.containerSecurityContext.enabled Enabled Speaker containers' Security Context
|
||||
## @param speaker.frr.containerSecurityContext.capabilities.add [array] Add capabilities for the securityContext
|
||||
## @param speaker.frr.containerSecurityContext.runAsUser Set containers' Security Context runAsUser
|
||||
## @param speaker.frr.containerSecurityContext.runAsGroup Set containers' Security Context runAsGroup
|
||||
containerSecurityContext:
|
||||
enabled: true
|
||||
runAsUser: 0
|
||||
runAsGroup: 0
|
||||
capabilities:
|
||||
add:
|
||||
- NET_ADMIN
|
||||
- NET_RAW
|
||||
- SYS_ADMIN
|
||||
- NET_BIND_SERVICE
|
||||
## @param speaker.frr.containerPorts.metrics HTTP Metrics Endpoint
|
||||
##
|
||||
containerPorts:
|
||||
metrics: 7473
|
||||
## @section FRR Speaker Prometheus metrics export
|
||||
metrics:
|
||||
## Prometheus Exporter service parameters
|
||||
##
|
||||
service:
|
||||
## @param speaker.frr.metrics.service.port Prometheus metrics service port
|
||||
##
|
||||
port: 7473
|
||||
## @param speaker.frr.metrics.service.annotations [object] Annotations for the Prometheus Exporter service service
|
||||
##
|
||||
annotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "7473"
|
||||
prometheus.io/path: "/metrics"
|
||||
## Prometheus Operator service monitors
|
||||
##
|
||||
serviceMonitor:
|
||||
## @param speaker.frr.metrics.serviceMonitor.enabled Enable support for Prometheus Operator
|
||||
##
|
||||
enabled: false
|
||||
## @param speaker.frr.metrics.serviceMonitor.namespace Namespace which Prometheus is running in
|
||||
## e.g:
|
||||
## namespace: monitoring
|
||||
##
|
||||
namespace: ""
|
||||
## @param speaker.frr.metrics.serviceMonitor.jobLabel Job label for scrape target
|
||||
##
|
||||
jobLabel: "app.kubernetes.io/name"
|
||||
## @param speaker.frr.metrics.serviceMonitor.interval Scrape interval. If not set, the Prometheus default scrape interval is used
|
||||
##
|
||||
interval: ""
|
||||
## @param speaker.frr.metrics.serviceMonitor.scrapeTimeout Timeout after which the scrape is ended
|
||||
## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
|
||||
##
|
||||
scrapeTimeout: ""
|
||||
## @param speaker.frr.metrics.serviceMonitor.metricRelabelings Specify additional relabeling of metrics
|
||||
##
|
||||
metricRelabelings: []
|
||||
## @param speaker.frr.metrics.serviceMonitor.relabelings Specify general relabeling
|
||||
##
|
||||
relabelings: []
|
||||
## @param speaker.frr.metrics.serviceMonitor.selector ServiceMonitor selector labels
|
||||
## ref: https://github.com/bitnami/charts/tree/main/bitnami/prometheus-operator#prometheus-configuration
|
||||
##
|
||||
## selector:
|
||||
## prometheus: my-prometheus
|
||||
##
|
||||
selector: {}
|
||||
## @param speaker.frr.metrics.serviceMonitor.labels Extra labels for the ServiceMonitor
|
||||
##
|
||||
labels: {}
|
||||
## @param speaker.frr.metrics.serviceMonitor.honorLabels honorLabels chooses the metric's labels on collisions with target labels
|
||||
##
|
||||
honorLabels: false
|
||||
|
||||
## Liveness probe values
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
|
||||
## @param speaker.frr.livenessProbe.enabled Enable livenessProbe
|
||||
## @param speaker.frr.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe
|
||||
## @param speaker.frr.livenessProbe.periodSeconds Period seconds for livenessProbe
|
||||
## @param speaker.frr.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe
|
||||
## @param speaker.frr.livenessProbe.failureThreshold Failure threshold for livenessProbe
|
||||
## @param speaker.frr.livenessProbe.successThreshold Success threshold for livenessProbe
|
||||
##
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
failureThreshold: 3
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 1
|
||||
## Readiness probe values
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
|
||||
## @param speaker.frr.readinessProbe.enabled Enable readinessProbe
|
||||
## @param speaker.frr.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe
|
||||
## @param speaker.frr.readinessProbe.periodSeconds Period seconds for readinessProbe
|
||||
## @param speaker.frr.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe
|
||||
## @param speaker.frr.readinessProbe.failureThreshold Failure threshold for readinessProbe
|
||||
## @param speaker.frr.readinessProbe.successThreshold Success threshold for readinessProbe
|
||||
##
|
||||
readinessProbe:
|
||||
enabled: true
|
||||
failureThreshold: 3
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 1
|
||||
## Startup probe values
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
|
||||
## @param speaker.frr.startupProbe.enabled Enable startupProbe
|
||||
## @param speaker.frr.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe
|
||||
## @param speaker.frr.startupProbe.periodSeconds Period seconds for startupProbe
|
||||
## @param speaker.frr.startupProbe.timeoutSeconds Timeout seconds for startupProbe
|
||||
## @param speaker.frr.startupProbe.failureThreshold Failure threshold for startupProbe
|
||||
## @param speaker.frr.startupProbe.successThreshold Success threshold for startupProbe
|
||||
##
|
||||
startupProbe:
|
||||
enabled: true
|
||||
failureThreshold: 3
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 1
|
||||
## @param speaker.frr.customStartupProbe Custom liveness probe for the Web component
|
||||
##
|
||||
customStartupProbe: {}
|
||||
## @param speaker.frr.customLivenessProbe Custom liveness probe for the Web component
|
||||
##
|
||||
customLivenessProbe: {}
|
||||
## @param speaker.frr.customReadinessProbe Custom readiness probe for the Web component
|
||||
##
|
||||
customReadinessProbe: {}
|
||||
## @section Speaker Prometheus metrics export
|
||||
metrics:
|
||||
## @param speaker.metrics.enabled Enable the export of Prometheus metrics
|
||||
|
||||
Reference in New Issue
Block a user