Magnum: basic chart enhancement
This ps provides several basic enhancements to the magnum chart. Change-Id: I50bbb5f1db1490be6844970b2715fa05abb56ea2
This commit is contained in:
parent
da17862126
commit
a6322a5521
24
magnum/templates/bin/_magnum-conductor-init.sh.tpl
Normal file
24
magnum/templates/bin/_magnum-conductor-init.sh.tpl
Normal file
@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
{{/*
|
||||
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.
|
||||
*/}}
|
||||
|
||||
set -ex
|
||||
|
||||
tee /tmp/pod-shared/magnum.conf <<EOF
|
||||
[DEFAULT]
|
||||
host = ${POD_NAME}
|
||||
EOF
|
@ -18,4 +18,5 @@ limitations under the License.
|
||||
|
||||
set -ex
|
||||
exec magnum-conductor \
|
||||
--config-file /etc/magnum/magnum.conf
|
||||
--config-file /etc/magnum/magnum.conf \
|
||||
--config-file /tmp/pod-shared/magnum.conf
|
||||
|
@ -44,6 +44,8 @@ data:
|
||||
{{ tuple "bin/_magnum-api.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||
magnum-conductor.sh: |
|
||||
{{ tuple "bin/_magnum-conductor.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||
magnum-conductor-init.sh: |
|
||||
{{ tuple "bin/_magnum-conductor-init.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||
rabbit-init.sh: |
|
||||
{{- include "helm-toolkit.scripts.rabbit_init" . | indent 4 }}
|
||||
{{- end }}
|
||||
|
@ -94,6 +94,8 @@ spec:
|
||||
mountPath: /etc/magnum/policy.json
|
||||
subPath: policy.json
|
||||
readOnly: true
|
||||
- name: magnum-lock-path
|
||||
mountPath: {{ .Values.conf.magnum.oslo_concurrency.lock_path }}
|
||||
{{ if $mounts_magnum_api.volumeMounts }}{{ toYaml $mounts_magnum_api.volumeMounts | indent 12 }}{{ end }}
|
||||
volumes:
|
||||
- name: pod-etc-magnum
|
||||
@ -108,5 +110,7 @@ spec:
|
||||
configMap:
|
||||
name: magnum-etc
|
||||
defaultMode: 0444
|
||||
- name: magnum-lock-path
|
||||
emptyDir: {}
|
||||
{{ if $mounts_magnum_api.volumes }}{{ toYaml $mounts_magnum_api.volumes | indent 8 }}{{ end }}
|
||||
{{- end }}
|
||||
|
@ -30,6 +30,7 @@ metadata:
|
||||
name: magnum-conductor
|
||||
spec:
|
||||
serviceName: magnum-conductor
|
||||
podManagementPolicy: "Parallel"
|
||||
replicas: {{ .Values.pod.replicas.conductor }}
|
||||
template:
|
||||
metadata:
|
||||
@ -43,6 +44,26 @@ spec:
|
||||
{{ .Values.labels.conductor.node_selector_key }}: {{ .Values.labels.conductor.node_selector_value }}
|
||||
initContainers:
|
||||
{{ tuple $envAll $dependencies $mounts_magnum_conductor_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||
- name: magnum-conductor-init
|
||||
image: {{ .Values.images.tags.magnum_conductor }}
|
||||
imagePullPolicy: {{ .Values.images.pull_policy }}
|
||||
{{ tuple $envAll $envAll.Values.pod.resources.conductor | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||
securityContext:
|
||||
runAsUser: {{ .Values.pod.user.magnum.uid }}
|
||||
env:
|
||||
- name: POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
command:
|
||||
- /tmp/magnum-conductor-init.sh
|
||||
volumeMounts:
|
||||
- name: magnum-bin
|
||||
mountPath: /tmp/magnum-conductor-init.sh
|
||||
subPath: magnum-conductor-init.sh
|
||||
readOnly: true
|
||||
- name: pod-shared
|
||||
mountPath: /tmp/pod-shared
|
||||
containers:
|
||||
- name: magnum-conductor
|
||||
image: {{ .Values.images.tags.magnum_conductor }}
|
||||
@ -59,8 +80,6 @@ spec:
|
||||
readOnly: true
|
||||
- name: pod-etc-magnum
|
||||
mountPath: /etc/magnum
|
||||
- name: pod-var-cache-magnum
|
||||
mountPath: /var/cache/magnum
|
||||
- name: magnum-etc
|
||||
mountPath: /etc/magnum/magnum.conf
|
||||
subPath: magnum.conf
|
||||
@ -69,11 +88,15 @@ spec:
|
||||
mountPath: /etc/magnum/policy.json
|
||||
subPath: policy.json
|
||||
readOnly: true
|
||||
- name: pod-shared
|
||||
mountPath: /tmp/pod-shared
|
||||
- name: magnum-lock-path
|
||||
mountPath: {{ .Values.conf.magnum.oslo_concurrency.lock_path }}
|
||||
{{ if $mounts_magnum_conductor.volumeMounts }}{{ toYaml $mounts_magnum_conductor.volumeMounts | indent 12 }}{{ end }}
|
||||
volumes:
|
||||
- name: pod-etc-magnum
|
||||
emptyDir: {}
|
||||
- name: pod-var-cache-magnum
|
||||
- name: pod-shared
|
||||
emptyDir: {}
|
||||
- name: magnum-bin
|
||||
configMap:
|
||||
@ -83,5 +106,7 @@ spec:
|
||||
configMap:
|
||||
name: magnum-etc
|
||||
defaultMode: 0444
|
||||
- name: magnum-lock-path
|
||||
emptyDir: {}
|
||||
{{ if $mounts_magnum_conductor.volumes }}{{ toYaml $mounts_magnum_conductor.volumes | indent 8 }}{{ end }}
|
||||
{{- end }}
|
||||
|
@ -109,6 +109,12 @@ conf:
|
||||
magnum:
|
||||
DEFAULT:
|
||||
transport_url: null
|
||||
oslo_messaging_notifications:
|
||||
driver: messaging
|
||||
oslo_concurrency:
|
||||
lock_path: /var/lib/magnum/tmp
|
||||
certificates:
|
||||
cert_manager_type: barbican
|
||||
database:
|
||||
max_retries: -1
|
||||
trust:
|
||||
@ -159,6 +165,10 @@ dependencies:
|
||||
service: identity
|
||||
- endpoint: internal
|
||||
service: oslo_messaging
|
||||
- endpoint: internal
|
||||
service: key_manager
|
||||
- endpoint: internal
|
||||
service: orchestration
|
||||
conductor:
|
||||
jobs:
|
||||
- magnum-db-sync
|
||||
@ -173,6 +183,10 @@ dependencies:
|
||||
service: identity
|
||||
- endpoint: internal
|
||||
service: oslo_messaging
|
||||
- endpoint: internal
|
||||
service: key_manager
|
||||
- endpoint: internal
|
||||
service: orchestration
|
||||
db_drop:
|
||||
services:
|
||||
- endpoint: internal
|
||||
@ -276,6 +290,36 @@ endpoints:
|
||||
api:
|
||||
default: 9511
|
||||
public: 80
|
||||
key_manager:
|
||||
name: barbican
|
||||
hosts:
|
||||
default: barbican-api
|
||||
public: barbican
|
||||
host_fqdn_override:
|
||||
default: null
|
||||
path:
|
||||
default: /v1
|
||||
scheme:
|
||||
default: http
|
||||
port:
|
||||
api:
|
||||
default: 9311
|
||||
public: 80
|
||||
orchestration:
|
||||
name: heat
|
||||
hosts:
|
||||
default: heat-api
|
||||
public: heat
|
||||
host_fqdn_override:
|
||||
default: null
|
||||
path:
|
||||
default: '/v1/%(project_id)s'
|
||||
scheme:
|
||||
default: 'http'
|
||||
port:
|
||||
api:
|
||||
default: 8004
|
||||
public: 80
|
||||
oslo_db:
|
||||
auth:
|
||||
admin:
|
||||
|
Loading…
x
Reference in New Issue
Block a user