| {{/* |
| # Copyright 2019-present Open Networking Foundation |
| |
| # SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0 |
| */}} |
| |
| {{- if .Values.config.hss.deploy }} |
| {{- if .Values.config.hss.bootstrap }} |
| --- |
| apiVersion: batch/v1 |
| kind: Job |
| metadata: |
| name: job-hss-bootstrap |
| labels: |
| {{ tuple "hss" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| spec: |
| template: |
| metadata: |
| {{ tuple "hss" . | include "omec-control-plane.metadata_labels" | indent 8 }} |
| spec: |
| {{- if .Values.nodeSelectors.enabled }} |
| nodeSelector: |
| {{ .Values.nodeSelectors.hss.label }}: {{ .Values.nodeSelectors.hss.value }} |
| {{- end }} |
| restartPolicy: OnFailure |
| serviceAccountName: hss |
| initContainers: |
| - name: job-bootstrap-dep-check |
| image: {{ .Values.images.tags.depCheck | quote }} |
| imagePullPolicy: {{ .Values.images.pullPolicy }} |
| securityContext: |
| allowPrivilegeEscalation: false |
| readOnlyRootFilesystem: false |
| runAsUser: 0 |
| env: |
| - name: NAMESPACE |
| valueFrom: |
| fieldRef: |
| apiVersion: v1 |
| fieldPath: metadata.namespace |
| - name: PATH |
| value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/ |
| - name: COMMAND |
| value: "echo done" |
| - name: DEPENDENCY_JOBS |
| value: job-hss-db-sync |
| command: |
| - kubernetes-entrypoint |
| volumeMounts: |
| [] |
| containers: |
| - name: hss-bootstrap |
| image: {{ .Values.images.tags.hssdb }} |
| imagePullPolicy: {{ .Values.images.pullPolicy }} |
| command: ["/opt/c3po/hss/hss-bootstrap.sh"] |
| volumeMounts: |
| - name: hss-script |
| mountPath: /opt/c3po/hss/hss-bootstrap.sh |
| subPath: hss-bootstrap.sh |
| volumes: |
| - name: hss-script |
| configMap: |
| name: hss |
| defaultMode: 493 |
| {{- end }} |
| {{- end }} |