Chart: Modernise chart
This PS updates the maas chart to support modern helm toolkits. Change-Id: Id70343afdec622dc84b89b0d7f496e9ef498ea6b Signed-off-by: Pete Birley <pete@port.direct>
This commit is contained in:
parent
c585c525bc
commit
582c4d8b20
@ -16,9 +16,8 @@ limitations under the License.
|
||||
*/}}
|
||||
|
||||
{{- $envAll := . }}
|
||||
{{- $dependencies := .Values.dependencies.bootstrap_admin_user }}
|
||||
{{- $serviceAccountName := "maas-bootstrap-admin-user" }}
|
||||
{{ tuple $envAll $dependencies $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
||||
{{ tuple $envAll "bootstrap_admin_user" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
@ -35,7 +34,7 @@ spec:
|
||||
nodeSelector:
|
||||
{{ .Values.labels.region.node_selector_key }}: {{ .Values.labels.region.node_selector_value }}
|
||||
initContainers:
|
||||
{{ tuple $envAll $dependencies list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||
{{ tuple $envAll "bootstrap_admin_user" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||
containers:
|
||||
- name: maas-bootstrap-admin-user
|
||||
image: {{ .Values.images.tags.bootstrap }}
|
||||
|
@ -16,9 +16,8 @@ limitations under the License.
|
||||
*/}}
|
||||
|
||||
{{- $envAll := . }}
|
||||
{{- $dependencies := .Values.dependencies.db_init }}
|
||||
{{- $serviceAccountName := "maas-db-init" }}
|
||||
{{ tuple $envAll $dependencies $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
||||
{{ tuple $envAll "db_init" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
@ -35,12 +34,12 @@ spec:
|
||||
nodeSelector:
|
||||
{{ .Values.labels.region.node_selector_key }}: {{ .Values.labels.region.node_selector_value }}
|
||||
initContainers:
|
||||
{{ tuple $envAll $dependencies list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||
{{ tuple $envAll "db_init" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||
containers:
|
||||
- name: maas-db-init
|
||||
image: {{ .Values.images.tags.db_init | quote }}
|
||||
imagePullPolicy: {{ .Values.images.pull_policy | quote }}
|
||||
{{ tuple $envAll $envAll.Values.pod.resources.jobs.db_init | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||
{{ tuple $envAll "db_init" | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||
env:
|
||||
- name: ROOT_DB_USER
|
||||
valueFrom:
|
||||
|
@ -16,9 +16,8 @@ limitations under the License.
|
||||
*/}}
|
||||
|
||||
{{- $envAll := . }}
|
||||
{{- $dependencies := .Values.dependencies.db_sync }}
|
||||
{{- $serviceAccountName := "maas-db-sync" }}
|
||||
{{ tuple $envAll $dependencies $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
||||
{{ tuple $envAll "db_sync" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
@ -35,12 +34,12 @@ spec:
|
||||
nodeSelector:
|
||||
{{ .Values.labels.region.node_selector_key }}: {{ .Values.labels.region.node_selector_value }}
|
||||
initContainers:
|
||||
{{ tuple $envAll $dependencies list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||
{{ tuple $envAll "db_sync" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||
containers:
|
||||
- name: maas-db-sync
|
||||
image: {{ .Values.images.tags.db_sync }}
|
||||
imagePullPolicy: {{ .Values.images.pull_policy }}
|
||||
{{ tuple $envAll $envAll.Values.pod.resources.jobs.db_sync | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||
{{ tuple $envAll "db_sync" | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||
command:
|
||||
- /tmp/db-sync.sh
|
||||
volumeMounts:
|
||||
|
@ -16,25 +16,19 @@ limitations under the License.
|
||||
*/}}
|
||||
|
||||
{{- $envAll := . }}
|
||||
{{- $dependencies := .Values.dependencies.export_api_key }}
|
||||
{{- $initMounts := .Values.pod.mounts.export_api_key.export_api_key }}
|
||||
{{- $serviceAccountName := "maas-export-api-key" }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ $serviceAccountName }}
|
||||
namespace: {{ $envAll.Release.Namespace }}
|
||||
{{ tuple $envAll "export_api_key" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: {{ $envAll.Release.Name }}-{{ $serviceAccountName }}
|
||||
name: {{ $envAll.Release.Name }}-{{ $serviceAccountName }}-job
|
||||
namespace: {{ $envAll.Release.Namespace }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: {{ $envAll.Release.Name }}-{{ $envAll.Release.Namespace }}-{{ $serviceAccountName }}
|
||||
name: {{ $envAll.Release.Name }}-{{ $envAll.Release.Namespace }}-{{ $serviceAccountName }}}-job
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ $serviceAccountName }}
|
||||
@ -43,7 +37,7 @@ subjects:
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: {{ $envAll.Release.Name }}-{{ $envAll.Release.Namespace }}-{{ $serviceAccountName }}
|
||||
name: {{ $envAll.Release.Name }}-{{ $envAll.Release.Namespace }}-{{ $serviceAccountName }}}-job
|
||||
namespace: {{ $envAll.Release.Namespace }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
@ -84,7 +78,7 @@ spec:
|
||||
nodeSelector:
|
||||
{{ .Values.labels.region.node_selector_key }}: {{ .Values.labels.region.node_selector_value }}
|
||||
initContainers:
|
||||
{{ tuple $envAll $dependencies $initMounts | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||
{{ tuple $envAll "export_api_key" $initMounts | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||
containers:
|
||||
- name: exporter
|
||||
image: {{ .Values.images.tags.export_api_key }}
|
||||
|
@ -16,9 +16,8 @@ limitations under the License.
|
||||
*/}}
|
||||
|
||||
{{- $envAll := . }}
|
||||
{{- $dependencies := .Values.dependencies.import_resources }}
|
||||
{{- $serviceAccountName := "maas-import-resources" }}
|
||||
{{ tuple $envAll $dependencies $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
||||
{{ tuple $envAll "import_resources" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
@ -35,7 +34,7 @@ spec:
|
||||
nodeSelector:
|
||||
{{ .Values.labels.region.node_selector_key }}: {{ .Values.labels.region.node_selector_value }}
|
||||
initContainers:
|
||||
{{ tuple $envAll $dependencies list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||
{{ tuple $envAll "import_resources" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||
containers:
|
||||
- name: region-import-resources
|
||||
image: {{ .Values.images.tags.maas_region }}
|
||||
|
@ -20,12 +20,11 @@ limitations under the License.
|
||||
{{- tuple "maas_region_ui" "default" "region_ui" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | set .Values.conf.maas.url "maas_url" | quote | trunc 0 -}}
|
||||
{{- end -}}
|
||||
{{- $envAll := . }}
|
||||
{{- $dependencies := .Values.dependencies.rack_controller }}
|
||||
{{- $serviceAccountName := "maas-rack" }}
|
||||
{{- $mounts_maas_rack := .Values.pod.mounts.maas_rack }}
|
||||
{{- $mounts_maas_rack_init := .Values.pod.mounts.maas_rack.init_container }}
|
||||
|
||||
{{ tuple $envAll $dependencies $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
||||
{{ tuple $envAll "rack_controller" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
||||
---
|
||||
apiVersion: apps/v1beta1
|
||||
kind: StatefulSet
|
||||
@ -52,7 +51,7 @@ spec:
|
||||
hostNetwork: true
|
||||
dnsPolicy: ClusterFirst
|
||||
initContainers:
|
||||
{{ tuple $envAll $dependencies $mounts_maas_rack_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||
{{ tuple $envAll "rack_controller" $mounts_maas_rack_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||
containers:
|
||||
- name: maas-rack
|
||||
image: {{ .Values.images.tags.maas_rack }}
|
||||
|
@ -14,12 +14,11 @@
|
||||
# limitations under the License. */}}
|
||||
{{- if .Values.manifests.region_statefulset }}
|
||||
{{- $envAll := . }}
|
||||
{{- $dependencies := .Values.dependencies.region_controller }}
|
||||
{{- $serviceAccountName := "maas-region" }}
|
||||
{{- $mounts_maas_region := .Values.pod.mounts.maas_region.maas_region }}
|
||||
{{- $mounts_maas_region_init := .Values.pod.mounts.maas_region.init_container }}
|
||||
|
||||
{{ tuple $envAll $dependencies $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
||||
{{ tuple $envAll "region_controller" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
||||
---
|
||||
apiVersion: apps/v1beta1
|
||||
kind: StatefulSet
|
||||
@ -42,7 +41,7 @@ spec:
|
||||
nodeSelector:
|
||||
{{ .Values.labels.region.node_selector_key }}: {{ .Values.labels.region.node_selector_value }}
|
||||
initContainers:
|
||||
{{ tuple $envAll $dependencies $mounts_maas_region_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||
{{ tuple $envAll "region_controller" $mounts_maas_region_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||
containers:
|
||||
{{- if .Values.conf.cache.enabled }}
|
||||
- name: maas-cache
|
||||
|
@ -18,49 +18,50 @@
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
dependencies:
|
||||
rack_controller:
|
||||
jobs:
|
||||
- maas-db-sync
|
||||
services:
|
||||
- service: maas_region_ui
|
||||
endpoint: internal
|
||||
region_controller:
|
||||
jobs:
|
||||
- maas-db-sync
|
||||
services:
|
||||
- service: maas_db
|
||||
endpoint: internal
|
||||
db_init:
|
||||
services:
|
||||
- service: maas_db
|
||||
endpoint: internal
|
||||
db_sync:
|
||||
jobs:
|
||||
- maas-db-init
|
||||
bootstrap_admin_user:
|
||||
jobs:
|
||||
- maas-db-sync
|
||||
services:
|
||||
- service: maas_region_ui
|
||||
endpoint: internal
|
||||
- service: maas_db
|
||||
endpoint: internal
|
||||
import_resources:
|
||||
jobs:
|
||||
- maas-db-sync
|
||||
services:
|
||||
- service: maas_region_ui
|
||||
endpoint: internal
|
||||
- service: maas_db
|
||||
endpoint: internal
|
||||
export_api_key:
|
||||
jobs:
|
||||
- maas-db-sync
|
||||
services:
|
||||
- service: maas_region_ui
|
||||
endpoint: internal
|
||||
- service: maas_db
|
||||
endpoint: internal
|
||||
static:
|
||||
rack_controller:
|
||||
jobs:
|
||||
- maas-db-sync
|
||||
services:
|
||||
- service: maas_region_ui
|
||||
endpoint: internal
|
||||
region_controller:
|
||||
jobs:
|
||||
- maas-db-sync
|
||||
services:
|
||||
- service: maas_db
|
||||
endpoint: internal
|
||||
db_init:
|
||||
services:
|
||||
- service: maas_db
|
||||
endpoint: internal
|
||||
db_sync:
|
||||
jobs:
|
||||
- maas-db-init
|
||||
bootstrap_admin_user:
|
||||
jobs:
|
||||
- maas-db-sync
|
||||
services:
|
||||
- service: maas_region_ui
|
||||
endpoint: internal
|
||||
- service: maas_db
|
||||
endpoint: internal
|
||||
import_resources:
|
||||
jobs:
|
||||
- maas-db-sync
|
||||
services:
|
||||
- service: maas_region_ui
|
||||
endpoint: internal
|
||||
- service: maas_db
|
||||
endpoint: internal
|
||||
export_api_key:
|
||||
jobs:
|
||||
- maas-db-sync
|
||||
services:
|
||||
- service: maas_region_ui
|
||||
endpoint: internal
|
||||
- service: maas_db
|
||||
endpoint: internal
|
||||
|
||||
manifests:
|
||||
region_statefulset: true
|
||||
@ -79,6 +80,11 @@ images:
|
||||
maas_cache: quay.io/attcomdev/sstream-cache:latest
|
||||
dep_check: quay.io/stackanetes/kubernetes-entrypoint:v0.3.1
|
||||
pull_policy: IfNotPresent
|
||||
local_registry:
|
||||
# TODO(portdirect): this chart does not yet support local image cacheing
|
||||
active: false
|
||||
exclude:
|
||||
- dep_check
|
||||
|
||||
jobs:
|
||||
import_boot_resources:
|
||||
|
@ -16,9 +16,9 @@
|
||||
# Script to setup helm-toolkit and helm dep up the shipyard chart
|
||||
#
|
||||
HELM=$1
|
||||
HTK_REPO=${HTK_REPO:-"https://github.com/openstack/openstack-helm"}
|
||||
HTK_REPO=${HTK_REPO:-"https://github.com/openstack/openstack-helm-infra"}
|
||||
HTK_PATH=${HTK_PATH:-""}
|
||||
HTK_STABLE_COMMIT=${HTK_COMMIT:-"f902cd14fac7de4c4c9f7d019191268a6b4e9601"}
|
||||
HTK_STABLE_COMMIT=${HTK_COMMIT:-"master"}
|
||||
DEP_UP_LIST=${DEP_UP_LIST:-"maas"}
|
||||
|
||||
if [[ ! -z $(echo $http_proxy) ]]
|
||||
@ -59,8 +59,8 @@ fi
|
||||
|
||||
mkdir -p build
|
||||
pushd build
|
||||
git clone $HTK_REPO || true
|
||||
pushd openstack-helm/$HTK_PATH
|
||||
git clone $HTK_REPO ./htk-repo || true
|
||||
pushd ./htk-repo/$HTK_PATH
|
||||
git reset --hard "${HTK_STABLE_COMMIT}"
|
||||
|
||||
helm_serve
|
||||
|
Loading…
x
Reference in New Issue
Block a user