Working on the RadosGW chart
This commit is contained in:
parent
0c01b9f482
commit
f66a90a9fd
6 changed files with 55 additions and 13 deletions
|
@ -43,3 +43,19 @@ app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
|||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Generate a CEPH keyring file, suitable for base64 encoding
|
||||
*/}}
|
||||
{{- define "radosgw.keyringFile" -}}
|
||||
[client.{{ .Client }}]
|
||||
key = {{ .Key }}
|
||||
{{- end --}
|
||||
|
||||
{{/*
|
||||
Helper for joining a list
|
||||
*/}}
|
||||
{{- define "helm-toolkit.utils.joinListWithComma" -}}
|
||||
{{- $local := dict "first" true -}}
|
||||
{{- range $k, $v := . -}}{{- if not $local.first -}},{{- end -}}{{- $v -}}{{- $_ := set $local "first" false -}}{{- end -}}
|
||||
{{- end -}}
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "radosgw.fullname" . }}
|
||||
labels:
|
||||
{{ include "radosgw.labels" . | indent 4 }}
|
||||
data:
|
||||
ceph.conf: |-
|
||||
[global]
|
||||
mon_host = {{ include "helm-toolkit.utils.joinListWithComma" .Values.monHosts }}
|
||||
rgw frontends = beast port=8008 endpoint=0.0.0.0:8080
|
||||
rgw dns name = {{ .Values.dnsName }}
|
||||
{{- if .Values.extraCephConf }}
|
||||
{{ .Values.extraCephConf | indent 4 }}
|
||||
{{- end -}}
|
|
@ -22,15 +22,11 @@ spec:
|
|||
{{- end }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- range .Values.ingress.hosts }}
|
||||
- host: {{ .host | quote }}
|
||||
- host: {{ .Values.dnsName | quote }}
|
||||
http:
|
||||
paths:
|
||||
{{- range .paths }}
|
||||
- path: {{ . }}
|
||||
- path: /
|
||||
backend:
|
||||
serviceName: {{ $fullName }}
|
||||
servicePort: http
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "radosgw.fullname" . }}
|
||||
labels:
|
||||
{{ include "radosgw.labels" . | indent 4 }}
|
||||
data:
|
||||
client.admin.keyring: {{ include "radosgw.keyringFile" (dict "Client" "admin" "Key" .Values.adminKey) | b64enc }}
|
||||
bootstrap-rgw.keyring: {{ include "radosgw.keyringFile" (dict "Client" "bootstrap-rgw" "Key" .Values.bootstrapKey) | b64enc }}
|
|
@ -12,6 +12,9 @@ spec:
|
|||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
checksum/config: {{ include (print $.Template.BasePath "/config.yaml") . | sha256sum }}
|
||||
checksum/secrets: {{ include (print $.Template.BasePath "/keyring.yaml") . | sha256sum }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "radosgw.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
|
|
|
@ -13,6 +13,14 @@ imagePullSecrets: []
|
|||
nameOverride: ""
|
||||
fullnameOverride: ""
|
||||
|
||||
# monHosts: []
|
||||
dnsName: chart-example.local
|
||||
|
||||
# extraCephConf: |-
|
||||
|
||||
# adminKey:
|
||||
# bootstrapKey:
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 8080
|
||||
|
@ -22,9 +30,6 @@ ingress:
|
|||
annotations: {}
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
# kubernetes.io/tls-acme: "true"
|
||||
hosts:
|
||||
- host: chart-example.local
|
||||
paths: []
|
||||
|
||||
tls: []
|
||||
# - secretName: chart-example-tls
|
||||
|
@ -32,10 +37,6 @@ ingress:
|
|||
# - chart-example.local
|
||||
|
||||
resources: {}
|
||||
# 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:'.
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
|
Loading…
Reference in a new issue