Added new ansible role `roles/uyuni/` to enable configuration and management of Uyuni satellite server infrastructure.
98 lines
2.9 KiB
YAML
98 lines
2.9 KiB
YAML
{{- if gt (default .Values.coco.replicas 0 | int) 0 }}
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/component: coco-attestation
|
|
app.kubernetes.io/part-of: uyuni
|
|
name: coco-attestation
|
|
namespace: "{{ .Release.Namespace }}"
|
|
spec:
|
|
replicas: {{ default .Values.coco.replicas 0 | int }}
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/component: coco-attestation
|
|
app.kubernetes.io/part-of: uyuni
|
|
strategy:
|
|
type: Recreate
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/component: coco-attestation
|
|
app.kubernetes.io/part-of: uyuni
|
|
spec:
|
|
{{- include "uyuni.nodePlacement" (dict "global" .Values.placement "local" .Values.coco) | nindent 6 }}
|
|
containers:
|
|
- env:
|
|
- name: database_user
|
|
valueFrom:
|
|
secretKeyRef:
|
|
key: username
|
|
name: db-credentials
|
|
optional: false
|
|
- name: database_password
|
|
valueFrom:
|
|
secretKeyRef:
|
|
key: password
|
|
name: db-credentials
|
|
optional: false
|
|
- name: database_host
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
key: db_host
|
|
name: uyuni-config
|
|
optional: false
|
|
- name: database_port
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
key: db_port
|
|
name: uyuni-config
|
|
optional: false
|
|
- name: database_name
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
key: db_name
|
|
name: uyuni-config
|
|
optional: false
|
|
image: {{ include "uyuni.image" (dict "name" "server-attestation" "global" . "local" .Values.coco) }}
|
|
imagePullPolicy: {{ .Values.pullPolicy }}
|
|
name: coco
|
|
{{- if .Values.registrySecret }}
|
|
imagePullSecrets:
|
|
- name: {{ .Values.registrySecret }}
|
|
{{- end }}
|
|
initContainers:
|
|
- command:
|
|
- sh
|
|
- -c
|
|
- |2
|
|
until pg_isready -U $MANAGER_USER -h $MANAGER_DB_HOST -p $MANAGER_DB_PORT -d $MANAGER_DB_NAME; do
|
|
sleep 60
|
|
done
|
|
env:
|
|
- name: MANAGER_DB_HOST
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
key: db_host
|
|
name: uyuni-config
|
|
optional: false
|
|
- name: MANAGER_DB_PORT
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
key: db_port
|
|
name: uyuni-config
|
|
optional: false
|
|
- name: MANAGER_DB_NAME
|
|
value: susemanager
|
|
- name: MANAGER_USER
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
key: db_name
|
|
name: uyuni-config
|
|
optional: false
|
|
image: {{ include "uyuni.image" (dict "name" "server" "global" . "local" .Values.server) }}
|
|
imagePullPolicy: {{ .Values.pullPolicy }}
|
|
name: db-waiter
|
|
{{- end }}
|
|
|