Skip to content

Commit

Permalink
chart: Expose the speaker's name as env variable and update rbac config
Browse files Browse the repository at this point in the history
Use k8s downward api to expose speaker pod name as env variable.

Update the rbac config to allow the speaker to get the speaker pod.

With these modification, metallb installation from helm can work correctly.

Signed-off-by: lwabish <wubw@pku.edu.cn>
  • Loading branch information
lwabish committed May 19, 2024
1 parent efecd4e commit 639dbb1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/metallb/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ metadata:
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["list"]
verbs: ["list", "get"]
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get", "list", "watch"]
Expand Down
4 changes: 4 additions & 0 deletions charts/metallb/templates/speaker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,10 @@ spec:
- name: METALLB_BGP_TYPE
value: frr-k8s
{{- end }}
- name: METALLB_POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
ports:
- name: monitoring
containerPort: {{ .Values.prometheus.metricsPort }}
Expand Down

0 comments on commit 639dbb1

Please sign in to comment.