Unify and normalise K8s Resources and Upgrade Strategy

This PS unifies and normalises Kubernetes resource allocation and
update strategy across all OpenStack-Helm elements.

Change-Id: Ia41fc453cb5191fa447ca6e1aa0f5b431c939dc8
This commit is contained in:
Pete Birley 2017-07-05 02:34:12 -05:00
parent 0c36b4354d
commit ac06f49849
225 changed files with 1199 additions and 1699 deletions

View File

@ -10,6 +10,8 @@
# 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: ConfigMap kind: ConfigMap
metadata: metadata:

View File

@ -10,6 +10,8 @@
# 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 := . }}
{{- include "barbican.conf.barbican_values_skeleton" .Values.conf.barbican | trunc 0 -}} {{- include "barbican.conf.barbican_values_skeleton" .Values.conf.barbican | trunc 0 -}}
{{- if empty .Values.conf.barbican.keystone_authtoken.keystonemiddleware.auth_token.auth_uri -}} {{- if empty .Values.conf.barbican.keystone_authtoken.keystonemiddleware.auth_token.auth_uri -}}
@ -55,6 +57,7 @@
{{- tuple "key-manager" "public" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | set .Values.conf.barbican.default.barbican.common.config "host_href" | quote | trunc 0 -}} {{- tuple "key-manager" "public" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | set .Values.conf.barbican.default.barbican.common.config "host_href" | quote | trunc 0 -}}
{{- end -}} {{- end -}}
---
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:

View File

@ -11,6 +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 := . }} {{- $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 }}
@ -22,14 +23,7 @@ metadata:
name: barbican-api name: barbican-api
spec: spec:
replicas: {{ .Values.replicas.api }} replicas: {{ .Values.replicas.api }}
revisionHistoryLimit: {{ .Values.upgrades.revision_history }} {{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
strategy:
type: {{ .Values.upgrades.pod_replacement_strategy }}
{{ if eq .Values.upgrades.pod_replacement_strategy "RollingUpdate" }}
rollingUpdate:
maxUnavailable: {{ .Values.upgrades.rolling_update.max_unavailable }}
maxSurge: {{ .Values.upgrades.rolling_update.max_surge }}
{{ end }}
template: template:
metadata: metadata:
labels: labels:
@ -48,15 +42,7 @@ spec:
- name: barbican-api - name: barbican-api
image: {{ .Values.images.api }} image: {{ .Values.images.api }}
imagePullPolicy: {{ .Values.images.pull_policy }} imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }} {{ tuple $envAll $envAll.Values.resources.api | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
resources:
limits:
cpu: {{ .Values.resources.api.limits.cpu | quote }}
memory: {{ .Values.resources.api.limits.memory | quote }}
requests:
cpu: {{ .Values.resources.api.requests.cpu | quote }}
memory: {{ .Values.resources.api.requests.memory | quote }}
{{- end }}
command: command:
- /tmp/barbican.sh - /tmp/barbican.sh
- start - start
@ -98,7 +84,7 @@ spec:
mountPath: /tmp/barbican.sh mountPath: /tmp/barbican.sh
subPath: barbican.sh subPath: barbican.sh
readOnly: true readOnly: true
{{ if $mounts_barbican_api.volumeMounts }}{{ toYaml $mounts_barbican_api.volumeMounts | indent 12 }}{{ end }} {{- if $mounts_barbican_api.volumeMounts }}{{ toYaml $mounts_barbican_api.volumeMounts | indent 12 }}{{ end }}
volumes: volumes:
- name: etcbarbican - name: etcbarbican
emptyDir: {} emptyDir: {}
@ -109,4 +95,4 @@ spec:
configMap: configMap:
name: barbican-bin name: barbican-bin
defaultMode: 0555 defaultMode: 0555
{{ if $mounts_barbican_api.volumes }}{{ toYaml $mounts_barbican_api.volumes | indent 8 }}{{ end }} {{- if $mounts_barbican_api.volumes }}{{ toYaml $mounts_barbican_api.volumes | indent 8 }}{{ end }}

View File

@ -12,7 +12,9 @@
# 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 := . }}
{{- if .Values.network.api.ingress.public }} {{- if .Values.network.api.ingress.public }}
---
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Ingress kind: Ingress
metadata: metadata:

View File

@ -12,6 +12,7 @@
{{- $envAll := . }} {{- $envAll := . }}
{{- $dependencies := .Values.dependencies.db_init }} {{- $dependencies := .Values.dependencies.db_init }}
---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
metadata: metadata:
@ -28,15 +29,7 @@ spec:
- name: barbican-db-init - name: barbican-db-init
image: {{ .Values.images.db_init }} image: {{ .Values.images.db_init }}
imagePullPolicy: {{ .Values.images.pull_policy }} imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }} {{ tuple $envAll $envAll.Values.resources.jobs.db_init | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
resources:
limits:
cpu: {{ .Values.resources.db_init.limits.cpu | quote }}
memory: {{ .Values.resources.db_init.limits.memory | quote }}
requests:
cpu: {{ .Values.resources.db_init.requests.cpu | quote }}
memory: {{ .Values.resources.db_init.requests.memory | quote }}
{{- end }}
env: env:
- name: ROOT_DB_CONNECTION - name: ROOT_DB_CONNECTION
valueFrom: valueFrom:

View File

@ -12,6 +12,7 @@
{{- $envAll := . }} {{- $envAll := . }}
{{- $dependencies := .Values.dependencies.db_sync }} {{- $dependencies := .Values.dependencies.db_sync }}
---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
metadata: metadata:
@ -28,15 +29,7 @@ spec:
- name: barbican-db-sync - name: barbican-db-sync
image: {{ .Values.images.db_sync }} image: {{ .Values.images.db_sync }}
imagePullPolicy: {{ .Values.images.pull_policy }} imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }} {{ tuple $envAll $envAll.Values.resources.jobs.db_sync | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
resources:
limits:
cpu: {{ .Values.resources.db_sync.limits.cpu | quote }}
memory: {{ .Values.resources.jobs.db.limits.memory | quote }}
requests:
cpu: {{ .Values.resources.db_sync.requests.cpu | quote }}
memory: {{ .Values.resources.jobs.db.requests.memory | quote }}
{{- end }}
command: command:
- /tmp/db-sync.sh - /tmp/db-sync.sh
volumeMounts: volumeMounts:

View File

@ -12,6 +12,7 @@
{{- $envAll := . }} {{- $envAll := . }}
{{- $dependencies := .Values.dependencies.ks_endpoints }} {{- $dependencies := .Values.dependencies.ks_endpoints }}
---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
metadata: metadata:
@ -30,15 +31,7 @@ spec:
- name: {{ $osServiceType }}-ks-endpoints-{{ $osServiceEndPoint }} - name: {{ $osServiceType }}-ks-endpoints-{{ $osServiceEndPoint }}
image: {{ $envAll.Values.images.ks_endpoints }} image: {{ $envAll.Values.images.ks_endpoints }}
imagePullPolicy: {{ $envAll.Values.images.pull_policy }} imagePullPolicy: {{ $envAll.Values.images.pull_policy }}
{{- if $envAll.Values.resources.enabled }} {{ tuple $envAll $envAll.Values.resources.jobs.ks_endpoints | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
resources:
requests:
memory: {{ $envAll.Values.resources.ks_endpoints.requests.memory | quote }}
cpu: {{ $envAll.Values.resources.ks_endpoints.requests.cpu | quote }}
limits:
memory: {{ $envAll.Values.resources.ks_endpoints.limits.memory | quote }}
cpu: {{ $envAll.Values.resources.ks_endpoints.limits.cpu | quote }}
{{- end }}
command: command:
- /tmp/ks-endpoints.sh - /tmp/ks-endpoints.sh
volumeMounts: volumeMounts:

View File

@ -12,6 +12,7 @@
{{- $envAll := . }} {{- $envAll := . }}
{{- $dependencies := .Values.dependencies.ks_service }} {{- $dependencies := .Values.dependencies.ks_service }}
---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
metadata: metadata:
@ -29,15 +30,7 @@ spec:
- name: {{ $osServiceType }}-ks-service-registration - name: {{ $osServiceType }}-ks-service-registration
image: {{ $envAll.Values.images.ks_service }} image: {{ $envAll.Values.images.ks_service }}
imagePullPolicy: {{ $envAll.Values.images.pull_policy }} imagePullPolicy: {{ $envAll.Values.images.pull_policy }}
{{- if $envAll.Values.resources.enabled }} {{ tuple $envAll $envAll.Values.resources.jobs.ks_service | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
resources:
requests:
memory: {{ $envAll.Values.resources.ks_service.requests.memory | quote }}
cpu: {{ $envAll.Values.resources.ks_service.requests.cpu | quote }}
limits:
memory: {{ $envAll.Values.resources.ks_service.limits.memory | quote }}
cpu: {{ $envAll.Values.resources.ks_service.limits.cpu | quote }}
{{- end }}
command: command:
- /tmp/ks-service.sh - /tmp/ks-service.sh
volumeMounts: volumeMounts:

View File

@ -12,6 +12,7 @@
{{- $envAll := . }} {{- $envAll := . }}
{{- $dependencies := .Values.dependencies.ks_user }} {{- $dependencies := .Values.dependencies.ks_user }}
---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
metadata: metadata:
@ -28,15 +29,7 @@ spec:
- name: barbican-ks-user - name: barbican-ks-user
image: {{ .Values.images.ks_user }} image: {{ .Values.images.ks_user }}
imagePullPolicy: {{ .Values.images.pull_policy }} imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }} {{ tuple $envAll $envAll.Values.resources.jobs.ks_user | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
resources:
requests:
memory: {{ .Values.resources.ks_user.requests.memory | quote }}
cpu: {{ .Values.resources.ks_user.requests.cpu | quote }}
limits:
memory: {{ .Values.resources.ks_user.limits.memory | quote }}
cpu: {{ .Values.resources.ks_user.limits.cpu | quote }}
{{- end }}
command: command:
- /tmp/ks-user.sh - /tmp/ks-user.sh
volumeMounts: volumeMounts:

View File

@ -11,6 +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 := . }} {{- $envAll := . }}
--- ---
apiVersion: policy/v1beta1 apiVersion: policy/v1beta1

View File

@ -11,6 +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 := . }} {{- $envAll := . }}
{{- range $key1, $userClass := tuple "admin" "user" }} {{- range $key1, $userClass := tuple "admin" "user" }}
{{- $secretName := index $envAll.Values.secrets.oslo_db $userClass }} {{- $secretName := index $envAll.Values.secrets.oslo_db $userClass }}

View File

@ -11,6 +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 := . }} {{- $envAll := . }}
{{- range $key1, $userClass := tuple "admin" "user" }} {{- range $key1, $userClass := tuple "admin" "user" }}
{{- $secretName := index $envAll.Values.secrets.identity $userClass }} {{- $secretName := index $envAll.Values.secrets.identity $userClass }}

View File

@ -11,6 +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 := . }} {{- $envAll := . }}
--- ---
apiVersion: v1 apiVersion: v1

View File

@ -12,7 +12,9 @@
# 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 := . }}
{{- if .Values.network.api.ingress.public }} {{- if .Values.network.api.ingress.public }}
---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:

View File

@ -27,6 +27,7 @@ images:
pull_policy: "IfNotPresent" pull_policy: "IfNotPresent"
upgrades: upgrades:
deployments:
revision_history: 3 revision_history: 3
pod_replacement_strategy: RollingUpdate pod_replacement_strategy: RollingUpdate
rolling_update: rolling_update:
@ -200,6 +201,21 @@ endpoints:
resources: resources:
enabled: false enabled: false
api:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
jobs:
bootstrap:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
db_init: db_init:
requests: requests:
memory: "128Mi" memory: "128Mi"
@ -235,7 +251,7 @@ resources:
limits: limits:
memory: "1024Mi" memory: "1024Mi"
cpu: "2000m" cpu: "2000m"
api: tests:
requests: requests:
memory: "128Mi" memory: "128Mi"
cpu: "100m" cpu: "100m"

View File

@ -18,7 +18,6 @@
{{- $monHostURI := cat $monHost "." $monHostDomain | nospace -}} {{- $monHostURI := cat $monHost "." $monHostDomain | nospace -}}
{{- $monHostURI | set .Values.conf.ceph.config.global "mon_host" | quote | trunc 0 -}} {{- $monHostURI | set .Values.conf.ceph.config.global "mon_host" | quote | trunc 0 -}}
{{- end -}} {{- end -}}
--- ---
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap

View File

@ -1,4 +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.
{{- if .Values.manifests_enabled.deployment }} {{- if .Values.manifests_enabled.deployment }}
---
apiVersion: policy/v1beta1 apiVersion: policy/v1beta1
kind: PodDisruptionBudget kind: PodDisruptionBudget
metadata: metadata:

View File

@ -12,6 +12,8 @@
# 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: ConfigMap kind: ConfigMap
metadata: metadata:

View File

@ -12,6 +12,8 @@
# 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 := . }}
{{- include "cinder.conf.cinder_values_skeleton" .Values.conf.cinder | trunc 0 -}} {{- include "cinder.conf.cinder_values_skeleton" .Values.conf.cinder | trunc 0 -}}
{{- if empty .Values.conf.cinder.keystone_authtoken.keystonemiddleware.auth_token.auth_uri -}} {{- if empty .Values.conf.cinder.keystone_authtoken.keystonemiddleware.auth_token.auth_uri -}}
@ -58,6 +60,7 @@
{{- tuple "image" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.cinder.default.cinder "glance_api_servers" | quote | trunc 0 -}} {{- tuple "image" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.cinder.default.cinder "glance_api_servers" | quote | trunc 0 -}}
{{- end -}} {{- end -}}
---
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:

View File

@ -11,6 +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 := . }} {{- $envAll := . }}
{{- $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 }}
@ -22,14 +23,7 @@ metadata:
name: cinder-api name: cinder-api
spec: spec:
replicas: {{ .Values.replicas.api }} replicas: {{ .Values.replicas.api }}
revisionHistoryLimit: {{ .Values.upgrades.revision_history }} {{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
strategy:
type: {{ .Values.upgrades.pod_replacement_strategy }}
{{ if eq .Values.upgrades.pod_replacement_strategy "RollingUpdate" }}
rollingUpdate:
maxUnavailable: {{ .Values.upgrades.rolling_update.max_unavailable }}
maxSurge: {{ .Values.upgrades.rolling_update.max_surge }}
{{ end }}
template: template:
metadata: metadata:
labels: labels:
@ -49,15 +43,7 @@ spec:
- name: cinder-api - name: cinder-api
image: {{ .Values.images.api }} image: {{ .Values.images.api }}
imagePullPolicy: {{ .Values.images.pull_policy }} imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }} {{ tuple $envAll $envAll.Values.resources.api | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
resources:
requests:
memory: {{ .Values.resources.cinder_api.requests.memory | quote }}
cpu: {{ .Values.resources.cinder_api.requests.cpu | quote }}
limits:
memory: {{ .Values.resources.cinder_api.limits.memory | quote }}
cpu: {{ .Values.resources.cinder_api.limits.cpu | quote }}
{{- end }}
command: command:
- /tmp/cinder-api.sh - /tmp/cinder-api.sh
- start - start
@ -90,7 +76,7 @@ spec:
mountPath: /etc/cinder/policy.json mountPath: /etc/cinder/policy.json
subPath: policy.json subPath: policy.json
readOnly: true readOnly: true
{{ if $mounts_cinder_api.volumeMounts }}{{ toYaml $mounts_cinder_api.volumeMounts | indent 12 }}{{ end }} {{- if $mounts_cinder_api.volumeMounts }}{{ toYaml $mounts_cinder_api.volumeMounts | indent 12 }}{{ end }}
volumes: volumes:
- name: cinder-bin - name: cinder-bin
configMap: configMap:
@ -99,4 +85,4 @@ spec:
- name: cinder-etc - name: cinder-etc
configMap: configMap:
name: cinder-etc name: cinder-etc
{{ if $mounts_cinder_api.volumes }}{{ toYaml $mounts_cinder_api.volumes | indent 8 }}{{ end }} {{- if $mounts_cinder_api.volumes }}{{ toYaml $mounts_cinder_api.volumes | indent 8 }}{{ end }}

View File

@ -11,6 +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 := . }} {{- $envAll := . }}
{{- $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 }}
@ -22,14 +23,7 @@ metadata:
name: cinder-backup name: cinder-backup
spec: spec:
replicas: {{ .Values.replicas.backup }} replicas: {{ .Values.replicas.backup }}
revisionHistoryLimit: {{ .Values.upgrades.revision_history }} {{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
strategy:
type: {{ .Values.upgrades.pod_replacement_strategy }}
{{ if eq .Values.upgrades.pod_replacement_strategy "RollingUpdate" }}
rollingUpdate:
maxUnavailable: {{ .Values.upgrades.rolling_update.max_unavailable }}
maxSurge: {{ .Values.upgrades.rolling_update.max_surge }}
{{ end }}
template: template:
metadata: metadata:
labels: labels:
@ -65,15 +59,7 @@ spec:
- name: cinder-backup - name: cinder-backup
image: {{ .Values.images.backup }} image: {{ .Values.images.backup }}
imagePullPolicy: {{ .Values.images.pull_policy }} imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }} {{ tuple $envAll $envAll.Values.resources.backup | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
resources:
requests:
memory: {{ .Values.resources.cinder_backup.requests.memory | quote }}
cpu: {{ .Values.resources.cinder_backup.requests.cpu | quote }}
limits:
memory: {{ .Values.resources.cinder_backup.limits.memory | quote }}
cpu: {{ .Values.resources.cinder_backup.limits.cpu | quote }}
{{- end }}
command: command:
- /tmp/cinder-backup.sh - /tmp/cinder-backup.sh
volumeMounts: volumeMounts:
@ -97,7 +83,7 @@ spec:
subPath: key subPath: key
readOnly: true readOnly: true
{{- end -}} {{- end -}}
{{ if $mounts_cinder_backup.volumeMounts }}{{ toYaml $mounts_cinder_backup.volumeMounts | indent 12 }}{{ end }} {{- if $mounts_cinder_backup.volumeMounts }}{{ toYaml $mounts_cinder_backup.volumeMounts | indent 12 }}{{ end }}
volumes: volumes:
- name: cinder-etc - name: cinder-etc
configMap: configMap:
@ -116,4 +102,4 @@ spec:
secret: secret:
secretName: pvc-ceph-client-key secretName: pvc-ceph-client-key
{{ end }} {{ end }}
{{ if $mounts_cinder_backup.volumes }}{{ toYaml $mounts_cinder_backup.volumes | indent 8 }}{{ end }} {{- if $mounts_cinder_backup.volumes }}{{ toYaml $mounts_cinder_backup.volumes | indent 8 }}{{ end }}

View File

@ -11,6 +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 := . }} {{- $envAll := . }}
{{- $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 }}
@ -22,14 +23,7 @@ metadata:
name: cinder-scheduler name: cinder-scheduler
spec: spec:
replicas: {{ .Values.replicas.scheduler }} replicas: {{ .Values.replicas.scheduler }}
revisionHistoryLimit: {{ .Values.upgrades.revision_history }} {{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
strategy:
type: {{ .Values.upgrades.pod_replacement_strategy }}
{{ if eq .Values.upgrades.pod_replacement_strategy "RollingUpdate" }}
rollingUpdate:
maxUnavailable: {{ .Values.upgrades.rolling_update.max_unavailable }}
maxSurge: {{ .Values.upgrades.rolling_update.max_surge }}
{{ end }}
template: template:
metadata: metadata:
labels: labels:
@ -48,15 +42,7 @@ spec:
- name: cinder-scheduler - name: cinder-scheduler
image: {{ .Values.images.scheduler }} image: {{ .Values.images.scheduler }}
imagePullPolicy: {{ .Values.images.pull_policy }} imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }} {{ tuple $envAll $envAll.Values.resources.scheduler | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
resources:
requests:
memory: {{ .Values.resources.cinder_scheduler.requests.memory | quote }}
cpu: {{ .Values.resources.cinder_scheduler.requests.cpu | quote }}
limits:
memory: {{ .Values.resources.cinder_scheduler.limits.memory | quote }}
cpu: {{ .Values.resources.cinder_scheduler.limits.cpu | quote }}
{{- end }}
command: command:
- /tmp/cinder-scheduler.sh - /tmp/cinder-scheduler.sh
volumeMounts: volumeMounts:
@ -76,7 +62,7 @@ spec:
mountPath: /etc/cinder/policy.json mountPath: /etc/cinder/policy.json
subPath: policy.json subPath: policy.json
readOnly: true readOnly: true
{{ if $mounts_cinder_scheduler.volumeMounts }}{{ toYaml $mounts_cinder_scheduler.volumeMounts | indent 12 }}{{ end }} {{- if $mounts_cinder_scheduler.volumeMounts }}{{ toYaml $mounts_cinder_scheduler.volumeMounts | indent 12 }}{{ end }}
volumes: volumes:
- name: cinder-bin - name: cinder-bin
configMap: configMap:
@ -85,4 +71,4 @@ spec:
- name: cinder-etc - name: cinder-etc
configMap: configMap:
name: cinder-etc name: cinder-etc
{{ if $mounts_cinder_scheduler.volumes }}{{ toYaml $mounts_cinder_scheduler.volumes | indent 8 }}{{ end }} {{- if $mounts_cinder_scheduler.volumes }}{{ toYaml $mounts_cinder_scheduler.volumes | indent 8 }}{{ end }}

View File

@ -11,6 +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 := . }} {{- $envAll := . }}
{{- $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 }}
@ -22,14 +23,7 @@ metadata:
name: cinder-volume name: cinder-volume
spec: spec:
replicas: {{ .Values.replicas.volume }} replicas: {{ .Values.replicas.volume }}
revisionHistoryLimit: {{ .Values.upgrades.revision_history }} {{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
strategy:
type: {{ .Values.upgrades.pod_replacement_strategy }}
{{ if eq .Values.upgrades.pod_replacement_strategy "RollingUpdate" }}
rollingUpdate:
maxUnavailable: {{ .Values.upgrades.rolling_update.max_unavailable }}
maxSurge: {{ .Values.upgrades.rolling_update.max_surge }}
{{ end }}
template: template:
metadata: metadata:
labels: labels:
@ -65,15 +59,7 @@ spec:
- name: cinder-volume - name: cinder-volume
image: {{ .Values.images.volume }} image: {{ .Values.images.volume }}
imagePullPolicy: {{ .Values.images.pull_policy }} imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }} {{ tuple $envAll $envAll.Values.resources.volume | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
resources:
requests:
memory: {{ .Values.resources.cinder_volume.requests.memory | quote }}
cpu: {{ .Values.resources.cinder_volume.requests.cpu | quote }}
limits:
memory: {{ .Values.resources.cinder_volume.limits.memory | quote }}
cpu: {{ .Values.resources.cinder_volume.limits.cpu | quote }}
{{- end }}
command: command:
- /tmp/cinder-volume.sh - /tmp/cinder-volume.sh
volumeMounts: volumeMounts:
@ -101,7 +87,7 @@ spec:
subPath: key subPath: key
readOnly: true readOnly: true
{{- end }} {{- end }}
{{ if $mounts_cinder_volume.volumeMounts }}{{ toYaml $mounts_cinder_volume.volumeMounts | indent 12 }}{{ end }} {{- if $mounts_cinder_volume.volumeMounts }}{{ toYaml $mounts_cinder_volume.volumeMounts | indent 12 }}{{ end }}
volumes: volumes:
- name: cinder-bin - name: cinder-bin
configMap: configMap:
@ -120,4 +106,4 @@ spec:
secret: secret:
secretName: pvc-ceph-client-key secretName: pvc-ceph-client-key
{{ end }} {{ end }}
{{ if $mounts_cinder_volume.volumes }}{{ toYaml $mounts_cinder_volume.volumes | indent 8 }}{{ end }} {{- if $mounts_cinder_volume.volumes }}{{ toYaml $mounts_cinder_volume.volumes | indent 8 }}{{ end }}

View File

@ -12,7 +12,9 @@
# 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 := . }}
{{- if .Values.network.api.ingress.public }} {{- if .Values.network.api.ingress.public }}
---
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Ingress kind: Ingress
metadata: metadata:

View File

@ -12,9 +12,10 @@
# 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.
{{- if .Values.bootstrap.enabled }}
{{- $envAll := . }} {{- $envAll := . }}
{{- if .Values.bootstrap.enabled }}
{{- $dependencies := .Values.dependencies.bootstrap }} {{- $dependencies := .Values.dependencies.bootstrap }}
---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
metadata: metadata:
@ -31,15 +32,7 @@ spec:
- name: cinder-bootstrap - name: cinder-bootstrap
image: {{ .Values.images.bootstrap }} image: {{ .Values.images.bootstrap }}
imagePullPolicy: {{ .Values.images.pull_policy }} imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }} {{ tuple $envAll $envAll.Values.resources.jobs.bootstrap | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
resources:
requests:
memory: {{ .Values.resources.bootstrap.requests.memory | quote }}
cpu: {{ .Values.resources.bootstrap.requests.cpu | quote }}
limits:
memory: {{ .Values.resources.bootstrap.limits.memory | quote }}
cpu: {{ .Values.resources.bootstrap.limits.cpu | quote }}
{{- end }}
command: command:
- /tmp/bootstrap.sh - /tmp/bootstrap.sh
env: env:

View File

@ -14,6 +14,7 @@
{{- $envAll := . }} {{- $envAll := . }}
{{- $dependencies := .Values.dependencies.db_init }} {{- $dependencies := .Values.dependencies.db_init }}
---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
metadata: metadata:
@ -30,15 +31,7 @@ spec:
- name: cinder-db-init - name: cinder-db-init
image: {{ .Values.images.db_init | quote }} image: {{ .Values.images.db_init | quote }}
imagePullPolicy: {{ .Values.images.pull_policy | quote }} imagePullPolicy: {{ .Values.images.pull_policy | quote }}
{{- if .Values.resources.enabled }} {{ tuple $envAll $envAll.Values.resources.jobs.db_init | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
resources:
requests:
memory: {{ .Values.resources.cinder_db_init.requests.memory | quote }}
cpu: {{ .Values.resources.cinder_db_init.requests.cpu | quote }}
limits:
memory: {{ .Values.resources.cinder_db_init.limits.memory | quote }}
cpu: {{ .Values.resources.cinder_db_init.limits.cpu | quote }}
{{- end }}
env: env:
- name: ROOT_DB_CONNECTION - name: ROOT_DB_CONNECTION
valueFrom: valueFrom:

View File

@ -14,6 +14,7 @@
{{- $envAll := . }} {{- $envAll := . }}
{{- $dependencies := .Values.dependencies.db_sync }} {{- $dependencies := .Values.dependencies.db_sync }}
---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
metadata: metadata:
@ -30,15 +31,7 @@ spec:
- name: cinder-db-sync - name: cinder-db-sync
image: {{ .Values.images.db_sync }} image: {{ .Values.images.db_sync }}
imagePullPolicy: {{ .Values.images.pull_policy }} imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }} {{ tuple $envAll $envAll.Values.resources.jobs.db_sync | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
resources:
requests:
memory: {{ .Values.resources.cinder_db_sync.requests.memory | quote }}
cpu: {{ .Values.resources.cinder_db_sync.requests.cpu | quote }}
limits:
memory: {{ .Values.resources.cinder_db_sync.limits.memory | quote }}
cpu: {{ .Values.resources.cinder_db_sync.limits.cpu | quote }}
{{- end }}
command: command:
- /tmp/db-sync.sh - /tmp/db-sync.sh
volumeMounts: volumeMounts:

View File

@ -14,6 +14,7 @@
{{- $envAll := . }} {{- $envAll := . }}
{{- $dependencies := .Values.dependencies.ks_endpoints }} {{- $dependencies := .Values.dependencies.ks_endpoints }}
---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
metadata: metadata:
@ -32,15 +33,7 @@ spec:
- name: {{ $osServiceType }}-ks-endpoints-{{ $osServiceEndPoint }} - name: {{ $osServiceType }}-ks-endpoints-{{ $osServiceEndPoint }}
image: {{ $envAll.Values.images.ks_endpoints }} image: {{ $envAll.Values.images.ks_endpoints }}
imagePullPolicy: {{ $envAll.Values.images.pull_policy }} imagePullPolicy: {{ $envAll.Values.images.pull_policy }}
{{- if $envAll.Values.resources.enabled }} {{ tuple $envAll $envAll.Values.resources.jobs.ks_endpoints | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
resources:
requests:
memory: {{ $envAll.Values.resources.cinder_ks_endpoints.requests.memory | quote }}
cpu: {{ $envAll.Values.resources.cinder_ks_endpoints.requests.cpu | quote }}
limits:
memory: {{ $envAll.Values.resources.cinder_ks_endpoints.limits.memory | quote }}
cpu: {{ $envAll.Values.resources.cinder_ks_endpoints.limits.cpu | quote }}
{{- end }}
command: command:
- /tmp/ks-endpoints.sh - /tmp/ks-endpoints.sh
volumeMounts: volumeMounts:

View File

@ -14,6 +14,7 @@
{{- $envAll := . }} {{- $envAll := . }}
{{- $dependencies := .Values.dependencies.ks_service }} {{- $dependencies := .Values.dependencies.ks_service }}
---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
metadata: metadata:
@ -31,15 +32,7 @@ spec:
- name: {{ $osServiceType }}-ks-service-registration - name: {{ $osServiceType }}-ks-service-registration
image: {{ $envAll.Values.images.ks_service }} image: {{ $envAll.Values.images.ks_service }}
imagePullPolicy: {{ $envAll.Values.images.pull_policy }} imagePullPolicy: {{ $envAll.Values.images.pull_policy }}
{{- if $envAll.Values.resources.enabled }} {{ tuple $envAll $envAll.Values.resources.jobs.ks_service | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
resources:
requests:
memory: {{ $envAll.Values.resources.cinder_ks_service.requests.memory | quote }}
cpu: {{ $envAll.Values.resources.cinder_ks_service.requests.cpu | quote }}
limits:
memory: {{ $envAll.Values.resources.cinder_ks_service.limits.memory | quote }}
cpu: {{ $envAll.Values.resources.cinder_ks_service.limits.cpu | quote }}
{{- end }}
command: command:
- /tmp/ks-service.sh - /tmp/ks-service.sh
volumeMounts: volumeMounts:

View File

@ -14,6 +14,7 @@
{{- $envAll := . }} {{- $envAll := . }}
{{- $dependencies := .Values.dependencies.ks_user }} {{- $dependencies := .Values.dependencies.ks_user }}
---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
metadata: metadata:
@ -30,15 +31,7 @@ spec:
- name: cinder-ks-user - name: cinder-ks-user
image: {{ .Values.images.ks_user }} image: {{ .Values.images.ks_user }}
imagePullPolicy: {{ .Values.images.pull_policy }} imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }} {{ tuple $envAll $envAll.Values.resources.jobs.ks_user | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
resources:
requests:
memory: {{ .Values.resources.cinder_ks_user.requests.memory | quote }}
cpu: {{ .Values.resources.cinder_ks_user.requests.cpu | quote }}
limits:
memory: {{ .Values.resources.cinder_ks_user.limits.memory | quote }}
cpu: {{ .Values.resources.cinder_ks_user.limits.cpu | quote }}
{{- end }}
command: command:
- /tmp/ks-user.sh - /tmp/ks-user.sh
volumeMounts: volumeMounts:

View File

@ -11,6 +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 := . }} {{- $envAll := . }}
--- ---
apiVersion: policy/v1beta1 apiVersion: policy/v1beta1

View File

@ -16,7 +16,7 @@
{{- $dependencies := .Values.dependencies.tests }} {{- $dependencies := .Values.dependencies.tests }}
{{- $mounts_cinder_tests := .Values.mounts.cinder_tests.cinder_tests }} {{- $mounts_cinder_tests := .Values.mounts.cinder_tests.cinder_tests }}
{{- $mounts_cinder_tests_init := .Values.mounts.cinder_tests.init_container }} {{- $mounts_cinder_tests_init := .Values.mounts.cinder_tests.init_container }}
---
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
metadata: metadata:
@ -31,15 +31,7 @@ spec:
- name: {{.Release.Name}}-token-issue-test - name: {{.Release.Name}}-token-issue-test
image: {{ .Values.images.test }} image: {{ .Values.images.test }}
imagePullPolicy: {{ .Values.images.pull_policy }} imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }} {{ tuple $envAll $envAll.Values.resources.jobs.tests | include "helm-toolkit.snippets.kubernetes_resources" | indent 6 }}
resources:
limits:
cpu: {{ .Values.resources.tests.limits.cpu | quote }}
memory: {{ .Values.resources.tests.limits.memory | quote }}
requests:
cpu: {{ .Values.resources.tests.requests.cpu | quote }}
memory: {{ .Values.resources.tests.requests.memory | quote }}
{{- end }}
env: env:
{{- with $env := dict "ksUserSecret" .Values.secrets.identity.admin }} {{- with $env := dict "ksUserSecret" .Values.secrets.identity.admin }}
{{- include "helm-toolkit.snippets.keystone_openrc_env_vars" $env | indent 8 }} {{- include "helm-toolkit.snippets.keystone_openrc_env_vars" $env | indent 8 }}
@ -60,7 +52,7 @@ spec:
readOnly: true readOnly: true
- name: rally-db - name: rally-db
mountPath: /var/lib/rally mountPath: /var/lib/rally
{{ if $mounts_cinder_tests.volumeMounts }}{{ toYaml $mounts_cinder_tests.volumeMounts | indent 8 }}{{ end }} {{- if $mounts_cinder_tests.volumeMounts }}{{ toYaml $mounts_cinder_tests.volumeMounts | indent 8 }}{{ end }}
volumes: volumes:
- name: cinder-etc - name: cinder-etc
configMap: configMap:
@ -70,4 +62,4 @@ spec:
name: cinder-bin name: cinder-bin
- name: rally-db - name: rally-db
emptyDir: {} emptyDir: {}
{{ if $mounts_cinder_tests.volumes }}{{ toYaml $mounts_cinder_tests.volumes | indent 4 }}{{ end }} {{- if $mounts_cinder_tests.volumes }}{{ toYaml $mounts_cinder_tests.volumes | indent 4 }}{{ end }}

View File

@ -11,6 +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 := . }} {{- $envAll := . }}
{{- range $key1, $userClass := tuple "admin" "user" }} {{- range $key1, $userClass := tuple "admin" "user" }}
{{- $secretName := index $envAll.Values.secrets.oslo_db $userClass }} {{- $secretName := index $envAll.Values.secrets.oslo_db $userClass }}

View File

@ -11,6 +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 := . }} {{- $envAll := . }}
{{- range $key1, $userClass := tuple "admin" "user" }} {{- range $key1, $userClass := tuple "admin" "user" }}
{{- $secretName := index $envAll.Values.secrets.identity $userClass }} {{- $secretName := index $envAll.Values.secrets.identity $userClass }}

View File

@ -11,6 +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 := . }} {{- $envAll := . }}
--- ---
apiVersion: v1 apiVersion: v1

View File

@ -12,7 +12,9 @@
# 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 := . }}
{{- if .Values.network.api.ingress.public }} {{- if .Values.network.api.ingress.public }}
---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:

View File

@ -45,6 +45,7 @@ images:
pull_policy: "IfNotPresent" pull_policy: "IfNotPresent"
upgrades: upgrades:
deployments:
revision_history: 3 revision_history: 3
pod_replacement_strategy: RollingUpdate pod_replacement_strategy: RollingUpdate
rolling_update: rolling_update:
@ -367,83 +368,77 @@ endpoints:
resources: resources:
enabled: false enabled: false
cinder_api: api:
requests: requests:
memory: "124Mi" memory: "128Mi"
cpu: "100m" cpu: "100m"
limits: limits:
memory: "1024Mi" memory: "1024Mi"
cpu: "2000m" cpu: "2000m"
cinder_bootstrap: scheduler:
requests: requests:
memory: "124Mi" memory: "128Mi"
cpu: "100m" cpu: "100m"
limits: limits:
memory: "1024Mi" memory: "1024Mi"
cpu: "2000m" cpu: "2000m"
cinder_scheduler: volume:
requests: requests:
memory: "124Mi" memory: "128Mi"
cpu: "100m" cpu: "100m"
limits: limits:
memory: "1024Mi" memory: "1024Mi"
cpu: "2000m" cpu: "2000m"
cinder_volume: jobs:
bootstrap:
requests: requests:
memory: "124Mi" memory: "128Mi"
cpu: "100m" cpu: "100m"
limits: limits:
memory: "1024Mi" memory: "1024Mi"
cpu: "2000m" cpu: "2000m"
cinder_backup: db_init:
requests: requests:
memory: "124Mi" memory: "128Mi"
cpu: "100m" cpu: "100m"
limits: limits:
memory: "1024Mi" memory: "1024Mi"
cpu: "2000m" cpu: "2000m"
cinder_db_init: db_sync:
requests: requests:
memory: "124Mi" memory: "128Mi"
cpu: "100m" cpu: "100m"
limits: limits:
memory: "1024Mi" memory: "1024Mi"
cpu: "2000m" cpu: "2000m"
cinder_db_sync: ks_endpoints:
requests: requests:
memory: "124Mi" memory: "128Mi"
cpu: "100m" cpu: "100m"
limits: limits:
memory: "1024Mi" memory: "1024Mi"
cpu: "2000m" cpu: "2000m"
cinder_ks_endpoints: ks_service:
requests: requests:
memory: "124Mi" memory: "128Mi"
cpu: "100m" cpu: "100m"
limits: limits:
memory: "1024Mi" memory: "1024Mi"
cpu: "2000m" cpu: "2000m"
cinder_ks_service: ks_user:
requests: requests:
memory: "124Mi" memory: "128Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
cinder_ks_user:
requests:
memory: "124Mi"
cpu: "100m" cpu: "100m"
limits: limits:
memory: "1024Mi" memory: "1024Mi"
cpu: "2000m" cpu: "2000m"
tests: tests:
limits:
memory: "128Mi"
cpu: "500m"
requests: requests:
memory: "128Mi" memory: "128Mi"
cpu: "500m" cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
mounts: mounts:
cinder_api: cinder_api:

View File

@ -12,6 +12,8 @@
# 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: ConfigMap kind: ConfigMap
metadata: metadata:

View File

@ -11,6 +11,9 @@
# 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 := . }}
{{- include "glance.conf.glance_values_skeleton" .Values.conf.glance | trunc 0 -}} {{- include "glance.conf.glance_values_skeleton" .Values.conf.glance | trunc 0 -}}
{{- include "glance.conf.glance_registry_values_skeleton" .Values.conf.glance_registry | trunc 0 -}} {{- include "glance.conf.glance_registry_values_skeleton" .Values.conf.glance_registry | trunc 0 -}}
@ -104,7 +107,7 @@
{{- tuple "image" "public" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.glance.default.glance.api "public_endpoint" | quote | trunc 0 -}} {{- tuple "image" "public" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.glance.default.glance.api "public_endpoint" | quote | trunc 0 -}}
{{- end -}} {{- end -}}
---
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:

View File

@ -23,14 +23,7 @@ metadata:
name: glance-api name: glance-api
spec: spec:
replicas: {{ .Values.replicas.api }} replicas: {{ .Values.replicas.api }}
revisionHistoryLimit: {{ .Values.upgrades.revision_history }} {{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
strategy:
type: {{ .Values.upgrades.pod_replacement_strategy }}
{{ if eq .Values.upgrades.pod_replacement_strategy "RollingUpdate" }}
rollingUpdate:
maxUnavailable: {{ .Values.upgrades.rolling_update.max_unavailable }}
maxSurge: {{ .Values.upgrades.rolling_update.max_surge }}
{{ end }}
template: template:
metadata: metadata:
labels: labels:
@ -52,15 +45,7 @@ spec:
imagePullPolicy: {{ .Values.images.pull_policy }} imagePullPolicy: {{ .Values.images.pull_policy }}
securityContext: securityContext:
runAsUser: 0 runAsUser: 0
{{- if .Values.resources.enabled }} {{ tuple $envAll $envAll.Values.resources.api | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
resources:
limits:
cpu: {{ .Values.resources.api.limits.cpu | quote }}
memory: {{ .Values.resources.api.limits.memory | quote }}
requests:
cpu: {{ .Values.resources.api.requests.cpu | quote }}
memory: {{ .Values.resources.api.requests.memory | quote }}
{{- end }}
command: command:
- chown - chown
- -R - -R
@ -91,15 +76,7 @@ spec:
- name: glance-api - name: glance-api
image: {{ .Values.images.api }} image: {{ .Values.images.api }}
imagePullPolicy: {{ .Values.images.pull_policy }} imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }} {{ tuple $envAll $envAll.Values.resources.api | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
resources:
limits:
cpu: {{ .Values.resources.api.limits.cpu | quote }}
memory: {{ .Values.resources.api.limits.memory | quote }}
requests:
cpu: {{ .Values.resources.api.requests.cpu | quote }}
memory: {{ .Values.resources.api.requests.memory | quote }}
{{- end }}
command: command:
- /tmp/glance-api.sh - /tmp/glance-api.sh
- start - start
@ -148,7 +125,7 @@ spec:
subPath: key subPath: key
readOnly: true readOnly: true
{{- end }} {{- end }}
{{ if $mounts_glance_api.volumeMounts }}{{ toYaml $mounts_glance_api.volumeMounts | indent 12 }}{{ end }} {{- if $mounts_glance_api.volumeMounts }}{{ toYaml $mounts_glance_api.volumeMounts | indent 12 }}{{ end }}
volumes: volumes:
- name: etcglance - name: etcglance
emptyDir: {} emptyDir: {}
@ -173,4 +150,4 @@ spec:
secret: secret:
secretName: pvc-ceph-client-key secretName: pvc-ceph-client-key
{{- end }} {{- end }}
{{ if $mounts_glance_api.volumes }}{{ toYaml $mounts_glance_api.volumes | indent 8 }}{{ end }} {{- if $mounts_glance_api.volumes }}{{ toYaml $mounts_glance_api.volumes | indent 8 }}{{ end }}

View File

@ -23,6 +23,7 @@ metadata:
name: glance-registry name: glance-registry
spec: spec:
replicas: {{ .Values.replicas.registry }} replicas: {{ .Values.replicas.registry }}
{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
template: template:
metadata: metadata:
labels: labels:
@ -42,15 +43,7 @@ spec:
- name: glance-registry - name: glance-registry
image: {{ .Values.images.registry }} image: {{ .Values.images.registry }}
imagePullPolicy: {{ .Values.images.pull_policy }} imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }} {{ tuple $envAll $envAll.Values.resources.registry | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
resources:
limits:
cpu: {{ .Values.resources.registry.limits.cpu | quote }}
memory: {{ .Values.resources.registry.limits.memory | quote }}
requests:
cpu: {{ .Values.resources.registry.requests.cpu | quote }}
memory: {{ .Values.resources.registry.requests.memory | quote }}
{{- end }}
command: command:
- /tmp/glance-registry.sh - /tmp/glance-registry.sh
- start - start
@ -84,7 +77,7 @@ spec:
mountPath: /etc/glance/policy.json mountPath: /etc/glance/policy.json
subPath: policy.json subPath: policy.json
readOnly: true readOnly: true
{{ if $mounts_glance_registry.volumeMounts }}{{ toYaml $mounts_glance_registry.volumeMounts | indent 12 }}{{ end }} {{- if $mounts_glance_registry.volumeMounts }}{{ toYaml $mounts_glance_registry.volumeMounts | indent 12 }}{{ end }}
volumes: volumes:
- name: etcglance - name: etcglance
emptyDir: {} emptyDir: {}
@ -95,4 +88,4 @@ spec:
- name: glance-etc - name: glance-etc
configMap: configMap:
name: glance-etc name: glance-etc
{{ if $mounts_glance_registry.volumes }}{{ toYaml $mounts_glance_registry.volumes | indent 8 }}{{ end }} {{- if $mounts_glance_registry.volumes }}{{ toYaml $mounts_glance_registry.volumes | indent 8 }}{{ end }}

View File

@ -12,7 +12,9 @@
# 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 := . }}
{{- if .Values.network.api.ingress.public }} {{- if .Values.network.api.ingress.public }}
---
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Ingress kind: Ingress
metadata: metadata:

View File

@ -12,7 +12,9 @@
# 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 := . }}
{{- if .Values.network.registry.ingress.public }} {{- if .Values.network.registry.ingress.public }}
---
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Ingress kind: Ingress
metadata: metadata:

View File

@ -31,15 +31,7 @@ spec:
- name: glance-bootstrap - name: glance-bootstrap
image: {{ .Values.images.bootstrap }} image: {{ .Values.images.bootstrap }}
imagePullPolicy: {{ .Values.images.pull_policy }} imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }} {{ tuple $envAll $envAll.Values.resources.jobs.bootstrap | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
resources:
limits:
cpu: {{ .Values.resources.jobs.bootstrap.limits.cpu | quote }}
memory: {{ .Values.resources.jobs.bootstrap.limits.memory | quote }}
requests:
cpu: {{ .Values.resources.jobs.bootstrap.requests.cpu | quote }}
memory: {{ .Values.resources.jobs.bootstrap.requests.memory | quote }}
{{- end }}
env: env:
{{- with $env := dict "ksUserSecret" .Values.secrets.identity.admin }} {{- with $env := dict "ksUserSecret" .Values.secrets.identity.admin }}
{{- include "helm-toolkit.snippets.keystone_openrc_env_vars" $env | indent 12 }} {{- include "helm-toolkit.snippets.keystone_openrc_env_vars" $env | indent 12 }}

View File

@ -14,6 +14,7 @@
{{- $envAll := . }} {{- $envAll := . }}
{{- $dependencies := .Values.dependencies.db_init }} {{- $dependencies := .Values.dependencies.db_init }}
---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
metadata: metadata:
@ -30,15 +31,7 @@ spec:
- name: glance-db-init - name: glance-db-init
image: {{ .Values.images.db_init }} image: {{ .Values.images.db_init }}
imagePullPolicy: {{ .Values.images.pull_policy }} imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }} {{ tuple $envAll $envAll.Values.resources.jobs.db_init | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
resources:
limits:
cpu: {{ .Values.resources.jobs.init.limits.cpu | quote }}
memory: {{ .Values.resources.jobs.init.limits.memory | quote }}
requests:
cpu: {{ .Values.resources.jobs.init.requests.cpu | quote }}
memory: {{ .Values.resources.jobs.init.requests.memory | quote }}
{{- end }}
env: env:
- name: ROOT_DB_CONNECTION - name: ROOT_DB_CONNECTION
valueFrom: valueFrom:

View File

@ -14,6 +14,7 @@
{{- $envAll := . }} {{- $envAll := . }}
{{- $dependencies := .Values.dependencies.db_sync }} {{- $dependencies := .Values.dependencies.db_sync }}
---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
metadata: metadata:
@ -30,15 +31,7 @@ spec:
- name: glance-db-sync - name: glance-db-sync
image: {{ .Values.images.db_sync }} image: {{ .Values.images.db_sync }}
imagePullPolicy: {{ .Values.images.pull_policy }} imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }} {{ tuple $envAll $envAll.Values.resources.jobs.db_sync | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
resources:
limits:
cpu: {{ .Values.resources.jobs.db.limits.cpu | quote }}
memory: {{ .Values.resources.jobs.db.limits.memory | quote }}
requests:
cpu: {{ .Values.resources.jobs.db.requests.cpu | quote }}
memory: {{ .Values.resources.jobs.db.requests.memory | quote }}
{{- end }}
command: command:
- /tmp/db-sync.sh - /tmp/db-sync.sh
volumeMounts: volumeMounts:

View File

@ -14,6 +14,7 @@
{{- $envAll := . }} {{- $envAll := . }}
{{- $dependencies := .Values.dependencies.ks_endpoints }} {{- $dependencies := .Values.dependencies.ks_endpoints }}
---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
metadata: metadata:
@ -32,15 +33,7 @@ spec:
- name: {{ $osServiceType }}-ks-endpoints-{{ $osServiceEndPoint }} - name: {{ $osServiceType }}-ks-endpoints-{{ $osServiceEndPoint }}
image: {{ $envAll.Values.images.ks_endpoints }} image: {{ $envAll.Values.images.ks_endpoints }}
imagePullPolicy: {{ $envAll.Values.images.pull_policy }} imagePullPolicy: {{ $envAll.Values.images.pull_policy }}
{{- if $envAll.Values.resources.enabled }} {{ tuple $envAll $envAll.Values.resources.jobs.ks_endpoints | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
resources:
requests:
memory: {{ $envAll.Values.resources.glance_ks_endpoints.requests.memory | quote }}
cpu: {{ $envAll.Values.resources.glance_ks_endpoints.requests.cpu | quote }}
limits:
memory: {{ $envAll.Values.resources.glance_ks_endpoints.limits.memory | quote }}
cpu: {{ $envAll.Values.resources.glance_ks_endpoints.limits.cpu | quote }}
{{- end }}
command: command:
- /tmp/ks-endpoints.sh - /tmp/ks-endpoints.sh
volumeMounts: volumeMounts:

View File

@ -11,6 +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 := . }} {{- $envAll := . }}
{{- $dependencies := .Values.dependencies.ks_service }} {{- $dependencies := .Values.dependencies.ks_service }}
--- ---
@ -31,15 +32,7 @@ spec:
- name: {{ $osServiceType }}-ks-service-registration - name: {{ $osServiceType }}-ks-service-registration
image: {{ $envAll.Values.images.ks_service }} image: {{ $envAll.Values.images.ks_service }}
imagePullPolicy: {{ $envAll.Values.images.pull_policy }} imagePullPolicy: {{ $envAll.Values.images.pull_policy }}
{{- if $envAll.Values.resources.enabled }} {{ tuple $envAll $envAll.Values.resources.jobs.ks_service | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
resources:
requests:
memory: {{ $envAll.Values.resources.glance_ks_service.requests.memory | quote }}
cpu: {{ $envAll.Values.resources.glance_ks_service.requests.cpu | quote }}
limits:
memory: {{ $envAll.Values.resources.glance_ks_service.limits.memory | quote }}
cpu: {{ $envAll.Values.resources.glance_ks_service.limits.cpu | quote }}
{{- end }}
command: command:
- /tmp/ks-service.sh - /tmp/ks-service.sh
volumeMounts: volumeMounts:

View File

@ -11,6 +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 := . }} {{- $envAll := . }}
{{- $dependencies := .Values.dependencies.ks_user }} {{- $dependencies := .Values.dependencies.ks_user }}
--- ---
@ -30,15 +31,7 @@ spec:
- name: glance-ks-user - name: glance-ks-user
image: {{ .Values.images.ks_user }} image: {{ .Values.images.ks_user }}
imagePullPolicy: {{ .Values.images.pull_policy }} imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }} {{ tuple $envAll $envAll.Values.resources.jobs.ks_user | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
resources:
requests:
memory: {{ .Values.resources.glance_ks_user.requests.memory | quote }}
cpu: {{ .Values.resources.glance_ks_user.requests.cpu | quote }}
limits:
memory: {{ .Values.resources.glance_ks_user.limits.memory | quote }}
cpu: {{ .Values.resources.glance_ks_user.limits.cpu | quote }}
{{- end }}
command: command:
- /tmp/ks-user.sh - /tmp/ks-user.sh
volumeMounts: volumeMounts:

View File

@ -11,6 +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 := . }} {{- $envAll := . }}
--- ---
apiVersion: policy/v1beta1 apiVersion: policy/v1beta1

View File

@ -11,6 +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 := . }} {{- $envAll := . }}
--- ---
apiVersion: policy/v1beta1 apiVersion: policy/v1beta1

View File

@ -16,7 +16,7 @@
{{- $dependencies := .Values.dependencies.tests }} {{- $dependencies := .Values.dependencies.tests }}
{{- $mounts_glance_tests := .Values.mounts.glance_tests.glance_tests }} {{- $mounts_glance_tests := .Values.mounts.glance_tests.glance_tests }}
{{- $mounts_glance_tests_init := .Values.mounts.glance_tests.init_container }} {{- $mounts_glance_tests_init := .Values.mounts.glance_tests.init_container }}
---
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
metadata: metadata:
@ -31,15 +31,7 @@ spec:
- name: {{.Release.Name}}-token-issue-test - name: {{.Release.Name}}-token-issue-test
image: {{ .Values.images.test }} image: {{ .Values.images.test }}
imagePullPolicy: {{ .Values.images.pull_policy }} imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }} {{ tuple $envAll $envAll.Values.resources.jobs.tests | include "helm-toolkit.snippets.kubernetes_resources" | indent 6 }}
resources:
limits:
cpu: {{ .Values.resources.tests.limits.cpu | quote }}
memory: {{ .Values.resources.tests.limits.memory | quote }}
requests:
cpu: {{ .Values.resources.tests.requests.cpu | quote }}
memory: {{ .Values.resources.tests.requests.memory | quote }}
{{- end }}
env: env:
{{- with $env := dict "ksUserSecret" .Values.secrets.identity.admin }} {{- with $env := dict "ksUserSecret" .Values.secrets.identity.admin }}
{{- include "helm-toolkit.snippets.keystone_openrc_env_vars" $env | indent 8 }} {{- include "helm-toolkit.snippets.keystone_openrc_env_vars" $env | indent 8 }}
@ -60,7 +52,7 @@ spec:
readOnly: true readOnly: true
- name: rally-db - name: rally-db
mountPath: /var/lib/rally mountPath: /var/lib/rally
{{ if $mounts_glance_tests.volumeMounts }}{{ toYaml $mounts_glance_tests.volumeMounts | indent 8 }}{{ end }} {{- if $mounts_glance_tests.volumeMounts }}{{ toYaml $mounts_glance_tests.volumeMounts | indent 8 }}{{ end }}
volumes: volumes:
- name: glance-etc - name: glance-etc
configMap: configMap:
@ -70,4 +62,4 @@ spec:
name: glance-bin name: glance-bin
- name: rally-db - name: rally-db
emptyDir: {} emptyDir: {}
{{ if $mounts_glance_tests.volumes }}{{ toYaml $mounts_glance_tests.volumes | indent 4 }}{{ end }} {{- if $mounts_glance_tests.volumes }}{{ toYaml $mounts_glance_tests.volumes | indent 4 }}{{ end }}

View File

@ -12,7 +12,9 @@
# 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 := . }}
{{- if eq .Values.storage "pvc" }} {{- if eq .Values.storage "pvc" }}
---
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
apiVersion: v1 apiVersion: v1
metadata: metadata:

View File

@ -11,6 +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 := . }} {{- $envAll := . }}
{{- range $key1, $userClass := tuple "admin" "user" }} {{- range $key1, $userClass := tuple "admin" "user" }}
{{- $secretName := index $envAll.Values.secrets.oslo_db $userClass }} {{- $secretName := index $envAll.Values.secrets.oslo_db $userClass }}

View File

@ -11,6 +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 := . }} {{- $envAll := . }}
{{- range $key1, $userClass := tuple "admin" "user" }} {{- range $key1, $userClass := tuple "admin" "user" }}
{{- $secretName := index $envAll.Values.secrets.identity $userClass }} {{- $secretName := index $envAll.Values.secrets.identity $userClass }}

View File

@ -11,6 +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 := . }} {{- $envAll := . }}
--- ---
apiVersion: v1 apiVersion: v1

View File

@ -12,7 +12,9 @@
# 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 := . }}
{{- if .Values.network.api.ingress.public }} {{- if .Values.network.api.ingress.public }}
---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:

View File

@ -12,7 +12,9 @@
# 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 := . }}
{{- if .Values.network.registry.ingress.public }} {{- if .Values.network.registry.ingress.public }}
---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:

View File

@ -11,6 +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 := . }} {{- $envAll := . }}
--- ---
apiVersion: v1 apiVersion: v1

View File

@ -42,6 +42,7 @@ images:
pull_policy: "IfNotPresent" pull_policy: "IfNotPresent"
upgrades: upgrades:
deployments:
revision_history: 3 revision_history: 3
pod_replacement_strategy: RollingUpdate pod_replacement_strategy: RollingUpdate
rolling_update: rolling_update:
@ -158,55 +159,69 @@ volume:
resources: resources:
enabled: false enabled: false
api: api:
requests:
memory: "128Mi"
cpu: "100m"
limits: limits:
memory: "1024Mi" memory: "1024Mi"
cpu: "2000m" cpu: "2000m"
requests:
memory: "128Mi"
cpu: "500m"
registry: registry:
requests:
memory: "128Mi"
cpu: "100m"
limits: limits:
memory: "1024Mi" memory: "1024Mi"
cpu: "2000m" cpu: "2000m"
requests:
memory: "128Mi"
cpu: "500m"
jobs: jobs:
db: db_sync:
requests:
memory: "128Mi"
cpu: "100m"
limits: limits:
memory: "1024Mi" memory: "1024Mi"
cpu: "2000m" cpu: "2000m"
db_init:
requests: requests:
memory: "128Mi" memory: "128Mi"
cpu: "500m" cpu: "100m"
init:
limits: limits:
memory: "1024Mi" memory: "1024Mi"
cpu: "2000m" cpu: "2000m"
ks_user:
requests: requests:
memory: "128Mi" memory: "128Mi"
cpu: "500m" cpu: "100m"
post:
limits: limits:
memory: "1024Mi" memory: "1024Mi"
cpu: "2000m" cpu: "2000m"
ks_service:
requests: requests:
memory: "128Mi" memory: "128Mi"
cpu: "500m" cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
ks_endpoints:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
bootstrap: bootstrap:
requests:
memory: "128Mi"
cpu: "100m"
limits: limits:
memory: "1024Mi" memory: "1024Mi"
cpu: "2000m" cpu: "2000m"
requests:
memory: "128Mi"
cpu: "500m"
tests: tests:
requests:
memory: "128Mi"
cpu: "100m"
limits: limits:
memory: "1024Mi" memory: "1024Mi"
cpu: "2000m" cpu: "2000m"
requests:
memory: "128Mi"
cpu: "500m"
dependencies: dependencies:
db_init: db_init:

View File

@ -12,6 +12,8 @@
# 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: ConfigMap kind: ConfigMap
metadata: metadata:

View File

@ -12,6 +12,8 @@
# 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 := . }}
{{- include "heat.conf.heat_values_skeleton" .Values.conf.heat | trunc 0 -}} {{- include "heat.conf.heat_values_skeleton" .Values.conf.heat | trunc 0 -}}
{{- if empty .Values.conf.heat.keystone_authtoken.keystonemiddleware.auth_token.auth_uri -}} {{- if empty .Values.conf.heat.keystone_authtoken.keystonemiddleware.auth_token.auth_uri -}}
@ -103,6 +105,7 @@
{{- tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | trimSuffix .Values.endpoints.identity.path.default | set .Values.conf.heat.trustee.heat.common.context "auth_url" | quote | trunc 0 -}} {{- tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | trimSuffix .Values.endpoints.identity.path.default | set .Values.conf.heat.trustee.heat.common.context "auth_url" | quote | trunc 0 -}}
{{- end -}} {{- end -}}
---
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:

View File

@ -23,14 +23,7 @@ metadata:
name: heat-api name: heat-api
spec: spec:
replicas: {{ .Values.replicas.api }} replicas: {{ .Values.replicas.api }}
revisionHistoryLimit: {{ .Values.upgrades.revision_history }} {{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
strategy:
type: {{ .Values.upgrades.pod_replacement_strategy }}
{{ if eq .Values.upgrades.pod_replacement_strategy "RollingUpdate" }}
rollingUpdate:
maxUnavailable: {{ .Values.upgrades.rolling_update.max_unavailable }}
maxSurge: {{ .Values.upgrades.rolling_update.max_surge }}
{{ end }}
template: template:
metadata: metadata:
labels: labels:
@ -50,15 +43,7 @@ spec:
- name: heat-api - name: heat-api
image: {{ .Values.images.api }} image: {{ .Values.images.api }}
imagePullPolicy: {{ .Values.images.pull_policy }} imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }} {{ tuple $envAll $envAll.Values.resources.api | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
resources:
requests:
memory: {{ .Values.resources.heat_api.requests.memory | quote }}
cpu: {{ .Values.resources.heat_api.requests.cpu | quote }}
limits:
memory: {{ .Values.resources.heat_api.limits.memory | quote }}
cpu: {{ .Values.resources.heat_api.limits.cpu | quote }}
{{- end }}
command: command:
- /tmp/heat-api.sh - /tmp/heat-api.sh
- start - start
@ -94,7 +79,7 @@ spec:
mountPath: /etc/heat/policy.json mountPath: /etc/heat/policy.json
subPath: policy.json subPath: policy.json
readOnly: true readOnly: true
{{ if $mounts_heat_api.volumeMounts }}{{ toYaml $mounts_heat_api.volumeMounts | indent 12 }}{{ end }} {{- if $mounts_heat_api.volumeMounts }}{{ toYaml $mounts_heat_api.volumeMounts | indent 12 }}{{ end }}
volumes: volumes:
- name: pod-etc-heat - name: pod-etc-heat
emptyDir: {} emptyDir: {}
@ -107,4 +92,4 @@ spec:
- name: heat-etc - name: heat-etc
configMap: configMap:
name: heat-etc name: heat-etc
{{ if $mounts_heat_api.volumes }}{{ toYaml $mounts_heat_api.volumes | indent 8 }}{{ end }} {{- if $mounts_heat_api.volumes }}{{ toYaml $mounts_heat_api.volumes | indent 8 }}{{ end }}

View File

@ -23,14 +23,7 @@ metadata:
name: heat-cfn name: heat-cfn
spec: spec:
replicas: {{ .Values.replicas.cfn }} replicas: {{ .Values.replicas.cfn }}
revisionHistoryLimit: {{ .Values.upgrades.revision_history }} {{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
strategy:
type: {{ .Values.upgrades.pod_replacement_strategy }}
{{ if eq .Values.upgrades.pod_replacement_strategy "RollingUpdate" }}
rollingUpdate:
maxUnavailable: {{ .Values.upgrades.rolling_update.max_unavailable }}
maxSurge: {{ .Values.upgrades.rolling_update.max_surge }}
{{ end }}
template: template:
metadata: metadata:
labels: labels:
@ -50,15 +43,7 @@ spec:
- name: heat-cfn - name: heat-cfn
image: {{ .Values.images.cfn }} image: {{ .Values.images.cfn }}
imagePullPolicy: {{ .Values.images.pull_policy }} imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }} {{ tuple $envAll $envAll.Values.resources.cfn | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
resources:
requests:
memory: {{ .Values.resources.heat_cfn.requests.memory | quote }}
cpu: {{ .Values.resources.heat_cfn.requests.cpu | quote }}
limits:
memory: {{ .Values.resources.heat_cfn.limits.memory | quote }}
cpu: {{ .Values.resources.heat_cfn.limits.cpu | quote }}
{{- end }}
command: command:
- /tmp/heat-cfn.sh - /tmp/heat-cfn.sh
- start - start
@ -94,7 +79,7 @@ spec:
mountPath: /etc/heat/policy.json mountPath: /etc/heat/policy.json
subPath: policy.json subPath: policy.json
readOnly: true readOnly: true
{{ if $mounts_heat_cfn.volumeMounts }}{{ toYaml $mounts_heat_cfn.volumeMounts | indent 12 }}{{ end }} {{- if $mounts_heat_cfn.volumeMounts }}{{ toYaml $mounts_heat_cfn.volumeMounts | indent 12 }}{{ end }}
volumes: volumes:
- name: pod-etc-heat - name: pod-etc-heat
emptyDir: {} emptyDir: {}
@ -107,4 +92,4 @@ spec:
- name: heat-etc - name: heat-etc
configMap: configMap:
name: heat-etc name: heat-etc
{{ if $mounts_heat_cfn.volumes }}{{ toYaml $mounts_heat_cfn.volumes | indent 8 }}{{ end }} {{- if $mounts_heat_cfn.volumes }}{{ toYaml $mounts_heat_cfn.volumes | indent 8 }}{{ end }}

View File

@ -23,14 +23,7 @@ metadata:
name: heat-cloudwatch name: heat-cloudwatch
spec: spec:
replicas: {{ .Values.replicas.cloudwatch }} replicas: {{ .Values.replicas.cloudwatch }}
revisionHistoryLimit: {{ .Values.upgrades.revision_history }} {{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
strategy:
type: {{ .Values.upgrades.pod_replacement_strategy }}
{{ if eq .Values.upgrades.pod_replacement_strategy "RollingUpdate" }}
rollingUpdate:
maxUnavailable: {{ .Values.upgrades.rolling_update.max_unavailable }}
maxSurge: {{ .Values.upgrades.rolling_update.max_surge }}
{{ end }}
template: template:
metadata: metadata:
labels: labels:
@ -50,15 +43,7 @@ spec:
- name: heat-cloudwatch - name: heat-cloudwatch
image: {{ .Values.images.cloudwatch }} image: {{ .Values.images.cloudwatch }}
imagePullPolicy: {{ .Values.images.pull_policy }} imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }} {{ tuple $envAll $envAll.Values.resources.cloudwatch | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
resources:
requests:
memory: {{ .Values.resources.heat_cloudwatch.requests.memory | quote }}
cpu: {{ .Values.resources.heat_cloudwatch.requests.cpu | quote }}
limits:
memory: {{ .Values.resources.heat_cloudwatch.limits.memory | quote }}
cpu: {{ .Values.resources.heat_cloudwatch.limits.cpu | quote }}
{{- end }}
command: command:
- /tmp/heat-cloudwatch.sh - /tmp/heat-cloudwatch.sh
- start - start
@ -94,7 +79,7 @@ spec:
mountPath: /etc/heat/policy.json mountPath: /etc/heat/policy.json
subPath: policy.json subPath: policy.json
readOnly: true readOnly: true
{{ if $mounts_heat_cloudwatch.volumeMounts }}{{ toYaml $mounts_heat_cloudwatch.volumeMounts | indent 12 }}{{ end }} {{- if $mounts_heat_cloudwatch.volumeMounts }}{{ toYaml $mounts_heat_cloudwatch.volumeMounts | indent 12 }}{{ end }}
volumes: volumes:
- name: pod-etc-heat - name: pod-etc-heat
emptyDir: {} emptyDir: {}
@ -107,4 +92,4 @@ spec:
- name: heat-etc - name: heat-etc
configMap: configMap:
name: heat-etc name: heat-etc
{{ if $mounts_heat_cloudwatch.volumes }}{{ toYaml $mounts_heat_cloudwatch.volumes | indent 8 }}{{ end }} {{- if $mounts_heat_cloudwatch.volumes }}{{ toYaml $mounts_heat_cloudwatch.volumes | indent 8 }}{{ end }}

View File

@ -12,7 +12,9 @@
# 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 := . }}
{{- if .Values.network.api.ingress.public }} {{- if .Values.network.api.ingress.public }}
---
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Ingress kind: Ingress
metadata: metadata:

View File

@ -12,7 +12,9 @@
# 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 := . }}
{{- if .Values.network.cfn.ingress.public }} {{- if .Values.network.cfn.ingress.public }}
---
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Ingress kind: Ingress
metadata: metadata:

View File

@ -12,7 +12,9 @@
# 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 := . }}
{{- if .Values.network.cloudwatch.ingress.public }} {{- if .Values.network.cloudwatch.ingress.public }}
---
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Ingress kind: Ingress
metadata: metadata:

View File

@ -14,6 +14,7 @@
{{- $envAll := . }} {{- $envAll := . }}
{{- $dependencies := .Values.dependencies.db_init }} {{- $dependencies := .Values.dependencies.db_init }}
---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
metadata: metadata:
@ -30,15 +31,7 @@ spec:
- name: heat-db-init - name: heat-db-init
image: {{ .Values.images.db_init | quote }} image: {{ .Values.images.db_init | quote }}
imagePullPolicy: {{ .Values.images.pull_policy | quote }} imagePullPolicy: {{ .Values.images.pull_policy | quote }}
{{- if .Values.resources.enabled }} {{ tuple $envAll $envAll.Values.resources.jobs.db_init | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
resources:
requests:
memory: {{ .Values.resources.heat_db_init.requests.memory | quote }}
cpu: {{ .Values.resources.heat_db_init.requests.cpu | quote }}
limits:
memory: {{ .Values.resources.heat_db_init.limits.memory | quote }}
cpu: {{ .Values.resources.heat_db_init.limits.cpu | quote }}
{{- end }}
env: env:
- name: ROOT_DB_CONNECTION - name: ROOT_DB_CONNECTION
valueFrom: valueFrom:

View File

@ -14,6 +14,7 @@
{{- $envAll := . }} {{- $envAll := . }}
{{- $dependencies := .Values.dependencies.db_sync }} {{- $dependencies := .Values.dependencies.db_sync }}
---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
metadata: metadata:
@ -30,15 +31,7 @@ spec:
- name: heat-db-sync - name: heat-db-sync
image: {{ .Values.images.db_sync }} image: {{ .Values.images.db_sync }}
imagePullPolicy: {{ .Values.images.pull_policy }} imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }} {{ tuple $envAll $envAll.Values.resources.jobs.db_sync | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
resources:
requests:
memory: {{ .Values.resources.heat_db_sync.requests.memory | quote }}
cpu: {{ .Values.resources.heat_db_sync.requests.cpu | quote }}
limits:
memory: {{ .Values.resources.heat_db_sync.limits.memory | quote }}
cpu: {{ .Values.resources.heat_db_sync.limits.cpu | quote }}
{{- end }}
command: command:
- /tmp/db-sync.sh - /tmp/db-sync.sh
volumeMounts: volumeMounts:

View File

@ -14,6 +14,7 @@
{{- $envAll := . }} {{- $envAll := . }}
{{- $dependencies := .Values.dependencies.ks_endpoints }} {{- $dependencies := .Values.dependencies.ks_endpoints }}
---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
metadata: metadata:
@ -32,15 +33,7 @@ spec:
- name: {{ $osServiceType }}-ks-endpoints-{{ $osServiceEndPoint }} - name: {{ $osServiceType }}-ks-endpoints-{{ $osServiceEndPoint }}
image: {{ $envAll.Values.images.ks_endpoints }} image: {{ $envAll.Values.images.ks_endpoints }}
imagePullPolicy: {{ $envAll.Values.images.pull_policy }} imagePullPolicy: {{ $envAll.Values.images.pull_policy }}
{{- if $envAll.Values.resources.enabled }} {{ tuple $envAll $envAll.Values.resources.jobs.ks_endpoints | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
resources:
requests:
memory: {{ $envAll.Values.resources.heat_ks_endpoints.requests.memory | quote }}
cpu: {{ $envAll.Values.resources.heat_ks_endpoints.requests.cpu | quote }}
limits:
memory: {{ $envAll.Values.resources.heat_ks_endpoints.limits.memory | quote }}
cpu: {{ $envAll.Values.resources.heat_ks_endpoints.limits.cpu | quote }}
{{- end }}
command: command:
- /tmp/ks-endpoints.sh - /tmp/ks-endpoints.sh
volumeMounts: volumeMounts:

View File

@ -14,6 +14,7 @@
{{- $envAll := . }} {{- $envAll := . }}
{{- $dependencies := .Values.dependencies.ks_service }} {{- $dependencies := .Values.dependencies.ks_service }}
---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
metadata: metadata:
@ -31,15 +32,7 @@ spec:
- name: {{ $osServiceType }}-ks-service-registration - name: {{ $osServiceType }}-ks-service-registration
image: {{ $envAll.Values.images.ks_service }} image: {{ $envAll.Values.images.ks_service }}
imagePullPolicy: {{ $envAll.Values.images.pull_policy }} imagePullPolicy: {{ $envAll.Values.images.pull_policy }}
{{- if $envAll.Values.resources.enabled }} {{ tuple $envAll $envAll.Values.resources.jobs.ks_service | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
resources:
requests:
memory: {{ $envAll.Values.resources.heat_ks_service.requests.memory | quote }}
cpu: {{ $envAll.Values.resources.heat_ks_service.requests.cpu | quote }}
limits:
memory: {{ $envAll.Values.resources.heat_ks_service.limits.memory | quote }}
cpu: {{ $envAll.Values.resources.heat_ks_service.limits.cpu | quote }}
{{- end }}
command: command:
- /tmp/ks-service.sh - /tmp/ks-service.sh
volumeMounts: volumeMounts:

View File

@ -14,7 +14,7 @@
{{- $envAll := . }} {{- $envAll := . }}
{{- $dependencies := .Values.dependencies.ks_user }} {{- $dependencies := .Values.dependencies.ks_user }}
# The heat user management job is a bit different from other services as it also needs to create a stack domain and trusts user ---
apiVersion: batch/v1 apiVersion: batch/v1
kind: Job kind: Job
metadata: metadata:
@ -31,15 +31,7 @@ spec:
- name: heat-ks-user - name: heat-ks-user
image: {{ .Values.images.ks_user }} image: {{ .Values.images.ks_user }}
imagePullPolicy: {{ .Values.images.pull_policy }} imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }} {{ tuple $envAll $envAll.Values.resources.jobs.ks_user | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
resources:
requests:
memory: {{ .Values.resources.heat_ks_user.requests.memory | quote }}
cpu: {{ .Values.resources.heat_ks_user.requests.cpu | quote }}
limits:
memory: {{ .Values.resources.heat_ks_user.limits.memory | quote }}
cpu: {{ .Values.resources.heat_ks_user.limits.cpu | quote }}
{{- end }}
command: command:
- /tmp/ks-user.sh - /tmp/ks-user.sh
volumeMounts: volumeMounts:

View File

@ -11,6 +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 := . }} {{- $envAll := . }}
--- ---
apiVersion: policy/v1beta1 apiVersion: policy/v1beta1

View File

@ -11,6 +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 := . }} {{- $envAll := . }}
--- ---
apiVersion: policy/v1beta1 apiVersion: policy/v1beta1

View File

@ -11,6 +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 := . }} {{- $envAll := . }}
--- ---
apiVersion: policy/v1beta1 apiVersion: policy/v1beta1

View File

@ -11,6 +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 := . }} {{- $envAll := . }}
{{- range $key1, $userClass := tuple "admin" "user" }} {{- range $key1, $userClass := tuple "admin" "user" }}
{{- $secretName := index $envAll.Values.secrets.oslo_db $userClass }} {{- $secretName := index $envAll.Values.secrets.oslo_db $userClass }}

View File

@ -11,6 +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 := . }} {{- $envAll := . }}
{{- range $key1, $userClass := tuple "admin" "user" "trustee" }} {{- range $key1, $userClass := tuple "admin" "user" "trustee" }}
{{- $secretName := index $envAll.Values.secrets.identity $userClass }} {{- $secretName := index $envAll.Values.secrets.identity $userClass }}

View File

@ -11,6 +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 := . }} {{- $envAll := . }}
--- ---
apiVersion: v1 apiVersion: v1

View File

@ -11,6 +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 := . }} {{- $envAll := . }}
--- ---
apiVersion: v1 apiVersion: v1

View File

@ -11,6 +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 := . }} {{- $envAll := . }}
--- ---
apiVersion: v1 apiVersion: v1

View File

@ -12,7 +12,9 @@
# 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 := . }}
{{- if .Values.network.api.ingress.public }} {{- if .Values.network.api.ingress.public }}
---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:

View File

@ -12,7 +12,9 @@
# 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 := . }}
{{- if .Values.network.cfn.ingress.public }} {{- if .Values.network.cfn.ingress.public }}
---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:

View File

@ -12,7 +12,9 @@
# 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 := . }}
{{- if .Values.network.cloudwatch.ingress.public }} {{- if .Values.network.cloudwatch.ingress.public }}
---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:

View File

@ -39,15 +39,7 @@ spec:
- name: heat-engine - name: heat-engine
image: {{ .Values.images.engine }} image: {{ .Values.images.engine }}
imagePullPolicy: {{ .Values.images.pull_policy }} imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }} {{ tuple $envAll $envAll.Values.resources.engine | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
resources:
requests:
memory: {{ .Values.resources.heat_engine.requests.memory | quote }}
cpu: {{ .Values.resources.heat_engine.requests.cpu | quote }}
limits:
memory: {{ .Values.resources.heat_engine.limits.memory | quote }}
cpu: {{ .Values.resources.heat_engine.limits.cpu | quote }}
{{- end }}
command: command:
- /tmp/heat-engine.sh - /tmp/heat-engine.sh
volumeMounts: volumeMounts:
@ -67,7 +59,7 @@ spec:
mountPath: /etc/heat/policy.json mountPath: /etc/heat/policy.json
subPath: policy.json subPath: policy.json
readOnly: true readOnly: true
{{ if $mounts_heat_engine.volumeMounts }}{{ toYaml $mounts_heat_engine.volumeMounts | indent 12 }}{{ end }} {{- if $mounts_heat_engine.volumeMounts }}{{ toYaml $mounts_heat_engine.volumeMounts | indent 12 }}{{ end }}
volumes: volumes:
- name: pod-etc-heat - name: pod-etc-heat
emptyDir: {} emptyDir: {}
@ -80,4 +72,4 @@ spec:
- name: heat-etc - name: heat-etc
configMap: configMap:
name: heat-etc name: heat-etc
{{ if $mounts_heat_engine.volumes }}{{ toYaml $mounts_heat_engine.volumes | indent 8 }}{{ end }} {{- if $mounts_heat_engine.volumes }}{{ toYaml $mounts_heat_engine.volumes | indent 8 }}{{ end }}

View File

@ -42,6 +42,7 @@ images:
pull_policy: "IfNotPresent" pull_policy: "IfNotPresent"
upgrades: upgrades:
deployments:
revision_history: 3 revision_history: 3
pod_replacement_strategy: RollingUpdate pod_replacement_strategy: RollingUpdate
rolling_update: rolling_update:
@ -350,65 +351,80 @@ endpoints:
resources: resources:
enabled: false enabled: false
heat_api: api:
requests: requests:
memory: "124Mi" memory: "128Mi"
cpu: "100m" cpu: "100m"
limits: limits:
memory: "1024Mi" memory: "1024Mi"
cpu: "2000m" cpu: "2000m"
heat_cfn: cfn:
requests: requests:
memory: "124Mi" memory: "128Mi"
cpu: "100m" cpu: "100m"
limits: limits:
memory: "1024Mi" memory: "1024Mi"
cpu: "2000m" cpu: "2000m"
heat_cloudwatch: cloudwatch:
requests: requests:
memory: "124Mi" memory: "128Mi"
cpu: "100m" cpu: "100m"
limits: limits:
memory: "1024Mi" memory: "1024Mi"
cpu: "2000m" cpu: "2000m"
heat_db_init: engine:
requests: requests:
memory: "124Mi" memory: "128Mi"
cpu: "100m" cpu: "100m"
limits: limits:
memory: "1024Mi" memory: "1024Mi"
cpu: "2000m" cpu: "2000m"
heat_db_sync: jobs:
bootstrap:
requests: requests:
memory: "124Mi" memory: "128Mi"
cpu: "100m" cpu: "100m"
limits: limits:
memory: "1024Mi" memory: "1024Mi"
cpu: "2000m" cpu: "2000m"
heat_ks_endpoints: db_init:
requests: requests:
memory: "124Mi" memory: "128Mi"
cpu: "100m" cpu: "100m"
limits: limits:
memory: "1024Mi" memory: "1024Mi"
cpu: "2000m" cpu: "2000m"
heat_ks_service: db_sync:
requests: requests:
memory: "124Mi" memory: "128Mi"
cpu: "100m" cpu: "100m"
limits: limits:
memory: "1024Mi" memory: "1024Mi"
cpu: "2000m" cpu: "2000m"
heat_ks_user: ks_endpoints:
requests: requests:
memory: "124Mi" memory: "128Mi"
cpu: "100m" cpu: "100m"
limits: limits:
memory: "1024Mi" memory: "1024Mi"
cpu: "2000m" cpu: "2000m"
heat_engine: ks_service:
requests: requests:
memory: "124Mi" memory: "128Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
ks_user:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
tests:
requests:
memory: "128Mi"
cpu: "100m" cpu: "100m"
limits: limits:
memory: "1024Mi" memory: "1024Mi"

View File

@ -0,0 +1,27 @@
# 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_resources" -}}
{{- $envAll := index . 0 -}}
{{- $component := index . 1 -}}
{{- if $envAll.Values.resources.enabled -}}
resources:
limits:
cpu: {{ $component.limits.cpu | quote }}
memory: {{ $component.limits.memory | quote }}
requests:
cpu: {{ $component.requests.cpu | quote }}
memory: {{ $component.requests.memory | quote }}
{{- end -}}
{{- end -}}

View File

@ -0,0 +1,32 @@
# 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_upgrades_daemonset" -}}
{{- $envAll := index . 0 -}}
{{- $component := index . 1 -}}
{{- $upgradeMap := index $envAll.Values.upgrades.daemonsets $component }}
{{- with $upgradeMap -}}
{{- if .enabled }}
minReadySeconds: {{ .min_ready_seconds }}
updateStrategy:
type: {{ .pod_replacement_strategy }}
{{- if .pod_replacement_strategy }}
{{- if eq .pod_replacement_strategy "RollingUpdate" }}
rollingUpdate:
maxUnavailable: {{ .max_unavailable }}
{{- end }}
{{- end }}
{{- end }}
{{- end -}}
{{- end -}}

View File

@ -0,0 +1,27 @@
# 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_upgrades_deployment" -}}
{{- $envAll := index . 0 -}}
{{- with $envAll.Values.upgrades.deployments -}}
revisionHistoryLimit: {{ .revision_history }}
strategy:
type: {{ .pod_replacement_strategy }}
{{- if eq .pod_replacement_strategy "RollingUpdate" }}
rollingUpdate:
maxUnavailable: {{ .rolling_update.max_unavailable }}
maxSurge: {{ .rolling_update.max_surge }}
{{- end }}
{{- end -}}
{{- end -}}

View File

@ -12,6 +12,8 @@
# 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: ConfigMap kind: ConfigMap
metadata: metadata:

View File

@ -12,6 +12,8 @@
# 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: ConfigMap kind: ConfigMap
metadata: metadata:

View File

@ -23,14 +23,7 @@ metadata:
name: horizon name: horizon
spec: spec:
replicas: {{ .Values.replicas }} replicas: {{ .Values.replicas }}
revisionHistoryLimit: {{ .Values.upgrades.revision_history }} {{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
strategy:
type: {{ .Values.upgrades.pod_replacement_strategy }}
{{ if eq .Values.upgrades.pod_replacement_strategy "RollingUpdate" }}
rollingUpdate:
maxUnavailable: {{ .Values.upgrades.rolling_update.max_unavailable }}
maxSurge: {{ .Values.upgrades.rolling_update.max_surge }}
{{ end }}
template: template:
metadata: metadata:
labels: labels:
@ -50,15 +43,7 @@ spec:
- name: horizon - name: horizon
image: {{ .Values.images.horizon }} image: {{ .Values.images.horizon }}
imagePullPolicy: {{ .Values.images.pull_policy }} imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }} {{ tuple $envAll $envAll.Values.resources.server | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
resources:
limits:
cpu: {{ .Values.resources.dashboard.limits.cpu | quote }}
memory: {{ .Values.resources.dashboard.limits.memory | quote }}
requests:
cpu: {{ .Values.resources.dashboard.requests.cpu | quote }}
memory: {{ .Values.resources.dashboard.requests.memory | quote }}
{{- end }}
command: command:
- /tmp/horizon.sh - /tmp/horizon.sh
- start - start
@ -86,7 +71,7 @@ spec:
mountPath: /etc/openstack-dashboard/local_settings mountPath: /etc/openstack-dashboard/local_settings
subPath: local_settings subPath: local_settings
readOnly: true readOnly: true
{{ if $mounts_horizon.volumeMounts }}{{ toYaml $mounts_horizon.volumeMounts | indent 12 }}{{ end }} {{- if $mounts_horizon.volumeMounts }}{{ toYaml $mounts_horizon.volumeMounts | indent 12 }}{{ end }}
securityContext: securityContext:
runAsUser: 0 runAsUser: 0
volumes: volumes:
@ -97,4 +82,4 @@ spec:
- name: horizon-etc - name: horizon-etc
configMap: configMap:
name: horizon-etc name: horizon-etc
{{ if $mounts_horizon.volumes }}{{ toYaml $mounts_horizon.volumes | indent 8 }}{{ end }} {{- if $mounts_horizon.volumes }}{{ toYaml $mounts_horizon.volumes | indent 8 }}{{ end }}

View File

@ -12,7 +12,9 @@
# 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 := . }}
{{- if .Values.network.ingress.public }} {{- if .Values.network.ingress.public }}
---
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: Ingress kind: Ingress
metadata: metadata:

View File

@ -11,6 +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 := . }} {{- $envAll := . }}
--- ---
apiVersion: policy/v1beta1 apiVersion: policy/v1beta1

View File

@ -12,7 +12,9 @@
# 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 := . }}
{{- if .Values.network.ingress.public }} {{- if .Values.network.ingress.public }}
---
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:

Some files were not shown because too many files have changed in this diff Show More