/
configmap-env.yaml
82 lines (75 loc) · 2.98 KB
/
configmap-env.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
{{- $context := . }}
{{- $keystone_auth_host := tuple "keystone" "internal" $context | include "helm-toolkit.endpoints.hostname_namespaced_endpoint_lookup" }}
{{- if not .Values.global.contrail_env_vrouter_kernel -}}
{{- $_ := set .Values.global "contrail_env_vrouter_kernel" dict -}}
{{- end -}}
{{- if not .Values.global.contrail_env_vrouter_dpdk -}}
{{- $_ := set .Values.global "contrail_env_vrouter_dpdk" dict -}}
{{- end -}}
{{- if .Values.manifests.configmap_vrouter_kernel }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: contrail-vrouter-kernel
data:
{{- range $key, $value := .Values.global.contrail_env }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- range $key, $value := .Values.global.contrail_env_vrouter_kernel }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
{{- if .Values.manifests.configmap_vrouter_dpdk }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: contrail-vrouter-dpdk
data:
{{- range $key, $value := .Values.global.contrail_env }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- range $key, $value := .Values.global.contrail_env_vrouter_dpdk }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
{{- if .Values.manifests.configmap_vrouter_sriov }}
{{- $_ := required ".Values.global.contrail_env_vrouter_sriov.per_compute_info must be specified" .Values.global.contrail_env_vrouter_sriov.per_compute_info }}
{{- $common_sriov_vars := .Values.global.contrail_env_vrouter_sriov }}
{{- $per_compute_info := .Values.global.contrail_env_vrouter_sriov.per_compute_info }}
{{- range $_, $compute_vars := $per_compute_info }}
{{- $compute_name := index $compute_vars "node_name" }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: contrail-vrouter-sriov-{{ $compute_name }}
data:
{{- range $key, $value := $compute_vars }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- range $key, $value := $common_sriov_vars }}
{{ if ne $key "per_compute_info" }}{{ $key }}: {{ $value | quote }}{{ end }}
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.manifests.configmap_vrouter_keystone }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: contrail-vrouter-keystone
data:
KEYSTONE_AUTH_ADMIN_USER: {{ .Values.endpoints.keystone.auth.username }}
KEYSTONE_AUTH_ADMIN_TENANT: {{ .Values.endpoints.keystone.auth.project_name }}
KEYSTONE_AUTH_ADMIN_PASSWORD: {{ .Values.endpoints.keystone.auth.password }}
KEYSTONE_AUTH_USER_DOMAIN_NAME: {{ .Values.endpoints.keystone.auth.user_domain_name }}
KEYSTONE_AUTH_PROJECT_DOMAIN_NAME: {{ .Values.endpoints.keystone.auth.project_domain_name }}
KEYSTONE_AUTH_URL_VERSION: {{ .Values.endpoints.keystone.path.default }}
KEYSTONE_AUTH_HOST: {{ $keystone_auth_host }}
KEYSTONE_AUTH_PROTO: {{ .Values.endpoints.keystone.scheme.default }}
KEYSTONE_AUTH_ADMIN_PORT: {{ .Values.endpoints.keystone.port.admin.default | quote }}
KEYSTONE_AUTH_PUBLIC_PORT: {{ .Values.endpoints.keystone.port.api.default | quote }}
KEYSTONE_AUTH_REGION_NAME: {{ .Values.endpoints.keystone.auth.region_name | quote }}
{{- end }}