Merge "[stable/2023.1] Allow cross network address pair" into stable/2023.1
diff --git a/.charts.yml b/.charts.yml
index 7f0ade9..112e8e4 100644
--- a/.charts.yml
+++ b/.charts.yml
@@ -6,7 +6,7 @@
openstack_helm_dependencies: &openstack_helm_dependencies
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
+ version: 0.2.69
charts:
- name: barbican
diff --git a/build/pin-images.py b/build/pin-images.py
index b5e1ada..fbc8f2c 100755
--- a/build/pin-images.py
+++ b/build/pin-images.py
@@ -30,8 +30,8 @@
r = requests.get(
realm,
timeout=5,
- params={"scope": f"repository:{image_ref.path()}:pull"},
verify=False,
+ params={"scope": f"repository:{image_ref.path()}:pull"},
)
r.raise_for_status()
@@ -43,8 +43,8 @@
r = requests.get(
f"https://{image_ref.domain()}/v2/{image_ref.path()}/manifests/{image_ref['tag']}",
timeout=5,
- headers=headers,
verify=False,
+ headers=headers,
)
r.raise_for_status()
return r.headers["Docker-Content-Digest"]
@@ -54,8 +54,8 @@
r = requests.get(
f"https://{image_ref.domain()}/v2/{image_ref.path()}/manifests/{image_ref['tag']}",
timeout=5,
- headers=headers,
verify=False,
+ headers=headers,
)
r.raise_for_status()
return r.headers["Docker-Content-Digest"]
@@ -65,7 +65,10 @@
def get_pinned_image(image_src):
image_ref = reference.Reference.parse(image_src)
if image_ref.domain() != "harbor.atmosphere.dev":
- image_ref = reference.Reference.parse("harbor.atmosphere.dev/" + image_src)
+ try:
+ image_ref = reference.Reference.parse("harbor.atmosphere.dev/" + image_src)
+ except Exception:
+ LOG.warn(f"failed to parse image path {image_src}")
if (
image_ref.domain() == "registry.atmosphere.dev"
@@ -159,15 +162,19 @@
if image in SKIP_IMAGE_LIST:
continue
- image_src = data["_atmosphere_images"][image].replace(
- "{{ atmosphere_release }}", data["atmosphere_release"]
+ image_src = (
+ data["_atmosphere_images"][image]
+ .replace("{{ atmosphere_release }}", data["atmosphere_release"])
+ .replace("{{ atmosphere_image_prefix }}", "")
)
pinned_image = get_pinned_image(image_src).replace(
"harbor.atmosphere.dev", "registry.atmosphere.dev"
)
LOG.info("Pinning image %s from %s to %s", image, image_src, pinned_image)
- data["_atmosphere_images"][image] = pinned_image
+ data["_atmosphere_images"][image] = "{{ atmosphere_image_prefix }}%s" % (
+ pinned_image,
+ )
yaml.dump(data, args.dst)
diff --git a/charts/barbican/charts/helm-toolkit/Chart.yaml b/charts/barbican/charts/helm-toolkit/Chart.yaml
index 9d3aa1e..d4c0ea2 100644
--- a/charts/barbican/charts/helm-toolkit/Chart.yaml
+++ b/charts/barbican/charts/helm-toolkit/Chart.yaml
@@ -9,4 +9,4 @@
sources:
- https://opendev.org/openstack/openstack-helm-infra
- https://opendev.org/openstack/openstack-helm
-version: 0.2.78
+version: 0.2.69
diff --git a/charts/barbican/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl b/charts/barbican/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
index 728b994..6877b7b 100644
--- a/charts/barbican/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
+++ b/charts/barbican/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
@@ -14,8 +14,7 @@
{{/*
abstract: |
- Resolves 'hostname:port' for an endpoint, or several hostname:port pairs for statefulset e.g
- 'hostname1:port1,hostname2:port2,hostname3:port3',
+ Resolves 'hostname:port' for an endpoint
examples:
- values: |
endpoints:
@@ -47,23 +46,6 @@
{{ tuple "oslo_db" "internal" "mysql" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
return: |
127.0.0.1:3306
- - values: |
- endpoints:
- oslo_cache:
- hosts:
- default: memcached
- host_fqdn_override:
- default: null
- statefulset:
- name: openstack-memcached-memcached
- replicas: 3
- port:
- memcache:
- default: 11211
- usage: |
- {{ tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
- return: |
- openstack-memcached-memcached-0:11211,openstack-memcached-memcached-1:11211,openstack-memcached-memcached-2:11211
*/}}
{{- define "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" -}}
@@ -71,19 +53,7 @@
{{- $endpoint := index . 1 -}}
{{- $port := index . 2 -}}
{{- $context := index . 3 -}}
-{{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false -}}
-{{- $local := dict "endpointHosts" list -}}
-{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" -}}
-{{- if $ssMap -}}
-{{- $endpointHostPrefix := $ssMap.name -}}
-{{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
-{{- range $podInt := until ( atoi (print $ssMap.replicas ) ) -}}
-{{- $endpointHostname := printf "%s-%d.%s:%s" $endpointHostPrefix $podInt $endpointHostSuffix $endpointPort -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts $endpointHostname ) -}}
-{{- end -}}
-{{- else -}}
-{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts (printf "%s:%s" $endpointHostname $endpointPort) ) -}}
-{{- end -}}
-{{ include "helm-toolkit.utils.joinListWithComma" $local.endpointHosts }}
+{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
+{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
+{{- printf "%s:%s" $endpointHostname $endpointPort -}}
{{- end -}}
diff --git a/charts/barbican/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl b/charts/barbican/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
index 24eb569..b2ec648 100644
--- a/charts/barbican/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
+++ b/charts/barbican/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
@@ -40,9 +40,9 @@
{{- $context := index . 3 -}}
{{- $endpointMap := index $context.Values.endpoints ( $type | replace "-" "_" ) }}
{{- if kindIs "string" $endpointMap.path }}
-{{- printf "%s" $endpointMap.path | default "" -}}
+{{- printf "%s" $endpointMap.path | default "/" -}}
{{- else -}}
-{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "" }}
+{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "/" }}
{{- printf "%s" $endpointPath -}}
{{- end -}}
{{- end -}}
diff --git a/charts/barbican/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl b/charts/barbican/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
deleted file mode 100644
index 332ca99..0000000
--- a/charts/barbican/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
+++ /dev/null
@@ -1,51 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Renders out the configmap <service>-oslo-policy.
-values: |
- conf:
- policy.d:
- file1:
- foo: bar
- file2:
- foo: baz
-usage: |
-{{- include "helm-toolkit.manifests.configmap_oslo_policy" (dict "envAll" $envAll "serviceName" "keystone") }}
-return: |
- ---
- apiVersion: v1
- kind: Secret
- metadata:
- name: keystone-oslo-policy
- data:
- file1: base64of(foo: bar)
- file2: base64of(foo: baz)
-*/}}
-{{- define "helm-toolkit.manifests.configmap_oslo_policy" -}}
-{{- $envAll := index . "envAll" -}}
-{{- $serviceName := index . "serviceName" -}}
----
-apiVersion: v1
-kind: Secret
-metadata:
- name: {{ $serviceName }}-oslo-policy
-type: Opaque
-data:
- {{- range $key, $value := index $envAll.Values.conf "policy.d" }}
- {{- if $value }}
- {{ $key }}: {{ toYaml $value | b64enc }}
- {{- else }}
- {{ $key }}: {{ "\n" | b64enc }}
- {{- end }}
- {{- end }}
-{{- end -}}
diff --git a/charts/barbican/charts/helm-toolkit/templates/manifests/_ingress.tpl b/charts/barbican/charts/helm-toolkit/templates/manifests/_ingress.tpl
index 792571c..cacb4b8 100644
--- a/charts/barbican/charts/helm-toolkit/templates/manifests/_ingress.tpl
+++ b/charts/barbican/charts/helm-toolkit/templates/manifests/_ingress.tpl
@@ -708,10 +708,6 @@
{{- range $v := without (index $endpointHost.tls "dnsNames" | default list) $hostNameFull }}
{{- $vHosts = append $vHosts $v }}
{{- end }}
-{{- if hasKey $envAll.Values.endpoints "alias_fqdn" }}
-{{- $alias_host := $envAll.Values.endpoints.alias_fqdn }}
-{{- $vHosts = append $vHosts $alias_host }}
-{{- end }}
{{- $secretName := index $envAll.Values.secrets "tls" ( $backendServiceType | replace "-" "_" ) $backendService $endpoint }}
{{- $_ := required "You need to specify a secret in your values for the endpoint" $secretName }}
tls:
diff --git a/charts/barbican/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/barbican/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
index c6a7521..1e28da9 100644
--- a/charts/barbican/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
+++ b/charts/barbican/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Drop')
@@ -126,7 +125,7 @@
# Delete DB
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP DATABASE IF EXISTS {0}".format(database)))
+ connection.execute("DROP DATABASE IF EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -139,7 +138,7 @@
# Delete DB User
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP USER IF EXISTS {0}".format(user)))
+ connection.execute("DROP USER IF EXISTS {0}".format(user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/barbican/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/barbican/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
index 1917f78..110cd98 100644
--- a/charts/barbican/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
+++ b/charts/barbican/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Init')
@@ -126,7 +125,7 @@
# Create DB
try:
with root_engine.connect() as connection:
- connection.execute(text("CREATE DATABASE IF NOT EXISTS {0}".format(database)))
+ connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -140,10 +139,10 @@
try:
with root_engine.connect() as connection:
connection.execute(
- text("CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
- user, password, mysql_x509)))
+ "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
+ user, password, mysql_x509))
connection.execute(
- text("GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)))
+ "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/barbican/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl b/charts/barbican/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
index e6e9c6e..3739f95 100644
--- a/charts/barbican/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
+++ b/charts/barbican/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
@@ -29,9 +29,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_ADMIN_PASSWORD=$(echo "${RABBITMQ_ADMIN_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User creadential
RABBITMQ_USERNAME=$(echo "${RABBITMQ_USER_CONNECTION}" | \
@@ -39,9 +37,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_PASSWORD=$(echo "${RABBITMQ_USER_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User vHost
RABBITMQ_VHOST=$(echo "${RABBITMQ_USER_CONNECTION}" | \
diff --git a/charts/barbican/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl b/charts/barbican/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
index 5c2dedb..48b53fa 100644
--- a/charts/barbican/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
+++ b/charts/barbican/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
@@ -40,9 +40,6 @@
release_group: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
application: {{ $application }}
component: {{ $component }}
-app.kubernetes.io/name: {{ $application }}
-app.kubernetes.io/component: {{ $component }}
-app.kubernetes.io/instance: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
{{- if ($envAll.Values.pod).labels }}
{{- if hasKey $envAll.Values.pod.labels $component }}
{{ index $envAll.Values.pod "labels" $component | toYaml }}
diff --git a/charts/barbican/charts/helm-toolkit/templates/snippets/_service_params.tpl b/charts/barbican/charts/helm-toolkit/templates/snippets/_service_params.tpl
deleted file mode 100644
index 6233a93..0000000
--- a/charts/barbican/charts/helm-toolkit/templates/snippets/_service_params.tpl
+++ /dev/null
@@ -1,61 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Inserts kubernetes service parameters from values as is.
-values: |
- network:
- serviceExample:
- service:
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-usage: |
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: 'serviceExample'
- spec:
- ports:
- - name: s-example
- port: 1111
- {{ .Values.network.serviceExample | include "helm-toolkit.snippets.service_params" | indent 2 }}
-return: |
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-*/}}
-
-{{- define "helm-toolkit.snippets.service_params" }}
-{{- $serviceParams := dict }}
-{{- if hasKey . "service" }}
-{{- $serviceParams = .service }}
-{{- end }}
-{{- if hasKey . "node_port" }}
-{{- if hasKey .node_port "enabled" }}
-{{- if .node_port.enabled }}
-{{- $_ := set $serviceParams "type" "NodePort" }}
-{{- end }}
-{{- end }}
-{{- end }}
-{{- if hasKey . "external_policy_local" }}
-{{- if .external_policy_local }}
-{{- $_ := set $serviceParams "externalTrafficPolicy" "Local" }}
-{{- end }}
-{{- end }}
-{{- if $serviceParams }}
-{{- $serviceParams | toYaml }}
-{{- end }}
-{{- end }}
diff --git a/charts/barbican/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl b/charts/barbican/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
deleted file mode 100644
index bdb28c3..0000000
--- a/charts/barbican/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
+++ /dev/null
@@ -1,279 +0,0 @@
-{{/*
-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.
-*/}}
-
-{{/*
-
-The helm-toolkit.utils.daemonset_overrides function have some limitations:
-
- * it allows to override only conf values specifid in configmap-etc
- * it doesn't allow to override values for daemonsets passed via env variables
- or via damoenset definition. As result it is impossible to have mixed
- deployment when one compute is configured with dpdk while other not.
- * it is impossible to override interface names/other information stored in
- <service>-bin configmap
- * It allows to schedule on both hosts and labels, which adds some
- uncertainty
-
-This implementation is intended to handle those limitations:
-
- * it allows to schedule only based on labels
- * it creates <service>-bin per daemonset override
- * it allows to override values when rendering daemonsets
-
- It picks data from the following structure:
-
- .Values:
- overrides:
- mychart_mydaemonset:
- labels:
- label::value:
- values:
- override_root_option: override_root_value
- conf:
- ovs_dpdk:
- enabled: true
- neutron:
- DEFAULT:
- foo: bar
-
-*/}}
-
-{{- define "helm-toolkit.utils.daemonset_overrides_root" }}
- {{- $daemonset := index . 0 }}
- {{- $daemonSetTemplateName := index . 1 }}
- {{ $serviceAccountName := index . 2 }}
- {{- $configmap_include := index . 3 }}
- {{- $configmap_name := index . 4 }}
- {{- $configbin_include := index . 5 }}
- {{- $configbin_name := index . 6 }}
- {{- $context := index . 7 }}
-
- {{- $_ := unset $context ".Files" }}
- {{- $daemonset_root_name := printf (print $context.Chart.Name "_" $daemonset) }}
- {{- $_ := set $context.Values "__daemonset_list" list }}
- {{- $_ := set $context.Values "__default" dict }}
-
- {{- $default_enabled := true }}
- {{- if hasKey $context.Values "overrides" }}
- {{- range $key, $val := $context.Values.overrides }}
-
- {{- if eq $key $daemonset_root_name }}
- {{- range $type, $type_data := . }}
- {{- if eq $type "overrides_default" }}
- {{- $default_enabled = $type_data }}
- {{- end }}
-
- {{- if eq $type "labels" }}
- {{- $_ := set $context.Values "__label_dict" . }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
- {{/* dictionary that will contain all info needed to generate this
- iteration of the daemonset. */}}
- {{- $_ := set $context.Values "__current_label" dict }}
-
- {{/* set daemonset name */}}
- {{- $_ := set $context.Values.__current_label "name" $label_name }}
-
- {{/* set daemonset metadata annotation */}}
- {{- $_ := set $context.Values.__current_label "daemonset_override" $lname }}
-
- {{/* apply overrides */}}
-
-
- {{- $override_root_copy := $ldata.values }}
- {{/* Deep copy to prevent https://storyboard.openstack.org/#!/story/2005936 */}}
- {{- $root_copy := omit ($context.Values | toYaml | fromYaml) "overrides" }}
- {{- $merged_dict := mergeOverwrite $root_copy $override_root_copy }}
-
- {{- $root_conf_copy2 := dict "values" $merged_dict }}
- {{- $context_values := omit (omit ($context.Values | toYaml | fromYaml) "values") "__daemonset_list" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2.values }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__current_label "nodeData" $root_conf_copy4 }}
-
-
- {{/* Schedule to the provided label value(s) */}}
- {{- $label_dict := dict "key" $label_name }}
- {{- $_ := set $label_dict "values" (list $label_value) }}
- {{- $_ := set $label_dict "operator" "In" }}
- {{- $list_aggregate := list $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
-
- {{/* Do not schedule to other specified labels, with higher
- precedence as the list position increases. Last defined label
- is highest priority. */}}
- {{- $other_labels := omit $context.Values.__label_dict $lname }}
- {{- range $lname2, $ldata2 := $other_labels }}
- {{ $label_name2 := (split "::" $lname2)._0 }}
- {{ $label_value2 := (split "::" $lname2)._1 }}
-
- {{- $label_dict := dict "key" $label_name2 }}
- {{- $_ := set $label_dict "values" (list $label_value2) }}
- {{- $_ := set $label_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__current_label.matchExpressions $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
- {{- end }}
-
- {{/* store completed daemonset entry/info into global list */}}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__current_label }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- $_ := unset $context.Values "__current_label" }}
-
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* scheduler exceptions for the default daemonset */}}
- {{- $_ := set $context.Values.__default "matchExpressions" list }}
-
- {{- range $type, $type_data := . }}
- {{/* Do not schedule to other specified labels */}}
- {{- if eq $type "labels" }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
-
- {{- $default_dict := dict "key" $label_name }}
- {{- $_ := set $default_dict "values" (list $label_value) }}
- {{- $_ := set $default_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__default.matchExpressions $default_dict }}
- {{- $_ := set $context.Values.__default "matchExpressions" $list_aggregate }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* generate the default daemonset */}}
-
- {{/* set name */}}
- {{- $_ := set $context.Values.__default "name" "default" }}
-
- {{/* no overrides apply, so copy as-is */}}
- {{- $root_conf_copy1 := omit $context.Values.conf "overrides" }}
- {{- $root_conf_copy2 := dict "conf" $root_conf_copy1 }}
- {{- $context_values := omit $context.Values "conf" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2 }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__default "nodeData" $root_conf_copy4 }}
-
- {{/* add to global list */}}
- {{- if $default_enabled }}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__default }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- end }}
-
- {{- range $current_dict := $context.Values.__daemonset_list }}
-
- {{- $context_novalues := omit $context "Values" }}
- {{- $merged_dict := mergeOverwrite $context_novalues $current_dict.nodeData }}
- {{- $_ := set $current_dict "nodeData" $merged_dict }}
- {{/* Deep copy original daemonset_yaml */}}
- {{- $daemonset_yaml := list $daemonset $configmap_name $serviceAccountName $merged_dict | include $daemonSetTemplateName | toString | fromYaml }}
- {{- $_ := set $context.Values "__daemonset_yaml" ($daemonset_yaml | toYaml | fromYaml) }}
-
- {{/* Use the following name format $daemonset_root_name + sha256summ($current_dict.matchExpressions)
- as labels might be too long and contain wrong characters like / */}}
- {{- $_ := set $current_dict "dns_1123_name" dict }}
- {{- $name_format := "" }}
- {{- if eq $current_dict.name "default" }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name "default") | replace "_" "-" }}
- {{- else }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name ($current_dict.matchExpressions | quote | sha256sum | trunc 16)) | replace "_" "-" }}
- {{- end }}
- {{- $_ := set $current_dict "dns_1123_name" $name_format }}
-
- {{/* set daemonset metadata name */}}
- {{- if not $context.Values.__daemonset_yaml.metadata }}{{- $_ := set $context.Values.__daemonset_yaml "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.metadata.name }}{{- $_ := set $context.Values.__daemonset_yaml.metadata "name" dict }}{{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata "name" $current_dict.dns_1123_name }}
-
- {{/* cross-reference configmap name to container volume definitions */}}
- {{- $_ := set $context.Values "__volume_list" list }}
- {{- range $current_volume := $context.Values.__daemonset_yaml.spec.template.spec.volumes }}
- {{- $_ := set $context.Values "__volume" $current_volume }}
- {{- if hasKey $context.Values.__volume "secret" }}
- {{- if eq $context.Values.__volume.secret.secretName $configmap_name }}
- {{- $_ := set $context.Values.__volume.secret "secretName" (printf "%s-etc" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- if hasKey $context.Values.__volume "configMap" }}
- {{- if eq $context.Values.__volume.configMap.name $configbin_name }}
- {{- $_ := set $context.Values.__volume.configMap "name" (printf "%s-bin" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- $updated_list := append $context.Values.__volume_list $context.Values.__volume }}
- {{- $_ := set $context.Values "__volume_list" $updated_list }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "volumes" $context.Values.__volume_list }}
-
-
- {{/* populate scheduling restrictions */}}
- {{- if hasKey $current_dict "matchExpressions" }}
- {{- $length := len $current_dict.matchExpressions }}
- {{- if gt $length 0 }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "affinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity "nodeAffinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity "requiredDuringSchedulingIgnoredDuringExecution" dict }}{{- end }}
-
- {{- $expressions_modified := list }}
- {{- if hasKey $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" }}
- {{- range $orig_expression := $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms }}
- {{- $match_expressions_modified := list }}
- {{- $match_expressions_modified = concat $match_expressions_modified $current_dict.matchExpressions }}
- {{- if hasKey $orig_expression "matchExpressions" }}
- {{- $match_expressions_modified = concat $match_expressions_modified $orig_expression.matchExpressions }}
- {{- $expressions_modified = append $expressions_modified (dict "matchExpressions" $match_expressions_modified) }}
- {{- end }}
- {{- end }}
- {{- else }}
- {{- $expressions_modified = (list (dict "matchExpressions" $current_dict.matchExpressions)) }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" $expressions_modified }}
- {{- end }}
- {{- end }}
-
- {{/* input value hash for current set of values overrides */}}
- {{- if not $context.Values.__daemonset_yaml.spec }}{{- $_ := set $context.Values.__daemonset_yaml "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template }}{{- $_ := set $context.Values.__daemonset_yaml.spec "template" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata.annotations }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata "annotations" dict }}{{- end }}
- {{- $cmap := list (printf "%s-etc" $current_dict.dns_1123_name) $current_dict.nodeData | include $configmap_include }}
- {{- $cmap_bin := list (printf "%s-bin" $current_dict.dns_1123_name) $current_dict.nodeData | include $configbin_include }}
- {{- $values_cmap_hash := $cmap | quote | sha256sum }}
- {{- $values_cmap_bin_hash := $cmap_bin | quote | sha256sum }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-etc-hash" $values_cmap_hash }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-bin-hash" $values_cmap_bin_hash }}
-
- {{/* Do not set override for default daemonset */}}
- {{- if $current_dict.daemonset_override }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata.annotations "daemonset_override" $current_dict.daemonset_override }}
- {{- end }}
-
-{{/* generate configmap */}}
----
-{{ $cmap }}
- {{/* generate <service>-bin yaml */}}
----
-{{ $cmap_bin }}
- {{/* generate daemonset yaml */}}
----
-{{ $context.Values.__daemonset_yaml | toYaml }}
- {{- end }}
-{{- end }}
diff --git a/charts/barbican/requirements.lock b/charts/barbican/requirements.lock
index b94dead..4f63a87 100644
--- a/charts/barbican/requirements.lock
+++ b/charts/barbican/requirements.lock
@@ -1,6 +1,6 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
-digest: sha256:760c5997580ac8d30a64dfe92d6a54052b783ddf90cacbc5a4c95c1330988742
+ version: 0.2.69
+digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef
generated: "0001-01-01T00:00:00Z"
diff --git a/charts/barbican/requirements.yaml b/charts/barbican/requirements.yaml
index 52e723e..b3d5dcf 100644
--- a/charts/barbican/requirements.yaml
+++ b/charts/barbican/requirements.yaml
@@ -1,4 +1,4 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
+ version: 0.2.69
diff --git a/charts/ceph-provisioners/charts/helm-toolkit/Chart.yaml b/charts/ceph-provisioners/charts/helm-toolkit/Chart.yaml
index 9d3aa1e..d4c0ea2 100644
--- a/charts/ceph-provisioners/charts/helm-toolkit/Chart.yaml
+++ b/charts/ceph-provisioners/charts/helm-toolkit/Chart.yaml
@@ -9,4 +9,4 @@
sources:
- https://opendev.org/openstack/openstack-helm-infra
- https://opendev.org/openstack/openstack-helm
-version: 0.2.78
+version: 0.2.69
diff --git a/charts/ceph-provisioners/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl b/charts/ceph-provisioners/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
index 728b994..6877b7b 100644
--- a/charts/ceph-provisioners/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
+++ b/charts/ceph-provisioners/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
@@ -14,8 +14,7 @@
{{/*
abstract: |
- Resolves 'hostname:port' for an endpoint, or several hostname:port pairs for statefulset e.g
- 'hostname1:port1,hostname2:port2,hostname3:port3',
+ Resolves 'hostname:port' for an endpoint
examples:
- values: |
endpoints:
@@ -47,23 +46,6 @@
{{ tuple "oslo_db" "internal" "mysql" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
return: |
127.0.0.1:3306
- - values: |
- endpoints:
- oslo_cache:
- hosts:
- default: memcached
- host_fqdn_override:
- default: null
- statefulset:
- name: openstack-memcached-memcached
- replicas: 3
- port:
- memcache:
- default: 11211
- usage: |
- {{ tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
- return: |
- openstack-memcached-memcached-0:11211,openstack-memcached-memcached-1:11211,openstack-memcached-memcached-2:11211
*/}}
{{- define "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" -}}
@@ -71,19 +53,7 @@
{{- $endpoint := index . 1 -}}
{{- $port := index . 2 -}}
{{- $context := index . 3 -}}
-{{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false -}}
-{{- $local := dict "endpointHosts" list -}}
-{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" -}}
-{{- if $ssMap -}}
-{{- $endpointHostPrefix := $ssMap.name -}}
-{{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
-{{- range $podInt := until ( atoi (print $ssMap.replicas ) ) -}}
-{{- $endpointHostname := printf "%s-%d.%s:%s" $endpointHostPrefix $podInt $endpointHostSuffix $endpointPort -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts $endpointHostname ) -}}
-{{- end -}}
-{{- else -}}
-{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts (printf "%s:%s" $endpointHostname $endpointPort) ) -}}
-{{- end -}}
-{{ include "helm-toolkit.utils.joinListWithComma" $local.endpointHosts }}
+{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
+{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
+{{- printf "%s:%s" $endpointHostname $endpointPort -}}
{{- end -}}
diff --git a/charts/ceph-provisioners/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl b/charts/ceph-provisioners/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
index 24eb569..b2ec648 100644
--- a/charts/ceph-provisioners/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
+++ b/charts/ceph-provisioners/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
@@ -40,9 +40,9 @@
{{- $context := index . 3 -}}
{{- $endpointMap := index $context.Values.endpoints ( $type | replace "-" "_" ) }}
{{- if kindIs "string" $endpointMap.path }}
-{{- printf "%s" $endpointMap.path | default "" -}}
+{{- printf "%s" $endpointMap.path | default "/" -}}
{{- else -}}
-{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "" }}
+{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "/" }}
{{- printf "%s" $endpointPath -}}
{{- end -}}
{{- end -}}
diff --git a/charts/ceph-provisioners/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl b/charts/ceph-provisioners/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
deleted file mode 100644
index 332ca99..0000000
--- a/charts/ceph-provisioners/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
+++ /dev/null
@@ -1,51 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Renders out the configmap <service>-oslo-policy.
-values: |
- conf:
- policy.d:
- file1:
- foo: bar
- file2:
- foo: baz
-usage: |
-{{- include "helm-toolkit.manifests.configmap_oslo_policy" (dict "envAll" $envAll "serviceName" "keystone") }}
-return: |
- ---
- apiVersion: v1
- kind: Secret
- metadata:
- name: keystone-oslo-policy
- data:
- file1: base64of(foo: bar)
- file2: base64of(foo: baz)
-*/}}
-{{- define "helm-toolkit.manifests.configmap_oslo_policy" -}}
-{{- $envAll := index . "envAll" -}}
-{{- $serviceName := index . "serviceName" -}}
----
-apiVersion: v1
-kind: Secret
-metadata:
- name: {{ $serviceName }}-oslo-policy
-type: Opaque
-data:
- {{- range $key, $value := index $envAll.Values.conf "policy.d" }}
- {{- if $value }}
- {{ $key }}: {{ toYaml $value | b64enc }}
- {{- else }}
- {{ $key }}: {{ "\n" | b64enc }}
- {{- end }}
- {{- end }}
-{{- end -}}
diff --git a/charts/ceph-provisioners/charts/helm-toolkit/templates/manifests/_ingress.tpl b/charts/ceph-provisioners/charts/helm-toolkit/templates/manifests/_ingress.tpl
index 792571c..cacb4b8 100644
--- a/charts/ceph-provisioners/charts/helm-toolkit/templates/manifests/_ingress.tpl
+++ b/charts/ceph-provisioners/charts/helm-toolkit/templates/manifests/_ingress.tpl
@@ -708,10 +708,6 @@
{{- range $v := without (index $endpointHost.tls "dnsNames" | default list) $hostNameFull }}
{{- $vHosts = append $vHosts $v }}
{{- end }}
-{{- if hasKey $envAll.Values.endpoints "alias_fqdn" }}
-{{- $alias_host := $envAll.Values.endpoints.alias_fqdn }}
-{{- $vHosts = append $vHosts $alias_host }}
-{{- end }}
{{- $secretName := index $envAll.Values.secrets "tls" ( $backendServiceType | replace "-" "_" ) $backendService $endpoint }}
{{- $_ := required "You need to specify a secret in your values for the endpoint" $secretName }}
tls:
diff --git a/charts/ceph-provisioners/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/ceph-provisioners/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
index c6a7521..1e28da9 100644
--- a/charts/ceph-provisioners/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
+++ b/charts/ceph-provisioners/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Drop')
@@ -126,7 +125,7 @@
# Delete DB
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP DATABASE IF EXISTS {0}".format(database)))
+ connection.execute("DROP DATABASE IF EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -139,7 +138,7 @@
# Delete DB User
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP USER IF EXISTS {0}".format(user)))
+ connection.execute("DROP USER IF EXISTS {0}".format(user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/ceph-provisioners/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/ceph-provisioners/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
index 1917f78..110cd98 100644
--- a/charts/ceph-provisioners/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
+++ b/charts/ceph-provisioners/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Init')
@@ -126,7 +125,7 @@
# Create DB
try:
with root_engine.connect() as connection:
- connection.execute(text("CREATE DATABASE IF NOT EXISTS {0}".format(database)))
+ connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -140,10 +139,10 @@
try:
with root_engine.connect() as connection:
connection.execute(
- text("CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
- user, password, mysql_x509)))
+ "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
+ user, password, mysql_x509))
connection.execute(
- text("GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)))
+ "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/ceph-provisioners/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl b/charts/ceph-provisioners/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
index e6e9c6e..3739f95 100644
--- a/charts/ceph-provisioners/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
+++ b/charts/ceph-provisioners/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
@@ -29,9 +29,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_ADMIN_PASSWORD=$(echo "${RABBITMQ_ADMIN_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User creadential
RABBITMQ_USERNAME=$(echo "${RABBITMQ_USER_CONNECTION}" | \
@@ -39,9 +37,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_PASSWORD=$(echo "${RABBITMQ_USER_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User vHost
RABBITMQ_VHOST=$(echo "${RABBITMQ_USER_CONNECTION}" | \
diff --git a/charts/ceph-provisioners/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl b/charts/ceph-provisioners/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
index 5c2dedb..48b53fa 100644
--- a/charts/ceph-provisioners/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
+++ b/charts/ceph-provisioners/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
@@ -40,9 +40,6 @@
release_group: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
application: {{ $application }}
component: {{ $component }}
-app.kubernetes.io/name: {{ $application }}
-app.kubernetes.io/component: {{ $component }}
-app.kubernetes.io/instance: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
{{- if ($envAll.Values.pod).labels }}
{{- if hasKey $envAll.Values.pod.labels $component }}
{{ index $envAll.Values.pod "labels" $component | toYaml }}
diff --git a/charts/ceph-provisioners/charts/helm-toolkit/templates/snippets/_service_params.tpl b/charts/ceph-provisioners/charts/helm-toolkit/templates/snippets/_service_params.tpl
deleted file mode 100644
index 6233a93..0000000
--- a/charts/ceph-provisioners/charts/helm-toolkit/templates/snippets/_service_params.tpl
+++ /dev/null
@@ -1,61 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Inserts kubernetes service parameters from values as is.
-values: |
- network:
- serviceExample:
- service:
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-usage: |
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: 'serviceExample'
- spec:
- ports:
- - name: s-example
- port: 1111
- {{ .Values.network.serviceExample | include "helm-toolkit.snippets.service_params" | indent 2 }}
-return: |
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-*/}}
-
-{{- define "helm-toolkit.snippets.service_params" }}
-{{- $serviceParams := dict }}
-{{- if hasKey . "service" }}
-{{- $serviceParams = .service }}
-{{- end }}
-{{- if hasKey . "node_port" }}
-{{- if hasKey .node_port "enabled" }}
-{{- if .node_port.enabled }}
-{{- $_ := set $serviceParams "type" "NodePort" }}
-{{- end }}
-{{- end }}
-{{- end }}
-{{- if hasKey . "external_policy_local" }}
-{{- if .external_policy_local }}
-{{- $_ := set $serviceParams "externalTrafficPolicy" "Local" }}
-{{- end }}
-{{- end }}
-{{- if $serviceParams }}
-{{- $serviceParams | toYaml }}
-{{- end }}
-{{- end }}
diff --git a/charts/ceph-provisioners/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl b/charts/ceph-provisioners/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
deleted file mode 100644
index bdb28c3..0000000
--- a/charts/ceph-provisioners/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
+++ /dev/null
@@ -1,279 +0,0 @@
-{{/*
-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.
-*/}}
-
-{{/*
-
-The helm-toolkit.utils.daemonset_overrides function have some limitations:
-
- * it allows to override only conf values specifid in configmap-etc
- * it doesn't allow to override values for daemonsets passed via env variables
- or via damoenset definition. As result it is impossible to have mixed
- deployment when one compute is configured with dpdk while other not.
- * it is impossible to override interface names/other information stored in
- <service>-bin configmap
- * It allows to schedule on both hosts and labels, which adds some
- uncertainty
-
-This implementation is intended to handle those limitations:
-
- * it allows to schedule only based on labels
- * it creates <service>-bin per daemonset override
- * it allows to override values when rendering daemonsets
-
- It picks data from the following structure:
-
- .Values:
- overrides:
- mychart_mydaemonset:
- labels:
- label::value:
- values:
- override_root_option: override_root_value
- conf:
- ovs_dpdk:
- enabled: true
- neutron:
- DEFAULT:
- foo: bar
-
-*/}}
-
-{{- define "helm-toolkit.utils.daemonset_overrides_root" }}
- {{- $daemonset := index . 0 }}
- {{- $daemonSetTemplateName := index . 1 }}
- {{ $serviceAccountName := index . 2 }}
- {{- $configmap_include := index . 3 }}
- {{- $configmap_name := index . 4 }}
- {{- $configbin_include := index . 5 }}
- {{- $configbin_name := index . 6 }}
- {{- $context := index . 7 }}
-
- {{- $_ := unset $context ".Files" }}
- {{- $daemonset_root_name := printf (print $context.Chart.Name "_" $daemonset) }}
- {{- $_ := set $context.Values "__daemonset_list" list }}
- {{- $_ := set $context.Values "__default" dict }}
-
- {{- $default_enabled := true }}
- {{- if hasKey $context.Values "overrides" }}
- {{- range $key, $val := $context.Values.overrides }}
-
- {{- if eq $key $daemonset_root_name }}
- {{- range $type, $type_data := . }}
- {{- if eq $type "overrides_default" }}
- {{- $default_enabled = $type_data }}
- {{- end }}
-
- {{- if eq $type "labels" }}
- {{- $_ := set $context.Values "__label_dict" . }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
- {{/* dictionary that will contain all info needed to generate this
- iteration of the daemonset. */}}
- {{- $_ := set $context.Values "__current_label" dict }}
-
- {{/* set daemonset name */}}
- {{- $_ := set $context.Values.__current_label "name" $label_name }}
-
- {{/* set daemonset metadata annotation */}}
- {{- $_ := set $context.Values.__current_label "daemonset_override" $lname }}
-
- {{/* apply overrides */}}
-
-
- {{- $override_root_copy := $ldata.values }}
- {{/* Deep copy to prevent https://storyboard.openstack.org/#!/story/2005936 */}}
- {{- $root_copy := omit ($context.Values | toYaml | fromYaml) "overrides" }}
- {{- $merged_dict := mergeOverwrite $root_copy $override_root_copy }}
-
- {{- $root_conf_copy2 := dict "values" $merged_dict }}
- {{- $context_values := omit (omit ($context.Values | toYaml | fromYaml) "values") "__daemonset_list" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2.values }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__current_label "nodeData" $root_conf_copy4 }}
-
-
- {{/* Schedule to the provided label value(s) */}}
- {{- $label_dict := dict "key" $label_name }}
- {{- $_ := set $label_dict "values" (list $label_value) }}
- {{- $_ := set $label_dict "operator" "In" }}
- {{- $list_aggregate := list $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
-
- {{/* Do not schedule to other specified labels, with higher
- precedence as the list position increases. Last defined label
- is highest priority. */}}
- {{- $other_labels := omit $context.Values.__label_dict $lname }}
- {{- range $lname2, $ldata2 := $other_labels }}
- {{ $label_name2 := (split "::" $lname2)._0 }}
- {{ $label_value2 := (split "::" $lname2)._1 }}
-
- {{- $label_dict := dict "key" $label_name2 }}
- {{- $_ := set $label_dict "values" (list $label_value2) }}
- {{- $_ := set $label_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__current_label.matchExpressions $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
- {{- end }}
-
- {{/* store completed daemonset entry/info into global list */}}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__current_label }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- $_ := unset $context.Values "__current_label" }}
-
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* scheduler exceptions for the default daemonset */}}
- {{- $_ := set $context.Values.__default "matchExpressions" list }}
-
- {{- range $type, $type_data := . }}
- {{/* Do not schedule to other specified labels */}}
- {{- if eq $type "labels" }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
-
- {{- $default_dict := dict "key" $label_name }}
- {{- $_ := set $default_dict "values" (list $label_value) }}
- {{- $_ := set $default_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__default.matchExpressions $default_dict }}
- {{- $_ := set $context.Values.__default "matchExpressions" $list_aggregate }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* generate the default daemonset */}}
-
- {{/* set name */}}
- {{- $_ := set $context.Values.__default "name" "default" }}
-
- {{/* no overrides apply, so copy as-is */}}
- {{- $root_conf_copy1 := omit $context.Values.conf "overrides" }}
- {{- $root_conf_copy2 := dict "conf" $root_conf_copy1 }}
- {{- $context_values := omit $context.Values "conf" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2 }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__default "nodeData" $root_conf_copy4 }}
-
- {{/* add to global list */}}
- {{- if $default_enabled }}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__default }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- end }}
-
- {{- range $current_dict := $context.Values.__daemonset_list }}
-
- {{- $context_novalues := omit $context "Values" }}
- {{- $merged_dict := mergeOverwrite $context_novalues $current_dict.nodeData }}
- {{- $_ := set $current_dict "nodeData" $merged_dict }}
- {{/* Deep copy original daemonset_yaml */}}
- {{- $daemonset_yaml := list $daemonset $configmap_name $serviceAccountName $merged_dict | include $daemonSetTemplateName | toString | fromYaml }}
- {{- $_ := set $context.Values "__daemonset_yaml" ($daemonset_yaml | toYaml | fromYaml) }}
-
- {{/* Use the following name format $daemonset_root_name + sha256summ($current_dict.matchExpressions)
- as labels might be too long and contain wrong characters like / */}}
- {{- $_ := set $current_dict "dns_1123_name" dict }}
- {{- $name_format := "" }}
- {{- if eq $current_dict.name "default" }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name "default") | replace "_" "-" }}
- {{- else }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name ($current_dict.matchExpressions | quote | sha256sum | trunc 16)) | replace "_" "-" }}
- {{- end }}
- {{- $_ := set $current_dict "dns_1123_name" $name_format }}
-
- {{/* set daemonset metadata name */}}
- {{- if not $context.Values.__daemonset_yaml.metadata }}{{- $_ := set $context.Values.__daemonset_yaml "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.metadata.name }}{{- $_ := set $context.Values.__daemonset_yaml.metadata "name" dict }}{{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata "name" $current_dict.dns_1123_name }}
-
- {{/* cross-reference configmap name to container volume definitions */}}
- {{- $_ := set $context.Values "__volume_list" list }}
- {{- range $current_volume := $context.Values.__daemonset_yaml.spec.template.spec.volumes }}
- {{- $_ := set $context.Values "__volume" $current_volume }}
- {{- if hasKey $context.Values.__volume "secret" }}
- {{- if eq $context.Values.__volume.secret.secretName $configmap_name }}
- {{- $_ := set $context.Values.__volume.secret "secretName" (printf "%s-etc" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- if hasKey $context.Values.__volume "configMap" }}
- {{- if eq $context.Values.__volume.configMap.name $configbin_name }}
- {{- $_ := set $context.Values.__volume.configMap "name" (printf "%s-bin" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- $updated_list := append $context.Values.__volume_list $context.Values.__volume }}
- {{- $_ := set $context.Values "__volume_list" $updated_list }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "volumes" $context.Values.__volume_list }}
-
-
- {{/* populate scheduling restrictions */}}
- {{- if hasKey $current_dict "matchExpressions" }}
- {{- $length := len $current_dict.matchExpressions }}
- {{- if gt $length 0 }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "affinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity "nodeAffinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity "requiredDuringSchedulingIgnoredDuringExecution" dict }}{{- end }}
-
- {{- $expressions_modified := list }}
- {{- if hasKey $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" }}
- {{- range $orig_expression := $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms }}
- {{- $match_expressions_modified := list }}
- {{- $match_expressions_modified = concat $match_expressions_modified $current_dict.matchExpressions }}
- {{- if hasKey $orig_expression "matchExpressions" }}
- {{- $match_expressions_modified = concat $match_expressions_modified $orig_expression.matchExpressions }}
- {{- $expressions_modified = append $expressions_modified (dict "matchExpressions" $match_expressions_modified) }}
- {{- end }}
- {{- end }}
- {{- else }}
- {{- $expressions_modified = (list (dict "matchExpressions" $current_dict.matchExpressions)) }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" $expressions_modified }}
- {{- end }}
- {{- end }}
-
- {{/* input value hash for current set of values overrides */}}
- {{- if not $context.Values.__daemonset_yaml.spec }}{{- $_ := set $context.Values.__daemonset_yaml "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template }}{{- $_ := set $context.Values.__daemonset_yaml.spec "template" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata.annotations }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata "annotations" dict }}{{- end }}
- {{- $cmap := list (printf "%s-etc" $current_dict.dns_1123_name) $current_dict.nodeData | include $configmap_include }}
- {{- $cmap_bin := list (printf "%s-bin" $current_dict.dns_1123_name) $current_dict.nodeData | include $configbin_include }}
- {{- $values_cmap_hash := $cmap | quote | sha256sum }}
- {{- $values_cmap_bin_hash := $cmap_bin | quote | sha256sum }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-etc-hash" $values_cmap_hash }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-bin-hash" $values_cmap_bin_hash }}
-
- {{/* Do not set override for default daemonset */}}
- {{- if $current_dict.daemonset_override }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata.annotations "daemonset_override" $current_dict.daemonset_override }}
- {{- end }}
-
-{{/* generate configmap */}}
----
-{{ $cmap }}
- {{/* generate <service>-bin yaml */}}
----
-{{ $cmap_bin }}
- {{/* generate daemonset yaml */}}
----
-{{ $context.Values.__daemonset_yaml | toYaml }}
- {{- end }}
-{{- end }}
diff --git a/charts/ceph-provisioners/requirements.lock b/charts/ceph-provisioners/requirements.lock
index b94dead..4f63a87 100644
--- a/charts/ceph-provisioners/requirements.lock
+++ b/charts/ceph-provisioners/requirements.lock
@@ -1,6 +1,6 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
-digest: sha256:760c5997580ac8d30a64dfe92d6a54052b783ddf90cacbc5a4c95c1330988742
+ version: 0.2.69
+digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef
generated: "0001-01-01T00:00:00Z"
diff --git a/charts/ceph-provisioners/requirements.yaml b/charts/ceph-provisioners/requirements.yaml
index 52e723e..b3d5dcf 100644
--- a/charts/ceph-provisioners/requirements.yaml
+++ b/charts/ceph-provisioners/requirements.yaml
@@ -1,4 +1,4 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
+ version: 0.2.69
diff --git a/charts/cinder/charts/helm-toolkit/Chart.yaml b/charts/cinder/charts/helm-toolkit/Chart.yaml
index 9d3aa1e..d4c0ea2 100644
--- a/charts/cinder/charts/helm-toolkit/Chart.yaml
+++ b/charts/cinder/charts/helm-toolkit/Chart.yaml
@@ -9,4 +9,4 @@
sources:
- https://opendev.org/openstack/openstack-helm-infra
- https://opendev.org/openstack/openstack-helm
-version: 0.2.78
+version: 0.2.69
diff --git a/charts/cinder/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl b/charts/cinder/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
index 728b994..6877b7b 100644
--- a/charts/cinder/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
+++ b/charts/cinder/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
@@ -14,8 +14,7 @@
{{/*
abstract: |
- Resolves 'hostname:port' for an endpoint, or several hostname:port pairs for statefulset e.g
- 'hostname1:port1,hostname2:port2,hostname3:port3',
+ Resolves 'hostname:port' for an endpoint
examples:
- values: |
endpoints:
@@ -47,23 +46,6 @@
{{ tuple "oslo_db" "internal" "mysql" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
return: |
127.0.0.1:3306
- - values: |
- endpoints:
- oslo_cache:
- hosts:
- default: memcached
- host_fqdn_override:
- default: null
- statefulset:
- name: openstack-memcached-memcached
- replicas: 3
- port:
- memcache:
- default: 11211
- usage: |
- {{ tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
- return: |
- openstack-memcached-memcached-0:11211,openstack-memcached-memcached-1:11211,openstack-memcached-memcached-2:11211
*/}}
{{- define "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" -}}
@@ -71,19 +53,7 @@
{{- $endpoint := index . 1 -}}
{{- $port := index . 2 -}}
{{- $context := index . 3 -}}
-{{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false -}}
-{{- $local := dict "endpointHosts" list -}}
-{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" -}}
-{{- if $ssMap -}}
-{{- $endpointHostPrefix := $ssMap.name -}}
-{{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
-{{- range $podInt := until ( atoi (print $ssMap.replicas ) ) -}}
-{{- $endpointHostname := printf "%s-%d.%s:%s" $endpointHostPrefix $podInt $endpointHostSuffix $endpointPort -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts $endpointHostname ) -}}
-{{- end -}}
-{{- else -}}
-{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts (printf "%s:%s" $endpointHostname $endpointPort) ) -}}
-{{- end -}}
-{{ include "helm-toolkit.utils.joinListWithComma" $local.endpointHosts }}
+{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
+{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
+{{- printf "%s:%s" $endpointHostname $endpointPort -}}
{{- end -}}
diff --git a/charts/cinder/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl b/charts/cinder/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
index 24eb569..b2ec648 100644
--- a/charts/cinder/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
+++ b/charts/cinder/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
@@ -40,9 +40,9 @@
{{- $context := index . 3 -}}
{{- $endpointMap := index $context.Values.endpoints ( $type | replace "-" "_" ) }}
{{- if kindIs "string" $endpointMap.path }}
-{{- printf "%s" $endpointMap.path | default "" -}}
+{{- printf "%s" $endpointMap.path | default "/" -}}
{{- else -}}
-{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "" }}
+{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "/" }}
{{- printf "%s" $endpointPath -}}
{{- end -}}
{{- end -}}
diff --git a/charts/cinder/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl b/charts/cinder/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
deleted file mode 100644
index 332ca99..0000000
--- a/charts/cinder/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
+++ /dev/null
@@ -1,51 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Renders out the configmap <service>-oslo-policy.
-values: |
- conf:
- policy.d:
- file1:
- foo: bar
- file2:
- foo: baz
-usage: |
-{{- include "helm-toolkit.manifests.configmap_oslo_policy" (dict "envAll" $envAll "serviceName" "keystone") }}
-return: |
- ---
- apiVersion: v1
- kind: Secret
- metadata:
- name: keystone-oslo-policy
- data:
- file1: base64of(foo: bar)
- file2: base64of(foo: baz)
-*/}}
-{{- define "helm-toolkit.manifests.configmap_oslo_policy" -}}
-{{- $envAll := index . "envAll" -}}
-{{- $serviceName := index . "serviceName" -}}
----
-apiVersion: v1
-kind: Secret
-metadata:
- name: {{ $serviceName }}-oslo-policy
-type: Opaque
-data:
- {{- range $key, $value := index $envAll.Values.conf "policy.d" }}
- {{- if $value }}
- {{ $key }}: {{ toYaml $value | b64enc }}
- {{- else }}
- {{ $key }}: {{ "\n" | b64enc }}
- {{- end }}
- {{- end }}
-{{- end -}}
diff --git a/charts/cinder/charts/helm-toolkit/templates/manifests/_ingress.tpl b/charts/cinder/charts/helm-toolkit/templates/manifests/_ingress.tpl
index 792571c..cacb4b8 100644
--- a/charts/cinder/charts/helm-toolkit/templates/manifests/_ingress.tpl
+++ b/charts/cinder/charts/helm-toolkit/templates/manifests/_ingress.tpl
@@ -708,10 +708,6 @@
{{- range $v := without (index $endpointHost.tls "dnsNames" | default list) $hostNameFull }}
{{- $vHosts = append $vHosts $v }}
{{- end }}
-{{- if hasKey $envAll.Values.endpoints "alias_fqdn" }}
-{{- $alias_host := $envAll.Values.endpoints.alias_fqdn }}
-{{- $vHosts = append $vHosts $alias_host }}
-{{- end }}
{{- $secretName := index $envAll.Values.secrets "tls" ( $backendServiceType | replace "-" "_" ) $backendService $endpoint }}
{{- $_ := required "You need to specify a secret in your values for the endpoint" $secretName }}
tls:
diff --git a/charts/cinder/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/cinder/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
index c6a7521..1e28da9 100644
--- a/charts/cinder/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
+++ b/charts/cinder/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Drop')
@@ -126,7 +125,7 @@
# Delete DB
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP DATABASE IF EXISTS {0}".format(database)))
+ connection.execute("DROP DATABASE IF EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -139,7 +138,7 @@
# Delete DB User
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP USER IF EXISTS {0}".format(user)))
+ connection.execute("DROP USER IF EXISTS {0}".format(user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/cinder/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/cinder/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
index 1917f78..110cd98 100644
--- a/charts/cinder/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
+++ b/charts/cinder/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Init')
@@ -126,7 +125,7 @@
# Create DB
try:
with root_engine.connect() as connection:
- connection.execute(text("CREATE DATABASE IF NOT EXISTS {0}".format(database)))
+ connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -140,10 +139,10 @@
try:
with root_engine.connect() as connection:
connection.execute(
- text("CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
- user, password, mysql_x509)))
+ "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
+ user, password, mysql_x509))
connection.execute(
- text("GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)))
+ "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/cinder/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl b/charts/cinder/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
index e6e9c6e..3739f95 100644
--- a/charts/cinder/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
+++ b/charts/cinder/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
@@ -29,9 +29,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_ADMIN_PASSWORD=$(echo "${RABBITMQ_ADMIN_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User creadential
RABBITMQ_USERNAME=$(echo "${RABBITMQ_USER_CONNECTION}" | \
@@ -39,9 +37,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_PASSWORD=$(echo "${RABBITMQ_USER_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User vHost
RABBITMQ_VHOST=$(echo "${RABBITMQ_USER_CONNECTION}" | \
diff --git a/charts/cinder/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl b/charts/cinder/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
index 5c2dedb..48b53fa 100644
--- a/charts/cinder/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
+++ b/charts/cinder/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
@@ -40,9 +40,6 @@
release_group: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
application: {{ $application }}
component: {{ $component }}
-app.kubernetes.io/name: {{ $application }}
-app.kubernetes.io/component: {{ $component }}
-app.kubernetes.io/instance: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
{{- if ($envAll.Values.pod).labels }}
{{- if hasKey $envAll.Values.pod.labels $component }}
{{ index $envAll.Values.pod "labels" $component | toYaml }}
diff --git a/charts/cinder/charts/helm-toolkit/templates/snippets/_service_params.tpl b/charts/cinder/charts/helm-toolkit/templates/snippets/_service_params.tpl
deleted file mode 100644
index 6233a93..0000000
--- a/charts/cinder/charts/helm-toolkit/templates/snippets/_service_params.tpl
+++ /dev/null
@@ -1,61 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Inserts kubernetes service parameters from values as is.
-values: |
- network:
- serviceExample:
- service:
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-usage: |
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: 'serviceExample'
- spec:
- ports:
- - name: s-example
- port: 1111
- {{ .Values.network.serviceExample | include "helm-toolkit.snippets.service_params" | indent 2 }}
-return: |
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-*/}}
-
-{{- define "helm-toolkit.snippets.service_params" }}
-{{- $serviceParams := dict }}
-{{- if hasKey . "service" }}
-{{- $serviceParams = .service }}
-{{- end }}
-{{- if hasKey . "node_port" }}
-{{- if hasKey .node_port "enabled" }}
-{{- if .node_port.enabled }}
-{{- $_ := set $serviceParams "type" "NodePort" }}
-{{- end }}
-{{- end }}
-{{- end }}
-{{- if hasKey . "external_policy_local" }}
-{{- if .external_policy_local }}
-{{- $_ := set $serviceParams "externalTrafficPolicy" "Local" }}
-{{- end }}
-{{- end }}
-{{- if $serviceParams }}
-{{- $serviceParams | toYaml }}
-{{- end }}
-{{- end }}
diff --git a/charts/cinder/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl b/charts/cinder/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
deleted file mode 100644
index bdb28c3..0000000
--- a/charts/cinder/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
+++ /dev/null
@@ -1,279 +0,0 @@
-{{/*
-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.
-*/}}
-
-{{/*
-
-The helm-toolkit.utils.daemonset_overrides function have some limitations:
-
- * it allows to override only conf values specifid in configmap-etc
- * it doesn't allow to override values for daemonsets passed via env variables
- or via damoenset definition. As result it is impossible to have mixed
- deployment when one compute is configured with dpdk while other not.
- * it is impossible to override interface names/other information stored in
- <service>-bin configmap
- * It allows to schedule on both hosts and labels, which adds some
- uncertainty
-
-This implementation is intended to handle those limitations:
-
- * it allows to schedule only based on labels
- * it creates <service>-bin per daemonset override
- * it allows to override values when rendering daemonsets
-
- It picks data from the following structure:
-
- .Values:
- overrides:
- mychart_mydaemonset:
- labels:
- label::value:
- values:
- override_root_option: override_root_value
- conf:
- ovs_dpdk:
- enabled: true
- neutron:
- DEFAULT:
- foo: bar
-
-*/}}
-
-{{- define "helm-toolkit.utils.daemonset_overrides_root" }}
- {{- $daemonset := index . 0 }}
- {{- $daemonSetTemplateName := index . 1 }}
- {{ $serviceAccountName := index . 2 }}
- {{- $configmap_include := index . 3 }}
- {{- $configmap_name := index . 4 }}
- {{- $configbin_include := index . 5 }}
- {{- $configbin_name := index . 6 }}
- {{- $context := index . 7 }}
-
- {{- $_ := unset $context ".Files" }}
- {{- $daemonset_root_name := printf (print $context.Chart.Name "_" $daemonset) }}
- {{- $_ := set $context.Values "__daemonset_list" list }}
- {{- $_ := set $context.Values "__default" dict }}
-
- {{- $default_enabled := true }}
- {{- if hasKey $context.Values "overrides" }}
- {{- range $key, $val := $context.Values.overrides }}
-
- {{- if eq $key $daemonset_root_name }}
- {{- range $type, $type_data := . }}
- {{- if eq $type "overrides_default" }}
- {{- $default_enabled = $type_data }}
- {{- end }}
-
- {{- if eq $type "labels" }}
- {{- $_ := set $context.Values "__label_dict" . }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
- {{/* dictionary that will contain all info needed to generate this
- iteration of the daemonset. */}}
- {{- $_ := set $context.Values "__current_label" dict }}
-
- {{/* set daemonset name */}}
- {{- $_ := set $context.Values.__current_label "name" $label_name }}
-
- {{/* set daemonset metadata annotation */}}
- {{- $_ := set $context.Values.__current_label "daemonset_override" $lname }}
-
- {{/* apply overrides */}}
-
-
- {{- $override_root_copy := $ldata.values }}
- {{/* Deep copy to prevent https://storyboard.openstack.org/#!/story/2005936 */}}
- {{- $root_copy := omit ($context.Values | toYaml | fromYaml) "overrides" }}
- {{- $merged_dict := mergeOverwrite $root_copy $override_root_copy }}
-
- {{- $root_conf_copy2 := dict "values" $merged_dict }}
- {{- $context_values := omit (omit ($context.Values | toYaml | fromYaml) "values") "__daemonset_list" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2.values }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__current_label "nodeData" $root_conf_copy4 }}
-
-
- {{/* Schedule to the provided label value(s) */}}
- {{- $label_dict := dict "key" $label_name }}
- {{- $_ := set $label_dict "values" (list $label_value) }}
- {{- $_ := set $label_dict "operator" "In" }}
- {{- $list_aggregate := list $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
-
- {{/* Do not schedule to other specified labels, with higher
- precedence as the list position increases. Last defined label
- is highest priority. */}}
- {{- $other_labels := omit $context.Values.__label_dict $lname }}
- {{- range $lname2, $ldata2 := $other_labels }}
- {{ $label_name2 := (split "::" $lname2)._0 }}
- {{ $label_value2 := (split "::" $lname2)._1 }}
-
- {{- $label_dict := dict "key" $label_name2 }}
- {{- $_ := set $label_dict "values" (list $label_value2) }}
- {{- $_ := set $label_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__current_label.matchExpressions $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
- {{- end }}
-
- {{/* store completed daemonset entry/info into global list */}}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__current_label }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- $_ := unset $context.Values "__current_label" }}
-
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* scheduler exceptions for the default daemonset */}}
- {{- $_ := set $context.Values.__default "matchExpressions" list }}
-
- {{- range $type, $type_data := . }}
- {{/* Do not schedule to other specified labels */}}
- {{- if eq $type "labels" }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
-
- {{- $default_dict := dict "key" $label_name }}
- {{- $_ := set $default_dict "values" (list $label_value) }}
- {{- $_ := set $default_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__default.matchExpressions $default_dict }}
- {{- $_ := set $context.Values.__default "matchExpressions" $list_aggregate }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* generate the default daemonset */}}
-
- {{/* set name */}}
- {{- $_ := set $context.Values.__default "name" "default" }}
-
- {{/* no overrides apply, so copy as-is */}}
- {{- $root_conf_copy1 := omit $context.Values.conf "overrides" }}
- {{- $root_conf_copy2 := dict "conf" $root_conf_copy1 }}
- {{- $context_values := omit $context.Values "conf" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2 }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__default "nodeData" $root_conf_copy4 }}
-
- {{/* add to global list */}}
- {{- if $default_enabled }}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__default }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- end }}
-
- {{- range $current_dict := $context.Values.__daemonset_list }}
-
- {{- $context_novalues := omit $context "Values" }}
- {{- $merged_dict := mergeOverwrite $context_novalues $current_dict.nodeData }}
- {{- $_ := set $current_dict "nodeData" $merged_dict }}
- {{/* Deep copy original daemonset_yaml */}}
- {{- $daemonset_yaml := list $daemonset $configmap_name $serviceAccountName $merged_dict | include $daemonSetTemplateName | toString | fromYaml }}
- {{- $_ := set $context.Values "__daemonset_yaml" ($daemonset_yaml | toYaml | fromYaml) }}
-
- {{/* Use the following name format $daemonset_root_name + sha256summ($current_dict.matchExpressions)
- as labels might be too long and contain wrong characters like / */}}
- {{- $_ := set $current_dict "dns_1123_name" dict }}
- {{- $name_format := "" }}
- {{- if eq $current_dict.name "default" }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name "default") | replace "_" "-" }}
- {{- else }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name ($current_dict.matchExpressions | quote | sha256sum | trunc 16)) | replace "_" "-" }}
- {{- end }}
- {{- $_ := set $current_dict "dns_1123_name" $name_format }}
-
- {{/* set daemonset metadata name */}}
- {{- if not $context.Values.__daemonset_yaml.metadata }}{{- $_ := set $context.Values.__daemonset_yaml "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.metadata.name }}{{- $_ := set $context.Values.__daemonset_yaml.metadata "name" dict }}{{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata "name" $current_dict.dns_1123_name }}
-
- {{/* cross-reference configmap name to container volume definitions */}}
- {{- $_ := set $context.Values "__volume_list" list }}
- {{- range $current_volume := $context.Values.__daemonset_yaml.spec.template.spec.volumes }}
- {{- $_ := set $context.Values "__volume" $current_volume }}
- {{- if hasKey $context.Values.__volume "secret" }}
- {{- if eq $context.Values.__volume.secret.secretName $configmap_name }}
- {{- $_ := set $context.Values.__volume.secret "secretName" (printf "%s-etc" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- if hasKey $context.Values.__volume "configMap" }}
- {{- if eq $context.Values.__volume.configMap.name $configbin_name }}
- {{- $_ := set $context.Values.__volume.configMap "name" (printf "%s-bin" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- $updated_list := append $context.Values.__volume_list $context.Values.__volume }}
- {{- $_ := set $context.Values "__volume_list" $updated_list }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "volumes" $context.Values.__volume_list }}
-
-
- {{/* populate scheduling restrictions */}}
- {{- if hasKey $current_dict "matchExpressions" }}
- {{- $length := len $current_dict.matchExpressions }}
- {{- if gt $length 0 }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "affinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity "nodeAffinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity "requiredDuringSchedulingIgnoredDuringExecution" dict }}{{- end }}
-
- {{- $expressions_modified := list }}
- {{- if hasKey $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" }}
- {{- range $orig_expression := $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms }}
- {{- $match_expressions_modified := list }}
- {{- $match_expressions_modified = concat $match_expressions_modified $current_dict.matchExpressions }}
- {{- if hasKey $orig_expression "matchExpressions" }}
- {{- $match_expressions_modified = concat $match_expressions_modified $orig_expression.matchExpressions }}
- {{- $expressions_modified = append $expressions_modified (dict "matchExpressions" $match_expressions_modified) }}
- {{- end }}
- {{- end }}
- {{- else }}
- {{- $expressions_modified = (list (dict "matchExpressions" $current_dict.matchExpressions)) }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" $expressions_modified }}
- {{- end }}
- {{- end }}
-
- {{/* input value hash for current set of values overrides */}}
- {{- if not $context.Values.__daemonset_yaml.spec }}{{- $_ := set $context.Values.__daemonset_yaml "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template }}{{- $_ := set $context.Values.__daemonset_yaml.spec "template" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata.annotations }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata "annotations" dict }}{{- end }}
- {{- $cmap := list (printf "%s-etc" $current_dict.dns_1123_name) $current_dict.nodeData | include $configmap_include }}
- {{- $cmap_bin := list (printf "%s-bin" $current_dict.dns_1123_name) $current_dict.nodeData | include $configbin_include }}
- {{- $values_cmap_hash := $cmap | quote | sha256sum }}
- {{- $values_cmap_bin_hash := $cmap_bin | quote | sha256sum }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-etc-hash" $values_cmap_hash }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-bin-hash" $values_cmap_bin_hash }}
-
- {{/* Do not set override for default daemonset */}}
- {{- if $current_dict.daemonset_override }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata.annotations "daemonset_override" $current_dict.daemonset_override }}
- {{- end }}
-
-{{/* generate configmap */}}
----
-{{ $cmap }}
- {{/* generate <service>-bin yaml */}}
----
-{{ $cmap_bin }}
- {{/* generate daemonset yaml */}}
----
-{{ $context.Values.__daemonset_yaml | toYaml }}
- {{- end }}
-{{- end }}
diff --git a/charts/cinder/requirements.lock b/charts/cinder/requirements.lock
index b94dead..4f63a87 100644
--- a/charts/cinder/requirements.lock
+++ b/charts/cinder/requirements.lock
@@ -1,6 +1,6 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
-digest: sha256:760c5997580ac8d30a64dfe92d6a54052b783ddf90cacbc5a4c95c1330988742
+ version: 0.2.69
+digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef
generated: "0001-01-01T00:00:00Z"
diff --git a/charts/cinder/requirements.yaml b/charts/cinder/requirements.yaml
index 52e723e..b3d5dcf 100644
--- a/charts/cinder/requirements.yaml
+++ b/charts/cinder/requirements.yaml
@@ -1,4 +1,4 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
+ version: 0.2.69
diff --git a/charts/designate/charts/helm-toolkit/Chart.yaml b/charts/designate/charts/helm-toolkit/Chart.yaml
index 9d3aa1e..d4c0ea2 100644
--- a/charts/designate/charts/helm-toolkit/Chart.yaml
+++ b/charts/designate/charts/helm-toolkit/Chart.yaml
@@ -9,4 +9,4 @@
sources:
- https://opendev.org/openstack/openstack-helm-infra
- https://opendev.org/openstack/openstack-helm
-version: 0.2.78
+version: 0.2.69
diff --git a/charts/designate/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl b/charts/designate/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
index 728b994..6877b7b 100644
--- a/charts/designate/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
+++ b/charts/designate/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
@@ -14,8 +14,7 @@
{{/*
abstract: |
- Resolves 'hostname:port' for an endpoint, or several hostname:port pairs for statefulset e.g
- 'hostname1:port1,hostname2:port2,hostname3:port3',
+ Resolves 'hostname:port' for an endpoint
examples:
- values: |
endpoints:
@@ -47,23 +46,6 @@
{{ tuple "oslo_db" "internal" "mysql" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
return: |
127.0.0.1:3306
- - values: |
- endpoints:
- oslo_cache:
- hosts:
- default: memcached
- host_fqdn_override:
- default: null
- statefulset:
- name: openstack-memcached-memcached
- replicas: 3
- port:
- memcache:
- default: 11211
- usage: |
- {{ tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
- return: |
- openstack-memcached-memcached-0:11211,openstack-memcached-memcached-1:11211,openstack-memcached-memcached-2:11211
*/}}
{{- define "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" -}}
@@ -71,19 +53,7 @@
{{- $endpoint := index . 1 -}}
{{- $port := index . 2 -}}
{{- $context := index . 3 -}}
-{{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false -}}
-{{- $local := dict "endpointHosts" list -}}
-{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" -}}
-{{- if $ssMap -}}
-{{- $endpointHostPrefix := $ssMap.name -}}
-{{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
-{{- range $podInt := until ( atoi (print $ssMap.replicas ) ) -}}
-{{- $endpointHostname := printf "%s-%d.%s:%s" $endpointHostPrefix $podInt $endpointHostSuffix $endpointPort -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts $endpointHostname ) -}}
-{{- end -}}
-{{- else -}}
-{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts (printf "%s:%s" $endpointHostname $endpointPort) ) -}}
-{{- end -}}
-{{ include "helm-toolkit.utils.joinListWithComma" $local.endpointHosts }}
+{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
+{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
+{{- printf "%s:%s" $endpointHostname $endpointPort -}}
{{- end -}}
diff --git a/charts/designate/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl b/charts/designate/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
index 24eb569..b2ec648 100644
--- a/charts/designate/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
+++ b/charts/designate/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
@@ -40,9 +40,9 @@
{{- $context := index . 3 -}}
{{- $endpointMap := index $context.Values.endpoints ( $type | replace "-" "_" ) }}
{{- if kindIs "string" $endpointMap.path }}
-{{- printf "%s" $endpointMap.path | default "" -}}
+{{- printf "%s" $endpointMap.path | default "/" -}}
{{- else -}}
-{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "" }}
+{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "/" }}
{{- printf "%s" $endpointPath -}}
{{- end -}}
{{- end -}}
diff --git a/charts/designate/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl b/charts/designate/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
deleted file mode 100644
index 332ca99..0000000
--- a/charts/designate/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
+++ /dev/null
@@ -1,51 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Renders out the configmap <service>-oslo-policy.
-values: |
- conf:
- policy.d:
- file1:
- foo: bar
- file2:
- foo: baz
-usage: |
-{{- include "helm-toolkit.manifests.configmap_oslo_policy" (dict "envAll" $envAll "serviceName" "keystone") }}
-return: |
- ---
- apiVersion: v1
- kind: Secret
- metadata:
- name: keystone-oslo-policy
- data:
- file1: base64of(foo: bar)
- file2: base64of(foo: baz)
-*/}}
-{{- define "helm-toolkit.manifests.configmap_oslo_policy" -}}
-{{- $envAll := index . "envAll" -}}
-{{- $serviceName := index . "serviceName" -}}
----
-apiVersion: v1
-kind: Secret
-metadata:
- name: {{ $serviceName }}-oslo-policy
-type: Opaque
-data:
- {{- range $key, $value := index $envAll.Values.conf "policy.d" }}
- {{- if $value }}
- {{ $key }}: {{ toYaml $value | b64enc }}
- {{- else }}
- {{ $key }}: {{ "\n" | b64enc }}
- {{- end }}
- {{- end }}
-{{- end -}}
diff --git a/charts/designate/charts/helm-toolkit/templates/manifests/_ingress.tpl b/charts/designate/charts/helm-toolkit/templates/manifests/_ingress.tpl
index 792571c..cacb4b8 100644
--- a/charts/designate/charts/helm-toolkit/templates/manifests/_ingress.tpl
+++ b/charts/designate/charts/helm-toolkit/templates/manifests/_ingress.tpl
@@ -708,10 +708,6 @@
{{- range $v := without (index $endpointHost.tls "dnsNames" | default list) $hostNameFull }}
{{- $vHosts = append $vHosts $v }}
{{- end }}
-{{- if hasKey $envAll.Values.endpoints "alias_fqdn" }}
-{{- $alias_host := $envAll.Values.endpoints.alias_fqdn }}
-{{- $vHosts = append $vHosts $alias_host }}
-{{- end }}
{{- $secretName := index $envAll.Values.secrets "tls" ( $backendServiceType | replace "-" "_" ) $backendService $endpoint }}
{{- $_ := required "You need to specify a secret in your values for the endpoint" $secretName }}
tls:
diff --git a/charts/designate/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/designate/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
index c6a7521..1e28da9 100644
--- a/charts/designate/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
+++ b/charts/designate/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Drop')
@@ -126,7 +125,7 @@
# Delete DB
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP DATABASE IF EXISTS {0}".format(database)))
+ connection.execute("DROP DATABASE IF EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -139,7 +138,7 @@
# Delete DB User
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP USER IF EXISTS {0}".format(user)))
+ connection.execute("DROP USER IF EXISTS {0}".format(user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/designate/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/designate/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
index 1917f78..110cd98 100644
--- a/charts/designate/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
+++ b/charts/designate/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Init')
@@ -126,7 +125,7 @@
# Create DB
try:
with root_engine.connect() as connection:
- connection.execute(text("CREATE DATABASE IF NOT EXISTS {0}".format(database)))
+ connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -140,10 +139,10 @@
try:
with root_engine.connect() as connection:
connection.execute(
- text("CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
- user, password, mysql_x509)))
+ "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
+ user, password, mysql_x509))
connection.execute(
- text("GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)))
+ "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/designate/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl b/charts/designate/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
index e6e9c6e..3739f95 100644
--- a/charts/designate/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
+++ b/charts/designate/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
@@ -29,9 +29,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_ADMIN_PASSWORD=$(echo "${RABBITMQ_ADMIN_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User creadential
RABBITMQ_USERNAME=$(echo "${RABBITMQ_USER_CONNECTION}" | \
@@ -39,9 +37,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_PASSWORD=$(echo "${RABBITMQ_USER_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User vHost
RABBITMQ_VHOST=$(echo "${RABBITMQ_USER_CONNECTION}" | \
diff --git a/charts/designate/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl b/charts/designate/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
index 5c2dedb..48b53fa 100644
--- a/charts/designate/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
+++ b/charts/designate/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
@@ -40,9 +40,6 @@
release_group: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
application: {{ $application }}
component: {{ $component }}
-app.kubernetes.io/name: {{ $application }}
-app.kubernetes.io/component: {{ $component }}
-app.kubernetes.io/instance: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
{{- if ($envAll.Values.pod).labels }}
{{- if hasKey $envAll.Values.pod.labels $component }}
{{ index $envAll.Values.pod "labels" $component | toYaml }}
diff --git a/charts/designate/charts/helm-toolkit/templates/snippets/_service_params.tpl b/charts/designate/charts/helm-toolkit/templates/snippets/_service_params.tpl
deleted file mode 100644
index 6233a93..0000000
--- a/charts/designate/charts/helm-toolkit/templates/snippets/_service_params.tpl
+++ /dev/null
@@ -1,61 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Inserts kubernetes service parameters from values as is.
-values: |
- network:
- serviceExample:
- service:
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-usage: |
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: 'serviceExample'
- spec:
- ports:
- - name: s-example
- port: 1111
- {{ .Values.network.serviceExample | include "helm-toolkit.snippets.service_params" | indent 2 }}
-return: |
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-*/}}
-
-{{- define "helm-toolkit.snippets.service_params" }}
-{{- $serviceParams := dict }}
-{{- if hasKey . "service" }}
-{{- $serviceParams = .service }}
-{{- end }}
-{{- if hasKey . "node_port" }}
-{{- if hasKey .node_port "enabled" }}
-{{- if .node_port.enabled }}
-{{- $_ := set $serviceParams "type" "NodePort" }}
-{{- end }}
-{{- end }}
-{{- end }}
-{{- if hasKey . "external_policy_local" }}
-{{- if .external_policy_local }}
-{{- $_ := set $serviceParams "externalTrafficPolicy" "Local" }}
-{{- end }}
-{{- end }}
-{{- if $serviceParams }}
-{{- $serviceParams | toYaml }}
-{{- end }}
-{{- end }}
diff --git a/charts/designate/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl b/charts/designate/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
deleted file mode 100644
index bdb28c3..0000000
--- a/charts/designate/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
+++ /dev/null
@@ -1,279 +0,0 @@
-{{/*
-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.
-*/}}
-
-{{/*
-
-The helm-toolkit.utils.daemonset_overrides function have some limitations:
-
- * it allows to override only conf values specifid in configmap-etc
- * it doesn't allow to override values for daemonsets passed via env variables
- or via damoenset definition. As result it is impossible to have mixed
- deployment when one compute is configured with dpdk while other not.
- * it is impossible to override interface names/other information stored in
- <service>-bin configmap
- * It allows to schedule on both hosts and labels, which adds some
- uncertainty
-
-This implementation is intended to handle those limitations:
-
- * it allows to schedule only based on labels
- * it creates <service>-bin per daemonset override
- * it allows to override values when rendering daemonsets
-
- It picks data from the following structure:
-
- .Values:
- overrides:
- mychart_mydaemonset:
- labels:
- label::value:
- values:
- override_root_option: override_root_value
- conf:
- ovs_dpdk:
- enabled: true
- neutron:
- DEFAULT:
- foo: bar
-
-*/}}
-
-{{- define "helm-toolkit.utils.daemonset_overrides_root" }}
- {{- $daemonset := index . 0 }}
- {{- $daemonSetTemplateName := index . 1 }}
- {{ $serviceAccountName := index . 2 }}
- {{- $configmap_include := index . 3 }}
- {{- $configmap_name := index . 4 }}
- {{- $configbin_include := index . 5 }}
- {{- $configbin_name := index . 6 }}
- {{- $context := index . 7 }}
-
- {{- $_ := unset $context ".Files" }}
- {{- $daemonset_root_name := printf (print $context.Chart.Name "_" $daemonset) }}
- {{- $_ := set $context.Values "__daemonset_list" list }}
- {{- $_ := set $context.Values "__default" dict }}
-
- {{- $default_enabled := true }}
- {{- if hasKey $context.Values "overrides" }}
- {{- range $key, $val := $context.Values.overrides }}
-
- {{- if eq $key $daemonset_root_name }}
- {{- range $type, $type_data := . }}
- {{- if eq $type "overrides_default" }}
- {{- $default_enabled = $type_data }}
- {{- end }}
-
- {{- if eq $type "labels" }}
- {{- $_ := set $context.Values "__label_dict" . }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
- {{/* dictionary that will contain all info needed to generate this
- iteration of the daemonset. */}}
- {{- $_ := set $context.Values "__current_label" dict }}
-
- {{/* set daemonset name */}}
- {{- $_ := set $context.Values.__current_label "name" $label_name }}
-
- {{/* set daemonset metadata annotation */}}
- {{- $_ := set $context.Values.__current_label "daemonset_override" $lname }}
-
- {{/* apply overrides */}}
-
-
- {{- $override_root_copy := $ldata.values }}
- {{/* Deep copy to prevent https://storyboard.openstack.org/#!/story/2005936 */}}
- {{- $root_copy := omit ($context.Values | toYaml | fromYaml) "overrides" }}
- {{- $merged_dict := mergeOverwrite $root_copy $override_root_copy }}
-
- {{- $root_conf_copy2 := dict "values" $merged_dict }}
- {{- $context_values := omit (omit ($context.Values | toYaml | fromYaml) "values") "__daemonset_list" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2.values }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__current_label "nodeData" $root_conf_copy4 }}
-
-
- {{/* Schedule to the provided label value(s) */}}
- {{- $label_dict := dict "key" $label_name }}
- {{- $_ := set $label_dict "values" (list $label_value) }}
- {{- $_ := set $label_dict "operator" "In" }}
- {{- $list_aggregate := list $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
-
- {{/* Do not schedule to other specified labels, with higher
- precedence as the list position increases. Last defined label
- is highest priority. */}}
- {{- $other_labels := omit $context.Values.__label_dict $lname }}
- {{- range $lname2, $ldata2 := $other_labels }}
- {{ $label_name2 := (split "::" $lname2)._0 }}
- {{ $label_value2 := (split "::" $lname2)._1 }}
-
- {{- $label_dict := dict "key" $label_name2 }}
- {{- $_ := set $label_dict "values" (list $label_value2) }}
- {{- $_ := set $label_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__current_label.matchExpressions $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
- {{- end }}
-
- {{/* store completed daemonset entry/info into global list */}}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__current_label }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- $_ := unset $context.Values "__current_label" }}
-
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* scheduler exceptions for the default daemonset */}}
- {{- $_ := set $context.Values.__default "matchExpressions" list }}
-
- {{- range $type, $type_data := . }}
- {{/* Do not schedule to other specified labels */}}
- {{- if eq $type "labels" }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
-
- {{- $default_dict := dict "key" $label_name }}
- {{- $_ := set $default_dict "values" (list $label_value) }}
- {{- $_ := set $default_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__default.matchExpressions $default_dict }}
- {{- $_ := set $context.Values.__default "matchExpressions" $list_aggregate }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* generate the default daemonset */}}
-
- {{/* set name */}}
- {{- $_ := set $context.Values.__default "name" "default" }}
-
- {{/* no overrides apply, so copy as-is */}}
- {{- $root_conf_copy1 := omit $context.Values.conf "overrides" }}
- {{- $root_conf_copy2 := dict "conf" $root_conf_copy1 }}
- {{- $context_values := omit $context.Values "conf" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2 }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__default "nodeData" $root_conf_copy4 }}
-
- {{/* add to global list */}}
- {{- if $default_enabled }}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__default }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- end }}
-
- {{- range $current_dict := $context.Values.__daemonset_list }}
-
- {{- $context_novalues := omit $context "Values" }}
- {{- $merged_dict := mergeOverwrite $context_novalues $current_dict.nodeData }}
- {{- $_ := set $current_dict "nodeData" $merged_dict }}
- {{/* Deep copy original daemonset_yaml */}}
- {{- $daemonset_yaml := list $daemonset $configmap_name $serviceAccountName $merged_dict | include $daemonSetTemplateName | toString | fromYaml }}
- {{- $_ := set $context.Values "__daemonset_yaml" ($daemonset_yaml | toYaml | fromYaml) }}
-
- {{/* Use the following name format $daemonset_root_name + sha256summ($current_dict.matchExpressions)
- as labels might be too long and contain wrong characters like / */}}
- {{- $_ := set $current_dict "dns_1123_name" dict }}
- {{- $name_format := "" }}
- {{- if eq $current_dict.name "default" }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name "default") | replace "_" "-" }}
- {{- else }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name ($current_dict.matchExpressions | quote | sha256sum | trunc 16)) | replace "_" "-" }}
- {{- end }}
- {{- $_ := set $current_dict "dns_1123_name" $name_format }}
-
- {{/* set daemonset metadata name */}}
- {{- if not $context.Values.__daemonset_yaml.metadata }}{{- $_ := set $context.Values.__daemonset_yaml "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.metadata.name }}{{- $_ := set $context.Values.__daemonset_yaml.metadata "name" dict }}{{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata "name" $current_dict.dns_1123_name }}
-
- {{/* cross-reference configmap name to container volume definitions */}}
- {{- $_ := set $context.Values "__volume_list" list }}
- {{- range $current_volume := $context.Values.__daemonset_yaml.spec.template.spec.volumes }}
- {{- $_ := set $context.Values "__volume" $current_volume }}
- {{- if hasKey $context.Values.__volume "secret" }}
- {{- if eq $context.Values.__volume.secret.secretName $configmap_name }}
- {{- $_ := set $context.Values.__volume.secret "secretName" (printf "%s-etc" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- if hasKey $context.Values.__volume "configMap" }}
- {{- if eq $context.Values.__volume.configMap.name $configbin_name }}
- {{- $_ := set $context.Values.__volume.configMap "name" (printf "%s-bin" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- $updated_list := append $context.Values.__volume_list $context.Values.__volume }}
- {{- $_ := set $context.Values "__volume_list" $updated_list }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "volumes" $context.Values.__volume_list }}
-
-
- {{/* populate scheduling restrictions */}}
- {{- if hasKey $current_dict "matchExpressions" }}
- {{- $length := len $current_dict.matchExpressions }}
- {{- if gt $length 0 }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "affinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity "nodeAffinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity "requiredDuringSchedulingIgnoredDuringExecution" dict }}{{- end }}
-
- {{- $expressions_modified := list }}
- {{- if hasKey $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" }}
- {{- range $orig_expression := $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms }}
- {{- $match_expressions_modified := list }}
- {{- $match_expressions_modified = concat $match_expressions_modified $current_dict.matchExpressions }}
- {{- if hasKey $orig_expression "matchExpressions" }}
- {{- $match_expressions_modified = concat $match_expressions_modified $orig_expression.matchExpressions }}
- {{- $expressions_modified = append $expressions_modified (dict "matchExpressions" $match_expressions_modified) }}
- {{- end }}
- {{- end }}
- {{- else }}
- {{- $expressions_modified = (list (dict "matchExpressions" $current_dict.matchExpressions)) }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" $expressions_modified }}
- {{- end }}
- {{- end }}
-
- {{/* input value hash for current set of values overrides */}}
- {{- if not $context.Values.__daemonset_yaml.spec }}{{- $_ := set $context.Values.__daemonset_yaml "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template }}{{- $_ := set $context.Values.__daemonset_yaml.spec "template" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata.annotations }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata "annotations" dict }}{{- end }}
- {{- $cmap := list (printf "%s-etc" $current_dict.dns_1123_name) $current_dict.nodeData | include $configmap_include }}
- {{- $cmap_bin := list (printf "%s-bin" $current_dict.dns_1123_name) $current_dict.nodeData | include $configbin_include }}
- {{- $values_cmap_hash := $cmap | quote | sha256sum }}
- {{- $values_cmap_bin_hash := $cmap_bin | quote | sha256sum }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-etc-hash" $values_cmap_hash }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-bin-hash" $values_cmap_bin_hash }}
-
- {{/* Do not set override for default daemonset */}}
- {{- if $current_dict.daemonset_override }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata.annotations "daemonset_override" $current_dict.daemonset_override }}
- {{- end }}
-
-{{/* generate configmap */}}
----
-{{ $cmap }}
- {{/* generate <service>-bin yaml */}}
----
-{{ $cmap_bin }}
- {{/* generate daemonset yaml */}}
----
-{{ $context.Values.__daemonset_yaml | toYaml }}
- {{- end }}
-{{- end }}
diff --git a/charts/designate/requirements.lock b/charts/designate/requirements.lock
index b94dead..4f63a87 100644
--- a/charts/designate/requirements.lock
+++ b/charts/designate/requirements.lock
@@ -1,6 +1,6 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
-digest: sha256:760c5997580ac8d30a64dfe92d6a54052b783ddf90cacbc5a4c95c1330988742
+ version: 0.2.69
+digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef
generated: "0001-01-01T00:00:00Z"
diff --git a/charts/designate/requirements.yaml b/charts/designate/requirements.yaml
index 52e723e..b3d5dcf 100644
--- a/charts/designate/requirements.yaml
+++ b/charts/designate/requirements.yaml
@@ -1,4 +1,4 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
+ version: 0.2.69
diff --git a/charts/glance/charts/helm-toolkit/Chart.yaml b/charts/glance/charts/helm-toolkit/Chart.yaml
index 9d3aa1e..d4c0ea2 100644
--- a/charts/glance/charts/helm-toolkit/Chart.yaml
+++ b/charts/glance/charts/helm-toolkit/Chart.yaml
@@ -9,4 +9,4 @@
sources:
- https://opendev.org/openstack/openstack-helm-infra
- https://opendev.org/openstack/openstack-helm
-version: 0.2.78
+version: 0.2.69
diff --git a/charts/glance/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl b/charts/glance/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
index 728b994..6877b7b 100644
--- a/charts/glance/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
+++ b/charts/glance/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
@@ -14,8 +14,7 @@
{{/*
abstract: |
- Resolves 'hostname:port' for an endpoint, or several hostname:port pairs for statefulset e.g
- 'hostname1:port1,hostname2:port2,hostname3:port3',
+ Resolves 'hostname:port' for an endpoint
examples:
- values: |
endpoints:
@@ -47,23 +46,6 @@
{{ tuple "oslo_db" "internal" "mysql" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
return: |
127.0.0.1:3306
- - values: |
- endpoints:
- oslo_cache:
- hosts:
- default: memcached
- host_fqdn_override:
- default: null
- statefulset:
- name: openstack-memcached-memcached
- replicas: 3
- port:
- memcache:
- default: 11211
- usage: |
- {{ tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
- return: |
- openstack-memcached-memcached-0:11211,openstack-memcached-memcached-1:11211,openstack-memcached-memcached-2:11211
*/}}
{{- define "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" -}}
@@ -71,19 +53,7 @@
{{- $endpoint := index . 1 -}}
{{- $port := index . 2 -}}
{{- $context := index . 3 -}}
-{{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false -}}
-{{- $local := dict "endpointHosts" list -}}
-{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" -}}
-{{- if $ssMap -}}
-{{- $endpointHostPrefix := $ssMap.name -}}
-{{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
-{{- range $podInt := until ( atoi (print $ssMap.replicas ) ) -}}
-{{- $endpointHostname := printf "%s-%d.%s:%s" $endpointHostPrefix $podInt $endpointHostSuffix $endpointPort -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts $endpointHostname ) -}}
-{{- end -}}
-{{- else -}}
-{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts (printf "%s:%s" $endpointHostname $endpointPort) ) -}}
-{{- end -}}
-{{ include "helm-toolkit.utils.joinListWithComma" $local.endpointHosts }}
+{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
+{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
+{{- printf "%s:%s" $endpointHostname $endpointPort -}}
{{- end -}}
diff --git a/charts/glance/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl b/charts/glance/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
index 24eb569..b2ec648 100644
--- a/charts/glance/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
+++ b/charts/glance/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
@@ -40,9 +40,9 @@
{{- $context := index . 3 -}}
{{- $endpointMap := index $context.Values.endpoints ( $type | replace "-" "_" ) }}
{{- if kindIs "string" $endpointMap.path }}
-{{- printf "%s" $endpointMap.path | default "" -}}
+{{- printf "%s" $endpointMap.path | default "/" -}}
{{- else -}}
-{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "" }}
+{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "/" }}
{{- printf "%s" $endpointPath -}}
{{- end -}}
{{- end -}}
diff --git a/charts/glance/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl b/charts/glance/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
deleted file mode 100644
index 332ca99..0000000
--- a/charts/glance/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
+++ /dev/null
@@ -1,51 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Renders out the configmap <service>-oslo-policy.
-values: |
- conf:
- policy.d:
- file1:
- foo: bar
- file2:
- foo: baz
-usage: |
-{{- include "helm-toolkit.manifests.configmap_oslo_policy" (dict "envAll" $envAll "serviceName" "keystone") }}
-return: |
- ---
- apiVersion: v1
- kind: Secret
- metadata:
- name: keystone-oslo-policy
- data:
- file1: base64of(foo: bar)
- file2: base64of(foo: baz)
-*/}}
-{{- define "helm-toolkit.manifests.configmap_oslo_policy" -}}
-{{- $envAll := index . "envAll" -}}
-{{- $serviceName := index . "serviceName" -}}
----
-apiVersion: v1
-kind: Secret
-metadata:
- name: {{ $serviceName }}-oslo-policy
-type: Opaque
-data:
- {{- range $key, $value := index $envAll.Values.conf "policy.d" }}
- {{- if $value }}
- {{ $key }}: {{ toYaml $value | b64enc }}
- {{- else }}
- {{ $key }}: {{ "\n" | b64enc }}
- {{- end }}
- {{- end }}
-{{- end -}}
diff --git a/charts/glance/charts/helm-toolkit/templates/manifests/_ingress.tpl b/charts/glance/charts/helm-toolkit/templates/manifests/_ingress.tpl
index 792571c..cacb4b8 100644
--- a/charts/glance/charts/helm-toolkit/templates/manifests/_ingress.tpl
+++ b/charts/glance/charts/helm-toolkit/templates/manifests/_ingress.tpl
@@ -708,10 +708,6 @@
{{- range $v := without (index $endpointHost.tls "dnsNames" | default list) $hostNameFull }}
{{- $vHosts = append $vHosts $v }}
{{- end }}
-{{- if hasKey $envAll.Values.endpoints "alias_fqdn" }}
-{{- $alias_host := $envAll.Values.endpoints.alias_fqdn }}
-{{- $vHosts = append $vHosts $alias_host }}
-{{- end }}
{{- $secretName := index $envAll.Values.secrets "tls" ( $backendServiceType | replace "-" "_" ) $backendService $endpoint }}
{{- $_ := required "You need to specify a secret in your values for the endpoint" $secretName }}
tls:
diff --git a/charts/glance/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/glance/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
index c6a7521..1e28da9 100644
--- a/charts/glance/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
+++ b/charts/glance/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Drop')
@@ -126,7 +125,7 @@
# Delete DB
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP DATABASE IF EXISTS {0}".format(database)))
+ connection.execute("DROP DATABASE IF EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -139,7 +138,7 @@
# Delete DB User
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP USER IF EXISTS {0}".format(user)))
+ connection.execute("DROP USER IF EXISTS {0}".format(user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/glance/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/glance/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
index 1917f78..110cd98 100644
--- a/charts/glance/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
+++ b/charts/glance/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Init')
@@ -126,7 +125,7 @@
# Create DB
try:
with root_engine.connect() as connection:
- connection.execute(text("CREATE DATABASE IF NOT EXISTS {0}".format(database)))
+ connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -140,10 +139,10 @@
try:
with root_engine.connect() as connection:
connection.execute(
- text("CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
- user, password, mysql_x509)))
+ "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
+ user, password, mysql_x509))
connection.execute(
- text("GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)))
+ "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/glance/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl b/charts/glance/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
index e6e9c6e..3739f95 100644
--- a/charts/glance/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
+++ b/charts/glance/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
@@ -29,9 +29,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_ADMIN_PASSWORD=$(echo "${RABBITMQ_ADMIN_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User creadential
RABBITMQ_USERNAME=$(echo "${RABBITMQ_USER_CONNECTION}" | \
@@ -39,9 +37,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_PASSWORD=$(echo "${RABBITMQ_USER_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User vHost
RABBITMQ_VHOST=$(echo "${RABBITMQ_USER_CONNECTION}" | \
diff --git a/charts/glance/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl b/charts/glance/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
index 5c2dedb..48b53fa 100644
--- a/charts/glance/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
+++ b/charts/glance/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
@@ -40,9 +40,6 @@
release_group: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
application: {{ $application }}
component: {{ $component }}
-app.kubernetes.io/name: {{ $application }}
-app.kubernetes.io/component: {{ $component }}
-app.kubernetes.io/instance: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
{{- if ($envAll.Values.pod).labels }}
{{- if hasKey $envAll.Values.pod.labels $component }}
{{ index $envAll.Values.pod "labels" $component | toYaml }}
diff --git a/charts/glance/charts/helm-toolkit/templates/snippets/_service_params.tpl b/charts/glance/charts/helm-toolkit/templates/snippets/_service_params.tpl
deleted file mode 100644
index 6233a93..0000000
--- a/charts/glance/charts/helm-toolkit/templates/snippets/_service_params.tpl
+++ /dev/null
@@ -1,61 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Inserts kubernetes service parameters from values as is.
-values: |
- network:
- serviceExample:
- service:
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-usage: |
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: 'serviceExample'
- spec:
- ports:
- - name: s-example
- port: 1111
- {{ .Values.network.serviceExample | include "helm-toolkit.snippets.service_params" | indent 2 }}
-return: |
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-*/}}
-
-{{- define "helm-toolkit.snippets.service_params" }}
-{{- $serviceParams := dict }}
-{{- if hasKey . "service" }}
-{{- $serviceParams = .service }}
-{{- end }}
-{{- if hasKey . "node_port" }}
-{{- if hasKey .node_port "enabled" }}
-{{- if .node_port.enabled }}
-{{- $_ := set $serviceParams "type" "NodePort" }}
-{{- end }}
-{{- end }}
-{{- end }}
-{{- if hasKey . "external_policy_local" }}
-{{- if .external_policy_local }}
-{{- $_ := set $serviceParams "externalTrafficPolicy" "Local" }}
-{{- end }}
-{{- end }}
-{{- if $serviceParams }}
-{{- $serviceParams | toYaml }}
-{{- end }}
-{{- end }}
diff --git a/charts/glance/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl b/charts/glance/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
deleted file mode 100644
index bdb28c3..0000000
--- a/charts/glance/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
+++ /dev/null
@@ -1,279 +0,0 @@
-{{/*
-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.
-*/}}
-
-{{/*
-
-The helm-toolkit.utils.daemonset_overrides function have some limitations:
-
- * it allows to override only conf values specifid in configmap-etc
- * it doesn't allow to override values for daemonsets passed via env variables
- or via damoenset definition. As result it is impossible to have mixed
- deployment when one compute is configured with dpdk while other not.
- * it is impossible to override interface names/other information stored in
- <service>-bin configmap
- * It allows to schedule on both hosts and labels, which adds some
- uncertainty
-
-This implementation is intended to handle those limitations:
-
- * it allows to schedule only based on labels
- * it creates <service>-bin per daemonset override
- * it allows to override values when rendering daemonsets
-
- It picks data from the following structure:
-
- .Values:
- overrides:
- mychart_mydaemonset:
- labels:
- label::value:
- values:
- override_root_option: override_root_value
- conf:
- ovs_dpdk:
- enabled: true
- neutron:
- DEFAULT:
- foo: bar
-
-*/}}
-
-{{- define "helm-toolkit.utils.daemonset_overrides_root" }}
- {{- $daemonset := index . 0 }}
- {{- $daemonSetTemplateName := index . 1 }}
- {{ $serviceAccountName := index . 2 }}
- {{- $configmap_include := index . 3 }}
- {{- $configmap_name := index . 4 }}
- {{- $configbin_include := index . 5 }}
- {{- $configbin_name := index . 6 }}
- {{- $context := index . 7 }}
-
- {{- $_ := unset $context ".Files" }}
- {{- $daemonset_root_name := printf (print $context.Chart.Name "_" $daemonset) }}
- {{- $_ := set $context.Values "__daemonset_list" list }}
- {{- $_ := set $context.Values "__default" dict }}
-
- {{- $default_enabled := true }}
- {{- if hasKey $context.Values "overrides" }}
- {{- range $key, $val := $context.Values.overrides }}
-
- {{- if eq $key $daemonset_root_name }}
- {{- range $type, $type_data := . }}
- {{- if eq $type "overrides_default" }}
- {{- $default_enabled = $type_data }}
- {{- end }}
-
- {{- if eq $type "labels" }}
- {{- $_ := set $context.Values "__label_dict" . }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
- {{/* dictionary that will contain all info needed to generate this
- iteration of the daemonset. */}}
- {{- $_ := set $context.Values "__current_label" dict }}
-
- {{/* set daemonset name */}}
- {{- $_ := set $context.Values.__current_label "name" $label_name }}
-
- {{/* set daemonset metadata annotation */}}
- {{- $_ := set $context.Values.__current_label "daemonset_override" $lname }}
-
- {{/* apply overrides */}}
-
-
- {{- $override_root_copy := $ldata.values }}
- {{/* Deep copy to prevent https://storyboard.openstack.org/#!/story/2005936 */}}
- {{- $root_copy := omit ($context.Values | toYaml | fromYaml) "overrides" }}
- {{- $merged_dict := mergeOverwrite $root_copy $override_root_copy }}
-
- {{- $root_conf_copy2 := dict "values" $merged_dict }}
- {{- $context_values := omit (omit ($context.Values | toYaml | fromYaml) "values") "__daemonset_list" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2.values }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__current_label "nodeData" $root_conf_copy4 }}
-
-
- {{/* Schedule to the provided label value(s) */}}
- {{- $label_dict := dict "key" $label_name }}
- {{- $_ := set $label_dict "values" (list $label_value) }}
- {{- $_ := set $label_dict "operator" "In" }}
- {{- $list_aggregate := list $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
-
- {{/* Do not schedule to other specified labels, with higher
- precedence as the list position increases. Last defined label
- is highest priority. */}}
- {{- $other_labels := omit $context.Values.__label_dict $lname }}
- {{- range $lname2, $ldata2 := $other_labels }}
- {{ $label_name2 := (split "::" $lname2)._0 }}
- {{ $label_value2 := (split "::" $lname2)._1 }}
-
- {{- $label_dict := dict "key" $label_name2 }}
- {{- $_ := set $label_dict "values" (list $label_value2) }}
- {{- $_ := set $label_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__current_label.matchExpressions $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
- {{- end }}
-
- {{/* store completed daemonset entry/info into global list */}}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__current_label }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- $_ := unset $context.Values "__current_label" }}
-
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* scheduler exceptions for the default daemonset */}}
- {{- $_ := set $context.Values.__default "matchExpressions" list }}
-
- {{- range $type, $type_data := . }}
- {{/* Do not schedule to other specified labels */}}
- {{- if eq $type "labels" }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
-
- {{- $default_dict := dict "key" $label_name }}
- {{- $_ := set $default_dict "values" (list $label_value) }}
- {{- $_ := set $default_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__default.matchExpressions $default_dict }}
- {{- $_ := set $context.Values.__default "matchExpressions" $list_aggregate }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* generate the default daemonset */}}
-
- {{/* set name */}}
- {{- $_ := set $context.Values.__default "name" "default" }}
-
- {{/* no overrides apply, so copy as-is */}}
- {{- $root_conf_copy1 := omit $context.Values.conf "overrides" }}
- {{- $root_conf_copy2 := dict "conf" $root_conf_copy1 }}
- {{- $context_values := omit $context.Values "conf" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2 }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__default "nodeData" $root_conf_copy4 }}
-
- {{/* add to global list */}}
- {{- if $default_enabled }}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__default }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- end }}
-
- {{- range $current_dict := $context.Values.__daemonset_list }}
-
- {{- $context_novalues := omit $context "Values" }}
- {{- $merged_dict := mergeOverwrite $context_novalues $current_dict.nodeData }}
- {{- $_ := set $current_dict "nodeData" $merged_dict }}
- {{/* Deep copy original daemonset_yaml */}}
- {{- $daemonset_yaml := list $daemonset $configmap_name $serviceAccountName $merged_dict | include $daemonSetTemplateName | toString | fromYaml }}
- {{- $_ := set $context.Values "__daemonset_yaml" ($daemonset_yaml | toYaml | fromYaml) }}
-
- {{/* Use the following name format $daemonset_root_name + sha256summ($current_dict.matchExpressions)
- as labels might be too long and contain wrong characters like / */}}
- {{- $_ := set $current_dict "dns_1123_name" dict }}
- {{- $name_format := "" }}
- {{- if eq $current_dict.name "default" }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name "default") | replace "_" "-" }}
- {{- else }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name ($current_dict.matchExpressions | quote | sha256sum | trunc 16)) | replace "_" "-" }}
- {{- end }}
- {{- $_ := set $current_dict "dns_1123_name" $name_format }}
-
- {{/* set daemonset metadata name */}}
- {{- if not $context.Values.__daemonset_yaml.metadata }}{{- $_ := set $context.Values.__daemonset_yaml "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.metadata.name }}{{- $_ := set $context.Values.__daemonset_yaml.metadata "name" dict }}{{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata "name" $current_dict.dns_1123_name }}
-
- {{/* cross-reference configmap name to container volume definitions */}}
- {{- $_ := set $context.Values "__volume_list" list }}
- {{- range $current_volume := $context.Values.__daemonset_yaml.spec.template.spec.volumes }}
- {{- $_ := set $context.Values "__volume" $current_volume }}
- {{- if hasKey $context.Values.__volume "secret" }}
- {{- if eq $context.Values.__volume.secret.secretName $configmap_name }}
- {{- $_ := set $context.Values.__volume.secret "secretName" (printf "%s-etc" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- if hasKey $context.Values.__volume "configMap" }}
- {{- if eq $context.Values.__volume.configMap.name $configbin_name }}
- {{- $_ := set $context.Values.__volume.configMap "name" (printf "%s-bin" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- $updated_list := append $context.Values.__volume_list $context.Values.__volume }}
- {{- $_ := set $context.Values "__volume_list" $updated_list }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "volumes" $context.Values.__volume_list }}
-
-
- {{/* populate scheduling restrictions */}}
- {{- if hasKey $current_dict "matchExpressions" }}
- {{- $length := len $current_dict.matchExpressions }}
- {{- if gt $length 0 }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "affinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity "nodeAffinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity "requiredDuringSchedulingIgnoredDuringExecution" dict }}{{- end }}
-
- {{- $expressions_modified := list }}
- {{- if hasKey $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" }}
- {{- range $orig_expression := $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms }}
- {{- $match_expressions_modified := list }}
- {{- $match_expressions_modified = concat $match_expressions_modified $current_dict.matchExpressions }}
- {{- if hasKey $orig_expression "matchExpressions" }}
- {{- $match_expressions_modified = concat $match_expressions_modified $orig_expression.matchExpressions }}
- {{- $expressions_modified = append $expressions_modified (dict "matchExpressions" $match_expressions_modified) }}
- {{- end }}
- {{- end }}
- {{- else }}
- {{- $expressions_modified = (list (dict "matchExpressions" $current_dict.matchExpressions)) }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" $expressions_modified }}
- {{- end }}
- {{- end }}
-
- {{/* input value hash for current set of values overrides */}}
- {{- if not $context.Values.__daemonset_yaml.spec }}{{- $_ := set $context.Values.__daemonset_yaml "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template }}{{- $_ := set $context.Values.__daemonset_yaml.spec "template" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata.annotations }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata "annotations" dict }}{{- end }}
- {{- $cmap := list (printf "%s-etc" $current_dict.dns_1123_name) $current_dict.nodeData | include $configmap_include }}
- {{- $cmap_bin := list (printf "%s-bin" $current_dict.dns_1123_name) $current_dict.nodeData | include $configbin_include }}
- {{- $values_cmap_hash := $cmap | quote | sha256sum }}
- {{- $values_cmap_bin_hash := $cmap_bin | quote | sha256sum }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-etc-hash" $values_cmap_hash }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-bin-hash" $values_cmap_bin_hash }}
-
- {{/* Do not set override for default daemonset */}}
- {{- if $current_dict.daemonset_override }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata.annotations "daemonset_override" $current_dict.daemonset_override }}
- {{- end }}
-
-{{/* generate configmap */}}
----
-{{ $cmap }}
- {{/* generate <service>-bin yaml */}}
----
-{{ $cmap_bin }}
- {{/* generate daemonset yaml */}}
----
-{{ $context.Values.__daemonset_yaml | toYaml }}
- {{- end }}
-{{- end }}
diff --git a/charts/glance/requirements.lock b/charts/glance/requirements.lock
index b94dead..4f63a87 100644
--- a/charts/glance/requirements.lock
+++ b/charts/glance/requirements.lock
@@ -1,6 +1,6 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
-digest: sha256:760c5997580ac8d30a64dfe92d6a54052b783ddf90cacbc5a4c95c1330988742
+ version: 0.2.69
+digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef
generated: "0001-01-01T00:00:00Z"
diff --git a/charts/glance/requirements.yaml b/charts/glance/requirements.yaml
index 52e723e..b3d5dcf 100644
--- a/charts/glance/requirements.yaml
+++ b/charts/glance/requirements.yaml
@@ -1,4 +1,4 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
+ version: 0.2.69
diff --git a/charts/heat/charts/helm-toolkit/Chart.yaml b/charts/heat/charts/helm-toolkit/Chart.yaml
index 9d3aa1e..d4c0ea2 100644
--- a/charts/heat/charts/helm-toolkit/Chart.yaml
+++ b/charts/heat/charts/helm-toolkit/Chart.yaml
@@ -9,4 +9,4 @@
sources:
- https://opendev.org/openstack/openstack-helm-infra
- https://opendev.org/openstack/openstack-helm
-version: 0.2.78
+version: 0.2.69
diff --git a/charts/heat/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl b/charts/heat/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
index 728b994..6877b7b 100644
--- a/charts/heat/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
+++ b/charts/heat/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
@@ -14,8 +14,7 @@
{{/*
abstract: |
- Resolves 'hostname:port' for an endpoint, or several hostname:port pairs for statefulset e.g
- 'hostname1:port1,hostname2:port2,hostname3:port3',
+ Resolves 'hostname:port' for an endpoint
examples:
- values: |
endpoints:
@@ -47,23 +46,6 @@
{{ tuple "oslo_db" "internal" "mysql" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
return: |
127.0.0.1:3306
- - values: |
- endpoints:
- oslo_cache:
- hosts:
- default: memcached
- host_fqdn_override:
- default: null
- statefulset:
- name: openstack-memcached-memcached
- replicas: 3
- port:
- memcache:
- default: 11211
- usage: |
- {{ tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
- return: |
- openstack-memcached-memcached-0:11211,openstack-memcached-memcached-1:11211,openstack-memcached-memcached-2:11211
*/}}
{{- define "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" -}}
@@ -71,19 +53,7 @@
{{- $endpoint := index . 1 -}}
{{- $port := index . 2 -}}
{{- $context := index . 3 -}}
-{{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false -}}
-{{- $local := dict "endpointHosts" list -}}
-{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" -}}
-{{- if $ssMap -}}
-{{- $endpointHostPrefix := $ssMap.name -}}
-{{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
-{{- range $podInt := until ( atoi (print $ssMap.replicas ) ) -}}
-{{- $endpointHostname := printf "%s-%d.%s:%s" $endpointHostPrefix $podInt $endpointHostSuffix $endpointPort -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts $endpointHostname ) -}}
-{{- end -}}
-{{- else -}}
-{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts (printf "%s:%s" $endpointHostname $endpointPort) ) -}}
-{{- end -}}
-{{ include "helm-toolkit.utils.joinListWithComma" $local.endpointHosts }}
+{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
+{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
+{{- printf "%s:%s" $endpointHostname $endpointPort -}}
{{- end -}}
diff --git a/charts/heat/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl b/charts/heat/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
index 24eb569..b2ec648 100644
--- a/charts/heat/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
+++ b/charts/heat/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
@@ -40,9 +40,9 @@
{{- $context := index . 3 -}}
{{- $endpointMap := index $context.Values.endpoints ( $type | replace "-" "_" ) }}
{{- if kindIs "string" $endpointMap.path }}
-{{- printf "%s" $endpointMap.path | default "" -}}
+{{- printf "%s" $endpointMap.path | default "/" -}}
{{- else -}}
-{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "" }}
+{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "/" }}
{{- printf "%s" $endpointPath -}}
{{- end -}}
{{- end -}}
diff --git a/charts/heat/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl b/charts/heat/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
deleted file mode 100644
index 332ca99..0000000
--- a/charts/heat/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
+++ /dev/null
@@ -1,51 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Renders out the configmap <service>-oslo-policy.
-values: |
- conf:
- policy.d:
- file1:
- foo: bar
- file2:
- foo: baz
-usage: |
-{{- include "helm-toolkit.manifests.configmap_oslo_policy" (dict "envAll" $envAll "serviceName" "keystone") }}
-return: |
- ---
- apiVersion: v1
- kind: Secret
- metadata:
- name: keystone-oslo-policy
- data:
- file1: base64of(foo: bar)
- file2: base64of(foo: baz)
-*/}}
-{{- define "helm-toolkit.manifests.configmap_oslo_policy" -}}
-{{- $envAll := index . "envAll" -}}
-{{- $serviceName := index . "serviceName" -}}
----
-apiVersion: v1
-kind: Secret
-metadata:
- name: {{ $serviceName }}-oslo-policy
-type: Opaque
-data:
- {{- range $key, $value := index $envAll.Values.conf "policy.d" }}
- {{- if $value }}
- {{ $key }}: {{ toYaml $value | b64enc }}
- {{- else }}
- {{ $key }}: {{ "\n" | b64enc }}
- {{- end }}
- {{- end }}
-{{- end -}}
diff --git a/charts/heat/charts/helm-toolkit/templates/manifests/_ingress.tpl b/charts/heat/charts/helm-toolkit/templates/manifests/_ingress.tpl
index 792571c..cacb4b8 100644
--- a/charts/heat/charts/helm-toolkit/templates/manifests/_ingress.tpl
+++ b/charts/heat/charts/helm-toolkit/templates/manifests/_ingress.tpl
@@ -708,10 +708,6 @@
{{- range $v := without (index $endpointHost.tls "dnsNames" | default list) $hostNameFull }}
{{- $vHosts = append $vHosts $v }}
{{- end }}
-{{- if hasKey $envAll.Values.endpoints "alias_fqdn" }}
-{{- $alias_host := $envAll.Values.endpoints.alias_fqdn }}
-{{- $vHosts = append $vHosts $alias_host }}
-{{- end }}
{{- $secretName := index $envAll.Values.secrets "tls" ( $backendServiceType | replace "-" "_" ) $backendService $endpoint }}
{{- $_ := required "You need to specify a secret in your values for the endpoint" $secretName }}
tls:
diff --git a/charts/heat/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/heat/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
index c6a7521..1e28da9 100644
--- a/charts/heat/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
+++ b/charts/heat/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Drop')
@@ -126,7 +125,7 @@
# Delete DB
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP DATABASE IF EXISTS {0}".format(database)))
+ connection.execute("DROP DATABASE IF EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -139,7 +138,7 @@
# Delete DB User
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP USER IF EXISTS {0}".format(user)))
+ connection.execute("DROP USER IF EXISTS {0}".format(user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/heat/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/heat/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
index 1917f78..110cd98 100644
--- a/charts/heat/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
+++ b/charts/heat/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Init')
@@ -126,7 +125,7 @@
# Create DB
try:
with root_engine.connect() as connection:
- connection.execute(text("CREATE DATABASE IF NOT EXISTS {0}".format(database)))
+ connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -140,10 +139,10 @@
try:
with root_engine.connect() as connection:
connection.execute(
- text("CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
- user, password, mysql_x509)))
+ "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
+ user, password, mysql_x509))
connection.execute(
- text("GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)))
+ "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/heat/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl b/charts/heat/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
index e6e9c6e..3739f95 100644
--- a/charts/heat/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
+++ b/charts/heat/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
@@ -29,9 +29,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_ADMIN_PASSWORD=$(echo "${RABBITMQ_ADMIN_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User creadential
RABBITMQ_USERNAME=$(echo "${RABBITMQ_USER_CONNECTION}" | \
@@ -39,9 +37,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_PASSWORD=$(echo "${RABBITMQ_USER_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User vHost
RABBITMQ_VHOST=$(echo "${RABBITMQ_USER_CONNECTION}" | \
diff --git a/charts/heat/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl b/charts/heat/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
index 5c2dedb..48b53fa 100644
--- a/charts/heat/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
+++ b/charts/heat/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
@@ -40,9 +40,6 @@
release_group: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
application: {{ $application }}
component: {{ $component }}
-app.kubernetes.io/name: {{ $application }}
-app.kubernetes.io/component: {{ $component }}
-app.kubernetes.io/instance: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
{{- if ($envAll.Values.pod).labels }}
{{- if hasKey $envAll.Values.pod.labels $component }}
{{ index $envAll.Values.pod "labels" $component | toYaml }}
diff --git a/charts/heat/charts/helm-toolkit/templates/snippets/_service_params.tpl b/charts/heat/charts/helm-toolkit/templates/snippets/_service_params.tpl
deleted file mode 100644
index 6233a93..0000000
--- a/charts/heat/charts/helm-toolkit/templates/snippets/_service_params.tpl
+++ /dev/null
@@ -1,61 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Inserts kubernetes service parameters from values as is.
-values: |
- network:
- serviceExample:
- service:
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-usage: |
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: 'serviceExample'
- spec:
- ports:
- - name: s-example
- port: 1111
- {{ .Values.network.serviceExample | include "helm-toolkit.snippets.service_params" | indent 2 }}
-return: |
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-*/}}
-
-{{- define "helm-toolkit.snippets.service_params" }}
-{{- $serviceParams := dict }}
-{{- if hasKey . "service" }}
-{{- $serviceParams = .service }}
-{{- end }}
-{{- if hasKey . "node_port" }}
-{{- if hasKey .node_port "enabled" }}
-{{- if .node_port.enabled }}
-{{- $_ := set $serviceParams "type" "NodePort" }}
-{{- end }}
-{{- end }}
-{{- end }}
-{{- if hasKey . "external_policy_local" }}
-{{- if .external_policy_local }}
-{{- $_ := set $serviceParams "externalTrafficPolicy" "Local" }}
-{{- end }}
-{{- end }}
-{{- if $serviceParams }}
-{{- $serviceParams | toYaml }}
-{{- end }}
-{{- end }}
diff --git a/charts/heat/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl b/charts/heat/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
deleted file mode 100644
index bdb28c3..0000000
--- a/charts/heat/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
+++ /dev/null
@@ -1,279 +0,0 @@
-{{/*
-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.
-*/}}
-
-{{/*
-
-The helm-toolkit.utils.daemonset_overrides function have some limitations:
-
- * it allows to override only conf values specifid in configmap-etc
- * it doesn't allow to override values for daemonsets passed via env variables
- or via damoenset definition. As result it is impossible to have mixed
- deployment when one compute is configured with dpdk while other not.
- * it is impossible to override interface names/other information stored in
- <service>-bin configmap
- * It allows to schedule on both hosts and labels, which adds some
- uncertainty
-
-This implementation is intended to handle those limitations:
-
- * it allows to schedule only based on labels
- * it creates <service>-bin per daemonset override
- * it allows to override values when rendering daemonsets
-
- It picks data from the following structure:
-
- .Values:
- overrides:
- mychart_mydaemonset:
- labels:
- label::value:
- values:
- override_root_option: override_root_value
- conf:
- ovs_dpdk:
- enabled: true
- neutron:
- DEFAULT:
- foo: bar
-
-*/}}
-
-{{- define "helm-toolkit.utils.daemonset_overrides_root" }}
- {{- $daemonset := index . 0 }}
- {{- $daemonSetTemplateName := index . 1 }}
- {{ $serviceAccountName := index . 2 }}
- {{- $configmap_include := index . 3 }}
- {{- $configmap_name := index . 4 }}
- {{- $configbin_include := index . 5 }}
- {{- $configbin_name := index . 6 }}
- {{- $context := index . 7 }}
-
- {{- $_ := unset $context ".Files" }}
- {{- $daemonset_root_name := printf (print $context.Chart.Name "_" $daemonset) }}
- {{- $_ := set $context.Values "__daemonset_list" list }}
- {{- $_ := set $context.Values "__default" dict }}
-
- {{- $default_enabled := true }}
- {{- if hasKey $context.Values "overrides" }}
- {{- range $key, $val := $context.Values.overrides }}
-
- {{- if eq $key $daemonset_root_name }}
- {{- range $type, $type_data := . }}
- {{- if eq $type "overrides_default" }}
- {{- $default_enabled = $type_data }}
- {{- end }}
-
- {{- if eq $type "labels" }}
- {{- $_ := set $context.Values "__label_dict" . }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
- {{/* dictionary that will contain all info needed to generate this
- iteration of the daemonset. */}}
- {{- $_ := set $context.Values "__current_label" dict }}
-
- {{/* set daemonset name */}}
- {{- $_ := set $context.Values.__current_label "name" $label_name }}
-
- {{/* set daemonset metadata annotation */}}
- {{- $_ := set $context.Values.__current_label "daemonset_override" $lname }}
-
- {{/* apply overrides */}}
-
-
- {{- $override_root_copy := $ldata.values }}
- {{/* Deep copy to prevent https://storyboard.openstack.org/#!/story/2005936 */}}
- {{- $root_copy := omit ($context.Values | toYaml | fromYaml) "overrides" }}
- {{- $merged_dict := mergeOverwrite $root_copy $override_root_copy }}
-
- {{- $root_conf_copy2 := dict "values" $merged_dict }}
- {{- $context_values := omit (omit ($context.Values | toYaml | fromYaml) "values") "__daemonset_list" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2.values }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__current_label "nodeData" $root_conf_copy4 }}
-
-
- {{/* Schedule to the provided label value(s) */}}
- {{- $label_dict := dict "key" $label_name }}
- {{- $_ := set $label_dict "values" (list $label_value) }}
- {{- $_ := set $label_dict "operator" "In" }}
- {{- $list_aggregate := list $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
-
- {{/* Do not schedule to other specified labels, with higher
- precedence as the list position increases. Last defined label
- is highest priority. */}}
- {{- $other_labels := omit $context.Values.__label_dict $lname }}
- {{- range $lname2, $ldata2 := $other_labels }}
- {{ $label_name2 := (split "::" $lname2)._0 }}
- {{ $label_value2 := (split "::" $lname2)._1 }}
-
- {{- $label_dict := dict "key" $label_name2 }}
- {{- $_ := set $label_dict "values" (list $label_value2) }}
- {{- $_ := set $label_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__current_label.matchExpressions $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
- {{- end }}
-
- {{/* store completed daemonset entry/info into global list */}}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__current_label }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- $_ := unset $context.Values "__current_label" }}
-
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* scheduler exceptions for the default daemonset */}}
- {{- $_ := set $context.Values.__default "matchExpressions" list }}
-
- {{- range $type, $type_data := . }}
- {{/* Do not schedule to other specified labels */}}
- {{- if eq $type "labels" }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
-
- {{- $default_dict := dict "key" $label_name }}
- {{- $_ := set $default_dict "values" (list $label_value) }}
- {{- $_ := set $default_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__default.matchExpressions $default_dict }}
- {{- $_ := set $context.Values.__default "matchExpressions" $list_aggregate }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* generate the default daemonset */}}
-
- {{/* set name */}}
- {{- $_ := set $context.Values.__default "name" "default" }}
-
- {{/* no overrides apply, so copy as-is */}}
- {{- $root_conf_copy1 := omit $context.Values.conf "overrides" }}
- {{- $root_conf_copy2 := dict "conf" $root_conf_copy1 }}
- {{- $context_values := omit $context.Values "conf" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2 }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__default "nodeData" $root_conf_copy4 }}
-
- {{/* add to global list */}}
- {{- if $default_enabled }}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__default }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- end }}
-
- {{- range $current_dict := $context.Values.__daemonset_list }}
-
- {{- $context_novalues := omit $context "Values" }}
- {{- $merged_dict := mergeOverwrite $context_novalues $current_dict.nodeData }}
- {{- $_ := set $current_dict "nodeData" $merged_dict }}
- {{/* Deep copy original daemonset_yaml */}}
- {{- $daemonset_yaml := list $daemonset $configmap_name $serviceAccountName $merged_dict | include $daemonSetTemplateName | toString | fromYaml }}
- {{- $_ := set $context.Values "__daemonset_yaml" ($daemonset_yaml | toYaml | fromYaml) }}
-
- {{/* Use the following name format $daemonset_root_name + sha256summ($current_dict.matchExpressions)
- as labels might be too long and contain wrong characters like / */}}
- {{- $_ := set $current_dict "dns_1123_name" dict }}
- {{- $name_format := "" }}
- {{- if eq $current_dict.name "default" }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name "default") | replace "_" "-" }}
- {{- else }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name ($current_dict.matchExpressions | quote | sha256sum | trunc 16)) | replace "_" "-" }}
- {{- end }}
- {{- $_ := set $current_dict "dns_1123_name" $name_format }}
-
- {{/* set daemonset metadata name */}}
- {{- if not $context.Values.__daemonset_yaml.metadata }}{{- $_ := set $context.Values.__daemonset_yaml "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.metadata.name }}{{- $_ := set $context.Values.__daemonset_yaml.metadata "name" dict }}{{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata "name" $current_dict.dns_1123_name }}
-
- {{/* cross-reference configmap name to container volume definitions */}}
- {{- $_ := set $context.Values "__volume_list" list }}
- {{- range $current_volume := $context.Values.__daemonset_yaml.spec.template.spec.volumes }}
- {{- $_ := set $context.Values "__volume" $current_volume }}
- {{- if hasKey $context.Values.__volume "secret" }}
- {{- if eq $context.Values.__volume.secret.secretName $configmap_name }}
- {{- $_ := set $context.Values.__volume.secret "secretName" (printf "%s-etc" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- if hasKey $context.Values.__volume "configMap" }}
- {{- if eq $context.Values.__volume.configMap.name $configbin_name }}
- {{- $_ := set $context.Values.__volume.configMap "name" (printf "%s-bin" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- $updated_list := append $context.Values.__volume_list $context.Values.__volume }}
- {{- $_ := set $context.Values "__volume_list" $updated_list }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "volumes" $context.Values.__volume_list }}
-
-
- {{/* populate scheduling restrictions */}}
- {{- if hasKey $current_dict "matchExpressions" }}
- {{- $length := len $current_dict.matchExpressions }}
- {{- if gt $length 0 }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "affinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity "nodeAffinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity "requiredDuringSchedulingIgnoredDuringExecution" dict }}{{- end }}
-
- {{- $expressions_modified := list }}
- {{- if hasKey $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" }}
- {{- range $orig_expression := $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms }}
- {{- $match_expressions_modified := list }}
- {{- $match_expressions_modified = concat $match_expressions_modified $current_dict.matchExpressions }}
- {{- if hasKey $orig_expression "matchExpressions" }}
- {{- $match_expressions_modified = concat $match_expressions_modified $orig_expression.matchExpressions }}
- {{- $expressions_modified = append $expressions_modified (dict "matchExpressions" $match_expressions_modified) }}
- {{- end }}
- {{- end }}
- {{- else }}
- {{- $expressions_modified = (list (dict "matchExpressions" $current_dict.matchExpressions)) }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" $expressions_modified }}
- {{- end }}
- {{- end }}
-
- {{/* input value hash for current set of values overrides */}}
- {{- if not $context.Values.__daemonset_yaml.spec }}{{- $_ := set $context.Values.__daemonset_yaml "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template }}{{- $_ := set $context.Values.__daemonset_yaml.spec "template" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata.annotations }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata "annotations" dict }}{{- end }}
- {{- $cmap := list (printf "%s-etc" $current_dict.dns_1123_name) $current_dict.nodeData | include $configmap_include }}
- {{- $cmap_bin := list (printf "%s-bin" $current_dict.dns_1123_name) $current_dict.nodeData | include $configbin_include }}
- {{- $values_cmap_hash := $cmap | quote | sha256sum }}
- {{- $values_cmap_bin_hash := $cmap_bin | quote | sha256sum }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-etc-hash" $values_cmap_hash }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-bin-hash" $values_cmap_bin_hash }}
-
- {{/* Do not set override for default daemonset */}}
- {{- if $current_dict.daemonset_override }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata.annotations "daemonset_override" $current_dict.daemonset_override }}
- {{- end }}
-
-{{/* generate configmap */}}
----
-{{ $cmap }}
- {{/* generate <service>-bin yaml */}}
----
-{{ $cmap_bin }}
- {{/* generate daemonset yaml */}}
----
-{{ $context.Values.__daemonset_yaml | toYaml }}
- {{- end }}
-{{- end }}
diff --git a/charts/heat/requirements.lock b/charts/heat/requirements.lock
index b94dead..4f63a87 100644
--- a/charts/heat/requirements.lock
+++ b/charts/heat/requirements.lock
@@ -1,6 +1,6 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
-digest: sha256:760c5997580ac8d30a64dfe92d6a54052b783ddf90cacbc5a4c95c1330988742
+ version: 0.2.69
+digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef
generated: "0001-01-01T00:00:00Z"
diff --git a/charts/heat/requirements.yaml b/charts/heat/requirements.yaml
index 52e723e..b3d5dcf 100644
--- a/charts/heat/requirements.yaml
+++ b/charts/heat/requirements.yaml
@@ -1,4 +1,4 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
+ version: 0.2.69
diff --git a/charts/horizon/charts/helm-toolkit/Chart.yaml b/charts/horizon/charts/helm-toolkit/Chart.yaml
index 9d3aa1e..d4c0ea2 100644
--- a/charts/horizon/charts/helm-toolkit/Chart.yaml
+++ b/charts/horizon/charts/helm-toolkit/Chart.yaml
@@ -9,4 +9,4 @@
sources:
- https://opendev.org/openstack/openstack-helm-infra
- https://opendev.org/openstack/openstack-helm
-version: 0.2.78
+version: 0.2.69
diff --git a/charts/horizon/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl b/charts/horizon/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
index 728b994..6877b7b 100644
--- a/charts/horizon/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
+++ b/charts/horizon/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
@@ -14,8 +14,7 @@
{{/*
abstract: |
- Resolves 'hostname:port' for an endpoint, or several hostname:port pairs for statefulset e.g
- 'hostname1:port1,hostname2:port2,hostname3:port3',
+ Resolves 'hostname:port' for an endpoint
examples:
- values: |
endpoints:
@@ -47,23 +46,6 @@
{{ tuple "oslo_db" "internal" "mysql" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
return: |
127.0.0.1:3306
- - values: |
- endpoints:
- oslo_cache:
- hosts:
- default: memcached
- host_fqdn_override:
- default: null
- statefulset:
- name: openstack-memcached-memcached
- replicas: 3
- port:
- memcache:
- default: 11211
- usage: |
- {{ tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
- return: |
- openstack-memcached-memcached-0:11211,openstack-memcached-memcached-1:11211,openstack-memcached-memcached-2:11211
*/}}
{{- define "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" -}}
@@ -71,19 +53,7 @@
{{- $endpoint := index . 1 -}}
{{- $port := index . 2 -}}
{{- $context := index . 3 -}}
-{{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false -}}
-{{- $local := dict "endpointHosts" list -}}
-{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" -}}
-{{- if $ssMap -}}
-{{- $endpointHostPrefix := $ssMap.name -}}
-{{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
-{{- range $podInt := until ( atoi (print $ssMap.replicas ) ) -}}
-{{- $endpointHostname := printf "%s-%d.%s:%s" $endpointHostPrefix $podInt $endpointHostSuffix $endpointPort -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts $endpointHostname ) -}}
-{{- end -}}
-{{- else -}}
-{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts (printf "%s:%s" $endpointHostname $endpointPort) ) -}}
-{{- end -}}
-{{ include "helm-toolkit.utils.joinListWithComma" $local.endpointHosts }}
+{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
+{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
+{{- printf "%s:%s" $endpointHostname $endpointPort -}}
{{- end -}}
diff --git a/charts/horizon/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl b/charts/horizon/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
index 24eb569..b2ec648 100644
--- a/charts/horizon/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
+++ b/charts/horizon/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
@@ -40,9 +40,9 @@
{{- $context := index . 3 -}}
{{- $endpointMap := index $context.Values.endpoints ( $type | replace "-" "_" ) }}
{{- if kindIs "string" $endpointMap.path }}
-{{- printf "%s" $endpointMap.path | default "" -}}
+{{- printf "%s" $endpointMap.path | default "/" -}}
{{- else -}}
-{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "" }}
+{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "/" }}
{{- printf "%s" $endpointPath -}}
{{- end -}}
{{- end -}}
diff --git a/charts/horizon/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl b/charts/horizon/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
deleted file mode 100644
index 332ca99..0000000
--- a/charts/horizon/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
+++ /dev/null
@@ -1,51 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Renders out the configmap <service>-oslo-policy.
-values: |
- conf:
- policy.d:
- file1:
- foo: bar
- file2:
- foo: baz
-usage: |
-{{- include "helm-toolkit.manifests.configmap_oslo_policy" (dict "envAll" $envAll "serviceName" "keystone") }}
-return: |
- ---
- apiVersion: v1
- kind: Secret
- metadata:
- name: keystone-oslo-policy
- data:
- file1: base64of(foo: bar)
- file2: base64of(foo: baz)
-*/}}
-{{- define "helm-toolkit.manifests.configmap_oslo_policy" -}}
-{{- $envAll := index . "envAll" -}}
-{{- $serviceName := index . "serviceName" -}}
----
-apiVersion: v1
-kind: Secret
-metadata:
- name: {{ $serviceName }}-oslo-policy
-type: Opaque
-data:
- {{- range $key, $value := index $envAll.Values.conf "policy.d" }}
- {{- if $value }}
- {{ $key }}: {{ toYaml $value | b64enc }}
- {{- else }}
- {{ $key }}: {{ "\n" | b64enc }}
- {{- end }}
- {{- end }}
-{{- end -}}
diff --git a/charts/horizon/charts/helm-toolkit/templates/manifests/_ingress.tpl b/charts/horizon/charts/helm-toolkit/templates/manifests/_ingress.tpl
index 792571c..cacb4b8 100644
--- a/charts/horizon/charts/helm-toolkit/templates/manifests/_ingress.tpl
+++ b/charts/horizon/charts/helm-toolkit/templates/manifests/_ingress.tpl
@@ -708,10 +708,6 @@
{{- range $v := without (index $endpointHost.tls "dnsNames" | default list) $hostNameFull }}
{{- $vHosts = append $vHosts $v }}
{{- end }}
-{{- if hasKey $envAll.Values.endpoints "alias_fqdn" }}
-{{- $alias_host := $envAll.Values.endpoints.alias_fqdn }}
-{{- $vHosts = append $vHosts $alias_host }}
-{{- end }}
{{- $secretName := index $envAll.Values.secrets "tls" ( $backendServiceType | replace "-" "_" ) $backendService $endpoint }}
{{- $_ := required "You need to specify a secret in your values for the endpoint" $secretName }}
tls:
diff --git a/charts/horizon/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/horizon/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
index c6a7521..1e28da9 100644
--- a/charts/horizon/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
+++ b/charts/horizon/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Drop')
@@ -126,7 +125,7 @@
# Delete DB
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP DATABASE IF EXISTS {0}".format(database)))
+ connection.execute("DROP DATABASE IF EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -139,7 +138,7 @@
# Delete DB User
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP USER IF EXISTS {0}".format(user)))
+ connection.execute("DROP USER IF EXISTS {0}".format(user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/horizon/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/horizon/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
index 1917f78..110cd98 100644
--- a/charts/horizon/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
+++ b/charts/horizon/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Init')
@@ -126,7 +125,7 @@
# Create DB
try:
with root_engine.connect() as connection:
- connection.execute(text("CREATE DATABASE IF NOT EXISTS {0}".format(database)))
+ connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -140,10 +139,10 @@
try:
with root_engine.connect() as connection:
connection.execute(
- text("CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
- user, password, mysql_x509)))
+ "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
+ user, password, mysql_x509))
connection.execute(
- text("GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)))
+ "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/horizon/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl b/charts/horizon/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
index e6e9c6e..3739f95 100644
--- a/charts/horizon/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
+++ b/charts/horizon/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
@@ -29,9 +29,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_ADMIN_PASSWORD=$(echo "${RABBITMQ_ADMIN_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User creadential
RABBITMQ_USERNAME=$(echo "${RABBITMQ_USER_CONNECTION}" | \
@@ -39,9 +37,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_PASSWORD=$(echo "${RABBITMQ_USER_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User vHost
RABBITMQ_VHOST=$(echo "${RABBITMQ_USER_CONNECTION}" | \
diff --git a/charts/horizon/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl b/charts/horizon/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
index 5c2dedb..48b53fa 100644
--- a/charts/horizon/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
+++ b/charts/horizon/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
@@ -40,9 +40,6 @@
release_group: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
application: {{ $application }}
component: {{ $component }}
-app.kubernetes.io/name: {{ $application }}
-app.kubernetes.io/component: {{ $component }}
-app.kubernetes.io/instance: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
{{- if ($envAll.Values.pod).labels }}
{{- if hasKey $envAll.Values.pod.labels $component }}
{{ index $envAll.Values.pod "labels" $component | toYaml }}
diff --git a/charts/horizon/charts/helm-toolkit/templates/snippets/_service_params.tpl b/charts/horizon/charts/helm-toolkit/templates/snippets/_service_params.tpl
deleted file mode 100644
index 6233a93..0000000
--- a/charts/horizon/charts/helm-toolkit/templates/snippets/_service_params.tpl
+++ /dev/null
@@ -1,61 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Inserts kubernetes service parameters from values as is.
-values: |
- network:
- serviceExample:
- service:
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-usage: |
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: 'serviceExample'
- spec:
- ports:
- - name: s-example
- port: 1111
- {{ .Values.network.serviceExample | include "helm-toolkit.snippets.service_params" | indent 2 }}
-return: |
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-*/}}
-
-{{- define "helm-toolkit.snippets.service_params" }}
-{{- $serviceParams := dict }}
-{{- if hasKey . "service" }}
-{{- $serviceParams = .service }}
-{{- end }}
-{{- if hasKey . "node_port" }}
-{{- if hasKey .node_port "enabled" }}
-{{- if .node_port.enabled }}
-{{- $_ := set $serviceParams "type" "NodePort" }}
-{{- end }}
-{{- end }}
-{{- end }}
-{{- if hasKey . "external_policy_local" }}
-{{- if .external_policy_local }}
-{{- $_ := set $serviceParams "externalTrafficPolicy" "Local" }}
-{{- end }}
-{{- end }}
-{{- if $serviceParams }}
-{{- $serviceParams | toYaml }}
-{{- end }}
-{{- end }}
diff --git a/charts/horizon/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl b/charts/horizon/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
deleted file mode 100644
index bdb28c3..0000000
--- a/charts/horizon/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
+++ /dev/null
@@ -1,279 +0,0 @@
-{{/*
-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.
-*/}}
-
-{{/*
-
-The helm-toolkit.utils.daemonset_overrides function have some limitations:
-
- * it allows to override only conf values specifid in configmap-etc
- * it doesn't allow to override values for daemonsets passed via env variables
- or via damoenset definition. As result it is impossible to have mixed
- deployment when one compute is configured with dpdk while other not.
- * it is impossible to override interface names/other information stored in
- <service>-bin configmap
- * It allows to schedule on both hosts and labels, which adds some
- uncertainty
-
-This implementation is intended to handle those limitations:
-
- * it allows to schedule only based on labels
- * it creates <service>-bin per daemonset override
- * it allows to override values when rendering daemonsets
-
- It picks data from the following structure:
-
- .Values:
- overrides:
- mychart_mydaemonset:
- labels:
- label::value:
- values:
- override_root_option: override_root_value
- conf:
- ovs_dpdk:
- enabled: true
- neutron:
- DEFAULT:
- foo: bar
-
-*/}}
-
-{{- define "helm-toolkit.utils.daemonset_overrides_root" }}
- {{- $daemonset := index . 0 }}
- {{- $daemonSetTemplateName := index . 1 }}
- {{ $serviceAccountName := index . 2 }}
- {{- $configmap_include := index . 3 }}
- {{- $configmap_name := index . 4 }}
- {{- $configbin_include := index . 5 }}
- {{- $configbin_name := index . 6 }}
- {{- $context := index . 7 }}
-
- {{- $_ := unset $context ".Files" }}
- {{- $daemonset_root_name := printf (print $context.Chart.Name "_" $daemonset) }}
- {{- $_ := set $context.Values "__daemonset_list" list }}
- {{- $_ := set $context.Values "__default" dict }}
-
- {{- $default_enabled := true }}
- {{- if hasKey $context.Values "overrides" }}
- {{- range $key, $val := $context.Values.overrides }}
-
- {{- if eq $key $daemonset_root_name }}
- {{- range $type, $type_data := . }}
- {{- if eq $type "overrides_default" }}
- {{- $default_enabled = $type_data }}
- {{- end }}
-
- {{- if eq $type "labels" }}
- {{- $_ := set $context.Values "__label_dict" . }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
- {{/* dictionary that will contain all info needed to generate this
- iteration of the daemonset. */}}
- {{- $_ := set $context.Values "__current_label" dict }}
-
- {{/* set daemonset name */}}
- {{- $_ := set $context.Values.__current_label "name" $label_name }}
-
- {{/* set daemonset metadata annotation */}}
- {{- $_ := set $context.Values.__current_label "daemonset_override" $lname }}
-
- {{/* apply overrides */}}
-
-
- {{- $override_root_copy := $ldata.values }}
- {{/* Deep copy to prevent https://storyboard.openstack.org/#!/story/2005936 */}}
- {{- $root_copy := omit ($context.Values | toYaml | fromYaml) "overrides" }}
- {{- $merged_dict := mergeOverwrite $root_copy $override_root_copy }}
-
- {{- $root_conf_copy2 := dict "values" $merged_dict }}
- {{- $context_values := omit (omit ($context.Values | toYaml | fromYaml) "values") "__daemonset_list" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2.values }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__current_label "nodeData" $root_conf_copy4 }}
-
-
- {{/* Schedule to the provided label value(s) */}}
- {{- $label_dict := dict "key" $label_name }}
- {{- $_ := set $label_dict "values" (list $label_value) }}
- {{- $_ := set $label_dict "operator" "In" }}
- {{- $list_aggregate := list $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
-
- {{/* Do not schedule to other specified labels, with higher
- precedence as the list position increases. Last defined label
- is highest priority. */}}
- {{- $other_labels := omit $context.Values.__label_dict $lname }}
- {{- range $lname2, $ldata2 := $other_labels }}
- {{ $label_name2 := (split "::" $lname2)._0 }}
- {{ $label_value2 := (split "::" $lname2)._1 }}
-
- {{- $label_dict := dict "key" $label_name2 }}
- {{- $_ := set $label_dict "values" (list $label_value2) }}
- {{- $_ := set $label_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__current_label.matchExpressions $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
- {{- end }}
-
- {{/* store completed daemonset entry/info into global list */}}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__current_label }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- $_ := unset $context.Values "__current_label" }}
-
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* scheduler exceptions for the default daemonset */}}
- {{- $_ := set $context.Values.__default "matchExpressions" list }}
-
- {{- range $type, $type_data := . }}
- {{/* Do not schedule to other specified labels */}}
- {{- if eq $type "labels" }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
-
- {{- $default_dict := dict "key" $label_name }}
- {{- $_ := set $default_dict "values" (list $label_value) }}
- {{- $_ := set $default_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__default.matchExpressions $default_dict }}
- {{- $_ := set $context.Values.__default "matchExpressions" $list_aggregate }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* generate the default daemonset */}}
-
- {{/* set name */}}
- {{- $_ := set $context.Values.__default "name" "default" }}
-
- {{/* no overrides apply, so copy as-is */}}
- {{- $root_conf_copy1 := omit $context.Values.conf "overrides" }}
- {{- $root_conf_copy2 := dict "conf" $root_conf_copy1 }}
- {{- $context_values := omit $context.Values "conf" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2 }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__default "nodeData" $root_conf_copy4 }}
-
- {{/* add to global list */}}
- {{- if $default_enabled }}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__default }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- end }}
-
- {{- range $current_dict := $context.Values.__daemonset_list }}
-
- {{- $context_novalues := omit $context "Values" }}
- {{- $merged_dict := mergeOverwrite $context_novalues $current_dict.nodeData }}
- {{- $_ := set $current_dict "nodeData" $merged_dict }}
- {{/* Deep copy original daemonset_yaml */}}
- {{- $daemonset_yaml := list $daemonset $configmap_name $serviceAccountName $merged_dict | include $daemonSetTemplateName | toString | fromYaml }}
- {{- $_ := set $context.Values "__daemonset_yaml" ($daemonset_yaml | toYaml | fromYaml) }}
-
- {{/* Use the following name format $daemonset_root_name + sha256summ($current_dict.matchExpressions)
- as labels might be too long and contain wrong characters like / */}}
- {{- $_ := set $current_dict "dns_1123_name" dict }}
- {{- $name_format := "" }}
- {{- if eq $current_dict.name "default" }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name "default") | replace "_" "-" }}
- {{- else }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name ($current_dict.matchExpressions | quote | sha256sum | trunc 16)) | replace "_" "-" }}
- {{- end }}
- {{- $_ := set $current_dict "dns_1123_name" $name_format }}
-
- {{/* set daemonset metadata name */}}
- {{- if not $context.Values.__daemonset_yaml.metadata }}{{- $_ := set $context.Values.__daemonset_yaml "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.metadata.name }}{{- $_ := set $context.Values.__daemonset_yaml.metadata "name" dict }}{{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata "name" $current_dict.dns_1123_name }}
-
- {{/* cross-reference configmap name to container volume definitions */}}
- {{- $_ := set $context.Values "__volume_list" list }}
- {{- range $current_volume := $context.Values.__daemonset_yaml.spec.template.spec.volumes }}
- {{- $_ := set $context.Values "__volume" $current_volume }}
- {{- if hasKey $context.Values.__volume "secret" }}
- {{- if eq $context.Values.__volume.secret.secretName $configmap_name }}
- {{- $_ := set $context.Values.__volume.secret "secretName" (printf "%s-etc" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- if hasKey $context.Values.__volume "configMap" }}
- {{- if eq $context.Values.__volume.configMap.name $configbin_name }}
- {{- $_ := set $context.Values.__volume.configMap "name" (printf "%s-bin" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- $updated_list := append $context.Values.__volume_list $context.Values.__volume }}
- {{- $_ := set $context.Values "__volume_list" $updated_list }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "volumes" $context.Values.__volume_list }}
-
-
- {{/* populate scheduling restrictions */}}
- {{- if hasKey $current_dict "matchExpressions" }}
- {{- $length := len $current_dict.matchExpressions }}
- {{- if gt $length 0 }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "affinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity "nodeAffinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity "requiredDuringSchedulingIgnoredDuringExecution" dict }}{{- end }}
-
- {{- $expressions_modified := list }}
- {{- if hasKey $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" }}
- {{- range $orig_expression := $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms }}
- {{- $match_expressions_modified := list }}
- {{- $match_expressions_modified = concat $match_expressions_modified $current_dict.matchExpressions }}
- {{- if hasKey $orig_expression "matchExpressions" }}
- {{- $match_expressions_modified = concat $match_expressions_modified $orig_expression.matchExpressions }}
- {{- $expressions_modified = append $expressions_modified (dict "matchExpressions" $match_expressions_modified) }}
- {{- end }}
- {{- end }}
- {{- else }}
- {{- $expressions_modified = (list (dict "matchExpressions" $current_dict.matchExpressions)) }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" $expressions_modified }}
- {{- end }}
- {{- end }}
-
- {{/* input value hash for current set of values overrides */}}
- {{- if not $context.Values.__daemonset_yaml.spec }}{{- $_ := set $context.Values.__daemonset_yaml "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template }}{{- $_ := set $context.Values.__daemonset_yaml.spec "template" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata.annotations }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata "annotations" dict }}{{- end }}
- {{- $cmap := list (printf "%s-etc" $current_dict.dns_1123_name) $current_dict.nodeData | include $configmap_include }}
- {{- $cmap_bin := list (printf "%s-bin" $current_dict.dns_1123_name) $current_dict.nodeData | include $configbin_include }}
- {{- $values_cmap_hash := $cmap | quote | sha256sum }}
- {{- $values_cmap_bin_hash := $cmap_bin | quote | sha256sum }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-etc-hash" $values_cmap_hash }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-bin-hash" $values_cmap_bin_hash }}
-
- {{/* Do not set override for default daemonset */}}
- {{- if $current_dict.daemonset_override }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata.annotations "daemonset_override" $current_dict.daemonset_override }}
- {{- end }}
-
-{{/* generate configmap */}}
----
-{{ $cmap }}
- {{/* generate <service>-bin yaml */}}
----
-{{ $cmap_bin }}
- {{/* generate daemonset yaml */}}
----
-{{ $context.Values.__daemonset_yaml | toYaml }}
- {{- end }}
-{{- end }}
diff --git a/charts/horizon/requirements.lock b/charts/horizon/requirements.lock
index b94dead..4f63a87 100644
--- a/charts/horizon/requirements.lock
+++ b/charts/horizon/requirements.lock
@@ -1,6 +1,6 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
-digest: sha256:760c5997580ac8d30a64dfe92d6a54052b783ddf90cacbc5a4c95c1330988742
+ version: 0.2.69
+digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef
generated: "0001-01-01T00:00:00Z"
diff --git a/charts/horizon/requirements.yaml b/charts/horizon/requirements.yaml
index 52e723e..b3d5dcf 100644
--- a/charts/horizon/requirements.yaml
+++ b/charts/horizon/requirements.yaml
@@ -1,4 +1,4 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
+ version: 0.2.69
diff --git a/charts/ironic/charts/helm-toolkit/Chart.yaml b/charts/ironic/charts/helm-toolkit/Chart.yaml
index 9d3aa1e..d4c0ea2 100644
--- a/charts/ironic/charts/helm-toolkit/Chart.yaml
+++ b/charts/ironic/charts/helm-toolkit/Chart.yaml
@@ -9,4 +9,4 @@
sources:
- https://opendev.org/openstack/openstack-helm-infra
- https://opendev.org/openstack/openstack-helm
-version: 0.2.78
+version: 0.2.69
diff --git a/charts/ironic/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl b/charts/ironic/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
index 728b994..6877b7b 100644
--- a/charts/ironic/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
+++ b/charts/ironic/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
@@ -14,8 +14,7 @@
{{/*
abstract: |
- Resolves 'hostname:port' for an endpoint, or several hostname:port pairs for statefulset e.g
- 'hostname1:port1,hostname2:port2,hostname3:port3',
+ Resolves 'hostname:port' for an endpoint
examples:
- values: |
endpoints:
@@ -47,23 +46,6 @@
{{ tuple "oslo_db" "internal" "mysql" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
return: |
127.0.0.1:3306
- - values: |
- endpoints:
- oslo_cache:
- hosts:
- default: memcached
- host_fqdn_override:
- default: null
- statefulset:
- name: openstack-memcached-memcached
- replicas: 3
- port:
- memcache:
- default: 11211
- usage: |
- {{ tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
- return: |
- openstack-memcached-memcached-0:11211,openstack-memcached-memcached-1:11211,openstack-memcached-memcached-2:11211
*/}}
{{- define "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" -}}
@@ -71,19 +53,7 @@
{{- $endpoint := index . 1 -}}
{{- $port := index . 2 -}}
{{- $context := index . 3 -}}
-{{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false -}}
-{{- $local := dict "endpointHosts" list -}}
-{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" -}}
-{{- if $ssMap -}}
-{{- $endpointHostPrefix := $ssMap.name -}}
-{{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
-{{- range $podInt := until ( atoi (print $ssMap.replicas ) ) -}}
-{{- $endpointHostname := printf "%s-%d.%s:%s" $endpointHostPrefix $podInt $endpointHostSuffix $endpointPort -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts $endpointHostname ) -}}
-{{- end -}}
-{{- else -}}
-{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts (printf "%s:%s" $endpointHostname $endpointPort) ) -}}
-{{- end -}}
-{{ include "helm-toolkit.utils.joinListWithComma" $local.endpointHosts }}
+{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
+{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
+{{- printf "%s:%s" $endpointHostname $endpointPort -}}
{{- end -}}
diff --git a/charts/ironic/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl b/charts/ironic/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
index 24eb569..b2ec648 100644
--- a/charts/ironic/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
+++ b/charts/ironic/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
@@ -40,9 +40,9 @@
{{- $context := index . 3 -}}
{{- $endpointMap := index $context.Values.endpoints ( $type | replace "-" "_" ) }}
{{- if kindIs "string" $endpointMap.path }}
-{{- printf "%s" $endpointMap.path | default "" -}}
+{{- printf "%s" $endpointMap.path | default "/" -}}
{{- else -}}
-{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "" }}
+{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "/" }}
{{- printf "%s" $endpointPath -}}
{{- end -}}
{{- end -}}
diff --git a/charts/ironic/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl b/charts/ironic/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
deleted file mode 100644
index 332ca99..0000000
--- a/charts/ironic/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
+++ /dev/null
@@ -1,51 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Renders out the configmap <service>-oslo-policy.
-values: |
- conf:
- policy.d:
- file1:
- foo: bar
- file2:
- foo: baz
-usage: |
-{{- include "helm-toolkit.manifests.configmap_oslo_policy" (dict "envAll" $envAll "serviceName" "keystone") }}
-return: |
- ---
- apiVersion: v1
- kind: Secret
- metadata:
- name: keystone-oslo-policy
- data:
- file1: base64of(foo: bar)
- file2: base64of(foo: baz)
-*/}}
-{{- define "helm-toolkit.manifests.configmap_oslo_policy" -}}
-{{- $envAll := index . "envAll" -}}
-{{- $serviceName := index . "serviceName" -}}
----
-apiVersion: v1
-kind: Secret
-metadata:
- name: {{ $serviceName }}-oslo-policy
-type: Opaque
-data:
- {{- range $key, $value := index $envAll.Values.conf "policy.d" }}
- {{- if $value }}
- {{ $key }}: {{ toYaml $value | b64enc }}
- {{- else }}
- {{ $key }}: {{ "\n" | b64enc }}
- {{- end }}
- {{- end }}
-{{- end -}}
diff --git a/charts/ironic/charts/helm-toolkit/templates/manifests/_ingress.tpl b/charts/ironic/charts/helm-toolkit/templates/manifests/_ingress.tpl
index 792571c..cacb4b8 100644
--- a/charts/ironic/charts/helm-toolkit/templates/manifests/_ingress.tpl
+++ b/charts/ironic/charts/helm-toolkit/templates/manifests/_ingress.tpl
@@ -708,10 +708,6 @@
{{- range $v := without (index $endpointHost.tls "dnsNames" | default list) $hostNameFull }}
{{- $vHosts = append $vHosts $v }}
{{- end }}
-{{- if hasKey $envAll.Values.endpoints "alias_fqdn" }}
-{{- $alias_host := $envAll.Values.endpoints.alias_fqdn }}
-{{- $vHosts = append $vHosts $alias_host }}
-{{- end }}
{{- $secretName := index $envAll.Values.secrets "tls" ( $backendServiceType | replace "-" "_" ) $backendService $endpoint }}
{{- $_ := required "You need to specify a secret in your values for the endpoint" $secretName }}
tls:
diff --git a/charts/ironic/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/ironic/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
index c6a7521..1e28da9 100644
--- a/charts/ironic/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
+++ b/charts/ironic/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Drop')
@@ -126,7 +125,7 @@
# Delete DB
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP DATABASE IF EXISTS {0}".format(database)))
+ connection.execute("DROP DATABASE IF EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -139,7 +138,7 @@
# Delete DB User
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP USER IF EXISTS {0}".format(user)))
+ connection.execute("DROP USER IF EXISTS {0}".format(user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/ironic/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/ironic/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
index 1917f78..110cd98 100644
--- a/charts/ironic/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
+++ b/charts/ironic/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Init')
@@ -126,7 +125,7 @@
# Create DB
try:
with root_engine.connect() as connection:
- connection.execute(text("CREATE DATABASE IF NOT EXISTS {0}".format(database)))
+ connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -140,10 +139,10 @@
try:
with root_engine.connect() as connection:
connection.execute(
- text("CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
- user, password, mysql_x509)))
+ "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
+ user, password, mysql_x509))
connection.execute(
- text("GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)))
+ "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/ironic/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl b/charts/ironic/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
index e6e9c6e..3739f95 100644
--- a/charts/ironic/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
+++ b/charts/ironic/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
@@ -29,9 +29,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_ADMIN_PASSWORD=$(echo "${RABBITMQ_ADMIN_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User creadential
RABBITMQ_USERNAME=$(echo "${RABBITMQ_USER_CONNECTION}" | \
@@ -39,9 +37,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_PASSWORD=$(echo "${RABBITMQ_USER_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User vHost
RABBITMQ_VHOST=$(echo "${RABBITMQ_USER_CONNECTION}" | \
diff --git a/charts/ironic/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl b/charts/ironic/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
index 5c2dedb..48b53fa 100644
--- a/charts/ironic/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
+++ b/charts/ironic/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
@@ -40,9 +40,6 @@
release_group: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
application: {{ $application }}
component: {{ $component }}
-app.kubernetes.io/name: {{ $application }}
-app.kubernetes.io/component: {{ $component }}
-app.kubernetes.io/instance: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
{{- if ($envAll.Values.pod).labels }}
{{- if hasKey $envAll.Values.pod.labels $component }}
{{ index $envAll.Values.pod "labels" $component | toYaml }}
diff --git a/charts/ironic/charts/helm-toolkit/templates/snippets/_service_params.tpl b/charts/ironic/charts/helm-toolkit/templates/snippets/_service_params.tpl
deleted file mode 100644
index 6233a93..0000000
--- a/charts/ironic/charts/helm-toolkit/templates/snippets/_service_params.tpl
+++ /dev/null
@@ -1,61 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Inserts kubernetes service parameters from values as is.
-values: |
- network:
- serviceExample:
- service:
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-usage: |
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: 'serviceExample'
- spec:
- ports:
- - name: s-example
- port: 1111
- {{ .Values.network.serviceExample | include "helm-toolkit.snippets.service_params" | indent 2 }}
-return: |
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-*/}}
-
-{{- define "helm-toolkit.snippets.service_params" }}
-{{- $serviceParams := dict }}
-{{- if hasKey . "service" }}
-{{- $serviceParams = .service }}
-{{- end }}
-{{- if hasKey . "node_port" }}
-{{- if hasKey .node_port "enabled" }}
-{{- if .node_port.enabled }}
-{{- $_ := set $serviceParams "type" "NodePort" }}
-{{- end }}
-{{- end }}
-{{- end }}
-{{- if hasKey . "external_policy_local" }}
-{{- if .external_policy_local }}
-{{- $_ := set $serviceParams "externalTrafficPolicy" "Local" }}
-{{- end }}
-{{- end }}
-{{- if $serviceParams }}
-{{- $serviceParams | toYaml }}
-{{- end }}
-{{- end }}
diff --git a/charts/ironic/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl b/charts/ironic/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
deleted file mode 100644
index bdb28c3..0000000
--- a/charts/ironic/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
+++ /dev/null
@@ -1,279 +0,0 @@
-{{/*
-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.
-*/}}
-
-{{/*
-
-The helm-toolkit.utils.daemonset_overrides function have some limitations:
-
- * it allows to override only conf values specifid in configmap-etc
- * it doesn't allow to override values for daemonsets passed via env variables
- or via damoenset definition. As result it is impossible to have mixed
- deployment when one compute is configured with dpdk while other not.
- * it is impossible to override interface names/other information stored in
- <service>-bin configmap
- * It allows to schedule on both hosts and labels, which adds some
- uncertainty
-
-This implementation is intended to handle those limitations:
-
- * it allows to schedule only based on labels
- * it creates <service>-bin per daemonset override
- * it allows to override values when rendering daemonsets
-
- It picks data from the following structure:
-
- .Values:
- overrides:
- mychart_mydaemonset:
- labels:
- label::value:
- values:
- override_root_option: override_root_value
- conf:
- ovs_dpdk:
- enabled: true
- neutron:
- DEFAULT:
- foo: bar
-
-*/}}
-
-{{- define "helm-toolkit.utils.daemonset_overrides_root" }}
- {{- $daemonset := index . 0 }}
- {{- $daemonSetTemplateName := index . 1 }}
- {{ $serviceAccountName := index . 2 }}
- {{- $configmap_include := index . 3 }}
- {{- $configmap_name := index . 4 }}
- {{- $configbin_include := index . 5 }}
- {{- $configbin_name := index . 6 }}
- {{- $context := index . 7 }}
-
- {{- $_ := unset $context ".Files" }}
- {{- $daemonset_root_name := printf (print $context.Chart.Name "_" $daemonset) }}
- {{- $_ := set $context.Values "__daemonset_list" list }}
- {{- $_ := set $context.Values "__default" dict }}
-
- {{- $default_enabled := true }}
- {{- if hasKey $context.Values "overrides" }}
- {{- range $key, $val := $context.Values.overrides }}
-
- {{- if eq $key $daemonset_root_name }}
- {{- range $type, $type_data := . }}
- {{- if eq $type "overrides_default" }}
- {{- $default_enabled = $type_data }}
- {{- end }}
-
- {{- if eq $type "labels" }}
- {{- $_ := set $context.Values "__label_dict" . }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
- {{/* dictionary that will contain all info needed to generate this
- iteration of the daemonset. */}}
- {{- $_ := set $context.Values "__current_label" dict }}
-
- {{/* set daemonset name */}}
- {{- $_ := set $context.Values.__current_label "name" $label_name }}
-
- {{/* set daemonset metadata annotation */}}
- {{- $_ := set $context.Values.__current_label "daemonset_override" $lname }}
-
- {{/* apply overrides */}}
-
-
- {{- $override_root_copy := $ldata.values }}
- {{/* Deep copy to prevent https://storyboard.openstack.org/#!/story/2005936 */}}
- {{- $root_copy := omit ($context.Values | toYaml | fromYaml) "overrides" }}
- {{- $merged_dict := mergeOverwrite $root_copy $override_root_copy }}
-
- {{- $root_conf_copy2 := dict "values" $merged_dict }}
- {{- $context_values := omit (omit ($context.Values | toYaml | fromYaml) "values") "__daemonset_list" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2.values }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__current_label "nodeData" $root_conf_copy4 }}
-
-
- {{/* Schedule to the provided label value(s) */}}
- {{- $label_dict := dict "key" $label_name }}
- {{- $_ := set $label_dict "values" (list $label_value) }}
- {{- $_ := set $label_dict "operator" "In" }}
- {{- $list_aggregate := list $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
-
- {{/* Do not schedule to other specified labels, with higher
- precedence as the list position increases. Last defined label
- is highest priority. */}}
- {{- $other_labels := omit $context.Values.__label_dict $lname }}
- {{- range $lname2, $ldata2 := $other_labels }}
- {{ $label_name2 := (split "::" $lname2)._0 }}
- {{ $label_value2 := (split "::" $lname2)._1 }}
-
- {{- $label_dict := dict "key" $label_name2 }}
- {{- $_ := set $label_dict "values" (list $label_value2) }}
- {{- $_ := set $label_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__current_label.matchExpressions $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
- {{- end }}
-
- {{/* store completed daemonset entry/info into global list */}}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__current_label }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- $_ := unset $context.Values "__current_label" }}
-
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* scheduler exceptions for the default daemonset */}}
- {{- $_ := set $context.Values.__default "matchExpressions" list }}
-
- {{- range $type, $type_data := . }}
- {{/* Do not schedule to other specified labels */}}
- {{- if eq $type "labels" }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
-
- {{- $default_dict := dict "key" $label_name }}
- {{- $_ := set $default_dict "values" (list $label_value) }}
- {{- $_ := set $default_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__default.matchExpressions $default_dict }}
- {{- $_ := set $context.Values.__default "matchExpressions" $list_aggregate }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* generate the default daemonset */}}
-
- {{/* set name */}}
- {{- $_ := set $context.Values.__default "name" "default" }}
-
- {{/* no overrides apply, so copy as-is */}}
- {{- $root_conf_copy1 := omit $context.Values.conf "overrides" }}
- {{- $root_conf_copy2 := dict "conf" $root_conf_copy1 }}
- {{- $context_values := omit $context.Values "conf" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2 }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__default "nodeData" $root_conf_copy4 }}
-
- {{/* add to global list */}}
- {{- if $default_enabled }}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__default }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- end }}
-
- {{- range $current_dict := $context.Values.__daemonset_list }}
-
- {{- $context_novalues := omit $context "Values" }}
- {{- $merged_dict := mergeOverwrite $context_novalues $current_dict.nodeData }}
- {{- $_ := set $current_dict "nodeData" $merged_dict }}
- {{/* Deep copy original daemonset_yaml */}}
- {{- $daemonset_yaml := list $daemonset $configmap_name $serviceAccountName $merged_dict | include $daemonSetTemplateName | toString | fromYaml }}
- {{- $_ := set $context.Values "__daemonset_yaml" ($daemonset_yaml | toYaml | fromYaml) }}
-
- {{/* Use the following name format $daemonset_root_name + sha256summ($current_dict.matchExpressions)
- as labels might be too long and contain wrong characters like / */}}
- {{- $_ := set $current_dict "dns_1123_name" dict }}
- {{- $name_format := "" }}
- {{- if eq $current_dict.name "default" }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name "default") | replace "_" "-" }}
- {{- else }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name ($current_dict.matchExpressions | quote | sha256sum | trunc 16)) | replace "_" "-" }}
- {{- end }}
- {{- $_ := set $current_dict "dns_1123_name" $name_format }}
-
- {{/* set daemonset metadata name */}}
- {{- if not $context.Values.__daemonset_yaml.metadata }}{{- $_ := set $context.Values.__daemonset_yaml "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.metadata.name }}{{- $_ := set $context.Values.__daemonset_yaml.metadata "name" dict }}{{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata "name" $current_dict.dns_1123_name }}
-
- {{/* cross-reference configmap name to container volume definitions */}}
- {{- $_ := set $context.Values "__volume_list" list }}
- {{- range $current_volume := $context.Values.__daemonset_yaml.spec.template.spec.volumes }}
- {{- $_ := set $context.Values "__volume" $current_volume }}
- {{- if hasKey $context.Values.__volume "secret" }}
- {{- if eq $context.Values.__volume.secret.secretName $configmap_name }}
- {{- $_ := set $context.Values.__volume.secret "secretName" (printf "%s-etc" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- if hasKey $context.Values.__volume "configMap" }}
- {{- if eq $context.Values.__volume.configMap.name $configbin_name }}
- {{- $_ := set $context.Values.__volume.configMap "name" (printf "%s-bin" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- $updated_list := append $context.Values.__volume_list $context.Values.__volume }}
- {{- $_ := set $context.Values "__volume_list" $updated_list }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "volumes" $context.Values.__volume_list }}
-
-
- {{/* populate scheduling restrictions */}}
- {{- if hasKey $current_dict "matchExpressions" }}
- {{- $length := len $current_dict.matchExpressions }}
- {{- if gt $length 0 }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "affinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity "nodeAffinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity "requiredDuringSchedulingIgnoredDuringExecution" dict }}{{- end }}
-
- {{- $expressions_modified := list }}
- {{- if hasKey $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" }}
- {{- range $orig_expression := $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms }}
- {{- $match_expressions_modified := list }}
- {{- $match_expressions_modified = concat $match_expressions_modified $current_dict.matchExpressions }}
- {{- if hasKey $orig_expression "matchExpressions" }}
- {{- $match_expressions_modified = concat $match_expressions_modified $orig_expression.matchExpressions }}
- {{- $expressions_modified = append $expressions_modified (dict "matchExpressions" $match_expressions_modified) }}
- {{- end }}
- {{- end }}
- {{- else }}
- {{- $expressions_modified = (list (dict "matchExpressions" $current_dict.matchExpressions)) }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" $expressions_modified }}
- {{- end }}
- {{- end }}
-
- {{/* input value hash for current set of values overrides */}}
- {{- if not $context.Values.__daemonset_yaml.spec }}{{- $_ := set $context.Values.__daemonset_yaml "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template }}{{- $_ := set $context.Values.__daemonset_yaml.spec "template" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata.annotations }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata "annotations" dict }}{{- end }}
- {{- $cmap := list (printf "%s-etc" $current_dict.dns_1123_name) $current_dict.nodeData | include $configmap_include }}
- {{- $cmap_bin := list (printf "%s-bin" $current_dict.dns_1123_name) $current_dict.nodeData | include $configbin_include }}
- {{- $values_cmap_hash := $cmap | quote | sha256sum }}
- {{- $values_cmap_bin_hash := $cmap_bin | quote | sha256sum }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-etc-hash" $values_cmap_hash }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-bin-hash" $values_cmap_bin_hash }}
-
- {{/* Do not set override for default daemonset */}}
- {{- if $current_dict.daemonset_override }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata.annotations "daemonset_override" $current_dict.daemonset_override }}
- {{- end }}
-
-{{/* generate configmap */}}
----
-{{ $cmap }}
- {{/* generate <service>-bin yaml */}}
----
-{{ $cmap_bin }}
- {{/* generate daemonset yaml */}}
----
-{{ $context.Values.__daemonset_yaml | toYaml }}
- {{- end }}
-{{- end }}
diff --git a/charts/ironic/requirements.lock b/charts/ironic/requirements.lock
index b94dead..4f63a87 100644
--- a/charts/ironic/requirements.lock
+++ b/charts/ironic/requirements.lock
@@ -1,6 +1,6 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
-digest: sha256:760c5997580ac8d30a64dfe92d6a54052b783ddf90cacbc5a4c95c1330988742
+ version: 0.2.69
+digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef
generated: "0001-01-01T00:00:00Z"
diff --git a/charts/ironic/requirements.yaml b/charts/ironic/requirements.yaml
index 52e723e..b3d5dcf 100644
--- a/charts/ironic/requirements.yaml
+++ b/charts/ironic/requirements.yaml
@@ -1,4 +1,4 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
+ version: 0.2.69
diff --git a/charts/keystone/charts/helm-toolkit/Chart.yaml b/charts/keystone/charts/helm-toolkit/Chart.yaml
index 9d3aa1e..d4c0ea2 100644
--- a/charts/keystone/charts/helm-toolkit/Chart.yaml
+++ b/charts/keystone/charts/helm-toolkit/Chart.yaml
@@ -9,4 +9,4 @@
sources:
- https://opendev.org/openstack/openstack-helm-infra
- https://opendev.org/openstack/openstack-helm
-version: 0.2.78
+version: 0.2.69
diff --git a/charts/keystone/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl b/charts/keystone/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
index 728b994..6877b7b 100644
--- a/charts/keystone/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
+++ b/charts/keystone/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
@@ -14,8 +14,7 @@
{{/*
abstract: |
- Resolves 'hostname:port' for an endpoint, or several hostname:port pairs for statefulset e.g
- 'hostname1:port1,hostname2:port2,hostname3:port3',
+ Resolves 'hostname:port' for an endpoint
examples:
- values: |
endpoints:
@@ -47,23 +46,6 @@
{{ tuple "oslo_db" "internal" "mysql" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
return: |
127.0.0.1:3306
- - values: |
- endpoints:
- oslo_cache:
- hosts:
- default: memcached
- host_fqdn_override:
- default: null
- statefulset:
- name: openstack-memcached-memcached
- replicas: 3
- port:
- memcache:
- default: 11211
- usage: |
- {{ tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
- return: |
- openstack-memcached-memcached-0:11211,openstack-memcached-memcached-1:11211,openstack-memcached-memcached-2:11211
*/}}
{{- define "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" -}}
@@ -71,19 +53,7 @@
{{- $endpoint := index . 1 -}}
{{- $port := index . 2 -}}
{{- $context := index . 3 -}}
-{{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false -}}
-{{- $local := dict "endpointHosts" list -}}
-{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" -}}
-{{- if $ssMap -}}
-{{- $endpointHostPrefix := $ssMap.name -}}
-{{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
-{{- range $podInt := until ( atoi (print $ssMap.replicas ) ) -}}
-{{- $endpointHostname := printf "%s-%d.%s:%s" $endpointHostPrefix $podInt $endpointHostSuffix $endpointPort -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts $endpointHostname ) -}}
-{{- end -}}
-{{- else -}}
-{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts (printf "%s:%s" $endpointHostname $endpointPort) ) -}}
-{{- end -}}
-{{ include "helm-toolkit.utils.joinListWithComma" $local.endpointHosts }}
+{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
+{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
+{{- printf "%s:%s" $endpointHostname $endpointPort -}}
{{- end -}}
diff --git a/charts/keystone/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl b/charts/keystone/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
index 24eb569..b2ec648 100644
--- a/charts/keystone/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
+++ b/charts/keystone/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
@@ -40,9 +40,9 @@
{{- $context := index . 3 -}}
{{- $endpointMap := index $context.Values.endpoints ( $type | replace "-" "_" ) }}
{{- if kindIs "string" $endpointMap.path }}
-{{- printf "%s" $endpointMap.path | default "" -}}
+{{- printf "%s" $endpointMap.path | default "/" -}}
{{- else -}}
-{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "" }}
+{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "/" }}
{{- printf "%s" $endpointPath -}}
{{- end -}}
{{- end -}}
diff --git a/charts/keystone/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl b/charts/keystone/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
deleted file mode 100644
index 332ca99..0000000
--- a/charts/keystone/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
+++ /dev/null
@@ -1,51 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Renders out the configmap <service>-oslo-policy.
-values: |
- conf:
- policy.d:
- file1:
- foo: bar
- file2:
- foo: baz
-usage: |
-{{- include "helm-toolkit.manifests.configmap_oslo_policy" (dict "envAll" $envAll "serviceName" "keystone") }}
-return: |
- ---
- apiVersion: v1
- kind: Secret
- metadata:
- name: keystone-oslo-policy
- data:
- file1: base64of(foo: bar)
- file2: base64of(foo: baz)
-*/}}
-{{- define "helm-toolkit.manifests.configmap_oslo_policy" -}}
-{{- $envAll := index . "envAll" -}}
-{{- $serviceName := index . "serviceName" -}}
----
-apiVersion: v1
-kind: Secret
-metadata:
- name: {{ $serviceName }}-oslo-policy
-type: Opaque
-data:
- {{- range $key, $value := index $envAll.Values.conf "policy.d" }}
- {{- if $value }}
- {{ $key }}: {{ toYaml $value | b64enc }}
- {{- else }}
- {{ $key }}: {{ "\n" | b64enc }}
- {{- end }}
- {{- end }}
-{{- end -}}
diff --git a/charts/keystone/charts/helm-toolkit/templates/manifests/_ingress.tpl b/charts/keystone/charts/helm-toolkit/templates/manifests/_ingress.tpl
index 792571c..cacb4b8 100644
--- a/charts/keystone/charts/helm-toolkit/templates/manifests/_ingress.tpl
+++ b/charts/keystone/charts/helm-toolkit/templates/manifests/_ingress.tpl
@@ -708,10 +708,6 @@
{{- range $v := without (index $endpointHost.tls "dnsNames" | default list) $hostNameFull }}
{{- $vHosts = append $vHosts $v }}
{{- end }}
-{{- if hasKey $envAll.Values.endpoints "alias_fqdn" }}
-{{- $alias_host := $envAll.Values.endpoints.alias_fqdn }}
-{{- $vHosts = append $vHosts $alias_host }}
-{{- end }}
{{- $secretName := index $envAll.Values.secrets "tls" ( $backendServiceType | replace "-" "_" ) $backendService $endpoint }}
{{- $_ := required "You need to specify a secret in your values for the endpoint" $secretName }}
tls:
diff --git a/charts/keystone/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/keystone/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
index c6a7521..1e28da9 100644
--- a/charts/keystone/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
+++ b/charts/keystone/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Drop')
@@ -126,7 +125,7 @@
# Delete DB
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP DATABASE IF EXISTS {0}".format(database)))
+ connection.execute("DROP DATABASE IF EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -139,7 +138,7 @@
# Delete DB User
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP USER IF EXISTS {0}".format(user)))
+ connection.execute("DROP USER IF EXISTS {0}".format(user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/keystone/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/keystone/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
index 1917f78..110cd98 100644
--- a/charts/keystone/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
+++ b/charts/keystone/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Init')
@@ -126,7 +125,7 @@
# Create DB
try:
with root_engine.connect() as connection:
- connection.execute(text("CREATE DATABASE IF NOT EXISTS {0}".format(database)))
+ connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -140,10 +139,10 @@
try:
with root_engine.connect() as connection:
connection.execute(
- text("CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
- user, password, mysql_x509)))
+ "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
+ user, password, mysql_x509))
connection.execute(
- text("GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)))
+ "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/keystone/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl b/charts/keystone/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
index e6e9c6e..3739f95 100644
--- a/charts/keystone/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
+++ b/charts/keystone/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
@@ -29,9 +29,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_ADMIN_PASSWORD=$(echo "${RABBITMQ_ADMIN_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User creadential
RABBITMQ_USERNAME=$(echo "${RABBITMQ_USER_CONNECTION}" | \
@@ -39,9 +37,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_PASSWORD=$(echo "${RABBITMQ_USER_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User vHost
RABBITMQ_VHOST=$(echo "${RABBITMQ_USER_CONNECTION}" | \
diff --git a/charts/keystone/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl b/charts/keystone/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
index 5c2dedb..48b53fa 100644
--- a/charts/keystone/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
+++ b/charts/keystone/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
@@ -40,9 +40,6 @@
release_group: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
application: {{ $application }}
component: {{ $component }}
-app.kubernetes.io/name: {{ $application }}
-app.kubernetes.io/component: {{ $component }}
-app.kubernetes.io/instance: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
{{- if ($envAll.Values.pod).labels }}
{{- if hasKey $envAll.Values.pod.labels $component }}
{{ index $envAll.Values.pod "labels" $component | toYaml }}
diff --git a/charts/keystone/charts/helm-toolkit/templates/snippets/_service_params.tpl b/charts/keystone/charts/helm-toolkit/templates/snippets/_service_params.tpl
deleted file mode 100644
index 6233a93..0000000
--- a/charts/keystone/charts/helm-toolkit/templates/snippets/_service_params.tpl
+++ /dev/null
@@ -1,61 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Inserts kubernetes service parameters from values as is.
-values: |
- network:
- serviceExample:
- service:
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-usage: |
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: 'serviceExample'
- spec:
- ports:
- - name: s-example
- port: 1111
- {{ .Values.network.serviceExample | include "helm-toolkit.snippets.service_params" | indent 2 }}
-return: |
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-*/}}
-
-{{- define "helm-toolkit.snippets.service_params" }}
-{{- $serviceParams := dict }}
-{{- if hasKey . "service" }}
-{{- $serviceParams = .service }}
-{{- end }}
-{{- if hasKey . "node_port" }}
-{{- if hasKey .node_port "enabled" }}
-{{- if .node_port.enabled }}
-{{- $_ := set $serviceParams "type" "NodePort" }}
-{{- end }}
-{{- end }}
-{{- end }}
-{{- if hasKey . "external_policy_local" }}
-{{- if .external_policy_local }}
-{{- $_ := set $serviceParams "externalTrafficPolicy" "Local" }}
-{{- end }}
-{{- end }}
-{{- if $serviceParams }}
-{{- $serviceParams | toYaml }}
-{{- end }}
-{{- end }}
diff --git a/charts/keystone/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl b/charts/keystone/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
deleted file mode 100644
index bdb28c3..0000000
--- a/charts/keystone/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
+++ /dev/null
@@ -1,279 +0,0 @@
-{{/*
-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.
-*/}}
-
-{{/*
-
-The helm-toolkit.utils.daemonset_overrides function have some limitations:
-
- * it allows to override only conf values specifid in configmap-etc
- * it doesn't allow to override values for daemonsets passed via env variables
- or via damoenset definition. As result it is impossible to have mixed
- deployment when one compute is configured with dpdk while other not.
- * it is impossible to override interface names/other information stored in
- <service>-bin configmap
- * It allows to schedule on both hosts and labels, which adds some
- uncertainty
-
-This implementation is intended to handle those limitations:
-
- * it allows to schedule only based on labels
- * it creates <service>-bin per daemonset override
- * it allows to override values when rendering daemonsets
-
- It picks data from the following structure:
-
- .Values:
- overrides:
- mychart_mydaemonset:
- labels:
- label::value:
- values:
- override_root_option: override_root_value
- conf:
- ovs_dpdk:
- enabled: true
- neutron:
- DEFAULT:
- foo: bar
-
-*/}}
-
-{{- define "helm-toolkit.utils.daemonset_overrides_root" }}
- {{- $daemonset := index . 0 }}
- {{- $daemonSetTemplateName := index . 1 }}
- {{ $serviceAccountName := index . 2 }}
- {{- $configmap_include := index . 3 }}
- {{- $configmap_name := index . 4 }}
- {{- $configbin_include := index . 5 }}
- {{- $configbin_name := index . 6 }}
- {{- $context := index . 7 }}
-
- {{- $_ := unset $context ".Files" }}
- {{- $daemonset_root_name := printf (print $context.Chart.Name "_" $daemonset) }}
- {{- $_ := set $context.Values "__daemonset_list" list }}
- {{- $_ := set $context.Values "__default" dict }}
-
- {{- $default_enabled := true }}
- {{- if hasKey $context.Values "overrides" }}
- {{- range $key, $val := $context.Values.overrides }}
-
- {{- if eq $key $daemonset_root_name }}
- {{- range $type, $type_data := . }}
- {{- if eq $type "overrides_default" }}
- {{- $default_enabled = $type_data }}
- {{- end }}
-
- {{- if eq $type "labels" }}
- {{- $_ := set $context.Values "__label_dict" . }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
- {{/* dictionary that will contain all info needed to generate this
- iteration of the daemonset. */}}
- {{- $_ := set $context.Values "__current_label" dict }}
-
- {{/* set daemonset name */}}
- {{- $_ := set $context.Values.__current_label "name" $label_name }}
-
- {{/* set daemonset metadata annotation */}}
- {{- $_ := set $context.Values.__current_label "daemonset_override" $lname }}
-
- {{/* apply overrides */}}
-
-
- {{- $override_root_copy := $ldata.values }}
- {{/* Deep copy to prevent https://storyboard.openstack.org/#!/story/2005936 */}}
- {{- $root_copy := omit ($context.Values | toYaml | fromYaml) "overrides" }}
- {{- $merged_dict := mergeOverwrite $root_copy $override_root_copy }}
-
- {{- $root_conf_copy2 := dict "values" $merged_dict }}
- {{- $context_values := omit (omit ($context.Values | toYaml | fromYaml) "values") "__daemonset_list" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2.values }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__current_label "nodeData" $root_conf_copy4 }}
-
-
- {{/* Schedule to the provided label value(s) */}}
- {{- $label_dict := dict "key" $label_name }}
- {{- $_ := set $label_dict "values" (list $label_value) }}
- {{- $_ := set $label_dict "operator" "In" }}
- {{- $list_aggregate := list $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
-
- {{/* Do not schedule to other specified labels, with higher
- precedence as the list position increases. Last defined label
- is highest priority. */}}
- {{- $other_labels := omit $context.Values.__label_dict $lname }}
- {{- range $lname2, $ldata2 := $other_labels }}
- {{ $label_name2 := (split "::" $lname2)._0 }}
- {{ $label_value2 := (split "::" $lname2)._1 }}
-
- {{- $label_dict := dict "key" $label_name2 }}
- {{- $_ := set $label_dict "values" (list $label_value2) }}
- {{- $_ := set $label_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__current_label.matchExpressions $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
- {{- end }}
-
- {{/* store completed daemonset entry/info into global list */}}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__current_label }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- $_ := unset $context.Values "__current_label" }}
-
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* scheduler exceptions for the default daemonset */}}
- {{- $_ := set $context.Values.__default "matchExpressions" list }}
-
- {{- range $type, $type_data := . }}
- {{/* Do not schedule to other specified labels */}}
- {{- if eq $type "labels" }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
-
- {{- $default_dict := dict "key" $label_name }}
- {{- $_ := set $default_dict "values" (list $label_value) }}
- {{- $_ := set $default_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__default.matchExpressions $default_dict }}
- {{- $_ := set $context.Values.__default "matchExpressions" $list_aggregate }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* generate the default daemonset */}}
-
- {{/* set name */}}
- {{- $_ := set $context.Values.__default "name" "default" }}
-
- {{/* no overrides apply, so copy as-is */}}
- {{- $root_conf_copy1 := omit $context.Values.conf "overrides" }}
- {{- $root_conf_copy2 := dict "conf" $root_conf_copy1 }}
- {{- $context_values := omit $context.Values "conf" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2 }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__default "nodeData" $root_conf_copy4 }}
-
- {{/* add to global list */}}
- {{- if $default_enabled }}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__default }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- end }}
-
- {{- range $current_dict := $context.Values.__daemonset_list }}
-
- {{- $context_novalues := omit $context "Values" }}
- {{- $merged_dict := mergeOverwrite $context_novalues $current_dict.nodeData }}
- {{- $_ := set $current_dict "nodeData" $merged_dict }}
- {{/* Deep copy original daemonset_yaml */}}
- {{- $daemonset_yaml := list $daemonset $configmap_name $serviceAccountName $merged_dict | include $daemonSetTemplateName | toString | fromYaml }}
- {{- $_ := set $context.Values "__daemonset_yaml" ($daemonset_yaml | toYaml | fromYaml) }}
-
- {{/* Use the following name format $daemonset_root_name + sha256summ($current_dict.matchExpressions)
- as labels might be too long and contain wrong characters like / */}}
- {{- $_ := set $current_dict "dns_1123_name" dict }}
- {{- $name_format := "" }}
- {{- if eq $current_dict.name "default" }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name "default") | replace "_" "-" }}
- {{- else }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name ($current_dict.matchExpressions | quote | sha256sum | trunc 16)) | replace "_" "-" }}
- {{- end }}
- {{- $_ := set $current_dict "dns_1123_name" $name_format }}
-
- {{/* set daemonset metadata name */}}
- {{- if not $context.Values.__daemonset_yaml.metadata }}{{- $_ := set $context.Values.__daemonset_yaml "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.metadata.name }}{{- $_ := set $context.Values.__daemonset_yaml.metadata "name" dict }}{{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata "name" $current_dict.dns_1123_name }}
-
- {{/* cross-reference configmap name to container volume definitions */}}
- {{- $_ := set $context.Values "__volume_list" list }}
- {{- range $current_volume := $context.Values.__daemonset_yaml.spec.template.spec.volumes }}
- {{- $_ := set $context.Values "__volume" $current_volume }}
- {{- if hasKey $context.Values.__volume "secret" }}
- {{- if eq $context.Values.__volume.secret.secretName $configmap_name }}
- {{- $_ := set $context.Values.__volume.secret "secretName" (printf "%s-etc" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- if hasKey $context.Values.__volume "configMap" }}
- {{- if eq $context.Values.__volume.configMap.name $configbin_name }}
- {{- $_ := set $context.Values.__volume.configMap "name" (printf "%s-bin" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- $updated_list := append $context.Values.__volume_list $context.Values.__volume }}
- {{- $_ := set $context.Values "__volume_list" $updated_list }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "volumes" $context.Values.__volume_list }}
-
-
- {{/* populate scheduling restrictions */}}
- {{- if hasKey $current_dict "matchExpressions" }}
- {{- $length := len $current_dict.matchExpressions }}
- {{- if gt $length 0 }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "affinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity "nodeAffinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity "requiredDuringSchedulingIgnoredDuringExecution" dict }}{{- end }}
-
- {{- $expressions_modified := list }}
- {{- if hasKey $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" }}
- {{- range $orig_expression := $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms }}
- {{- $match_expressions_modified := list }}
- {{- $match_expressions_modified = concat $match_expressions_modified $current_dict.matchExpressions }}
- {{- if hasKey $orig_expression "matchExpressions" }}
- {{- $match_expressions_modified = concat $match_expressions_modified $orig_expression.matchExpressions }}
- {{- $expressions_modified = append $expressions_modified (dict "matchExpressions" $match_expressions_modified) }}
- {{- end }}
- {{- end }}
- {{- else }}
- {{- $expressions_modified = (list (dict "matchExpressions" $current_dict.matchExpressions)) }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" $expressions_modified }}
- {{- end }}
- {{- end }}
-
- {{/* input value hash for current set of values overrides */}}
- {{- if not $context.Values.__daemonset_yaml.spec }}{{- $_ := set $context.Values.__daemonset_yaml "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template }}{{- $_ := set $context.Values.__daemonset_yaml.spec "template" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata.annotations }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata "annotations" dict }}{{- end }}
- {{- $cmap := list (printf "%s-etc" $current_dict.dns_1123_name) $current_dict.nodeData | include $configmap_include }}
- {{- $cmap_bin := list (printf "%s-bin" $current_dict.dns_1123_name) $current_dict.nodeData | include $configbin_include }}
- {{- $values_cmap_hash := $cmap | quote | sha256sum }}
- {{- $values_cmap_bin_hash := $cmap_bin | quote | sha256sum }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-etc-hash" $values_cmap_hash }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-bin-hash" $values_cmap_bin_hash }}
-
- {{/* Do not set override for default daemonset */}}
- {{- if $current_dict.daemonset_override }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata.annotations "daemonset_override" $current_dict.daemonset_override }}
- {{- end }}
-
-{{/* generate configmap */}}
----
-{{ $cmap }}
- {{/* generate <service>-bin yaml */}}
----
-{{ $cmap_bin }}
- {{/* generate daemonset yaml */}}
----
-{{ $context.Values.__daemonset_yaml | toYaml }}
- {{- end }}
-{{- end }}
diff --git a/charts/keystone/requirements.lock b/charts/keystone/requirements.lock
index b94dead..4f63a87 100644
--- a/charts/keystone/requirements.lock
+++ b/charts/keystone/requirements.lock
@@ -1,6 +1,6 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
-digest: sha256:760c5997580ac8d30a64dfe92d6a54052b783ddf90cacbc5a4c95c1330988742
+ version: 0.2.69
+digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef
generated: "0001-01-01T00:00:00Z"
diff --git a/charts/keystone/requirements.yaml b/charts/keystone/requirements.yaml
index 52e723e..b3d5dcf 100644
--- a/charts/keystone/requirements.yaml
+++ b/charts/keystone/requirements.yaml
@@ -1,4 +1,4 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
+ version: 0.2.69
diff --git a/charts/libvirt/charts/helm-toolkit/Chart.yaml b/charts/libvirt/charts/helm-toolkit/Chart.yaml
index 9d3aa1e..d4c0ea2 100644
--- a/charts/libvirt/charts/helm-toolkit/Chart.yaml
+++ b/charts/libvirt/charts/helm-toolkit/Chart.yaml
@@ -9,4 +9,4 @@
sources:
- https://opendev.org/openstack/openstack-helm-infra
- https://opendev.org/openstack/openstack-helm
-version: 0.2.78
+version: 0.2.69
diff --git a/charts/libvirt/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl b/charts/libvirt/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
index 728b994..6877b7b 100644
--- a/charts/libvirt/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
+++ b/charts/libvirt/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
@@ -14,8 +14,7 @@
{{/*
abstract: |
- Resolves 'hostname:port' for an endpoint, or several hostname:port pairs for statefulset e.g
- 'hostname1:port1,hostname2:port2,hostname3:port3',
+ Resolves 'hostname:port' for an endpoint
examples:
- values: |
endpoints:
@@ -47,23 +46,6 @@
{{ tuple "oslo_db" "internal" "mysql" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
return: |
127.0.0.1:3306
- - values: |
- endpoints:
- oslo_cache:
- hosts:
- default: memcached
- host_fqdn_override:
- default: null
- statefulset:
- name: openstack-memcached-memcached
- replicas: 3
- port:
- memcache:
- default: 11211
- usage: |
- {{ tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
- return: |
- openstack-memcached-memcached-0:11211,openstack-memcached-memcached-1:11211,openstack-memcached-memcached-2:11211
*/}}
{{- define "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" -}}
@@ -71,19 +53,7 @@
{{- $endpoint := index . 1 -}}
{{- $port := index . 2 -}}
{{- $context := index . 3 -}}
-{{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false -}}
-{{- $local := dict "endpointHosts" list -}}
-{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" -}}
-{{- if $ssMap -}}
-{{- $endpointHostPrefix := $ssMap.name -}}
-{{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
-{{- range $podInt := until ( atoi (print $ssMap.replicas ) ) -}}
-{{- $endpointHostname := printf "%s-%d.%s:%s" $endpointHostPrefix $podInt $endpointHostSuffix $endpointPort -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts $endpointHostname ) -}}
-{{- end -}}
-{{- else -}}
-{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts (printf "%s:%s" $endpointHostname $endpointPort) ) -}}
-{{- end -}}
-{{ include "helm-toolkit.utils.joinListWithComma" $local.endpointHosts }}
+{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
+{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
+{{- printf "%s:%s" $endpointHostname $endpointPort -}}
{{- end -}}
diff --git a/charts/libvirt/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl b/charts/libvirt/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
index 24eb569..b2ec648 100644
--- a/charts/libvirt/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
+++ b/charts/libvirt/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
@@ -40,9 +40,9 @@
{{- $context := index . 3 -}}
{{- $endpointMap := index $context.Values.endpoints ( $type | replace "-" "_" ) }}
{{- if kindIs "string" $endpointMap.path }}
-{{- printf "%s" $endpointMap.path | default "" -}}
+{{- printf "%s" $endpointMap.path | default "/" -}}
{{- else -}}
-{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "" }}
+{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "/" }}
{{- printf "%s" $endpointPath -}}
{{- end -}}
{{- end -}}
diff --git a/charts/libvirt/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl b/charts/libvirt/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
deleted file mode 100644
index 332ca99..0000000
--- a/charts/libvirt/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
+++ /dev/null
@@ -1,51 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Renders out the configmap <service>-oslo-policy.
-values: |
- conf:
- policy.d:
- file1:
- foo: bar
- file2:
- foo: baz
-usage: |
-{{- include "helm-toolkit.manifests.configmap_oslo_policy" (dict "envAll" $envAll "serviceName" "keystone") }}
-return: |
- ---
- apiVersion: v1
- kind: Secret
- metadata:
- name: keystone-oslo-policy
- data:
- file1: base64of(foo: bar)
- file2: base64of(foo: baz)
-*/}}
-{{- define "helm-toolkit.manifests.configmap_oslo_policy" -}}
-{{- $envAll := index . "envAll" -}}
-{{- $serviceName := index . "serviceName" -}}
----
-apiVersion: v1
-kind: Secret
-metadata:
- name: {{ $serviceName }}-oslo-policy
-type: Opaque
-data:
- {{- range $key, $value := index $envAll.Values.conf "policy.d" }}
- {{- if $value }}
- {{ $key }}: {{ toYaml $value | b64enc }}
- {{- else }}
- {{ $key }}: {{ "\n" | b64enc }}
- {{- end }}
- {{- end }}
-{{- end -}}
diff --git a/charts/libvirt/charts/helm-toolkit/templates/manifests/_ingress.tpl b/charts/libvirt/charts/helm-toolkit/templates/manifests/_ingress.tpl
index 792571c..cacb4b8 100644
--- a/charts/libvirt/charts/helm-toolkit/templates/manifests/_ingress.tpl
+++ b/charts/libvirt/charts/helm-toolkit/templates/manifests/_ingress.tpl
@@ -708,10 +708,6 @@
{{- range $v := without (index $endpointHost.tls "dnsNames" | default list) $hostNameFull }}
{{- $vHosts = append $vHosts $v }}
{{- end }}
-{{- if hasKey $envAll.Values.endpoints "alias_fqdn" }}
-{{- $alias_host := $envAll.Values.endpoints.alias_fqdn }}
-{{- $vHosts = append $vHosts $alias_host }}
-{{- end }}
{{- $secretName := index $envAll.Values.secrets "tls" ( $backendServiceType | replace "-" "_" ) $backendService $endpoint }}
{{- $_ := required "You need to specify a secret in your values for the endpoint" $secretName }}
tls:
diff --git a/charts/libvirt/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/libvirt/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
index c6a7521..1e28da9 100644
--- a/charts/libvirt/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
+++ b/charts/libvirt/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Drop')
@@ -126,7 +125,7 @@
# Delete DB
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP DATABASE IF EXISTS {0}".format(database)))
+ connection.execute("DROP DATABASE IF EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -139,7 +138,7 @@
# Delete DB User
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP USER IF EXISTS {0}".format(user)))
+ connection.execute("DROP USER IF EXISTS {0}".format(user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/libvirt/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/libvirt/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
index 1917f78..110cd98 100644
--- a/charts/libvirt/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
+++ b/charts/libvirt/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Init')
@@ -126,7 +125,7 @@
# Create DB
try:
with root_engine.connect() as connection:
- connection.execute(text("CREATE DATABASE IF NOT EXISTS {0}".format(database)))
+ connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -140,10 +139,10 @@
try:
with root_engine.connect() as connection:
connection.execute(
- text("CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
- user, password, mysql_x509)))
+ "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
+ user, password, mysql_x509))
connection.execute(
- text("GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)))
+ "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/libvirt/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl b/charts/libvirt/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
index e6e9c6e..3739f95 100644
--- a/charts/libvirt/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
+++ b/charts/libvirt/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
@@ -29,9 +29,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_ADMIN_PASSWORD=$(echo "${RABBITMQ_ADMIN_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User creadential
RABBITMQ_USERNAME=$(echo "${RABBITMQ_USER_CONNECTION}" | \
@@ -39,9 +37,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_PASSWORD=$(echo "${RABBITMQ_USER_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User vHost
RABBITMQ_VHOST=$(echo "${RABBITMQ_USER_CONNECTION}" | \
diff --git a/charts/libvirt/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl b/charts/libvirt/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
index 5c2dedb..48b53fa 100644
--- a/charts/libvirt/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
+++ b/charts/libvirt/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
@@ -40,9 +40,6 @@
release_group: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
application: {{ $application }}
component: {{ $component }}
-app.kubernetes.io/name: {{ $application }}
-app.kubernetes.io/component: {{ $component }}
-app.kubernetes.io/instance: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
{{- if ($envAll.Values.pod).labels }}
{{- if hasKey $envAll.Values.pod.labels $component }}
{{ index $envAll.Values.pod "labels" $component | toYaml }}
diff --git a/charts/libvirt/charts/helm-toolkit/templates/snippets/_service_params.tpl b/charts/libvirt/charts/helm-toolkit/templates/snippets/_service_params.tpl
deleted file mode 100644
index 6233a93..0000000
--- a/charts/libvirt/charts/helm-toolkit/templates/snippets/_service_params.tpl
+++ /dev/null
@@ -1,61 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Inserts kubernetes service parameters from values as is.
-values: |
- network:
- serviceExample:
- service:
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-usage: |
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: 'serviceExample'
- spec:
- ports:
- - name: s-example
- port: 1111
- {{ .Values.network.serviceExample | include "helm-toolkit.snippets.service_params" | indent 2 }}
-return: |
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-*/}}
-
-{{- define "helm-toolkit.snippets.service_params" }}
-{{- $serviceParams := dict }}
-{{- if hasKey . "service" }}
-{{- $serviceParams = .service }}
-{{- end }}
-{{- if hasKey . "node_port" }}
-{{- if hasKey .node_port "enabled" }}
-{{- if .node_port.enabled }}
-{{- $_ := set $serviceParams "type" "NodePort" }}
-{{- end }}
-{{- end }}
-{{- end }}
-{{- if hasKey . "external_policy_local" }}
-{{- if .external_policy_local }}
-{{- $_ := set $serviceParams "externalTrafficPolicy" "Local" }}
-{{- end }}
-{{- end }}
-{{- if $serviceParams }}
-{{- $serviceParams | toYaml }}
-{{- end }}
-{{- end }}
diff --git a/charts/libvirt/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl b/charts/libvirt/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
deleted file mode 100644
index bdb28c3..0000000
--- a/charts/libvirt/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
+++ /dev/null
@@ -1,279 +0,0 @@
-{{/*
-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.
-*/}}
-
-{{/*
-
-The helm-toolkit.utils.daemonset_overrides function have some limitations:
-
- * it allows to override only conf values specifid in configmap-etc
- * it doesn't allow to override values for daemonsets passed via env variables
- or via damoenset definition. As result it is impossible to have mixed
- deployment when one compute is configured with dpdk while other not.
- * it is impossible to override interface names/other information stored in
- <service>-bin configmap
- * It allows to schedule on both hosts and labels, which adds some
- uncertainty
-
-This implementation is intended to handle those limitations:
-
- * it allows to schedule only based on labels
- * it creates <service>-bin per daemonset override
- * it allows to override values when rendering daemonsets
-
- It picks data from the following structure:
-
- .Values:
- overrides:
- mychart_mydaemonset:
- labels:
- label::value:
- values:
- override_root_option: override_root_value
- conf:
- ovs_dpdk:
- enabled: true
- neutron:
- DEFAULT:
- foo: bar
-
-*/}}
-
-{{- define "helm-toolkit.utils.daemonset_overrides_root" }}
- {{- $daemonset := index . 0 }}
- {{- $daemonSetTemplateName := index . 1 }}
- {{ $serviceAccountName := index . 2 }}
- {{- $configmap_include := index . 3 }}
- {{- $configmap_name := index . 4 }}
- {{- $configbin_include := index . 5 }}
- {{- $configbin_name := index . 6 }}
- {{- $context := index . 7 }}
-
- {{- $_ := unset $context ".Files" }}
- {{- $daemonset_root_name := printf (print $context.Chart.Name "_" $daemonset) }}
- {{- $_ := set $context.Values "__daemonset_list" list }}
- {{- $_ := set $context.Values "__default" dict }}
-
- {{- $default_enabled := true }}
- {{- if hasKey $context.Values "overrides" }}
- {{- range $key, $val := $context.Values.overrides }}
-
- {{- if eq $key $daemonset_root_name }}
- {{- range $type, $type_data := . }}
- {{- if eq $type "overrides_default" }}
- {{- $default_enabled = $type_data }}
- {{- end }}
-
- {{- if eq $type "labels" }}
- {{- $_ := set $context.Values "__label_dict" . }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
- {{/* dictionary that will contain all info needed to generate this
- iteration of the daemonset. */}}
- {{- $_ := set $context.Values "__current_label" dict }}
-
- {{/* set daemonset name */}}
- {{- $_ := set $context.Values.__current_label "name" $label_name }}
-
- {{/* set daemonset metadata annotation */}}
- {{- $_ := set $context.Values.__current_label "daemonset_override" $lname }}
-
- {{/* apply overrides */}}
-
-
- {{- $override_root_copy := $ldata.values }}
- {{/* Deep copy to prevent https://storyboard.openstack.org/#!/story/2005936 */}}
- {{- $root_copy := omit ($context.Values | toYaml | fromYaml) "overrides" }}
- {{- $merged_dict := mergeOverwrite $root_copy $override_root_copy }}
-
- {{- $root_conf_copy2 := dict "values" $merged_dict }}
- {{- $context_values := omit (omit ($context.Values | toYaml | fromYaml) "values") "__daemonset_list" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2.values }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__current_label "nodeData" $root_conf_copy4 }}
-
-
- {{/* Schedule to the provided label value(s) */}}
- {{- $label_dict := dict "key" $label_name }}
- {{- $_ := set $label_dict "values" (list $label_value) }}
- {{- $_ := set $label_dict "operator" "In" }}
- {{- $list_aggregate := list $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
-
- {{/* Do not schedule to other specified labels, with higher
- precedence as the list position increases. Last defined label
- is highest priority. */}}
- {{- $other_labels := omit $context.Values.__label_dict $lname }}
- {{- range $lname2, $ldata2 := $other_labels }}
- {{ $label_name2 := (split "::" $lname2)._0 }}
- {{ $label_value2 := (split "::" $lname2)._1 }}
-
- {{- $label_dict := dict "key" $label_name2 }}
- {{- $_ := set $label_dict "values" (list $label_value2) }}
- {{- $_ := set $label_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__current_label.matchExpressions $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
- {{- end }}
-
- {{/* store completed daemonset entry/info into global list */}}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__current_label }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- $_ := unset $context.Values "__current_label" }}
-
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* scheduler exceptions for the default daemonset */}}
- {{- $_ := set $context.Values.__default "matchExpressions" list }}
-
- {{- range $type, $type_data := . }}
- {{/* Do not schedule to other specified labels */}}
- {{- if eq $type "labels" }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
-
- {{- $default_dict := dict "key" $label_name }}
- {{- $_ := set $default_dict "values" (list $label_value) }}
- {{- $_ := set $default_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__default.matchExpressions $default_dict }}
- {{- $_ := set $context.Values.__default "matchExpressions" $list_aggregate }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* generate the default daemonset */}}
-
- {{/* set name */}}
- {{- $_ := set $context.Values.__default "name" "default" }}
-
- {{/* no overrides apply, so copy as-is */}}
- {{- $root_conf_copy1 := omit $context.Values.conf "overrides" }}
- {{- $root_conf_copy2 := dict "conf" $root_conf_copy1 }}
- {{- $context_values := omit $context.Values "conf" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2 }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__default "nodeData" $root_conf_copy4 }}
-
- {{/* add to global list */}}
- {{- if $default_enabled }}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__default }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- end }}
-
- {{- range $current_dict := $context.Values.__daemonset_list }}
-
- {{- $context_novalues := omit $context "Values" }}
- {{- $merged_dict := mergeOverwrite $context_novalues $current_dict.nodeData }}
- {{- $_ := set $current_dict "nodeData" $merged_dict }}
- {{/* Deep copy original daemonset_yaml */}}
- {{- $daemonset_yaml := list $daemonset $configmap_name $serviceAccountName $merged_dict | include $daemonSetTemplateName | toString | fromYaml }}
- {{- $_ := set $context.Values "__daemonset_yaml" ($daemonset_yaml | toYaml | fromYaml) }}
-
- {{/* Use the following name format $daemonset_root_name + sha256summ($current_dict.matchExpressions)
- as labels might be too long and contain wrong characters like / */}}
- {{- $_ := set $current_dict "dns_1123_name" dict }}
- {{- $name_format := "" }}
- {{- if eq $current_dict.name "default" }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name "default") | replace "_" "-" }}
- {{- else }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name ($current_dict.matchExpressions | quote | sha256sum | trunc 16)) | replace "_" "-" }}
- {{- end }}
- {{- $_ := set $current_dict "dns_1123_name" $name_format }}
-
- {{/* set daemonset metadata name */}}
- {{- if not $context.Values.__daemonset_yaml.metadata }}{{- $_ := set $context.Values.__daemonset_yaml "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.metadata.name }}{{- $_ := set $context.Values.__daemonset_yaml.metadata "name" dict }}{{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata "name" $current_dict.dns_1123_name }}
-
- {{/* cross-reference configmap name to container volume definitions */}}
- {{- $_ := set $context.Values "__volume_list" list }}
- {{- range $current_volume := $context.Values.__daemonset_yaml.spec.template.spec.volumes }}
- {{- $_ := set $context.Values "__volume" $current_volume }}
- {{- if hasKey $context.Values.__volume "secret" }}
- {{- if eq $context.Values.__volume.secret.secretName $configmap_name }}
- {{- $_ := set $context.Values.__volume.secret "secretName" (printf "%s-etc" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- if hasKey $context.Values.__volume "configMap" }}
- {{- if eq $context.Values.__volume.configMap.name $configbin_name }}
- {{- $_ := set $context.Values.__volume.configMap "name" (printf "%s-bin" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- $updated_list := append $context.Values.__volume_list $context.Values.__volume }}
- {{- $_ := set $context.Values "__volume_list" $updated_list }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "volumes" $context.Values.__volume_list }}
-
-
- {{/* populate scheduling restrictions */}}
- {{- if hasKey $current_dict "matchExpressions" }}
- {{- $length := len $current_dict.matchExpressions }}
- {{- if gt $length 0 }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "affinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity "nodeAffinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity "requiredDuringSchedulingIgnoredDuringExecution" dict }}{{- end }}
-
- {{- $expressions_modified := list }}
- {{- if hasKey $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" }}
- {{- range $orig_expression := $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms }}
- {{- $match_expressions_modified := list }}
- {{- $match_expressions_modified = concat $match_expressions_modified $current_dict.matchExpressions }}
- {{- if hasKey $orig_expression "matchExpressions" }}
- {{- $match_expressions_modified = concat $match_expressions_modified $orig_expression.matchExpressions }}
- {{- $expressions_modified = append $expressions_modified (dict "matchExpressions" $match_expressions_modified) }}
- {{- end }}
- {{- end }}
- {{- else }}
- {{- $expressions_modified = (list (dict "matchExpressions" $current_dict.matchExpressions)) }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" $expressions_modified }}
- {{- end }}
- {{- end }}
-
- {{/* input value hash for current set of values overrides */}}
- {{- if not $context.Values.__daemonset_yaml.spec }}{{- $_ := set $context.Values.__daemonset_yaml "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template }}{{- $_ := set $context.Values.__daemonset_yaml.spec "template" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata.annotations }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata "annotations" dict }}{{- end }}
- {{- $cmap := list (printf "%s-etc" $current_dict.dns_1123_name) $current_dict.nodeData | include $configmap_include }}
- {{- $cmap_bin := list (printf "%s-bin" $current_dict.dns_1123_name) $current_dict.nodeData | include $configbin_include }}
- {{- $values_cmap_hash := $cmap | quote | sha256sum }}
- {{- $values_cmap_bin_hash := $cmap_bin | quote | sha256sum }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-etc-hash" $values_cmap_hash }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-bin-hash" $values_cmap_bin_hash }}
-
- {{/* Do not set override for default daemonset */}}
- {{- if $current_dict.daemonset_override }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata.annotations "daemonset_override" $current_dict.daemonset_override }}
- {{- end }}
-
-{{/* generate configmap */}}
----
-{{ $cmap }}
- {{/* generate <service>-bin yaml */}}
----
-{{ $cmap_bin }}
- {{/* generate daemonset yaml */}}
----
-{{ $context.Values.__daemonset_yaml | toYaml }}
- {{- end }}
-{{- end }}
diff --git a/charts/libvirt/requirements.lock b/charts/libvirt/requirements.lock
index b94dead..4f63a87 100644
--- a/charts/libvirt/requirements.lock
+++ b/charts/libvirt/requirements.lock
@@ -1,6 +1,6 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
-digest: sha256:760c5997580ac8d30a64dfe92d6a54052b783ddf90cacbc5a4c95c1330988742
+ version: 0.2.69
+digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef
generated: "0001-01-01T00:00:00Z"
diff --git a/charts/libvirt/requirements.yaml b/charts/libvirt/requirements.yaml
index 52e723e..b3d5dcf 100644
--- a/charts/libvirt/requirements.yaml
+++ b/charts/libvirt/requirements.yaml
@@ -1,4 +1,4 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
+ version: 0.2.69
diff --git a/charts/magnum/charts/helm-toolkit/Chart.yaml b/charts/magnum/charts/helm-toolkit/Chart.yaml
index 9d3aa1e..d4c0ea2 100644
--- a/charts/magnum/charts/helm-toolkit/Chart.yaml
+++ b/charts/magnum/charts/helm-toolkit/Chart.yaml
@@ -9,4 +9,4 @@
sources:
- https://opendev.org/openstack/openstack-helm-infra
- https://opendev.org/openstack/openstack-helm
-version: 0.2.78
+version: 0.2.69
diff --git a/charts/magnum/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl b/charts/magnum/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
index 728b994..6877b7b 100644
--- a/charts/magnum/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
+++ b/charts/magnum/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
@@ -14,8 +14,7 @@
{{/*
abstract: |
- Resolves 'hostname:port' for an endpoint, or several hostname:port pairs for statefulset e.g
- 'hostname1:port1,hostname2:port2,hostname3:port3',
+ Resolves 'hostname:port' for an endpoint
examples:
- values: |
endpoints:
@@ -47,23 +46,6 @@
{{ tuple "oslo_db" "internal" "mysql" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
return: |
127.0.0.1:3306
- - values: |
- endpoints:
- oslo_cache:
- hosts:
- default: memcached
- host_fqdn_override:
- default: null
- statefulset:
- name: openstack-memcached-memcached
- replicas: 3
- port:
- memcache:
- default: 11211
- usage: |
- {{ tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
- return: |
- openstack-memcached-memcached-0:11211,openstack-memcached-memcached-1:11211,openstack-memcached-memcached-2:11211
*/}}
{{- define "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" -}}
@@ -71,19 +53,7 @@
{{- $endpoint := index . 1 -}}
{{- $port := index . 2 -}}
{{- $context := index . 3 -}}
-{{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false -}}
-{{- $local := dict "endpointHosts" list -}}
-{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" -}}
-{{- if $ssMap -}}
-{{- $endpointHostPrefix := $ssMap.name -}}
-{{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
-{{- range $podInt := until ( atoi (print $ssMap.replicas ) ) -}}
-{{- $endpointHostname := printf "%s-%d.%s:%s" $endpointHostPrefix $podInt $endpointHostSuffix $endpointPort -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts $endpointHostname ) -}}
-{{- end -}}
-{{- else -}}
-{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts (printf "%s:%s" $endpointHostname $endpointPort) ) -}}
-{{- end -}}
-{{ include "helm-toolkit.utils.joinListWithComma" $local.endpointHosts }}
+{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
+{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
+{{- printf "%s:%s" $endpointHostname $endpointPort -}}
{{- end -}}
diff --git a/charts/magnum/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl b/charts/magnum/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
index 24eb569..b2ec648 100644
--- a/charts/magnum/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
+++ b/charts/magnum/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
@@ -40,9 +40,9 @@
{{- $context := index . 3 -}}
{{- $endpointMap := index $context.Values.endpoints ( $type | replace "-" "_" ) }}
{{- if kindIs "string" $endpointMap.path }}
-{{- printf "%s" $endpointMap.path | default "" -}}
+{{- printf "%s" $endpointMap.path | default "/" -}}
{{- else -}}
-{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "" }}
+{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "/" }}
{{- printf "%s" $endpointPath -}}
{{- end -}}
{{- end -}}
diff --git a/charts/magnum/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl b/charts/magnum/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
deleted file mode 100644
index 332ca99..0000000
--- a/charts/magnum/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
+++ /dev/null
@@ -1,51 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Renders out the configmap <service>-oslo-policy.
-values: |
- conf:
- policy.d:
- file1:
- foo: bar
- file2:
- foo: baz
-usage: |
-{{- include "helm-toolkit.manifests.configmap_oslo_policy" (dict "envAll" $envAll "serviceName" "keystone") }}
-return: |
- ---
- apiVersion: v1
- kind: Secret
- metadata:
- name: keystone-oslo-policy
- data:
- file1: base64of(foo: bar)
- file2: base64of(foo: baz)
-*/}}
-{{- define "helm-toolkit.manifests.configmap_oslo_policy" -}}
-{{- $envAll := index . "envAll" -}}
-{{- $serviceName := index . "serviceName" -}}
----
-apiVersion: v1
-kind: Secret
-metadata:
- name: {{ $serviceName }}-oslo-policy
-type: Opaque
-data:
- {{- range $key, $value := index $envAll.Values.conf "policy.d" }}
- {{- if $value }}
- {{ $key }}: {{ toYaml $value | b64enc }}
- {{- else }}
- {{ $key }}: {{ "\n" | b64enc }}
- {{- end }}
- {{- end }}
-{{- end -}}
diff --git a/charts/magnum/charts/helm-toolkit/templates/manifests/_ingress.tpl b/charts/magnum/charts/helm-toolkit/templates/manifests/_ingress.tpl
index 792571c..cacb4b8 100644
--- a/charts/magnum/charts/helm-toolkit/templates/manifests/_ingress.tpl
+++ b/charts/magnum/charts/helm-toolkit/templates/manifests/_ingress.tpl
@@ -708,10 +708,6 @@
{{- range $v := without (index $endpointHost.tls "dnsNames" | default list) $hostNameFull }}
{{- $vHosts = append $vHosts $v }}
{{- end }}
-{{- if hasKey $envAll.Values.endpoints "alias_fqdn" }}
-{{- $alias_host := $envAll.Values.endpoints.alias_fqdn }}
-{{- $vHosts = append $vHosts $alias_host }}
-{{- end }}
{{- $secretName := index $envAll.Values.secrets "tls" ( $backendServiceType | replace "-" "_" ) $backendService $endpoint }}
{{- $_ := required "You need to specify a secret in your values for the endpoint" $secretName }}
tls:
diff --git a/charts/magnum/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/magnum/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
index c6a7521..1e28da9 100644
--- a/charts/magnum/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
+++ b/charts/magnum/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Drop')
@@ -126,7 +125,7 @@
# Delete DB
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP DATABASE IF EXISTS {0}".format(database)))
+ connection.execute("DROP DATABASE IF EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -139,7 +138,7 @@
# Delete DB User
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP USER IF EXISTS {0}".format(user)))
+ connection.execute("DROP USER IF EXISTS {0}".format(user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/magnum/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/magnum/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
index 1917f78..110cd98 100644
--- a/charts/magnum/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
+++ b/charts/magnum/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Init')
@@ -126,7 +125,7 @@
# Create DB
try:
with root_engine.connect() as connection:
- connection.execute(text("CREATE DATABASE IF NOT EXISTS {0}".format(database)))
+ connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -140,10 +139,10 @@
try:
with root_engine.connect() as connection:
connection.execute(
- text("CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
- user, password, mysql_x509)))
+ "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
+ user, password, mysql_x509))
connection.execute(
- text("GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)))
+ "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/magnum/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl b/charts/magnum/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
index e6e9c6e..3739f95 100644
--- a/charts/magnum/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
+++ b/charts/magnum/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
@@ -29,9 +29,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_ADMIN_PASSWORD=$(echo "${RABBITMQ_ADMIN_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User creadential
RABBITMQ_USERNAME=$(echo "${RABBITMQ_USER_CONNECTION}" | \
@@ -39,9 +37,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_PASSWORD=$(echo "${RABBITMQ_USER_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User vHost
RABBITMQ_VHOST=$(echo "${RABBITMQ_USER_CONNECTION}" | \
diff --git a/charts/magnum/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl b/charts/magnum/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
index 5c2dedb..48b53fa 100644
--- a/charts/magnum/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
+++ b/charts/magnum/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
@@ -40,9 +40,6 @@
release_group: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
application: {{ $application }}
component: {{ $component }}
-app.kubernetes.io/name: {{ $application }}
-app.kubernetes.io/component: {{ $component }}
-app.kubernetes.io/instance: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
{{- if ($envAll.Values.pod).labels }}
{{- if hasKey $envAll.Values.pod.labels $component }}
{{ index $envAll.Values.pod "labels" $component | toYaml }}
diff --git a/charts/magnum/charts/helm-toolkit/templates/snippets/_service_params.tpl b/charts/magnum/charts/helm-toolkit/templates/snippets/_service_params.tpl
deleted file mode 100644
index 6233a93..0000000
--- a/charts/magnum/charts/helm-toolkit/templates/snippets/_service_params.tpl
+++ /dev/null
@@ -1,61 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Inserts kubernetes service parameters from values as is.
-values: |
- network:
- serviceExample:
- service:
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-usage: |
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: 'serviceExample'
- spec:
- ports:
- - name: s-example
- port: 1111
- {{ .Values.network.serviceExample | include "helm-toolkit.snippets.service_params" | indent 2 }}
-return: |
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-*/}}
-
-{{- define "helm-toolkit.snippets.service_params" }}
-{{- $serviceParams := dict }}
-{{- if hasKey . "service" }}
-{{- $serviceParams = .service }}
-{{- end }}
-{{- if hasKey . "node_port" }}
-{{- if hasKey .node_port "enabled" }}
-{{- if .node_port.enabled }}
-{{- $_ := set $serviceParams "type" "NodePort" }}
-{{- end }}
-{{- end }}
-{{- end }}
-{{- if hasKey . "external_policy_local" }}
-{{- if .external_policy_local }}
-{{- $_ := set $serviceParams "externalTrafficPolicy" "Local" }}
-{{- end }}
-{{- end }}
-{{- if $serviceParams }}
-{{- $serviceParams | toYaml }}
-{{- end }}
-{{- end }}
diff --git a/charts/magnum/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl b/charts/magnum/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
deleted file mode 100644
index bdb28c3..0000000
--- a/charts/magnum/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
+++ /dev/null
@@ -1,279 +0,0 @@
-{{/*
-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.
-*/}}
-
-{{/*
-
-The helm-toolkit.utils.daemonset_overrides function have some limitations:
-
- * it allows to override only conf values specifid in configmap-etc
- * it doesn't allow to override values for daemonsets passed via env variables
- or via damoenset definition. As result it is impossible to have mixed
- deployment when one compute is configured with dpdk while other not.
- * it is impossible to override interface names/other information stored in
- <service>-bin configmap
- * It allows to schedule on both hosts and labels, which adds some
- uncertainty
-
-This implementation is intended to handle those limitations:
-
- * it allows to schedule only based on labels
- * it creates <service>-bin per daemonset override
- * it allows to override values when rendering daemonsets
-
- It picks data from the following structure:
-
- .Values:
- overrides:
- mychart_mydaemonset:
- labels:
- label::value:
- values:
- override_root_option: override_root_value
- conf:
- ovs_dpdk:
- enabled: true
- neutron:
- DEFAULT:
- foo: bar
-
-*/}}
-
-{{- define "helm-toolkit.utils.daemonset_overrides_root" }}
- {{- $daemonset := index . 0 }}
- {{- $daemonSetTemplateName := index . 1 }}
- {{ $serviceAccountName := index . 2 }}
- {{- $configmap_include := index . 3 }}
- {{- $configmap_name := index . 4 }}
- {{- $configbin_include := index . 5 }}
- {{- $configbin_name := index . 6 }}
- {{- $context := index . 7 }}
-
- {{- $_ := unset $context ".Files" }}
- {{- $daemonset_root_name := printf (print $context.Chart.Name "_" $daemonset) }}
- {{- $_ := set $context.Values "__daemonset_list" list }}
- {{- $_ := set $context.Values "__default" dict }}
-
- {{- $default_enabled := true }}
- {{- if hasKey $context.Values "overrides" }}
- {{- range $key, $val := $context.Values.overrides }}
-
- {{- if eq $key $daemonset_root_name }}
- {{- range $type, $type_data := . }}
- {{- if eq $type "overrides_default" }}
- {{- $default_enabled = $type_data }}
- {{- end }}
-
- {{- if eq $type "labels" }}
- {{- $_ := set $context.Values "__label_dict" . }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
- {{/* dictionary that will contain all info needed to generate this
- iteration of the daemonset. */}}
- {{- $_ := set $context.Values "__current_label" dict }}
-
- {{/* set daemonset name */}}
- {{- $_ := set $context.Values.__current_label "name" $label_name }}
-
- {{/* set daemonset metadata annotation */}}
- {{- $_ := set $context.Values.__current_label "daemonset_override" $lname }}
-
- {{/* apply overrides */}}
-
-
- {{- $override_root_copy := $ldata.values }}
- {{/* Deep copy to prevent https://storyboard.openstack.org/#!/story/2005936 */}}
- {{- $root_copy := omit ($context.Values | toYaml | fromYaml) "overrides" }}
- {{- $merged_dict := mergeOverwrite $root_copy $override_root_copy }}
-
- {{- $root_conf_copy2 := dict "values" $merged_dict }}
- {{- $context_values := omit (omit ($context.Values | toYaml | fromYaml) "values") "__daemonset_list" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2.values }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__current_label "nodeData" $root_conf_copy4 }}
-
-
- {{/* Schedule to the provided label value(s) */}}
- {{- $label_dict := dict "key" $label_name }}
- {{- $_ := set $label_dict "values" (list $label_value) }}
- {{- $_ := set $label_dict "operator" "In" }}
- {{- $list_aggregate := list $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
-
- {{/* Do not schedule to other specified labels, with higher
- precedence as the list position increases. Last defined label
- is highest priority. */}}
- {{- $other_labels := omit $context.Values.__label_dict $lname }}
- {{- range $lname2, $ldata2 := $other_labels }}
- {{ $label_name2 := (split "::" $lname2)._0 }}
- {{ $label_value2 := (split "::" $lname2)._1 }}
-
- {{- $label_dict := dict "key" $label_name2 }}
- {{- $_ := set $label_dict "values" (list $label_value2) }}
- {{- $_ := set $label_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__current_label.matchExpressions $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
- {{- end }}
-
- {{/* store completed daemonset entry/info into global list */}}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__current_label }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- $_ := unset $context.Values "__current_label" }}
-
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* scheduler exceptions for the default daemonset */}}
- {{- $_ := set $context.Values.__default "matchExpressions" list }}
-
- {{- range $type, $type_data := . }}
- {{/* Do not schedule to other specified labels */}}
- {{- if eq $type "labels" }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
-
- {{- $default_dict := dict "key" $label_name }}
- {{- $_ := set $default_dict "values" (list $label_value) }}
- {{- $_ := set $default_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__default.matchExpressions $default_dict }}
- {{- $_ := set $context.Values.__default "matchExpressions" $list_aggregate }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* generate the default daemonset */}}
-
- {{/* set name */}}
- {{- $_ := set $context.Values.__default "name" "default" }}
-
- {{/* no overrides apply, so copy as-is */}}
- {{- $root_conf_copy1 := omit $context.Values.conf "overrides" }}
- {{- $root_conf_copy2 := dict "conf" $root_conf_copy1 }}
- {{- $context_values := omit $context.Values "conf" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2 }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__default "nodeData" $root_conf_copy4 }}
-
- {{/* add to global list */}}
- {{- if $default_enabled }}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__default }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- end }}
-
- {{- range $current_dict := $context.Values.__daemonset_list }}
-
- {{- $context_novalues := omit $context "Values" }}
- {{- $merged_dict := mergeOverwrite $context_novalues $current_dict.nodeData }}
- {{- $_ := set $current_dict "nodeData" $merged_dict }}
- {{/* Deep copy original daemonset_yaml */}}
- {{- $daemonset_yaml := list $daemonset $configmap_name $serviceAccountName $merged_dict | include $daemonSetTemplateName | toString | fromYaml }}
- {{- $_ := set $context.Values "__daemonset_yaml" ($daemonset_yaml | toYaml | fromYaml) }}
-
- {{/* Use the following name format $daemonset_root_name + sha256summ($current_dict.matchExpressions)
- as labels might be too long and contain wrong characters like / */}}
- {{- $_ := set $current_dict "dns_1123_name" dict }}
- {{- $name_format := "" }}
- {{- if eq $current_dict.name "default" }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name "default") | replace "_" "-" }}
- {{- else }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name ($current_dict.matchExpressions | quote | sha256sum | trunc 16)) | replace "_" "-" }}
- {{- end }}
- {{- $_ := set $current_dict "dns_1123_name" $name_format }}
-
- {{/* set daemonset metadata name */}}
- {{- if not $context.Values.__daemonset_yaml.metadata }}{{- $_ := set $context.Values.__daemonset_yaml "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.metadata.name }}{{- $_ := set $context.Values.__daemonset_yaml.metadata "name" dict }}{{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata "name" $current_dict.dns_1123_name }}
-
- {{/* cross-reference configmap name to container volume definitions */}}
- {{- $_ := set $context.Values "__volume_list" list }}
- {{- range $current_volume := $context.Values.__daemonset_yaml.spec.template.spec.volumes }}
- {{- $_ := set $context.Values "__volume" $current_volume }}
- {{- if hasKey $context.Values.__volume "secret" }}
- {{- if eq $context.Values.__volume.secret.secretName $configmap_name }}
- {{- $_ := set $context.Values.__volume.secret "secretName" (printf "%s-etc" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- if hasKey $context.Values.__volume "configMap" }}
- {{- if eq $context.Values.__volume.configMap.name $configbin_name }}
- {{- $_ := set $context.Values.__volume.configMap "name" (printf "%s-bin" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- $updated_list := append $context.Values.__volume_list $context.Values.__volume }}
- {{- $_ := set $context.Values "__volume_list" $updated_list }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "volumes" $context.Values.__volume_list }}
-
-
- {{/* populate scheduling restrictions */}}
- {{- if hasKey $current_dict "matchExpressions" }}
- {{- $length := len $current_dict.matchExpressions }}
- {{- if gt $length 0 }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "affinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity "nodeAffinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity "requiredDuringSchedulingIgnoredDuringExecution" dict }}{{- end }}
-
- {{- $expressions_modified := list }}
- {{- if hasKey $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" }}
- {{- range $orig_expression := $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms }}
- {{- $match_expressions_modified := list }}
- {{- $match_expressions_modified = concat $match_expressions_modified $current_dict.matchExpressions }}
- {{- if hasKey $orig_expression "matchExpressions" }}
- {{- $match_expressions_modified = concat $match_expressions_modified $orig_expression.matchExpressions }}
- {{- $expressions_modified = append $expressions_modified (dict "matchExpressions" $match_expressions_modified) }}
- {{- end }}
- {{- end }}
- {{- else }}
- {{- $expressions_modified = (list (dict "matchExpressions" $current_dict.matchExpressions)) }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" $expressions_modified }}
- {{- end }}
- {{- end }}
-
- {{/* input value hash for current set of values overrides */}}
- {{- if not $context.Values.__daemonset_yaml.spec }}{{- $_ := set $context.Values.__daemonset_yaml "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template }}{{- $_ := set $context.Values.__daemonset_yaml.spec "template" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata.annotations }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata "annotations" dict }}{{- end }}
- {{- $cmap := list (printf "%s-etc" $current_dict.dns_1123_name) $current_dict.nodeData | include $configmap_include }}
- {{- $cmap_bin := list (printf "%s-bin" $current_dict.dns_1123_name) $current_dict.nodeData | include $configbin_include }}
- {{- $values_cmap_hash := $cmap | quote | sha256sum }}
- {{- $values_cmap_bin_hash := $cmap_bin | quote | sha256sum }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-etc-hash" $values_cmap_hash }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-bin-hash" $values_cmap_bin_hash }}
-
- {{/* Do not set override for default daemonset */}}
- {{- if $current_dict.daemonset_override }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata.annotations "daemonset_override" $current_dict.daemonset_override }}
- {{- end }}
-
-{{/* generate configmap */}}
----
-{{ $cmap }}
- {{/* generate <service>-bin yaml */}}
----
-{{ $cmap_bin }}
- {{/* generate daemonset yaml */}}
----
-{{ $context.Values.__daemonset_yaml | toYaml }}
- {{- end }}
-{{- end }}
diff --git a/charts/magnum/requirements.lock b/charts/magnum/requirements.lock
index b94dead..4f63a87 100644
--- a/charts/magnum/requirements.lock
+++ b/charts/magnum/requirements.lock
@@ -1,6 +1,6 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
-digest: sha256:760c5997580ac8d30a64dfe92d6a54052b783ddf90cacbc5a4c95c1330988742
+ version: 0.2.69
+digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef
generated: "0001-01-01T00:00:00Z"
diff --git a/charts/magnum/requirements.yaml b/charts/magnum/requirements.yaml
index 52e723e..b3d5dcf 100644
--- a/charts/magnum/requirements.yaml
+++ b/charts/magnum/requirements.yaml
@@ -1,4 +1,4 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
+ version: 0.2.69
diff --git a/charts/manila/charts/helm-toolkit/Chart.yaml b/charts/manila/charts/helm-toolkit/Chart.yaml
index 9d3aa1e..d4c0ea2 100644
--- a/charts/manila/charts/helm-toolkit/Chart.yaml
+++ b/charts/manila/charts/helm-toolkit/Chart.yaml
@@ -9,4 +9,4 @@
sources:
- https://opendev.org/openstack/openstack-helm-infra
- https://opendev.org/openstack/openstack-helm
-version: 0.2.78
+version: 0.2.69
diff --git a/charts/manila/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl b/charts/manila/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
index 728b994..6877b7b 100644
--- a/charts/manila/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
+++ b/charts/manila/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
@@ -14,8 +14,7 @@
{{/*
abstract: |
- Resolves 'hostname:port' for an endpoint, or several hostname:port pairs for statefulset e.g
- 'hostname1:port1,hostname2:port2,hostname3:port3',
+ Resolves 'hostname:port' for an endpoint
examples:
- values: |
endpoints:
@@ -47,23 +46,6 @@
{{ tuple "oslo_db" "internal" "mysql" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
return: |
127.0.0.1:3306
- - values: |
- endpoints:
- oslo_cache:
- hosts:
- default: memcached
- host_fqdn_override:
- default: null
- statefulset:
- name: openstack-memcached-memcached
- replicas: 3
- port:
- memcache:
- default: 11211
- usage: |
- {{ tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
- return: |
- openstack-memcached-memcached-0:11211,openstack-memcached-memcached-1:11211,openstack-memcached-memcached-2:11211
*/}}
{{- define "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" -}}
@@ -71,19 +53,7 @@
{{- $endpoint := index . 1 -}}
{{- $port := index . 2 -}}
{{- $context := index . 3 -}}
-{{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false -}}
-{{- $local := dict "endpointHosts" list -}}
-{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" -}}
-{{- if $ssMap -}}
-{{- $endpointHostPrefix := $ssMap.name -}}
-{{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
-{{- range $podInt := until ( atoi (print $ssMap.replicas ) ) -}}
-{{- $endpointHostname := printf "%s-%d.%s:%s" $endpointHostPrefix $podInt $endpointHostSuffix $endpointPort -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts $endpointHostname ) -}}
-{{- end -}}
-{{- else -}}
-{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts (printf "%s:%s" $endpointHostname $endpointPort) ) -}}
-{{- end -}}
-{{ include "helm-toolkit.utils.joinListWithComma" $local.endpointHosts }}
+{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
+{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
+{{- printf "%s:%s" $endpointHostname $endpointPort -}}
{{- end -}}
diff --git a/charts/manila/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl b/charts/manila/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
index 24eb569..b2ec648 100644
--- a/charts/manila/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
+++ b/charts/manila/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
@@ -40,9 +40,9 @@
{{- $context := index . 3 -}}
{{- $endpointMap := index $context.Values.endpoints ( $type | replace "-" "_" ) }}
{{- if kindIs "string" $endpointMap.path }}
-{{- printf "%s" $endpointMap.path | default "" -}}
+{{- printf "%s" $endpointMap.path | default "/" -}}
{{- else -}}
-{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "" }}
+{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "/" }}
{{- printf "%s" $endpointPath -}}
{{- end -}}
{{- end -}}
diff --git a/charts/manila/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl b/charts/manila/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
deleted file mode 100644
index 332ca99..0000000
--- a/charts/manila/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
+++ /dev/null
@@ -1,51 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Renders out the configmap <service>-oslo-policy.
-values: |
- conf:
- policy.d:
- file1:
- foo: bar
- file2:
- foo: baz
-usage: |
-{{- include "helm-toolkit.manifests.configmap_oslo_policy" (dict "envAll" $envAll "serviceName" "keystone") }}
-return: |
- ---
- apiVersion: v1
- kind: Secret
- metadata:
- name: keystone-oslo-policy
- data:
- file1: base64of(foo: bar)
- file2: base64of(foo: baz)
-*/}}
-{{- define "helm-toolkit.manifests.configmap_oslo_policy" -}}
-{{- $envAll := index . "envAll" -}}
-{{- $serviceName := index . "serviceName" -}}
----
-apiVersion: v1
-kind: Secret
-metadata:
- name: {{ $serviceName }}-oslo-policy
-type: Opaque
-data:
- {{- range $key, $value := index $envAll.Values.conf "policy.d" }}
- {{- if $value }}
- {{ $key }}: {{ toYaml $value | b64enc }}
- {{- else }}
- {{ $key }}: {{ "\n" | b64enc }}
- {{- end }}
- {{- end }}
-{{- end -}}
diff --git a/charts/manila/charts/helm-toolkit/templates/manifests/_ingress.tpl b/charts/manila/charts/helm-toolkit/templates/manifests/_ingress.tpl
index 792571c..cacb4b8 100644
--- a/charts/manila/charts/helm-toolkit/templates/manifests/_ingress.tpl
+++ b/charts/manila/charts/helm-toolkit/templates/manifests/_ingress.tpl
@@ -708,10 +708,6 @@
{{- range $v := without (index $endpointHost.tls "dnsNames" | default list) $hostNameFull }}
{{- $vHosts = append $vHosts $v }}
{{- end }}
-{{- if hasKey $envAll.Values.endpoints "alias_fqdn" }}
-{{- $alias_host := $envAll.Values.endpoints.alias_fqdn }}
-{{- $vHosts = append $vHosts $alias_host }}
-{{- end }}
{{- $secretName := index $envAll.Values.secrets "tls" ( $backendServiceType | replace "-" "_" ) $backendService $endpoint }}
{{- $_ := required "You need to specify a secret in your values for the endpoint" $secretName }}
tls:
diff --git a/charts/manila/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/manila/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
index c6a7521..1e28da9 100644
--- a/charts/manila/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
+++ b/charts/manila/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Drop')
@@ -126,7 +125,7 @@
# Delete DB
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP DATABASE IF EXISTS {0}".format(database)))
+ connection.execute("DROP DATABASE IF EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -139,7 +138,7 @@
# Delete DB User
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP USER IF EXISTS {0}".format(user)))
+ connection.execute("DROP USER IF EXISTS {0}".format(user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/manila/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/manila/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
index 1917f78..110cd98 100644
--- a/charts/manila/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
+++ b/charts/manila/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Init')
@@ -126,7 +125,7 @@
# Create DB
try:
with root_engine.connect() as connection:
- connection.execute(text("CREATE DATABASE IF NOT EXISTS {0}".format(database)))
+ connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -140,10 +139,10 @@
try:
with root_engine.connect() as connection:
connection.execute(
- text("CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
- user, password, mysql_x509)))
+ "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
+ user, password, mysql_x509))
connection.execute(
- text("GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)))
+ "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/manila/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl b/charts/manila/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
index e6e9c6e..3739f95 100644
--- a/charts/manila/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
+++ b/charts/manila/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
@@ -29,9 +29,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_ADMIN_PASSWORD=$(echo "${RABBITMQ_ADMIN_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User creadential
RABBITMQ_USERNAME=$(echo "${RABBITMQ_USER_CONNECTION}" | \
@@ -39,9 +37,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_PASSWORD=$(echo "${RABBITMQ_USER_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User vHost
RABBITMQ_VHOST=$(echo "${RABBITMQ_USER_CONNECTION}" | \
diff --git a/charts/manila/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl b/charts/manila/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
index 5c2dedb..48b53fa 100644
--- a/charts/manila/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
+++ b/charts/manila/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
@@ -40,9 +40,6 @@
release_group: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
application: {{ $application }}
component: {{ $component }}
-app.kubernetes.io/name: {{ $application }}
-app.kubernetes.io/component: {{ $component }}
-app.kubernetes.io/instance: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
{{- if ($envAll.Values.pod).labels }}
{{- if hasKey $envAll.Values.pod.labels $component }}
{{ index $envAll.Values.pod "labels" $component | toYaml }}
diff --git a/charts/manila/charts/helm-toolkit/templates/snippets/_service_params.tpl b/charts/manila/charts/helm-toolkit/templates/snippets/_service_params.tpl
deleted file mode 100644
index 6233a93..0000000
--- a/charts/manila/charts/helm-toolkit/templates/snippets/_service_params.tpl
+++ /dev/null
@@ -1,61 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Inserts kubernetes service parameters from values as is.
-values: |
- network:
- serviceExample:
- service:
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-usage: |
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: 'serviceExample'
- spec:
- ports:
- - name: s-example
- port: 1111
- {{ .Values.network.serviceExample | include "helm-toolkit.snippets.service_params" | indent 2 }}
-return: |
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-*/}}
-
-{{- define "helm-toolkit.snippets.service_params" }}
-{{- $serviceParams := dict }}
-{{- if hasKey . "service" }}
-{{- $serviceParams = .service }}
-{{- end }}
-{{- if hasKey . "node_port" }}
-{{- if hasKey .node_port "enabled" }}
-{{- if .node_port.enabled }}
-{{- $_ := set $serviceParams "type" "NodePort" }}
-{{- end }}
-{{- end }}
-{{- end }}
-{{- if hasKey . "external_policy_local" }}
-{{- if .external_policy_local }}
-{{- $_ := set $serviceParams "externalTrafficPolicy" "Local" }}
-{{- end }}
-{{- end }}
-{{- if $serviceParams }}
-{{- $serviceParams | toYaml }}
-{{- end }}
-{{- end }}
diff --git a/charts/manila/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl b/charts/manila/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
deleted file mode 100644
index bdb28c3..0000000
--- a/charts/manila/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
+++ /dev/null
@@ -1,279 +0,0 @@
-{{/*
-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.
-*/}}
-
-{{/*
-
-The helm-toolkit.utils.daemonset_overrides function have some limitations:
-
- * it allows to override only conf values specifid in configmap-etc
- * it doesn't allow to override values for daemonsets passed via env variables
- or via damoenset definition. As result it is impossible to have mixed
- deployment when one compute is configured with dpdk while other not.
- * it is impossible to override interface names/other information stored in
- <service>-bin configmap
- * It allows to schedule on both hosts and labels, which adds some
- uncertainty
-
-This implementation is intended to handle those limitations:
-
- * it allows to schedule only based on labels
- * it creates <service>-bin per daemonset override
- * it allows to override values when rendering daemonsets
-
- It picks data from the following structure:
-
- .Values:
- overrides:
- mychart_mydaemonset:
- labels:
- label::value:
- values:
- override_root_option: override_root_value
- conf:
- ovs_dpdk:
- enabled: true
- neutron:
- DEFAULT:
- foo: bar
-
-*/}}
-
-{{- define "helm-toolkit.utils.daemonset_overrides_root" }}
- {{- $daemonset := index . 0 }}
- {{- $daemonSetTemplateName := index . 1 }}
- {{ $serviceAccountName := index . 2 }}
- {{- $configmap_include := index . 3 }}
- {{- $configmap_name := index . 4 }}
- {{- $configbin_include := index . 5 }}
- {{- $configbin_name := index . 6 }}
- {{- $context := index . 7 }}
-
- {{- $_ := unset $context ".Files" }}
- {{- $daemonset_root_name := printf (print $context.Chart.Name "_" $daemonset) }}
- {{- $_ := set $context.Values "__daemonset_list" list }}
- {{- $_ := set $context.Values "__default" dict }}
-
- {{- $default_enabled := true }}
- {{- if hasKey $context.Values "overrides" }}
- {{- range $key, $val := $context.Values.overrides }}
-
- {{- if eq $key $daemonset_root_name }}
- {{- range $type, $type_data := . }}
- {{- if eq $type "overrides_default" }}
- {{- $default_enabled = $type_data }}
- {{- end }}
-
- {{- if eq $type "labels" }}
- {{- $_ := set $context.Values "__label_dict" . }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
- {{/* dictionary that will contain all info needed to generate this
- iteration of the daemonset. */}}
- {{- $_ := set $context.Values "__current_label" dict }}
-
- {{/* set daemonset name */}}
- {{- $_ := set $context.Values.__current_label "name" $label_name }}
-
- {{/* set daemonset metadata annotation */}}
- {{- $_ := set $context.Values.__current_label "daemonset_override" $lname }}
-
- {{/* apply overrides */}}
-
-
- {{- $override_root_copy := $ldata.values }}
- {{/* Deep copy to prevent https://storyboard.openstack.org/#!/story/2005936 */}}
- {{- $root_copy := omit ($context.Values | toYaml | fromYaml) "overrides" }}
- {{- $merged_dict := mergeOverwrite $root_copy $override_root_copy }}
-
- {{- $root_conf_copy2 := dict "values" $merged_dict }}
- {{- $context_values := omit (omit ($context.Values | toYaml | fromYaml) "values") "__daemonset_list" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2.values }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__current_label "nodeData" $root_conf_copy4 }}
-
-
- {{/* Schedule to the provided label value(s) */}}
- {{- $label_dict := dict "key" $label_name }}
- {{- $_ := set $label_dict "values" (list $label_value) }}
- {{- $_ := set $label_dict "operator" "In" }}
- {{- $list_aggregate := list $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
-
- {{/* Do not schedule to other specified labels, with higher
- precedence as the list position increases. Last defined label
- is highest priority. */}}
- {{- $other_labels := omit $context.Values.__label_dict $lname }}
- {{- range $lname2, $ldata2 := $other_labels }}
- {{ $label_name2 := (split "::" $lname2)._0 }}
- {{ $label_value2 := (split "::" $lname2)._1 }}
-
- {{- $label_dict := dict "key" $label_name2 }}
- {{- $_ := set $label_dict "values" (list $label_value2) }}
- {{- $_ := set $label_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__current_label.matchExpressions $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
- {{- end }}
-
- {{/* store completed daemonset entry/info into global list */}}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__current_label }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- $_ := unset $context.Values "__current_label" }}
-
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* scheduler exceptions for the default daemonset */}}
- {{- $_ := set $context.Values.__default "matchExpressions" list }}
-
- {{- range $type, $type_data := . }}
- {{/* Do not schedule to other specified labels */}}
- {{- if eq $type "labels" }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
-
- {{- $default_dict := dict "key" $label_name }}
- {{- $_ := set $default_dict "values" (list $label_value) }}
- {{- $_ := set $default_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__default.matchExpressions $default_dict }}
- {{- $_ := set $context.Values.__default "matchExpressions" $list_aggregate }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* generate the default daemonset */}}
-
- {{/* set name */}}
- {{- $_ := set $context.Values.__default "name" "default" }}
-
- {{/* no overrides apply, so copy as-is */}}
- {{- $root_conf_copy1 := omit $context.Values.conf "overrides" }}
- {{- $root_conf_copy2 := dict "conf" $root_conf_copy1 }}
- {{- $context_values := omit $context.Values "conf" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2 }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__default "nodeData" $root_conf_copy4 }}
-
- {{/* add to global list */}}
- {{- if $default_enabled }}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__default }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- end }}
-
- {{- range $current_dict := $context.Values.__daemonset_list }}
-
- {{- $context_novalues := omit $context "Values" }}
- {{- $merged_dict := mergeOverwrite $context_novalues $current_dict.nodeData }}
- {{- $_ := set $current_dict "nodeData" $merged_dict }}
- {{/* Deep copy original daemonset_yaml */}}
- {{- $daemonset_yaml := list $daemonset $configmap_name $serviceAccountName $merged_dict | include $daemonSetTemplateName | toString | fromYaml }}
- {{- $_ := set $context.Values "__daemonset_yaml" ($daemonset_yaml | toYaml | fromYaml) }}
-
- {{/* Use the following name format $daemonset_root_name + sha256summ($current_dict.matchExpressions)
- as labels might be too long and contain wrong characters like / */}}
- {{- $_ := set $current_dict "dns_1123_name" dict }}
- {{- $name_format := "" }}
- {{- if eq $current_dict.name "default" }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name "default") | replace "_" "-" }}
- {{- else }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name ($current_dict.matchExpressions | quote | sha256sum | trunc 16)) | replace "_" "-" }}
- {{- end }}
- {{- $_ := set $current_dict "dns_1123_name" $name_format }}
-
- {{/* set daemonset metadata name */}}
- {{- if not $context.Values.__daemonset_yaml.metadata }}{{- $_ := set $context.Values.__daemonset_yaml "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.metadata.name }}{{- $_ := set $context.Values.__daemonset_yaml.metadata "name" dict }}{{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata "name" $current_dict.dns_1123_name }}
-
- {{/* cross-reference configmap name to container volume definitions */}}
- {{- $_ := set $context.Values "__volume_list" list }}
- {{- range $current_volume := $context.Values.__daemonset_yaml.spec.template.spec.volumes }}
- {{- $_ := set $context.Values "__volume" $current_volume }}
- {{- if hasKey $context.Values.__volume "secret" }}
- {{- if eq $context.Values.__volume.secret.secretName $configmap_name }}
- {{- $_ := set $context.Values.__volume.secret "secretName" (printf "%s-etc" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- if hasKey $context.Values.__volume "configMap" }}
- {{- if eq $context.Values.__volume.configMap.name $configbin_name }}
- {{- $_ := set $context.Values.__volume.configMap "name" (printf "%s-bin" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- $updated_list := append $context.Values.__volume_list $context.Values.__volume }}
- {{- $_ := set $context.Values "__volume_list" $updated_list }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "volumes" $context.Values.__volume_list }}
-
-
- {{/* populate scheduling restrictions */}}
- {{- if hasKey $current_dict "matchExpressions" }}
- {{- $length := len $current_dict.matchExpressions }}
- {{- if gt $length 0 }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "affinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity "nodeAffinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity "requiredDuringSchedulingIgnoredDuringExecution" dict }}{{- end }}
-
- {{- $expressions_modified := list }}
- {{- if hasKey $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" }}
- {{- range $orig_expression := $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms }}
- {{- $match_expressions_modified := list }}
- {{- $match_expressions_modified = concat $match_expressions_modified $current_dict.matchExpressions }}
- {{- if hasKey $orig_expression "matchExpressions" }}
- {{- $match_expressions_modified = concat $match_expressions_modified $orig_expression.matchExpressions }}
- {{- $expressions_modified = append $expressions_modified (dict "matchExpressions" $match_expressions_modified) }}
- {{- end }}
- {{- end }}
- {{- else }}
- {{- $expressions_modified = (list (dict "matchExpressions" $current_dict.matchExpressions)) }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" $expressions_modified }}
- {{- end }}
- {{- end }}
-
- {{/* input value hash for current set of values overrides */}}
- {{- if not $context.Values.__daemonset_yaml.spec }}{{- $_ := set $context.Values.__daemonset_yaml "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template }}{{- $_ := set $context.Values.__daemonset_yaml.spec "template" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata.annotations }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata "annotations" dict }}{{- end }}
- {{- $cmap := list (printf "%s-etc" $current_dict.dns_1123_name) $current_dict.nodeData | include $configmap_include }}
- {{- $cmap_bin := list (printf "%s-bin" $current_dict.dns_1123_name) $current_dict.nodeData | include $configbin_include }}
- {{- $values_cmap_hash := $cmap | quote | sha256sum }}
- {{- $values_cmap_bin_hash := $cmap_bin | quote | sha256sum }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-etc-hash" $values_cmap_hash }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-bin-hash" $values_cmap_bin_hash }}
-
- {{/* Do not set override for default daemonset */}}
- {{- if $current_dict.daemonset_override }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata.annotations "daemonset_override" $current_dict.daemonset_override }}
- {{- end }}
-
-{{/* generate configmap */}}
----
-{{ $cmap }}
- {{/* generate <service>-bin yaml */}}
----
-{{ $cmap_bin }}
- {{/* generate daemonset yaml */}}
----
-{{ $context.Values.__daemonset_yaml | toYaml }}
- {{- end }}
-{{- end }}
diff --git a/charts/manila/requirements.lock b/charts/manila/requirements.lock
index b94dead..4f63a87 100644
--- a/charts/manila/requirements.lock
+++ b/charts/manila/requirements.lock
@@ -1,6 +1,6 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
-digest: sha256:760c5997580ac8d30a64dfe92d6a54052b783ddf90cacbc5a4c95c1330988742
+ version: 0.2.69
+digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef
generated: "0001-01-01T00:00:00Z"
diff --git a/charts/manila/requirements.yaml b/charts/manila/requirements.yaml
index 52e723e..b3d5dcf 100644
--- a/charts/manila/requirements.yaml
+++ b/charts/manila/requirements.yaml
@@ -1,4 +1,4 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
+ version: 0.2.69
diff --git a/charts/memcached/charts/helm-toolkit/Chart.yaml b/charts/memcached/charts/helm-toolkit/Chart.yaml
index 9d3aa1e..d4c0ea2 100644
--- a/charts/memcached/charts/helm-toolkit/Chart.yaml
+++ b/charts/memcached/charts/helm-toolkit/Chart.yaml
@@ -9,4 +9,4 @@
sources:
- https://opendev.org/openstack/openstack-helm-infra
- https://opendev.org/openstack/openstack-helm
-version: 0.2.78
+version: 0.2.69
diff --git a/charts/memcached/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl b/charts/memcached/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
index 728b994..6877b7b 100644
--- a/charts/memcached/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
+++ b/charts/memcached/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
@@ -14,8 +14,7 @@
{{/*
abstract: |
- Resolves 'hostname:port' for an endpoint, or several hostname:port pairs for statefulset e.g
- 'hostname1:port1,hostname2:port2,hostname3:port3',
+ Resolves 'hostname:port' for an endpoint
examples:
- values: |
endpoints:
@@ -47,23 +46,6 @@
{{ tuple "oslo_db" "internal" "mysql" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
return: |
127.0.0.1:3306
- - values: |
- endpoints:
- oslo_cache:
- hosts:
- default: memcached
- host_fqdn_override:
- default: null
- statefulset:
- name: openstack-memcached-memcached
- replicas: 3
- port:
- memcache:
- default: 11211
- usage: |
- {{ tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
- return: |
- openstack-memcached-memcached-0:11211,openstack-memcached-memcached-1:11211,openstack-memcached-memcached-2:11211
*/}}
{{- define "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" -}}
@@ -71,19 +53,7 @@
{{- $endpoint := index . 1 -}}
{{- $port := index . 2 -}}
{{- $context := index . 3 -}}
-{{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false -}}
-{{- $local := dict "endpointHosts" list -}}
-{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" -}}
-{{- if $ssMap -}}
-{{- $endpointHostPrefix := $ssMap.name -}}
-{{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
-{{- range $podInt := until ( atoi (print $ssMap.replicas ) ) -}}
-{{- $endpointHostname := printf "%s-%d.%s:%s" $endpointHostPrefix $podInt $endpointHostSuffix $endpointPort -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts $endpointHostname ) -}}
-{{- end -}}
-{{- else -}}
-{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts (printf "%s:%s" $endpointHostname $endpointPort) ) -}}
-{{- end -}}
-{{ include "helm-toolkit.utils.joinListWithComma" $local.endpointHosts }}
+{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
+{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
+{{- printf "%s:%s" $endpointHostname $endpointPort -}}
{{- end -}}
diff --git a/charts/memcached/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl b/charts/memcached/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
index 24eb569..b2ec648 100644
--- a/charts/memcached/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
+++ b/charts/memcached/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
@@ -40,9 +40,9 @@
{{- $context := index . 3 -}}
{{- $endpointMap := index $context.Values.endpoints ( $type | replace "-" "_" ) }}
{{- if kindIs "string" $endpointMap.path }}
-{{- printf "%s" $endpointMap.path | default "" -}}
+{{- printf "%s" $endpointMap.path | default "/" -}}
{{- else -}}
-{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "" }}
+{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "/" }}
{{- printf "%s" $endpointPath -}}
{{- end -}}
{{- end -}}
diff --git a/charts/memcached/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl b/charts/memcached/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
deleted file mode 100644
index 332ca99..0000000
--- a/charts/memcached/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
+++ /dev/null
@@ -1,51 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Renders out the configmap <service>-oslo-policy.
-values: |
- conf:
- policy.d:
- file1:
- foo: bar
- file2:
- foo: baz
-usage: |
-{{- include "helm-toolkit.manifests.configmap_oslo_policy" (dict "envAll" $envAll "serviceName" "keystone") }}
-return: |
- ---
- apiVersion: v1
- kind: Secret
- metadata:
- name: keystone-oslo-policy
- data:
- file1: base64of(foo: bar)
- file2: base64of(foo: baz)
-*/}}
-{{- define "helm-toolkit.manifests.configmap_oslo_policy" -}}
-{{- $envAll := index . "envAll" -}}
-{{- $serviceName := index . "serviceName" -}}
----
-apiVersion: v1
-kind: Secret
-metadata:
- name: {{ $serviceName }}-oslo-policy
-type: Opaque
-data:
- {{- range $key, $value := index $envAll.Values.conf "policy.d" }}
- {{- if $value }}
- {{ $key }}: {{ toYaml $value | b64enc }}
- {{- else }}
- {{ $key }}: {{ "\n" | b64enc }}
- {{- end }}
- {{- end }}
-{{- end -}}
diff --git a/charts/memcached/charts/helm-toolkit/templates/manifests/_ingress.tpl b/charts/memcached/charts/helm-toolkit/templates/manifests/_ingress.tpl
index 792571c..cacb4b8 100644
--- a/charts/memcached/charts/helm-toolkit/templates/manifests/_ingress.tpl
+++ b/charts/memcached/charts/helm-toolkit/templates/manifests/_ingress.tpl
@@ -708,10 +708,6 @@
{{- range $v := without (index $endpointHost.tls "dnsNames" | default list) $hostNameFull }}
{{- $vHosts = append $vHosts $v }}
{{- end }}
-{{- if hasKey $envAll.Values.endpoints "alias_fqdn" }}
-{{- $alias_host := $envAll.Values.endpoints.alias_fqdn }}
-{{- $vHosts = append $vHosts $alias_host }}
-{{- end }}
{{- $secretName := index $envAll.Values.secrets "tls" ( $backendServiceType | replace "-" "_" ) $backendService $endpoint }}
{{- $_ := required "You need to specify a secret in your values for the endpoint" $secretName }}
tls:
diff --git a/charts/memcached/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/memcached/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
index c6a7521..1e28da9 100644
--- a/charts/memcached/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
+++ b/charts/memcached/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Drop')
@@ -126,7 +125,7 @@
# Delete DB
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP DATABASE IF EXISTS {0}".format(database)))
+ connection.execute("DROP DATABASE IF EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -139,7 +138,7 @@
# Delete DB User
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP USER IF EXISTS {0}".format(user)))
+ connection.execute("DROP USER IF EXISTS {0}".format(user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/memcached/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/memcached/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
index 1917f78..110cd98 100644
--- a/charts/memcached/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
+++ b/charts/memcached/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Init')
@@ -126,7 +125,7 @@
# Create DB
try:
with root_engine.connect() as connection:
- connection.execute(text("CREATE DATABASE IF NOT EXISTS {0}".format(database)))
+ connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -140,10 +139,10 @@
try:
with root_engine.connect() as connection:
connection.execute(
- text("CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
- user, password, mysql_x509)))
+ "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
+ user, password, mysql_x509))
connection.execute(
- text("GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)))
+ "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/memcached/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl b/charts/memcached/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
index e6e9c6e..3739f95 100644
--- a/charts/memcached/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
+++ b/charts/memcached/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
@@ -29,9 +29,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_ADMIN_PASSWORD=$(echo "${RABBITMQ_ADMIN_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User creadential
RABBITMQ_USERNAME=$(echo "${RABBITMQ_USER_CONNECTION}" | \
@@ -39,9 +37,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_PASSWORD=$(echo "${RABBITMQ_USER_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User vHost
RABBITMQ_VHOST=$(echo "${RABBITMQ_USER_CONNECTION}" | \
diff --git a/charts/memcached/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl b/charts/memcached/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
index 5c2dedb..48b53fa 100644
--- a/charts/memcached/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
+++ b/charts/memcached/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
@@ -40,9 +40,6 @@
release_group: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
application: {{ $application }}
component: {{ $component }}
-app.kubernetes.io/name: {{ $application }}
-app.kubernetes.io/component: {{ $component }}
-app.kubernetes.io/instance: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
{{- if ($envAll.Values.pod).labels }}
{{- if hasKey $envAll.Values.pod.labels $component }}
{{ index $envAll.Values.pod "labels" $component | toYaml }}
diff --git a/charts/memcached/charts/helm-toolkit/templates/snippets/_service_params.tpl b/charts/memcached/charts/helm-toolkit/templates/snippets/_service_params.tpl
deleted file mode 100644
index 6233a93..0000000
--- a/charts/memcached/charts/helm-toolkit/templates/snippets/_service_params.tpl
+++ /dev/null
@@ -1,61 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Inserts kubernetes service parameters from values as is.
-values: |
- network:
- serviceExample:
- service:
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-usage: |
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: 'serviceExample'
- spec:
- ports:
- - name: s-example
- port: 1111
- {{ .Values.network.serviceExample | include "helm-toolkit.snippets.service_params" | indent 2 }}
-return: |
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-*/}}
-
-{{- define "helm-toolkit.snippets.service_params" }}
-{{- $serviceParams := dict }}
-{{- if hasKey . "service" }}
-{{- $serviceParams = .service }}
-{{- end }}
-{{- if hasKey . "node_port" }}
-{{- if hasKey .node_port "enabled" }}
-{{- if .node_port.enabled }}
-{{- $_ := set $serviceParams "type" "NodePort" }}
-{{- end }}
-{{- end }}
-{{- end }}
-{{- if hasKey . "external_policy_local" }}
-{{- if .external_policy_local }}
-{{- $_ := set $serviceParams "externalTrafficPolicy" "Local" }}
-{{- end }}
-{{- end }}
-{{- if $serviceParams }}
-{{- $serviceParams | toYaml }}
-{{- end }}
-{{- end }}
diff --git a/charts/memcached/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl b/charts/memcached/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
deleted file mode 100644
index bdb28c3..0000000
--- a/charts/memcached/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
+++ /dev/null
@@ -1,279 +0,0 @@
-{{/*
-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.
-*/}}
-
-{{/*
-
-The helm-toolkit.utils.daemonset_overrides function have some limitations:
-
- * it allows to override only conf values specifid in configmap-etc
- * it doesn't allow to override values for daemonsets passed via env variables
- or via damoenset definition. As result it is impossible to have mixed
- deployment when one compute is configured with dpdk while other not.
- * it is impossible to override interface names/other information stored in
- <service>-bin configmap
- * It allows to schedule on both hosts and labels, which adds some
- uncertainty
-
-This implementation is intended to handle those limitations:
-
- * it allows to schedule only based on labels
- * it creates <service>-bin per daemonset override
- * it allows to override values when rendering daemonsets
-
- It picks data from the following structure:
-
- .Values:
- overrides:
- mychart_mydaemonset:
- labels:
- label::value:
- values:
- override_root_option: override_root_value
- conf:
- ovs_dpdk:
- enabled: true
- neutron:
- DEFAULT:
- foo: bar
-
-*/}}
-
-{{- define "helm-toolkit.utils.daemonset_overrides_root" }}
- {{- $daemonset := index . 0 }}
- {{- $daemonSetTemplateName := index . 1 }}
- {{ $serviceAccountName := index . 2 }}
- {{- $configmap_include := index . 3 }}
- {{- $configmap_name := index . 4 }}
- {{- $configbin_include := index . 5 }}
- {{- $configbin_name := index . 6 }}
- {{- $context := index . 7 }}
-
- {{- $_ := unset $context ".Files" }}
- {{- $daemonset_root_name := printf (print $context.Chart.Name "_" $daemonset) }}
- {{- $_ := set $context.Values "__daemonset_list" list }}
- {{- $_ := set $context.Values "__default" dict }}
-
- {{- $default_enabled := true }}
- {{- if hasKey $context.Values "overrides" }}
- {{- range $key, $val := $context.Values.overrides }}
-
- {{- if eq $key $daemonset_root_name }}
- {{- range $type, $type_data := . }}
- {{- if eq $type "overrides_default" }}
- {{- $default_enabled = $type_data }}
- {{- end }}
-
- {{- if eq $type "labels" }}
- {{- $_ := set $context.Values "__label_dict" . }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
- {{/* dictionary that will contain all info needed to generate this
- iteration of the daemonset. */}}
- {{- $_ := set $context.Values "__current_label" dict }}
-
- {{/* set daemonset name */}}
- {{- $_ := set $context.Values.__current_label "name" $label_name }}
-
- {{/* set daemonset metadata annotation */}}
- {{- $_ := set $context.Values.__current_label "daemonset_override" $lname }}
-
- {{/* apply overrides */}}
-
-
- {{- $override_root_copy := $ldata.values }}
- {{/* Deep copy to prevent https://storyboard.openstack.org/#!/story/2005936 */}}
- {{- $root_copy := omit ($context.Values | toYaml | fromYaml) "overrides" }}
- {{- $merged_dict := mergeOverwrite $root_copy $override_root_copy }}
-
- {{- $root_conf_copy2 := dict "values" $merged_dict }}
- {{- $context_values := omit (omit ($context.Values | toYaml | fromYaml) "values") "__daemonset_list" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2.values }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__current_label "nodeData" $root_conf_copy4 }}
-
-
- {{/* Schedule to the provided label value(s) */}}
- {{- $label_dict := dict "key" $label_name }}
- {{- $_ := set $label_dict "values" (list $label_value) }}
- {{- $_ := set $label_dict "operator" "In" }}
- {{- $list_aggregate := list $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
-
- {{/* Do not schedule to other specified labels, with higher
- precedence as the list position increases. Last defined label
- is highest priority. */}}
- {{- $other_labels := omit $context.Values.__label_dict $lname }}
- {{- range $lname2, $ldata2 := $other_labels }}
- {{ $label_name2 := (split "::" $lname2)._0 }}
- {{ $label_value2 := (split "::" $lname2)._1 }}
-
- {{- $label_dict := dict "key" $label_name2 }}
- {{- $_ := set $label_dict "values" (list $label_value2) }}
- {{- $_ := set $label_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__current_label.matchExpressions $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
- {{- end }}
-
- {{/* store completed daemonset entry/info into global list */}}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__current_label }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- $_ := unset $context.Values "__current_label" }}
-
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* scheduler exceptions for the default daemonset */}}
- {{- $_ := set $context.Values.__default "matchExpressions" list }}
-
- {{- range $type, $type_data := . }}
- {{/* Do not schedule to other specified labels */}}
- {{- if eq $type "labels" }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
-
- {{- $default_dict := dict "key" $label_name }}
- {{- $_ := set $default_dict "values" (list $label_value) }}
- {{- $_ := set $default_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__default.matchExpressions $default_dict }}
- {{- $_ := set $context.Values.__default "matchExpressions" $list_aggregate }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* generate the default daemonset */}}
-
- {{/* set name */}}
- {{- $_ := set $context.Values.__default "name" "default" }}
-
- {{/* no overrides apply, so copy as-is */}}
- {{- $root_conf_copy1 := omit $context.Values.conf "overrides" }}
- {{- $root_conf_copy2 := dict "conf" $root_conf_copy1 }}
- {{- $context_values := omit $context.Values "conf" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2 }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__default "nodeData" $root_conf_copy4 }}
-
- {{/* add to global list */}}
- {{- if $default_enabled }}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__default }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- end }}
-
- {{- range $current_dict := $context.Values.__daemonset_list }}
-
- {{- $context_novalues := omit $context "Values" }}
- {{- $merged_dict := mergeOverwrite $context_novalues $current_dict.nodeData }}
- {{- $_ := set $current_dict "nodeData" $merged_dict }}
- {{/* Deep copy original daemonset_yaml */}}
- {{- $daemonset_yaml := list $daemonset $configmap_name $serviceAccountName $merged_dict | include $daemonSetTemplateName | toString | fromYaml }}
- {{- $_ := set $context.Values "__daemonset_yaml" ($daemonset_yaml | toYaml | fromYaml) }}
-
- {{/* Use the following name format $daemonset_root_name + sha256summ($current_dict.matchExpressions)
- as labels might be too long and contain wrong characters like / */}}
- {{- $_ := set $current_dict "dns_1123_name" dict }}
- {{- $name_format := "" }}
- {{- if eq $current_dict.name "default" }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name "default") | replace "_" "-" }}
- {{- else }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name ($current_dict.matchExpressions | quote | sha256sum | trunc 16)) | replace "_" "-" }}
- {{- end }}
- {{- $_ := set $current_dict "dns_1123_name" $name_format }}
-
- {{/* set daemonset metadata name */}}
- {{- if not $context.Values.__daemonset_yaml.metadata }}{{- $_ := set $context.Values.__daemonset_yaml "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.metadata.name }}{{- $_ := set $context.Values.__daemonset_yaml.metadata "name" dict }}{{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata "name" $current_dict.dns_1123_name }}
-
- {{/* cross-reference configmap name to container volume definitions */}}
- {{- $_ := set $context.Values "__volume_list" list }}
- {{- range $current_volume := $context.Values.__daemonset_yaml.spec.template.spec.volumes }}
- {{- $_ := set $context.Values "__volume" $current_volume }}
- {{- if hasKey $context.Values.__volume "secret" }}
- {{- if eq $context.Values.__volume.secret.secretName $configmap_name }}
- {{- $_ := set $context.Values.__volume.secret "secretName" (printf "%s-etc" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- if hasKey $context.Values.__volume "configMap" }}
- {{- if eq $context.Values.__volume.configMap.name $configbin_name }}
- {{- $_ := set $context.Values.__volume.configMap "name" (printf "%s-bin" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- $updated_list := append $context.Values.__volume_list $context.Values.__volume }}
- {{- $_ := set $context.Values "__volume_list" $updated_list }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "volumes" $context.Values.__volume_list }}
-
-
- {{/* populate scheduling restrictions */}}
- {{- if hasKey $current_dict "matchExpressions" }}
- {{- $length := len $current_dict.matchExpressions }}
- {{- if gt $length 0 }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "affinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity "nodeAffinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity "requiredDuringSchedulingIgnoredDuringExecution" dict }}{{- end }}
-
- {{- $expressions_modified := list }}
- {{- if hasKey $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" }}
- {{- range $orig_expression := $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms }}
- {{- $match_expressions_modified := list }}
- {{- $match_expressions_modified = concat $match_expressions_modified $current_dict.matchExpressions }}
- {{- if hasKey $orig_expression "matchExpressions" }}
- {{- $match_expressions_modified = concat $match_expressions_modified $orig_expression.matchExpressions }}
- {{- $expressions_modified = append $expressions_modified (dict "matchExpressions" $match_expressions_modified) }}
- {{- end }}
- {{- end }}
- {{- else }}
- {{- $expressions_modified = (list (dict "matchExpressions" $current_dict.matchExpressions)) }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" $expressions_modified }}
- {{- end }}
- {{- end }}
-
- {{/* input value hash for current set of values overrides */}}
- {{- if not $context.Values.__daemonset_yaml.spec }}{{- $_ := set $context.Values.__daemonset_yaml "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template }}{{- $_ := set $context.Values.__daemonset_yaml.spec "template" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata.annotations }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata "annotations" dict }}{{- end }}
- {{- $cmap := list (printf "%s-etc" $current_dict.dns_1123_name) $current_dict.nodeData | include $configmap_include }}
- {{- $cmap_bin := list (printf "%s-bin" $current_dict.dns_1123_name) $current_dict.nodeData | include $configbin_include }}
- {{- $values_cmap_hash := $cmap | quote | sha256sum }}
- {{- $values_cmap_bin_hash := $cmap_bin | quote | sha256sum }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-etc-hash" $values_cmap_hash }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-bin-hash" $values_cmap_bin_hash }}
-
- {{/* Do not set override for default daemonset */}}
- {{- if $current_dict.daemonset_override }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata.annotations "daemonset_override" $current_dict.daemonset_override }}
- {{- end }}
-
-{{/* generate configmap */}}
----
-{{ $cmap }}
- {{/* generate <service>-bin yaml */}}
----
-{{ $cmap_bin }}
- {{/* generate daemonset yaml */}}
----
-{{ $context.Values.__daemonset_yaml | toYaml }}
- {{- end }}
-{{- end }}
diff --git a/charts/memcached/requirements.lock b/charts/memcached/requirements.lock
index b94dead..4f63a87 100644
--- a/charts/memcached/requirements.lock
+++ b/charts/memcached/requirements.lock
@@ -1,6 +1,6 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
-digest: sha256:760c5997580ac8d30a64dfe92d6a54052b783ddf90cacbc5a4c95c1330988742
+ version: 0.2.69
+digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef
generated: "0001-01-01T00:00:00Z"
diff --git a/charts/memcached/requirements.yaml b/charts/memcached/requirements.yaml
index 52e723e..b3d5dcf 100644
--- a/charts/memcached/requirements.yaml
+++ b/charts/memcached/requirements.yaml
@@ -1,4 +1,4 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
+ version: 0.2.69
diff --git a/charts/neutron/charts/helm-toolkit/Chart.yaml b/charts/neutron/charts/helm-toolkit/Chart.yaml
index 9d3aa1e..d4c0ea2 100644
--- a/charts/neutron/charts/helm-toolkit/Chart.yaml
+++ b/charts/neutron/charts/helm-toolkit/Chart.yaml
@@ -9,4 +9,4 @@
sources:
- https://opendev.org/openstack/openstack-helm-infra
- https://opendev.org/openstack/openstack-helm
-version: 0.2.78
+version: 0.2.69
diff --git a/charts/neutron/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl b/charts/neutron/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
index 728b994..6877b7b 100644
--- a/charts/neutron/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
+++ b/charts/neutron/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
@@ -14,8 +14,7 @@
{{/*
abstract: |
- Resolves 'hostname:port' for an endpoint, or several hostname:port pairs for statefulset e.g
- 'hostname1:port1,hostname2:port2,hostname3:port3',
+ Resolves 'hostname:port' for an endpoint
examples:
- values: |
endpoints:
@@ -47,23 +46,6 @@
{{ tuple "oslo_db" "internal" "mysql" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
return: |
127.0.0.1:3306
- - values: |
- endpoints:
- oslo_cache:
- hosts:
- default: memcached
- host_fqdn_override:
- default: null
- statefulset:
- name: openstack-memcached-memcached
- replicas: 3
- port:
- memcache:
- default: 11211
- usage: |
- {{ tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
- return: |
- openstack-memcached-memcached-0:11211,openstack-memcached-memcached-1:11211,openstack-memcached-memcached-2:11211
*/}}
{{- define "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" -}}
@@ -71,19 +53,7 @@
{{- $endpoint := index . 1 -}}
{{- $port := index . 2 -}}
{{- $context := index . 3 -}}
-{{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false -}}
-{{- $local := dict "endpointHosts" list -}}
-{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" -}}
-{{- if $ssMap -}}
-{{- $endpointHostPrefix := $ssMap.name -}}
-{{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
-{{- range $podInt := until ( atoi (print $ssMap.replicas ) ) -}}
-{{- $endpointHostname := printf "%s-%d.%s:%s" $endpointHostPrefix $podInt $endpointHostSuffix $endpointPort -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts $endpointHostname ) -}}
-{{- end -}}
-{{- else -}}
-{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts (printf "%s:%s" $endpointHostname $endpointPort) ) -}}
-{{- end -}}
-{{ include "helm-toolkit.utils.joinListWithComma" $local.endpointHosts }}
+{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
+{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
+{{- printf "%s:%s" $endpointHostname $endpointPort -}}
{{- end -}}
diff --git a/charts/neutron/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl b/charts/neutron/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
index 24eb569..b2ec648 100644
--- a/charts/neutron/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
+++ b/charts/neutron/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
@@ -40,9 +40,9 @@
{{- $context := index . 3 -}}
{{- $endpointMap := index $context.Values.endpoints ( $type | replace "-" "_" ) }}
{{- if kindIs "string" $endpointMap.path }}
-{{- printf "%s" $endpointMap.path | default "" -}}
+{{- printf "%s" $endpointMap.path | default "/" -}}
{{- else -}}
-{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "" }}
+{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "/" }}
{{- printf "%s" $endpointPath -}}
{{- end -}}
{{- end -}}
diff --git a/charts/neutron/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl b/charts/neutron/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
deleted file mode 100644
index 332ca99..0000000
--- a/charts/neutron/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
+++ /dev/null
@@ -1,51 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Renders out the configmap <service>-oslo-policy.
-values: |
- conf:
- policy.d:
- file1:
- foo: bar
- file2:
- foo: baz
-usage: |
-{{- include "helm-toolkit.manifests.configmap_oslo_policy" (dict "envAll" $envAll "serviceName" "keystone") }}
-return: |
- ---
- apiVersion: v1
- kind: Secret
- metadata:
- name: keystone-oslo-policy
- data:
- file1: base64of(foo: bar)
- file2: base64of(foo: baz)
-*/}}
-{{- define "helm-toolkit.manifests.configmap_oslo_policy" -}}
-{{- $envAll := index . "envAll" -}}
-{{- $serviceName := index . "serviceName" -}}
----
-apiVersion: v1
-kind: Secret
-metadata:
- name: {{ $serviceName }}-oslo-policy
-type: Opaque
-data:
- {{- range $key, $value := index $envAll.Values.conf "policy.d" }}
- {{- if $value }}
- {{ $key }}: {{ toYaml $value | b64enc }}
- {{- else }}
- {{ $key }}: {{ "\n" | b64enc }}
- {{- end }}
- {{- end }}
-{{- end -}}
diff --git a/charts/neutron/charts/helm-toolkit/templates/manifests/_ingress.tpl b/charts/neutron/charts/helm-toolkit/templates/manifests/_ingress.tpl
index 792571c..cacb4b8 100644
--- a/charts/neutron/charts/helm-toolkit/templates/manifests/_ingress.tpl
+++ b/charts/neutron/charts/helm-toolkit/templates/manifests/_ingress.tpl
@@ -708,10 +708,6 @@
{{- range $v := without (index $endpointHost.tls "dnsNames" | default list) $hostNameFull }}
{{- $vHosts = append $vHosts $v }}
{{- end }}
-{{- if hasKey $envAll.Values.endpoints "alias_fqdn" }}
-{{- $alias_host := $envAll.Values.endpoints.alias_fqdn }}
-{{- $vHosts = append $vHosts $alias_host }}
-{{- end }}
{{- $secretName := index $envAll.Values.secrets "tls" ( $backendServiceType | replace "-" "_" ) $backendService $endpoint }}
{{- $_ := required "You need to specify a secret in your values for the endpoint" $secretName }}
tls:
diff --git a/charts/neutron/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/neutron/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
index c6a7521..1e28da9 100644
--- a/charts/neutron/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
+++ b/charts/neutron/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Drop')
@@ -126,7 +125,7 @@
# Delete DB
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP DATABASE IF EXISTS {0}".format(database)))
+ connection.execute("DROP DATABASE IF EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -139,7 +138,7 @@
# Delete DB User
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP USER IF EXISTS {0}".format(user)))
+ connection.execute("DROP USER IF EXISTS {0}".format(user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/neutron/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/neutron/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
index 1917f78..110cd98 100644
--- a/charts/neutron/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
+++ b/charts/neutron/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Init')
@@ -126,7 +125,7 @@
# Create DB
try:
with root_engine.connect() as connection:
- connection.execute(text("CREATE DATABASE IF NOT EXISTS {0}".format(database)))
+ connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -140,10 +139,10 @@
try:
with root_engine.connect() as connection:
connection.execute(
- text("CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
- user, password, mysql_x509)))
+ "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
+ user, password, mysql_x509))
connection.execute(
- text("GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)))
+ "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/neutron/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl b/charts/neutron/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
index e6e9c6e..3739f95 100644
--- a/charts/neutron/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
+++ b/charts/neutron/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
@@ -29,9 +29,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_ADMIN_PASSWORD=$(echo "${RABBITMQ_ADMIN_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User creadential
RABBITMQ_USERNAME=$(echo "${RABBITMQ_USER_CONNECTION}" | \
@@ -39,9 +37,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_PASSWORD=$(echo "${RABBITMQ_USER_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User vHost
RABBITMQ_VHOST=$(echo "${RABBITMQ_USER_CONNECTION}" | \
diff --git a/charts/neutron/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl b/charts/neutron/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
index 5c2dedb..48b53fa 100644
--- a/charts/neutron/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
+++ b/charts/neutron/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
@@ -40,9 +40,6 @@
release_group: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
application: {{ $application }}
component: {{ $component }}
-app.kubernetes.io/name: {{ $application }}
-app.kubernetes.io/component: {{ $component }}
-app.kubernetes.io/instance: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
{{- if ($envAll.Values.pod).labels }}
{{- if hasKey $envAll.Values.pod.labels $component }}
{{ index $envAll.Values.pod "labels" $component | toYaml }}
diff --git a/charts/neutron/charts/helm-toolkit/templates/snippets/_service_params.tpl b/charts/neutron/charts/helm-toolkit/templates/snippets/_service_params.tpl
deleted file mode 100644
index 6233a93..0000000
--- a/charts/neutron/charts/helm-toolkit/templates/snippets/_service_params.tpl
+++ /dev/null
@@ -1,61 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Inserts kubernetes service parameters from values as is.
-values: |
- network:
- serviceExample:
- service:
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-usage: |
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: 'serviceExample'
- spec:
- ports:
- - name: s-example
- port: 1111
- {{ .Values.network.serviceExample | include "helm-toolkit.snippets.service_params" | indent 2 }}
-return: |
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-*/}}
-
-{{- define "helm-toolkit.snippets.service_params" }}
-{{- $serviceParams := dict }}
-{{- if hasKey . "service" }}
-{{- $serviceParams = .service }}
-{{- end }}
-{{- if hasKey . "node_port" }}
-{{- if hasKey .node_port "enabled" }}
-{{- if .node_port.enabled }}
-{{- $_ := set $serviceParams "type" "NodePort" }}
-{{- end }}
-{{- end }}
-{{- end }}
-{{- if hasKey . "external_policy_local" }}
-{{- if .external_policy_local }}
-{{- $_ := set $serviceParams "externalTrafficPolicy" "Local" }}
-{{- end }}
-{{- end }}
-{{- if $serviceParams }}
-{{- $serviceParams | toYaml }}
-{{- end }}
-{{- end }}
diff --git a/charts/neutron/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl b/charts/neutron/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
deleted file mode 100644
index bdb28c3..0000000
--- a/charts/neutron/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
+++ /dev/null
@@ -1,279 +0,0 @@
-{{/*
-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.
-*/}}
-
-{{/*
-
-The helm-toolkit.utils.daemonset_overrides function have some limitations:
-
- * it allows to override only conf values specifid in configmap-etc
- * it doesn't allow to override values for daemonsets passed via env variables
- or via damoenset definition. As result it is impossible to have mixed
- deployment when one compute is configured with dpdk while other not.
- * it is impossible to override interface names/other information stored in
- <service>-bin configmap
- * It allows to schedule on both hosts and labels, which adds some
- uncertainty
-
-This implementation is intended to handle those limitations:
-
- * it allows to schedule only based on labels
- * it creates <service>-bin per daemonset override
- * it allows to override values when rendering daemonsets
-
- It picks data from the following structure:
-
- .Values:
- overrides:
- mychart_mydaemonset:
- labels:
- label::value:
- values:
- override_root_option: override_root_value
- conf:
- ovs_dpdk:
- enabled: true
- neutron:
- DEFAULT:
- foo: bar
-
-*/}}
-
-{{- define "helm-toolkit.utils.daemonset_overrides_root" }}
- {{- $daemonset := index . 0 }}
- {{- $daemonSetTemplateName := index . 1 }}
- {{ $serviceAccountName := index . 2 }}
- {{- $configmap_include := index . 3 }}
- {{- $configmap_name := index . 4 }}
- {{- $configbin_include := index . 5 }}
- {{- $configbin_name := index . 6 }}
- {{- $context := index . 7 }}
-
- {{- $_ := unset $context ".Files" }}
- {{- $daemonset_root_name := printf (print $context.Chart.Name "_" $daemonset) }}
- {{- $_ := set $context.Values "__daemonset_list" list }}
- {{- $_ := set $context.Values "__default" dict }}
-
- {{- $default_enabled := true }}
- {{- if hasKey $context.Values "overrides" }}
- {{- range $key, $val := $context.Values.overrides }}
-
- {{- if eq $key $daemonset_root_name }}
- {{- range $type, $type_data := . }}
- {{- if eq $type "overrides_default" }}
- {{- $default_enabled = $type_data }}
- {{- end }}
-
- {{- if eq $type "labels" }}
- {{- $_ := set $context.Values "__label_dict" . }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
- {{/* dictionary that will contain all info needed to generate this
- iteration of the daemonset. */}}
- {{- $_ := set $context.Values "__current_label" dict }}
-
- {{/* set daemonset name */}}
- {{- $_ := set $context.Values.__current_label "name" $label_name }}
-
- {{/* set daemonset metadata annotation */}}
- {{- $_ := set $context.Values.__current_label "daemonset_override" $lname }}
-
- {{/* apply overrides */}}
-
-
- {{- $override_root_copy := $ldata.values }}
- {{/* Deep copy to prevent https://storyboard.openstack.org/#!/story/2005936 */}}
- {{- $root_copy := omit ($context.Values | toYaml | fromYaml) "overrides" }}
- {{- $merged_dict := mergeOverwrite $root_copy $override_root_copy }}
-
- {{- $root_conf_copy2 := dict "values" $merged_dict }}
- {{- $context_values := omit (omit ($context.Values | toYaml | fromYaml) "values") "__daemonset_list" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2.values }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__current_label "nodeData" $root_conf_copy4 }}
-
-
- {{/* Schedule to the provided label value(s) */}}
- {{- $label_dict := dict "key" $label_name }}
- {{- $_ := set $label_dict "values" (list $label_value) }}
- {{- $_ := set $label_dict "operator" "In" }}
- {{- $list_aggregate := list $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
-
- {{/* Do not schedule to other specified labels, with higher
- precedence as the list position increases. Last defined label
- is highest priority. */}}
- {{- $other_labels := omit $context.Values.__label_dict $lname }}
- {{- range $lname2, $ldata2 := $other_labels }}
- {{ $label_name2 := (split "::" $lname2)._0 }}
- {{ $label_value2 := (split "::" $lname2)._1 }}
-
- {{- $label_dict := dict "key" $label_name2 }}
- {{- $_ := set $label_dict "values" (list $label_value2) }}
- {{- $_ := set $label_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__current_label.matchExpressions $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
- {{- end }}
-
- {{/* store completed daemonset entry/info into global list */}}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__current_label }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- $_ := unset $context.Values "__current_label" }}
-
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* scheduler exceptions for the default daemonset */}}
- {{- $_ := set $context.Values.__default "matchExpressions" list }}
-
- {{- range $type, $type_data := . }}
- {{/* Do not schedule to other specified labels */}}
- {{- if eq $type "labels" }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
-
- {{- $default_dict := dict "key" $label_name }}
- {{- $_ := set $default_dict "values" (list $label_value) }}
- {{- $_ := set $default_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__default.matchExpressions $default_dict }}
- {{- $_ := set $context.Values.__default "matchExpressions" $list_aggregate }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* generate the default daemonset */}}
-
- {{/* set name */}}
- {{- $_ := set $context.Values.__default "name" "default" }}
-
- {{/* no overrides apply, so copy as-is */}}
- {{- $root_conf_copy1 := omit $context.Values.conf "overrides" }}
- {{- $root_conf_copy2 := dict "conf" $root_conf_copy1 }}
- {{- $context_values := omit $context.Values "conf" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2 }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__default "nodeData" $root_conf_copy4 }}
-
- {{/* add to global list */}}
- {{- if $default_enabled }}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__default }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- end }}
-
- {{- range $current_dict := $context.Values.__daemonset_list }}
-
- {{- $context_novalues := omit $context "Values" }}
- {{- $merged_dict := mergeOverwrite $context_novalues $current_dict.nodeData }}
- {{- $_ := set $current_dict "nodeData" $merged_dict }}
- {{/* Deep copy original daemonset_yaml */}}
- {{- $daemonset_yaml := list $daemonset $configmap_name $serviceAccountName $merged_dict | include $daemonSetTemplateName | toString | fromYaml }}
- {{- $_ := set $context.Values "__daemonset_yaml" ($daemonset_yaml | toYaml | fromYaml) }}
-
- {{/* Use the following name format $daemonset_root_name + sha256summ($current_dict.matchExpressions)
- as labels might be too long and contain wrong characters like / */}}
- {{- $_ := set $current_dict "dns_1123_name" dict }}
- {{- $name_format := "" }}
- {{- if eq $current_dict.name "default" }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name "default") | replace "_" "-" }}
- {{- else }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name ($current_dict.matchExpressions | quote | sha256sum | trunc 16)) | replace "_" "-" }}
- {{- end }}
- {{- $_ := set $current_dict "dns_1123_name" $name_format }}
-
- {{/* set daemonset metadata name */}}
- {{- if not $context.Values.__daemonset_yaml.metadata }}{{- $_ := set $context.Values.__daemonset_yaml "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.metadata.name }}{{- $_ := set $context.Values.__daemonset_yaml.metadata "name" dict }}{{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata "name" $current_dict.dns_1123_name }}
-
- {{/* cross-reference configmap name to container volume definitions */}}
- {{- $_ := set $context.Values "__volume_list" list }}
- {{- range $current_volume := $context.Values.__daemonset_yaml.spec.template.spec.volumes }}
- {{- $_ := set $context.Values "__volume" $current_volume }}
- {{- if hasKey $context.Values.__volume "secret" }}
- {{- if eq $context.Values.__volume.secret.secretName $configmap_name }}
- {{- $_ := set $context.Values.__volume.secret "secretName" (printf "%s-etc" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- if hasKey $context.Values.__volume "configMap" }}
- {{- if eq $context.Values.__volume.configMap.name $configbin_name }}
- {{- $_ := set $context.Values.__volume.configMap "name" (printf "%s-bin" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- $updated_list := append $context.Values.__volume_list $context.Values.__volume }}
- {{- $_ := set $context.Values "__volume_list" $updated_list }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "volumes" $context.Values.__volume_list }}
-
-
- {{/* populate scheduling restrictions */}}
- {{- if hasKey $current_dict "matchExpressions" }}
- {{- $length := len $current_dict.matchExpressions }}
- {{- if gt $length 0 }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "affinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity "nodeAffinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity "requiredDuringSchedulingIgnoredDuringExecution" dict }}{{- end }}
-
- {{- $expressions_modified := list }}
- {{- if hasKey $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" }}
- {{- range $orig_expression := $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms }}
- {{- $match_expressions_modified := list }}
- {{- $match_expressions_modified = concat $match_expressions_modified $current_dict.matchExpressions }}
- {{- if hasKey $orig_expression "matchExpressions" }}
- {{- $match_expressions_modified = concat $match_expressions_modified $orig_expression.matchExpressions }}
- {{- $expressions_modified = append $expressions_modified (dict "matchExpressions" $match_expressions_modified) }}
- {{- end }}
- {{- end }}
- {{- else }}
- {{- $expressions_modified = (list (dict "matchExpressions" $current_dict.matchExpressions)) }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" $expressions_modified }}
- {{- end }}
- {{- end }}
-
- {{/* input value hash for current set of values overrides */}}
- {{- if not $context.Values.__daemonset_yaml.spec }}{{- $_ := set $context.Values.__daemonset_yaml "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template }}{{- $_ := set $context.Values.__daemonset_yaml.spec "template" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata.annotations }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata "annotations" dict }}{{- end }}
- {{- $cmap := list (printf "%s-etc" $current_dict.dns_1123_name) $current_dict.nodeData | include $configmap_include }}
- {{- $cmap_bin := list (printf "%s-bin" $current_dict.dns_1123_name) $current_dict.nodeData | include $configbin_include }}
- {{- $values_cmap_hash := $cmap | quote | sha256sum }}
- {{- $values_cmap_bin_hash := $cmap_bin | quote | sha256sum }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-etc-hash" $values_cmap_hash }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-bin-hash" $values_cmap_bin_hash }}
-
- {{/* Do not set override for default daemonset */}}
- {{- if $current_dict.daemonset_override }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata.annotations "daemonset_override" $current_dict.daemonset_override }}
- {{- end }}
-
-{{/* generate configmap */}}
----
-{{ $cmap }}
- {{/* generate <service>-bin yaml */}}
----
-{{ $cmap_bin }}
- {{/* generate daemonset yaml */}}
----
-{{ $context.Values.__daemonset_yaml | toYaml }}
- {{- end }}
-{{- end }}
diff --git a/charts/neutron/requirements.lock b/charts/neutron/requirements.lock
index b94dead..4f63a87 100644
--- a/charts/neutron/requirements.lock
+++ b/charts/neutron/requirements.lock
@@ -1,6 +1,6 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
-digest: sha256:760c5997580ac8d30a64dfe92d6a54052b783ddf90cacbc5a4c95c1330988742
+ version: 0.2.69
+digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef
generated: "0001-01-01T00:00:00Z"
diff --git a/charts/neutron/requirements.yaml b/charts/neutron/requirements.yaml
index 52e723e..b3d5dcf 100644
--- a/charts/neutron/requirements.yaml
+++ b/charts/neutron/requirements.yaml
@@ -1,4 +1,4 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
+ version: 0.2.69
diff --git a/charts/neutron/templates/bin/_neutron-ironic-agent-init.sh.tpl b/charts/neutron/templates/bin/_neutron-ironic-agent-init.sh.tpl
new file mode 100644
index 0000000..3df3315
--- /dev/null
+++ b/charts/neutron/templates/bin/_neutron-ironic-agent-init.sh.tpl
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+{{/*
+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
+
+{{- if and ( empty .Values.conf.neutron.DEFAULT.host ) ( .Values.pod.use_fqdn.neutron_agent ) }}
+mkdir -p /tmp/pod-shared
+tee > /tmp/pod-shared/neutron-agent.ini << EOF
+[DEFAULT]
+host = $(hostname --fqdn)
+EOF
+{{- end }}
diff --git a/charts/neutron/templates/configmap-bin.yaml b/charts/neutron/templates/configmap-bin.yaml
index b6ad4af..bd80c40 100644
--- a/charts/neutron/templates/configmap-bin.yaml
+++ b/charts/neutron/templates/configmap-bin.yaml
@@ -95,6 +95,8 @@
{{ tuple "bin/_neutron-policy-server.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
neutron-rpc-server.sh: |
{{ tuple "bin/_neutron-rpc-server.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
+ neutron-ironic-agent-init.sh: |
+{{ tuple "bin/_neutron-ironic-agent-init.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
neutron-ironic-agent.sh: |
{{ tuple "bin/_neutron-ironic-agent.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
neutron-netns-cleanup-cron.sh: |
diff --git a/charts/neutron/templates/deployment-ironic-agent.yaml b/charts/neutron/templates/deployment-ironic-agent.yaml
index 014c9ad..1b468e2 100644
--- a/charts/neutron/templates/deployment-ironic-agent.yaml
+++ b/charts/neutron/templates/deployment-ironic-agent.yaml
@@ -60,6 +60,19 @@
terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.ironic_agent.timeout | default "30" }}
initContainers:
{{ tuple $envAll "pod_dependency" $mounts_neutron_ironic_agent_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
+ - name: neutron-ironic-agent-init
+{{ tuple $envAll "neutron_ironic_agent_init" | include "helm-toolkit.snippets.image" | indent 10 }}
+{{ tuple $envAll $envAll.Values.pod.resources.ironic_agent | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
+{{ dict "envAll" $envAll "application" "neutron_ironic_agent" "container" "neutron_ironic_agent_init" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
+ command:
+ - /tmp/neutron-ironic-agent-init.sh
+ volumeMounts:
+ - name: pod-shared
+ mountPath: /tmp/pod-shared
+ - name: neutron-bin
+ mountPath: /tmp/neutron-ironic-agent-init.sh
+ subPath: neutron-ironic-agent-init.sh
+ readOnly: true
containers:
- name: neutron-ironic-agent
{{ tuple $envAll "neutron_ironic_agent" | include "helm-toolkit.snippets.image" | indent 10 }}
@@ -79,6 +92,8 @@
mountPath: /tmp
- name: pod-var-neutron
mountPath: {{ .Values.conf.neutron.DEFAULT.state_path }}
+ - name: pod-shared
+ mountPath: /tmp/pod-shared
- name: neutron-bin
mountPath: /tmp/neutron-ironic-agent.sh
subPath: neutron-ironic-agent.sh
@@ -104,6 +119,8 @@
emptyDir: {}
- name: pod-var-neutron
emptyDir: {}
+ - name: pod-shared
+ mountPath: /tmp/pod-shared
- name: neutron-bin
configMap:
name: neutron-bin
diff --git a/charts/neutron/values.yaml b/charts/neutron/values.yaml
index cd3889b..d76b375 100644
--- a/charts/neutron/values.yaml
+++ b/charts/neutron/values.yaml
@@ -45,6 +45,7 @@
neutron_sriov_agent_init: docker.io/openstackhelm/neutron:stein-18.04-sriov
neutron_bagpipe_bgp: docker.io/openstackhelm/neutron:2024.1-ubuntu_jammy
neutron_bgp_dragent: docker.io/openstackhelm/neutron:2024.1-ubuntu_jammy
+ neutron_ironic_agent_init: docker.io/openstackhelm/neutron:2024.1-ubuntu_jammy
neutron_ironic_agent: docker.io/openstackhelm/neutron:2024.1-ubuntu_jammy
neutron_netns_cleanup_cron: docker.io/openstackhelm/neutron:2024.1-ubuntu_jammy
dep_check: quay.io/airshipit/kubernetes-entrypoint:v1.0.0
@@ -643,6 +644,9 @@
pod:
runAsUser: 42424
container:
+ neutron_ironic_agent_init:
+ runAsUser: 0
+ readOnlyRootFilesystem: true
neutron_ironic_agent:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
diff --git a/charts/nova/charts/helm-toolkit/Chart.yaml b/charts/nova/charts/helm-toolkit/Chart.yaml
index 9d3aa1e..d4c0ea2 100644
--- a/charts/nova/charts/helm-toolkit/Chart.yaml
+++ b/charts/nova/charts/helm-toolkit/Chart.yaml
@@ -9,4 +9,4 @@
sources:
- https://opendev.org/openstack/openstack-helm-infra
- https://opendev.org/openstack/openstack-helm
-version: 0.2.78
+version: 0.2.69
diff --git a/charts/nova/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl b/charts/nova/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
index 728b994..6877b7b 100644
--- a/charts/nova/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
+++ b/charts/nova/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
@@ -14,8 +14,7 @@
{{/*
abstract: |
- Resolves 'hostname:port' for an endpoint, or several hostname:port pairs for statefulset e.g
- 'hostname1:port1,hostname2:port2,hostname3:port3',
+ Resolves 'hostname:port' for an endpoint
examples:
- values: |
endpoints:
@@ -47,23 +46,6 @@
{{ tuple "oslo_db" "internal" "mysql" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
return: |
127.0.0.1:3306
- - values: |
- endpoints:
- oslo_cache:
- hosts:
- default: memcached
- host_fqdn_override:
- default: null
- statefulset:
- name: openstack-memcached-memcached
- replicas: 3
- port:
- memcache:
- default: 11211
- usage: |
- {{ tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
- return: |
- openstack-memcached-memcached-0:11211,openstack-memcached-memcached-1:11211,openstack-memcached-memcached-2:11211
*/}}
{{- define "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" -}}
@@ -71,19 +53,7 @@
{{- $endpoint := index . 1 -}}
{{- $port := index . 2 -}}
{{- $context := index . 3 -}}
-{{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false -}}
-{{- $local := dict "endpointHosts" list -}}
-{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" -}}
-{{- if $ssMap -}}
-{{- $endpointHostPrefix := $ssMap.name -}}
-{{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
-{{- range $podInt := until ( atoi (print $ssMap.replicas ) ) -}}
-{{- $endpointHostname := printf "%s-%d.%s:%s" $endpointHostPrefix $podInt $endpointHostSuffix $endpointPort -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts $endpointHostname ) -}}
-{{- end -}}
-{{- else -}}
-{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts (printf "%s:%s" $endpointHostname $endpointPort) ) -}}
-{{- end -}}
-{{ include "helm-toolkit.utils.joinListWithComma" $local.endpointHosts }}
+{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
+{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
+{{- printf "%s:%s" $endpointHostname $endpointPort -}}
{{- end -}}
diff --git a/charts/nova/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl b/charts/nova/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
index 24eb569..b2ec648 100644
--- a/charts/nova/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
+++ b/charts/nova/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
@@ -40,9 +40,9 @@
{{- $context := index . 3 -}}
{{- $endpointMap := index $context.Values.endpoints ( $type | replace "-" "_" ) }}
{{- if kindIs "string" $endpointMap.path }}
-{{- printf "%s" $endpointMap.path | default "" -}}
+{{- printf "%s" $endpointMap.path | default "/" -}}
{{- else -}}
-{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "" }}
+{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "/" }}
{{- printf "%s" $endpointPath -}}
{{- end -}}
{{- end -}}
diff --git a/charts/nova/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl b/charts/nova/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
deleted file mode 100644
index 332ca99..0000000
--- a/charts/nova/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
+++ /dev/null
@@ -1,51 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Renders out the configmap <service>-oslo-policy.
-values: |
- conf:
- policy.d:
- file1:
- foo: bar
- file2:
- foo: baz
-usage: |
-{{- include "helm-toolkit.manifests.configmap_oslo_policy" (dict "envAll" $envAll "serviceName" "keystone") }}
-return: |
- ---
- apiVersion: v1
- kind: Secret
- metadata:
- name: keystone-oslo-policy
- data:
- file1: base64of(foo: bar)
- file2: base64of(foo: baz)
-*/}}
-{{- define "helm-toolkit.manifests.configmap_oslo_policy" -}}
-{{- $envAll := index . "envAll" -}}
-{{- $serviceName := index . "serviceName" -}}
----
-apiVersion: v1
-kind: Secret
-metadata:
- name: {{ $serviceName }}-oslo-policy
-type: Opaque
-data:
- {{- range $key, $value := index $envAll.Values.conf "policy.d" }}
- {{- if $value }}
- {{ $key }}: {{ toYaml $value | b64enc }}
- {{- else }}
- {{ $key }}: {{ "\n" | b64enc }}
- {{- end }}
- {{- end }}
-{{- end -}}
diff --git a/charts/nova/charts/helm-toolkit/templates/manifests/_ingress.tpl b/charts/nova/charts/helm-toolkit/templates/manifests/_ingress.tpl
index 792571c..cacb4b8 100644
--- a/charts/nova/charts/helm-toolkit/templates/manifests/_ingress.tpl
+++ b/charts/nova/charts/helm-toolkit/templates/manifests/_ingress.tpl
@@ -708,10 +708,6 @@
{{- range $v := without (index $endpointHost.tls "dnsNames" | default list) $hostNameFull }}
{{- $vHosts = append $vHosts $v }}
{{- end }}
-{{- if hasKey $envAll.Values.endpoints "alias_fqdn" }}
-{{- $alias_host := $envAll.Values.endpoints.alias_fqdn }}
-{{- $vHosts = append $vHosts $alias_host }}
-{{- end }}
{{- $secretName := index $envAll.Values.secrets "tls" ( $backendServiceType | replace "-" "_" ) $backendService $endpoint }}
{{- $_ := required "You need to specify a secret in your values for the endpoint" $secretName }}
tls:
diff --git a/charts/nova/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/nova/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
index c6a7521..1e28da9 100644
--- a/charts/nova/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
+++ b/charts/nova/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Drop')
@@ -126,7 +125,7 @@
# Delete DB
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP DATABASE IF EXISTS {0}".format(database)))
+ connection.execute("DROP DATABASE IF EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -139,7 +138,7 @@
# Delete DB User
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP USER IF EXISTS {0}".format(user)))
+ connection.execute("DROP USER IF EXISTS {0}".format(user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/nova/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/nova/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
index 1917f78..110cd98 100644
--- a/charts/nova/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
+++ b/charts/nova/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Init')
@@ -126,7 +125,7 @@
# Create DB
try:
with root_engine.connect() as connection:
- connection.execute(text("CREATE DATABASE IF NOT EXISTS {0}".format(database)))
+ connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -140,10 +139,10 @@
try:
with root_engine.connect() as connection:
connection.execute(
- text("CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
- user, password, mysql_x509)))
+ "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
+ user, password, mysql_x509))
connection.execute(
- text("GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)))
+ "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/nova/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl b/charts/nova/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
index e6e9c6e..3739f95 100644
--- a/charts/nova/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
+++ b/charts/nova/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
@@ -29,9 +29,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_ADMIN_PASSWORD=$(echo "${RABBITMQ_ADMIN_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User creadential
RABBITMQ_USERNAME=$(echo "${RABBITMQ_USER_CONNECTION}" | \
@@ -39,9 +37,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_PASSWORD=$(echo "${RABBITMQ_USER_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User vHost
RABBITMQ_VHOST=$(echo "${RABBITMQ_USER_CONNECTION}" | \
diff --git a/charts/nova/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl b/charts/nova/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
index 5c2dedb..48b53fa 100644
--- a/charts/nova/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
+++ b/charts/nova/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
@@ -40,9 +40,6 @@
release_group: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
application: {{ $application }}
component: {{ $component }}
-app.kubernetes.io/name: {{ $application }}
-app.kubernetes.io/component: {{ $component }}
-app.kubernetes.io/instance: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
{{- if ($envAll.Values.pod).labels }}
{{- if hasKey $envAll.Values.pod.labels $component }}
{{ index $envAll.Values.pod "labels" $component | toYaml }}
diff --git a/charts/nova/charts/helm-toolkit/templates/snippets/_service_params.tpl b/charts/nova/charts/helm-toolkit/templates/snippets/_service_params.tpl
deleted file mode 100644
index 6233a93..0000000
--- a/charts/nova/charts/helm-toolkit/templates/snippets/_service_params.tpl
+++ /dev/null
@@ -1,61 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Inserts kubernetes service parameters from values as is.
-values: |
- network:
- serviceExample:
- service:
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-usage: |
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: 'serviceExample'
- spec:
- ports:
- - name: s-example
- port: 1111
- {{ .Values.network.serviceExample | include "helm-toolkit.snippets.service_params" | indent 2 }}
-return: |
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-*/}}
-
-{{- define "helm-toolkit.snippets.service_params" }}
-{{- $serviceParams := dict }}
-{{- if hasKey . "service" }}
-{{- $serviceParams = .service }}
-{{- end }}
-{{- if hasKey . "node_port" }}
-{{- if hasKey .node_port "enabled" }}
-{{- if .node_port.enabled }}
-{{- $_ := set $serviceParams "type" "NodePort" }}
-{{- end }}
-{{- end }}
-{{- end }}
-{{- if hasKey . "external_policy_local" }}
-{{- if .external_policy_local }}
-{{- $_ := set $serviceParams "externalTrafficPolicy" "Local" }}
-{{- end }}
-{{- end }}
-{{- if $serviceParams }}
-{{- $serviceParams | toYaml }}
-{{- end }}
-{{- end }}
diff --git a/charts/nova/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl b/charts/nova/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
deleted file mode 100644
index bdb28c3..0000000
--- a/charts/nova/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
+++ /dev/null
@@ -1,279 +0,0 @@
-{{/*
-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.
-*/}}
-
-{{/*
-
-The helm-toolkit.utils.daemonset_overrides function have some limitations:
-
- * it allows to override only conf values specifid in configmap-etc
- * it doesn't allow to override values for daemonsets passed via env variables
- or via damoenset definition. As result it is impossible to have mixed
- deployment when one compute is configured with dpdk while other not.
- * it is impossible to override interface names/other information stored in
- <service>-bin configmap
- * It allows to schedule on both hosts and labels, which adds some
- uncertainty
-
-This implementation is intended to handle those limitations:
-
- * it allows to schedule only based on labels
- * it creates <service>-bin per daemonset override
- * it allows to override values when rendering daemonsets
-
- It picks data from the following structure:
-
- .Values:
- overrides:
- mychart_mydaemonset:
- labels:
- label::value:
- values:
- override_root_option: override_root_value
- conf:
- ovs_dpdk:
- enabled: true
- neutron:
- DEFAULT:
- foo: bar
-
-*/}}
-
-{{- define "helm-toolkit.utils.daemonset_overrides_root" }}
- {{- $daemonset := index . 0 }}
- {{- $daemonSetTemplateName := index . 1 }}
- {{ $serviceAccountName := index . 2 }}
- {{- $configmap_include := index . 3 }}
- {{- $configmap_name := index . 4 }}
- {{- $configbin_include := index . 5 }}
- {{- $configbin_name := index . 6 }}
- {{- $context := index . 7 }}
-
- {{- $_ := unset $context ".Files" }}
- {{- $daemonset_root_name := printf (print $context.Chart.Name "_" $daemonset) }}
- {{- $_ := set $context.Values "__daemonset_list" list }}
- {{- $_ := set $context.Values "__default" dict }}
-
- {{- $default_enabled := true }}
- {{- if hasKey $context.Values "overrides" }}
- {{- range $key, $val := $context.Values.overrides }}
-
- {{- if eq $key $daemonset_root_name }}
- {{- range $type, $type_data := . }}
- {{- if eq $type "overrides_default" }}
- {{- $default_enabled = $type_data }}
- {{- end }}
-
- {{- if eq $type "labels" }}
- {{- $_ := set $context.Values "__label_dict" . }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
- {{/* dictionary that will contain all info needed to generate this
- iteration of the daemonset. */}}
- {{- $_ := set $context.Values "__current_label" dict }}
-
- {{/* set daemonset name */}}
- {{- $_ := set $context.Values.__current_label "name" $label_name }}
-
- {{/* set daemonset metadata annotation */}}
- {{- $_ := set $context.Values.__current_label "daemonset_override" $lname }}
-
- {{/* apply overrides */}}
-
-
- {{- $override_root_copy := $ldata.values }}
- {{/* Deep copy to prevent https://storyboard.openstack.org/#!/story/2005936 */}}
- {{- $root_copy := omit ($context.Values | toYaml | fromYaml) "overrides" }}
- {{- $merged_dict := mergeOverwrite $root_copy $override_root_copy }}
-
- {{- $root_conf_copy2 := dict "values" $merged_dict }}
- {{- $context_values := omit (omit ($context.Values | toYaml | fromYaml) "values") "__daemonset_list" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2.values }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__current_label "nodeData" $root_conf_copy4 }}
-
-
- {{/* Schedule to the provided label value(s) */}}
- {{- $label_dict := dict "key" $label_name }}
- {{- $_ := set $label_dict "values" (list $label_value) }}
- {{- $_ := set $label_dict "operator" "In" }}
- {{- $list_aggregate := list $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
-
- {{/* Do not schedule to other specified labels, with higher
- precedence as the list position increases. Last defined label
- is highest priority. */}}
- {{- $other_labels := omit $context.Values.__label_dict $lname }}
- {{- range $lname2, $ldata2 := $other_labels }}
- {{ $label_name2 := (split "::" $lname2)._0 }}
- {{ $label_value2 := (split "::" $lname2)._1 }}
-
- {{- $label_dict := dict "key" $label_name2 }}
- {{- $_ := set $label_dict "values" (list $label_value2) }}
- {{- $_ := set $label_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__current_label.matchExpressions $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
- {{- end }}
-
- {{/* store completed daemonset entry/info into global list */}}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__current_label }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- $_ := unset $context.Values "__current_label" }}
-
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* scheduler exceptions for the default daemonset */}}
- {{- $_ := set $context.Values.__default "matchExpressions" list }}
-
- {{- range $type, $type_data := . }}
- {{/* Do not schedule to other specified labels */}}
- {{- if eq $type "labels" }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
-
- {{- $default_dict := dict "key" $label_name }}
- {{- $_ := set $default_dict "values" (list $label_value) }}
- {{- $_ := set $default_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__default.matchExpressions $default_dict }}
- {{- $_ := set $context.Values.__default "matchExpressions" $list_aggregate }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* generate the default daemonset */}}
-
- {{/* set name */}}
- {{- $_ := set $context.Values.__default "name" "default" }}
-
- {{/* no overrides apply, so copy as-is */}}
- {{- $root_conf_copy1 := omit $context.Values.conf "overrides" }}
- {{- $root_conf_copy2 := dict "conf" $root_conf_copy1 }}
- {{- $context_values := omit $context.Values "conf" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2 }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__default "nodeData" $root_conf_copy4 }}
-
- {{/* add to global list */}}
- {{- if $default_enabled }}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__default }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- end }}
-
- {{- range $current_dict := $context.Values.__daemonset_list }}
-
- {{- $context_novalues := omit $context "Values" }}
- {{- $merged_dict := mergeOverwrite $context_novalues $current_dict.nodeData }}
- {{- $_ := set $current_dict "nodeData" $merged_dict }}
- {{/* Deep copy original daemonset_yaml */}}
- {{- $daemonset_yaml := list $daemonset $configmap_name $serviceAccountName $merged_dict | include $daemonSetTemplateName | toString | fromYaml }}
- {{- $_ := set $context.Values "__daemonset_yaml" ($daemonset_yaml | toYaml | fromYaml) }}
-
- {{/* Use the following name format $daemonset_root_name + sha256summ($current_dict.matchExpressions)
- as labels might be too long and contain wrong characters like / */}}
- {{- $_ := set $current_dict "dns_1123_name" dict }}
- {{- $name_format := "" }}
- {{- if eq $current_dict.name "default" }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name "default") | replace "_" "-" }}
- {{- else }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name ($current_dict.matchExpressions | quote | sha256sum | trunc 16)) | replace "_" "-" }}
- {{- end }}
- {{- $_ := set $current_dict "dns_1123_name" $name_format }}
-
- {{/* set daemonset metadata name */}}
- {{- if not $context.Values.__daemonset_yaml.metadata }}{{- $_ := set $context.Values.__daemonset_yaml "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.metadata.name }}{{- $_ := set $context.Values.__daemonset_yaml.metadata "name" dict }}{{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata "name" $current_dict.dns_1123_name }}
-
- {{/* cross-reference configmap name to container volume definitions */}}
- {{- $_ := set $context.Values "__volume_list" list }}
- {{- range $current_volume := $context.Values.__daemonset_yaml.spec.template.spec.volumes }}
- {{- $_ := set $context.Values "__volume" $current_volume }}
- {{- if hasKey $context.Values.__volume "secret" }}
- {{- if eq $context.Values.__volume.secret.secretName $configmap_name }}
- {{- $_ := set $context.Values.__volume.secret "secretName" (printf "%s-etc" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- if hasKey $context.Values.__volume "configMap" }}
- {{- if eq $context.Values.__volume.configMap.name $configbin_name }}
- {{- $_ := set $context.Values.__volume.configMap "name" (printf "%s-bin" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- $updated_list := append $context.Values.__volume_list $context.Values.__volume }}
- {{- $_ := set $context.Values "__volume_list" $updated_list }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "volumes" $context.Values.__volume_list }}
-
-
- {{/* populate scheduling restrictions */}}
- {{- if hasKey $current_dict "matchExpressions" }}
- {{- $length := len $current_dict.matchExpressions }}
- {{- if gt $length 0 }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "affinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity "nodeAffinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity "requiredDuringSchedulingIgnoredDuringExecution" dict }}{{- end }}
-
- {{- $expressions_modified := list }}
- {{- if hasKey $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" }}
- {{- range $orig_expression := $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms }}
- {{- $match_expressions_modified := list }}
- {{- $match_expressions_modified = concat $match_expressions_modified $current_dict.matchExpressions }}
- {{- if hasKey $orig_expression "matchExpressions" }}
- {{- $match_expressions_modified = concat $match_expressions_modified $orig_expression.matchExpressions }}
- {{- $expressions_modified = append $expressions_modified (dict "matchExpressions" $match_expressions_modified) }}
- {{- end }}
- {{- end }}
- {{- else }}
- {{- $expressions_modified = (list (dict "matchExpressions" $current_dict.matchExpressions)) }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" $expressions_modified }}
- {{- end }}
- {{- end }}
-
- {{/* input value hash for current set of values overrides */}}
- {{- if not $context.Values.__daemonset_yaml.spec }}{{- $_ := set $context.Values.__daemonset_yaml "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template }}{{- $_ := set $context.Values.__daemonset_yaml.spec "template" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata.annotations }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata "annotations" dict }}{{- end }}
- {{- $cmap := list (printf "%s-etc" $current_dict.dns_1123_name) $current_dict.nodeData | include $configmap_include }}
- {{- $cmap_bin := list (printf "%s-bin" $current_dict.dns_1123_name) $current_dict.nodeData | include $configbin_include }}
- {{- $values_cmap_hash := $cmap | quote | sha256sum }}
- {{- $values_cmap_bin_hash := $cmap_bin | quote | sha256sum }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-etc-hash" $values_cmap_hash }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-bin-hash" $values_cmap_bin_hash }}
-
- {{/* Do not set override for default daemonset */}}
- {{- if $current_dict.daemonset_override }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata.annotations "daemonset_override" $current_dict.daemonset_override }}
- {{- end }}
-
-{{/* generate configmap */}}
----
-{{ $cmap }}
- {{/* generate <service>-bin yaml */}}
----
-{{ $cmap_bin }}
- {{/* generate daemonset yaml */}}
----
-{{ $context.Values.__daemonset_yaml | toYaml }}
- {{- end }}
-{{- end }}
diff --git a/charts/nova/requirements.lock b/charts/nova/requirements.lock
index b94dead..4f63a87 100644
--- a/charts/nova/requirements.lock
+++ b/charts/nova/requirements.lock
@@ -1,6 +1,6 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
-digest: sha256:760c5997580ac8d30a64dfe92d6a54052b783ddf90cacbc5a4c95c1330988742
+ version: 0.2.69
+digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef
generated: "0001-01-01T00:00:00Z"
diff --git a/charts/nova/requirements.yaml b/charts/nova/requirements.yaml
index 52e723e..b3d5dcf 100644
--- a/charts/nova/requirements.yaml
+++ b/charts/nova/requirements.yaml
@@ -1,4 +1,4 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
+ version: 0.2.69
diff --git a/charts/octavia/charts/helm-toolkit/Chart.yaml b/charts/octavia/charts/helm-toolkit/Chart.yaml
index 9d3aa1e..d4c0ea2 100644
--- a/charts/octavia/charts/helm-toolkit/Chart.yaml
+++ b/charts/octavia/charts/helm-toolkit/Chart.yaml
@@ -9,4 +9,4 @@
sources:
- https://opendev.org/openstack/openstack-helm-infra
- https://opendev.org/openstack/openstack-helm
-version: 0.2.78
+version: 0.2.69
diff --git a/charts/octavia/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl b/charts/octavia/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
index 728b994..6877b7b 100644
--- a/charts/octavia/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
+++ b/charts/octavia/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
@@ -14,8 +14,7 @@
{{/*
abstract: |
- Resolves 'hostname:port' for an endpoint, or several hostname:port pairs for statefulset e.g
- 'hostname1:port1,hostname2:port2,hostname3:port3',
+ Resolves 'hostname:port' for an endpoint
examples:
- values: |
endpoints:
@@ -47,23 +46,6 @@
{{ tuple "oslo_db" "internal" "mysql" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
return: |
127.0.0.1:3306
- - values: |
- endpoints:
- oslo_cache:
- hosts:
- default: memcached
- host_fqdn_override:
- default: null
- statefulset:
- name: openstack-memcached-memcached
- replicas: 3
- port:
- memcache:
- default: 11211
- usage: |
- {{ tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
- return: |
- openstack-memcached-memcached-0:11211,openstack-memcached-memcached-1:11211,openstack-memcached-memcached-2:11211
*/}}
{{- define "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" -}}
@@ -71,19 +53,7 @@
{{- $endpoint := index . 1 -}}
{{- $port := index . 2 -}}
{{- $context := index . 3 -}}
-{{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false -}}
-{{- $local := dict "endpointHosts" list -}}
-{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" -}}
-{{- if $ssMap -}}
-{{- $endpointHostPrefix := $ssMap.name -}}
-{{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
-{{- range $podInt := until ( atoi (print $ssMap.replicas ) ) -}}
-{{- $endpointHostname := printf "%s-%d.%s:%s" $endpointHostPrefix $podInt $endpointHostSuffix $endpointPort -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts $endpointHostname ) -}}
-{{- end -}}
-{{- else -}}
-{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts (printf "%s:%s" $endpointHostname $endpointPort) ) -}}
-{{- end -}}
-{{ include "helm-toolkit.utils.joinListWithComma" $local.endpointHosts }}
+{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
+{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
+{{- printf "%s:%s" $endpointHostname $endpointPort -}}
{{- end -}}
diff --git a/charts/octavia/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl b/charts/octavia/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
index 24eb569..b2ec648 100644
--- a/charts/octavia/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
+++ b/charts/octavia/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
@@ -40,9 +40,9 @@
{{- $context := index . 3 -}}
{{- $endpointMap := index $context.Values.endpoints ( $type | replace "-" "_" ) }}
{{- if kindIs "string" $endpointMap.path }}
-{{- printf "%s" $endpointMap.path | default "" -}}
+{{- printf "%s" $endpointMap.path | default "/" -}}
{{- else -}}
-{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "" }}
+{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "/" }}
{{- printf "%s" $endpointPath -}}
{{- end -}}
{{- end -}}
diff --git a/charts/octavia/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl b/charts/octavia/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
deleted file mode 100644
index 332ca99..0000000
--- a/charts/octavia/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
+++ /dev/null
@@ -1,51 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Renders out the configmap <service>-oslo-policy.
-values: |
- conf:
- policy.d:
- file1:
- foo: bar
- file2:
- foo: baz
-usage: |
-{{- include "helm-toolkit.manifests.configmap_oslo_policy" (dict "envAll" $envAll "serviceName" "keystone") }}
-return: |
- ---
- apiVersion: v1
- kind: Secret
- metadata:
- name: keystone-oslo-policy
- data:
- file1: base64of(foo: bar)
- file2: base64of(foo: baz)
-*/}}
-{{- define "helm-toolkit.manifests.configmap_oslo_policy" -}}
-{{- $envAll := index . "envAll" -}}
-{{- $serviceName := index . "serviceName" -}}
----
-apiVersion: v1
-kind: Secret
-metadata:
- name: {{ $serviceName }}-oslo-policy
-type: Opaque
-data:
- {{- range $key, $value := index $envAll.Values.conf "policy.d" }}
- {{- if $value }}
- {{ $key }}: {{ toYaml $value | b64enc }}
- {{- else }}
- {{ $key }}: {{ "\n" | b64enc }}
- {{- end }}
- {{- end }}
-{{- end -}}
diff --git a/charts/octavia/charts/helm-toolkit/templates/manifests/_ingress.tpl b/charts/octavia/charts/helm-toolkit/templates/manifests/_ingress.tpl
index 792571c..cacb4b8 100644
--- a/charts/octavia/charts/helm-toolkit/templates/manifests/_ingress.tpl
+++ b/charts/octavia/charts/helm-toolkit/templates/manifests/_ingress.tpl
@@ -708,10 +708,6 @@
{{- range $v := without (index $endpointHost.tls "dnsNames" | default list) $hostNameFull }}
{{- $vHosts = append $vHosts $v }}
{{- end }}
-{{- if hasKey $envAll.Values.endpoints "alias_fqdn" }}
-{{- $alias_host := $envAll.Values.endpoints.alias_fqdn }}
-{{- $vHosts = append $vHosts $alias_host }}
-{{- end }}
{{- $secretName := index $envAll.Values.secrets "tls" ( $backendServiceType | replace "-" "_" ) $backendService $endpoint }}
{{- $_ := required "You need to specify a secret in your values for the endpoint" $secretName }}
tls:
diff --git a/charts/octavia/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/octavia/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
index c6a7521..1e28da9 100644
--- a/charts/octavia/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
+++ b/charts/octavia/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Drop')
@@ -126,7 +125,7 @@
# Delete DB
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP DATABASE IF EXISTS {0}".format(database)))
+ connection.execute("DROP DATABASE IF EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -139,7 +138,7 @@
# Delete DB User
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP USER IF EXISTS {0}".format(user)))
+ connection.execute("DROP USER IF EXISTS {0}".format(user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/octavia/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/octavia/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
index 1917f78..110cd98 100644
--- a/charts/octavia/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
+++ b/charts/octavia/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Init')
@@ -126,7 +125,7 @@
# Create DB
try:
with root_engine.connect() as connection:
- connection.execute(text("CREATE DATABASE IF NOT EXISTS {0}".format(database)))
+ connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -140,10 +139,10 @@
try:
with root_engine.connect() as connection:
connection.execute(
- text("CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
- user, password, mysql_x509)))
+ "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
+ user, password, mysql_x509))
connection.execute(
- text("GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)))
+ "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/octavia/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl b/charts/octavia/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
index e6e9c6e..3739f95 100644
--- a/charts/octavia/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
+++ b/charts/octavia/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
@@ -29,9 +29,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_ADMIN_PASSWORD=$(echo "${RABBITMQ_ADMIN_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User creadential
RABBITMQ_USERNAME=$(echo "${RABBITMQ_USER_CONNECTION}" | \
@@ -39,9 +37,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_PASSWORD=$(echo "${RABBITMQ_USER_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User vHost
RABBITMQ_VHOST=$(echo "${RABBITMQ_USER_CONNECTION}" | \
diff --git a/charts/octavia/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl b/charts/octavia/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
index 5c2dedb..48b53fa 100644
--- a/charts/octavia/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
+++ b/charts/octavia/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
@@ -40,9 +40,6 @@
release_group: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
application: {{ $application }}
component: {{ $component }}
-app.kubernetes.io/name: {{ $application }}
-app.kubernetes.io/component: {{ $component }}
-app.kubernetes.io/instance: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
{{- if ($envAll.Values.pod).labels }}
{{- if hasKey $envAll.Values.pod.labels $component }}
{{ index $envAll.Values.pod "labels" $component | toYaml }}
diff --git a/charts/octavia/charts/helm-toolkit/templates/snippets/_service_params.tpl b/charts/octavia/charts/helm-toolkit/templates/snippets/_service_params.tpl
deleted file mode 100644
index 6233a93..0000000
--- a/charts/octavia/charts/helm-toolkit/templates/snippets/_service_params.tpl
+++ /dev/null
@@ -1,61 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Inserts kubernetes service parameters from values as is.
-values: |
- network:
- serviceExample:
- service:
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-usage: |
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: 'serviceExample'
- spec:
- ports:
- - name: s-example
- port: 1111
- {{ .Values.network.serviceExample | include "helm-toolkit.snippets.service_params" | indent 2 }}
-return: |
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-*/}}
-
-{{- define "helm-toolkit.snippets.service_params" }}
-{{- $serviceParams := dict }}
-{{- if hasKey . "service" }}
-{{- $serviceParams = .service }}
-{{- end }}
-{{- if hasKey . "node_port" }}
-{{- if hasKey .node_port "enabled" }}
-{{- if .node_port.enabled }}
-{{- $_ := set $serviceParams "type" "NodePort" }}
-{{- end }}
-{{- end }}
-{{- end }}
-{{- if hasKey . "external_policy_local" }}
-{{- if .external_policy_local }}
-{{- $_ := set $serviceParams "externalTrafficPolicy" "Local" }}
-{{- end }}
-{{- end }}
-{{- if $serviceParams }}
-{{- $serviceParams | toYaml }}
-{{- end }}
-{{- end }}
diff --git a/charts/octavia/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl b/charts/octavia/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
deleted file mode 100644
index bdb28c3..0000000
--- a/charts/octavia/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
+++ /dev/null
@@ -1,279 +0,0 @@
-{{/*
-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.
-*/}}
-
-{{/*
-
-The helm-toolkit.utils.daemonset_overrides function have some limitations:
-
- * it allows to override only conf values specifid in configmap-etc
- * it doesn't allow to override values for daemonsets passed via env variables
- or via damoenset definition. As result it is impossible to have mixed
- deployment when one compute is configured with dpdk while other not.
- * it is impossible to override interface names/other information stored in
- <service>-bin configmap
- * It allows to schedule on both hosts and labels, which adds some
- uncertainty
-
-This implementation is intended to handle those limitations:
-
- * it allows to schedule only based on labels
- * it creates <service>-bin per daemonset override
- * it allows to override values when rendering daemonsets
-
- It picks data from the following structure:
-
- .Values:
- overrides:
- mychart_mydaemonset:
- labels:
- label::value:
- values:
- override_root_option: override_root_value
- conf:
- ovs_dpdk:
- enabled: true
- neutron:
- DEFAULT:
- foo: bar
-
-*/}}
-
-{{- define "helm-toolkit.utils.daemonset_overrides_root" }}
- {{- $daemonset := index . 0 }}
- {{- $daemonSetTemplateName := index . 1 }}
- {{ $serviceAccountName := index . 2 }}
- {{- $configmap_include := index . 3 }}
- {{- $configmap_name := index . 4 }}
- {{- $configbin_include := index . 5 }}
- {{- $configbin_name := index . 6 }}
- {{- $context := index . 7 }}
-
- {{- $_ := unset $context ".Files" }}
- {{- $daemonset_root_name := printf (print $context.Chart.Name "_" $daemonset) }}
- {{- $_ := set $context.Values "__daemonset_list" list }}
- {{- $_ := set $context.Values "__default" dict }}
-
- {{- $default_enabled := true }}
- {{- if hasKey $context.Values "overrides" }}
- {{- range $key, $val := $context.Values.overrides }}
-
- {{- if eq $key $daemonset_root_name }}
- {{- range $type, $type_data := . }}
- {{- if eq $type "overrides_default" }}
- {{- $default_enabled = $type_data }}
- {{- end }}
-
- {{- if eq $type "labels" }}
- {{- $_ := set $context.Values "__label_dict" . }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
- {{/* dictionary that will contain all info needed to generate this
- iteration of the daemonset. */}}
- {{- $_ := set $context.Values "__current_label" dict }}
-
- {{/* set daemonset name */}}
- {{- $_ := set $context.Values.__current_label "name" $label_name }}
-
- {{/* set daemonset metadata annotation */}}
- {{- $_ := set $context.Values.__current_label "daemonset_override" $lname }}
-
- {{/* apply overrides */}}
-
-
- {{- $override_root_copy := $ldata.values }}
- {{/* Deep copy to prevent https://storyboard.openstack.org/#!/story/2005936 */}}
- {{- $root_copy := omit ($context.Values | toYaml | fromYaml) "overrides" }}
- {{- $merged_dict := mergeOverwrite $root_copy $override_root_copy }}
-
- {{- $root_conf_copy2 := dict "values" $merged_dict }}
- {{- $context_values := omit (omit ($context.Values | toYaml | fromYaml) "values") "__daemonset_list" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2.values }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__current_label "nodeData" $root_conf_copy4 }}
-
-
- {{/* Schedule to the provided label value(s) */}}
- {{- $label_dict := dict "key" $label_name }}
- {{- $_ := set $label_dict "values" (list $label_value) }}
- {{- $_ := set $label_dict "operator" "In" }}
- {{- $list_aggregate := list $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
-
- {{/* Do not schedule to other specified labels, with higher
- precedence as the list position increases. Last defined label
- is highest priority. */}}
- {{- $other_labels := omit $context.Values.__label_dict $lname }}
- {{- range $lname2, $ldata2 := $other_labels }}
- {{ $label_name2 := (split "::" $lname2)._0 }}
- {{ $label_value2 := (split "::" $lname2)._1 }}
-
- {{- $label_dict := dict "key" $label_name2 }}
- {{- $_ := set $label_dict "values" (list $label_value2) }}
- {{- $_ := set $label_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__current_label.matchExpressions $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
- {{- end }}
-
- {{/* store completed daemonset entry/info into global list */}}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__current_label }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- $_ := unset $context.Values "__current_label" }}
-
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* scheduler exceptions for the default daemonset */}}
- {{- $_ := set $context.Values.__default "matchExpressions" list }}
-
- {{- range $type, $type_data := . }}
- {{/* Do not schedule to other specified labels */}}
- {{- if eq $type "labels" }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
-
- {{- $default_dict := dict "key" $label_name }}
- {{- $_ := set $default_dict "values" (list $label_value) }}
- {{- $_ := set $default_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__default.matchExpressions $default_dict }}
- {{- $_ := set $context.Values.__default "matchExpressions" $list_aggregate }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* generate the default daemonset */}}
-
- {{/* set name */}}
- {{- $_ := set $context.Values.__default "name" "default" }}
-
- {{/* no overrides apply, so copy as-is */}}
- {{- $root_conf_copy1 := omit $context.Values.conf "overrides" }}
- {{- $root_conf_copy2 := dict "conf" $root_conf_copy1 }}
- {{- $context_values := omit $context.Values "conf" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2 }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__default "nodeData" $root_conf_copy4 }}
-
- {{/* add to global list */}}
- {{- if $default_enabled }}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__default }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- end }}
-
- {{- range $current_dict := $context.Values.__daemonset_list }}
-
- {{- $context_novalues := omit $context "Values" }}
- {{- $merged_dict := mergeOverwrite $context_novalues $current_dict.nodeData }}
- {{- $_ := set $current_dict "nodeData" $merged_dict }}
- {{/* Deep copy original daemonset_yaml */}}
- {{- $daemonset_yaml := list $daemonset $configmap_name $serviceAccountName $merged_dict | include $daemonSetTemplateName | toString | fromYaml }}
- {{- $_ := set $context.Values "__daemonset_yaml" ($daemonset_yaml | toYaml | fromYaml) }}
-
- {{/* Use the following name format $daemonset_root_name + sha256summ($current_dict.matchExpressions)
- as labels might be too long and contain wrong characters like / */}}
- {{- $_ := set $current_dict "dns_1123_name" dict }}
- {{- $name_format := "" }}
- {{- if eq $current_dict.name "default" }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name "default") | replace "_" "-" }}
- {{- else }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name ($current_dict.matchExpressions | quote | sha256sum | trunc 16)) | replace "_" "-" }}
- {{- end }}
- {{- $_ := set $current_dict "dns_1123_name" $name_format }}
-
- {{/* set daemonset metadata name */}}
- {{- if not $context.Values.__daemonset_yaml.metadata }}{{- $_ := set $context.Values.__daemonset_yaml "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.metadata.name }}{{- $_ := set $context.Values.__daemonset_yaml.metadata "name" dict }}{{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata "name" $current_dict.dns_1123_name }}
-
- {{/* cross-reference configmap name to container volume definitions */}}
- {{- $_ := set $context.Values "__volume_list" list }}
- {{- range $current_volume := $context.Values.__daemonset_yaml.spec.template.spec.volumes }}
- {{- $_ := set $context.Values "__volume" $current_volume }}
- {{- if hasKey $context.Values.__volume "secret" }}
- {{- if eq $context.Values.__volume.secret.secretName $configmap_name }}
- {{- $_ := set $context.Values.__volume.secret "secretName" (printf "%s-etc" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- if hasKey $context.Values.__volume "configMap" }}
- {{- if eq $context.Values.__volume.configMap.name $configbin_name }}
- {{- $_ := set $context.Values.__volume.configMap "name" (printf "%s-bin" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- $updated_list := append $context.Values.__volume_list $context.Values.__volume }}
- {{- $_ := set $context.Values "__volume_list" $updated_list }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "volumes" $context.Values.__volume_list }}
-
-
- {{/* populate scheduling restrictions */}}
- {{- if hasKey $current_dict "matchExpressions" }}
- {{- $length := len $current_dict.matchExpressions }}
- {{- if gt $length 0 }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "affinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity "nodeAffinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity "requiredDuringSchedulingIgnoredDuringExecution" dict }}{{- end }}
-
- {{- $expressions_modified := list }}
- {{- if hasKey $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" }}
- {{- range $orig_expression := $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms }}
- {{- $match_expressions_modified := list }}
- {{- $match_expressions_modified = concat $match_expressions_modified $current_dict.matchExpressions }}
- {{- if hasKey $orig_expression "matchExpressions" }}
- {{- $match_expressions_modified = concat $match_expressions_modified $orig_expression.matchExpressions }}
- {{- $expressions_modified = append $expressions_modified (dict "matchExpressions" $match_expressions_modified) }}
- {{- end }}
- {{- end }}
- {{- else }}
- {{- $expressions_modified = (list (dict "matchExpressions" $current_dict.matchExpressions)) }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" $expressions_modified }}
- {{- end }}
- {{- end }}
-
- {{/* input value hash for current set of values overrides */}}
- {{- if not $context.Values.__daemonset_yaml.spec }}{{- $_ := set $context.Values.__daemonset_yaml "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template }}{{- $_ := set $context.Values.__daemonset_yaml.spec "template" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata.annotations }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata "annotations" dict }}{{- end }}
- {{- $cmap := list (printf "%s-etc" $current_dict.dns_1123_name) $current_dict.nodeData | include $configmap_include }}
- {{- $cmap_bin := list (printf "%s-bin" $current_dict.dns_1123_name) $current_dict.nodeData | include $configbin_include }}
- {{- $values_cmap_hash := $cmap | quote | sha256sum }}
- {{- $values_cmap_bin_hash := $cmap_bin | quote | sha256sum }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-etc-hash" $values_cmap_hash }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-bin-hash" $values_cmap_bin_hash }}
-
- {{/* Do not set override for default daemonset */}}
- {{- if $current_dict.daemonset_override }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata.annotations "daemonset_override" $current_dict.daemonset_override }}
- {{- end }}
-
-{{/* generate configmap */}}
----
-{{ $cmap }}
- {{/* generate <service>-bin yaml */}}
----
-{{ $cmap_bin }}
- {{/* generate daemonset yaml */}}
----
-{{ $context.Values.__daemonset_yaml | toYaml }}
- {{- end }}
-{{- end }}
diff --git a/charts/octavia/requirements.lock b/charts/octavia/requirements.lock
index b94dead..4f63a87 100644
--- a/charts/octavia/requirements.lock
+++ b/charts/octavia/requirements.lock
@@ -1,6 +1,6 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
-digest: sha256:760c5997580ac8d30a64dfe92d6a54052b783ddf90cacbc5a4c95c1330988742
+ version: 0.2.69
+digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef
generated: "0001-01-01T00:00:00Z"
diff --git a/charts/octavia/requirements.yaml b/charts/octavia/requirements.yaml
index 52e723e..b3d5dcf 100644
--- a/charts/octavia/requirements.yaml
+++ b/charts/octavia/requirements.yaml
@@ -1,4 +1,4 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
+ version: 0.2.69
diff --git a/charts/openvswitch/charts/helm-toolkit/Chart.yaml b/charts/openvswitch/charts/helm-toolkit/Chart.yaml
index 9d3aa1e..d4c0ea2 100644
--- a/charts/openvswitch/charts/helm-toolkit/Chart.yaml
+++ b/charts/openvswitch/charts/helm-toolkit/Chart.yaml
@@ -9,4 +9,4 @@
sources:
- https://opendev.org/openstack/openstack-helm-infra
- https://opendev.org/openstack/openstack-helm
-version: 0.2.78
+version: 0.2.69
diff --git a/charts/openvswitch/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl b/charts/openvswitch/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
index 728b994..6877b7b 100644
--- a/charts/openvswitch/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
+++ b/charts/openvswitch/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
@@ -14,8 +14,7 @@
{{/*
abstract: |
- Resolves 'hostname:port' for an endpoint, or several hostname:port pairs for statefulset e.g
- 'hostname1:port1,hostname2:port2,hostname3:port3',
+ Resolves 'hostname:port' for an endpoint
examples:
- values: |
endpoints:
@@ -47,23 +46,6 @@
{{ tuple "oslo_db" "internal" "mysql" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
return: |
127.0.0.1:3306
- - values: |
- endpoints:
- oslo_cache:
- hosts:
- default: memcached
- host_fqdn_override:
- default: null
- statefulset:
- name: openstack-memcached-memcached
- replicas: 3
- port:
- memcache:
- default: 11211
- usage: |
- {{ tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
- return: |
- openstack-memcached-memcached-0:11211,openstack-memcached-memcached-1:11211,openstack-memcached-memcached-2:11211
*/}}
{{- define "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" -}}
@@ -71,19 +53,7 @@
{{- $endpoint := index . 1 -}}
{{- $port := index . 2 -}}
{{- $context := index . 3 -}}
-{{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false -}}
-{{- $local := dict "endpointHosts" list -}}
-{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" -}}
-{{- if $ssMap -}}
-{{- $endpointHostPrefix := $ssMap.name -}}
-{{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
-{{- range $podInt := until ( atoi (print $ssMap.replicas ) ) -}}
-{{- $endpointHostname := printf "%s-%d.%s:%s" $endpointHostPrefix $podInt $endpointHostSuffix $endpointPort -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts $endpointHostname ) -}}
-{{- end -}}
-{{- else -}}
-{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts (printf "%s:%s" $endpointHostname $endpointPort) ) -}}
-{{- end -}}
-{{ include "helm-toolkit.utils.joinListWithComma" $local.endpointHosts }}
+{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
+{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
+{{- printf "%s:%s" $endpointHostname $endpointPort -}}
{{- end -}}
diff --git a/charts/openvswitch/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl b/charts/openvswitch/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
index 24eb569..b2ec648 100644
--- a/charts/openvswitch/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
+++ b/charts/openvswitch/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
@@ -40,9 +40,9 @@
{{- $context := index . 3 -}}
{{- $endpointMap := index $context.Values.endpoints ( $type | replace "-" "_" ) }}
{{- if kindIs "string" $endpointMap.path }}
-{{- printf "%s" $endpointMap.path | default "" -}}
+{{- printf "%s" $endpointMap.path | default "/" -}}
{{- else -}}
-{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "" }}
+{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "/" }}
{{- printf "%s" $endpointPath -}}
{{- end -}}
{{- end -}}
diff --git a/charts/openvswitch/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl b/charts/openvswitch/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
deleted file mode 100644
index 332ca99..0000000
--- a/charts/openvswitch/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
+++ /dev/null
@@ -1,51 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Renders out the configmap <service>-oslo-policy.
-values: |
- conf:
- policy.d:
- file1:
- foo: bar
- file2:
- foo: baz
-usage: |
-{{- include "helm-toolkit.manifests.configmap_oslo_policy" (dict "envAll" $envAll "serviceName" "keystone") }}
-return: |
- ---
- apiVersion: v1
- kind: Secret
- metadata:
- name: keystone-oslo-policy
- data:
- file1: base64of(foo: bar)
- file2: base64of(foo: baz)
-*/}}
-{{- define "helm-toolkit.manifests.configmap_oslo_policy" -}}
-{{- $envAll := index . "envAll" -}}
-{{- $serviceName := index . "serviceName" -}}
----
-apiVersion: v1
-kind: Secret
-metadata:
- name: {{ $serviceName }}-oslo-policy
-type: Opaque
-data:
- {{- range $key, $value := index $envAll.Values.conf "policy.d" }}
- {{- if $value }}
- {{ $key }}: {{ toYaml $value | b64enc }}
- {{- else }}
- {{ $key }}: {{ "\n" | b64enc }}
- {{- end }}
- {{- end }}
-{{- end -}}
diff --git a/charts/openvswitch/charts/helm-toolkit/templates/manifests/_ingress.tpl b/charts/openvswitch/charts/helm-toolkit/templates/manifests/_ingress.tpl
index 792571c..cacb4b8 100644
--- a/charts/openvswitch/charts/helm-toolkit/templates/manifests/_ingress.tpl
+++ b/charts/openvswitch/charts/helm-toolkit/templates/manifests/_ingress.tpl
@@ -708,10 +708,6 @@
{{- range $v := without (index $endpointHost.tls "dnsNames" | default list) $hostNameFull }}
{{- $vHosts = append $vHosts $v }}
{{- end }}
-{{- if hasKey $envAll.Values.endpoints "alias_fqdn" }}
-{{- $alias_host := $envAll.Values.endpoints.alias_fqdn }}
-{{- $vHosts = append $vHosts $alias_host }}
-{{- end }}
{{- $secretName := index $envAll.Values.secrets "tls" ( $backendServiceType | replace "-" "_" ) $backendService $endpoint }}
{{- $_ := required "You need to specify a secret in your values for the endpoint" $secretName }}
tls:
diff --git a/charts/openvswitch/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/openvswitch/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
index c6a7521..1e28da9 100644
--- a/charts/openvswitch/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
+++ b/charts/openvswitch/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Drop')
@@ -126,7 +125,7 @@
# Delete DB
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP DATABASE IF EXISTS {0}".format(database)))
+ connection.execute("DROP DATABASE IF EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -139,7 +138,7 @@
# Delete DB User
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP USER IF EXISTS {0}".format(user)))
+ connection.execute("DROP USER IF EXISTS {0}".format(user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/openvswitch/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/openvswitch/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
index 1917f78..110cd98 100644
--- a/charts/openvswitch/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
+++ b/charts/openvswitch/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Init')
@@ -126,7 +125,7 @@
# Create DB
try:
with root_engine.connect() as connection:
- connection.execute(text("CREATE DATABASE IF NOT EXISTS {0}".format(database)))
+ connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -140,10 +139,10 @@
try:
with root_engine.connect() as connection:
connection.execute(
- text("CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
- user, password, mysql_x509)))
+ "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
+ user, password, mysql_x509))
connection.execute(
- text("GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)))
+ "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/openvswitch/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl b/charts/openvswitch/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
index e6e9c6e..3739f95 100644
--- a/charts/openvswitch/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
+++ b/charts/openvswitch/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
@@ -29,9 +29,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_ADMIN_PASSWORD=$(echo "${RABBITMQ_ADMIN_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User creadential
RABBITMQ_USERNAME=$(echo "${RABBITMQ_USER_CONNECTION}" | \
@@ -39,9 +37,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_PASSWORD=$(echo "${RABBITMQ_USER_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User vHost
RABBITMQ_VHOST=$(echo "${RABBITMQ_USER_CONNECTION}" | \
diff --git a/charts/openvswitch/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl b/charts/openvswitch/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
index 5c2dedb..48b53fa 100644
--- a/charts/openvswitch/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
+++ b/charts/openvswitch/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
@@ -40,9 +40,6 @@
release_group: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
application: {{ $application }}
component: {{ $component }}
-app.kubernetes.io/name: {{ $application }}
-app.kubernetes.io/component: {{ $component }}
-app.kubernetes.io/instance: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
{{- if ($envAll.Values.pod).labels }}
{{- if hasKey $envAll.Values.pod.labels $component }}
{{ index $envAll.Values.pod "labels" $component | toYaml }}
diff --git a/charts/openvswitch/charts/helm-toolkit/templates/snippets/_service_params.tpl b/charts/openvswitch/charts/helm-toolkit/templates/snippets/_service_params.tpl
deleted file mode 100644
index 6233a93..0000000
--- a/charts/openvswitch/charts/helm-toolkit/templates/snippets/_service_params.tpl
+++ /dev/null
@@ -1,61 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Inserts kubernetes service parameters from values as is.
-values: |
- network:
- serviceExample:
- service:
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-usage: |
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: 'serviceExample'
- spec:
- ports:
- - name: s-example
- port: 1111
- {{ .Values.network.serviceExample | include "helm-toolkit.snippets.service_params" | indent 2 }}
-return: |
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-*/}}
-
-{{- define "helm-toolkit.snippets.service_params" }}
-{{- $serviceParams := dict }}
-{{- if hasKey . "service" }}
-{{- $serviceParams = .service }}
-{{- end }}
-{{- if hasKey . "node_port" }}
-{{- if hasKey .node_port "enabled" }}
-{{- if .node_port.enabled }}
-{{- $_ := set $serviceParams "type" "NodePort" }}
-{{- end }}
-{{- end }}
-{{- end }}
-{{- if hasKey . "external_policy_local" }}
-{{- if .external_policy_local }}
-{{- $_ := set $serviceParams "externalTrafficPolicy" "Local" }}
-{{- end }}
-{{- end }}
-{{- if $serviceParams }}
-{{- $serviceParams | toYaml }}
-{{- end }}
-{{- end }}
diff --git a/charts/openvswitch/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl b/charts/openvswitch/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
deleted file mode 100644
index bdb28c3..0000000
--- a/charts/openvswitch/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
+++ /dev/null
@@ -1,279 +0,0 @@
-{{/*
-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.
-*/}}
-
-{{/*
-
-The helm-toolkit.utils.daemonset_overrides function have some limitations:
-
- * it allows to override only conf values specifid in configmap-etc
- * it doesn't allow to override values for daemonsets passed via env variables
- or via damoenset definition. As result it is impossible to have mixed
- deployment when one compute is configured with dpdk while other not.
- * it is impossible to override interface names/other information stored in
- <service>-bin configmap
- * It allows to schedule on both hosts and labels, which adds some
- uncertainty
-
-This implementation is intended to handle those limitations:
-
- * it allows to schedule only based on labels
- * it creates <service>-bin per daemonset override
- * it allows to override values when rendering daemonsets
-
- It picks data from the following structure:
-
- .Values:
- overrides:
- mychart_mydaemonset:
- labels:
- label::value:
- values:
- override_root_option: override_root_value
- conf:
- ovs_dpdk:
- enabled: true
- neutron:
- DEFAULT:
- foo: bar
-
-*/}}
-
-{{- define "helm-toolkit.utils.daemonset_overrides_root" }}
- {{- $daemonset := index . 0 }}
- {{- $daemonSetTemplateName := index . 1 }}
- {{ $serviceAccountName := index . 2 }}
- {{- $configmap_include := index . 3 }}
- {{- $configmap_name := index . 4 }}
- {{- $configbin_include := index . 5 }}
- {{- $configbin_name := index . 6 }}
- {{- $context := index . 7 }}
-
- {{- $_ := unset $context ".Files" }}
- {{- $daemonset_root_name := printf (print $context.Chart.Name "_" $daemonset) }}
- {{- $_ := set $context.Values "__daemonset_list" list }}
- {{- $_ := set $context.Values "__default" dict }}
-
- {{- $default_enabled := true }}
- {{- if hasKey $context.Values "overrides" }}
- {{- range $key, $val := $context.Values.overrides }}
-
- {{- if eq $key $daemonset_root_name }}
- {{- range $type, $type_data := . }}
- {{- if eq $type "overrides_default" }}
- {{- $default_enabled = $type_data }}
- {{- end }}
-
- {{- if eq $type "labels" }}
- {{- $_ := set $context.Values "__label_dict" . }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
- {{/* dictionary that will contain all info needed to generate this
- iteration of the daemonset. */}}
- {{- $_ := set $context.Values "__current_label" dict }}
-
- {{/* set daemonset name */}}
- {{- $_ := set $context.Values.__current_label "name" $label_name }}
-
- {{/* set daemonset metadata annotation */}}
- {{- $_ := set $context.Values.__current_label "daemonset_override" $lname }}
-
- {{/* apply overrides */}}
-
-
- {{- $override_root_copy := $ldata.values }}
- {{/* Deep copy to prevent https://storyboard.openstack.org/#!/story/2005936 */}}
- {{- $root_copy := omit ($context.Values | toYaml | fromYaml) "overrides" }}
- {{- $merged_dict := mergeOverwrite $root_copy $override_root_copy }}
-
- {{- $root_conf_copy2 := dict "values" $merged_dict }}
- {{- $context_values := omit (omit ($context.Values | toYaml | fromYaml) "values") "__daemonset_list" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2.values }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__current_label "nodeData" $root_conf_copy4 }}
-
-
- {{/* Schedule to the provided label value(s) */}}
- {{- $label_dict := dict "key" $label_name }}
- {{- $_ := set $label_dict "values" (list $label_value) }}
- {{- $_ := set $label_dict "operator" "In" }}
- {{- $list_aggregate := list $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
-
- {{/* Do not schedule to other specified labels, with higher
- precedence as the list position increases. Last defined label
- is highest priority. */}}
- {{- $other_labels := omit $context.Values.__label_dict $lname }}
- {{- range $lname2, $ldata2 := $other_labels }}
- {{ $label_name2 := (split "::" $lname2)._0 }}
- {{ $label_value2 := (split "::" $lname2)._1 }}
-
- {{- $label_dict := dict "key" $label_name2 }}
- {{- $_ := set $label_dict "values" (list $label_value2) }}
- {{- $_ := set $label_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__current_label.matchExpressions $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
- {{- end }}
-
- {{/* store completed daemonset entry/info into global list */}}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__current_label }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- $_ := unset $context.Values "__current_label" }}
-
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* scheduler exceptions for the default daemonset */}}
- {{- $_ := set $context.Values.__default "matchExpressions" list }}
-
- {{- range $type, $type_data := . }}
- {{/* Do not schedule to other specified labels */}}
- {{- if eq $type "labels" }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
-
- {{- $default_dict := dict "key" $label_name }}
- {{- $_ := set $default_dict "values" (list $label_value) }}
- {{- $_ := set $default_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__default.matchExpressions $default_dict }}
- {{- $_ := set $context.Values.__default "matchExpressions" $list_aggregate }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* generate the default daemonset */}}
-
- {{/* set name */}}
- {{- $_ := set $context.Values.__default "name" "default" }}
-
- {{/* no overrides apply, so copy as-is */}}
- {{- $root_conf_copy1 := omit $context.Values.conf "overrides" }}
- {{- $root_conf_copy2 := dict "conf" $root_conf_copy1 }}
- {{- $context_values := omit $context.Values "conf" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2 }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__default "nodeData" $root_conf_copy4 }}
-
- {{/* add to global list */}}
- {{- if $default_enabled }}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__default }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- end }}
-
- {{- range $current_dict := $context.Values.__daemonset_list }}
-
- {{- $context_novalues := omit $context "Values" }}
- {{- $merged_dict := mergeOverwrite $context_novalues $current_dict.nodeData }}
- {{- $_ := set $current_dict "nodeData" $merged_dict }}
- {{/* Deep copy original daemonset_yaml */}}
- {{- $daemonset_yaml := list $daemonset $configmap_name $serviceAccountName $merged_dict | include $daemonSetTemplateName | toString | fromYaml }}
- {{- $_ := set $context.Values "__daemonset_yaml" ($daemonset_yaml | toYaml | fromYaml) }}
-
- {{/* Use the following name format $daemonset_root_name + sha256summ($current_dict.matchExpressions)
- as labels might be too long and contain wrong characters like / */}}
- {{- $_ := set $current_dict "dns_1123_name" dict }}
- {{- $name_format := "" }}
- {{- if eq $current_dict.name "default" }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name "default") | replace "_" "-" }}
- {{- else }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name ($current_dict.matchExpressions | quote | sha256sum | trunc 16)) | replace "_" "-" }}
- {{- end }}
- {{- $_ := set $current_dict "dns_1123_name" $name_format }}
-
- {{/* set daemonset metadata name */}}
- {{- if not $context.Values.__daemonset_yaml.metadata }}{{- $_ := set $context.Values.__daemonset_yaml "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.metadata.name }}{{- $_ := set $context.Values.__daemonset_yaml.metadata "name" dict }}{{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata "name" $current_dict.dns_1123_name }}
-
- {{/* cross-reference configmap name to container volume definitions */}}
- {{- $_ := set $context.Values "__volume_list" list }}
- {{- range $current_volume := $context.Values.__daemonset_yaml.spec.template.spec.volumes }}
- {{- $_ := set $context.Values "__volume" $current_volume }}
- {{- if hasKey $context.Values.__volume "secret" }}
- {{- if eq $context.Values.__volume.secret.secretName $configmap_name }}
- {{- $_ := set $context.Values.__volume.secret "secretName" (printf "%s-etc" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- if hasKey $context.Values.__volume "configMap" }}
- {{- if eq $context.Values.__volume.configMap.name $configbin_name }}
- {{- $_ := set $context.Values.__volume.configMap "name" (printf "%s-bin" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- $updated_list := append $context.Values.__volume_list $context.Values.__volume }}
- {{- $_ := set $context.Values "__volume_list" $updated_list }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "volumes" $context.Values.__volume_list }}
-
-
- {{/* populate scheduling restrictions */}}
- {{- if hasKey $current_dict "matchExpressions" }}
- {{- $length := len $current_dict.matchExpressions }}
- {{- if gt $length 0 }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "affinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity "nodeAffinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity "requiredDuringSchedulingIgnoredDuringExecution" dict }}{{- end }}
-
- {{- $expressions_modified := list }}
- {{- if hasKey $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" }}
- {{- range $orig_expression := $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms }}
- {{- $match_expressions_modified := list }}
- {{- $match_expressions_modified = concat $match_expressions_modified $current_dict.matchExpressions }}
- {{- if hasKey $orig_expression "matchExpressions" }}
- {{- $match_expressions_modified = concat $match_expressions_modified $orig_expression.matchExpressions }}
- {{- $expressions_modified = append $expressions_modified (dict "matchExpressions" $match_expressions_modified) }}
- {{- end }}
- {{- end }}
- {{- else }}
- {{- $expressions_modified = (list (dict "matchExpressions" $current_dict.matchExpressions)) }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" $expressions_modified }}
- {{- end }}
- {{- end }}
-
- {{/* input value hash for current set of values overrides */}}
- {{- if not $context.Values.__daemonset_yaml.spec }}{{- $_ := set $context.Values.__daemonset_yaml "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template }}{{- $_ := set $context.Values.__daemonset_yaml.spec "template" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata.annotations }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata "annotations" dict }}{{- end }}
- {{- $cmap := list (printf "%s-etc" $current_dict.dns_1123_name) $current_dict.nodeData | include $configmap_include }}
- {{- $cmap_bin := list (printf "%s-bin" $current_dict.dns_1123_name) $current_dict.nodeData | include $configbin_include }}
- {{- $values_cmap_hash := $cmap | quote | sha256sum }}
- {{- $values_cmap_bin_hash := $cmap_bin | quote | sha256sum }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-etc-hash" $values_cmap_hash }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-bin-hash" $values_cmap_bin_hash }}
-
- {{/* Do not set override for default daemonset */}}
- {{- if $current_dict.daemonset_override }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata.annotations "daemonset_override" $current_dict.daemonset_override }}
- {{- end }}
-
-{{/* generate configmap */}}
----
-{{ $cmap }}
- {{/* generate <service>-bin yaml */}}
----
-{{ $cmap_bin }}
- {{/* generate daemonset yaml */}}
----
-{{ $context.Values.__daemonset_yaml | toYaml }}
- {{- end }}
-{{- end }}
diff --git a/charts/openvswitch/requirements.lock b/charts/openvswitch/requirements.lock
index b94dead..4f63a87 100644
--- a/charts/openvswitch/requirements.lock
+++ b/charts/openvswitch/requirements.lock
@@ -1,6 +1,6 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
-digest: sha256:760c5997580ac8d30a64dfe92d6a54052b783ddf90cacbc5a4c95c1330988742
+ version: 0.2.69
+digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef
generated: "0001-01-01T00:00:00Z"
diff --git a/charts/openvswitch/requirements.yaml b/charts/openvswitch/requirements.yaml
index 52e723e..b3d5dcf 100644
--- a/charts/openvswitch/requirements.yaml
+++ b/charts/openvswitch/requirements.yaml
@@ -1,4 +1,4 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
+ version: 0.2.69
diff --git a/charts/openvswitch/templates/bin/_openvswitch-vswitchd.sh.tpl b/charts/openvswitch/templates/bin/_openvswitch-vswitchd.sh.tpl
index dad613c..c1419b6 100644
--- a/charts/openvswitch/templates/bin/_openvswitch-vswitchd.sh.tpl
+++ b/charts/openvswitch/templates/bin/_openvswitch-vswitchd.sh.tpl
@@ -25,6 +25,7 @@
{{- if .Values.conf.ovs_dpdk.enabled }}
mkdir -p /run/openvswitch/{{ .Values.conf.ovs_dpdk.vhostuser_socket_dir }}
chown {{ .Values.pod.user.nova.uid }}.{{ .Values.pod.user.nova.uid }} /run/openvswitch/{{ .Values.conf.ovs_dpdk.vhostuser_socket_dir }}
+chown {{ .Values.pod.user.nova.uid }}.{{ .Values.pod.user.nova.uid }} {{ .Values.conf.ovs_dpdk.hugepages_mountpath }}
{{- end }}
function start () {
@@ -118,7 +119,8 @@
-vconsole:err \
-vconsole:info \
--pidfile=${OVS_PID} \
- --mlockall
+ --mlockall \
+ --user={{ .Values.conf.ovs_user_name }}
}
function stop () {
diff --git a/charts/openvswitch/templates/daemonset.yaml b/charts/openvswitch/templates/daemonset.yaml
index 3a66fa5..189b507 100644
--- a/charts/openvswitch/templates/daemonset.yaml
+++ b/charts/openvswitch/templates/daemonset.yaml
@@ -150,10 +150,10 @@
- name: run
mountPath: /run
- name: openvswitch-vswitchd
-{{- if .Values.conf.ovs_dpdk.enabled }}
{{/* Run the container in priviledged mode due to the need for root
-permissions when using the uio_pci_generic driver. */}}
+permissions when using --user to specify non root user. */}}
{{- $_ := set $envAll.Values.pod.security_context.ovs.container.vswitchd "privileged" true -}}
+{{- if .Values.conf.ovs_dpdk.enabled }}
{{/* Limiting CPU cores would severely affect packet throughput
It should be handled through lcore and pmd core masks. */}}
{{- if .Values.pod.resources.enabled }}
@@ -271,4 +271,4 @@
hostPath:
path: /sys/fs/cgroup
{{- end }}
-{{- end }}
\ No newline at end of file
+{{- end }}
diff --git a/charts/openvswitch/values.yaml b/charts/openvswitch/values.yaml
index 01aa93d..5555b60 100644
--- a/charts/openvswitch/values.yaml
+++ b/charts/openvswitch/values.yaml
@@ -241,4 +241,9 @@
# vHost IOMMU feature restricts the vhost memory that a virtio device
# access, available with DPDK v17.11
# vhost_iommu_support: true
+
+ ## OVS supports run in non-root for both OVS and OVS DPDK mode, you can
+ # optionally specify to use user with id 42424, ensure the user exists
+ # in the container image.
+ ovs_user_name: "openvswitch:openvswitch"
...
diff --git a/charts/ovn/charts/helm-toolkit/Chart.yaml b/charts/ovn/charts/helm-toolkit/Chart.yaml
index 9d3aa1e..d4c0ea2 100644
--- a/charts/ovn/charts/helm-toolkit/Chart.yaml
+++ b/charts/ovn/charts/helm-toolkit/Chart.yaml
@@ -9,4 +9,4 @@
sources:
- https://opendev.org/openstack/openstack-helm-infra
- https://opendev.org/openstack/openstack-helm
-version: 0.2.78
+version: 0.2.69
diff --git a/charts/ovn/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl b/charts/ovn/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
index 728b994..6877b7b 100644
--- a/charts/ovn/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
+++ b/charts/ovn/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
@@ -14,8 +14,7 @@
{{/*
abstract: |
- Resolves 'hostname:port' for an endpoint, or several hostname:port pairs for statefulset e.g
- 'hostname1:port1,hostname2:port2,hostname3:port3',
+ Resolves 'hostname:port' for an endpoint
examples:
- values: |
endpoints:
@@ -47,23 +46,6 @@
{{ tuple "oslo_db" "internal" "mysql" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
return: |
127.0.0.1:3306
- - values: |
- endpoints:
- oslo_cache:
- hosts:
- default: memcached
- host_fqdn_override:
- default: null
- statefulset:
- name: openstack-memcached-memcached
- replicas: 3
- port:
- memcache:
- default: 11211
- usage: |
- {{ tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
- return: |
- openstack-memcached-memcached-0:11211,openstack-memcached-memcached-1:11211,openstack-memcached-memcached-2:11211
*/}}
{{- define "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" -}}
@@ -71,19 +53,7 @@
{{- $endpoint := index . 1 -}}
{{- $port := index . 2 -}}
{{- $context := index . 3 -}}
-{{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false -}}
-{{- $local := dict "endpointHosts" list -}}
-{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" -}}
-{{- if $ssMap -}}
-{{- $endpointHostPrefix := $ssMap.name -}}
-{{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
-{{- range $podInt := until ( atoi (print $ssMap.replicas ) ) -}}
-{{- $endpointHostname := printf "%s-%d.%s:%s" $endpointHostPrefix $podInt $endpointHostSuffix $endpointPort -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts $endpointHostname ) -}}
-{{- end -}}
-{{- else -}}
-{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts (printf "%s:%s" $endpointHostname $endpointPort) ) -}}
-{{- end -}}
-{{ include "helm-toolkit.utils.joinListWithComma" $local.endpointHosts }}
+{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
+{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
+{{- printf "%s:%s" $endpointHostname $endpointPort -}}
{{- end -}}
diff --git a/charts/ovn/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl b/charts/ovn/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
index 24eb569..b2ec648 100644
--- a/charts/ovn/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
+++ b/charts/ovn/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
@@ -40,9 +40,9 @@
{{- $context := index . 3 -}}
{{- $endpointMap := index $context.Values.endpoints ( $type | replace "-" "_" ) }}
{{- if kindIs "string" $endpointMap.path }}
-{{- printf "%s" $endpointMap.path | default "" -}}
+{{- printf "%s" $endpointMap.path | default "/" -}}
{{- else -}}
-{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "" }}
+{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "/" }}
{{- printf "%s" $endpointPath -}}
{{- end -}}
{{- end -}}
diff --git a/charts/ovn/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl b/charts/ovn/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
deleted file mode 100644
index 332ca99..0000000
--- a/charts/ovn/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
+++ /dev/null
@@ -1,51 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Renders out the configmap <service>-oslo-policy.
-values: |
- conf:
- policy.d:
- file1:
- foo: bar
- file2:
- foo: baz
-usage: |
-{{- include "helm-toolkit.manifests.configmap_oslo_policy" (dict "envAll" $envAll "serviceName" "keystone") }}
-return: |
- ---
- apiVersion: v1
- kind: Secret
- metadata:
- name: keystone-oslo-policy
- data:
- file1: base64of(foo: bar)
- file2: base64of(foo: baz)
-*/}}
-{{- define "helm-toolkit.manifests.configmap_oslo_policy" -}}
-{{- $envAll := index . "envAll" -}}
-{{- $serviceName := index . "serviceName" -}}
----
-apiVersion: v1
-kind: Secret
-metadata:
- name: {{ $serviceName }}-oslo-policy
-type: Opaque
-data:
- {{- range $key, $value := index $envAll.Values.conf "policy.d" }}
- {{- if $value }}
- {{ $key }}: {{ toYaml $value | b64enc }}
- {{- else }}
- {{ $key }}: {{ "\n" | b64enc }}
- {{- end }}
- {{- end }}
-{{- end -}}
diff --git a/charts/ovn/charts/helm-toolkit/templates/manifests/_ingress.tpl b/charts/ovn/charts/helm-toolkit/templates/manifests/_ingress.tpl
index 792571c..cacb4b8 100644
--- a/charts/ovn/charts/helm-toolkit/templates/manifests/_ingress.tpl
+++ b/charts/ovn/charts/helm-toolkit/templates/manifests/_ingress.tpl
@@ -708,10 +708,6 @@
{{- range $v := without (index $endpointHost.tls "dnsNames" | default list) $hostNameFull }}
{{- $vHosts = append $vHosts $v }}
{{- end }}
-{{- if hasKey $envAll.Values.endpoints "alias_fqdn" }}
-{{- $alias_host := $envAll.Values.endpoints.alias_fqdn }}
-{{- $vHosts = append $vHosts $alias_host }}
-{{- end }}
{{- $secretName := index $envAll.Values.secrets "tls" ( $backendServiceType | replace "-" "_" ) $backendService $endpoint }}
{{- $_ := required "You need to specify a secret in your values for the endpoint" $secretName }}
tls:
diff --git a/charts/ovn/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/ovn/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
index c6a7521..1e28da9 100644
--- a/charts/ovn/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
+++ b/charts/ovn/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Drop')
@@ -126,7 +125,7 @@
# Delete DB
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP DATABASE IF EXISTS {0}".format(database)))
+ connection.execute("DROP DATABASE IF EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -139,7 +138,7 @@
# Delete DB User
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP USER IF EXISTS {0}".format(user)))
+ connection.execute("DROP USER IF EXISTS {0}".format(user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/ovn/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/ovn/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
index 1917f78..110cd98 100644
--- a/charts/ovn/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
+++ b/charts/ovn/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Init')
@@ -126,7 +125,7 @@
# Create DB
try:
with root_engine.connect() as connection:
- connection.execute(text("CREATE DATABASE IF NOT EXISTS {0}".format(database)))
+ connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -140,10 +139,10 @@
try:
with root_engine.connect() as connection:
connection.execute(
- text("CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
- user, password, mysql_x509)))
+ "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
+ user, password, mysql_x509))
connection.execute(
- text("GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)))
+ "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/ovn/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl b/charts/ovn/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
index e6e9c6e..3739f95 100644
--- a/charts/ovn/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
+++ b/charts/ovn/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
@@ -29,9 +29,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_ADMIN_PASSWORD=$(echo "${RABBITMQ_ADMIN_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User creadential
RABBITMQ_USERNAME=$(echo "${RABBITMQ_USER_CONNECTION}" | \
@@ -39,9 +37,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_PASSWORD=$(echo "${RABBITMQ_USER_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User vHost
RABBITMQ_VHOST=$(echo "${RABBITMQ_USER_CONNECTION}" | \
diff --git a/charts/ovn/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl b/charts/ovn/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
index 5c2dedb..48b53fa 100644
--- a/charts/ovn/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
+++ b/charts/ovn/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
@@ -40,9 +40,6 @@
release_group: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
application: {{ $application }}
component: {{ $component }}
-app.kubernetes.io/name: {{ $application }}
-app.kubernetes.io/component: {{ $component }}
-app.kubernetes.io/instance: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
{{- if ($envAll.Values.pod).labels }}
{{- if hasKey $envAll.Values.pod.labels $component }}
{{ index $envAll.Values.pod "labels" $component | toYaml }}
diff --git a/charts/ovn/charts/helm-toolkit/templates/snippets/_service_params.tpl b/charts/ovn/charts/helm-toolkit/templates/snippets/_service_params.tpl
deleted file mode 100644
index 6233a93..0000000
--- a/charts/ovn/charts/helm-toolkit/templates/snippets/_service_params.tpl
+++ /dev/null
@@ -1,61 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Inserts kubernetes service parameters from values as is.
-values: |
- network:
- serviceExample:
- service:
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-usage: |
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: 'serviceExample'
- spec:
- ports:
- - name: s-example
- port: 1111
- {{ .Values.network.serviceExample | include "helm-toolkit.snippets.service_params" | indent 2 }}
-return: |
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-*/}}
-
-{{- define "helm-toolkit.snippets.service_params" }}
-{{- $serviceParams := dict }}
-{{- if hasKey . "service" }}
-{{- $serviceParams = .service }}
-{{- end }}
-{{- if hasKey . "node_port" }}
-{{- if hasKey .node_port "enabled" }}
-{{- if .node_port.enabled }}
-{{- $_ := set $serviceParams "type" "NodePort" }}
-{{- end }}
-{{- end }}
-{{- end }}
-{{- if hasKey . "external_policy_local" }}
-{{- if .external_policy_local }}
-{{- $_ := set $serviceParams "externalTrafficPolicy" "Local" }}
-{{- end }}
-{{- end }}
-{{- if $serviceParams }}
-{{- $serviceParams | toYaml }}
-{{- end }}
-{{- end }}
diff --git a/charts/ovn/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl b/charts/ovn/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
deleted file mode 100644
index bdb28c3..0000000
--- a/charts/ovn/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
+++ /dev/null
@@ -1,279 +0,0 @@
-{{/*
-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.
-*/}}
-
-{{/*
-
-The helm-toolkit.utils.daemonset_overrides function have some limitations:
-
- * it allows to override only conf values specifid in configmap-etc
- * it doesn't allow to override values for daemonsets passed via env variables
- or via damoenset definition. As result it is impossible to have mixed
- deployment when one compute is configured with dpdk while other not.
- * it is impossible to override interface names/other information stored in
- <service>-bin configmap
- * It allows to schedule on both hosts and labels, which adds some
- uncertainty
-
-This implementation is intended to handle those limitations:
-
- * it allows to schedule only based on labels
- * it creates <service>-bin per daemonset override
- * it allows to override values when rendering daemonsets
-
- It picks data from the following structure:
-
- .Values:
- overrides:
- mychart_mydaemonset:
- labels:
- label::value:
- values:
- override_root_option: override_root_value
- conf:
- ovs_dpdk:
- enabled: true
- neutron:
- DEFAULT:
- foo: bar
-
-*/}}
-
-{{- define "helm-toolkit.utils.daemonset_overrides_root" }}
- {{- $daemonset := index . 0 }}
- {{- $daemonSetTemplateName := index . 1 }}
- {{ $serviceAccountName := index . 2 }}
- {{- $configmap_include := index . 3 }}
- {{- $configmap_name := index . 4 }}
- {{- $configbin_include := index . 5 }}
- {{- $configbin_name := index . 6 }}
- {{- $context := index . 7 }}
-
- {{- $_ := unset $context ".Files" }}
- {{- $daemonset_root_name := printf (print $context.Chart.Name "_" $daemonset) }}
- {{- $_ := set $context.Values "__daemonset_list" list }}
- {{- $_ := set $context.Values "__default" dict }}
-
- {{- $default_enabled := true }}
- {{- if hasKey $context.Values "overrides" }}
- {{- range $key, $val := $context.Values.overrides }}
-
- {{- if eq $key $daemonset_root_name }}
- {{- range $type, $type_data := . }}
- {{- if eq $type "overrides_default" }}
- {{- $default_enabled = $type_data }}
- {{- end }}
-
- {{- if eq $type "labels" }}
- {{- $_ := set $context.Values "__label_dict" . }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
- {{/* dictionary that will contain all info needed to generate this
- iteration of the daemonset. */}}
- {{- $_ := set $context.Values "__current_label" dict }}
-
- {{/* set daemonset name */}}
- {{- $_ := set $context.Values.__current_label "name" $label_name }}
-
- {{/* set daemonset metadata annotation */}}
- {{- $_ := set $context.Values.__current_label "daemonset_override" $lname }}
-
- {{/* apply overrides */}}
-
-
- {{- $override_root_copy := $ldata.values }}
- {{/* Deep copy to prevent https://storyboard.openstack.org/#!/story/2005936 */}}
- {{- $root_copy := omit ($context.Values | toYaml | fromYaml) "overrides" }}
- {{- $merged_dict := mergeOverwrite $root_copy $override_root_copy }}
-
- {{- $root_conf_copy2 := dict "values" $merged_dict }}
- {{- $context_values := omit (omit ($context.Values | toYaml | fromYaml) "values") "__daemonset_list" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2.values }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__current_label "nodeData" $root_conf_copy4 }}
-
-
- {{/* Schedule to the provided label value(s) */}}
- {{- $label_dict := dict "key" $label_name }}
- {{- $_ := set $label_dict "values" (list $label_value) }}
- {{- $_ := set $label_dict "operator" "In" }}
- {{- $list_aggregate := list $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
-
- {{/* Do not schedule to other specified labels, with higher
- precedence as the list position increases. Last defined label
- is highest priority. */}}
- {{- $other_labels := omit $context.Values.__label_dict $lname }}
- {{- range $lname2, $ldata2 := $other_labels }}
- {{ $label_name2 := (split "::" $lname2)._0 }}
- {{ $label_value2 := (split "::" $lname2)._1 }}
-
- {{- $label_dict := dict "key" $label_name2 }}
- {{- $_ := set $label_dict "values" (list $label_value2) }}
- {{- $_ := set $label_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__current_label.matchExpressions $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
- {{- end }}
-
- {{/* store completed daemonset entry/info into global list */}}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__current_label }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- $_ := unset $context.Values "__current_label" }}
-
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* scheduler exceptions for the default daemonset */}}
- {{- $_ := set $context.Values.__default "matchExpressions" list }}
-
- {{- range $type, $type_data := . }}
- {{/* Do not schedule to other specified labels */}}
- {{- if eq $type "labels" }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
-
- {{- $default_dict := dict "key" $label_name }}
- {{- $_ := set $default_dict "values" (list $label_value) }}
- {{- $_ := set $default_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__default.matchExpressions $default_dict }}
- {{- $_ := set $context.Values.__default "matchExpressions" $list_aggregate }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* generate the default daemonset */}}
-
- {{/* set name */}}
- {{- $_ := set $context.Values.__default "name" "default" }}
-
- {{/* no overrides apply, so copy as-is */}}
- {{- $root_conf_copy1 := omit $context.Values.conf "overrides" }}
- {{- $root_conf_copy2 := dict "conf" $root_conf_copy1 }}
- {{- $context_values := omit $context.Values "conf" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2 }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__default "nodeData" $root_conf_copy4 }}
-
- {{/* add to global list */}}
- {{- if $default_enabled }}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__default }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- end }}
-
- {{- range $current_dict := $context.Values.__daemonset_list }}
-
- {{- $context_novalues := omit $context "Values" }}
- {{- $merged_dict := mergeOverwrite $context_novalues $current_dict.nodeData }}
- {{- $_ := set $current_dict "nodeData" $merged_dict }}
- {{/* Deep copy original daemonset_yaml */}}
- {{- $daemonset_yaml := list $daemonset $configmap_name $serviceAccountName $merged_dict | include $daemonSetTemplateName | toString | fromYaml }}
- {{- $_ := set $context.Values "__daemonset_yaml" ($daemonset_yaml | toYaml | fromYaml) }}
-
- {{/* Use the following name format $daemonset_root_name + sha256summ($current_dict.matchExpressions)
- as labels might be too long and contain wrong characters like / */}}
- {{- $_ := set $current_dict "dns_1123_name" dict }}
- {{- $name_format := "" }}
- {{- if eq $current_dict.name "default" }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name "default") | replace "_" "-" }}
- {{- else }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name ($current_dict.matchExpressions | quote | sha256sum | trunc 16)) | replace "_" "-" }}
- {{- end }}
- {{- $_ := set $current_dict "dns_1123_name" $name_format }}
-
- {{/* set daemonset metadata name */}}
- {{- if not $context.Values.__daemonset_yaml.metadata }}{{- $_ := set $context.Values.__daemonset_yaml "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.metadata.name }}{{- $_ := set $context.Values.__daemonset_yaml.metadata "name" dict }}{{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata "name" $current_dict.dns_1123_name }}
-
- {{/* cross-reference configmap name to container volume definitions */}}
- {{- $_ := set $context.Values "__volume_list" list }}
- {{- range $current_volume := $context.Values.__daemonset_yaml.spec.template.spec.volumes }}
- {{- $_ := set $context.Values "__volume" $current_volume }}
- {{- if hasKey $context.Values.__volume "secret" }}
- {{- if eq $context.Values.__volume.secret.secretName $configmap_name }}
- {{- $_ := set $context.Values.__volume.secret "secretName" (printf "%s-etc" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- if hasKey $context.Values.__volume "configMap" }}
- {{- if eq $context.Values.__volume.configMap.name $configbin_name }}
- {{- $_ := set $context.Values.__volume.configMap "name" (printf "%s-bin" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- $updated_list := append $context.Values.__volume_list $context.Values.__volume }}
- {{- $_ := set $context.Values "__volume_list" $updated_list }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "volumes" $context.Values.__volume_list }}
-
-
- {{/* populate scheduling restrictions */}}
- {{- if hasKey $current_dict "matchExpressions" }}
- {{- $length := len $current_dict.matchExpressions }}
- {{- if gt $length 0 }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "affinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity "nodeAffinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity "requiredDuringSchedulingIgnoredDuringExecution" dict }}{{- end }}
-
- {{- $expressions_modified := list }}
- {{- if hasKey $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" }}
- {{- range $orig_expression := $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms }}
- {{- $match_expressions_modified := list }}
- {{- $match_expressions_modified = concat $match_expressions_modified $current_dict.matchExpressions }}
- {{- if hasKey $orig_expression "matchExpressions" }}
- {{- $match_expressions_modified = concat $match_expressions_modified $orig_expression.matchExpressions }}
- {{- $expressions_modified = append $expressions_modified (dict "matchExpressions" $match_expressions_modified) }}
- {{- end }}
- {{- end }}
- {{- else }}
- {{- $expressions_modified = (list (dict "matchExpressions" $current_dict.matchExpressions)) }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" $expressions_modified }}
- {{- end }}
- {{- end }}
-
- {{/* input value hash for current set of values overrides */}}
- {{- if not $context.Values.__daemonset_yaml.spec }}{{- $_ := set $context.Values.__daemonset_yaml "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template }}{{- $_ := set $context.Values.__daemonset_yaml.spec "template" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata.annotations }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata "annotations" dict }}{{- end }}
- {{- $cmap := list (printf "%s-etc" $current_dict.dns_1123_name) $current_dict.nodeData | include $configmap_include }}
- {{- $cmap_bin := list (printf "%s-bin" $current_dict.dns_1123_name) $current_dict.nodeData | include $configbin_include }}
- {{- $values_cmap_hash := $cmap | quote | sha256sum }}
- {{- $values_cmap_bin_hash := $cmap_bin | quote | sha256sum }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-etc-hash" $values_cmap_hash }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-bin-hash" $values_cmap_bin_hash }}
-
- {{/* Do not set override for default daemonset */}}
- {{- if $current_dict.daemonset_override }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata.annotations "daemonset_override" $current_dict.daemonset_override }}
- {{- end }}
-
-{{/* generate configmap */}}
----
-{{ $cmap }}
- {{/* generate <service>-bin yaml */}}
----
-{{ $cmap_bin }}
- {{/* generate daemonset yaml */}}
----
-{{ $context.Values.__daemonset_yaml | toYaml }}
- {{- end }}
-{{- end }}
diff --git a/charts/ovn/requirements.lock b/charts/ovn/requirements.lock
index b94dead..4f63a87 100644
--- a/charts/ovn/requirements.lock
+++ b/charts/ovn/requirements.lock
@@ -1,6 +1,6 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
-digest: sha256:760c5997580ac8d30a64dfe92d6a54052b783ddf90cacbc5a4c95c1330988742
+ version: 0.2.69
+digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef
generated: "0001-01-01T00:00:00Z"
diff --git a/charts/ovn/requirements.yaml b/charts/ovn/requirements.yaml
index 52e723e..b3d5dcf 100644
--- a/charts/ovn/requirements.yaml
+++ b/charts/ovn/requirements.yaml
@@ -1,4 +1,4 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
+ version: 0.2.69
diff --git a/charts/patches/neutron/0003-fix-neutron-ironic-agent.patch b/charts/patches/neutron/0003-fix-neutron-ironic-agent.patch
new file mode 100644
index 0000000..c112239
--- /dev/null
+++ b/charts/patches/neutron/0003-fix-neutron-ironic-agent.patch
@@ -0,0 +1,108 @@
+diff --git a/neutron/templates/bin/_neutron-ironic-agent-init.sh.tpl b/neutron/templates/bin/_neutron-ironic-agent-init.sh.tpl
+new file mode 100644
+index 00000000..3df3315b
+--- /dev/null
++++ b/neutron/templates/bin/_neutron-ironic-agent-init.sh.tpl
+@@ -0,0 +1,25 @@
++#!/bin/bash
++
++{{/*
++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
++
++{{- if and ( empty .Values.conf.neutron.DEFAULT.host ) ( .Values.pod.use_fqdn.neutron_agent ) }}
++mkdir -p /tmp/pod-shared
++tee > /tmp/pod-shared/neutron-agent.ini << EOF
++[DEFAULT]
++host = $(hostname --fqdn)
++EOF
++{{- end }}
+diff --git a/neutron/templates/configmap-bin.yaml b/neutron/templates/configmap-bin.yaml
+index 2032b156..87b2b798 100644
+--- a/neutron/templates/configmap-bin.yaml
++++ b/neutron/templates/configmap-bin.yaml
+@@ -95,6 +95,8 @@ data:
+ {{ tuple "bin/_neutron-policy-server.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
+ neutron-rpc-server.sh: |
+ {{ tuple "bin/_neutron-rpc-server.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
++ neutron-ironic-agent-init.sh: |
++{{ tuple "bin/_neutron-ironic-agent-init.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
+ neutron-ironic-agent.sh: |
+ {{ tuple "bin/_neutron-ironic-agent.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
+ neutron-netns-cleanup-cron.sh: |
+diff --git a/neutron/templates/deployment-ironic-agent.yaml b/neutron/templates/deployment-ironic-agent.yaml
+index 014c9adf..1b468e2b 100644
+--- a/neutron/templates/deployment-ironic-agent.yaml
++++ b/neutron/templates/deployment-ironic-agent.yaml
+@@ -60,6 +60,19 @@ spec:
+ terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.ironic_agent.timeout | default "30" }}
+ initContainers:
+ {{ tuple $envAll "pod_dependency" $mounts_neutron_ironic_agent_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
++ - name: neutron-ironic-agent-init
++{{ tuple $envAll "neutron_ironic_agent_init" | include "helm-toolkit.snippets.image" | indent 10 }}
++{{ tuple $envAll $envAll.Values.pod.resources.ironic_agent | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
++{{ dict "envAll" $envAll "application" "neutron_ironic_agent" "container" "neutron_ironic_agent_init" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
++ command:
++ - /tmp/neutron-ironic-agent-init.sh
++ volumeMounts:
++ - name: pod-shared
++ mountPath: /tmp/pod-shared
++ - name: neutron-bin
++ mountPath: /tmp/neutron-ironic-agent-init.sh
++ subPath: neutron-ironic-agent-init.sh
++ readOnly: true
+ containers:
+ - name: neutron-ironic-agent
+ {{ tuple $envAll "neutron_ironic_agent" | include "helm-toolkit.snippets.image" | indent 10 }}
+@@ -79,6 +92,8 @@ spec:
+ mountPath: /tmp
+ - name: pod-var-neutron
+ mountPath: {{ .Values.conf.neutron.DEFAULT.state_path }}
++ - name: pod-shared
++ mountPath: /tmp/pod-shared
+ - name: neutron-bin
+ mountPath: /tmp/neutron-ironic-agent.sh
+ subPath: neutron-ironic-agent.sh
+@@ -104,6 +119,8 @@ spec:
+ emptyDir: {}
+ - name: pod-var-neutron
+ emptyDir: {}
++ - name: pod-shared
++ mountPath: /tmp/pod-shared
+ - name: neutron-bin
+ configMap:
+ name: neutron-bin
+diff --git a/neutron/values.yaml b/neutron/values.yaml
+index 819d7853..b1ff4569 100644
+--- a/neutron/values.yaml
++++ b/neutron/values.yaml
+@@ -46,6 +46,7 @@ images:
+ neutron_sriov_agent_init: docker.io/openstackhelm/neutron:stein-18.04-sriov
+ neutron_bagpipe_bgp: docker.io/openstackhelm/neutron:2024.1-ubuntu_jammy
+ neutron_bgp_dragent: docker.io/openstackhelm/neutron:2024.1-ubuntu_jammy
++ neutron_ironic_agent_init: docker.io/openstackhelm/neutron:2024.1-ubuntu_jammy
+ neutron_ironic_agent: docker.io/openstackhelm/neutron:2024.1-ubuntu_jammy
+ neutron_netns_cleanup_cron: docker.io/openstackhelm/neutron:2024.1-ubuntu_jammy
+ dep_check: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal
+@@ -679,6 +680,9 @@ pod:
+ pod:
+ runAsUser: 42424
+ container:
++ neutron_ironic_agent_init:
++ runAsUser: 0
++ readOnlyRootFilesystem: true
+ neutron_ironic_agent:
+ allowPrivilegeEscalation: false
+ readOnlyRootFilesystem: true
diff --git a/charts/patches/openvswitch/0001-add-openvswitch-user-for-OVS-to-make-it-run-non-root.patch b/charts/patches/openvswitch/0001-add-openvswitch-user-for-OVS-to-make-it-run-non-root.patch
new file mode 100644
index 0000000..327ecad
--- /dev/null
+++ b/charts/patches/openvswitch/0001-add-openvswitch-user-for-OVS-to-make-it-run-non-root.patch
@@ -0,0 +1,74 @@
+From a39ff68c922ecbc1ff9379d7bcd179d0de7d6643 Mon Sep 17 00:00:00 2001
+From: Yaguang Tang <yaguang.tang@vexxhost.com>
+Date: Sun, 19 Jan 2025 18:51:49 +0800
+Subject: [PATCH] add openvswitch user for OVS to make it run non-root
+
+Change-Id: Ib46f95221c4a978a78675c5140bbb8dfdabea3b7
+---
+ openvswitch/templates/bin/_openvswitch-vswitchd.sh.tpl | 4 +++-
+ openvswitch/templates/daemonset.yaml | 6 +++---
+ openvswitch/values.yaml | 5 +++++
+ 3 files changed, 11 insertions(+), 4 deletions(-)
+
+diff --git a/openvswitch/templates/bin/_openvswitch-vswitchd.sh.tpl b/openvswitch/templates/bin/_openvswitch-vswitchd.sh.tpl
+index dad613c3..c1419b66 100644
+--- a/openvswitch/templates/bin/_openvswitch-vswitchd.sh.tpl
++++ b/openvswitch/templates/bin/_openvswitch-vswitchd.sh.tpl
+@@ -25,6 +25,7 @@ OVS_PID=/run/openvswitch/ovs-vswitchd.pid
+ {{- if .Values.conf.ovs_dpdk.enabled }}
+ mkdir -p /run/openvswitch/{{ .Values.conf.ovs_dpdk.vhostuser_socket_dir }}
+ chown {{ .Values.pod.user.nova.uid }}.{{ .Values.pod.user.nova.uid }} /run/openvswitch/{{ .Values.conf.ovs_dpdk.vhostuser_socket_dir }}
++chown {{ .Values.pod.user.nova.uid }}.{{ .Values.pod.user.nova.uid }} {{ .Values.conf.ovs_dpdk.hugepages_mountpath }}
+ {{- end }}
+
+ function start () {
+@@ -118,7 +119,8 @@ function start () {
+ -vconsole:err \
+ -vconsole:info \
+ --pidfile=${OVS_PID} \
+- --mlockall
++ --mlockall \
++ --user={{ .Values.conf.ovs_user_name }}
+ }
+
+ function stop () {
+diff --git a/openvswitch/templates/daemonset.yaml b/openvswitch/templates/daemonset.yaml
+index 3a66fa51..189b507a 100644
+--- a/openvswitch/templates/daemonset.yaml
++++ b/openvswitch/templates/daemonset.yaml
+@@ -150,10 +150,10 @@ spec:
+ - name: run
+ mountPath: /run
+ - name: openvswitch-vswitchd
+-{{- if .Values.conf.ovs_dpdk.enabled }}
+ {{/* Run the container in priviledged mode due to the need for root
+-permissions when using the uio_pci_generic driver. */}}
++permissions when using --user to specify non root user. */}}
+ {{- $_ := set $envAll.Values.pod.security_context.ovs.container.vswitchd "privileged" true -}}
++{{- if .Values.conf.ovs_dpdk.enabled }}
+ {{/* Limiting CPU cores would severely affect packet throughput
+ It should be handled through lcore and pmd core masks. */}}
+ {{- if .Values.pod.resources.enabled }}
+@@ -271,4 +271,4 @@ It should be handled through lcore and pmd core masks. */}}
+ hostPath:
+ path: /sys/fs/cgroup
+ {{- end }}
+-{{- end }}
+\ No newline at end of file
++{{- end }}
+diff --git a/openvswitch/values.yaml b/openvswitch/values.yaml
+index 01aa93d3..5555b60f 100644
+--- a/openvswitch/values.yaml
++++ b/openvswitch/values.yaml
+@@ -241,4 +241,9 @@ conf:
+ # vHost IOMMU feature restricts the vhost memory that a virtio device
+ # access, available with DPDK v17.11
+ # vhost_iommu_support: true
++
++ ## OVS supports run in non-root for both OVS and OVS DPDK mode, you can
++ # optionally specify to use user with id 42424, ensure the user exists
++ # in the container image.
++ ovs_user_name: "openvswitch:openvswitch"
+ ...
+--
+2.39.5 (Apple Git-154)
diff --git a/charts/placement/charts/helm-toolkit/Chart.yaml b/charts/placement/charts/helm-toolkit/Chart.yaml
index 9d3aa1e..d4c0ea2 100644
--- a/charts/placement/charts/helm-toolkit/Chart.yaml
+++ b/charts/placement/charts/helm-toolkit/Chart.yaml
@@ -9,4 +9,4 @@
sources:
- https://opendev.org/openstack/openstack-helm-infra
- https://opendev.org/openstack/openstack-helm
-version: 0.2.78
+version: 0.2.69
diff --git a/charts/placement/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl b/charts/placement/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
index 728b994..6877b7b 100644
--- a/charts/placement/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
+++ b/charts/placement/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
@@ -14,8 +14,7 @@
{{/*
abstract: |
- Resolves 'hostname:port' for an endpoint, or several hostname:port pairs for statefulset e.g
- 'hostname1:port1,hostname2:port2,hostname3:port3',
+ Resolves 'hostname:port' for an endpoint
examples:
- values: |
endpoints:
@@ -47,23 +46,6 @@
{{ tuple "oslo_db" "internal" "mysql" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
return: |
127.0.0.1:3306
- - values: |
- endpoints:
- oslo_cache:
- hosts:
- default: memcached
- host_fqdn_override:
- default: null
- statefulset:
- name: openstack-memcached-memcached
- replicas: 3
- port:
- memcache:
- default: 11211
- usage: |
- {{ tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
- return: |
- openstack-memcached-memcached-0:11211,openstack-memcached-memcached-1:11211,openstack-memcached-memcached-2:11211
*/}}
{{- define "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" -}}
@@ -71,19 +53,7 @@
{{- $endpoint := index . 1 -}}
{{- $port := index . 2 -}}
{{- $context := index . 3 -}}
-{{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false -}}
-{{- $local := dict "endpointHosts" list -}}
-{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" -}}
-{{- if $ssMap -}}
-{{- $endpointHostPrefix := $ssMap.name -}}
-{{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
-{{- range $podInt := until ( atoi (print $ssMap.replicas ) ) -}}
-{{- $endpointHostname := printf "%s-%d.%s:%s" $endpointHostPrefix $podInt $endpointHostSuffix $endpointPort -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts $endpointHostname ) -}}
-{{- end -}}
-{{- else -}}
-{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts (printf "%s:%s" $endpointHostname $endpointPort) ) -}}
-{{- end -}}
-{{ include "helm-toolkit.utils.joinListWithComma" $local.endpointHosts }}
+{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
+{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
+{{- printf "%s:%s" $endpointHostname $endpointPort -}}
{{- end -}}
diff --git a/charts/placement/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl b/charts/placement/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
index 24eb569..b2ec648 100644
--- a/charts/placement/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
+++ b/charts/placement/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
@@ -40,9 +40,9 @@
{{- $context := index . 3 -}}
{{- $endpointMap := index $context.Values.endpoints ( $type | replace "-" "_" ) }}
{{- if kindIs "string" $endpointMap.path }}
-{{- printf "%s" $endpointMap.path | default "" -}}
+{{- printf "%s" $endpointMap.path | default "/" -}}
{{- else -}}
-{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "" }}
+{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "/" }}
{{- printf "%s" $endpointPath -}}
{{- end -}}
{{- end -}}
diff --git a/charts/placement/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl b/charts/placement/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
deleted file mode 100644
index 332ca99..0000000
--- a/charts/placement/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
+++ /dev/null
@@ -1,51 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Renders out the configmap <service>-oslo-policy.
-values: |
- conf:
- policy.d:
- file1:
- foo: bar
- file2:
- foo: baz
-usage: |
-{{- include "helm-toolkit.manifests.configmap_oslo_policy" (dict "envAll" $envAll "serviceName" "keystone") }}
-return: |
- ---
- apiVersion: v1
- kind: Secret
- metadata:
- name: keystone-oslo-policy
- data:
- file1: base64of(foo: bar)
- file2: base64of(foo: baz)
-*/}}
-{{- define "helm-toolkit.manifests.configmap_oslo_policy" -}}
-{{- $envAll := index . "envAll" -}}
-{{- $serviceName := index . "serviceName" -}}
----
-apiVersion: v1
-kind: Secret
-metadata:
- name: {{ $serviceName }}-oslo-policy
-type: Opaque
-data:
- {{- range $key, $value := index $envAll.Values.conf "policy.d" }}
- {{- if $value }}
- {{ $key }}: {{ toYaml $value | b64enc }}
- {{- else }}
- {{ $key }}: {{ "\n" | b64enc }}
- {{- end }}
- {{- end }}
-{{- end -}}
diff --git a/charts/placement/charts/helm-toolkit/templates/manifests/_ingress.tpl b/charts/placement/charts/helm-toolkit/templates/manifests/_ingress.tpl
index 792571c..cacb4b8 100644
--- a/charts/placement/charts/helm-toolkit/templates/manifests/_ingress.tpl
+++ b/charts/placement/charts/helm-toolkit/templates/manifests/_ingress.tpl
@@ -708,10 +708,6 @@
{{- range $v := without (index $endpointHost.tls "dnsNames" | default list) $hostNameFull }}
{{- $vHosts = append $vHosts $v }}
{{- end }}
-{{- if hasKey $envAll.Values.endpoints "alias_fqdn" }}
-{{- $alias_host := $envAll.Values.endpoints.alias_fqdn }}
-{{- $vHosts = append $vHosts $alias_host }}
-{{- end }}
{{- $secretName := index $envAll.Values.secrets "tls" ( $backendServiceType | replace "-" "_" ) $backendService $endpoint }}
{{- $_ := required "You need to specify a secret in your values for the endpoint" $secretName }}
tls:
diff --git a/charts/placement/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/placement/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
index c6a7521..1e28da9 100644
--- a/charts/placement/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
+++ b/charts/placement/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Drop')
@@ -126,7 +125,7 @@
# Delete DB
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP DATABASE IF EXISTS {0}".format(database)))
+ connection.execute("DROP DATABASE IF EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -139,7 +138,7 @@
# Delete DB User
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP USER IF EXISTS {0}".format(user)))
+ connection.execute("DROP USER IF EXISTS {0}".format(user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/placement/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/placement/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
index 1917f78..110cd98 100644
--- a/charts/placement/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
+++ b/charts/placement/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Init')
@@ -126,7 +125,7 @@
# Create DB
try:
with root_engine.connect() as connection:
- connection.execute(text("CREATE DATABASE IF NOT EXISTS {0}".format(database)))
+ connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -140,10 +139,10 @@
try:
with root_engine.connect() as connection:
connection.execute(
- text("CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
- user, password, mysql_x509)))
+ "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
+ user, password, mysql_x509))
connection.execute(
- text("GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)))
+ "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/placement/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl b/charts/placement/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
index e6e9c6e..3739f95 100644
--- a/charts/placement/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
+++ b/charts/placement/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
@@ -29,9 +29,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_ADMIN_PASSWORD=$(echo "${RABBITMQ_ADMIN_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User creadential
RABBITMQ_USERNAME=$(echo "${RABBITMQ_USER_CONNECTION}" | \
@@ -39,9 +37,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_PASSWORD=$(echo "${RABBITMQ_USER_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User vHost
RABBITMQ_VHOST=$(echo "${RABBITMQ_USER_CONNECTION}" | \
diff --git a/charts/placement/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl b/charts/placement/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
index 5c2dedb..48b53fa 100644
--- a/charts/placement/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
+++ b/charts/placement/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
@@ -40,9 +40,6 @@
release_group: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
application: {{ $application }}
component: {{ $component }}
-app.kubernetes.io/name: {{ $application }}
-app.kubernetes.io/component: {{ $component }}
-app.kubernetes.io/instance: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
{{- if ($envAll.Values.pod).labels }}
{{- if hasKey $envAll.Values.pod.labels $component }}
{{ index $envAll.Values.pod "labels" $component | toYaml }}
diff --git a/charts/placement/charts/helm-toolkit/templates/snippets/_service_params.tpl b/charts/placement/charts/helm-toolkit/templates/snippets/_service_params.tpl
deleted file mode 100644
index 6233a93..0000000
--- a/charts/placement/charts/helm-toolkit/templates/snippets/_service_params.tpl
+++ /dev/null
@@ -1,61 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Inserts kubernetes service parameters from values as is.
-values: |
- network:
- serviceExample:
- service:
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-usage: |
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: 'serviceExample'
- spec:
- ports:
- - name: s-example
- port: 1111
- {{ .Values.network.serviceExample | include "helm-toolkit.snippets.service_params" | indent 2 }}
-return: |
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-*/}}
-
-{{- define "helm-toolkit.snippets.service_params" }}
-{{- $serviceParams := dict }}
-{{- if hasKey . "service" }}
-{{- $serviceParams = .service }}
-{{- end }}
-{{- if hasKey . "node_port" }}
-{{- if hasKey .node_port "enabled" }}
-{{- if .node_port.enabled }}
-{{- $_ := set $serviceParams "type" "NodePort" }}
-{{- end }}
-{{- end }}
-{{- end }}
-{{- if hasKey . "external_policy_local" }}
-{{- if .external_policy_local }}
-{{- $_ := set $serviceParams "externalTrafficPolicy" "Local" }}
-{{- end }}
-{{- end }}
-{{- if $serviceParams }}
-{{- $serviceParams | toYaml }}
-{{- end }}
-{{- end }}
diff --git a/charts/placement/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl b/charts/placement/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
deleted file mode 100644
index bdb28c3..0000000
--- a/charts/placement/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
+++ /dev/null
@@ -1,279 +0,0 @@
-{{/*
-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.
-*/}}
-
-{{/*
-
-The helm-toolkit.utils.daemonset_overrides function have some limitations:
-
- * it allows to override only conf values specifid in configmap-etc
- * it doesn't allow to override values for daemonsets passed via env variables
- or via damoenset definition. As result it is impossible to have mixed
- deployment when one compute is configured with dpdk while other not.
- * it is impossible to override interface names/other information stored in
- <service>-bin configmap
- * It allows to schedule on both hosts and labels, which adds some
- uncertainty
-
-This implementation is intended to handle those limitations:
-
- * it allows to schedule only based on labels
- * it creates <service>-bin per daemonset override
- * it allows to override values when rendering daemonsets
-
- It picks data from the following structure:
-
- .Values:
- overrides:
- mychart_mydaemonset:
- labels:
- label::value:
- values:
- override_root_option: override_root_value
- conf:
- ovs_dpdk:
- enabled: true
- neutron:
- DEFAULT:
- foo: bar
-
-*/}}
-
-{{- define "helm-toolkit.utils.daemonset_overrides_root" }}
- {{- $daemonset := index . 0 }}
- {{- $daemonSetTemplateName := index . 1 }}
- {{ $serviceAccountName := index . 2 }}
- {{- $configmap_include := index . 3 }}
- {{- $configmap_name := index . 4 }}
- {{- $configbin_include := index . 5 }}
- {{- $configbin_name := index . 6 }}
- {{- $context := index . 7 }}
-
- {{- $_ := unset $context ".Files" }}
- {{- $daemonset_root_name := printf (print $context.Chart.Name "_" $daemonset) }}
- {{- $_ := set $context.Values "__daemonset_list" list }}
- {{- $_ := set $context.Values "__default" dict }}
-
- {{- $default_enabled := true }}
- {{- if hasKey $context.Values "overrides" }}
- {{- range $key, $val := $context.Values.overrides }}
-
- {{- if eq $key $daemonset_root_name }}
- {{- range $type, $type_data := . }}
- {{- if eq $type "overrides_default" }}
- {{- $default_enabled = $type_data }}
- {{- end }}
-
- {{- if eq $type "labels" }}
- {{- $_ := set $context.Values "__label_dict" . }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
- {{/* dictionary that will contain all info needed to generate this
- iteration of the daemonset. */}}
- {{- $_ := set $context.Values "__current_label" dict }}
-
- {{/* set daemonset name */}}
- {{- $_ := set $context.Values.__current_label "name" $label_name }}
-
- {{/* set daemonset metadata annotation */}}
- {{- $_ := set $context.Values.__current_label "daemonset_override" $lname }}
-
- {{/* apply overrides */}}
-
-
- {{- $override_root_copy := $ldata.values }}
- {{/* Deep copy to prevent https://storyboard.openstack.org/#!/story/2005936 */}}
- {{- $root_copy := omit ($context.Values | toYaml | fromYaml) "overrides" }}
- {{- $merged_dict := mergeOverwrite $root_copy $override_root_copy }}
-
- {{- $root_conf_copy2 := dict "values" $merged_dict }}
- {{- $context_values := omit (omit ($context.Values | toYaml | fromYaml) "values") "__daemonset_list" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2.values }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__current_label "nodeData" $root_conf_copy4 }}
-
-
- {{/* Schedule to the provided label value(s) */}}
- {{- $label_dict := dict "key" $label_name }}
- {{- $_ := set $label_dict "values" (list $label_value) }}
- {{- $_ := set $label_dict "operator" "In" }}
- {{- $list_aggregate := list $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
-
- {{/* Do not schedule to other specified labels, with higher
- precedence as the list position increases. Last defined label
- is highest priority. */}}
- {{- $other_labels := omit $context.Values.__label_dict $lname }}
- {{- range $lname2, $ldata2 := $other_labels }}
- {{ $label_name2 := (split "::" $lname2)._0 }}
- {{ $label_value2 := (split "::" $lname2)._1 }}
-
- {{- $label_dict := dict "key" $label_name2 }}
- {{- $_ := set $label_dict "values" (list $label_value2) }}
- {{- $_ := set $label_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__current_label.matchExpressions $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
- {{- end }}
-
- {{/* store completed daemonset entry/info into global list */}}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__current_label }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- $_ := unset $context.Values "__current_label" }}
-
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* scheduler exceptions for the default daemonset */}}
- {{- $_ := set $context.Values.__default "matchExpressions" list }}
-
- {{- range $type, $type_data := . }}
- {{/* Do not schedule to other specified labels */}}
- {{- if eq $type "labels" }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
-
- {{- $default_dict := dict "key" $label_name }}
- {{- $_ := set $default_dict "values" (list $label_value) }}
- {{- $_ := set $default_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__default.matchExpressions $default_dict }}
- {{- $_ := set $context.Values.__default "matchExpressions" $list_aggregate }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* generate the default daemonset */}}
-
- {{/* set name */}}
- {{- $_ := set $context.Values.__default "name" "default" }}
-
- {{/* no overrides apply, so copy as-is */}}
- {{- $root_conf_copy1 := omit $context.Values.conf "overrides" }}
- {{- $root_conf_copy2 := dict "conf" $root_conf_copy1 }}
- {{- $context_values := omit $context.Values "conf" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2 }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__default "nodeData" $root_conf_copy4 }}
-
- {{/* add to global list */}}
- {{- if $default_enabled }}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__default }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- end }}
-
- {{- range $current_dict := $context.Values.__daemonset_list }}
-
- {{- $context_novalues := omit $context "Values" }}
- {{- $merged_dict := mergeOverwrite $context_novalues $current_dict.nodeData }}
- {{- $_ := set $current_dict "nodeData" $merged_dict }}
- {{/* Deep copy original daemonset_yaml */}}
- {{- $daemonset_yaml := list $daemonset $configmap_name $serviceAccountName $merged_dict | include $daemonSetTemplateName | toString | fromYaml }}
- {{- $_ := set $context.Values "__daemonset_yaml" ($daemonset_yaml | toYaml | fromYaml) }}
-
- {{/* Use the following name format $daemonset_root_name + sha256summ($current_dict.matchExpressions)
- as labels might be too long and contain wrong characters like / */}}
- {{- $_ := set $current_dict "dns_1123_name" dict }}
- {{- $name_format := "" }}
- {{- if eq $current_dict.name "default" }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name "default") | replace "_" "-" }}
- {{- else }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name ($current_dict.matchExpressions | quote | sha256sum | trunc 16)) | replace "_" "-" }}
- {{- end }}
- {{- $_ := set $current_dict "dns_1123_name" $name_format }}
-
- {{/* set daemonset metadata name */}}
- {{- if not $context.Values.__daemonset_yaml.metadata }}{{- $_ := set $context.Values.__daemonset_yaml "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.metadata.name }}{{- $_ := set $context.Values.__daemonset_yaml.metadata "name" dict }}{{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata "name" $current_dict.dns_1123_name }}
-
- {{/* cross-reference configmap name to container volume definitions */}}
- {{- $_ := set $context.Values "__volume_list" list }}
- {{- range $current_volume := $context.Values.__daemonset_yaml.spec.template.spec.volumes }}
- {{- $_ := set $context.Values "__volume" $current_volume }}
- {{- if hasKey $context.Values.__volume "secret" }}
- {{- if eq $context.Values.__volume.secret.secretName $configmap_name }}
- {{- $_ := set $context.Values.__volume.secret "secretName" (printf "%s-etc" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- if hasKey $context.Values.__volume "configMap" }}
- {{- if eq $context.Values.__volume.configMap.name $configbin_name }}
- {{- $_ := set $context.Values.__volume.configMap "name" (printf "%s-bin" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- $updated_list := append $context.Values.__volume_list $context.Values.__volume }}
- {{- $_ := set $context.Values "__volume_list" $updated_list }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "volumes" $context.Values.__volume_list }}
-
-
- {{/* populate scheduling restrictions */}}
- {{- if hasKey $current_dict "matchExpressions" }}
- {{- $length := len $current_dict.matchExpressions }}
- {{- if gt $length 0 }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "affinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity "nodeAffinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity "requiredDuringSchedulingIgnoredDuringExecution" dict }}{{- end }}
-
- {{- $expressions_modified := list }}
- {{- if hasKey $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" }}
- {{- range $orig_expression := $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms }}
- {{- $match_expressions_modified := list }}
- {{- $match_expressions_modified = concat $match_expressions_modified $current_dict.matchExpressions }}
- {{- if hasKey $orig_expression "matchExpressions" }}
- {{- $match_expressions_modified = concat $match_expressions_modified $orig_expression.matchExpressions }}
- {{- $expressions_modified = append $expressions_modified (dict "matchExpressions" $match_expressions_modified) }}
- {{- end }}
- {{- end }}
- {{- else }}
- {{- $expressions_modified = (list (dict "matchExpressions" $current_dict.matchExpressions)) }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" $expressions_modified }}
- {{- end }}
- {{- end }}
-
- {{/* input value hash for current set of values overrides */}}
- {{- if not $context.Values.__daemonset_yaml.spec }}{{- $_ := set $context.Values.__daemonset_yaml "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template }}{{- $_ := set $context.Values.__daemonset_yaml.spec "template" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata.annotations }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata "annotations" dict }}{{- end }}
- {{- $cmap := list (printf "%s-etc" $current_dict.dns_1123_name) $current_dict.nodeData | include $configmap_include }}
- {{- $cmap_bin := list (printf "%s-bin" $current_dict.dns_1123_name) $current_dict.nodeData | include $configbin_include }}
- {{- $values_cmap_hash := $cmap | quote | sha256sum }}
- {{- $values_cmap_bin_hash := $cmap_bin | quote | sha256sum }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-etc-hash" $values_cmap_hash }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-bin-hash" $values_cmap_bin_hash }}
-
- {{/* Do not set override for default daemonset */}}
- {{- if $current_dict.daemonset_override }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata.annotations "daemonset_override" $current_dict.daemonset_override }}
- {{- end }}
-
-{{/* generate configmap */}}
----
-{{ $cmap }}
- {{/* generate <service>-bin yaml */}}
----
-{{ $cmap_bin }}
- {{/* generate daemonset yaml */}}
----
-{{ $context.Values.__daemonset_yaml | toYaml }}
- {{- end }}
-{{- end }}
diff --git a/charts/placement/requirements.lock b/charts/placement/requirements.lock
index b94dead..4f63a87 100644
--- a/charts/placement/requirements.lock
+++ b/charts/placement/requirements.lock
@@ -1,6 +1,6 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
-digest: sha256:760c5997580ac8d30a64dfe92d6a54052b783ddf90cacbc5a4c95c1330988742
+ version: 0.2.69
+digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef
generated: "0001-01-01T00:00:00Z"
diff --git a/charts/placement/requirements.yaml b/charts/placement/requirements.yaml
index 52e723e..b3d5dcf 100644
--- a/charts/placement/requirements.yaml
+++ b/charts/placement/requirements.yaml
@@ -1,4 +1,4 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
+ version: 0.2.69
diff --git a/charts/senlin/charts/helm-toolkit/Chart.yaml b/charts/senlin/charts/helm-toolkit/Chart.yaml
index 9d3aa1e..d4c0ea2 100644
--- a/charts/senlin/charts/helm-toolkit/Chart.yaml
+++ b/charts/senlin/charts/helm-toolkit/Chart.yaml
@@ -9,4 +9,4 @@
sources:
- https://opendev.org/openstack/openstack-helm-infra
- https://opendev.org/openstack/openstack-helm
-version: 0.2.78
+version: 0.2.69
diff --git a/charts/senlin/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl b/charts/senlin/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
index 728b994..6877b7b 100644
--- a/charts/senlin/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
+++ b/charts/senlin/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
@@ -14,8 +14,7 @@
{{/*
abstract: |
- Resolves 'hostname:port' for an endpoint, or several hostname:port pairs for statefulset e.g
- 'hostname1:port1,hostname2:port2,hostname3:port3',
+ Resolves 'hostname:port' for an endpoint
examples:
- values: |
endpoints:
@@ -47,23 +46,6 @@
{{ tuple "oslo_db" "internal" "mysql" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
return: |
127.0.0.1:3306
- - values: |
- endpoints:
- oslo_cache:
- hosts:
- default: memcached
- host_fqdn_override:
- default: null
- statefulset:
- name: openstack-memcached-memcached
- replicas: 3
- port:
- memcache:
- default: 11211
- usage: |
- {{ tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
- return: |
- openstack-memcached-memcached-0:11211,openstack-memcached-memcached-1:11211,openstack-memcached-memcached-2:11211
*/}}
{{- define "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" -}}
@@ -71,19 +53,7 @@
{{- $endpoint := index . 1 -}}
{{- $port := index . 2 -}}
{{- $context := index . 3 -}}
-{{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false -}}
-{{- $local := dict "endpointHosts" list -}}
-{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" -}}
-{{- if $ssMap -}}
-{{- $endpointHostPrefix := $ssMap.name -}}
-{{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
-{{- range $podInt := until ( atoi (print $ssMap.replicas ) ) -}}
-{{- $endpointHostname := printf "%s-%d.%s:%s" $endpointHostPrefix $podInt $endpointHostSuffix $endpointPort -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts $endpointHostname ) -}}
-{{- end -}}
-{{- else -}}
-{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts (printf "%s:%s" $endpointHostname $endpointPort) ) -}}
-{{- end -}}
-{{ include "helm-toolkit.utils.joinListWithComma" $local.endpointHosts }}
+{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
+{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
+{{- printf "%s:%s" $endpointHostname $endpointPort -}}
{{- end -}}
diff --git a/charts/senlin/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl b/charts/senlin/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
index 24eb569..b2ec648 100644
--- a/charts/senlin/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
+++ b/charts/senlin/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
@@ -40,9 +40,9 @@
{{- $context := index . 3 -}}
{{- $endpointMap := index $context.Values.endpoints ( $type | replace "-" "_" ) }}
{{- if kindIs "string" $endpointMap.path }}
-{{- printf "%s" $endpointMap.path | default "" -}}
+{{- printf "%s" $endpointMap.path | default "/" -}}
{{- else -}}
-{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "" }}
+{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "/" }}
{{- printf "%s" $endpointPath -}}
{{- end -}}
{{- end -}}
diff --git a/charts/senlin/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl b/charts/senlin/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
deleted file mode 100644
index 332ca99..0000000
--- a/charts/senlin/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
+++ /dev/null
@@ -1,51 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Renders out the configmap <service>-oslo-policy.
-values: |
- conf:
- policy.d:
- file1:
- foo: bar
- file2:
- foo: baz
-usage: |
-{{- include "helm-toolkit.manifests.configmap_oslo_policy" (dict "envAll" $envAll "serviceName" "keystone") }}
-return: |
- ---
- apiVersion: v1
- kind: Secret
- metadata:
- name: keystone-oslo-policy
- data:
- file1: base64of(foo: bar)
- file2: base64of(foo: baz)
-*/}}
-{{- define "helm-toolkit.manifests.configmap_oslo_policy" -}}
-{{- $envAll := index . "envAll" -}}
-{{- $serviceName := index . "serviceName" -}}
----
-apiVersion: v1
-kind: Secret
-metadata:
- name: {{ $serviceName }}-oslo-policy
-type: Opaque
-data:
- {{- range $key, $value := index $envAll.Values.conf "policy.d" }}
- {{- if $value }}
- {{ $key }}: {{ toYaml $value | b64enc }}
- {{- else }}
- {{ $key }}: {{ "\n" | b64enc }}
- {{- end }}
- {{- end }}
-{{- end -}}
diff --git a/charts/senlin/charts/helm-toolkit/templates/manifests/_ingress.tpl b/charts/senlin/charts/helm-toolkit/templates/manifests/_ingress.tpl
index 792571c..cacb4b8 100644
--- a/charts/senlin/charts/helm-toolkit/templates/manifests/_ingress.tpl
+++ b/charts/senlin/charts/helm-toolkit/templates/manifests/_ingress.tpl
@@ -708,10 +708,6 @@
{{- range $v := without (index $endpointHost.tls "dnsNames" | default list) $hostNameFull }}
{{- $vHosts = append $vHosts $v }}
{{- end }}
-{{- if hasKey $envAll.Values.endpoints "alias_fqdn" }}
-{{- $alias_host := $envAll.Values.endpoints.alias_fqdn }}
-{{- $vHosts = append $vHosts $alias_host }}
-{{- end }}
{{- $secretName := index $envAll.Values.secrets "tls" ( $backendServiceType | replace "-" "_" ) $backendService $endpoint }}
{{- $_ := required "You need to specify a secret in your values for the endpoint" $secretName }}
tls:
diff --git a/charts/senlin/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/senlin/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
index c6a7521..1e28da9 100644
--- a/charts/senlin/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
+++ b/charts/senlin/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Drop')
@@ -126,7 +125,7 @@
# Delete DB
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP DATABASE IF EXISTS {0}".format(database)))
+ connection.execute("DROP DATABASE IF EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -139,7 +138,7 @@
# Delete DB User
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP USER IF EXISTS {0}".format(user)))
+ connection.execute("DROP USER IF EXISTS {0}".format(user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/senlin/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/senlin/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
index 1917f78..110cd98 100644
--- a/charts/senlin/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
+++ b/charts/senlin/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Init')
@@ -126,7 +125,7 @@
# Create DB
try:
with root_engine.connect() as connection:
- connection.execute(text("CREATE DATABASE IF NOT EXISTS {0}".format(database)))
+ connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -140,10 +139,10 @@
try:
with root_engine.connect() as connection:
connection.execute(
- text("CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
- user, password, mysql_x509)))
+ "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
+ user, password, mysql_x509))
connection.execute(
- text("GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)))
+ "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/senlin/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl b/charts/senlin/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
index e6e9c6e..3739f95 100644
--- a/charts/senlin/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
+++ b/charts/senlin/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
@@ -29,9 +29,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_ADMIN_PASSWORD=$(echo "${RABBITMQ_ADMIN_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User creadential
RABBITMQ_USERNAME=$(echo "${RABBITMQ_USER_CONNECTION}" | \
@@ -39,9 +37,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_PASSWORD=$(echo "${RABBITMQ_USER_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User vHost
RABBITMQ_VHOST=$(echo "${RABBITMQ_USER_CONNECTION}" | \
diff --git a/charts/senlin/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl b/charts/senlin/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
index 5c2dedb..48b53fa 100644
--- a/charts/senlin/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
+++ b/charts/senlin/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
@@ -40,9 +40,6 @@
release_group: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
application: {{ $application }}
component: {{ $component }}
-app.kubernetes.io/name: {{ $application }}
-app.kubernetes.io/component: {{ $component }}
-app.kubernetes.io/instance: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
{{- if ($envAll.Values.pod).labels }}
{{- if hasKey $envAll.Values.pod.labels $component }}
{{ index $envAll.Values.pod "labels" $component | toYaml }}
diff --git a/charts/senlin/charts/helm-toolkit/templates/snippets/_service_params.tpl b/charts/senlin/charts/helm-toolkit/templates/snippets/_service_params.tpl
deleted file mode 100644
index 6233a93..0000000
--- a/charts/senlin/charts/helm-toolkit/templates/snippets/_service_params.tpl
+++ /dev/null
@@ -1,61 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Inserts kubernetes service parameters from values as is.
-values: |
- network:
- serviceExample:
- service:
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-usage: |
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: 'serviceExample'
- spec:
- ports:
- - name: s-example
- port: 1111
- {{ .Values.network.serviceExample | include "helm-toolkit.snippets.service_params" | indent 2 }}
-return: |
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-*/}}
-
-{{- define "helm-toolkit.snippets.service_params" }}
-{{- $serviceParams := dict }}
-{{- if hasKey . "service" }}
-{{- $serviceParams = .service }}
-{{- end }}
-{{- if hasKey . "node_port" }}
-{{- if hasKey .node_port "enabled" }}
-{{- if .node_port.enabled }}
-{{- $_ := set $serviceParams "type" "NodePort" }}
-{{- end }}
-{{- end }}
-{{- end }}
-{{- if hasKey . "external_policy_local" }}
-{{- if .external_policy_local }}
-{{- $_ := set $serviceParams "externalTrafficPolicy" "Local" }}
-{{- end }}
-{{- end }}
-{{- if $serviceParams }}
-{{- $serviceParams | toYaml }}
-{{- end }}
-{{- end }}
diff --git a/charts/senlin/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl b/charts/senlin/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
deleted file mode 100644
index bdb28c3..0000000
--- a/charts/senlin/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
+++ /dev/null
@@ -1,279 +0,0 @@
-{{/*
-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.
-*/}}
-
-{{/*
-
-The helm-toolkit.utils.daemonset_overrides function have some limitations:
-
- * it allows to override only conf values specifid in configmap-etc
- * it doesn't allow to override values for daemonsets passed via env variables
- or via damoenset definition. As result it is impossible to have mixed
- deployment when one compute is configured with dpdk while other not.
- * it is impossible to override interface names/other information stored in
- <service>-bin configmap
- * It allows to schedule on both hosts and labels, which adds some
- uncertainty
-
-This implementation is intended to handle those limitations:
-
- * it allows to schedule only based on labels
- * it creates <service>-bin per daemonset override
- * it allows to override values when rendering daemonsets
-
- It picks data from the following structure:
-
- .Values:
- overrides:
- mychart_mydaemonset:
- labels:
- label::value:
- values:
- override_root_option: override_root_value
- conf:
- ovs_dpdk:
- enabled: true
- neutron:
- DEFAULT:
- foo: bar
-
-*/}}
-
-{{- define "helm-toolkit.utils.daemonset_overrides_root" }}
- {{- $daemonset := index . 0 }}
- {{- $daemonSetTemplateName := index . 1 }}
- {{ $serviceAccountName := index . 2 }}
- {{- $configmap_include := index . 3 }}
- {{- $configmap_name := index . 4 }}
- {{- $configbin_include := index . 5 }}
- {{- $configbin_name := index . 6 }}
- {{- $context := index . 7 }}
-
- {{- $_ := unset $context ".Files" }}
- {{- $daemonset_root_name := printf (print $context.Chart.Name "_" $daemonset) }}
- {{- $_ := set $context.Values "__daemonset_list" list }}
- {{- $_ := set $context.Values "__default" dict }}
-
- {{- $default_enabled := true }}
- {{- if hasKey $context.Values "overrides" }}
- {{- range $key, $val := $context.Values.overrides }}
-
- {{- if eq $key $daemonset_root_name }}
- {{- range $type, $type_data := . }}
- {{- if eq $type "overrides_default" }}
- {{- $default_enabled = $type_data }}
- {{- end }}
-
- {{- if eq $type "labels" }}
- {{- $_ := set $context.Values "__label_dict" . }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
- {{/* dictionary that will contain all info needed to generate this
- iteration of the daemonset. */}}
- {{- $_ := set $context.Values "__current_label" dict }}
-
- {{/* set daemonset name */}}
- {{- $_ := set $context.Values.__current_label "name" $label_name }}
-
- {{/* set daemonset metadata annotation */}}
- {{- $_ := set $context.Values.__current_label "daemonset_override" $lname }}
-
- {{/* apply overrides */}}
-
-
- {{- $override_root_copy := $ldata.values }}
- {{/* Deep copy to prevent https://storyboard.openstack.org/#!/story/2005936 */}}
- {{- $root_copy := omit ($context.Values | toYaml | fromYaml) "overrides" }}
- {{- $merged_dict := mergeOverwrite $root_copy $override_root_copy }}
-
- {{- $root_conf_copy2 := dict "values" $merged_dict }}
- {{- $context_values := omit (omit ($context.Values | toYaml | fromYaml) "values") "__daemonset_list" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2.values }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__current_label "nodeData" $root_conf_copy4 }}
-
-
- {{/* Schedule to the provided label value(s) */}}
- {{- $label_dict := dict "key" $label_name }}
- {{- $_ := set $label_dict "values" (list $label_value) }}
- {{- $_ := set $label_dict "operator" "In" }}
- {{- $list_aggregate := list $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
-
- {{/* Do not schedule to other specified labels, with higher
- precedence as the list position increases. Last defined label
- is highest priority. */}}
- {{- $other_labels := omit $context.Values.__label_dict $lname }}
- {{- range $lname2, $ldata2 := $other_labels }}
- {{ $label_name2 := (split "::" $lname2)._0 }}
- {{ $label_value2 := (split "::" $lname2)._1 }}
-
- {{- $label_dict := dict "key" $label_name2 }}
- {{- $_ := set $label_dict "values" (list $label_value2) }}
- {{- $_ := set $label_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__current_label.matchExpressions $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
- {{- end }}
-
- {{/* store completed daemonset entry/info into global list */}}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__current_label }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- $_ := unset $context.Values "__current_label" }}
-
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* scheduler exceptions for the default daemonset */}}
- {{- $_ := set $context.Values.__default "matchExpressions" list }}
-
- {{- range $type, $type_data := . }}
- {{/* Do not schedule to other specified labels */}}
- {{- if eq $type "labels" }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
-
- {{- $default_dict := dict "key" $label_name }}
- {{- $_ := set $default_dict "values" (list $label_value) }}
- {{- $_ := set $default_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__default.matchExpressions $default_dict }}
- {{- $_ := set $context.Values.__default "matchExpressions" $list_aggregate }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* generate the default daemonset */}}
-
- {{/* set name */}}
- {{- $_ := set $context.Values.__default "name" "default" }}
-
- {{/* no overrides apply, so copy as-is */}}
- {{- $root_conf_copy1 := omit $context.Values.conf "overrides" }}
- {{- $root_conf_copy2 := dict "conf" $root_conf_copy1 }}
- {{- $context_values := omit $context.Values "conf" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2 }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__default "nodeData" $root_conf_copy4 }}
-
- {{/* add to global list */}}
- {{- if $default_enabled }}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__default }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- end }}
-
- {{- range $current_dict := $context.Values.__daemonset_list }}
-
- {{- $context_novalues := omit $context "Values" }}
- {{- $merged_dict := mergeOverwrite $context_novalues $current_dict.nodeData }}
- {{- $_ := set $current_dict "nodeData" $merged_dict }}
- {{/* Deep copy original daemonset_yaml */}}
- {{- $daemonset_yaml := list $daemonset $configmap_name $serviceAccountName $merged_dict | include $daemonSetTemplateName | toString | fromYaml }}
- {{- $_ := set $context.Values "__daemonset_yaml" ($daemonset_yaml | toYaml | fromYaml) }}
-
- {{/* Use the following name format $daemonset_root_name + sha256summ($current_dict.matchExpressions)
- as labels might be too long and contain wrong characters like / */}}
- {{- $_ := set $current_dict "dns_1123_name" dict }}
- {{- $name_format := "" }}
- {{- if eq $current_dict.name "default" }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name "default") | replace "_" "-" }}
- {{- else }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name ($current_dict.matchExpressions | quote | sha256sum | trunc 16)) | replace "_" "-" }}
- {{- end }}
- {{- $_ := set $current_dict "dns_1123_name" $name_format }}
-
- {{/* set daemonset metadata name */}}
- {{- if not $context.Values.__daemonset_yaml.metadata }}{{- $_ := set $context.Values.__daemonset_yaml "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.metadata.name }}{{- $_ := set $context.Values.__daemonset_yaml.metadata "name" dict }}{{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata "name" $current_dict.dns_1123_name }}
-
- {{/* cross-reference configmap name to container volume definitions */}}
- {{- $_ := set $context.Values "__volume_list" list }}
- {{- range $current_volume := $context.Values.__daemonset_yaml.spec.template.spec.volumes }}
- {{- $_ := set $context.Values "__volume" $current_volume }}
- {{- if hasKey $context.Values.__volume "secret" }}
- {{- if eq $context.Values.__volume.secret.secretName $configmap_name }}
- {{- $_ := set $context.Values.__volume.secret "secretName" (printf "%s-etc" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- if hasKey $context.Values.__volume "configMap" }}
- {{- if eq $context.Values.__volume.configMap.name $configbin_name }}
- {{- $_ := set $context.Values.__volume.configMap "name" (printf "%s-bin" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- $updated_list := append $context.Values.__volume_list $context.Values.__volume }}
- {{- $_ := set $context.Values "__volume_list" $updated_list }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "volumes" $context.Values.__volume_list }}
-
-
- {{/* populate scheduling restrictions */}}
- {{- if hasKey $current_dict "matchExpressions" }}
- {{- $length := len $current_dict.matchExpressions }}
- {{- if gt $length 0 }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "affinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity "nodeAffinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity "requiredDuringSchedulingIgnoredDuringExecution" dict }}{{- end }}
-
- {{- $expressions_modified := list }}
- {{- if hasKey $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" }}
- {{- range $orig_expression := $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms }}
- {{- $match_expressions_modified := list }}
- {{- $match_expressions_modified = concat $match_expressions_modified $current_dict.matchExpressions }}
- {{- if hasKey $orig_expression "matchExpressions" }}
- {{- $match_expressions_modified = concat $match_expressions_modified $orig_expression.matchExpressions }}
- {{- $expressions_modified = append $expressions_modified (dict "matchExpressions" $match_expressions_modified) }}
- {{- end }}
- {{- end }}
- {{- else }}
- {{- $expressions_modified = (list (dict "matchExpressions" $current_dict.matchExpressions)) }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" $expressions_modified }}
- {{- end }}
- {{- end }}
-
- {{/* input value hash for current set of values overrides */}}
- {{- if not $context.Values.__daemonset_yaml.spec }}{{- $_ := set $context.Values.__daemonset_yaml "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template }}{{- $_ := set $context.Values.__daemonset_yaml.spec "template" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata.annotations }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata "annotations" dict }}{{- end }}
- {{- $cmap := list (printf "%s-etc" $current_dict.dns_1123_name) $current_dict.nodeData | include $configmap_include }}
- {{- $cmap_bin := list (printf "%s-bin" $current_dict.dns_1123_name) $current_dict.nodeData | include $configbin_include }}
- {{- $values_cmap_hash := $cmap | quote | sha256sum }}
- {{- $values_cmap_bin_hash := $cmap_bin | quote | sha256sum }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-etc-hash" $values_cmap_hash }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-bin-hash" $values_cmap_bin_hash }}
-
- {{/* Do not set override for default daemonset */}}
- {{- if $current_dict.daemonset_override }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata.annotations "daemonset_override" $current_dict.daemonset_override }}
- {{- end }}
-
-{{/* generate configmap */}}
----
-{{ $cmap }}
- {{/* generate <service>-bin yaml */}}
----
-{{ $cmap_bin }}
- {{/* generate daemonset yaml */}}
----
-{{ $context.Values.__daemonset_yaml | toYaml }}
- {{- end }}
-{{- end }}
diff --git a/charts/senlin/requirements.lock b/charts/senlin/requirements.lock
index b94dead..4f63a87 100644
--- a/charts/senlin/requirements.lock
+++ b/charts/senlin/requirements.lock
@@ -1,6 +1,6 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
-digest: sha256:760c5997580ac8d30a64dfe92d6a54052b783ddf90cacbc5a4c95c1330988742
+ version: 0.2.69
+digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef
generated: "0001-01-01T00:00:00Z"
diff --git a/charts/senlin/requirements.yaml b/charts/senlin/requirements.yaml
index 52e723e..b3d5dcf 100644
--- a/charts/senlin/requirements.yaml
+++ b/charts/senlin/requirements.yaml
@@ -1,4 +1,4 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
+ version: 0.2.69
diff --git a/charts/staffeln/charts/helm-toolkit/Chart.yaml b/charts/staffeln/charts/helm-toolkit/Chart.yaml
index 9d3aa1e..e6aec81 100644
--- a/charts/staffeln/charts/helm-toolkit/Chart.yaml
+++ b/charts/staffeln/charts/helm-toolkit/Chart.yaml
@@ -9,4 +9,4 @@
sources:
- https://opendev.org/openstack/openstack-helm-infra
- https://opendev.org/openstack/openstack-helm
-version: 0.2.78
+version: 0.2.54
diff --git a/charts/staffeln/charts/helm-toolkit/requirements.lock b/charts/staffeln/charts/helm-toolkit/requirements.lock
deleted file mode 100644
index e28bc5d..0000000
--- a/charts/staffeln/charts/helm-toolkit/requirements.lock
+++ /dev/null
@@ -1,3 +0,0 @@
-dependencies: []
-digest: sha256:643d5437104296e21d906ecb15b2c96ad278f20cfc4af53b12bb6069bd853726
-generated: "0001-01-01T00:00:00Z"
diff --git a/charts/staffeln/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl b/charts/staffeln/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl
index d7390d8..12b84de 100644
--- a/charts/staffeln/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl
+++ b/charts/staffeln/charts/helm-toolkit/templates/endpoints/_authenticated_endpoint_uri_lookup.tpl
@@ -50,7 +50,7 @@
{{- $endpointScheme := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_scheme_lookup" }}
{{- $userMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "auth" $userclass }}
{{- $endpointUser := index $userMap "username" }}
-{{- $endpointPass := index $userMap "password" | urlquery }}
+{{- $endpointPass := index $userMap "password" }}
{{- $endpointHost := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
{{- $endpointPath := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.keystone_endpoint_path_lookup" }}
diff --git a/charts/staffeln/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl b/charts/staffeln/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl
index b9ac9d9..b7cf287 100644
--- a/charts/staffeln/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl
+++ b/charts/staffeln/charts/helm-toolkit/templates/endpoints/_authenticated_transport_endpoint_uri_lookup.tpl
@@ -100,7 +100,7 @@
{{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false}}
{{- $hostFqdnOverride := index $context.Values.endpoints ( $type | replace "-" "_" ) "host_fqdn_override" }}
{{- $endpointUser := index $userMap "username" }}
-{{- $endpointPass := index $userMap "password" | urlquery }}
+{{- $endpointPass := index $userMap "password" }}
{{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
{{- $local := dict "endpointCredsAndHosts" list -}}
diff --git a/charts/staffeln/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl b/charts/staffeln/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
index 728b994..6877b7b 100644
--- a/charts/staffeln/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
+++ b/charts/staffeln/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
@@ -14,8 +14,7 @@
{{/*
abstract: |
- Resolves 'hostname:port' for an endpoint, or several hostname:port pairs for statefulset e.g
- 'hostname1:port1,hostname2:port2,hostname3:port3',
+ Resolves 'hostname:port' for an endpoint
examples:
- values: |
endpoints:
@@ -47,23 +46,6 @@
{{ tuple "oslo_db" "internal" "mysql" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
return: |
127.0.0.1:3306
- - values: |
- endpoints:
- oslo_cache:
- hosts:
- default: memcached
- host_fqdn_override:
- default: null
- statefulset:
- name: openstack-memcached-memcached
- replicas: 3
- port:
- memcache:
- default: 11211
- usage: |
- {{ tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
- return: |
- openstack-memcached-memcached-0:11211,openstack-memcached-memcached-1:11211,openstack-memcached-memcached-2:11211
*/}}
{{- define "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" -}}
@@ -71,19 +53,7 @@
{{- $endpoint := index . 1 -}}
{{- $port := index . 2 -}}
{{- $context := index . 3 -}}
-{{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false -}}
-{{- $local := dict "endpointHosts" list -}}
-{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" -}}
-{{- if $ssMap -}}
-{{- $endpointHostPrefix := $ssMap.name -}}
-{{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
-{{- range $podInt := until ( atoi (print $ssMap.replicas ) ) -}}
-{{- $endpointHostname := printf "%s-%d.%s:%s" $endpointHostPrefix $podInt $endpointHostSuffix $endpointPort -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts $endpointHostname ) -}}
-{{- end -}}
-{{- else -}}
-{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts (printf "%s:%s" $endpointHostname $endpointPort) ) -}}
-{{- end -}}
-{{ include "helm-toolkit.utils.joinListWithComma" $local.endpointHosts }}
+{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
+{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
+{{- printf "%s:%s" $endpointHostname $endpointPort -}}
{{- end -}}
diff --git a/charts/staffeln/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl b/charts/staffeln/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
index 24eb569..b2ec648 100644
--- a/charts/staffeln/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
+++ b/charts/staffeln/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
@@ -40,9 +40,9 @@
{{- $context := index . 3 -}}
{{- $endpointMap := index $context.Values.endpoints ( $type | replace "-" "_" ) }}
{{- if kindIs "string" $endpointMap.path }}
-{{- printf "%s" $endpointMap.path | default "" -}}
+{{- printf "%s" $endpointMap.path | default "/" -}}
{{- else -}}
-{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "" }}
+{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "/" }}
{{- printf "%s" $endpointPath -}}
{{- end -}}
{{- end -}}
diff --git a/charts/staffeln/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl b/charts/staffeln/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
deleted file mode 100644
index 332ca99..0000000
--- a/charts/staffeln/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
+++ /dev/null
@@ -1,51 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Renders out the configmap <service>-oslo-policy.
-values: |
- conf:
- policy.d:
- file1:
- foo: bar
- file2:
- foo: baz
-usage: |
-{{- include "helm-toolkit.manifests.configmap_oslo_policy" (dict "envAll" $envAll "serviceName" "keystone") }}
-return: |
- ---
- apiVersion: v1
- kind: Secret
- metadata:
- name: keystone-oslo-policy
- data:
- file1: base64of(foo: bar)
- file2: base64of(foo: baz)
-*/}}
-{{- define "helm-toolkit.manifests.configmap_oslo_policy" -}}
-{{- $envAll := index . "envAll" -}}
-{{- $serviceName := index . "serviceName" -}}
----
-apiVersion: v1
-kind: Secret
-metadata:
- name: {{ $serviceName }}-oslo-policy
-type: Opaque
-data:
- {{- range $key, $value := index $envAll.Values.conf "policy.d" }}
- {{- if $value }}
- {{ $key }}: {{ toYaml $value | b64enc }}
- {{- else }}
- {{ $key }}: {{ "\n" | b64enc }}
- {{- end }}
- {{- end }}
-{{- end -}}
diff --git a/charts/staffeln/charts/helm-toolkit/templates/manifests/_ingress.tpl b/charts/staffeln/charts/helm-toolkit/templates/manifests/_ingress.tpl
index 792571c..4c476b2 100644
--- a/charts/staffeln/charts/helm-toolkit/templates/manifests/_ingress.tpl
+++ b/charts/staffeln/charts/helm-toolkit/templates/manifests/_ingress.tpl
@@ -59,7 +59,7 @@
default: 9311
public: 80
usage: |
- {{- include "helm-toolkit.manifests.ingress" ( dict "envAll" . "backendServiceType" "key-manager" "backendPort" "b-api" "endpoint" "public" "pathType" "Prefix" ) -}}
+ {{- include "helm-toolkit.manifests.ingress" ( dict "envAll" . "backendServiceType" "key-manager" "backendPort" "b-api" "endpoint" "public" ) -}}
return: |
---
apiVersion: networking.k8s.io/v1
@@ -67,16 +67,16 @@
metadata:
name: barbican
annotations:
+ kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
- ingressClassName: "nginx"
rules:
- host: barbican
http:
paths:
- path: /
- pathType: Prefix
+ pathType: ImplementationSpecific
backend:
service:
name: barbican-api
@@ -86,7 +86,7 @@
http:
paths:
- path: /
- pathType: Prefix
+ pathType: ImplementationSpecific
backend:
service:
name: barbican-api
@@ -96,7 +96,7 @@
http:
paths:
- path: /
- pathType: Prefix
+ pathType: ImplementationSpecific
backend:
service:
name: barbican-api
@@ -108,10 +108,10 @@
metadata:
name: barbican-namespace-fqdn
annotations:
+ kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
- ingressClassName: "nginx"
tls:
- secretName: barbican-tls-public
hosts:
@@ -121,7 +121,7 @@
http:
paths:
- path: /
- pathType: Prefix
+ pathType: ImplementationSpecific
backend:
service:
name: barbican-api
@@ -133,10 +133,10 @@
metadata:
name: barbican-cluster-fqdn
annotations:
+ kubernetes.io/ingress.class: "nginx-cluster"
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
- ingressClassName: "nginx-cluster"
tls:
- secretName: barbican-tls-public
hosts:
@@ -146,7 +146,7 @@
http:
paths:
- path: /
- pathType: Prefix
+ pathType: ImplementationSpecific
backend:
service:
name: barbican-api
@@ -194,7 +194,7 @@
default: 9311
public: 80
usage: |
- {{- include "helm-toolkit.manifests.ingress" ( dict "envAll" . "backendServiceType" "key-manager" "backendPort" "b-api" "endpoint" "public" "pathType" "Prefix" ) -}}
+ {{- include "helm-toolkit.manifests.ingress" ( dict "envAll" . "backendServiceType" "key-manager" "backendPort" "b-api" "endpoint" "public" ) -}}
return: |
---
apiVersion: networking.k8s.io/v1
@@ -202,10 +202,10 @@
metadata:
name: barbican
annotations:
+ kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
- ingressClassName: "nginx"
tls:
- secretName: barbican-tls-public
hosts:
@@ -217,7 +217,7 @@
http:
paths:
- path: /
- pathType: Prefix
+ pathType: ImplementationSpecific
backend:
service:
name: barbican-api
@@ -227,7 +227,7 @@
http:
paths:
- path: /
- pathType: Prefix
+ pathType: ImplementationSpecific
backend:
service:
name: barbican-api
@@ -237,7 +237,7 @@
http:
paths:
- path: /
- pathType: Prefix
+ pathType: ImplementationSpecific
backend:
service:
name: barbican-api
@@ -294,7 +294,7 @@
name: ca-issuer
kind: Issuer
usage: |
- {{- include "helm-toolkit.manifests.ingress" ( dict "envAll" . "backendServiceType" "key-manager" "backendPort" "b-api" "endpoint" "public" "certIssuer" "ca-issuer" "pathType" "Prefix" ) -}}
+ {{- include "helm-toolkit.manifests.ingress" ( dict "envAll" . "backendServiceType" "key-manager" "backendPort" "b-api" "endpoint" "public" "certIssuer" "ca-issuer" ) -}}
return: |
---
apiVersion: networking.k8s.io/v1
@@ -302,12 +302,12 @@
metadata:
name: barbican
annotations:
+ kubernetes.io/ingress.class: "nginx"
cert-manager.io/issuer: ca-issuer
certmanager.k8s.io/issuer: ca-issuer
nginx.ingress.kubernetes.io/backend-protocol: https
nginx.ingress.kubernetes.io/secure-backends: "true"
spec:
- ingressClassName: "nginx"
tls:
- secretName: barbican-tls-public-certmanager
hosts:
@@ -319,7 +319,7 @@
http:
paths:
- path: /
- pathType: Prefix
+ pathType: ImplementationSpecific
backend:
service:
name: barbican-api
@@ -329,7 +329,7 @@
http:
paths:
- path: /
- pathType: Prefix
+ pathType: ImplementationSpecific
backend:
service:
name: barbican-api
@@ -339,7 +339,7 @@
http:
paths:
- path: /
- pathType: Prefix
+ pathType: ImplementationSpecific
backend:
service:
name: barbican-api
@@ -396,7 +396,7 @@
name: ca-issuer
kind: ClusterIssuer
usage: |
- {{- include "helm-toolkit.manifests.ingress" ( dict "envAll" . "backendServiceType" "key-manager" "backendPort" "b-api" "endpoint" "public" "certIssuer" "ca-issuer" "pathType" "Prefix" ) -}}
+ {{- include "helm-toolkit.manifests.ingress" ( dict "envAll" . "backendServiceType" "key-manager" "backendPort" "b-api" "endpoint" "public" "certIssuer" "ca-issuer") -}}
return: |
---
apiVersion: networking.k8s.io/v1
@@ -404,12 +404,12 @@
metadata:
name: barbican
annotations:
+ kubernetes.io/ingress.class: "nginx"
cert-manager.io/cluster-issuer: ca-issuer
certmanager.k8s.io/cluster-issuer: ca-issuer
nginx.ingress.kubernetes.io/backend-protocol: https
nginx.ingress.kubernetes.io/secure-backends: "true"
spec:
- ingressClassName: "nginx"
tls:
- secretName: barbican-tls-public-certmanager
hosts:
@@ -421,7 +421,7 @@
http:
paths:
- path: /
- pathType: Prefix
+ pathType: ImplementationSpecific
backend:
service:
name: barbican-api
@@ -431,7 +431,7 @@
http:
paths:
- path: /
- pathType: Prefix
+ pathType: ImplementationSpecific
backend:
service:
name: barbican-api
@@ -441,7 +441,7 @@
http:
paths:
- path: /
- pathType: Prefix
+ pathType: ImplementationSpecific
backend:
service:
name: barbican-api
@@ -479,7 +479,7 @@
grafana:
public: grafana-tls-public
usage: |
- {{- $ingressOpts := dict "envAll" . "backendService" "grafana" "backendServiceType" "grafana" "backendPort" "dashboard" "pathType" "Prefix" -}}
+ {{- $ingressOpts := dict "envAll" . "backendService" "grafana" "backendServiceType" "grafana" "backendPort" "dashboard" -}}
{{ $ingressOpts | include "helm-toolkit.manifests.ingress" }}
return: |
---
@@ -488,16 +488,16 @@
metadata:
name: grafana
annotations:
+ kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
- ingressClassName: "nginx"
rules:
- host: grafana
http:
paths:
- path: /
- pathType: Prefix
+ pathType: ImplementationSpecific
backend:
service:
name: grafana-dashboard
@@ -507,7 +507,7 @@
http:
paths:
- path: /
- pathType: Prefix
+ pathType: ImplementationSpecific
backend:
service:
name: grafana-dashboard
@@ -517,7 +517,7 @@
http:
paths:
- path: /
- pathType: Prefix
+ pathType: ImplementationSpecific
backend:
service:
name: grafana-dashboard
@@ -529,10 +529,10 @@
metadata:
name: grafana-namespace-fqdn
annotations:
+ kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
- ingressClassName: "nginx"
tls:
- secretName: grafana-tls-public
hosts:
@@ -543,7 +543,7 @@
http:
paths:
- path: /
- pathType: Prefix
+ pathType: ImplementationSpecific
backend:
service:
name: grafana-dashboard
@@ -553,7 +553,7 @@
http:
paths:
- path: /
- pathType: Prefix
+ pathType: ImplementationSpecific
backend:
service:
name: grafana-dashboard
@@ -565,10 +565,10 @@
metadata:
name: grafana-cluster-fqdn
annotations:
+ kubernetes.io/ingress.class: "nginx-cluster"
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
- ingressClassName: "nginx-cluster"
tls:
- secretName: grafana-tls-public
hosts:
@@ -579,7 +579,7 @@
http:
paths:
- path: /
- pathType: Prefix
+ pathType: ImplementationSpecific
backend:
service:
name: grafana-dashboard
@@ -589,7 +589,7 @@
http:
paths:
- path: /
- pathType: Prefix
+ pathType: ImplementationSpecific
backend:
service:
name: grafana-dashboard
@@ -602,12 +602,11 @@
{{- $vHost := index . "vHost" -}}
{{- $backendName := index . "backendName" -}}
{{- $backendPort := index . "backendPort" -}}
-{{- $pathType := index . "pathType" -}}
- host: {{ $vHost }}
http:
paths:
- path: /
- pathType: {{ $pathType }}
+ pathType: ImplementationSpecific
backend:
service:
name: {{ $backendName }}
@@ -625,7 +624,6 @@
{{- $backendServiceType := index . "backendServiceType" -}}
{{- $backendPort := index . "backendPort" -}}
{{- $endpoint := index . "endpoint" | default "public" -}}
-{{- $pathType := index . "pathType" | default "Prefix" -}}
{{- $certIssuer := index . "certIssuer" | default "" -}}
{{- $ingressName := tuple $backendServiceType $endpoint $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
{{- $backendName := tuple $backendServiceType "internal" $envAll | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
@@ -641,6 +639,7 @@
metadata:
name: {{ $ingressName }}
annotations:
+ kubernetes.io/ingress.class: {{ index $envAll.Values.network $backendService "ingress" "classes" "namespace" | quote }}
{{- if $certIssuer }}
cert-manager.io/{{ $certIssuerType }}: {{ $certIssuer }}
certmanager.k8s.io/{{ $certIssuerType }}: {{ $certIssuer }}
@@ -651,7 +650,6 @@
{{- end }}
{{ toYaml (index $envAll.Values.network $backendService "ingress" "annotations") | indent 4 }}
spec:
- ingressClassName: {{ index $envAll.Values.network $backendService "ingress" "classes" "namespace" | quote }}
{{- $host := index $envAll.Values.endpoints ( $backendServiceType | replace "-" "_" ) "hosts" }}
{{- if $certIssuer }}
{{- $secretName := index $envAll.Values.secrets "tls" ( $backendServiceType | replace "-" "_" ) $backendService $endpoint }}
@@ -683,7 +681,7 @@
{{- end }}
rules:
{{- range $key1, $vHost := tuple $hostName (printf "%s.%s" $hostName $envAll.Release.Namespace) (printf "%s.%s.svc.%s" $hostName $envAll.Release.Namespace $envAll.Values.endpoints.cluster_domain_suffix) }}
-{{- $hostRules := dict "vHost" $vHost "backendName" $backendName "backendPort" $backendPort "pathType" $pathType }}
+{{- $hostRules := dict "vHost" $vHost "backendName" $backendName "backendPort" $backendPort }}
{{ $hostRules | include "helm-toolkit.manifests.ingress._host_rules" | indent 4 }}
{{- end }}
{{- if not ( hasSuffix ( printf ".%s.svc.%s" $envAll.Release.Namespace $envAll.Values.endpoints.cluster_domain_suffix) $hostNameFull) }}
@@ -697,9 +695,9 @@
metadata:
name: {{ printf "%s-%s-%s" $ingressName $ingressController "fqdn" }}
annotations:
+ kubernetes.io/ingress.class: {{ index $envAll.Values.network $backendService "ingress" "classes" $ingressController | quote }}
{{ toYaml (index $envAll.Values.network $backendService "ingress" "annotations") | indent 4 }}
spec:
- ingressClassName: {{ index $envAll.Values.network $backendService "ingress" "classes" $ingressController | quote }}
{{- $host := index $envAll.Values.endpoints ( $backendServiceType | replace "-" "_" ) "host_fqdn_override" }}
{{- if hasKey $host $endpoint }}
{{- $endpointHost := index $host $endpoint }}
@@ -708,10 +706,6 @@
{{- range $v := without (index $endpointHost.tls "dnsNames" | default list) $hostNameFull }}
{{- $vHosts = append $vHosts $v }}
{{- end }}
-{{- if hasKey $envAll.Values.endpoints "alias_fqdn" }}
-{{- $alias_host := $envAll.Values.endpoints.alias_fqdn }}
-{{- $vHosts = append $vHosts $alias_host }}
-{{- end }}
{{- $secretName := index $envAll.Values.secrets "tls" ( $backendServiceType | replace "-" "_" ) $backendService $endpoint }}
{{- $_ := required "You need to specify a secret in your values for the endpoint" $secretName }}
tls:
@@ -725,7 +719,7 @@
{{- end }}
rules:
{{- range $vHost := $vHosts }}
-{{- $hostNameFullRules := dict "vHost" $vHost "backendName" $backendName "backendPort" $backendPort "pathType" $pathType }}
+{{- $hostNameFullRules := dict "vHost" $vHost "backendName" $backendName "backendPort" $backendPort }}
{{ $hostNameFullRules | include "helm-toolkit.manifests.ingress._host_rules" | indent 4 }}
{{- end }}
{{- end }}
diff --git a/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-bootstrap.tpl b/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-bootstrap.tpl
index 6b77004..5d98c8b 100644
--- a/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-bootstrap.tpl
+++ b/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-bootstrap.tpl
@@ -51,7 +51,6 @@
{{ toYaml $jobLabels | indent 4 }}
{{- end }}
annotations:
-{{ tuple $serviceAccountName $envAll | include "helm-toolkit.snippets.custom_job_annotations" | indent 4 -}}
{{- if $jobAnnotations }}
{{ toYaml $jobAnnotations | indent 4 }}
{{- end }}
diff --git a/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-db-drop-mysql.tpl b/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-db-drop-mysql.tpl
index 2b7ff2c..62ed119 100644
--- a/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-db-drop-mysql.tpl
+++ b/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-db-drop-mysql.tpl
@@ -54,7 +54,6 @@
annotations:
"helm.sh/hook": pre-delete
"helm.sh/hook-delete-policy": hook-succeeded
-{{ tuple $serviceAccountName $envAll | include "helm-toolkit.snippets.custom_job_annotations" | indent 4 -}}
{{- if $jobAnnotations }}
{{ toYaml $jobAnnotations | indent 4 }}
{{- end }}
diff --git a/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-db-init-mysql.tpl b/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-db-init-mysql.tpl
index b8a1dce..745e8da 100644
--- a/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-db-init-mysql.tpl
+++ b/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-db-init-mysql.tpl
@@ -52,7 +52,6 @@
{{ toYaml $jobLabels | indent 4 }}
{{- end }}
annotations:
-{{ tuple $serviceAccountName $envAll | include "helm-toolkit.snippets.custom_job_annotations" | indent 4 -}}
{{- if $jobAnnotations }}
{{ toYaml $jobAnnotations | indent 4 }}
{{- end }}
diff --git a/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-db-sync.tpl b/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-db-sync.tpl
index 4696c88..24d2496 100644
--- a/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-db-sync.tpl
+++ b/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-db-sync.tpl
@@ -49,7 +49,6 @@
{{ toYaml $jobLabels | indent 4 }}
{{- end }}
annotations:
-{{ tuple $serviceAccountName $envAll | include "helm-toolkit.snippets.custom_job_annotations" | indent 4 -}}
{{- if $jobAnnotations }}
{{ toYaml $jobAnnotations | indent 4 }}
{{- end }}
diff --git a/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-ks-endpoints.tpl b/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-ks-endpoints.tpl
index d69c9e6..3a7df7f 100644
--- a/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-ks-endpoints.tpl
+++ b/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-ks-endpoints.tpl
@@ -52,7 +52,6 @@
{{ toYaml $jobLabels | indent 4 }}
{{- end }}
annotations:
-{{ tuple $serviceAccountName $envAll | include "helm-toolkit.snippets.custom_job_annotations" | indent 4 -}}
{{- if $jobAnnotations }}
{{ toYaml $jobAnnotations | indent 4 }}
{{- end }}
diff --git a/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-ks-service.tpl b/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-ks-service.tpl
index 9604c63..a109e3c 100644
--- a/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-ks-service.tpl
+++ b/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-ks-service.tpl
@@ -52,7 +52,6 @@
{{ toYaml $jobLabels | indent 4 }}
{{- end }}
annotations:
-{{ tuple $serviceAccountName $envAll | include "helm-toolkit.snippets.custom_job_annotations" | indent 4 -}}
{{- if $jobAnnotations }}
{{ toYaml $jobAnnotations | indent 4 }}
{{- end }}
diff --git a/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-ks-user.yaml.tpl b/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-ks-user.yaml.tpl
index 58dcdc5..905eb71 100644
--- a/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-ks-user.yaml.tpl
+++ b/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-ks-user.yaml.tpl
@@ -74,7 +74,6 @@
{{ toYaml $jobLabels | indent 4 }}
{{- end }}
annotations:
-{{ tuple $serviceAccountName $envAll | include "helm-toolkit.snippets.custom_job_annotations" | indent 4 -}}
{{- if $jobAnnotations }}
{{ toYaml $jobAnnotations | indent 4 }}
{{- end }}
diff --git a/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-rabbit-init.yaml.tpl b/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-rabbit-init.yaml.tpl
index 2cfadaf..6982064 100644
--- a/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-rabbit-init.yaml.tpl
+++ b/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-rabbit-init.yaml.tpl
@@ -42,7 +42,6 @@
{{ toYaml $jobLabels | indent 4 }}
{{- end }}
annotations:
-{{ tuple $serviceAccountName $envAll | include "helm-toolkit.snippets.custom_job_annotations" | indent 4 -}}
{{- if $jobAnnotations }}
{{ toYaml $jobAnnotations | indent 4 }}
{{- end }}
diff --git a/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-s3-bucket.yaml.tpl b/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-s3-bucket.yaml.tpl
index b5fdc09..29cb993 100644
--- a/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-s3-bucket.yaml.tpl
+++ b/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-s3-bucket.yaml.tpl
@@ -49,7 +49,6 @@
{{- end }}
annotations:
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
-{{ tuple $serviceAccountName $envAll | include "helm-toolkit.snippets.custom_job_annotations" | indent 4 -}}
{{- if $jobAnnotations }}
{{ toYaml $jobAnnotations | indent 4 }}
{{- end }}
diff --git a/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-s3-user.yaml.tpl b/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-s3-user.yaml.tpl
index 77d1a71..50d9af5 100644
--- a/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-s3-user.yaml.tpl
+++ b/charts/staffeln/charts/helm-toolkit/templates/manifests/_job-s3-user.yaml.tpl
@@ -47,7 +47,6 @@
annotations:
"helm.sh/hook-delete-policy": before-hook-creation
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
-{{ tuple $serviceAccountName $envAll | include "helm-toolkit.snippets.custom_job_annotations" | indent 4 -}}
{{- if $jobAnnotations }}
{{ toYaml $jobAnnotations | indent 4 }}
{{- end }}
diff --git a/charts/staffeln/charts/helm-toolkit/templates/manifests/_secret-registry.yaml.tpl b/charts/staffeln/charts/helm-toolkit/templates/manifests/_secret-registry.yaml.tpl
index 7ad505b..4854bb1 100644
--- a/charts/staffeln/charts/helm-toolkit/templates/manifests/_secret-registry.yaml.tpl
+++ b/charts/staffeln/charts/helm-toolkit/templates/manifests/_secret-registry.yaml.tpl
@@ -17,11 +17,6 @@
Creates a manifest for a authenticating a registry with a secret
examples:
- values: |
- annotations:
- secret:
- oci_image_registry:
- {{ $serviceName }}:
- custom.tld/key: "value"
secrets:
oci_image_registry:
{{ $serviceName }}: {{ $keyName }}
@@ -41,8 +36,30 @@
kind: Secret
metadata:
name: {{ $secretName }}
- annotations:
- custom.tld/key: "value"
+ type: kubernetes.io/dockerconfigjson
+ data:
+ dockerconfigjson: {{ $dockerAuth }}
+
+ - values: |
+ secrets:
+ oci_image_registry:
+ {{ $serviceName }}: {{ $keyName }}
+ endpoints:
+ oci_image_registry:
+ name: oci-image-registry
+ auth:
+ enabled: true
+ {{ $serviceName }}:
+ name: {{ $userName }}
+ password: {{ $password }}
+ usage: |
+ {{- include "helm-toolkit.manifests.secret_registry" ( dict "envAll" . "registryUser" .Chart.Name ) -}}
+ return: |
+ ---
+ apiVersion: v1
+ kind: Secret
+ metadata:
+ name: {{ $secretName }}
type: kubernetes.io/dockerconfigjson
data:
dockerconfigjson: {{ $dockerAuth }}
@@ -70,8 +87,6 @@
kind: Secret
metadata:
name: {{ $secretName }}
- annotations:
-{{ tuple "oci_image_registry" $registryUser $envAll | include "helm-toolkit.snippets.custom_secret_annotations" | indent 4 }}
type: kubernetes.io/dockerconfigjson
data:
.dockerconfigjson: {{ $dockerAuth }}
diff --git a/charts/staffeln/charts/helm-toolkit/templates/manifests/_secret-tls.yaml.tpl b/charts/staffeln/charts/helm-toolkit/templates/manifests/_secret-tls.yaml.tpl
index c800340..24a7045 100644
--- a/charts/staffeln/charts/helm-toolkit/templates/manifests/_secret-tls.yaml.tpl
+++ b/charts/staffeln/charts/helm-toolkit/templates/manifests/_secret-tls.yaml.tpl
@@ -17,11 +17,6 @@
Creates a manifest for a services public tls secret
examples:
- values: |
- annotations:
- secret:
- tls:
- key_manager_api_public:
- custom.tld/key: "value"
secrets:
tls:
key_manager:
@@ -46,8 +41,6 @@
kind: Secret
metadata:
name: barbican-tls-public
- annotations:
- custom.tld/key: "value"
type: kubernetes.io/tls
data:
tls.key: Rk9PLUtFWQo=
@@ -95,15 +88,11 @@
{{- if kindIs "map" $endpointHost }}
{{- if hasKey $endpointHost "tls" }}
{{- if and $endpointHost.tls.key $endpointHost.tls.crt }}
-
-{{- $customAnnotationKey := printf "%s_%s_%s" ( $backendServiceType | replace "-" "_" ) $backendService $endpoint }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ index $envAll.Values.secrets.tls ( $backendServiceType | replace "-" "_" ) $backendService $endpoint }}
- annotations:
-{{ tuple "tls" $customAnnotationKey $envAll | include "helm-toolkit.snippets.custom_secret_annotations" | indent 4 }}
type: kubernetes.io/tls
data:
tls.key: {{ $endpointHost.tls.key | b64enc }}
diff --git a/charts/staffeln/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/staffeln/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
index c6a7521..03884fa 100644
--- a/charts/staffeln/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
+++ b/charts/staffeln/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Drop')
@@ -125,12 +124,7 @@
# Delete DB
try:
- with root_engine.connect() as connection:
- connection.execute(text("DROP DATABASE IF EXISTS {0}".format(database)))
- try:
- connection.commit()
- except AttributeError:
- pass
+ root_engine.execute("DROP DATABASE IF EXISTS {0}".format(database))
logger.info("Deleted database {0}".format(database))
except:
logger.critical("Could not drop database {0}".format(database))
@@ -138,12 +132,7 @@
# Delete DB User
try:
- with root_engine.connect() as connection:
- connection.execute(text("DROP USER IF EXISTS {0}".format(user)))
- try:
- connection.commit()
- except AttributeError:
- pass
+ root_engine.execute("DROP USER IF EXISTS {0}".format(user))
logger.info("Deleted user {0}".format(user))
except:
logger.critical("Could not delete user {0}".format(user))
diff --git a/charts/staffeln/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/staffeln/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
index 1917f78..6027b95 100644
--- a/charts/staffeln/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
+++ b/charts/staffeln/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Init')
@@ -125,12 +124,7 @@
# Create DB
try:
- with root_engine.connect() as connection:
- connection.execute(text("CREATE DATABASE IF NOT EXISTS {0}".format(database)))
- try:
- connection.commit()
- except AttributeError:
- pass
+ root_engine.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database))
logger.info("Created database {0}".format(database))
except:
logger.critical("Could not create database {0}".format(database))
@@ -138,16 +132,11 @@
# Create DB User
try:
- with root_engine.connect() as connection:
- connection.execute(
- text("CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
- user, password, mysql_x509)))
- connection.execute(
- text("GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)))
- try:
- connection.commit()
- except AttributeError:
- pass
+ root_engine.execute(
+ "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
+ user, password, mysql_x509))
+ root_engine.execute(
+ "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user))
logger.info("Created user {0} for {1}".format(user, database))
except:
logger.critical("Could not create user {0} for {1}".format(user, database))
diff --git a/charts/staffeln/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl b/charts/staffeln/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
index e6e9c6e..3739f95 100644
--- a/charts/staffeln/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
+++ b/charts/staffeln/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
@@ -29,9 +29,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_ADMIN_PASSWORD=$(echo "${RABBITMQ_ADMIN_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User creadential
RABBITMQ_USERNAME=$(echo "${RABBITMQ_USER_CONNECTION}" | \
@@ -39,9 +37,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_PASSWORD=$(echo "${RABBITMQ_USER_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User vHost
RABBITMQ_VHOST=$(echo "${RABBITMQ_USER_CONNECTION}" | \
diff --git a/charts/staffeln/charts/helm-toolkit/templates/scripts/db-backup-restore/_backup_main.sh.tpl b/charts/staffeln/charts/helm-toolkit/templates/scripts/db-backup-restore/_backup_main.sh.tpl
index 695cb2e..3963bd4 100644
--- a/charts/staffeln/charts/helm-toolkit/templates/scripts/db-backup-restore/_backup_main.sh.tpl
+++ b/charts/staffeln/charts/helm-toolkit/templates/scripts/db-backup-restore/_backup_main.sh.tpl
@@ -49,13 +49,6 @@
# A random number between min and max delay is generated
# to set the delay.
#
-# RGW backup throttle limits variables:
-# export THROTTLE_BACKUPS_ENABLED Boolean variableto control backup functionality
-# export THROTTLE_LIMIT Number of simultaneous RGW upload sessions
-# export THROTTLE_LOCK_EXPIRE_AFTER Time in seconds to expire flag file is orphaned
-# export THROTTLE_RETRY_AFTER Time in seconds to wait before retry
-# export THROTTLE_CONTAINER_NAME Name of RGW container to place flag falies into
-#
# The database-specific functions that need to be implemented are:
# dump_databases_to_directory <directory> <err_logfile> [scope]
# where:
@@ -91,10 +84,8 @@
# specified by the "LOCAL_DAYS_TO_KEEP" variable.
# 4) Removing remote backup tarballs (from the remote gateway) which are older
# than the number of days specified by the "REMOTE_DAYS_TO_KEEP" variable.
-# 5) Controlling remote storage gateway load from client side and throttling it
-# by using a dedicated RGW container to store flag files defining upload session
-# in progress
#
+
# Note: not using set -e in this script because more elaborate error handling
# is needed.
@@ -104,7 +95,7 @@
log ERROR "${DB_NAME}_backup" "${DB_NAMESPACE} namespace: ${MSG}"
rm -f $ERR_LOG_FILE
rm -rf $TMP_DIR
- exit 0
+ exit $ERRCODE
}
log_verify_backup_exit() {
@@ -113,7 +104,7 @@
log ERROR "${DB_NAME}_verify_backup" "${DB_NAMESPACE} namespace: ${MSG}"
rm -f $ERR_LOG_FILE
# rm -rf $TMP_DIR
- exit 0
+ exit $ERRCODE
}
@@ -227,113 +218,6 @@
echo "Sleeping for ${DELAY} seconds to spread the load in time..."
sleep ${DELAY}
- #---------------------------------------------------------------------------
- # Remote backup throttling
- export THROTTLE_BACKUPS_ENABLED=$(echo $THROTTLE_BACKUPS_ENABLED | sed 's/"//g')
- if $THROTTLE_BACKUPS_ENABLED; then
- # Remove Quotes from the constants which were added due to reading
- # from secret.
- export THROTTLE_LIMIT=$(echo $THROTTLE_LIMIT | sed 's/"//g')
- export THROTTLE_LOCK_EXPIRE_AFTER=$(echo $THROTTLE_LOCK_EXPIRE_AFTER | sed 's/"//g')
- export THROTTLE_RETRY_AFTER=$(echo $THROTTLE_RETRY_AFTER | sed 's/"//g')
- export THROTTLE_CONTAINER_NAME=$(echo $THROTTLE_CONTAINER_NAME | sed 's/"//g')
-
- # load balance delay
- RESULT=$(openstack container list 2>&1)
-
- if [[ $? -eq 0 ]]; then
- echo $RESULT | grep $THROTTLE_CONTAINER_NAME
- if [[ $? -ne 0 ]]; then
- # Find the swift URL from the keystone endpoint list
- SWIFT_URL=$(openstack catalog show object-store -c endpoints | grep public | awk '{print $4}')
- if [[ $? -ne 0 ]]; then
- log WARN "${DB_NAME}_backup" "Unable to get object-store enpoints from keystone catalog."
- return 2
- fi
-
- # Get a token from keystone
- TOKEN=$(openstack token issue -f value -c id)
- if [[ $? -ne 0 ]]; then
- log WARN "${DB_NAME}_backup" "Unable to get keystone token."
- return 2
- fi
-
- # Create the container
- RES_FILE=$(mktemp -p /tmp)
- curl -g -i -X PUT ${SWIFT_URL}/${THROTTLE_CONTAINER_NAME} \
- -H "X-Auth-Token: ${TOKEN}" \
- -H "X-Storage-Policy: ${STORAGE_POLICY}" 2>&1 > $RES_FILE
-
- if [[ $? -ne 0 || $(grep "HTTP" $RES_FILE | awk '{print $2}') -ge 400 ]]; then
- log WARN "${DB_NAME}_backup" "Unable to create container ${THROTTLE_CONTAINER_NAME}"
- cat $RES_FILE
- rm -f $RES_FILE
- return 2
- fi
- rm -f $RES_FILE
-
- swift stat $THROTTLE_CONTAINER_NAME
- if [[ $? -ne 0 ]]; then
- log WARN "${DB_NAME}_backup" "Unable to retrieve container ${THROTTLE_CONTAINER_NAME} details after creation."
- return 2
- fi
- fi
- else
- echo $RESULT | grep -E "HTTP 401|HTTP 403"
- if [[ $? -eq 0 ]]; then
- log ERROR "${DB_NAME}_backup" "Access denied by keystone: ${RESULT}"
- return 1
- else
- echo $RESULT | grep -E "ConnectionError|Failed to discover available identity versions|Service Unavailable|HTTP 50"
- if [[ $? -eq 0 ]]; then
- log WARN "${DB_NAME}_backup" "Could not reach the RGW: ${RESULT}"
- # In this case, keystone or the site/node may be temporarily down.
- # Return slightly different error code so the calling code can retry
- return 2
- else
- log ERROR "${DB_NAME}_backup" "Could not get container list: ${RESULT}"
- return 1
- fi
- fi
- fi
-
- NUMBER_OF_SESSIONS=$(openstack object list $THROTTLE_CONTAINER_NAME -f value | wc -l)
- log INFO "${DB_NAME}_backup" "There are ${NUMBER_OF_SESSIONS} remote sessions right now."
- while [[ ${NUMBER_OF_SESSIONS} -ge ${THROTTLE_LIMIT} ]]
- do
- log INFO "${DB_NAME}_backup" "Current number of active uploads is ${NUMBER_OF_SESSIONS}>=${THROTTLE_LIMIT}!"
- log INFO "${DB_NAME}_backup" "Retrying in ${THROTTLE_RETRY_AFTER} seconds...."
- sleep ${THROTTLE_RETRY_AFTER}
- NUMBER_OF_SESSIONS=$(openstack object list $THROTTLE_CONTAINER_NAME -f value | wc -l)
- log INFO "${DB_NAME}_backup" "There are ${NUMBER_OF_SESSIONS} remote sessions right now."
- done
-
- # Create a lock file in THROTTLE_CONTAINER
- THROTTLE_FILEPATH=$(mktemp -d)
- THROTTLE_FILE=${CONTAINER_NAME}.lock
- date +%s > $THROTTLE_FILEPATH/$THROTTLE_FILE
-
- # Create an object to store the file
- openstack object create --name $THROTTLE_FILE $THROTTLE_CONTAINER_NAME $THROTTLE_FILEPATH/$THROTTLE_FILE
- if [[ $? -ne 0 ]]; then
- log WARN "${DB_NAME}_backup" "Cannot create throttle container object ${THROTTLE_FILE}!"
- return 2
- fi
-
- swift post $THROTTLE_CONTAINER_NAME $THROTTLE_FILE -H "X-Delete-After:${THROTTLE_LOCK_EXPIRE_AFTER}"
- if [[ $? -ne 0 ]]; then
- log WARN "${DB_NAME}_backup" "Cannot set throttle container object ${THROTTLE_FILE} expiration header!"
- return 2
- fi
- openstack object show $THROTTLE_CONTAINER_NAME $THROTTLE_FILE
- if [[ $? -ne 0 ]]; then
- log WARN "${DB_NAME}_backup" "Unable to retrieve throttle container object $THROTTLE_FILE after creation."
- return 2
- fi
- fi
-
- #---------------------------------------------------------------------------
-
# Create an object to store the file
openstack object create --name $FILE $CONTAINER_NAME $FILEPATH/$FILE
if [[ $? -ne 0 ]]; then
@@ -359,25 +243,7 @@
log ERROR "${DB_NAME}_backup" "Mismatch between the local backup & remote backup MD5 hash values"
return 2
fi
- rm -f ${REMOTE_FILE}
-
- #---------------------------------------------------------------------------
- # Remote backup throttling
- export THROTTLE_BACKUPS_ENABLED=$(echo $THROTTLE_BACKUPS_ENABLED | sed 's/"//g')
- if $THROTTLE_BACKUPS_ENABLED; then
- # Remove flag file
- # Delete an object to remove the flag file
- openstack object delete $THROTTLE_CONTAINER_NAME $THROTTLE_FILE
- if [[ $? -ne 0 ]]; then
- log WARN "${DB_NAME}_backup" "Cannot delete throttle container object ${THROTTLE_FILE}"
- return 0
- else
- log INFO "${DB_NAME}_backup" "The throttle container object ${THROTTLE_FILE} has been successfully removed."
- fi
- rm -f ${THROTTLE_FILEPATH}/${THROTTLE_FILE}
- fi
-
- #---------------------------------------------------------------------------
+ rm -rf ${REMOTE_FILE}
log INFO "${DB_NAME}_backup" "Created file $FILE in container $CONTAINER_NAME successfully."
return 0
diff --git a/charts/staffeln/charts/helm-toolkit/templates/snippets/_custom_job_annotations.tpl b/charts/staffeln/charts/helm-toolkit/templates/snippets/_custom_job_annotations.tpl
deleted file mode 100644
index fc42614..0000000
--- a/charts/staffeln/charts/helm-toolkit/templates/snippets/_custom_job_annotations.tpl
+++ /dev/null
@@ -1,76 +0,0 @@
-{{/*
-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.
-*/}}
-
-{{/*
-abstract: |
- Adds custom annotations to the job spec of a component.
-examples:
- - values: |
- annotations:
- job:
- default:
- custom.tld/key: "value"
- custom.tld/key2: "value2"
- keystone_domain_manage:
- another.tld/foo: "bar"
- usage: |
- {{ tuple "keystone_domain_manage" . | include "helm-toolkit.snippets.custom_job_annotations" }}
- return: |
- another.tld/foo: bar
- - values: |
- annotations:
- job:
- default:
- custom.tld/key: "value"
- custom.tld/key2: "value2"
- keystone_domain_manage:
- another.tld/foo: "bar"
- usage: |
- {{ tuple "keystone_bootstrap" . | include "helm-toolkit.snippets.custom_job_annotations" }}
- return: |
- custom.tld/key: "value"
- custom.tld/key2: "value2"
- - values: |
- annotations:
- job:
- default:
- custom.tld/key: "value"
- custom.tld/key2: "value2"
- keystone_domain_manage:
- another.tld/foo: "bar"
- keystone_bootstrap:
- usage: |
- {{ tuple "keystone_bootstrap" . | include "helm-toolkit.snippets.custom_job_annotations" }}
- return: |
- custom.tld/key: "value"
- custom.tld/key2: "value2"
-*/}}
-
-{{- define "helm-toolkit.snippets.custom_job_annotations" -}}
-{{- $envAll := index . 1 -}}
-{{- $component := index . 0 | replace "-" "_" -}}
-{{- if (hasKey $envAll.Values "annotations") -}}
-{{- if (hasKey $envAll.Values.annotations "job") -}}
-{{- $annotationsMap := $envAll.Values.annotations.job -}}
-{{- $defaultAnnotations := dict -}}
-{{- if (hasKey $annotationsMap "default" ) -}}
-{{- $defaultAnnotations = $annotationsMap.default -}}
-{{- end -}}
-{{- $annotations := index $annotationsMap $component | default $defaultAnnotations -}}
-{{- if (not (empty $annotations)) -}}
-{{- toYaml $annotations -}}
-{{- end -}}
-{{- end -}}
-{{- end -}}
-{{- end -}}
diff --git a/charts/staffeln/charts/helm-toolkit/templates/snippets/_custom_pod_annotations.tpl b/charts/staffeln/charts/helm-toolkit/templates/snippets/_custom_pod_annotations.tpl
deleted file mode 100644
index ecff6e9..0000000
--- a/charts/staffeln/charts/helm-toolkit/templates/snippets/_custom_pod_annotations.tpl
+++ /dev/null
@@ -1,76 +0,0 @@
-{{/*
-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.
-*/}}
-
-{{/*
-abstract: |
- Adds custom annotations to the pod spec of a component.
-examples:
- - values: |
- annotations:
- pod:
- default:
- custom.tld/key: "value"
- custom.tld/key2: "value2"
- nova_compute:
- another.tld/foo: "bar"
- usage: |
- {{ tuple "nova_compute" . | include "helm-toolkit.snippets.custom_pod_annotations" }}
- return: |
- another.tld/foo: bar
- - values: |
- annotations:
- pod:
- default:
- custom.tld/key: "value"
- custom.tld/key2: "value2"
- nova_compute:
- another.tld/foo: "bar"
- usage: |
- {{ tuple "nova_api" . | include "helm-toolkit.snippets.custom_pod_annotations" }}
- return: |
- custom.tld/key: "value"
- custom.tld/key2: "value2"
- - values: |
- annotations:
- pod:
- default:
- custom.tld/key: "value"
- custom.tld/key2: "value2"
- nova_compute:
- another.tld/foo: "bar"
- nova_api:
- usage: |
- {{ tuple "nova_api" . | include "helm-toolkit.snippets.custom_pod_annotations" }}
- return: |
- custom.tld/key: "value"
- custom.tld/key2: "value2"
-*/}}
-
-{{- define "helm-toolkit.snippets.custom_pod_annotations" -}}
-{{- $component := index . 0 -}}
-{{- $envAll := index . 1 -}}
-{{- if (hasKey $envAll.Values "annotations") -}}
-{{- if (hasKey $envAll.Values.annotations "pod") -}}
-{{- $annotationsMap := $envAll.Values.annotations.pod -}}
-{{- $defaultAnnotations := dict -}}
-{{- if (hasKey $annotationsMap "default" ) -}}
-{{- $defaultAnnotations = $annotationsMap.default -}}
-{{- end -}}
-{{- $annotations := index $annotationsMap $component | default $defaultAnnotations -}}
-{{- if (not (empty $annotations)) -}}
-{{- toYaml $annotations -}}
-{{- end -}}
-{{- end -}}
-{{- end -}}
-{{- end -}}
diff --git a/charts/staffeln/charts/helm-toolkit/templates/snippets/_custom_secret_annotations.tpl b/charts/staffeln/charts/helm-toolkit/templates/snippets/_custom_secret_annotations.tpl
deleted file mode 100644
index 19c4380..0000000
--- a/charts/staffeln/charts/helm-toolkit/templates/snippets/_custom_secret_annotations.tpl
+++ /dev/null
@@ -1,81 +0,0 @@
-{{/*
-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.
-*/}}
-
-{{/*
-abstract: |
- Adds custom annotations to the secret spec of a component.
-examples:
- - values: |
- annotations:
- secret:
- default:
- custom.tld/key: "value"
- custom.tld/key2: "value2"
- identity:
- admin:
- another.tld/foo: "bar"
- usage: |
- {{ tuple "identity" "admin" . | include "helm-toolkit.snippets.custom_secret_annotations" }}
- return: |
- another.tld/foo: bar
- - values: |
- annotations:
- secret:
- default:
- custom.tld/key: "value"
- custom.tld/key2: "value2"
- identity:
- admin:
- another.tld/foo: "bar"
- usage: |
- {{ tuple "oslo_db" "admin" . | include "helm-toolkit.snippets.custom_secret_annotations" }}
- return: |
- custom.tld/key: "value"
- custom.tld/key2: "value2"
- - values: |
- annotations:
- secret:
- default:
- custom.tld/key: "value"
- custom.tld/key2: "value2"
- identity:
- admin:
- another.tld/foo: "bar"
- oslo_db:
- admin:
- usage: |
- {{ tuple "oslo_db" "admin" . | include "helm-toolkit.snippets.custom_secret_annotations" }}
- return: |
- custom.tld/key: "value"
- custom.tld/key2: "value2"
-*/}}
-
-{{- define "helm-toolkit.snippets.custom_secret_annotations" -}}
-{{- $secretType := index . 0 -}}
-{{- $userClass := index . 1 | replace "-" "_" -}}
-{{- $envAll := index . 2 -}}
-{{- if (hasKey $envAll.Values "annotations") -}}
-{{- if (hasKey $envAll.Values.annotations "secret") -}}
-{{- $annotationsMap := index $envAll.Values.annotations.secret $secretType | default dict -}}
-{{- $defaultAnnotations := dict -}}
-{{- if (hasKey $envAll.Values.annotations.secret "default" ) -}}
-{{- $defaultAnnotations = $envAll.Values.annotations.secret.default -}}
-{{- end -}}
-{{- $annotations := index $annotationsMap $userClass | default $defaultAnnotations -}}
-{{- if (not (empty $annotations)) -}}
-{{- toYaml $annotations -}}
-{{- end -}}
-{{- end -}}
-{{- end -}}
-{{- end -}}
diff --git a/charts/staffeln/charts/helm-toolkit/templates/snippets/_image.tpl b/charts/staffeln/charts/helm-toolkit/templates/snippets/_image.tpl
index 678b844..029c93d 100644
--- a/charts/staffeln/charts/helm-toolkit/templates/snippets/_image.tpl
+++ b/charts/staffeln/charts/helm-toolkit/templates/snippets/_image.tpl
@@ -19,7 +19,7 @@
images:
tags:
test_image: docker.io/port/test:version-foo
- image_foo: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal
+ image_foo: quay.io/airshipit/kubernetes-entrypoint:v1.0.0
pull_policy: IfNotPresent
local_registry:
active: true
diff --git a/charts/staffeln/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl b/charts/staffeln/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl
index ad628da..bed712e 100644
--- a/charts/staffeln/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl
+++ b/charts/staffeln/charts/helm-toolkit/templates/snippets/_kubernetes_entrypoint_init_container.tpl
@@ -19,7 +19,7 @@
values: |
images:
tags:
- dep_check: quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal
+ dep_check: quay.io/airshipit/kubernetes-entrypoint:v1.0.0
pull_policy: IfNotPresent
local_registry:
active: true
@@ -76,7 +76,7 @@
{{ tuple . "calico_node" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" }}
return: |
- name: init
- image: "quay.io/airshipit/kubernetes-entrypoint:latest-ubuntu_focal"
+ image: "quay.io/airshipit/kubernetes-entrypoint:v1.0.0"
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: false
diff --git a/charts/staffeln/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl b/charts/staffeln/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
index 5c2dedb..48b53fa 100644
--- a/charts/staffeln/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
+++ b/charts/staffeln/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
@@ -40,9 +40,6 @@
release_group: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
application: {{ $application }}
component: {{ $component }}
-app.kubernetes.io/name: {{ $application }}
-app.kubernetes.io/component: {{ $component }}
-app.kubernetes.io/instance: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
{{- if ($envAll.Values.pod).labels }}
{{- if hasKey $envAll.Values.pod.labels $component }}
{{ index $envAll.Values.pod "labels" $component | toYaml }}
diff --git a/charts/staffeln/charts/helm-toolkit/templates/snippets/_rgw_s3_bucket_user_env_vars_rook.tpl b/charts/staffeln/charts/helm-toolkit/templates/snippets/_rgw_s3_bucket_user_env_vars_rook.tpl
deleted file mode 100644
index 08521e0..0000000
--- a/charts/staffeln/charts/helm-toolkit/templates/snippets/_rgw_s3_bucket_user_env_vars_rook.tpl
+++ /dev/null
@@ -1,28 +0,0 @@
-{{/*
-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.rgw_s3_bucket_user_env_vars_rook" }}
-{{- range $s3Bucket := .Values.storage.s3.buckets }}
-- name: {{ printf "%s_S3_ACCESS_KEY" ($s3Bucket.client | replace "-" "_" | upper) }}
- valueFrom:
- secretKeyRef:
- name: {{ $s3Bucket.name }}
- key: AWS_ACCESS_KEY_ID
-- name: {{ printf "%s_S3_SECRET_KEY" ($s3Bucket.client | replace "-" "_" | upper) }}
- valueFrom:
- secretKeyRef:
- name: {{ $s3Bucket.name }}
- key: AWS_SECRET_ACCESS_KEY
-{{- end }}
-{{- end }}
diff --git a/charts/staffeln/charts/helm-toolkit/templates/snippets/_service_params.tpl b/charts/staffeln/charts/helm-toolkit/templates/snippets/_service_params.tpl
deleted file mode 100644
index 6233a93..0000000
--- a/charts/staffeln/charts/helm-toolkit/templates/snippets/_service_params.tpl
+++ /dev/null
@@ -1,61 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Inserts kubernetes service parameters from values as is.
-values: |
- network:
- serviceExample:
- service:
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-usage: |
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: 'serviceExample'
- spec:
- ports:
- - name: s-example
- port: 1111
- {{ .Values.network.serviceExample | include "helm-toolkit.snippets.service_params" | indent 2 }}
-return: |
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-*/}}
-
-{{- define "helm-toolkit.snippets.service_params" }}
-{{- $serviceParams := dict }}
-{{- if hasKey . "service" }}
-{{- $serviceParams = .service }}
-{{- end }}
-{{- if hasKey . "node_port" }}
-{{- if hasKey .node_port "enabled" }}
-{{- if .node_port.enabled }}
-{{- $_ := set $serviceParams "type" "NodePort" }}
-{{- end }}
-{{- end }}
-{{- end }}
-{{- if hasKey . "external_policy_local" }}
-{{- if .external_policy_local }}
-{{- $_ := set $serviceParams "externalTrafficPolicy" "Local" }}
-{{- end }}
-{{- end }}
-{{- if $serviceParams }}
-{{- $serviceParams | toYaml }}
-{{- end }}
-{{- end }}
diff --git a/charts/staffeln/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl b/charts/staffeln/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
deleted file mode 100644
index bdb28c3..0000000
--- a/charts/staffeln/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
+++ /dev/null
@@ -1,279 +0,0 @@
-{{/*
-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.
-*/}}
-
-{{/*
-
-The helm-toolkit.utils.daemonset_overrides function have some limitations:
-
- * it allows to override only conf values specifid in configmap-etc
- * it doesn't allow to override values for daemonsets passed via env variables
- or via damoenset definition. As result it is impossible to have mixed
- deployment when one compute is configured with dpdk while other not.
- * it is impossible to override interface names/other information stored in
- <service>-bin configmap
- * It allows to schedule on both hosts and labels, which adds some
- uncertainty
-
-This implementation is intended to handle those limitations:
-
- * it allows to schedule only based on labels
- * it creates <service>-bin per daemonset override
- * it allows to override values when rendering daemonsets
-
- It picks data from the following structure:
-
- .Values:
- overrides:
- mychart_mydaemonset:
- labels:
- label::value:
- values:
- override_root_option: override_root_value
- conf:
- ovs_dpdk:
- enabled: true
- neutron:
- DEFAULT:
- foo: bar
-
-*/}}
-
-{{- define "helm-toolkit.utils.daemonset_overrides_root" }}
- {{- $daemonset := index . 0 }}
- {{- $daemonSetTemplateName := index . 1 }}
- {{ $serviceAccountName := index . 2 }}
- {{- $configmap_include := index . 3 }}
- {{- $configmap_name := index . 4 }}
- {{- $configbin_include := index . 5 }}
- {{- $configbin_name := index . 6 }}
- {{- $context := index . 7 }}
-
- {{- $_ := unset $context ".Files" }}
- {{- $daemonset_root_name := printf (print $context.Chart.Name "_" $daemonset) }}
- {{- $_ := set $context.Values "__daemonset_list" list }}
- {{- $_ := set $context.Values "__default" dict }}
-
- {{- $default_enabled := true }}
- {{- if hasKey $context.Values "overrides" }}
- {{- range $key, $val := $context.Values.overrides }}
-
- {{- if eq $key $daemonset_root_name }}
- {{- range $type, $type_data := . }}
- {{- if eq $type "overrides_default" }}
- {{- $default_enabled = $type_data }}
- {{- end }}
-
- {{- if eq $type "labels" }}
- {{- $_ := set $context.Values "__label_dict" . }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
- {{/* dictionary that will contain all info needed to generate this
- iteration of the daemonset. */}}
- {{- $_ := set $context.Values "__current_label" dict }}
-
- {{/* set daemonset name */}}
- {{- $_ := set $context.Values.__current_label "name" $label_name }}
-
- {{/* set daemonset metadata annotation */}}
- {{- $_ := set $context.Values.__current_label "daemonset_override" $lname }}
-
- {{/* apply overrides */}}
-
-
- {{- $override_root_copy := $ldata.values }}
- {{/* Deep copy to prevent https://storyboard.openstack.org/#!/story/2005936 */}}
- {{- $root_copy := omit ($context.Values | toYaml | fromYaml) "overrides" }}
- {{- $merged_dict := mergeOverwrite $root_copy $override_root_copy }}
-
- {{- $root_conf_copy2 := dict "values" $merged_dict }}
- {{- $context_values := omit (omit ($context.Values | toYaml | fromYaml) "values") "__daemonset_list" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2.values }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__current_label "nodeData" $root_conf_copy4 }}
-
-
- {{/* Schedule to the provided label value(s) */}}
- {{- $label_dict := dict "key" $label_name }}
- {{- $_ := set $label_dict "values" (list $label_value) }}
- {{- $_ := set $label_dict "operator" "In" }}
- {{- $list_aggregate := list $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
-
- {{/* Do not schedule to other specified labels, with higher
- precedence as the list position increases. Last defined label
- is highest priority. */}}
- {{- $other_labels := omit $context.Values.__label_dict $lname }}
- {{- range $lname2, $ldata2 := $other_labels }}
- {{ $label_name2 := (split "::" $lname2)._0 }}
- {{ $label_value2 := (split "::" $lname2)._1 }}
-
- {{- $label_dict := dict "key" $label_name2 }}
- {{- $_ := set $label_dict "values" (list $label_value2) }}
- {{- $_ := set $label_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__current_label.matchExpressions $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
- {{- end }}
-
- {{/* store completed daemonset entry/info into global list */}}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__current_label }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- $_ := unset $context.Values "__current_label" }}
-
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* scheduler exceptions for the default daemonset */}}
- {{- $_ := set $context.Values.__default "matchExpressions" list }}
-
- {{- range $type, $type_data := . }}
- {{/* Do not schedule to other specified labels */}}
- {{- if eq $type "labels" }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
-
- {{- $default_dict := dict "key" $label_name }}
- {{- $_ := set $default_dict "values" (list $label_value) }}
- {{- $_ := set $default_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__default.matchExpressions $default_dict }}
- {{- $_ := set $context.Values.__default "matchExpressions" $list_aggregate }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* generate the default daemonset */}}
-
- {{/* set name */}}
- {{- $_ := set $context.Values.__default "name" "default" }}
-
- {{/* no overrides apply, so copy as-is */}}
- {{- $root_conf_copy1 := omit $context.Values.conf "overrides" }}
- {{- $root_conf_copy2 := dict "conf" $root_conf_copy1 }}
- {{- $context_values := omit $context.Values "conf" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2 }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__default "nodeData" $root_conf_copy4 }}
-
- {{/* add to global list */}}
- {{- if $default_enabled }}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__default }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- end }}
-
- {{- range $current_dict := $context.Values.__daemonset_list }}
-
- {{- $context_novalues := omit $context "Values" }}
- {{- $merged_dict := mergeOverwrite $context_novalues $current_dict.nodeData }}
- {{- $_ := set $current_dict "nodeData" $merged_dict }}
- {{/* Deep copy original daemonset_yaml */}}
- {{- $daemonset_yaml := list $daemonset $configmap_name $serviceAccountName $merged_dict | include $daemonSetTemplateName | toString | fromYaml }}
- {{- $_ := set $context.Values "__daemonset_yaml" ($daemonset_yaml | toYaml | fromYaml) }}
-
- {{/* Use the following name format $daemonset_root_name + sha256summ($current_dict.matchExpressions)
- as labels might be too long and contain wrong characters like / */}}
- {{- $_ := set $current_dict "dns_1123_name" dict }}
- {{- $name_format := "" }}
- {{- if eq $current_dict.name "default" }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name "default") | replace "_" "-" }}
- {{- else }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name ($current_dict.matchExpressions | quote | sha256sum | trunc 16)) | replace "_" "-" }}
- {{- end }}
- {{- $_ := set $current_dict "dns_1123_name" $name_format }}
-
- {{/* set daemonset metadata name */}}
- {{- if not $context.Values.__daemonset_yaml.metadata }}{{- $_ := set $context.Values.__daemonset_yaml "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.metadata.name }}{{- $_ := set $context.Values.__daemonset_yaml.metadata "name" dict }}{{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata "name" $current_dict.dns_1123_name }}
-
- {{/* cross-reference configmap name to container volume definitions */}}
- {{- $_ := set $context.Values "__volume_list" list }}
- {{- range $current_volume := $context.Values.__daemonset_yaml.spec.template.spec.volumes }}
- {{- $_ := set $context.Values "__volume" $current_volume }}
- {{- if hasKey $context.Values.__volume "secret" }}
- {{- if eq $context.Values.__volume.secret.secretName $configmap_name }}
- {{- $_ := set $context.Values.__volume.secret "secretName" (printf "%s-etc" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- if hasKey $context.Values.__volume "configMap" }}
- {{- if eq $context.Values.__volume.configMap.name $configbin_name }}
- {{- $_ := set $context.Values.__volume.configMap "name" (printf "%s-bin" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- $updated_list := append $context.Values.__volume_list $context.Values.__volume }}
- {{- $_ := set $context.Values "__volume_list" $updated_list }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "volumes" $context.Values.__volume_list }}
-
-
- {{/* populate scheduling restrictions */}}
- {{- if hasKey $current_dict "matchExpressions" }}
- {{- $length := len $current_dict.matchExpressions }}
- {{- if gt $length 0 }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "affinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity "nodeAffinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity "requiredDuringSchedulingIgnoredDuringExecution" dict }}{{- end }}
-
- {{- $expressions_modified := list }}
- {{- if hasKey $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" }}
- {{- range $orig_expression := $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms }}
- {{- $match_expressions_modified := list }}
- {{- $match_expressions_modified = concat $match_expressions_modified $current_dict.matchExpressions }}
- {{- if hasKey $orig_expression "matchExpressions" }}
- {{- $match_expressions_modified = concat $match_expressions_modified $orig_expression.matchExpressions }}
- {{- $expressions_modified = append $expressions_modified (dict "matchExpressions" $match_expressions_modified) }}
- {{- end }}
- {{- end }}
- {{- else }}
- {{- $expressions_modified = (list (dict "matchExpressions" $current_dict.matchExpressions)) }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" $expressions_modified }}
- {{- end }}
- {{- end }}
-
- {{/* input value hash for current set of values overrides */}}
- {{- if not $context.Values.__daemonset_yaml.spec }}{{- $_ := set $context.Values.__daemonset_yaml "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template }}{{- $_ := set $context.Values.__daemonset_yaml.spec "template" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata.annotations }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata "annotations" dict }}{{- end }}
- {{- $cmap := list (printf "%s-etc" $current_dict.dns_1123_name) $current_dict.nodeData | include $configmap_include }}
- {{- $cmap_bin := list (printf "%s-bin" $current_dict.dns_1123_name) $current_dict.nodeData | include $configbin_include }}
- {{- $values_cmap_hash := $cmap | quote | sha256sum }}
- {{- $values_cmap_bin_hash := $cmap_bin | quote | sha256sum }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-etc-hash" $values_cmap_hash }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-bin-hash" $values_cmap_bin_hash }}
-
- {{/* Do not set override for default daemonset */}}
- {{- if $current_dict.daemonset_override }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata.annotations "daemonset_override" $current_dict.daemonset_override }}
- {{- end }}
-
-{{/* generate configmap */}}
----
-{{ $cmap }}
- {{/* generate <service>-bin yaml */}}
----
-{{ $cmap_bin }}
- {{/* generate daemonset yaml */}}
----
-{{ $context.Values.__daemonset_yaml | toYaml }}
- {{- end }}
-{{- end }}
diff --git a/charts/tempest/charts/helm-toolkit/Chart.yaml b/charts/tempest/charts/helm-toolkit/Chart.yaml
index 9d3aa1e..d4c0ea2 100644
--- a/charts/tempest/charts/helm-toolkit/Chart.yaml
+++ b/charts/tempest/charts/helm-toolkit/Chart.yaml
@@ -9,4 +9,4 @@
sources:
- https://opendev.org/openstack/openstack-helm-infra
- https://opendev.org/openstack/openstack-helm
-version: 0.2.78
+version: 0.2.69
diff --git a/charts/tempest/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl b/charts/tempest/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
index 728b994..6877b7b 100644
--- a/charts/tempest/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
+++ b/charts/tempest/charts/helm-toolkit/templates/endpoints/_host_and_port_endpoint_uri_lookup.tpl
@@ -14,8 +14,7 @@
{{/*
abstract: |
- Resolves 'hostname:port' for an endpoint, or several hostname:port pairs for statefulset e.g
- 'hostname1:port1,hostname2:port2,hostname3:port3',
+ Resolves 'hostname:port' for an endpoint
examples:
- values: |
endpoints:
@@ -47,23 +46,6 @@
{{ tuple "oslo_db" "internal" "mysql" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
return: |
127.0.0.1:3306
- - values: |
- endpoints:
- oslo_cache:
- hosts:
- default: memcached
- host_fqdn_override:
- default: null
- statefulset:
- name: openstack-memcached-memcached
- replicas: 3
- port:
- memcache:
- default: 11211
- usage: |
- {{ tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" }}
- return: |
- openstack-memcached-memcached-0:11211,openstack-memcached-memcached-1:11211,openstack-memcached-memcached-2:11211
*/}}
{{- define "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" -}}
@@ -71,19 +53,7 @@
{{- $endpoint := index . 1 -}}
{{- $port := index . 2 -}}
{{- $context := index . 3 -}}
-{{- $ssMap := index $context.Values.endpoints ( $type | replace "-" "_" ) "statefulset" | default false -}}
-{{- $local := dict "endpointHosts" list -}}
-{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" -}}
-{{- if $ssMap -}}
-{{- $endpointHostPrefix := $ssMap.name -}}
-{{- $endpointHostSuffix := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
-{{- range $podInt := until ( atoi (print $ssMap.replicas ) ) -}}
-{{- $endpointHostname := printf "%s-%d.%s:%s" $endpointHostPrefix $podInt $endpointHostSuffix $endpointPort -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts $endpointHostname ) -}}
-{{- end -}}
-{{- else -}}
-{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" -}}
-{{- $_ := set $local "endpointHosts" ( append $local.endpointHosts (printf "%s:%s" $endpointHostname $endpointPort) ) -}}
-{{- end -}}
-{{ include "helm-toolkit.utils.joinListWithComma" $local.endpointHosts }}
+{{- $endpointPort := tuple $type $endpoint $port $context | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
+{{- $endpointHostname := tuple $type $endpoint $context | include "helm-toolkit.endpoints.endpoint_host_lookup" }}
+{{- printf "%s:%s" $endpointHostname $endpointPort -}}
{{- end -}}
diff --git a/charts/tempest/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl b/charts/tempest/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
index 24eb569..b2ec648 100644
--- a/charts/tempest/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
+++ b/charts/tempest/charts/helm-toolkit/templates/endpoints/_keystone_endpoint_path_lookup.tpl
@@ -40,9 +40,9 @@
{{- $context := index . 3 -}}
{{- $endpointMap := index $context.Values.endpoints ( $type | replace "-" "_" ) }}
{{- if kindIs "string" $endpointMap.path }}
-{{- printf "%s" $endpointMap.path | default "" -}}
+{{- printf "%s" $endpointMap.path | default "/" -}}
{{- else -}}
-{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "" }}
+{{- $endpointPath := index $endpointMap.path $endpoint | default $endpointMap.path.default | default "/" }}
{{- printf "%s" $endpointPath -}}
{{- end -}}
{{- end -}}
diff --git a/charts/tempest/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl b/charts/tempest/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
deleted file mode 100644
index 332ca99..0000000
--- a/charts/tempest/charts/helm-toolkit/templates/manifests/_configmap-oslo-policy.tpl
+++ /dev/null
@@ -1,51 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Renders out the configmap <service>-oslo-policy.
-values: |
- conf:
- policy.d:
- file1:
- foo: bar
- file2:
- foo: baz
-usage: |
-{{- include "helm-toolkit.manifests.configmap_oslo_policy" (dict "envAll" $envAll "serviceName" "keystone") }}
-return: |
- ---
- apiVersion: v1
- kind: Secret
- metadata:
- name: keystone-oslo-policy
- data:
- file1: base64of(foo: bar)
- file2: base64of(foo: baz)
-*/}}
-{{- define "helm-toolkit.manifests.configmap_oslo_policy" -}}
-{{- $envAll := index . "envAll" -}}
-{{- $serviceName := index . "serviceName" -}}
----
-apiVersion: v1
-kind: Secret
-metadata:
- name: {{ $serviceName }}-oslo-policy
-type: Opaque
-data:
- {{- range $key, $value := index $envAll.Values.conf "policy.d" }}
- {{- if $value }}
- {{ $key }}: {{ toYaml $value | b64enc }}
- {{- else }}
- {{ $key }}: {{ "\n" | b64enc }}
- {{- end }}
- {{- end }}
-{{- end -}}
diff --git a/charts/tempest/charts/helm-toolkit/templates/manifests/_ingress.tpl b/charts/tempest/charts/helm-toolkit/templates/manifests/_ingress.tpl
index 792571c..cacb4b8 100644
--- a/charts/tempest/charts/helm-toolkit/templates/manifests/_ingress.tpl
+++ b/charts/tempest/charts/helm-toolkit/templates/manifests/_ingress.tpl
@@ -708,10 +708,6 @@
{{- range $v := without (index $endpointHost.tls "dnsNames" | default list) $hostNameFull }}
{{- $vHosts = append $vHosts $v }}
{{- end }}
-{{- if hasKey $envAll.Values.endpoints "alias_fqdn" }}
-{{- $alias_host := $envAll.Values.endpoints.alias_fqdn }}
-{{- $vHosts = append $vHosts $alias_host }}
-{{- end }}
{{- $secretName := index $envAll.Values.secrets "tls" ( $backendServiceType | replace "-" "_" ) $backendService $endpoint }}
{{- $_ := required "You need to specify a secret in your values for the endpoint" $secretName }}
tls:
diff --git a/charts/tempest/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl b/charts/tempest/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
index c6a7521..1e28da9 100644
--- a/charts/tempest/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
+++ b/charts/tempest/charts/helm-toolkit/templates/scripts/_db-drop.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Drop')
@@ -126,7 +125,7 @@
# Delete DB
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP DATABASE IF EXISTS {0}".format(database)))
+ connection.execute("DROP DATABASE IF EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -139,7 +138,7 @@
# Delete DB User
try:
with root_engine.connect() as connection:
- connection.execute(text("DROP USER IF EXISTS {0}".format(user)))
+ connection.execute("DROP USER IF EXISTS {0}".format(user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/tempest/charts/helm-toolkit/templates/scripts/_db-init.py.tpl b/charts/tempest/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
index 1917f78..110cd98 100644
--- a/charts/tempest/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
+++ b/charts/tempest/charts/helm-toolkit/templates/scripts/_db-init.py.tpl
@@ -33,7 +33,6 @@
PARSER_OPTS = {"strict": False}
import logging
from sqlalchemy import create_engine
-from sqlalchemy import text
# Create logger, console handler and formatter
logger = logging.getLogger('OpenStack-Helm DB Init')
@@ -126,7 +125,7 @@
# Create DB
try:
with root_engine.connect() as connection:
- connection.execute(text("CREATE DATABASE IF NOT EXISTS {0}".format(database)))
+ connection.execute("CREATE DATABASE IF NOT EXISTS {0}".format(database))
try:
connection.commit()
except AttributeError:
@@ -140,10 +139,10 @@
try:
with root_engine.connect() as connection:
connection.execute(
- text("CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
- user, password, mysql_x509)))
+ "CREATE USER IF NOT EXISTS \'{0}\'@\'%%\' IDENTIFIED BY \'{1}\' {2}".format(
+ user, password, mysql_x509))
connection.execute(
- text("GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user)))
+ "GRANT ALL ON `{0}`.* TO \'{1}\'@\'%%\'".format(database, user))
try:
connection.commit()
except AttributeError:
diff --git a/charts/tempest/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl b/charts/tempest/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
index e6e9c6e..3739f95 100644
--- a/charts/tempest/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
+++ b/charts/tempest/charts/helm-toolkit/templates/scripts/_rabbit-init.sh.tpl
@@ -29,9 +29,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_ADMIN_PASSWORD=$(echo "${RABBITMQ_ADMIN_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User creadential
RABBITMQ_USERNAME=$(echo "${RABBITMQ_USER_CONNECTION}" | \
@@ -39,9 +37,7 @@
awk -F'[//:]' '{print $4}')
RABBITMQ_PASSWORD=$(echo "${RABBITMQ_USER_CONNECTION}" | \
awk -F'[@]' '{print $1}' | \
- awk -F'[//:]' '{print $5}' | \
- sed 's/%/\\x/g' | \
- xargs -0 printf "%b")
+ awk -F'[//:]' '{print $5}')
# Extract User vHost
RABBITMQ_VHOST=$(echo "${RABBITMQ_USER_CONNECTION}" | \
diff --git a/charts/tempest/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl b/charts/tempest/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
index 5c2dedb..48b53fa 100644
--- a/charts/tempest/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
+++ b/charts/tempest/charts/helm-toolkit/templates/snippets/_kubernetes_metadata_labels.tpl
@@ -40,9 +40,6 @@
release_group: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
application: {{ $application }}
component: {{ $component }}
-app.kubernetes.io/name: {{ $application }}
-app.kubernetes.io/component: {{ $component }}
-app.kubernetes.io/instance: {{ $envAll.Values.release_group | default $envAll.Release.Name }}
{{- if ($envAll.Values.pod).labels }}
{{- if hasKey $envAll.Values.pod.labels $component }}
{{ index $envAll.Values.pod "labels" $component | toYaml }}
diff --git a/charts/tempest/charts/helm-toolkit/templates/snippets/_service_params.tpl b/charts/tempest/charts/helm-toolkit/templates/snippets/_service_params.tpl
deleted file mode 100644
index 6233a93..0000000
--- a/charts/tempest/charts/helm-toolkit/templates/snippets/_service_params.tpl
+++ /dev/null
@@ -1,61 +0,0 @@
-{{/*
-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.
-*/}}
-{{/*
-abstract: |
- Inserts kubernetes service parameters from values as is.
-values: |
- network:
- serviceExample:
- service:
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-usage: |
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: 'serviceExample'
- spec:
- ports:
- - name: s-example
- port: 1111
- {{ .Values.network.serviceExample | include "helm-toolkit.snippets.service_params" | indent 2 }}
-return: |
- type: loadBalancer
- loadBalancerIP: 1.1.1.1
-*/}}
-
-{{- define "helm-toolkit.snippets.service_params" }}
-{{- $serviceParams := dict }}
-{{- if hasKey . "service" }}
-{{- $serviceParams = .service }}
-{{- end }}
-{{- if hasKey . "node_port" }}
-{{- if hasKey .node_port "enabled" }}
-{{- if .node_port.enabled }}
-{{- $_ := set $serviceParams "type" "NodePort" }}
-{{- end }}
-{{- end }}
-{{- end }}
-{{- if hasKey . "external_policy_local" }}
-{{- if .external_policy_local }}
-{{- $_ := set $serviceParams "externalTrafficPolicy" "Local" }}
-{{- end }}
-{{- end }}
-{{- if $serviceParams }}
-{{- $serviceParams | toYaml }}
-{{- end }}
-{{- end }}
diff --git a/charts/tempest/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl b/charts/tempest/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
deleted file mode 100644
index bdb28c3..0000000
--- a/charts/tempest/charts/helm-toolkit/templates/utils/_daemonset_overrides_root.tpl
+++ /dev/null
@@ -1,279 +0,0 @@
-{{/*
-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.
-*/}}
-
-{{/*
-
-The helm-toolkit.utils.daemonset_overrides function have some limitations:
-
- * it allows to override only conf values specifid in configmap-etc
- * it doesn't allow to override values for daemonsets passed via env variables
- or via damoenset definition. As result it is impossible to have mixed
- deployment when one compute is configured with dpdk while other not.
- * it is impossible to override interface names/other information stored in
- <service>-bin configmap
- * It allows to schedule on both hosts and labels, which adds some
- uncertainty
-
-This implementation is intended to handle those limitations:
-
- * it allows to schedule only based on labels
- * it creates <service>-bin per daemonset override
- * it allows to override values when rendering daemonsets
-
- It picks data from the following structure:
-
- .Values:
- overrides:
- mychart_mydaemonset:
- labels:
- label::value:
- values:
- override_root_option: override_root_value
- conf:
- ovs_dpdk:
- enabled: true
- neutron:
- DEFAULT:
- foo: bar
-
-*/}}
-
-{{- define "helm-toolkit.utils.daemonset_overrides_root" }}
- {{- $daemonset := index . 0 }}
- {{- $daemonSetTemplateName := index . 1 }}
- {{ $serviceAccountName := index . 2 }}
- {{- $configmap_include := index . 3 }}
- {{- $configmap_name := index . 4 }}
- {{- $configbin_include := index . 5 }}
- {{- $configbin_name := index . 6 }}
- {{- $context := index . 7 }}
-
- {{- $_ := unset $context ".Files" }}
- {{- $daemonset_root_name := printf (print $context.Chart.Name "_" $daemonset) }}
- {{- $_ := set $context.Values "__daemonset_list" list }}
- {{- $_ := set $context.Values "__default" dict }}
-
- {{- $default_enabled := true }}
- {{- if hasKey $context.Values "overrides" }}
- {{- range $key, $val := $context.Values.overrides }}
-
- {{- if eq $key $daemonset_root_name }}
- {{- range $type, $type_data := . }}
- {{- if eq $type "overrides_default" }}
- {{- $default_enabled = $type_data }}
- {{- end }}
-
- {{- if eq $type "labels" }}
- {{- $_ := set $context.Values "__label_dict" . }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
- {{/* dictionary that will contain all info needed to generate this
- iteration of the daemonset. */}}
- {{- $_ := set $context.Values "__current_label" dict }}
-
- {{/* set daemonset name */}}
- {{- $_ := set $context.Values.__current_label "name" $label_name }}
-
- {{/* set daemonset metadata annotation */}}
- {{- $_ := set $context.Values.__current_label "daemonset_override" $lname }}
-
- {{/* apply overrides */}}
-
-
- {{- $override_root_copy := $ldata.values }}
- {{/* Deep copy to prevent https://storyboard.openstack.org/#!/story/2005936 */}}
- {{- $root_copy := omit ($context.Values | toYaml | fromYaml) "overrides" }}
- {{- $merged_dict := mergeOverwrite $root_copy $override_root_copy }}
-
- {{- $root_conf_copy2 := dict "values" $merged_dict }}
- {{- $context_values := omit (omit ($context.Values | toYaml | fromYaml) "values") "__daemonset_list" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2.values }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__current_label "nodeData" $root_conf_copy4 }}
-
-
- {{/* Schedule to the provided label value(s) */}}
- {{- $label_dict := dict "key" $label_name }}
- {{- $_ := set $label_dict "values" (list $label_value) }}
- {{- $_ := set $label_dict "operator" "In" }}
- {{- $list_aggregate := list $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
-
- {{/* Do not schedule to other specified labels, with higher
- precedence as the list position increases. Last defined label
- is highest priority. */}}
- {{- $other_labels := omit $context.Values.__label_dict $lname }}
- {{- range $lname2, $ldata2 := $other_labels }}
- {{ $label_name2 := (split "::" $lname2)._0 }}
- {{ $label_value2 := (split "::" $lname2)._1 }}
-
- {{- $label_dict := dict "key" $label_name2 }}
- {{- $_ := set $label_dict "values" (list $label_value2) }}
- {{- $_ := set $label_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__current_label.matchExpressions $label_dict }}
- {{- $_ := set $context.Values.__current_label "matchExpressions" $list_aggregate }}
- {{- end }}
-
- {{/* store completed daemonset entry/info into global list */}}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__current_label }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- $_ := unset $context.Values "__current_label" }}
-
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* scheduler exceptions for the default daemonset */}}
- {{- $_ := set $context.Values.__default "matchExpressions" list }}
-
- {{- range $type, $type_data := . }}
- {{/* Do not schedule to other specified labels */}}
- {{- if eq $type "labels" }}
- {{- range $lname, $ldata := . }}
- {{ $label_name := (split "::" $lname)._0 }}
- {{ $label_value := (split "::" $lname)._1 }}
-
- {{- $default_dict := dict "key" $label_name }}
- {{- $_ := set $default_dict "values" (list $label_value) }}
- {{- $_ := set $default_dict "operator" "NotIn" }}
-
- {{- $list_aggregate := append $context.Values.__default.matchExpressions $default_dict }}
- {{- $_ := set $context.Values.__default "matchExpressions" $list_aggregate }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
- {{- end }}
-
- {{/* generate the default daemonset */}}
-
- {{/* set name */}}
- {{- $_ := set $context.Values.__default "name" "default" }}
-
- {{/* no overrides apply, so copy as-is */}}
- {{- $root_conf_copy1 := omit $context.Values.conf "overrides" }}
- {{- $root_conf_copy2 := dict "conf" $root_conf_copy1 }}
- {{- $context_values := omit $context.Values "conf" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2 }}
- {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
- {{- $_ := set $context.Values.__default "nodeData" $root_conf_copy4 }}
-
- {{/* add to global list */}}
- {{- if $default_enabled }}
- {{- $list_aggregate := append $context.Values.__daemonset_list $context.Values.__default }}
- {{- $_ := set $context.Values "__daemonset_list" $list_aggregate }}
- {{- end }}
-
- {{- range $current_dict := $context.Values.__daemonset_list }}
-
- {{- $context_novalues := omit $context "Values" }}
- {{- $merged_dict := mergeOverwrite $context_novalues $current_dict.nodeData }}
- {{- $_ := set $current_dict "nodeData" $merged_dict }}
- {{/* Deep copy original daemonset_yaml */}}
- {{- $daemonset_yaml := list $daemonset $configmap_name $serviceAccountName $merged_dict | include $daemonSetTemplateName | toString | fromYaml }}
- {{- $_ := set $context.Values "__daemonset_yaml" ($daemonset_yaml | toYaml | fromYaml) }}
-
- {{/* Use the following name format $daemonset_root_name + sha256summ($current_dict.matchExpressions)
- as labels might be too long and contain wrong characters like / */}}
- {{- $_ := set $current_dict "dns_1123_name" dict }}
- {{- $name_format := "" }}
- {{- if eq $current_dict.name "default" }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name "default") | replace "_" "-" }}
- {{- else }}
- {{- $name_format = (printf "%s-%s" $daemonset_root_name ($current_dict.matchExpressions | quote | sha256sum | trunc 16)) | replace "_" "-" }}
- {{- end }}
- {{- $_ := set $current_dict "dns_1123_name" $name_format }}
-
- {{/* set daemonset metadata name */}}
- {{- if not $context.Values.__daemonset_yaml.metadata }}{{- $_ := set $context.Values.__daemonset_yaml "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.metadata.name }}{{- $_ := set $context.Values.__daemonset_yaml.metadata "name" dict }}{{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata "name" $current_dict.dns_1123_name }}
-
- {{/* cross-reference configmap name to container volume definitions */}}
- {{- $_ := set $context.Values "__volume_list" list }}
- {{- range $current_volume := $context.Values.__daemonset_yaml.spec.template.spec.volumes }}
- {{- $_ := set $context.Values "__volume" $current_volume }}
- {{- if hasKey $context.Values.__volume "secret" }}
- {{- if eq $context.Values.__volume.secret.secretName $configmap_name }}
- {{- $_ := set $context.Values.__volume.secret "secretName" (printf "%s-etc" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- if hasKey $context.Values.__volume "configMap" }}
- {{- if eq $context.Values.__volume.configMap.name $configbin_name }}
- {{- $_ := set $context.Values.__volume.configMap "name" (printf "%s-bin" $current_dict.dns_1123_name) }}
- {{- end }}
- {{- end }}
- {{- $updated_list := append $context.Values.__volume_list $context.Values.__volume }}
- {{- $_ := set $context.Values "__volume_list" $updated_list }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "volumes" $context.Values.__volume_list }}
-
-
- {{/* populate scheduling restrictions */}}
- {{- if hasKey $current_dict "matchExpressions" }}
- {{- $length := len $current_dict.matchExpressions }}
- {{- if gt $length 0 }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "affinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity "nodeAffinity" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity "requiredDuringSchedulingIgnoredDuringExecution" dict }}{{- end }}
-
- {{- $expressions_modified := list }}
- {{- if hasKey $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" }}
- {{- range $orig_expression := $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms }}
- {{- $match_expressions_modified := list }}
- {{- $match_expressions_modified = concat $match_expressions_modified $current_dict.matchExpressions }}
- {{- if hasKey $orig_expression "matchExpressions" }}
- {{- $match_expressions_modified = concat $match_expressions_modified $orig_expression.matchExpressions }}
- {{- $expressions_modified = append $expressions_modified (dict "matchExpressions" $match_expressions_modified) }}
- {{- end }}
- {{- end }}
- {{- else }}
- {{- $expressions_modified = (list (dict "matchExpressions" $current_dict.matchExpressions)) }}
- {{- end }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution "nodeSelectorTerms" $expressions_modified }}
- {{- end }}
- {{- end }}
-
- {{/* input value hash for current set of values overrides */}}
- {{- if not $context.Values.__daemonset_yaml.spec }}{{- $_ := set $context.Values.__daemonset_yaml "spec" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template }}{{- $_ := set $context.Values.__daemonset_yaml.spec "template" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template "metadata" dict }}{{- end }}
- {{- if not $context.Values.__daemonset_yaml.spec.template.metadata.annotations }}{{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata "annotations" dict }}{{- end }}
- {{- $cmap := list (printf "%s-etc" $current_dict.dns_1123_name) $current_dict.nodeData | include $configmap_include }}
- {{- $cmap_bin := list (printf "%s-bin" $current_dict.dns_1123_name) $current_dict.nodeData | include $configbin_include }}
- {{- $values_cmap_hash := $cmap | quote | sha256sum }}
- {{- $values_cmap_bin_hash := $cmap_bin | quote | sha256sum }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-etc-hash" $values_cmap_hash }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-bin-hash" $values_cmap_bin_hash }}
-
- {{/* Do not set override for default daemonset */}}
- {{- if $current_dict.daemonset_override }}
- {{- $_ := set $context.Values.__daemonset_yaml.metadata.annotations "daemonset_override" $current_dict.daemonset_override }}
- {{- end }}
-
-{{/* generate configmap */}}
----
-{{ $cmap }}
- {{/* generate <service>-bin yaml */}}
----
-{{ $cmap_bin }}
- {{/* generate daemonset yaml */}}
----
-{{ $context.Values.__daemonset_yaml | toYaml }}
- {{- end }}
-{{- end }}
diff --git a/charts/tempest/requirements.lock b/charts/tempest/requirements.lock
index b94dead..4f63a87 100644
--- a/charts/tempest/requirements.lock
+++ b/charts/tempest/requirements.lock
@@ -1,6 +1,6 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
-digest: sha256:760c5997580ac8d30a64dfe92d6a54052b783ddf90cacbc5a4c95c1330988742
+ version: 0.2.69
+digest: sha256:f971f98746c97193da5ff7a44d2401ae7d91201a49ed9f23d52359a1b6e9d0ef
generated: "0001-01-01T00:00:00Z"
diff --git a/charts/tempest/requirements.yaml b/charts/tempest/requirements.yaml
index 52e723e..b3d5dcf 100644
--- a/charts/tempest/requirements.yaml
+++ b/charts/tempest/requirements.yaml
@@ -1,4 +1,4 @@
dependencies:
- name: helm-toolkit
repository: https://tarballs.openstack.org/openstack-helm-infra
- version: 0.2.78
+ version: 0.2.69
diff --git a/images/openvswitch/Dockerfile b/images/openvswitch/Dockerfile
index acc2c41..5299c47 100644
--- a/images/openvswitch/Dockerfile
+++ b/images/openvswitch/Dockerfile
@@ -16,4 +16,6 @@
tcpdump
dnf -y clean all
rm -rf /var/cache/dnf
+usermod -u 42424 openvswitch
+groupmod -g 42424 openvswitch
EOF
diff --git a/images/ovn/Dockerfile b/images/ovn/Dockerfile
index c8b7729..7847744 100644
--- a/images/ovn/Dockerfile
+++ b/images/ovn/Dockerfile
@@ -15,6 +15,7 @@
EOF
FROM ${REGISTRY}/openvswitch:${RELEASE}
+ENV OVS_USER_ID=42424
ARG TARGETPLATFORM
ADD --chmod=755 https://dl.k8s.io/release/v1.29.3/bin/${TARGETPLATFORM}/kubectl /usr/local/bin/kubectl
ARG OVN_SERIES=24.03
@@ -35,3 +36,9 @@
COPY --from=ovn-kubernetes --link /src/dist/images/ovndb-raft-functions.sh /root/ovndb-raft-functions.sh
COPY --from=ovn-kubernetes --link /src/dist/images/ovnkube.sh /root/ovnkube.sh
COPY --from=ovn-kubernetes --link /usr/bin/ovn-kube-util /usr/bin/ovn-kube-util
+
+RUN <<EOF bash -xe
+ usermod -u 42424 openvswitch
+ mkdir -p /var/log/ovn /var/lib/ovn /var/run/ovn
+ chown -Rv 42424:42424 /var/log/ovn /var/lib/ovn /var/run/ovn
+EOF
diff --git a/molecule/aio/group_vars/all/molecule.yml b/molecule/aio/group_vars/all/molecule.yml
index 9d8942a..bf39267 100644
--- a/molecule/aio/group_vars/all/molecule.yml
+++ b/molecule/aio/group_vars/all/molecule.yml
@@ -1,3 +1,5 @@
+atmosphere_image_prefix: "{{ lookup('env', 'ATMOSPHERE_IMAGE_PREFIX') | default('', True) }}"
+
ceph_conf_overrides:
- section: global
option: mon allow pool size one
diff --git a/releasenotes/notes/allow-prefix-to-image-names-4a795e9ff805b8b0.yaml b/releasenotes/notes/allow-prefix-to-image-names-4a795e9ff805b8b0.yaml
new file mode 100644
index 0000000..1c8a4ea
--- /dev/null
+++ b/releasenotes/notes/allow-prefix-to-image-names-4a795e9ff805b8b0.yaml
@@ -0,0 +1,6 @@
+---
+features:
+ - |
+ Introduced the ability to specify a prefix for image names. This allows for
+ easier integration with image proxies and caching mechanisms, eliminating
+ the need to maintain separate inventory overrides for each image.
diff --git a/releasenotes/notes/fix-neutron-ironic-agent-f3eedbcec84b0478.yaml b/releasenotes/notes/fix-neutron-ironic-agent-f3eedbcec84b0478.yaml
new file mode 100644
index 0000000..773ef1b
--- /dev/null
+++ b/releasenotes/notes/fix-neutron-ironic-agent-f3eedbcec84b0478.yaml
@@ -0,0 +1,4 @@
+---
+fixes:
+ - |
+ Fixed an issue where the ``neutron-ironic-agent`` service failed to start.
diff --git a/releasenotes/notes/fix-ovs-dpdk-permission-issue-fea15d01685d2e1b.yaml b/releasenotes/notes/fix-ovs-dpdk-permission-issue-fea15d01685d2e1b.yaml
new file mode 100644
index 0000000..ab4ea07
--- /dev/null
+++ b/releasenotes/notes/fix-ovs-dpdk-permission-issue-fea15d01685d2e1b.yaml
@@ -0,0 +1,8 @@
+---
+fixes:
+ - |
+ When use OVS with DPDK, by default both OVS and OVN run with root user, this
+ may cause issue that QEMU can't write vhost user socket file in openvswitch
+ runtime directory (``/run/openvswitch``). This has been fixed by config Open
+ vSwitch and OVN componments to run with non root user id 42424 which is same
+ with QEMU and other OpenStack services inside the container.
diff --git a/roles/defaults/defaults/main.yml b/roles/defaults/defaults/main.yml
index 2df46a0..f56f402 100644
--- a/roles/defaults/defaults/main.yml
+++ b/roles/defaults/defaults/main.yml
@@ -18,6 +18,7 @@
atmosphere_ingress_class_name: atmosphere
atmosphere_ingress_cluster_issuer: atmosphere
atmosphere_ingress_annotations: {}
+atmosphere_image_prefix: ""
# Network backend
atmosphere_network_backend: openvswitch
diff --git a/roles/defaults/vars.go b/roles/defaults/vars.go
index 0799e7d..38b6b22 100644
--- a/roles/defaults/vars.go
+++ b/roles/defaults/vars.go
@@ -16,14 +16,13 @@
// Define a global variable for the release value.
var release = "main"
-// Function to replace the {{ release }} placeholders
-func replaceReleaseInYAML(yamlContent []byte, release string) []byte {
- return []byte(strings.ReplaceAll(string(yamlContent), "{{ atmosphere_release }}", release))
-}
-
func GetImages() (map[string]string, error) {
// Replace {{ release }} with the actual release value
- modifiedVarsFile := replaceReleaseInYAML(varsFile, release)
+ modifiedVarsFile := []byte(strings.ReplaceAll(string(varsFile), "{{ atmosphere_release }}", release))
+
+ // Fix prefixes for images to allow tests to run
+ modifiedVarsFile = []byte(strings.ReplaceAll(string(modifiedVarsFile), "{{ atmosphere_image_prefix }}registry.atmosphere.dev", "harbor.atmosphere.dev"))
+ modifiedVarsFile = []byte(strings.ReplaceAll(string(modifiedVarsFile), "{{ atmosphere_image_prefix }}", "harbor.atmosphere.dev/"))
path, err := yaml.PathString("$._atmosphere_images")
if err != nil {
diff --git a/roles/defaults/vars/main.yml b/roles/defaults/vars/main.yml
index 86415bf..e0a2b8b 100644
--- a/roles/defaults/vars/main.yml
+++ b/roles/defaults/vars/main.yml
@@ -15,219 +15,220 @@
atmosphere_release: "2023.1"
_atmosphere_images:
- alertmanager: quay.io/prometheus/alertmanager:v0.27.0
- barbican_api: "registry.atmosphere.dev/library/barbican:{{ atmosphere_release }}"
- barbican_db_sync: "registry.atmosphere.dev/library/barbican:{{ atmosphere_release }}"
- bootstrap: "registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
- ceph_config_helper: "registry.atmosphere.dev/library/libvirtd:{{ atmosphere_release }}"
- ceph: quay.io/ceph/ceph:v18.2.1
- cert_manager_cainjector: quay.io/jetstack/cert-manager-cainjector:v1.12.10
- cert_manager_cli: quay.io/jetstack/cert-manager-ctl:v1.12.10
- cert_manager_controller: quay.io/jetstack/cert-manager-controller:v1.12.10
- cert_manager_webhook: quay.io/jetstack/cert-manager-webhook:v1.12.10
- cert_manager_acmesolver: quay.io/jetstack/cert-manager-acmesolver:v1.12.10
- cilium_node: quay.io/cilium/cilium:v1.14.8
- cilium_operator: quay.io/cilium/operator-generic:v1.14.8
- cinder_api: "registry.atmosphere.dev/library/cinder:{{ atmosphere_release }}"
- cinder_backup_storage_init: "registry.atmosphere.dev/library/cinder:{{ atmosphere_release }}"
- cinder_backup: "registry.atmosphere.dev/library/cinder:{{ atmosphere_release }}"
- cinder_db_sync: "registry.atmosphere.dev/library/cinder:{{ atmosphere_release }}"
- cinder_scheduler: "registry.atmosphere.dev/library/cinder:{{ atmosphere_release }}"
- cinder_storage_init: "registry.atmosphere.dev/library/cinder:{{ atmosphere_release }}"
- cinder_volume_usage_audit: "registry.atmosphere.dev/library/cinder:{{ atmosphere_release }}"
- cinder_volume: "registry.atmosphere.dev/library/cinder:{{ atmosphere_release }}"
- cluster_api_controller: registry.k8s.io/cluster-api/cluster-api-controller:v1.8.4
- cluster_api_kubeadm_bootstrap_controller: registry.k8s.io/cluster-api/kubeadm-bootstrap-controller:v1.8.4
- cluster_api_kubeadm_control_plane_controller: registry.k8s.io/cluster-api/kubeadm-control-plane-controller:v1.8.4
- cluster_api_openstack_controller: registry.k8s.io/capi-openstack/capi-openstack-controller:v0.11.2
- csi_node_driver_registrar: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.10.0
- csi_rbd_attacher: registry.k8s.io/sig-storage/csi-attacher:v4.5.0
- csi_rbd_plugin: quay.io/cephcsi/cephcsi:v3.11.0
- csi_rbd_provisioner: registry.k8s.io/sig-storage/csi-provisioner:v4.0.0
- csi_rbd_resizer: registry.k8s.io/sig-storage/csi-resizer:v1.10.0
- csi_rbd_snapshotter: registry.k8s.io/sig-storage/csi-snapshotter:v7.0.0
- db_drop: "registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
- db_init: "registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
- dep_check: "registry.atmosphere.dev/library/kubernetes-entrypoint:{{ atmosphere_release }}"
- designate_api: "registry.atmosphere.dev/library/designate:{{ atmosphere_release }}"
- designate_central: "registry.atmosphere.dev/library/designate:{{ atmosphere_release }}"
- designate_db_sync: "registry.atmosphere.dev/library/designate:{{ atmosphere_release }}"
- designate_mdns: "registry.atmosphere.dev/library/designate:{{ atmosphere_release }}"
- designate_producer: "registry.atmosphere.dev/library/designate:{{ atmosphere_release }}"
- designate_sink: "registry.atmosphere.dev/library/designate:{{ atmosphere_release }}"
- designate_worker: "registry.atmosphere.dev/library/designate:{{ atmosphere_release }}"
- glance_api: "registry.atmosphere.dev/library/glance:{{ atmosphere_release }}"
- glance_db_sync: "registry.atmosphere.dev/library/glance:{{ atmosphere_release }}"
- glance_metadefs_load: "registry.atmosphere.dev/library/glance:{{ atmosphere_release }}"
- glance_registry: "registry.atmosphere.dev/library/glance:{{ atmosphere_release }}"
- glance_storage_init: "registry.atmosphere.dev/library/glance:{{ atmosphere_release }}"
- grafana_sidecar: quay.io/kiwigrid/k8s-sidecar:1.26.1
- grafana: docker.io/grafana/grafana:10.4.0
- goldpinger: docker.io/bloomberg/goldpinger:3.10.1
- haproxy: docker.io/library/haproxy:2.5
- heat_api: "registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
- heat_cfn: "registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
- heat_cloudwatch: "registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
- heat_db_sync: "registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
- heat_engine_cleaner: "registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
- heat_engine: "registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
- heat_purge_deleted: "registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
- horizon_db_sync: "registry.atmosphere.dev/library/horizon:{{ atmosphere_release }}"
- horizon: "registry.atmosphere.dev/library/horizon:{{ atmosphere_release }}"
- ibm_block_csi_addons_replicator: quay.io/ibmcsiblock/csi-block-volumereplication-operator:v0.9.0
- ibm_block_csi_attacher: registry.k8s.io/sig-storage/csi-attacher:v4.2.0
- ibm_block_csi_driver_controller: quay.io/ibmcsiblock/ibm-block-csi-driver-controller:1.11.2
- ibm_block_csi_driver_node: quay.io/ibmcsiblock/ibm-block-csi-driver-node:1.11.2
- ibm_block_csi_node_driver_registrar: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.6.3
- ibm_block_csi_livenessprobe: registry.k8s.io/sig-storage/livenessprobe:v2.9.0
- ibm_block_csi_operator: quay.io/ibmcsiblock/ibm-block-csi-operator:1.11.2
- ibm_block_csi_provisioner: registry.k8s.io/sig-storage/csi-provisioner:v3.4.0
- ibm_block_csi_resizer: registry.k8s.io/sig-storage/csi-resizer:v1.7.0
- ibm_block_csi_snapshotter: registry.k8s.io/sig-storage/csi-snapshotter:v6.2.1
- ibm_block_csi_volume_group: quay.io/ibmcsiblock/csi-volume-group-operator:v0.9.1
- ingress_nginx_controller: registry.k8s.io/ingress-nginx/controller:v1.10.0
- ingress_nginx_default_backend: registry.k8s.io/defaultbackend-amd64:1.5
- ingress_nginx_kube_webhook_certgen: registry.k8s.io/ingress-nginx/kube-webhook-certgen:v1.4.0
- ironic_api: "registry.atmosphere.dev/library/ironic:{{ atmosphere_release }}"
- ironic_conductor: "registry.atmosphere.dev/library/ironic:{{ atmosphere_release }}"
- ironic_db_sync: "registry.atmosphere.dev/library/ironic:{{ atmosphere_release }}"
- ironic_manage_cleaning_network: "registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
- ironic_pxe_http: docker.io/library/nginx:1.25
- ironic_pxe_init: "registry.atmosphere.dev/library/ironic:{{ atmosphere_release }}"
- ironic_pxe: "registry.atmosphere.dev/library/ironic:{{ atmosphere_release }}"
- ironic_retrive_cleaning_network: "registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
- ironic_retrive_swift_config: "registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
- keepalived: "registry.atmosphere.dev/library/keepalived:{{ atmosphere_release }}"
- keycloak: quay.io/keycloak/keycloak:23.0.7-0
- keystone_api: "registry.atmosphere.dev/library/keystone:{{ atmosphere_release }}"
- keystone_credential_cleanup: "registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
- keystone_credential_rotate: "registry.atmosphere.dev/library/keystone:{{ atmosphere_release }}"
- keystone_credential_setup: "registry.atmosphere.dev/library/keystone:{{ atmosphere_release }}"
- keystone_db_sync: "registry.atmosphere.dev/library/keystone:{{ atmosphere_release }}"
- keystone_domain_manage: "registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
- keystone_fernet_rotate: "registry.atmosphere.dev/library/keystone:{{ atmosphere_release }}"
- keystone_fernet_setup: "registry.atmosphere.dev/library/keystone:{{ atmosphere_release }}"
- ks_endpoints: "registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
- ks_service: "registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
- ks_user: "registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
- kube_apiserver: registry.k8s.io/kube-apiserver:v1.22.17
- kube_controller_manager: registry.k8s.io/kube-controller-manager:v1.22.17
- kube_coredns: registry.k8s.io/coredns/coredns:v1.8.4
- kube_etcd: registry.k8s.io/etcd:3.5.6-0
- kube_proxy: registry.k8s.io/kube-proxy:v1.22.17
- kube_scheduler: registry.k8s.io/kube-scheduler:v1.22.17
- kube_state_metrics: registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.12.0
- kube_vip: ghcr.io/kube-vip/kube-vip:v0.6.4
- kubectl: docker.io/bitnami/kubectl:1.27.3
- libvirt: "registry.atmosphere.dev/library/libvirtd:{{ atmosphere_release }}"
- libvirt_tls_sidecar: registry.atmosphere.dev/library/libvirt-tls-sidecar:latest
- libvirt_exporter: registry.atmosphere.dev/library/libvirtd-exporter:latest
- local_path_provisioner_helper: docker.io/library/busybox:1.36.0
- local_path_provisioner: docker.io/rancher/local-path-provisioner:v0.0.24
- loki_gateway: docker.io/nginxinc/nginx-unprivileged:1.24-alpine
- loki: docker.io/grafana/loki:3.0.0
- magnum_api: "registry.atmosphere.dev/library/magnum:{{ atmosphere_release }}"
- magnum_cluster_api_proxy: "registry.atmosphere.dev/library/magnum:{{ atmosphere_release }}"
- magnum_conductor: "registry.atmosphere.dev/library/magnum:{{ atmosphere_release }}"
- magnum_db_sync: "registry.atmosphere.dev/library/magnum:{{ atmosphere_release }}"
- magnum_registry: quay.io/vexxhost/magnum-cluster-api-registry:latest
- manila_api: "registry.atmosphere.dev/library/manila:{{ atmosphere_release }}"
- manila_data: "registry.atmosphere.dev/library/manila:{{ atmosphere_release }}"
- manila_db_sync: "registry.atmosphere.dev/library/manila:{{ atmosphere_release }}"
- manila_scheduler: "registry.atmosphere.dev/library/manila:{{ atmosphere_release }}"
- manila_share: "registry.atmosphere.dev/library/manila:{{ atmosphere_release }}"
- memcached: docker.io/library/memcached:1.6.26
- netoffload: "registry.atmosphere.dev/library/netoffload:{{ atmosphere_release }}"
- neutron_bagpipe_bgp: "registry.atmosphere.dev/library/neutron:{{ atmosphere_release }}"
- neutron_bgp_dragent: "registry.atmosphere.dev/library/neutron:{{ atmosphere_release }}"
- neutron_coredns: docker.io/coredns/coredns:1.11.1
- neutron_db_sync: "registry.atmosphere.dev/library/neutron:{{ atmosphere_release }}"
- neutron_dhcp: "registry.atmosphere.dev/library/neutron:{{ atmosphere_release }}"
- neutron_ironic_agent: "registry.atmosphere.dev/library/neutron:{{ atmosphere_release }}"
- neutron_l2gw: "registry.atmosphere.dev/library/neutron:{{ atmosphere_release }}"
- neutron_l3: "registry.atmosphere.dev/library/neutron:{{ atmosphere_release }}"
- neutron_linuxbridge_agent: "registry.atmosphere.dev/library/neutron:{{ atmosphere_release }}"
- neutron_metadata: "registry.atmosphere.dev/library/neutron:{{ atmosphere_release }}"
- neutron_netns_cleanup_cron: "registry.atmosphere.dev/library/neutron:{{ atmosphere_release }}"
- neutron_openvswitch_agent: "registry.atmosphere.dev/library/neutron:{{ atmosphere_release }}"
- neutron_ovn_metadata: "registry.atmosphere.dev/library/neutron:{{ atmosphere_release }}"
- neutron_server: "registry.atmosphere.dev/library/neutron:{{ atmosphere_release }}"
- neutron_rpc_server: "registry.atmosphere.dev/library/neutron:{{ atmosphere_release }}"
- neutron_sriov_agent_init: "registry.atmosphere.dev/library/neutron:{{ atmosphere_release }}"
- neutron_sriov_agent: "registry.atmosphere.dev/library/neutron:{{ atmosphere_release }}"
- neutron_policy_server: "registry.atmosphere.dev/library/neutron:{{ atmosphere_release }}"
- node_feature_discovery: registry.k8s.io/nfd/node-feature-discovery:v0.15.4
- nova_api: "registry.atmosphere.dev/library/nova:{{ atmosphere_release }}"
- nova_archive_deleted_rows: "registry.atmosphere.dev/library/nova:{{ atmosphere_release }}"
- nova_cell_setup_init: "registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
- nova_cell_setup: "registry.atmosphere.dev/library/nova:{{ atmosphere_release }}"
- nova_compute_ironic: "registry.atmosphere.dev/library/nova:{{ atmosphere_release }}"
- nova_compute_ssh: "registry.atmosphere.dev/library/nova-ssh:{{ atmosphere_release }}"
- nova_compute: "registry.atmosphere.dev/library/nova:{{ atmosphere_release }}"
- nova_conductor: "registry.atmosphere.dev/library/nova:{{ atmosphere_release }}"
- nova_consoleauth: "registry.atmosphere.dev/library/nova:{{ atmosphere_release }}"
- nova_db_sync: "registry.atmosphere.dev/library/nova:{{ atmosphere_release }}"
- nova_novncproxy_assets: "registry.atmosphere.dev/library/nova:{{ atmosphere_release }}"
- nova_novncproxy: "registry.atmosphere.dev/library/nova:{{ atmosphere_release }}"
- nova_placement: "registry.atmosphere.dev/library/nova:{{ atmosphere_release }}"
- nova_scheduler: "registry.atmosphere.dev/library/nova:{{ atmosphere_release }}"
- nova_service_cleaner: "registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
- nova_spiceproxy_assets: "registry.atmosphere.dev/library/nova:{{ atmosphere_release }}"
- nova_spiceproxy: "registry.atmosphere.dev/library/nova:{{ atmosphere_release }}"
- nova_storage_init: "registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
- oauth2_proxy: quay.io/oauth2-proxy/oauth2-proxy:v7.6.0
- octavia_api: "registry.atmosphere.dev/library/octavia:{{ atmosphere_release }}"
- octavia_db_sync: "registry.atmosphere.dev/library/octavia:{{ atmosphere_release }}"
- octavia_health_manager_init: "registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
- octavia_health_manager: "registry.atmosphere.dev/library/octavia:{{ atmosphere_release }}"
- octavia_housekeeping: "registry.atmosphere.dev/library/octavia:{{ atmosphere_release }}"
- octavia_worker: "registry.atmosphere.dev/library/octavia:{{ atmosphere_release }}"
- openstack_cli: "registry.atmosphere.dev/library/python-openstackclient:{{ atmosphere_release }}"
- openvswitch_db_server: "registry.atmosphere.dev/library/openvswitch:{{ atmosphere_release }}"
- openvswitch_vswitchd: "registry.atmosphere.dev/library/openvswitch:{{ atmosphere_release }}"
- ovn_controller: "registry.atmosphere.dev/library/ovn-host:{{ atmosphere_release }}"
- ovn_controller_kubectl: "registry.atmosphere.dev/library/ovn-host:{{ atmosphere_release }}"
- ovn_logging_parser: "registry.atmosphere.dev/library/neutron:{{ atmosphere_release }}"
- ovn_northd: "registry.atmosphere.dev/library/ovn-central:{{ atmosphere_release }}"
- ovn_ovsdb_nb: "registry.atmosphere.dev/library/ovn-central:{{ atmosphere_release }}"
- ovn_ovsdb_sb: "registry.atmosphere.dev/library/ovn-central:{{ atmosphere_release }}"
- pause: registry.k8s.io/pause:3.9
- percona_xtradb_cluster_haproxy: docker.io/percona/percona-xtradb-cluster-operator:1.14.0-haproxy
- percona_xtradb_cluster_operator: docker.io/percona/percona-xtradb-cluster-operator:1.14.0
- percona_xtradb_cluster: docker.io/percona/percona-xtradb-cluster:8.0.36-28.1
- percona_version_service: docker.io/perconalab/version-service:production-2048c1f
- placement_db_sync: "registry.atmosphere.dev/library/placement:{{ atmosphere_release }}"
- placement: "registry.atmosphere.dev/library/placement:{{ atmosphere_release }}"
- pod_tls_sidecar: registry.atmosphere.dev/library/pod-tls-sidecar:latest
- prometheus_config_reloader: quay.io/prometheus-operator/prometheus-config-reloader:v0.73.0
- prometheus_ipmi_exporter: us-docker.pkg.dev/vexxhost-infra/openstack/ipmi-exporter:1.4.0
- prometheus_memcached_exporter: quay.io/prometheus/memcached-exporter:v0.14.3
- prometheus_mysqld_exporter: quay.io/prometheus/mysqld-exporter:v0.15.1
- prometheus_node_exporter: quay.io/prometheus/node-exporter:v1.7.0
- prometheus_openstack_database_exporter: ghcr.io/vexxhost/openstack-database-exporter:v0.4.2
- prometheus_openstack_exporter: ghcr.io/openstack-exporter/openstack-exporter:1.7.0
- prometheus_operator_kube_webhook_certgen: registry.k8s.io/ingress-nginx/kube-webhook-certgen:v20221220-controller-v1.5.1-58-g787ea74b6
- prometheus_operator: quay.io/prometheus-operator/prometheus-operator:v0.73.0
- prometheus_pushgateway: docker.io/prom/pushgateway:v1.8.0
- prometheus: quay.io/prometheus/prometheus:v2.51.2
- rabbit_init: docker.io/library/rabbitmq:3.11.28-management
- rabbitmq_cluster_operator: docker.io/rabbitmqoperator/cluster-operator:2.8.0
- rabbitmq_credential_updater: docker.io/rabbitmqoperator/default-user-credential-updater:1.0.4
- rabbitmq_server: docker.io/library/rabbitmq:3.11.28-management
- rabbitmq_topology_operator: docker.io/rabbitmqoperator/messaging-topology-operator:1.13.0
- rook_ceph: docker.io/rook/ceph:v1.14.2
- secretgen_controller: ghcr.io/carvel-dev/secretgen-controller@sha256:59ec05ce5847bfd70c8e04f08b5195e918c8f6fbb947ffc91b456494a2958fd5
- senlin_api: "registry.atmosphere.dev/library/senlin:{{ atmosphere_release }}"
- senlin_conductor: "registry.atmosphere.dev/library/senlin:{{ atmosphere_release }}"
- senlin_db_sync: "registry.atmosphere.dev/library/senlin:{{ atmosphere_release }}"
- senlin_engine_cleaner: "registry.atmosphere.dev/library/senlin:{{ atmosphere_release }}"
- senlin_engine: "registry.atmosphere.dev/library/senlin:{{ atmosphere_release }}"
- senlin_health_manager: "registry.atmosphere.dev/library/senlin:{{ atmosphere_release }}"
- staffeln_db_sync: "registry.atmosphere.dev/library/staffeln:{{ atmosphere_release }}"
- staffeln_conductor: "registry.atmosphere.dev/library/staffeln:{{ atmosphere_release }}"
- staffeln_api: "registry.atmosphere.dev/library/staffeln:{{ atmosphere_release }}"
- tempest_run_tests: "registry.atmosphere.dev/library/tempest:{{ atmosphere_release }}"
- vector: docker.io/timberio/vector:0.37.1-debian
+ alertmanager: "{{ atmosphere_image_prefix }}quay.io/prometheus/alertmanager:v0.27.0"
+ barbican_api: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/barbican:{{ atmosphere_release }}"
+ barbican_db_sync: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/barbican:{{ atmosphere_release }}"
+ bootstrap: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
+ ceph_config_helper: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/libvirtd:{{ atmosphere_release }}"
+ ceph: "{{ atmosphere_image_prefix }}quay.io/ceph/ceph:v18.2.1"
+ cert_manager_cainjector: "{{ atmosphere_image_prefix }}quay.io/jetstack/cert-manager-cainjector:v1.12.10"
+ cert_manager_cli: "{{ atmosphere_image_prefix }}quay.io/jetstack/cert-manager-ctl:v1.12.10"
+ cert_manager_controller: "{{ atmosphere_image_prefix }}quay.io/jetstack/cert-manager-controller:v1.12.10"
+ cert_manager_webhook: "{{ atmosphere_image_prefix }}quay.io/jetstack/cert-manager-webhook:v1.12.10"
+ cert_manager_acmesolver: "{{ atmosphere_image_prefix }}quay.io/jetstack/cert-manager-acmesolver:v1.12.10"
+ cilium_node: "{{ atmosphere_image_prefix }}quay.io/cilium/cilium:v1.14.8"
+ cilium_operator: "{{ atmosphere_image_prefix }}quay.io/cilium/operator-generic:v1.14.8"
+ cinder_api: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/cinder:{{ atmosphere_release }}"
+ cinder_backup_storage_init: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/cinder:{{ atmosphere_release }}"
+ cinder_backup: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/cinder:{{ atmosphere_release }}"
+ cinder_db_sync: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/cinder:{{ atmosphere_release }}"
+ cinder_scheduler: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/cinder:{{ atmosphere_release }}"
+ cinder_storage_init: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/cinder:{{ atmosphere_release }}"
+ cinder_volume_usage_audit: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/cinder:{{ atmosphere_release }}"
+ cinder_volume: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/cinder:{{ atmosphere_release }}"
+ cluster_api_controller: "{{ atmosphere_image_prefix }}registry.k8s.io/cluster-api/cluster-api-controller:v1.8.4"
+ cluster_api_kubeadm_bootstrap_controller: "{{ atmosphere_image_prefix }}registry.k8s.io/cluster-api/kubeadm-bootstrap-controller:v1.8.4"
+ cluster_api_kubeadm_control_plane_controller: "{{ atmosphere_image_prefix }}registry.k8s.io/cluster-api/kubeadm-control-plane-controller:v1.8.4"
+ cluster_api_openstack_controller: "{{ atmosphere_image_prefix }}registry.k8s.io/capi-openstack/capi-openstack-controller:v0.11.2"
+ csi_node_driver_registrar: "{{ atmosphere_image_prefix }}registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.10.0"
+ csi_rbd_attacher: "{{ atmosphere_image_prefix }}registry.k8s.io/sig-storage/csi-attacher:v4.5.0"
+ csi_rbd_plugin: "{{ atmosphere_image_prefix }}quay.io/cephcsi/cephcsi:v3.11.0"
+ csi_rbd_provisioner: "{{ atmosphere_image_prefix }}registry.k8s.io/sig-storage/csi-provisioner:v4.0.0"
+ csi_rbd_resizer: "{{ atmosphere_image_prefix }}registry.k8s.io/sig-storage/csi-resizer:v1.10.0"
+ csi_rbd_snapshotter: "{{ atmosphere_image_prefix }}registry.k8s.io/sig-storage/csi-snapshotter:v7.0.0"
+ db_drop: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
+ db_init: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
+ dep_check: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/kubernetes-entrypoint:{{ atmosphere_release }}"
+ designate_api: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/designate:{{ atmosphere_release }}"
+ designate_central: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/designate:{{ atmosphere_release }}"
+ designate_db_sync: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/designate:{{ atmosphere_release }}"
+ designate_mdns: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/designate:{{ atmosphere_release }}"
+ designate_producer: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/designate:{{ atmosphere_release }}"
+ designate_sink: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/designate:{{ atmosphere_release }}"
+ designate_worker: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/designate:{{ atmosphere_release }}"
+ glance_api: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/glance:{{ atmosphere_release }}"
+ glance_db_sync: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/glance:{{ atmosphere_release }}"
+ glance_metadefs_load: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/glance:{{ atmosphere_release }}"
+ glance_registry: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/glance:{{ atmosphere_release }}"
+ glance_storage_init: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/glance:{{ atmosphere_release }}"
+ grafana_sidecar: "{{ atmosphere_image_prefix }}quay.io/kiwigrid/k8s-sidecar:1.26.1"
+ grafana: "{{ atmosphere_image_prefix }}docker.io/grafana/grafana:10.4.0"
+ goldpinger: "{{ atmosphere_image_prefix }}docker.io/bloomberg/goldpinger:3.10.1"
+ haproxy: "{{ atmosphere_image_prefix }}docker.io/library/haproxy:2.5"
+ heat_api: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
+ heat_cfn: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
+ heat_cloudwatch: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
+ heat_db_sync: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
+ heat_engine_cleaner: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
+ heat_engine: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
+ heat_purge_deleted: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
+ horizon_db_sync: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/horizon:{{ atmosphere_release }}"
+ horizon: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/horizon:{{ atmosphere_release }}"
+ ibm_block_csi_addons_replicator: "{{ atmosphere_image_prefix }}quay.io/ibmcsiblock/csi-block-volumereplication-operator:v0.9.0"
+ ibm_block_csi_attacher: "{{ atmosphere_image_prefix }}registry.k8s.io/sig-storage/csi-attacher:v4.2.0"
+ ibm_block_csi_driver_controller: "{{ atmosphere_image_prefix }}quay.io/ibmcsiblock/ibm-block-csi-driver-controller:1.11.2"
+ ibm_block_csi_driver_node: "{{ atmosphere_image_prefix }}quay.io/ibmcsiblock/ibm-block-csi-driver-node:1.11.2"
+ ibm_block_csi_node_driver_registrar: "{{ atmosphere_image_prefix }}registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.6.3"
+ ibm_block_csi_livenessprobe: "{{ atmosphere_image_prefix }}registry.k8s.io/sig-storage/livenessprobe:v2.9.0"
+ ibm_block_csi_operator: "{{ atmosphere_image_prefix }}quay.io/ibmcsiblock/ibm-block-csi-operator:1.11.2"
+ ibm_block_csi_provisioner: "{{ atmosphere_image_prefix }}registry.k8s.io/sig-storage/csi-provisioner:v3.4.0"
+ ibm_block_csi_resizer: "{{ atmosphere_image_prefix }}registry.k8s.io/sig-storage/csi-resizer:v1.7.0"
+ ibm_block_csi_snapshotter: "{{ atmosphere_image_prefix }}registry.k8s.io/sig-storage/csi-snapshotter:v6.2.1"
+ ibm_block_csi_volume_group: "{{ atmosphere_image_prefix }}quay.io/ibmcsiblock/csi-volume-group-operator:v0.9.1"
+ ingress_nginx_controller: "{{ atmosphere_image_prefix }}registry.k8s.io/ingress-nginx/controller:v1.10.0"
+ ingress_nginx_default_backend: "{{ atmosphere_image_prefix }}registry.k8s.io/defaultbackend-amd64:1.5"
+ ingress_nginx_kube_webhook_certgen: "{{ atmosphere_image_prefix }}registry.k8s.io/ingress-nginx/kube-webhook-certgen:v1.4.0"
+ ironic_api: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/ironic:{{ atmosphere_release }}"
+ ironic_conductor: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/ironic:{{ atmosphere_release }}"
+ ironic_db_sync: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/ironic:{{ atmosphere_release }}"
+ ironic_manage_cleaning_network: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
+ ironic_pxe_http: "{{ atmosphere_image_prefix }}docker.io/library/nginx:1.25"
+ ironic_pxe_init: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/ironic:{{ atmosphere_release }}"
+ ironic_pxe: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/ironic:{{ atmosphere_release }}"
+ ironic_retrive_cleaning_network: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
+ ironic_retrive_swift_config: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
+ keepalived: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/keepalived:{{ atmosphere_release }}"
+ keycloak: "{{ atmosphere_image_prefix }}quay.io/keycloak/keycloak:23.0.7-0"
+ keystone_api: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/keystone:{{ atmosphere_release }}"
+ keystone_credential_cleanup: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
+ keystone_credential_rotate: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/keystone:{{ atmosphere_release }}"
+ keystone_credential_setup: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/keystone:{{ atmosphere_release }}"
+ keystone_db_sync: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/keystone:{{ atmosphere_release }}"
+ keystone_domain_manage: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
+ keystone_fernet_rotate: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/keystone:{{ atmosphere_release }}"
+ keystone_fernet_setup: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/keystone:{{ atmosphere_release }}"
+ ks_endpoints: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
+ ks_service: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
+ ks_user: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
+ kube_apiserver: "{{ atmosphere_image_prefix }}registry.k8s.io/kube-apiserver:v1.22.17"
+ kube_controller_manager: "{{ atmosphere_image_prefix }}registry.k8s.io/kube-controller-manager:v1.22.17"
+ kube_coredns: "{{ atmosphere_image_prefix }}registry.k8s.io/coredns/coredns:v1.8.4"
+ kube_etcd: "{{ atmosphere_image_prefix }}registry.k8s.io/etcd:3.5.6-0"
+ kube_proxy: "{{ atmosphere_image_prefix }}registry.k8s.io/kube-proxy:v1.22.17"
+ kube_scheduler: "{{ atmosphere_image_prefix }}registry.k8s.io/kube-scheduler:v1.22.17"
+ kube_state_metrics: "{{ atmosphere_image_prefix }}registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.12.0"
+ kube_vip: "{{ atmosphere_image_prefix }}ghcr.io/kube-vip/kube-vip:v0.6.4"
+ kubectl: "{{ atmosphere_image_prefix }}docker.io/bitnami/kubectl:1.27.3"
+ libvirt: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/libvirtd:{{ atmosphere_release }}"
+ libvirt_tls_sidecar: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/libvirt-tls-sidecar:latest"
+ libvirt_exporter: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/libvirtd-exporter:latest"
+ local_path_provisioner_helper: "{{ atmosphere_image_prefix }}docker.io/library/busybox:1.36.0"
+ local_path_provisioner: "{{ atmosphere_image_prefix }}docker.io/rancher/local-path-provisioner:v0.0.24"
+ loki_gateway: "{{ atmosphere_image_prefix }}docker.io/nginxinc/nginx-unprivileged:1.24-alpine"
+ loki: "{{ atmosphere_image_prefix }}docker.io/grafana/loki:3.0.0"
+ magnum_api: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/magnum:{{ atmosphere_release }}"
+ magnum_cluster_api_proxy: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/magnum:{{ atmosphere_release }}"
+ magnum_conductor: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/magnum:{{ atmosphere_release }}"
+ magnum_db_sync: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/magnum:{{ atmosphere_release }}"
+ magnum_registry: "{{ atmosphere_image_prefix }}quay.io/vexxhost/magnum-cluster-api-registry:latest"
+ manila_api: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/manila:{{ atmosphere_release }}"
+ manila_data: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/manila:{{ atmosphere_release }}"
+ manila_db_sync: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/manila:{{ atmosphere_release }}"
+ manila_scheduler: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/manila:{{ atmosphere_release }}"
+ manila_share: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/manila:{{ atmosphere_release }}"
+ memcached: "{{ atmosphere_image_prefix }}docker.io/library/memcached:1.6.26"
+ netoffload: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/netoffload:{{ atmosphere_release }}"
+ neutron_bagpipe_bgp: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/neutron:{{ atmosphere_release }}"
+ neutron_bgp_dragent: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/neutron:{{ atmosphere_release }}"
+ neutron_coredns: "{{ atmosphere_image_prefix }}docker.io/coredns/coredns:1.11.1"
+ neutron_db_sync: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/neutron:{{ atmosphere_release }}"
+ neutron_dhcp: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/neutron:{{ atmosphere_release }}"
+ neutron_ironic_agent_init: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/neutron:{{ atmosphere_release }}"
+ neutron_ironic_agent: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/neutron:{{ atmosphere_release }}"
+ neutron_l2gw: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/neutron:{{ atmosphere_release }}"
+ neutron_l3: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/neutron:{{ atmosphere_release }}"
+ neutron_linuxbridge_agent: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/neutron:{{ atmosphere_release }}"
+ neutron_metadata: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/neutron:{{ atmosphere_release }}"
+ neutron_netns_cleanup_cron: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/neutron:{{ atmosphere_release }}"
+ neutron_openvswitch_agent: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/neutron:{{ atmosphere_release }}"
+ neutron_ovn_metadata: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/neutron:{{ atmosphere_release }}"
+ neutron_ovn_vpn: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/neutron:{{ atmosphere_release }}"
+ neutron_server: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/neutron:{{ atmosphere_release }}"
+ neutron_rpc_server: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/neutron:{{ atmosphere_release }}"
+ neutron_sriov_agent_init: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/neutron:{{ atmosphere_release }}"
+ neutron_sriov_agent: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/neutron:{{ atmosphere_release }}"
+ neutron_policy_server: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/neutron:{{ atmosphere_release }}"
+ node_feature_discovery: "{{ atmosphere_image_prefix }}registry.k8s.io/nfd/node-feature-discovery:v0.15.4"
+ nova_api: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/nova:{{ atmosphere_release }}"
+ nova_archive_deleted_rows: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/nova:{{ atmosphere_release }}"
+ nova_cell_setup_init: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
+ nova_cell_setup: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/nova:{{ atmosphere_release }}"
+ nova_compute_ironic: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/nova:{{ atmosphere_release }}"
+ nova_compute_ssh: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/nova-ssh:{{ atmosphere_release }}"
+ nova_compute: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/nova:{{ atmosphere_release }}"
+ nova_conductor: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/nova:{{ atmosphere_release }}"
+ nova_consoleauth: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/nova:{{ atmosphere_release }}"
+ nova_db_sync: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/nova:{{ atmosphere_release }}"
+ nova_novncproxy_assets: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/nova:{{ atmosphere_release }}"
+ nova_novncproxy: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/nova:{{ atmosphere_release }}"
+ nova_placement: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/nova:{{ atmosphere_release }}"
+ nova_scheduler: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/nova:{{ atmosphere_release }}"
+ nova_service_cleaner: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
+ nova_spiceproxy_assets: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/nova:{{ atmosphere_release }}"
+ nova_spiceproxy: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/nova:{{ atmosphere_release }}"
+ nova_storage_init: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
+ oauth2_proxy: "{{ atmosphere_image_prefix }}quay.io/oauth2-proxy/oauth2-proxy:v7.6.0"
+ octavia_api: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/octavia:{{ atmosphere_release }}"
+ octavia_db_sync: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/octavia:{{ atmosphere_release }}"
+ octavia_health_manager_init: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/heat:{{ atmosphere_release }}"
+ octavia_health_manager: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/octavia:{{ atmosphere_release }}"
+ octavia_housekeeping: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/octavia:{{ atmosphere_release }}"
+ octavia_worker: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/octavia:{{ atmosphere_release }}"
+ openstack_cli: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/python-openstackclient:{{ atmosphere_release }}"
+ openvswitch_db_server: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/openvswitch:{{ atmosphere_release }}"
+ openvswitch_vswitchd: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/openvswitch:{{ atmosphere_release }}"
+ ovn_controller: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/ovn-host:{{ atmosphere_release }}"
+ ovn_controller_kubectl: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/ovn-host:{{ atmosphere_release }}"
+ ovn_logging_parser: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/neutron:{{ atmosphere_release }}"
+ ovn_northd: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/ovn-central:{{ atmosphere_release }}"
+ ovn_ovsdb_nb: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/ovn-central:{{ atmosphere_release }}"
+ ovn_ovsdb_sb: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/ovn-central:{{ atmosphere_release }}"
+ pause: "{{ atmosphere_image_prefix }}registry.k8s.io/pause:3.9"
+ percona_xtradb_cluster_haproxy: "{{ atmosphere_image_prefix }}docker.io/percona/percona-xtradb-cluster-operator:1.14.0-haproxy"
+ percona_xtradb_cluster_operator: "{{ atmosphere_image_prefix }}docker.io/percona/percona-xtradb-cluster-operator:1.14.0"
+ percona_xtradb_cluster: "{{ atmosphere_image_prefix }}docker.io/percona/percona-xtradb-cluster:8.0.36-28.1"
+ percona_version_service: "{{ atmosphere_image_prefix }}docker.io/perconalab/version-service:production-2048c1f"
+ placement_db_sync: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/placement:{{ atmosphere_release }}"
+ placement: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/placement:{{ atmosphere_release }}"
+ pod_tls_sidecar: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/pod-tls-sidecar:latest"
+ prometheus_config_reloader: "{{ atmosphere_image_prefix }}quay.io/prometheus-operator/prometheus-config-reloader:v0.73.0"
+ prometheus_ipmi_exporter: "{{ atmosphere_image_prefix }}us-docker.pkg.dev/vexxhost-infra/openstack/ipmi-exporter:1.4.0"
+ prometheus_memcached_exporter: "{{ atmosphere_image_prefix }}quay.io/prometheus/memcached-exporter:v0.14.3"
+ prometheus_mysqld_exporter: "{{ atmosphere_image_prefix }}quay.io/prometheus/mysqld-exporter:v0.15.1"
+ prometheus_node_exporter: "{{ atmosphere_image_prefix }}quay.io/prometheus/node-exporter:v1.7.0"
+ prometheus_openstack_database_exporter: "{{ atmosphere_image_prefix }}ghcr.io/vexxhost/openstack-database-exporter:v0.4.2"
+ prometheus_openstack_exporter: "{{ atmosphere_image_prefix }}ghcr.io/openstack-exporter/openstack-exporter:1.7.0"
+ prometheus_operator_kube_webhook_certgen: "{{ atmosphere_image_prefix }}registry.k8s.io/ingress-nginx/kube-webhook-certgen:v20221220-controller-v1.5.1-58-g787ea74b6"
+ prometheus_operator: "{{ atmosphere_image_prefix }}quay.io/prometheus-operator/prometheus-operator:v0.73.0"
+ prometheus_pushgateway: "{{ atmosphere_image_prefix }}docker.io/prom/pushgateway:v1.8.0"
+ prometheus: "{{ atmosphere_image_prefix }}quay.io/prometheus/prometheus:v2.51.2"
+ rabbit_init: "{{ atmosphere_image_prefix }}docker.io/library/rabbitmq:3.11.28-management"
+ rabbitmq_cluster_operator: "{{ atmosphere_image_prefix }}docker.io/rabbitmqoperator/cluster-operator:2.8.0"
+ rabbitmq_credential_updater: "{{ atmosphere_image_prefix }}docker.io/rabbitmqoperator/default-user-credential-updater:1.0.4"
+ rabbitmq_server: "{{ atmosphere_image_prefix }}docker.io/library/rabbitmq:3.11.28-management"
+ rabbitmq_topology_operator: "{{ atmosphere_image_prefix }}docker.io/rabbitmqoperator/messaging-topology-operator:1.13.0"
+ rook_ceph: "{{ atmosphere_image_prefix }}docker.io/rook/ceph:v1.14.2"
+ secretgen_controller: "{{ atmosphere_image_prefix }}ghcr.io/carvel-dev/secretgen-controller@sha256:59ec05ce5847bfd70c8e04f08b5195e918c8f6fbb947ffc91b456494a2958fd5"
+ senlin_api: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/senlin:{{ atmosphere_release }}"
+ senlin_conductor: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/senlin:{{ atmosphere_release }}"
+ senlin_db_sync: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/senlin:{{ atmosphere_release }}"
+ senlin_engine_cleaner: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/senlin:{{ atmosphere_release }}"
+ senlin_engine: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/senlin:{{ atmosphere_release }}"
+ senlin_health_manager: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/senlin:{{ atmosphere_release }}"
+ staffeln_db_sync: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/staffeln:{{ atmosphere_release }}"
+ staffeln_conductor: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/staffeln:{{ atmosphere_release }}"
+ staffeln_api: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/staffeln:{{ atmosphere_release }}"
+ tempest_run_tests: "{{ atmosphere_image_prefix }}registry.atmosphere.dev/library/tempest:{{ atmosphere_release }}"
+ vector: "{{ atmosphere_image_prefix }}docker.io/timberio/vector:0.37.1-debian"
-atmosphere_images: '{{ _atmosphere_images | combine(atmosphere_image_overrides, recursive=True)
- }}'
+atmosphere_images: '{{ _atmosphere_images | combine(atmosphere_image_overrides, recursive=True) }}'
diff --git a/roles/defaults/vars_test.go b/roles/defaults/vars_test.go
index 44e022d..3a8d231 100644
--- a/roles/defaults/vars_test.go
+++ b/roles/defaults/vars_test.go
@@ -1,6 +1,7 @@
package defaults
import (
+ "bytes"
"context"
"fmt"
"slices"
@@ -8,9 +9,30 @@
"testing"
"github.com/containers/image/v5/docker"
+ "github.com/goccy/go-yaml"
+ "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
+func TestImageHasPrefix(t *testing.T) {
+ path, err := yaml.PathString("$._atmosphere_images")
+ require.NoError(t, err)
+
+ var images map[string]string
+ err = path.Read(bytes.NewReader(varsFile), &images)
+ require.NoError(t, err)
+
+ prefix := "{{ atmosphere_image_prefix }}"
+
+ for _, image := range images {
+ testName := strings.ReplaceAll(image, prefix, "")
+
+ t.Run(testName, func(t *testing.T) {
+ assert.True(t, strings.HasPrefix(image, prefix))
+ })
+ }
+}
+
func TestImageExist(t *testing.T) {
images, err := GetImages()
require.NoError(t, err)
diff --git a/tox.ini b/tox.ini
index 44a886c..0673da3 100644
--- a/tox.ini
+++ b/tox.ini
@@ -21,7 +21,9 @@
{posargs}
[testenv:pin-digests]
+skip_install = true
deps =
+ docker-image-py>=0.1.12
oslo_config
oslo_log
ruyaml
diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml
index e2d996c..afd3222 100644
--- a/zuul.d/jobs.yaml
+++ b/zuul.d/jobs.yaml
@@ -8,8 +8,6 @@
- job:
name: atmosphere-golang-go-test
parent: atmosphere-golang-go
- pre-run:
- - zuul.d/playbooks/common/switch-to-atmosphere-mirror.yml
vars:
go_command: test ./... -v
@@ -76,6 +74,9 @@
- ^build/
- ^doc/
- ^releasenotes/
+ vars:
+ tox_environment:
+ ATMOSPHERE_IMAGE_PREFIX: "harbor.atmosphere.dev/"
- job:
name: atmosphere-molecule-csi
diff --git a/zuul.d/playbooks/common/switch-to-atmosphere-mirror.yml b/zuul.d/playbooks/common/switch-to-atmosphere-mirror.yml
index 839841b..1f71dc4 100644
--- a/zuul.d/playbooks/common/switch-to-atmosphere-mirror.yml
+++ b/zuul.d/playbooks/common/switch-to-atmosphere-mirror.yml
@@ -4,15 +4,8 @@
- name: Switch all images out of the CDN
ansible.builtin.replace:
path: "{{ zuul.project.src_dir }}/roles/defaults/vars/main.yml"
- regexp: 'registry.atmosphere.dev'
- replace: 'harbor.atmosphere.dev'
-
- # TODO(mnaser): Drop this when we can use https://github.com/vexxhost/atmosphere/pull/977
- - name: Prefix all images for the job to point to mirror
- ansible.builtin.shell: |
- sed -i '/harbor.atmosphere.dev/!s/ \(.*\): \(.*\)$/ \1: harbor.atmosphere.dev\/\2/' roles/defaults/vars/main.yml
- args:
- chdir: "{{ zuul.project.src_dir }}"
+ regexp: "{{ '{{' }} atmosphere_image_prefix {{ '}}' }}registry.atmosphere.dev"
+ replace: harbor.atmosphere.dev
- name: Print out the image list
ansible.builtin.shell: |