Soft pod anti-affinity for all pods

This PS adds soft anti-affinity to all pods in OS-H. By doing so
resiliancy is improved by attempting to ensure that pods are created
on seperate nodes.

Change-Id: I0c1092498f7a1e44218ef785ca3f73fa9f49819c
This commit is contained in:
Pete Birley 2017-07-01 12:00:56 -05:00
parent 039fa15e95
commit c5bbc97ab7
76 changed files with 514 additions and 137 deletions

View File

@ -1,3 +1,5 @@
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
# You may obtain a copy of the License at # You may obtain a copy of the License at
@ -9,11 +11,11 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
{{- $envAll := . }} {{- $envAll := . }}
{{- $dependencies := .Values.dependencies.api }} {{- $dependencies := .Values.dependencies.api }}
{{- $mounts_barbican_api := .Values.mounts.barbican_api.barbican_api }} {{- $mounts_barbican_api := .Values.mounts.barbican_api.barbican_api }}
{{- $mounts_barbican_api_init := .Values.mounts.barbican_api.init_container }} {{- $mounts_barbican_api_init := .Values.mounts.barbican_api.init_container }}
---
apiVersion: apps/v1beta1 apiVersion: apps/v1beta1
kind: Deployment kind: Deployment
metadata: metadata:
@ -31,11 +33,13 @@ spec:
template: template:
metadata: metadata:
labels: labels:
app: barbican-api {{ tuple $envAll "barbican" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
spec: spec:
affinity:
{{ tuple $envAll "barbican" "api" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers: initContainers:

View File

@ -1,3 +1,18 @@
# 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.
{{- $envAll := . }}
---
apiVersion: policy/v1beta1 apiVersion: policy/v1beta1
kind: PodDisruptionBudget kind: PodDisruptionBudget
metadata: metadata:
@ -6,4 +21,4 @@ spec:
minAvailable: {{ .Values.pod_disruption_budget.api.min_available }} minAvailable: {{ .Values.pod_disruption_budget.api.min_available }}
selector: selector:
matchLabels: matchLabels:
app: barbican-api {{ tuple $envAll "barbican" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }}

View File

@ -1,3 +1,5 @@
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
# You may obtain a copy of the License at # You may obtain a copy of the License at
@ -9,7 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
{{- $envAll := . }}
---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@ -22,7 +25,7 @@ spec:
nodePort: .Values.network.api.node_port.port nodePort: .Values.network.api.node_port.port
{{ end }} {{ end }}
selector: selector:
app: barbican-api {{ tuple $envAll "barbican" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
{{ if .Values.network.api.node_port.enabled }} {{ if .Values.network.api.node_port.enabled }}
type: NodePort type: NodePort
{{ end }} {{ end }}

View File

@ -15,7 +15,7 @@
{{- $dependencies := .Values.dependencies.api }} {{- $dependencies := .Values.dependencies.api }}
{{- $mounts_cinder_api := .Values.mounts.cinder_api.cinder_api }} {{- $mounts_cinder_api := .Values.mounts.cinder_api.cinder_api }}
{{- $mounts_cinder_api_init := .Values.mounts.cinder_api.init_container }} {{- $mounts_cinder_api_init := .Values.mounts.cinder_api.init_container }}
---
apiVersion: apps/v1beta1 apiVersion: apps/v1beta1
kind: Deployment kind: Deployment
metadata: metadata:
@ -33,11 +33,13 @@ spec:
template: template:
metadata: metadata:
labels: labels:
app: cinder-api {{ tuple $envAll "cinder" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
spec: spec:
affinity:
{{ tuple $envAll "cinder" "api" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
terminationGracePeriodSeconds: {{ .Values.termination_grace_period.api.timeout | default "30" }} terminationGracePeriodSeconds: {{ .Values.termination_grace_period.api.timeout | default "30" }}

View File

@ -15,7 +15,7 @@
{{- $dependencies := .Values.dependencies.backup }} {{- $dependencies := .Values.dependencies.backup }}
{{- $mounts_cinder_backup := .Values.mounts.cinder_backup.cinder_backup }} {{- $mounts_cinder_backup := .Values.mounts.cinder_backup.cinder_backup }}
{{- $mounts_cinder_backup_init := .Values.mounts.cinder_backup.init_container }} {{- $mounts_cinder_backup_init := .Values.mounts.cinder_backup.init_container }}
---
apiVersion: apps/v1beta1 apiVersion: apps/v1beta1
kind: Deployment kind: Deployment
metadata: metadata:
@ -33,11 +33,13 @@ spec:
template: template:
metadata: metadata:
labels: labels:
app: cinder-backup {{ tuple $envAll "cinder" "backup" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
spec: spec:
affinity:
{{ tuple $envAll "cinder" "backup" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers: initContainers:

View File

@ -15,7 +15,7 @@
{{- $dependencies := .Values.dependencies.scheduler }} {{- $dependencies := .Values.dependencies.scheduler }}
{{- $mounts_cinder_scheduler := .Values.mounts.cinder_scheduler.cinder_scheduler }} {{- $mounts_cinder_scheduler := .Values.mounts.cinder_scheduler.cinder_scheduler }}
{{- $mounts_cinder_scheduler_init := .Values.mounts.cinder_scheduler.init_container }} {{- $mounts_cinder_scheduler_init := .Values.mounts.cinder_scheduler.init_container }}
---
apiVersion: apps/v1beta1 apiVersion: apps/v1beta1
kind: Deployment kind: Deployment
metadata: metadata:
@ -33,11 +33,13 @@ spec:
template: template:
metadata: metadata:
labels: labels:
app: cinder-scheduler {{ tuple $envAll "cinder" "scheduler" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
spec: spec:
affinity:
{{ tuple $envAll "cinder" "scheduler" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers: initContainers:

View File

@ -15,7 +15,7 @@
{{- $dependencies := .Values.dependencies.volume }} {{- $dependencies := .Values.dependencies.volume }}
{{- $mounts_cinder_volume := .Values.mounts.cinder_volume.cinder_volume }} {{- $mounts_cinder_volume := .Values.mounts.cinder_volume.cinder_volume }}
{{- $mounts_cinder_volume_init := .Values.mounts.cinder_volume.init_container }} {{- $mounts_cinder_volume_init := .Values.mounts.cinder_volume.init_container }}
---
apiVersion: apps/v1beta1 apiVersion: apps/v1beta1
kind: Deployment kind: Deployment
metadata: metadata:
@ -33,11 +33,13 @@ spec:
template: template:
metadata: metadata:
labels: labels:
app: cinder-volume {{ tuple $envAll "cinder" "volume" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
spec: spec:
affinity:
{{ tuple $envAll "cinder" "volume" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers: initContainers:

View File

@ -1,3 +1,18 @@
# 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.
{{- $envAll := . }}
---
apiVersion: policy/v1beta1 apiVersion: policy/v1beta1
kind: PodDisruptionBudget kind: PodDisruptionBudget
metadata: metadata:
@ -6,4 +21,4 @@ spec:
minAvailable: {{ .Values.pod_disruption_budget.api.min_available }} minAvailable: {{ .Values.pod_disruption_budget.api.min_available }}
selector: selector:
matchLabels: matchLabels:
app: cinder-api {{ tuple $envAll "cinder" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }}

View File

@ -11,7 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
{{- $envAll := . }}
---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@ -24,7 +25,7 @@ spec:
nodePort: {{ .Values.network.api.node_port.port }} nodePort: {{ .Values.network.api.node_port.port }}
{{ end }} {{ end }}
selector: selector:
app: cinder-api {{ tuple $envAll "cinder" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
{{ if .Values.network.api.node_port.enabled }} {{ if .Values.network.api.node_port.enabled }}
type: NodePort type: NodePort
{{ end }} {{ end }}

View File

@ -16,6 +16,7 @@
{{- $dependencies := .Values.dependencies.api }} {{- $dependencies := .Values.dependencies.api }}
{{- $mounts_glance_api := .Values.mounts.glance_api.glance_api }} {{- $mounts_glance_api := .Values.mounts.glance_api.glance_api }}
{{- $mounts_glance_api_init := .Values.mounts.glance_api.init_container }} {{- $mounts_glance_api_init := .Values.mounts.glance_api.init_container }}
---
apiVersion: apps/v1beta1 apiVersion: apps/v1beta1
kind: Deployment kind: Deployment
metadata: metadata:
@ -33,11 +34,13 @@ spec:
template: template:
metadata: metadata:
labels: labels:
app: glance-api {{ tuple $envAll "glance" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
spec: spec:
affinity:
{{ tuple $envAll "glance" "api" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
terminationGracePeriodSeconds: {{ .Values.termination_grace_period.api.timeout | default "600" }} terminationGracePeriodSeconds: {{ .Values.termination_grace_period.api.timeout | default "600" }}

View File

@ -16,6 +16,7 @@
{{- $dependencies := .Values.dependencies.registry }} {{- $dependencies := .Values.dependencies.registry }}
{{- $mounts_glance_registry := .Values.mounts.glance_registry.glance_registry }} {{- $mounts_glance_registry := .Values.mounts.glance_registry.glance_registry }}
{{- $mounts_glance_registry_init := .Values.mounts.glance_registry.init_container }} {{- $mounts_glance_registry_init := .Values.mounts.glance_registry.init_container }}
---
apiVersion: apps/v1beta1 apiVersion: apps/v1beta1
kind: Deployment kind: Deployment
metadata: metadata:
@ -25,11 +26,13 @@ spec:
template: template:
metadata: metadata:
labels: labels:
app: glance-registry {{ tuple $envAll "glance" "registry" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
spec: spec:
affinity:
{{ tuple $envAll "glance" "registry" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
terminationGracePeriodSeconds: {{ .Values.termination_grace_period.registry.timeout | default "600" }} terminationGracePeriodSeconds: {{ .Values.termination_grace_period.registry.timeout | default "600" }}

View File

@ -1,3 +1,18 @@
# 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.
{{- $envAll := . }}
---
apiVersion: policy/v1beta1 apiVersion: policy/v1beta1
kind: PodDisruptionBudget kind: PodDisruptionBudget
metadata: metadata:
@ -6,4 +21,4 @@ spec:
minAvailable: {{ .Values.pod_disruption_budget.api.min_available }} minAvailable: {{ .Values.pod_disruption_budget.api.min_available }}
selector: selector:
matchLabels: matchLabels:
app: glance-api {{ tuple $envAll "glance" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }}

View File

@ -1,3 +1,18 @@
# 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.
{{- $envAll := . }}
---
apiVersion: policy/v1beta1 apiVersion: policy/v1beta1
kind: PodDisruptionBudget kind: PodDisruptionBudget
metadata: metadata:
@ -6,4 +21,4 @@ spec:
minAvailable: {{ .Values.pod_disruption_budget.registry.min_available }} minAvailable: {{ .Values.pod_disruption_budget.registry.min_available }}
selector: selector:
matchLabels: matchLabels:
app: glance-registry {{ tuple $envAll "glance" "registry" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }}

View File

@ -11,7 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
{{- $envAll := . }}
---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@ -24,7 +25,7 @@ spec:
nodePort: .Values.network.api.node_port.port nodePort: .Values.network.api.node_port.port
{{ end }} {{ end }}
selector: selector:
app: glance-api {{ tuple $envAll "glance" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
{{ if .Values.network.api.node_port.enabled }} {{ if .Values.network.api.node_port.enabled }}
type: NodePort type: NodePort
{{ end }} {{ end }}

View File

@ -11,7 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
{{- $envAll := . }}
---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@ -24,7 +25,7 @@ spec:
nodePort: {{ .Values.network.registry.node_port.port }} nodePort: {{ .Values.network.registry.node_port.port }}
{{ end }} {{ end }}
selector: selector:
app: glance-registry {{ tuple $envAll "glance" "registry" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
{{ if .Values.network.registry.node_port.enabled }} {{ if .Values.network.registry.node_port.enabled }}
type: NodePort type: NodePort
{{ end }} {{ end }}

View File

@ -16,6 +16,7 @@
{{- $dependencies := .Values.dependencies.api }} {{- $dependencies := .Values.dependencies.api }}
{{- $mounts_heat_api := .Values.mounts.heat_api.heat_api }} {{- $mounts_heat_api := .Values.mounts.heat_api.heat_api }}
{{- $mounts_heat_api_init := .Values.mounts.heat_api.init_container }} {{- $mounts_heat_api_init := .Values.mounts.heat_api.init_container }}
---
apiVersion: apps/v1beta1 apiVersion: apps/v1beta1
kind: Deployment kind: Deployment
metadata: metadata:
@ -33,11 +34,13 @@ spec:
template: template:
metadata: metadata:
labels: labels:
app: heat-api {{ tuple $envAll "heat" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
spec: spec:
affinity:
{{ tuple $envAll "heat" "api" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
terminationGracePeriodSeconds: {{ .Values.termination_grace_period.api.timeout | default "30" }} terminationGracePeriodSeconds: {{ .Values.termination_grace_period.api.timeout | default "30" }}

View File

@ -16,6 +16,7 @@
{{- $dependencies := .Values.dependencies.cfn }} {{- $dependencies := .Values.dependencies.cfn }}
{{- $mounts_heat_cfn := .Values.mounts.heat_cfn.heat_cfn }} {{- $mounts_heat_cfn := .Values.mounts.heat_cfn.heat_cfn }}
{{- $mounts_heat_cfn_init := .Values.mounts.heat_cfn.init_container }} {{- $mounts_heat_cfn_init := .Values.mounts.heat_cfn.init_container }}
---
apiVersion: apps/v1beta1 apiVersion: apps/v1beta1
kind: Deployment kind: Deployment
metadata: metadata:
@ -33,11 +34,13 @@ spec:
template: template:
metadata: metadata:
labels: labels:
app: heat-cfn {{ tuple $envAll "heat" "cfn" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
spec: spec:
affinity:
{{ tuple $envAll "heat" "cfn" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
terminationGracePeriodSeconds: {{ .Values.termination_grace_period.cfn.timeout | default "30" }} terminationGracePeriodSeconds: {{ .Values.termination_grace_period.cfn.timeout | default "30" }}

View File

@ -16,6 +16,7 @@
{{- $dependencies := .Values.dependencies.cloudwatch }} {{- $dependencies := .Values.dependencies.cloudwatch }}
{{- $mounts_heat_cloudwatch := .Values.mounts.heat_cloudwatch.heat_cloudwatch }} {{- $mounts_heat_cloudwatch := .Values.mounts.heat_cloudwatch.heat_cloudwatch }}
{{- $mounts_heat_cloudwatch_init := .Values.mounts.heat_cloudwatch.init_container }} {{- $mounts_heat_cloudwatch_init := .Values.mounts.heat_cloudwatch.init_container }}
---
apiVersion: apps/v1beta1 apiVersion: apps/v1beta1
kind: Deployment kind: Deployment
metadata: metadata:
@ -33,11 +34,13 @@ spec:
template: template:
metadata: metadata:
labels: labels:
app: heat-cloudwatch {{ tuple $envAll "heat" "cloudwatch" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
spec: spec:
affinity:
{{ tuple $envAll "heat" "cloudwatch" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
terminationGracePeriodSeconds: {{ .Values.termination_grace_period.cloudwatch.timeout | default "30" }} terminationGracePeriodSeconds: {{ .Values.termination_grace_period.cloudwatch.timeout | default "30" }}

View File

@ -1,3 +1,18 @@
# 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.
{{- $envAll := . }}
---
apiVersion: policy/v1beta1 apiVersion: policy/v1beta1
kind: PodDisruptionBudget kind: PodDisruptionBudget
metadata: metadata:
@ -6,4 +21,4 @@ spec:
minAvailable: {{ .Values.pod_disruption_budget.api.min_available }} minAvailable: {{ .Values.pod_disruption_budget.api.min_available }}
selector: selector:
matchLabels: matchLabels:
app: heat-api {{ tuple $envAll "heat" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }}

View File

@ -1,3 +1,18 @@
# 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.
{{- $envAll := . }}
---
apiVersion: policy/v1beta1 apiVersion: policy/v1beta1
kind: PodDisruptionBudget kind: PodDisruptionBudget
metadata: metadata:
@ -6,4 +21,4 @@ spec:
minAvailable: {{ .Values.pod_disruption_budget.cfn.min_available }} minAvailable: {{ .Values.pod_disruption_budget.cfn.min_available }}
selector: selector:
matchLabels: matchLabels:
app: heat-cfn {{ tuple $envAll "heat" "cfn" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }}

View File

@ -1,3 +1,18 @@
# 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.
{{- $envAll := . }}
---
apiVersion: policy/v1beta1 apiVersion: policy/v1beta1
kind: PodDisruptionBudget kind: PodDisruptionBudget
metadata: metadata:
@ -6,4 +21,4 @@ spec:
minAvailable: {{ .Values.pod_disruption_budget.cloudwatch.min_available }} minAvailable: {{ .Values.pod_disruption_budget.cloudwatch.min_available }}
selector: selector:
matchLabels: matchLabels:
app: heat-cloudwatch {{ tuple $envAll "heat" "cloudwatch" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }}

View File

@ -11,7 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
{{- $envAll := . }}
---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@ -24,7 +25,7 @@ spec:
nodePort: {{ .Values.network.api.node_port.port }} nodePort: {{ .Values.network.api.node_port.port }}
{{ end }} {{ end }}
selector: selector:
app: heat-api {{ tuple $envAll "heat" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
{{ if .Values.network.api.node_port.enabled }} {{ if .Values.network.api.node_port.enabled }}
type: NodePort type: NodePort
{{ end }} {{ end }}

View File

@ -11,7 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
{{- $envAll := . }}
---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@ -24,7 +25,7 @@ spec:
nodePort: {{ .Values.network.cfn.node_port.port }} nodePort: {{ .Values.network.cfn.node_port.port }}
{{ end }} {{ end }}
selector: selector:
app: heat-cfn {{ tuple $envAll "heat" "cfn" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
{{ if .Values.network.cfn.node_port.enabled }} {{ if .Values.network.cfn.node_port.enabled }}
type: NodePort type: NodePort
{{ end }} {{ end }}

View File

@ -11,7 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
{{- $envAll := . }}
---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@ -24,7 +25,7 @@ spec:
nodePort: {{ .Values.network.cloudwatch.node_port.port }} nodePort: {{ .Values.network.cloudwatch.node_port.port }}
{{ end }} {{ end }}
selector: selector:
app: heat-cloudwatch {{ tuple $envAll "heat" "cloudwatch" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
{{ if .Values.network.cloudwatch.node_port.enabled }} {{ if .Values.network.cloudwatch.node_port.enabled }}
type: NodePort type: NodePort
{{ end }} {{ end }}

View File

@ -16,6 +16,7 @@
{{- $dependencies := .Values.dependencies.engine }} {{- $dependencies := .Values.dependencies.engine }}
{{- $mounts_heat_engine := .Values.mounts.heat_engine.heat_engine }} {{- $mounts_heat_engine := .Values.mounts.heat_engine.heat_engine }}
{{- $mounts_heat_engine_init := .Values.mounts.heat_engine.init_container }} {{- $mounts_heat_engine_init := .Values.mounts.heat_engine.init_container }}
---
apiVersion: apps/v1beta1 apiVersion: apps/v1beta1
kind: StatefulSet kind: StatefulSet
metadata: metadata:
@ -26,8 +27,10 @@ spec:
template: template:
metadata: metadata:
labels: labels:
app: heat-engine {{ tuple $envAll "heat" "engine" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
spec: spec:
affinity:
{{ tuple $envAll "heat" "engine" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers: initContainers:

View File

@ -0,0 +1,22 @@
# 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.
{{- define "helm-toolkit.snippets.kubernetes_metadata_labels" -}}
{{- $envAll := index . 0 -}}
{{- $application := index . 1 -}}
{{- $component := index . 2 -}}
release_name: {{ $envAll.Release.Name }}
application: {{ $application }}
component: {{ $component }}
{{- end -}}

View File

@ -0,0 +1,38 @@
# 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.
{{- define "helm-toolkit.snippets.kubernetes_pod_anti_affinity" -}}
{{- $envAll := index . 0 -}}
{{- $application := index . 1 -}}
{{- $component := index . 2 -}}
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchExpressions:
- key: release_name
operator: In
values:
- {{ $envAll.Release.Name }}
- key: application
operator: In
values:
- {{ $application }}
- key: component
operator: In
values:
- {{ $component }}
topologyKey: kubernetes.io/hostname
weight: 10
{{- end -}}

View File

@ -16,6 +16,7 @@
{{- $dependencies := .Values.dependencies.dashboard }} {{- $dependencies := .Values.dependencies.dashboard }}
{{- $mounts_horizon := .Values.mounts.horizon.horizon }} {{- $mounts_horizon := .Values.mounts.horizon.horizon }}
{{- $mounts_horizon_init := .Values.mounts.horizon.init_container }} {{- $mounts_horizon_init := .Values.mounts.horizon.init_container }}
---
apiVersion: apps/v1beta1 apiVersion: apps/v1beta1
kind: Deployment kind: Deployment
metadata: metadata:
@ -33,11 +34,13 @@ spec:
template: template:
metadata: metadata:
labels: labels:
app: horizon {{ tuple $envAll "horizon" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
spec: spec:
affinity:
{{ tuple $envAll "horizon" "server" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
terminationGracePeriodSeconds: {{ .Values.termination_grace_period.horizon.timeout | default "30" }} terminationGracePeriodSeconds: {{ .Values.termination_grace_period.horizon.timeout | default "30" }}

View File

@ -1,3 +1,18 @@
# 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.
{{- $envAll := . }}
---
apiVersion: policy/v1beta1 apiVersion: policy/v1beta1
kind: PodDisruptionBudget kind: PodDisruptionBudget
metadata: metadata:
@ -6,4 +21,4 @@ spec:
minAvailable: {{ .Values.pod_disruption_budget.horizon.min_available }} minAvailable: {{ .Values.pod_disruption_budget.horizon.min_available }}
selector: selector:
matchLabels: matchLabels:
app: horizon {{ tuple $envAll "horizon" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }}

View File

@ -11,7 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
{{- $envAll := . }}
---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@ -31,7 +32,7 @@ spec:
targetPort: {{ .Values.network.port }} targetPort: {{ .Values.network.port }}
{{ end }} {{ end }}
selector: selector:
app: horizon {{ tuple $envAll "horizon" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
{{ if .Values.network.enable_node_port }} {{ if .Values.network.enable_node_port }}
type: NodePort type: NodePort
{{ end }} {{ end }}

View File

@ -15,7 +15,7 @@
{{- $dependencies := .Values.dependencies.api }} {{- $dependencies := .Values.dependencies.api }}
{{- $mounts_keystone_api := .Values.mounts.keystone_api.keystone_api }} {{- $mounts_keystone_api := .Values.mounts.keystone_api.keystone_api }}
{{- $mounts_keystone_api_init := .Values.mounts.keystone_api.init_container }} {{- $mounts_keystone_api_init := .Values.mounts.keystone_api.init_container }}
---
apiVersion: apps/v1beta1 apiVersion: apps/v1beta1
kind: Deployment kind: Deployment
metadata: metadata:
@ -33,11 +33,13 @@ spec:
template: template:
metadata: metadata:
labels: labels:
app: keystone-api {{ tuple $envAll "keystone" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
spec: spec:
affinity:
{{ tuple $envAll "keystone" "api" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
terminationGracePeriodSeconds: {{ .Values.termination_grace_period.api.timeout | default "30" }} terminationGracePeriodSeconds: {{ .Values.termination_grace_period.api.timeout | default "30" }}

View File

@ -18,6 +18,7 @@
{{- $dependencies := .Values.dependencies.bootstrap }} {{- $dependencies := .Values.dependencies.bootstrap }}
{{- $mounts_keystone_bootstrap := .Values.mounts.keystone_bootstrap.keystone_bootstrap }} {{- $mounts_keystone_bootstrap := .Values.mounts.keystone_bootstrap.keystone_bootstrap }}
{{- $mounts_keystone_bootstrap_init := .Values.mounts.keystone_bootstrap.init_container }} {{- $mounts_keystone_bootstrap_init := .Values.mounts.keystone_bootstrap.init_container }}
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
metadata: metadata:

View File

@ -1,3 +1,18 @@
# 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.
{{- $envAll := . }}
---
apiVersion: policy/v1beta1 apiVersion: policy/v1beta1
kind: PodDisruptionBudget kind: PodDisruptionBudget
metadata: metadata:
@ -6,4 +21,4 @@ spec:
minAvailable: {{ .Values.pod_disruption_budget.api.min_available }} minAvailable: {{ .Values.pod_disruption_budget.api.min_available }}
selector: selector:
matchLabels: matchLabels:
app: keystone-api {{ tuple $envAll "keystone" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }}

View File

@ -11,7 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
{{- $envAll := . }}
---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@ -29,7 +30,7 @@ spec:
nodePort: {{ .Values.network.admin.node_port.port }} nodePort: {{ .Values.network.admin.node_port.port }}
{{ end }} {{ end }}
selector: selector:
app: keystone-api {{ tuple $envAll "keystone" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
{{ if or (.Values.network.api.node_port.enabled) (.Values.network.admin.node_port.enabled) }} {{ if or (.Values.network.api.node_port.enabled) (.Values.network.admin.node_port.enabled) }}
type: NodePort type: NodePort
{{ end }} {{ end }}

View File

@ -16,6 +16,7 @@
{{- $dependencies := .Values.dependencies.api }} {{- $dependencies := .Values.dependencies.api }}
{{- $mounts_magnum_api := .Values.mounts.magnum_api.magnum_api }} {{- $mounts_magnum_api := .Values.mounts.magnum_api.magnum_api }}
{{- $mounts_magnum_api_init := .Values.mounts.magnum_api.init_container }} {{- $mounts_magnum_api_init := .Values.mounts.magnum_api.init_container }}
---
apiVersion: apps/v1beta1 apiVersion: apps/v1beta1
kind: Deployment kind: Deployment
metadata: metadata:
@ -33,11 +34,13 @@ spec:
template: template:
metadata: metadata:
labels: labels:
app: magnum-api {{ tuple $envAll "magnum" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
spec: spec:
affinity:
{{ tuple $envAll "magnum" "api" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
terminationGracePeriodSeconds: {{ .Values.termination_grace_period.api.timeout | default "30" }} terminationGracePeriodSeconds: {{ .Values.termination_grace_period.api.timeout | default "30" }}

View File

@ -1,3 +1,18 @@
# 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.
{{- $envAll := . }}
---
apiVersion: policy/v1beta1 apiVersion: policy/v1beta1
kind: PodDisruptionBudget kind: PodDisruptionBudget
metadata: metadata:
@ -6,4 +21,4 @@ spec:
minAvailable: {{ .Values.pod_disruption_budget.api.min_available }} minAvailable: {{ .Values.pod_disruption_budget.api.min_available }}
selector: selector:
matchLabels: matchLabels:
app: magnum-api {{ tuple $envAll "magnum" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }}

View File

@ -11,7 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
{{- $envAll := . }}
---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@ -24,7 +25,7 @@ spec:
nodePort: {{ .Values.network.api.node_port.port }} nodePort: {{ .Values.network.api.node_port.port }}
{{ end }} {{ end }}
selector: selector:
app: magnum-api {{ tuple $envAll "magnum" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
{{ if .Values.network.api.node_port.enabled }} {{ if .Values.network.api.node_port.enabled }}
type: NodePort type: NodePort
{{ end }} {{ end }}

View File

@ -16,6 +16,7 @@
{{- $dependencies := .Values.dependencies.conductor }} {{- $dependencies := .Values.dependencies.conductor }}
{{- $mounts_magnum_conductor := .Values.mounts.magnum_conductor.magnum_conductor }} {{- $mounts_magnum_conductor := .Values.mounts.magnum_conductor.magnum_conductor }}
{{- $mounts_magnum_conductor_init := .Values.mounts.magnum_conductor.init_container }} {{- $mounts_magnum_conductor_init := .Values.mounts.magnum_conductor.init_container }}
---
apiVersion: apps/v1beta1 apiVersion: apps/v1beta1
kind: StatefulSet kind: StatefulSet
metadata: metadata:
@ -26,8 +27,10 @@ spec:
template: template:
metadata: metadata:
labels: labels:
app: magnum-conductor {{ tuple $envAll "magnum" "conductor" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
spec: spec:
affinity:
{{ tuple $envAll "magnum" "conductor" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers: initContainers:

View File

@ -1,3 +1,18 @@
# 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.
{{- $envAll := . }}
---
apiVersion: policy/v1beta1 apiVersion: policy/v1beta1
kind: PodDisruptionBudget kind: PodDisruptionBudget
metadata: metadata:
@ -6,4 +21,4 @@ spec:
minAvailable: {{ .Values.pod_disruption_budget.mariadb.min_available }} minAvailable: {{ .Values.pod_disruption_budget.mariadb.min_available }}
selector: selector:
matchLabels: matchLabels:
app: mariadb {{ tuple $envAll "mariadb" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }}

View File

@ -14,6 +14,8 @@
# This service could be used for cluster pod discovery, though instead it's # This service could be used for cluster pod discovery, though instead it's
# primarily here to allow DNS lookups of cluster pods. # primarily here to allow DNS lookups of cluster pods.
{{- $envAll := . }}
---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@ -26,4 +28,4 @@ spec:
port: {{ tuple "oslo_db" "internal" "mysql" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} port: {{ tuple "oslo_db" "internal" "mysql" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
clusterIP: None clusterIP: None
selector: selector:
app: mariadb {{ tuple $envAll "mariadb" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}

View File

@ -11,7 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
{{- $envAll := . }}
---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@ -29,4 +30,4 @@ spec:
- name: db - name: db
port: {{ tuple "oslo_db" "internal" "mysql" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} port: {{ tuple "oslo_db" "internal" "mysql" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
selector: selector:
app: mariadb {{ tuple $envAll "mariadb" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}

View File

@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
{{- $envAll := . }}
--- ---
apiVersion: apps/v1beta1 apiVersion: apps/v1beta1
kind: StatefulSet kind: StatefulSet
@ -23,24 +23,10 @@ spec:
template: template:
metadata: metadata:
labels: labels:
app: mariadb {{ tuple $envAll "mariadb" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
spec: spec:
# alanmeadows: this soft requirement allows single
# host deployments to spawn several mariadb containers
# but in a larger environment, would attempt to spread
# them out
affinity: affinity:
podAntiAffinity: {{ tuple $envAll "mariadb" "server" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- mariadb
topologyKey: kubernetes.io/hostname
weight: 10
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
containers: containers:

View File

@ -11,7 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
{{- $envAll := . }}
---
apiVersion: apps/v1beta1 apiVersion: apps/v1beta1
kind: Deployment kind: Deployment
metadata: metadata:
@ -29,8 +30,10 @@ spec:
template: template:
metadata: metadata:
labels: labels:
app: memcached {{ tuple $envAll "memcached" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
spec: spec:
affinity:
{{ tuple $envAll "memcached" "server" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
containers: containers:

View File

@ -11,7 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
{{- $envAll := . }}
---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@ -21,4 +22,4 @@ spec:
ports: ports:
- port: {{ .Values.network.port }} - port: {{ .Values.network.port }}
selector: selector:
app: memcached {{ tuple $envAll "memcached" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}

View File

@ -15,7 +15,7 @@
{{- $dependencies := .Values.dependencies.api }} {{- $dependencies := .Values.dependencies.api }}
{{- $mounts_mistral_api := .Values.mounts.mistral_api.mistral_api }} {{- $mounts_mistral_api := .Values.mounts.mistral_api.mistral_api }}
{{- $mounts_mistral_api_init := .Values.mounts.mistral_api.init_container }} {{- $mounts_mistral_api_init := .Values.mounts.mistral_api.init_container }}
---
apiVersion: apps/v1beta1 apiVersion: apps/v1beta1
kind: Deployment kind: Deployment
metadata: metadata:
@ -33,11 +33,13 @@ spec:
template: template:
metadata: metadata:
labels: labels:
app: mistral-api {{ tuple $envAll "mistral" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
spec: spec:
affinity:
{{ tuple $envAll "mistral" "api" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
terminationGracePeriodSeconds: {{ .Values.termination_grace_period.api.timeout | default "30" }} terminationGracePeriodSeconds: {{ .Values.termination_grace_period.api.timeout | default "30" }}

View File

@ -15,7 +15,7 @@
{{- $dependencies := .Values.dependencies.executor }} {{- $dependencies := .Values.dependencies.executor }}
{{- $mounts_mistral_executor := .Values.mounts.mistral_executor.mistral_executor }} {{- $mounts_mistral_executor := .Values.mounts.mistral_executor.mistral_executor }}
{{- $mounts_mistral_executor_init := .Values.mounts.mistral_executor.init_container }} {{- $mounts_mistral_executor_init := .Values.mounts.mistral_executor.init_container }}
---
apiVersion: apps/v1beta1 apiVersion: apps/v1beta1
kind: Deployment kind: Deployment
metadata: metadata:
@ -33,11 +33,13 @@ spec:
template: template:
metadata: metadata:
labels: labels:
app: mistral-executor {{ tuple $envAll "mistral" "executor" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
spec: spec:
affinity:
{{ tuple $envAll "mistral" "executor" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers: initContainers:

View File

@ -1,3 +1,18 @@
# 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.
{{- $envAll := . }}
---
apiVersion: policy/v1beta1 apiVersion: policy/v1beta1
kind: PodDisruptionBudget kind: PodDisruptionBudget
metadata: metadata:
@ -6,4 +21,4 @@ spec:
minAvailable: {{ .Values.pod_disruption_budget.api.min_available }} minAvailable: {{ .Values.pod_disruption_budget.api.min_available }}
selector: selector:
matchLabels: matchLabels:
app: mistral-api {{ tuple $envAll "mistral" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }}

View File

@ -11,7 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
{{- $envAll := . }}
---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@ -24,7 +25,7 @@ spec:
nodePort: {{ .Values.network.api.node_port.port }} nodePort: {{ .Values.network.api.node_port.port }}
{{ end }} {{ end }}
selector: selector:
app: mistral-api {{ tuple $envAll "mistral" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
{{ if .Values.network.api.node_port.enabled }} {{ if .Values.network.api.node_port.enabled }}
type: NodePort type: NodePort
{{ end }} {{ end }}

View File

@ -15,7 +15,7 @@
{{- $dependencies := .Values.dependencies.event_engine }} {{- $dependencies := .Values.dependencies.event_engine }}
{{- $mounts_mistral_event_engine := .Values.mounts.mistral_event_engine.mistral_event_engine }} {{- $mounts_mistral_event_engine := .Values.mounts.mistral_event_engine.mistral_event_engine }}
{{- $mounts_mistral_event_engine_init := .Values.mounts.mistral_event_engine.init_container }} {{- $mounts_mistral_event_engine_init := .Values.mounts.mistral_event_engine.init_container }}
---
apiVersion: apps/v1beta1 apiVersion: apps/v1beta1
kind: StatefulSet kind: StatefulSet
metadata: metadata:
@ -26,8 +26,10 @@ spec:
template: template:
metadata: metadata:
labels: labels:
app: mistral-event-engine {{ tuple $envAll "mistral" "event-engine" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
spec: spec:
affinity:
{{ tuple $envAll "mistral" "event-engine" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers: initContainers:

View File

@ -16,6 +16,7 @@
{{- $dependencies := .Values.dependencies.dhcp }} {{- $dependencies := .Values.dependencies.dhcp }}
{{- $mounts_neutron_dhcp_agent := .Values.mounts.neutron_dhcp_agent.neutron_dhcp_agent }} {{- $mounts_neutron_dhcp_agent := .Values.mounts.neutron_dhcp_agent.neutron_dhcp_agent }}
{{- $mounts_neutron_dhcp_agent_init := .Values.mounts.neutron_dhcp_agent.init_container }} {{- $mounts_neutron_dhcp_agent_init := .Values.mounts.neutron_dhcp_agent.init_container }}
---
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: DaemonSet kind: DaemonSet
metadata: metadata:
@ -24,7 +25,7 @@ spec:
template: template:
metadata: metadata:
labels: labels:
app: neutron-dhcp-agent {{ tuple $envAll "neutron" "dhcp-agent" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}

View File

@ -16,6 +16,7 @@
{{- $dependencies := .Values.dependencies.l3 }} {{- $dependencies := .Values.dependencies.l3 }}
{{- $mounts_neutron_l3_agent := .Values.mounts.neutron_l3_agent.neutron_l3_agent }} {{- $mounts_neutron_l3_agent := .Values.mounts.neutron_l3_agent.neutron_l3_agent }}
{{- $mounts_neutron_l3_agent_init := .Values.mounts.neutron_l3_agent.init_container }} {{- $mounts_neutron_l3_agent_init := .Values.mounts.neutron_l3_agent.init_container }}
---
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: DaemonSet kind: DaemonSet
metadata: metadata:
@ -24,7 +25,7 @@ spec:
template: template:
metadata: metadata:
labels: labels:
app: neutron-l3-agent {{ tuple $envAll "neutron" "l3-agent" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}

View File

@ -16,6 +16,7 @@
{{- $dependencies := .Values.dependencies.metadata }} {{- $dependencies := .Values.dependencies.metadata }}
{{- $mounts_neutron_metadata_agent := .Values.mounts.neutron_metadata_agent.neutron_metadata_agent }} {{- $mounts_neutron_metadata_agent := .Values.mounts.neutron_metadata_agent.neutron_metadata_agent }}
{{- $mounts_neutron_metadata_agent_init := .Values.mounts.neutron_metadata_agent.init_container }} {{- $mounts_neutron_metadata_agent_init := .Values.mounts.neutron_metadata_agent.init_container }}
---
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: DaemonSet kind: DaemonSet
metadata: metadata:
@ -24,7 +25,7 @@ spec:
template: template:
metadata: metadata:
labels: labels:
app: neutron-metadata-agent {{ tuple $envAll "neutron" "metadata-agent" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}

View File

@ -16,6 +16,7 @@
{{- $dependencies := .Values.dependencies.ovs_agent }} {{- $dependencies := .Values.dependencies.ovs_agent }}
{{- $mounts_neutron_ovs_agent := .Values.mounts.neutron_ovs_agent.neutron_ovs_agent }} {{- $mounts_neutron_ovs_agent := .Values.mounts.neutron_ovs_agent.neutron_ovs_agent }}
{{- $mounts_neutron_ovs_agent_init := .Values.mounts.neutron_ovs_agent.init_container }} {{- $mounts_neutron_ovs_agent_init := .Values.mounts.neutron_ovs_agent.init_container }}
---
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: DaemonSet kind: DaemonSet
metadata: metadata:
@ -24,7 +25,7 @@ spec:
template: template:
metadata: metadata:
labels: labels:
app: ovs-agent {{ tuple $envAll "neutron" "ovs-agent" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}

View File

@ -11,7 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
{{- $envAll := . }}
---
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: DaemonSet kind: DaemonSet
metadata: metadata:
@ -20,7 +21,7 @@ spec:
template: template:
metadata: metadata:
labels: labels:
app: ovs-db {{ tuple $envAll "neutron" "ovs-db" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}

View File

@ -11,7 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
{{- $envAll := . }}
---
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: DaemonSet kind: DaemonSet
metadata: metadata:
@ -20,7 +21,7 @@ spec:
template: template:
metadata: metadata:
labels: labels:
app: ovs-vswitchd {{ tuple $envAll "neutron" "ovs-vswitchd" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}

View File

@ -16,6 +16,7 @@
{{- $dependencies := .Values.dependencies.server }} {{- $dependencies := .Values.dependencies.server }}
{{- $mounts_neutron_server := .Values.mounts.neutron_server.neutron_server }} {{- $mounts_neutron_server := .Values.mounts.neutron_server.neutron_server }}
{{- $mounts_neutron_server_init := .Values.mounts.neutron_server.init_container }} {{- $mounts_neutron_server_init := .Values.mounts.neutron_server.init_container }}
---
apiVersion: apps/v1beta1 apiVersion: apps/v1beta1
kind: Deployment kind: Deployment
metadata: metadata:
@ -33,11 +34,13 @@ spec:
template: template:
metadata: metadata:
labels: labels:
app: neutron-server {{ tuple $envAll "neutron" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
spec: spec:
affinity:
{{ tuple $envAll "neutron" "server" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
nodeSelector: nodeSelector:
{{ .Values.labels.server.node_selector_key }}: {{ .Values.labels.server.node_selector_value }} {{ .Values.labels.server.node_selector_key }}: {{ .Values.labels.server.node_selector_value }}
terminationGracePeriodSeconds: {{ .Values.termination_grace_period.server.timeout | default "30" }} terminationGracePeriodSeconds: {{ .Values.termination_grace_period.server.timeout | default "30" }}

View File

@ -1,3 +1,18 @@
# 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.
{{- $envAll := . }}
---
apiVersion: policy/v1beta1 apiVersion: policy/v1beta1
kind: PodDisruptionBudget kind: PodDisruptionBudget
metadata: metadata:
@ -6,4 +21,4 @@ spec:
minAvailable: {{ .Values.pod_disruption_budget.server.min_available }} minAvailable: {{ .Values.pod_disruption_budget.server.min_available }}
selector: selector:
matchLabels: matchLabels:
app: neutron-server {{ tuple $envAll "neutron" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }}

View File

@ -11,7 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
{{- $envAll := . }}
---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@ -24,7 +25,7 @@ spec:
nodePort: {{ .Values.network.server.node_port.port }} nodePort: {{ .Values.network.server.node_port.port }}
{{ end }} {{ end }}
selector: selector:
app: neutron-server {{ tuple $envAll "neutron" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
{{ if .Values.network.server.node_port.enabled }} {{ if .Values.network.server.node_port.enabled }}
type: NodePort type: NodePort
{{ end }} {{ end }}

View File

@ -16,7 +16,7 @@
{{- $dependencies := .Values.dependencies.compute }} {{- $dependencies := .Values.dependencies.compute }}
{{- $mounts_nova_compute := .Values.mounts.nova_compute.nova_compute }} {{- $mounts_nova_compute := .Values.mounts.nova_compute.nova_compute }}
{{- $mounts_nova_compute_init := .Values.mounts.nova_compute.init_container }} {{- $mounts_nova_compute_init := .Values.mounts.nova_compute.init_container }}
---
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: DaemonSet kind: DaemonSet
metadata: metadata:
@ -25,7 +25,7 @@ spec:
template: template:
metadata: metadata:
labels: labels:
app: nova-compute {{ tuple $envAll "nova" "compute" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}

View File

@ -16,6 +16,7 @@
{{- $dependencies := .Values.dependencies.libvirt }} {{- $dependencies := .Values.dependencies.libvirt }}
{{- $mounts_nova_libvirt := .Values.mounts.nova_libvirt.nova_libvirt }} {{- $mounts_nova_libvirt := .Values.mounts.nova_libvirt.nova_libvirt }}
{{- $mounts_nova_libvirt_init := .Values.mounts.nova_libvirt.init_container }} {{- $mounts_nova_libvirt_init := .Values.mounts.nova_libvirt.init_container }}
---
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: DaemonSet kind: DaemonSet
metadata: metadata:
@ -24,7 +25,7 @@ spec:
template: template:
metadata: metadata:
labels: labels:
app: nova-libvirt {{ tuple $envAll "nova" "libvirt" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}

View File

@ -16,6 +16,7 @@
{{- $dependencies := .Values.dependencies.api }} {{- $dependencies := .Values.dependencies.api }}
{{- $mounts_nova_api_metadata := .Values.mounts.nova_api_metadata.nova_api_metadata }} {{- $mounts_nova_api_metadata := .Values.mounts.nova_api_metadata.nova_api_metadata }}
{{- $mounts_nova_api_metadata_init := .Values.mounts.nova_api_metadata.init_container }} {{- $mounts_nova_api_metadata_init := .Values.mounts.nova_api_metadata.init_container }}
---
apiVersion: apps/v1beta1 apiVersion: apps/v1beta1
kind: Deployment kind: Deployment
metadata: metadata:
@ -33,11 +34,13 @@ spec:
template: template:
metadata: metadata:
labels: labels:
app: nova-api-metadata {{ tuple $envAll "nova" "metadata" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
spec: spec:
affinity:
{{ tuple $envAll "nova" "metadata" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
nodeSelector: nodeSelector:
{{ .Values.labels.api_metadata.node_selector_key }}: {{ .Values.labels.api_metadata.node_selector_value }} {{ .Values.labels.api_metadata.node_selector_key }}: {{ .Values.labels.api_metadata.node_selector_value }}
terminationGracePeriodSeconds: {{ .Values.termination_grace_period.metadata.timeout | default "30" }} terminationGracePeriodSeconds: {{ .Values.termination_grace_period.metadata.timeout | default "30" }}

View File

@ -16,6 +16,7 @@
{{- $dependencies := .Values.dependencies.api }} {{- $dependencies := .Values.dependencies.api }}
{{- $mounts_nova_api_osapi := .Values.mounts.nova_api_osapi.nova_api_osapi }} {{- $mounts_nova_api_osapi := .Values.mounts.nova_api_osapi.nova_api_osapi }}
{{- $mounts_nova_api_osapi_init := .Values.mounts.nova_api_osapi.init_container }} {{- $mounts_nova_api_osapi_init := .Values.mounts.nova_api_osapi.init_container }}
---
apiVersion: apps/v1beta1 apiVersion: apps/v1beta1
kind: Deployment kind: Deployment
metadata: metadata:
@ -33,11 +34,13 @@ spec:
template: template:
metadata: metadata:
labels: labels:
app: nova-api-osapi {{ tuple $envAll "nova" "os-api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
spec: spec:
affinity:
{{ tuple $envAll "nova" "os-api" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
nodeSelector: nodeSelector:
{{ .Values.labels.osapi.node_selector_key }}: {{ .Values.labels.osapi.node_selector_value }} {{ .Values.labels.osapi.node_selector_key }}: {{ .Values.labels.osapi.node_selector_value }}
terminationGracePeriodSeconds: {{ .Values.termination_grace_period.osapi.timeout | default "30" }} terminationGracePeriodSeconds: {{ .Values.termination_grace_period.osapi.timeout | default "30" }}

View File

@ -16,6 +16,7 @@
{{- $dependencies := .Values.dependencies.conductor }} {{- $dependencies := .Values.dependencies.conductor }}
{{- $mounts_nova_conductor := .Values.mounts.nova_conductor.nova_conductor }} {{- $mounts_nova_conductor := .Values.mounts.nova_conductor.nova_conductor }}
{{- $mounts_nova_conductor_init := .Values.mounts.nova_conductor.init_container }} {{- $mounts_nova_conductor_init := .Values.mounts.nova_conductor.init_container }}
---
apiVersion: apps/v1beta1 apiVersion: apps/v1beta1
kind: Deployment kind: Deployment
metadata: metadata:
@ -33,11 +34,13 @@ spec:
template: template:
metadata: metadata:
labels: labels:
app: nova-conductor {{ tuple $envAll "nova" "conductor" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
spec: spec:
affinity:
{{ tuple $envAll "nova" "conductor" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
nodeSelector: nodeSelector:
{{ .Values.labels.conductor.node_selector_key }}: {{ .Values.labels.conductor.node_selector_value }} {{ .Values.labels.conductor.node_selector_key }}: {{ .Values.labels.conductor.node_selector_value }}
initContainers: initContainers:

View File

@ -16,7 +16,7 @@
{{- $dependencies := .Values.dependencies.consoleauth }} {{- $dependencies := .Values.dependencies.consoleauth }}
{{- $mounts_nova_consoleauth := .Values.mounts.nova_consoleauth.nova_conductor }} {{- $mounts_nova_consoleauth := .Values.mounts.nova_consoleauth.nova_conductor }}
{{- $mounts_nova_consoleauth_init := .Values.mounts.nova_consoleauth.init_container }} {{- $mounts_nova_consoleauth_init := .Values.mounts.nova_consoleauth.init_container }}
---
apiVersion: apps/v1beta1 apiVersion: apps/v1beta1
kind: Deployment kind: Deployment
metadata: metadata:
@ -34,11 +34,13 @@ spec:
template: template:
metadata: metadata:
labels: labels:
app: nova-consoleauth {{ tuple $envAll "nova" "consoleauth" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
spec: spec:
affinity:
{{ tuple $envAll "nova" "consoleauth" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
nodeSelector: nodeSelector:
{{ .Values.labels.consoleauth.node_selector_key }}: {{ .Values.labels.consoleauth.node_selector_value }} {{ .Values.labels.consoleauth.node_selector_key }}: {{ .Values.labels.consoleauth.node_selector_value }}
initContainers: initContainers:

View File

@ -16,7 +16,7 @@
{{- $dependencies := .Values.dependencies.scheduler }} {{- $dependencies := .Values.dependencies.scheduler }}
{{- $mounts_nova_scheduler := .Values.mounts.nova_scheduler.nova_conductor }} {{- $mounts_nova_scheduler := .Values.mounts.nova_scheduler.nova_conductor }}
{{- $mounts_nova_scheduler_init := .Values.mounts.nova_scheduler.init_container }} {{- $mounts_nova_scheduler_init := .Values.mounts.nova_scheduler.init_container }}
---
apiVersion: apps/v1beta1 apiVersion: apps/v1beta1
kind: Deployment kind: Deployment
metadata: metadata:
@ -34,11 +34,13 @@ spec:
template: template:
metadata: metadata:
labels: labels:
app: nova-scheduler {{ tuple $envAll "nova" "scheduler" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
spec: spec:
affinity:
{{ tuple $envAll "nova" "scheduler" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
nodeSelector: nodeSelector:
{{ .Values.labels.scheduler.node_selector_key }}: {{ .Values.labels.scheduler.node_selector_value }} {{ .Values.labels.scheduler.node_selector_key }}: {{ .Values.labels.scheduler.node_selector_value }}
initContainers: initContainers:

View File

@ -1,3 +1,18 @@
# 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.
{{- $envAll := . }}
---
apiVersion: policy/v1beta1 apiVersion: policy/v1beta1
kind: PodDisruptionBudget kind: PodDisruptionBudget
metadata: metadata:
@ -6,4 +21,4 @@ spec:
minAvailable: {{ .Values.pod_disruption_budget.metadata.min_available }} minAvailable: {{ .Values.pod_disruption_budget.metadata.min_available }}
selector: selector:
matchLabels: matchLabels:
app: nova-api-metadata {{ tuple $envAll "nova" "metadata" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }}

View File

@ -1,3 +1,18 @@
# 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.
{{- $envAll := . }}
---
apiVersion: policy/v1beta1 apiVersion: policy/v1beta1
kind: PodDisruptionBudget kind: PodDisruptionBudget
metadata: metadata:
@ -6,4 +21,4 @@ spec:
minAvailable: {{ .Values.pod_disruption_budget.osapi.min_available }} minAvailable: {{ .Values.pod_disruption_budget.osapi.min_available }}
selector: selector:
matchLabels: matchLabels:
app: nova-api-osapi {{ tuple $envAll "nova" "os-api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }}

View File

@ -11,7 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
{{- $envAll := . }}
---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@ -24,7 +25,7 @@ spec:
nodePort: {{ .Values.network.metadata.node_port.port }} nodePort: {{ .Values.network.metadata.node_port.port }}
{{ end }} {{ end }}
selector: selector:
app: nova-api-metadata {{ tuple $envAll "nova" "metadata" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
{{ if .Values.network.metadata.node_port.enabled }} {{ if .Values.network.metadata.node_port.enabled }}
type: NodePort type: NodePort
{{ end }} {{ end }}

View File

@ -11,7 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
{{- $envAll := . }}
---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@ -24,7 +25,7 @@ spec:
nodePort: {{ .Values.network.osapi.node_port.port }} nodePort: {{ .Values.network.osapi.node_port.port }}
{{ end }} {{ end }}
selector: selector:
app: nova-api-osapi {{ tuple $envAll "nova" "os-api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
{{ if .Values.network.osapi.node_port.enabled }} {{ if .Values.network.osapi.node_port.enabled }}
type: NodePort type: NodePort
{{ end }} {{ end }}

View File

@ -31,23 +31,13 @@ spec:
template: template:
metadata: metadata:
labels: labels:
app: rabbitmq {{ tuple $envAll "rabbitmq" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
spec: spec:
# TODO: this needs to be moved to common.
affinity: affinity:
podAntiAffinity: {{ tuple $envAll "rabbitmq" "server" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values: ["rabbitmq"]
topologyKey: kubernetes.io/hostname
weight: 10
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
volumes: volumes:

View File

@ -11,7 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
{{- $envAll := . }}
---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@ -20,4 +21,4 @@ spec:
ports: ports:
- port: {{.Values.network.port.public}} - port: {{.Values.network.port.public}}
selector: selector:
app: rabbitmq {{ tuple $envAll "rabbitmq" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}

View File

@ -11,11 +11,11 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
{{- $envAll := . }} {{- $envAll := . }}
{{- $dependencies := .Values.dependencies.api }} {{- $dependencies := .Values.dependencies.api }}
{{- $mounts_senlin_api := .Values.mounts.senlin_api.senlin_api }} {{- $mounts_senlin_api := .Values.mounts.senlin_api.senlin_api }}
{{- $mounts_senlin_api_init := .Values.mounts.senlin_api.init_container }} {{- $mounts_senlin_api_init := .Values.mounts.senlin_api.init_container }}
---
apiVersion: apps/v1beta1 apiVersion: apps/v1beta1
kind: Deployment kind: Deployment
metadata: metadata:
@ -33,11 +33,13 @@ spec:
template: template:
metadata: metadata:
labels: labels:
app: senlin-api {{ tuple $envAll "senlin" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
annotations: annotations:
configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }} configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
spec: spec:
affinity:
{{ tuple $envAll "senlin" "api" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
terminationGracePeriodSeconds: {{ .Values.termination_grace_period.api.timeout | default "30" }} terminationGracePeriodSeconds: {{ .Values.termination_grace_period.api.timeout | default "30" }}

View File

@ -1,3 +1,18 @@
# 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.
{{- $envAll := . }}
---
apiVersion: policy/v1beta1 apiVersion: policy/v1beta1
kind: PodDisruptionBudget kind: PodDisruptionBudget
metadata: metadata:
@ -6,4 +21,4 @@ spec:
minAvailable: {{ .Values.pod_disruption_budget.api.min_available }} minAvailable: {{ .Values.pod_disruption_budget.api.min_available }}
selector: selector:
matchLabels: matchLabels:
app: senlin-api {{ tuple $envAll "senlin" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }}

View File

@ -11,7 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
{{- $envAll := . }}
---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@ -24,7 +25,7 @@ spec:
nodePort: {{ .Values.network.api.node_port.port }} nodePort: {{ .Values.network.api.node_port.port }}
{{ end }} {{ end }}
selector: selector:
app: senlin-api {{ tuple $envAll "senlin" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
{{ if .Values.network.api.node_port.enabled }} {{ if .Values.network.api.node_port.enabled }}
type: NodePort type: NodePort
{{ end }} {{ end }}

View File

@ -16,6 +16,7 @@
{{- $dependencies := .Values.dependencies.engine }} {{- $dependencies := .Values.dependencies.engine }}
{{- $mounts_senlin_engine := .Values.mounts.senlin_engine.senlin_engine }} {{- $mounts_senlin_engine := .Values.mounts.senlin_engine.senlin_engine }}
{{- $mounts_senlin_engine_init := .Values.mounts.senlin_engine.init_container }} {{- $mounts_senlin_engine_init := .Values.mounts.senlin_engine.init_container }}
---
apiVersion: apps/v1beta1 apiVersion: apps/v1beta1
kind: StatefulSet kind: StatefulSet
metadata: metadata:
@ -26,8 +27,10 @@ spec:
template: template:
metadata: metadata:
labels: labels:
app: senlin-engine {{ tuple $envAll "senlin" "engine" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
spec: spec:
affinity:
{{ tuple $envAll "senlin" "engine" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
initContainers: initContainers:

View File

@ -45,11 +45,11 @@ KEYSTONE_CREDS="--os-username ${KS_USER} \
--os-project-domain-name ${KS_PROJECT_DOMAIN} \ --os-project-domain-name ${KS_PROJECT_DOMAIN} \
--os-user-domain-name ${KS_USER_DOMAIN} \ --os-user-domain-name ${KS_USER_DOMAIN} \
--os-password ${KS_PASSWORD}" --os-password ${KS_PASSWORD}"
NEUTRON_POD=$(kubectl get -n openstack pods -l app=neutron-server --no-headers -o name | head -1 | awk -F '/' '{ print $NF }') NEUTRON_POD=$(kubectl get -n openstack pods -l application=neutron,component=server --no-headers -o name | head -1 | awk -F '/' '{ print $NF }')
NEUTRON="kubectl exec -n openstack ${NEUTRON_POD} -- neutron ${KEYSTONE_CREDS}" NEUTRON="kubectl exec -n openstack ${NEUTRON_POD} -- neutron ${KEYSTONE_CREDS}"
OPENSTACK_POD=$(kubectl get -n openstack pods -l app=keystone-api --no-headers -o name | head -1 | awk -F '/' '{ print $NF }') OPENSTACK_POD=$(kubectl get -n openstack pods -l application=keystone,component=api --no-headers -o name | head -1 | awk -F '/' '{ print $NF }')
OPENSTACK="kubectl exec -n openstack ${OPENSTACK_POD} -- openstack ${KEYSTONE_CREDS} --os-identity-api-version 3 --os-image-api-version 2" OPENSTACK="kubectl exec -n openstack ${OPENSTACK_POD} -- openstack ${KEYSTONE_CREDS} --os-identity-api-version 3 --os-image-api-version 2"
NOVA_POD=$(kubectl get -n openstack pods -l app=nova-api-osapi --no-headers -o name | head -1 | awk -F '/' '{ print $NF }') NOVA_POD=$(kubectl get -n openstack pods -l application=nova,component=os-api --no-headers -o name | head -1 | awk -F '/' '{ print $NF }')
NOVA="kubectl exec -n openstack ${NOVA_POD} -- nova ${KEYSTONE_CREDS}" NOVA="kubectl exec -n openstack ${NOVA_POD} -- nova ${KEYSTONE_CREDS}"
# Turn on ip forwarding if its not already # Turn on ip forwarding if its not already
@ -62,7 +62,7 @@ sudo ip addr add ${OSH_BR_EX_ADDR} dev br-ex
sudo ip link set br-ex up sudo ip link set br-ex up
# Disable In-Band rules on br-ex bridge to ease debugging # Disable In-Band rules on br-ex bridge to ease debugging
OVS_VSWITCHD_POD=$(kubectl get -n openstack pods -l app=ovs-vswitchd --no-headers -o name | head -1 | awk -F '/' '{ print $NF }') OVS_VSWITCHD_POD=$(kubectl get -n openstack pods -l application=neutron,component=ovs-vswitchd --no-headers -o name | head -1 | awk -F '/' '{ print $NF }')
kubectl exec -n openstack ${OVS_VSWITCHD_POD} -- ovs-vsctl set Bridge br-ex other_config:disable-in-band=true kubectl exec -n openstack ${OVS_VSWITCHD_POD} -- ovs-vsctl set Bridge br-ex other_config:disable-in-band=true
# Setup masquerading on default route dev to public subnet # Setup masquerading on default route dev to public subnet