kolla-kubernetes/helm/microservice/ceph-admin-pod/templates/ceph-admin-pod.yaml

65 lines
2.3 KiB
YAML

{{- $resourceName := "ceph-admin" }}
{{- $searchPath := ":global.kolla.ceph.admin.pod:global.kolla.ceph.admin.all:global.kolla.ceph.all:global.kolla.all" }}
{{- $c := dict "searchPath" $searchPath "Values" .Values }}
{{- $_ := set $c "contName" "ceph-mon" }}
{{- $_ := set $c "imageName" "image_full" }}
{{- $_ := set $c "tagName" "image_tag" }}
{{- $imageFull := include "kolla_build_image_full" $c }}
{{- $imagePullPolicy := include "kolla_val_get_str" (dict "key" "image_pull_policy" "searchPath" $searchPath "Values" .Values ) }}
{{- $selectorKey := include "kolla_val_get_str" (dict "key" "selector_key" "searchPath" $searchPath "Values" .Values ) }}
{{- $selectorValue := include "kolla_val_get_str" (dict "key" "selector_value" "searchPath" $searchPath "Values" .Values ) }}
{{- $netHostTrue := true }}
{{- $podTypeBootstrap := false }}
{{- with $env := dict "netHostTrue" $netHostTrue "podTypeBootstrap" false "resourceName" $resourceName "Values" .Values "Release" .Release "searchPath" $searchPath }}
apiVersion: v1
kind: Pod
metadata:
name: ceph-admin
spec:
dnsPolicy: ClusterFirstWithHostNet
hostNetwork: True
hostPID: True
nodeSelector:
{{ $selectorKey }}: {{ $selectorValue | quote }}
restartPolicy: Never
containers:
- image: "{{ $imageFull }}"
imagePullPolicy: {{ $imagePullPolicy | quote }}
name: main
command:
- /bin/bash
- -xec
- |
modprobe rbd;
while true; do sleep 1000; done
securityContext:
privileged: true
volumeMounts:
{{- include "common_volume_mounts" $env | indent 8 }}
- mountPath: /etc/ceph/ceph.conf
name: ceph-conf
readOnly: true
subPath: ceph.conf
- mountPath: /etc/ceph/ceph.client.admin.keyring
subPath: data
name: ceph-client-admin-keyring
- mountPath: /dev
name: host-dev
- mountPath: /lib/modules
name: lib-modules
volumes:
{{- include "common_volumes" . | indent 4 }}
- name: ceph-conf
configMap:
name: ceph-conf
- name: host-dev
hostPath:
path: /dev
- name: ceph-client-admin-keyring
secret:
secretName: ceph-client-admin-keyring
- name: lib-modules
hostPath:
path: /lib/modules
{{- end }}