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
# limitations under the License.
{{- $envAll := . }}
---
apiVersion: v1
kind: ConfigMap
metadata:

View File

@ -10,6 +10,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
{{- include "barbican.conf.barbican_values_skeleton" .Values.conf.barbican | trunc 0 -}}
{{- 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 -}}
{{- end -}}
---
apiVersion: v1
kind: ConfigMap
metadata:

View File

@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
{{- $dependencies := .Values.dependencies.api }}
{{- $mounts_barbican_api := .Values.mounts.barbican_api.barbican_api }}
@ -22,14 +23,7 @@ metadata:
name: barbican-api
spec:
replicas: {{ .Values.replicas.api }}
revisionHistoryLimit: {{ .Values.upgrades.revision_history }}
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 }}
{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
template:
metadata:
labels:
@ -48,15 +42,7 @@ spec:
- name: barbican-api
image: {{ .Values.images.api }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }}
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 }}
{{ tuple $envAll $envAll.Values.resources.api | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
command:
- /tmp/barbican.sh
- start
@ -98,7 +84,7 @@ spec:
mountPath: /tmp/barbican.sh
subPath: barbican.sh
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:
- name: etcbarbican
emptyDir: {}
@ -109,4 +95,4 @@ spec:
configMap:
name: barbican-bin
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
# limitations under the License.
{{- $envAll := . }}
{{- if .Values.network.api.ingress.public }}
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
---
apiVersion: policy/v1beta1

View File

@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
{{- range $key1, $userClass := tuple "admin" "user" }}
{{- $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.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
{{- range $key1, $userClass := tuple "admin" "user" }}
{{- $secretName := index $envAll.Values.secrets.identity $userClass }}

View File

@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
---
apiVersion: v1

View File

@ -12,7 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
{{- if .Values.network.api.ingress.public }}
---
apiVersion: v1
kind: Service
metadata:

View File

@ -27,11 +27,12 @@ images:
pull_policy: "IfNotPresent"
upgrades:
revision_history: 3
pod_replacement_strategy: RollingUpdate
rolling_update:
max_unavailable: 1
max_surge: 3
deployments:
revision_history: 3
pod_replacement_strategy: RollingUpdate
rolling_update:
max_unavailable: 1
max_surge: 3
pod_disruption_budget:
api:
@ -200,48 +201,63 @@ endpoints:
resources:
enabled: false
db_init:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
db_sync:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
ks_endpoints:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
ks_service:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
ks_user:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
api:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
jobs:
bootstrap:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
db_init:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
db_sync:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
ks_endpoints:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
ks_service:
requests:
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"
limits:
memory: "1024Mi"
cpu: "2000m"
mounts:
barbican_api:

View File

@ -18,7 +18,6 @@
{{- $monHostURI := cat $monHost "." $monHostDomain | nospace -}}
{{- $monHostURI | set .Values.conf.ceph.config.global "mon_host" | quote | trunc 0 -}}
{{- end -}}
---
apiVersion: v1
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 }}
---
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:

View File

@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
---
apiVersion: v1
kind: ConfigMap
metadata:

View File

@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
{{- include "cinder.conf.cinder_values_skeleton" .Values.conf.cinder | trunc 0 -}}
{{- 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 -}}
{{- end -}}
---
apiVersion: v1
kind: ConfigMap
metadata:

View File

@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
{{- $dependencies := .Values.dependencies.api }}
{{- $mounts_cinder_api := .Values.mounts.cinder_api.cinder_api }}
@ -22,14 +23,7 @@ metadata:
name: cinder-api
spec:
replicas: {{ .Values.replicas.api }}
revisionHistoryLimit: {{ .Values.upgrades.revision_history }}
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 }}
{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
template:
metadata:
labels:
@ -49,15 +43,7 @@ spec:
- name: cinder-api
image: {{ .Values.images.api }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }}
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 }}
{{ tuple $envAll $envAll.Values.resources.api | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
command:
- /tmp/cinder-api.sh
- start
@ -90,7 +76,7 @@ spec:
mountPath: /etc/cinder/policy.json
subPath: policy.json
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:
- name: cinder-bin
configMap:
@ -99,4 +85,4 @@ spec:
- name: cinder-etc
configMap:
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.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
{{- $dependencies := .Values.dependencies.backup }}
{{- $mounts_cinder_backup := .Values.mounts.cinder_backup.cinder_backup }}
@ -22,14 +23,7 @@ metadata:
name: cinder-backup
spec:
replicas: {{ .Values.replicas.backup }}
revisionHistoryLimit: {{ .Values.upgrades.revision_history }}
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 }}
{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
template:
metadata:
labels:
@ -65,15 +59,7 @@ spec:
- name: cinder-backup
image: {{ .Values.images.backup }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }}
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 }}
{{ tuple $envAll $envAll.Values.resources.backup | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
command:
- /tmp/cinder-backup.sh
volumeMounts:
@ -97,7 +83,7 @@ spec:
subPath: key
readOnly: true
{{- 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:
- name: cinder-etc
configMap:
@ -116,4 +102,4 @@ spec:
secret:
secretName: pvc-ceph-client-key
{{ 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.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
{{- $dependencies := .Values.dependencies.scheduler }}
{{- $mounts_cinder_scheduler := .Values.mounts.cinder_scheduler.cinder_scheduler }}
@ -22,14 +23,7 @@ metadata:
name: cinder-scheduler
spec:
replicas: {{ .Values.replicas.scheduler }}
revisionHistoryLimit: {{ .Values.upgrades.revision_history }}
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 }}
{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
template:
metadata:
labels:
@ -48,15 +42,7 @@ spec:
- name: cinder-scheduler
image: {{ .Values.images.scheduler }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }}
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 }}
{{ tuple $envAll $envAll.Values.resources.scheduler | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
command:
- /tmp/cinder-scheduler.sh
volumeMounts:
@ -76,7 +62,7 @@ spec:
mountPath: /etc/cinder/policy.json
subPath: policy.json
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:
- name: cinder-bin
configMap:
@ -85,4 +71,4 @@ spec:
- name: cinder-etc
configMap:
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.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
{{- $dependencies := .Values.dependencies.volume }}
{{- $mounts_cinder_volume := .Values.mounts.cinder_volume.cinder_volume }}
@ -22,14 +23,7 @@ metadata:
name: cinder-volume
spec:
replicas: {{ .Values.replicas.volume }}
revisionHistoryLimit: {{ .Values.upgrades.revision_history }}
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 }}
{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
template:
metadata:
labels:
@ -65,15 +59,7 @@ spec:
- name: cinder-volume
image: {{ .Values.images.volume }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }}
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 }}
{{ tuple $envAll $envAll.Values.resources.volume | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
command:
- /tmp/cinder-volume.sh
volumeMounts:
@ -101,7 +87,7 @@ spec:
subPath: key
readOnly: true
{{- 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:
- name: cinder-bin
configMap:
@ -120,4 +106,4 @@ spec:
secret:
secretName: pvc-ceph-client-key
{{ 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
# limitations under the License.
{{- $envAll := . }}
{{- if .Values.network.api.ingress.public }}
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:

View File

@ -12,9 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
{{- if .Values.bootstrap.enabled }}
{{- $envAll := . }}
{{- if .Values.bootstrap.enabled }}
{{- $dependencies := .Values.dependencies.bootstrap }}
---
apiVersion: batch/v1
kind: Job
metadata:
@ -31,15 +32,7 @@ spec:
- name: cinder-bootstrap
image: {{ .Values.images.bootstrap }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }}
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 }}
{{ tuple $envAll $envAll.Values.resources.jobs.bootstrap | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
command:
- /tmp/bootstrap.sh
env:

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
---
apiVersion: policy/v1beta1

View File

@ -16,7 +16,7 @@
{{- $dependencies := .Values.dependencies.tests }}
{{- $mounts_cinder_tests := .Values.mounts.cinder_tests.cinder_tests }}
{{- $mounts_cinder_tests_init := .Values.mounts.cinder_tests.init_container }}
---
apiVersion: v1
kind: Pod
metadata:
@ -31,15 +31,7 @@ spec:
- name: {{.Release.Name}}-token-issue-test
image: {{ .Values.images.test }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }}
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 }}
{{ tuple $envAll $envAll.Values.resources.jobs.tests | include "helm-toolkit.snippets.kubernetes_resources" | indent 6 }}
env:
{{- with $env := dict "ksUserSecret" .Values.secrets.identity.admin }}
{{- include "helm-toolkit.snippets.keystone_openrc_env_vars" $env | indent 8 }}
@ -60,7 +52,7 @@ spec:
readOnly: true
- name: rally-db
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:
- name: cinder-etc
configMap:
@ -70,4 +62,4 @@ spec:
name: cinder-bin
- name: rally-db
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.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
{{- range $key1, $userClass := tuple "admin" "user" }}
{{- $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.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
{{- range $key1, $userClass := tuple "admin" "user" }}
{{- $secretName := index $envAll.Values.secrets.identity $userClass }}

View File

@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
---
apiVersion: v1

View File

@ -12,7 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
{{- if .Values.network.api.ingress.public }}
---
apiVersion: v1
kind: Service
metadata:

View File

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

View File

@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
---
apiVersion: v1
kind: ConfigMap
metadata:

View File

@ -11,6 +11,9 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
{{- include "glance.conf.glance_values_skeleton" .Values.conf.glance | 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 -}}
{{- end -}}
---
apiVersion: v1
kind: ConfigMap
metadata:

View File

@ -23,14 +23,7 @@ metadata:
name: glance-api
spec:
replicas: {{ .Values.replicas.api }}
revisionHistoryLimit: {{ .Values.upgrades.revision_history }}
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 }}
{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
template:
metadata:
labels:
@ -52,15 +45,7 @@ spec:
imagePullPolicy: {{ .Values.images.pull_policy }}
securityContext:
runAsUser: 0
{{- if .Values.resources.enabled }}
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 }}
{{ tuple $envAll $envAll.Values.resources.api | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
command:
- chown
- -R
@ -91,15 +76,7 @@ spec:
- name: glance-api
image: {{ .Values.images.api }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }}
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 }}
{{ tuple $envAll $envAll.Values.resources.api | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
command:
- /tmp/glance-api.sh
- start
@ -148,7 +125,7 @@ spec:
subPath: key
readOnly: true
{{- 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:
- name: etcglance
emptyDir: {}
@ -173,4 +150,4 @@ spec:
secret:
secretName: pvc-ceph-client-key
{{- 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
spec:
replicas: {{ .Values.replicas.registry }}
{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
template:
metadata:
labels:
@ -42,15 +43,7 @@ spec:
- name: glance-registry
image: {{ .Values.images.registry }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }}
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 }}
{{ tuple $envAll $envAll.Values.resources.registry | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
command:
- /tmp/glance-registry.sh
- start
@ -84,7 +77,7 @@ spec:
mountPath: /etc/glance/policy.json
subPath: policy.json
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:
- name: etcglance
emptyDir: {}
@ -95,4 +88,4 @@ spec:
- name: glance-etc
configMap:
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
# limitations under the License.
{{- $envAll := . }}
{{- if .Values.network.api.ingress.public }}
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:

View File

@ -12,7 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
{{- if .Values.network.registry.ingress.public }}
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:

View File

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

View File

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

View File

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

View File

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

View File

@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
{{- $dependencies := .Values.dependencies.ks_service }}
---
@ -31,15 +32,7 @@ spec:
- name: {{ $osServiceType }}-ks-service-registration
image: {{ $envAll.Values.images.ks_service }}
imagePullPolicy: {{ $envAll.Values.images.pull_policy }}
{{- if $envAll.Values.resources.enabled }}
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 }}
{{ tuple $envAll $envAll.Values.resources.jobs.ks_service | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
command:
- /tmp/ks-service.sh
volumeMounts:

View File

@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
{{- $dependencies := .Values.dependencies.ks_user }}
---
@ -30,15 +31,7 @@ spec:
- name: glance-ks-user
image: {{ .Values.images.ks_user }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }}
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 }}
{{ tuple $envAll $envAll.Values.resources.jobs.ks_user | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
command:
- /tmp/ks-user.sh
volumeMounts:

View File

@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
---
apiVersion: policy/v1beta1

View File

@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
---
apiVersion: policy/v1beta1

View File

@ -16,7 +16,7 @@
{{- $dependencies := .Values.dependencies.tests }}
{{- $mounts_glance_tests := .Values.mounts.glance_tests.glance_tests }}
{{- $mounts_glance_tests_init := .Values.mounts.glance_tests.init_container }}
---
apiVersion: v1
kind: Pod
metadata:
@ -31,15 +31,7 @@ spec:
- name: {{.Release.Name}}-token-issue-test
image: {{ .Values.images.test }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }}
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 }}
{{ tuple $envAll $envAll.Values.resources.jobs.tests | include "helm-toolkit.snippets.kubernetes_resources" | indent 6 }}
env:
{{- with $env := dict "ksUserSecret" .Values.secrets.identity.admin }}
{{- include "helm-toolkit.snippets.keystone_openrc_env_vars" $env | indent 8 }}
@ -60,7 +52,7 @@ spec:
readOnly: true
- name: rally-db
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:
- name: glance-etc
configMap:
@ -70,4 +62,4 @@ spec:
name: glance-bin
- name: rally-db
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
# limitations under the License.
{{- $envAll := . }}
{{- if eq .Values.storage "pvc" }}
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:

View File

@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
{{- range $key1, $userClass := tuple "admin" "user" }}
{{- $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.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
{{- range $key1, $userClass := tuple "admin" "user" }}
{{- $secretName := index $envAll.Values.secrets.identity $userClass }}

View File

@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
---
apiVersion: v1

View File

@ -12,7 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
{{- if .Values.network.api.ingress.public }}
---
apiVersion: v1
kind: Service
metadata:

View File

@ -12,7 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
{{- if .Values.network.registry.ingress.public }}
---
apiVersion: v1
kind: Service
metadata:

View File

@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
---
apiVersion: v1

View File

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

View File

@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
---
apiVersion: v1
kind: ConfigMap
metadata:

View File

@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
{{- include "heat.conf.heat_values_skeleton" .Values.conf.heat | trunc 0 -}}
{{- 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 -}}
{{- end -}}
---
apiVersion: v1
kind: ConfigMap
metadata:

View File

@ -23,14 +23,7 @@ metadata:
name: heat-api
spec:
replicas: {{ .Values.replicas.api }}
revisionHistoryLimit: {{ .Values.upgrades.revision_history }}
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 }}
{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
template:
metadata:
labels:
@ -50,15 +43,7 @@ spec:
- name: heat-api
image: {{ .Values.images.api }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }}
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 }}
{{ tuple $envAll $envAll.Values.resources.api | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
command:
- /tmp/heat-api.sh
- start
@ -94,7 +79,7 @@ spec:
mountPath: /etc/heat/policy.json
subPath: policy.json
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:
- name: pod-etc-heat
emptyDir: {}
@ -107,4 +92,4 @@ spec:
- name: heat-etc
configMap:
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
spec:
replicas: {{ .Values.replicas.cfn }}
revisionHistoryLimit: {{ .Values.upgrades.revision_history }}
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 }}
{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
template:
metadata:
labels:
@ -50,15 +43,7 @@ spec:
- name: heat-cfn
image: {{ .Values.images.cfn }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }}
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 }}
{{ tuple $envAll $envAll.Values.resources.cfn | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
command:
- /tmp/heat-cfn.sh
- start
@ -94,7 +79,7 @@ spec:
mountPath: /etc/heat/policy.json
subPath: policy.json
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:
- name: pod-etc-heat
emptyDir: {}
@ -107,4 +92,4 @@ spec:
- name: heat-etc
configMap:
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
spec:
replicas: {{ .Values.replicas.cloudwatch }}
revisionHistoryLimit: {{ .Values.upgrades.revision_history }}
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 }}
{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
template:
metadata:
labels:
@ -50,15 +43,7 @@ spec:
- name: heat-cloudwatch
image: {{ .Values.images.cloudwatch }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }}
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 }}
{{ tuple $envAll $envAll.Values.resources.cloudwatch | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
command:
- /tmp/heat-cloudwatch.sh
- start
@ -94,7 +79,7 @@ spec:
mountPath: /etc/heat/policy.json
subPath: policy.json
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:
- name: pod-etc-heat
emptyDir: {}
@ -107,4 +92,4 @@ spec:
- name: heat-etc
configMap:
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
# limitations under the License.
{{- $envAll := . }}
{{- if .Values.network.api.ingress.public }}
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:

View File

@ -12,7 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
{{- if .Values.network.cfn.ingress.public }}
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:

View File

@ -12,7 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
{{- if .Values.network.cloudwatch.ingress.public }}
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:

View File

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

View File

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

View File

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

View File

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

View File

@ -14,7 +14,7 @@
{{- $envAll := . }}
{{- $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
kind: Job
metadata:
@ -31,15 +31,7 @@ spec:
- name: heat-ks-user
image: {{ .Values.images.ks_user }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }}
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 }}
{{ tuple $envAll $envAll.Values.resources.jobs.ks_user | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
command:
- /tmp/ks-user.sh
volumeMounts:

View File

@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
---
apiVersion: policy/v1beta1

View File

@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
---
apiVersion: policy/v1beta1

View File

@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
---
apiVersion: policy/v1beta1

View File

@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
{{- range $key1, $userClass := tuple "admin" "user" }}
{{- $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.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
{{- range $key1, $userClass := tuple "admin" "user" "trustee" }}
{{- $secretName := index $envAll.Values.secrets.identity $userClass }}

View File

@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
---
apiVersion: v1

View File

@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
---
apiVersion: v1

View File

@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
---
apiVersion: v1

View File

@ -12,7 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
{{- if .Values.network.api.ingress.public }}
---
apiVersion: v1
kind: Service
metadata:

View File

@ -12,7 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
{{- if .Values.network.cfn.ingress.public }}
---
apiVersion: v1
kind: Service
metadata:

View File

@ -12,7 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
{{- if .Values.network.cloudwatch.ingress.public }}
---
apiVersion: v1
kind: Service
metadata:

View File

@ -39,15 +39,7 @@ spec:
- name: heat-engine
image: {{ .Values.images.engine }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }}
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 }}
{{ tuple $envAll $envAll.Values.resources.engine | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
command:
- /tmp/heat-engine.sh
volumeMounts:
@ -67,7 +59,7 @@ spec:
mountPath: /etc/heat/policy.json
subPath: policy.json
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:
- name: pod-etc-heat
emptyDir: {}
@ -80,4 +72,4 @@ spec:
- name: heat-etc
configMap:
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,11 +42,12 @@ images:
pull_policy: "IfNotPresent"
upgrades:
revision_history: 3
pod_replacement_strategy: RollingUpdate
rolling_update:
max_unavailable: 1
max_surge: 3
deployments:
revision_history: 3
pod_replacement_strategy: RollingUpdate
rolling_update:
max_unavailable: 1
max_surge: 3
pod_disruption_budget:
api:
@ -350,69 +351,84 @@ endpoints:
resources:
enabled: false
heat_api:
api:
requests:
memory: "124Mi"
memory: "128Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
heat_cfn:
cfn:
requests:
memory: "124Mi"
memory: "128Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
heat_cloudwatch:
cloudwatch:
requests:
memory: "124Mi"
memory: "128Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
heat_db_init:
engine:
requests:
memory: "124Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
heat_db_sync:
requests:
memory: "124Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
heat_ks_endpoints:
requests:
memory: "124Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
heat_ks_service:
requests:
memory: "124Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
heat_ks_user:
requests:
memory: "124Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
heat_engine:
requests:
memory: "124Mi"
memory: "128Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
jobs:
bootstrap:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
db_init:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
db_sync:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
ks_endpoints:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
ks_service:
requests:
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"
limits:
memory: "1024Mi"
cpu: "2000m"
mounts:
heat_api:

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
# limitations under the License.
{{- $envAll := . }}
---
apiVersion: v1
kind: ConfigMap
metadata:

View File

@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
---
apiVersion: v1
kind: ConfigMap
metadata:

View File

@ -23,14 +23,7 @@ metadata:
name: horizon
spec:
replicas: {{ .Values.replicas }}
revisionHistoryLimit: {{ .Values.upgrades.revision_history }}
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 }}
{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
template:
metadata:
labels:
@ -50,15 +43,7 @@ spec:
- name: horizon
image: {{ .Values.images.horizon }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }}
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 }}
{{ tuple $envAll $envAll.Values.resources.server | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
command:
- /tmp/horizon.sh
- start
@ -86,7 +71,7 @@ spec:
mountPath: /etc/openstack-dashboard/local_settings
subPath: local_settings
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:
runAsUser: 0
volumes:
@ -97,4 +82,4 @@ spec:
- name: horizon-etc
configMap:
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
# limitations under the License.
{{- $envAll := . }}
{{- if .Values.network.ingress.public }}
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:

View File

@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
---
apiVersion: policy/v1beta1

View File

@ -12,7 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
{{- if .Values.network.ingress.public }}
---
apiVersion: v1
kind: Service
metadata:

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