openstack-helm/maas/templates/deploy-region.yaml
Larry Rensing 9bc0183ba0 point MaaS to postgresql instance within cluster (#199)
* Initial postgresql chart

* maas/postgres wip

* updated readme for postgresql

* Edit service dependency
2017-02-23 20:01:48 -05:00

111 lines
3.7 KiB
YAML

# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
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": "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 }}
readinessProbe:
tcpSocket:
port: {{ .Values.network.port.region_container }}
securityContext:
privileged: true
volumeMounts:
- name: maas-lib
mountPath: /var/lib/maas
- name: maas-region-secret
mountPath: /var/lib/maas/secret
subPath: secret
- 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: 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