Skip to content

Commit

Permalink
add configurable ceph users
Browse files Browse the repository at this point in the history
  • Loading branch information
crabique committed Mar 28, 2023
1 parent 7f41268 commit 241eca4
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
15 changes: 13 additions & 2 deletions charts/benji/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,20 @@ Create hostname:port pair pointing to the Prometheus pushgateway
{{- end -}}

{{/*
ceph client admin keyring
ceph conf
*/}}
{{- define "benji.ceph-conf" -}}
[global]
mon_host = {{ .Values.ceph.mon_hosts }}

[client.{{ .Values.ceph.user | default "admin" }}]
keyring = /etc/ceph/keyring
{{ end -}}

{{/*
ceph client keyring
*/}}
{{- define "benji.ceph-keyring" -}}
[client.admin]
[client.{{ .Values.ceph.user | default "admin" }}]
key = {{ .Values.ceph.key }}
{{ end -}}
4 changes: 4 additions & 0 deletions charts/benji/templates/cron-jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ spec:
{{- if $.Values.pushgateway.enabled }}
- name: PROM_PUSH_GATEWAY
value: "{{ include "benji.pushgateway" $ }}"
{{- end }}
{{- with $.Values.ceph.user }}
- name: CEPH_ARGS
value: "--name client.{{ . }}"
{{- end }}
- name: TZ
value: "{{ $.Values.timeZone }}"
Expand Down
4 changes: 4 additions & 0 deletions charts/benji/templates/maint-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ spec:
{{- if .Values.pushgateway.enabled }}
- name: PROM_PUSH_GATEWAY
value: "{{ include "benji.pushgateway" $ }}"
{{- end }}
{{- with .Values.ceph.user }}
- name: CEPH_ARGS
value: "--name client.{{ . }}"
{{- end }}
- name: TZ
value: "{{ .Values.timeZone }}"
Expand Down
2 changes: 1 addition & 1 deletion charts/benji/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,5 +181,5 @@ pushgateway:
nameOverride: pushgateway
service:
port: 9091

ceph: {}

0 comments on commit 241eca4

Please sign in to comment.