124 lines
4.0 KiB
YAML
124 lines
4.0 KiB
YAML
apiVersion: apps/v1beta1
|
|
kind: StatefulSet
|
|
metadata:
|
|
name: maas-region
|
|
spec:
|
|
serviceName: "{{ .Values.ui_service_name }}"
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: maas-region
|
|
annotations:
|
|
pod.beta.kubernetes.io/init-containers: '[
|
|
{
|
|
"name": "init",
|
|
"image": "{{ .Values.images.maas_region }}",
|
|
"imagePullPolicy": "{{ .Values.images.pull_policy }}",
|
|
"command": ["bash", "/tmp/start.sh"],
|
|
"volumeMounts": [
|
|
{
|
|
"name": "maas-config",
|
|
"mountPath": "/etc/maas/"
|
|
},
|
|
{
|
|
"name": "postgresql-config",
|
|
"mountPath": "/etc/postgresql"
|
|
},
|
|
{
|
|
"name": "postgresql-data",
|
|
"mountPath": "/var/lib/postgresql"
|
|
},
|
|
{
|
|
"name": "postgresql-run",
|
|
"mountPath": "/var/run/postgresql"
|
|
},
|
|
{
|
|
"name": "startsh",
|
|
"mountPath": "/tmp/start.sh",
|
|
"subPath": "start.sh"
|
|
},
|
|
{
|
|
"name": "maasregionpostinst",
|
|
"mountPath": "/var/lib/dpkg/info/maas-region-controller.postinst",
|
|
"subPath": "maas-region-controller.postinst"
|
|
},
|
|
{
|
|
"name": "postgresql-defaults",
|
|
"mountPath": "/etc/dbconfig-common/maas-region-controller.conf",
|
|
"subPath": "maas-region-controller.conf"
|
|
}
|
|
]
|
|
}
|
|
]'
|
|
spec:
|
|
nodeSelector:
|
|
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
|
|
containers:
|
|
- name: maas-region
|
|
image: {{ .Values.images.maas_region }}
|
|
imagePullPolicy: {{ .Values.images.pull_policy }}
|
|
{{- if .Values.resources.enabled }}
|
|
resources:
|
|
limits:
|
|
cpu: {{ .Values.resources.maas_region.limits.cpu | quote }}
|
|
memory: {{ .Values.resources.maas_region.limits.memory | quote }}
|
|
requests:
|
|
cpu: {{ .Values.resources.maas_region.requests.cpu | quote }}
|
|
memory: {{ .Values.resources.maas_region.requests.memory | quote}}
|
|
{{- end }}
|
|
ports:
|
|
- name: region-ui
|
|
containerPort: {{ .Values.network.port.region_container }}
|
|
- name: postgresql
|
|
containerPort: {{ .Values.network.port.db_service }}
|
|
readinessProbe:
|
|
tcpSocket:
|
|
port: {{ .Values.network.port.region_container }}
|
|
securityContext:
|
|
privileged: true
|
|
volumeMounts:
|
|
- name: postgresql-data
|
|
mountPath: /var/lib/postgresql
|
|
- name: postgresql-run
|
|
mountPath: /var/run/postgresql
|
|
- name: maas-lib
|
|
mountPath: /var/lib/maas
|
|
- name: maas-region-secret
|
|
mountPath: /var/lib/maas/secret
|
|
subPath: secret
|
|
- name: postgresql-config
|
|
mountPath: /etc/postgresql
|
|
- name: maas-dns-config
|
|
mountPath: /etc/bind/named.conf.options
|
|
subPath: named.conf.options
|
|
- name: maas-config
|
|
mountPath: /etc/maas/regiond.conf
|
|
subPath: regiond.conf
|
|
volumes:
|
|
- name: postgresql-data
|
|
hostPath:
|
|
path: /var/lib/postgresql
|
|
- name: postgresql-run
|
|
emptyDir: {}
|
|
- name: postgresql-config
|
|
emptyDir: {}
|
|
- name: maas-lib
|
|
emptyDir: {}
|
|
- name: maas-region-secret
|
|
configMap:
|
|
name: maas-etc
|
|
- name: maas-config
|
|
emptyDir: {}
|
|
- name: maas-dns-config
|
|
configMap:
|
|
name: maas-etc
|
|
- name: postgresql-defaults
|
|
configMap:
|
|
name: maas-etc
|
|
- name: startsh
|
|
configMap:
|
|
name: maas-bin
|
|
- name: maasregionpostinst
|
|
configMap:
|
|
name: maas-bin
|