openstack-helm-infra: set PATCHTOOL Remove do_patch override

Signed-off-by: Babak Sarashki <Babak.SarAshki@windriver.com>
This commit is contained in:
Babak Sarashki 2020-07-15 11:57:28 -07:00
parent 9e13a96816
commit 5767c9be0a
10 changed files with 430 additions and 16 deletions

View File

@ -0,0 +1,40 @@
From 47315e28d44cff586f6fff026dd00e61c2c77bcd Mon Sep 17 00:00:00 2001
From: Gerry Kopec <Gerry.Kopec@windriver.com>
Date: Wed, 9 Jan 2019 20:11:33 -0500
Subject: [PATCH 1/4] Allow multiple containers per daemonset pod
Remove code that restricted daemonset pods to single containers.
Container names will default to name from helm chart template.
Required for nova cold migrations to work.
Story: 2003876
Task: 26735
Change-Id: Icce660415d43baefbbf768a785c5dedf04ea2930
Signed-off-by: Gerry Kopec <Gerry.Kopec@windriver.com>
(cherry picked from commit 7ca30319f418cd39db5ecf44cce5fb5fe39c458e)
Signed-off-by: Robert Church <robert.church@windriver.com>
---
helm-toolkit/templates/utils/_daemonset_overrides.tpl | 7 -------
1 file changed, 7 deletions(-)
diff --git a/helm-toolkit/templates/utils/_daemonset_overrides.tpl b/helm-toolkit/templates/utils/_daemonset_overrides.tpl
index e352bc9..10ab166 100644
--- a/helm-toolkit/templates/utils/_daemonset_overrides.tpl
+++ b/helm-toolkit/templates/utils/_daemonset_overrides.tpl
@@ -225,13 +225,6 @@ limitations under the License.
{{- 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 }}
- {{/* set container name
- assume not more than one container is defined */}}
- {{- $container := first $context.Values.__daemonset_yaml.spec.template.spec.containers }}
- {{- $_ := set $container "name" $current_dict.dns_1123_name }}
- {{- $cont_list := list $container }}
- {{- $_ := set $context.Values.__daemonset_yaml.spec.template.spec "containers" $cont_list }}
-
{{/* 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 }}
--
2.7.4

View File

@ -0,0 +1,26 @@
From ac3f9db5ac1a19af71136752f5709ba1da55d201 Mon Sep 17 00:00:00 2001
From: Angie Wang <angie.wang@windriver.com>
Date: Mon, 11 Feb 2019 11:29:03 -0500
Subject: [PATCH 2/4] Add imagePullSecrets in service account
Signed-off-by: Robert Church <robert.church@windriver.com>
---
helm-toolkit/templates/snippets/_kubernetes_pod_rbac_serviceaccount.tpl | 2 ++
1 file changed, 2 insertions(+)
diff --git a/helm-toolkit/templates/snippets/_kubernetes_pod_rbac_serviceaccount.tpl b/helm-toolkit/templates/snippets/_kubernetes_pod_rbac_serviceaccount.tpl
index b4cf1a6..2f4113b 100644
--- a/helm-toolkit/templates/snippets/_kubernetes_pod_rbac_serviceaccount.tpl
+++ b/helm-toolkit/templates/snippets/_kubernetes_pod_rbac_serviceaccount.tpl
@@ -44,6 +44,8 @@ kind: ServiceAccount
metadata:
name: {{ $saName }}
namespace: {{ $saNamespace }}
+imagePullSecrets:
+ - name: default-registry-key
{{- range $k, $v := $deps -}}
{{- if eq $k "services" }}
{{- range $serv := $v }}
--
2.16.5

View File

@ -0,0 +1,28 @@
From 93ec2454cba41bf3de1419bada1f145f1ca9dbd9 Mon Sep 17 00:00:00 2001
From: Al Bailey <Al.Bailey@windriver.com>
Date: Wed, 20 Feb 2019 13:56:27 -0600
Subject: [PATCH 3/4] Set Min NGINX handles
Signed-off-by: Robert Church <robert.church@windriver.com>
---
mariadb/files/nginx.tmpl | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/mariadb/files/nginx.tmpl b/mariadb/files/nginx.tmpl
index 5ec3d0d..07b7cc5 100644
--- a/mariadb/files/nginx.tmpl
+++ b/mariadb/files/nginx.tmpl
@@ -23,7 +23,9 @@ daemon off;
worker_processes {{ $cfg.WorkerProcesses }};
pid /run/nginx.pid;
-{{ if ne .MaxOpenFiles 0 }}
+{{ if lt .MaxOpenFiles 2048 }}
+worker_rlimit_nofile 2048;
+{{else}}
worker_rlimit_nofile {{ .MaxOpenFiles }};
{{ end }}
--
2.16.5

View File

@ -0,0 +1,65 @@
From b3829fef30e76fdf498fa1d0d35185f642dce5f6 Mon Sep 17 00:00:00 2001
From: Robert Church <robert.church@windriver.com>
Date: Mon, 8 Apr 2019 02:12:39 -0400
Subject: [PATCH 4/4] Partial revert of
31e3469d28858d7b5eb6355e88b6f49fd62032be
Suspect that new use of mergeOverwrite vs. merge is breaking the
per-host DaemonSet overrides.
Signed-off-by: Robert Church <robert.church@windriver.com>
---
helm-toolkit/templates/utils/_daemonset_overrides.tpl | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/helm-toolkit/templates/utils/_daemonset_overrides.tpl b/helm-toolkit/templates/utils/_daemonset_overrides.tpl
index 10ab166..ab1177a 100644
--- a/helm-toolkit/templates/utils/_daemonset_overrides.tpl
+++ b/helm-toolkit/templates/utils/_daemonset_overrides.tpl
@@ -49,10 +49,10 @@ limitations under the License.
{{- $override_conf_copy := $host_data.conf }}
{{/* Deep copy to prevent https://storyboard.openstack.org/#!/story/2005936 */}}
{{- $root_conf_copy := omit ($context.Values.conf | toYaml | fromYaml) "overrides" }}
- {{- $merged_dict := mergeOverwrite $root_conf_copy $override_conf_copy }}
+ {{- $merged_dict := merge $override_conf_copy $root_conf_copy }}
{{- $root_conf_copy2 := dict "conf" $merged_dict }}
{{- $context_values := omit (omit ($context.Values | toYaml | fromYaml) "conf") "__daemonset_list" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2 }}
+ {{- $root_conf_copy3 := merge $context_values $root_conf_copy2 }}
{{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
{{- $_ := set $current_dict "nodeData" $root_conf_copy4 }}
@@ -89,10 +89,10 @@ limitations under the License.
{{- $override_conf_copy := $label_data.conf }}
{{/* Deep copy to prevent https://storyboard.openstack.org/#!/story/2005936 */}}
{{- $root_conf_copy := omit ($context.Values.conf | toYaml | fromYaml) "overrides" }}
- {{- $merged_dict := mergeOverwrite $root_conf_copy $override_conf_copy }}
+ {{- $merged_dict := merge $override_conf_copy $root_conf_copy }}
{{- $root_conf_copy2 := dict "conf" $merged_dict }}
{{- $context_values := omit (omit ($context.Values | toYaml | fromYaml) "conf") "__daemonset_list" }}
- {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2 }}
+ {{- $root_conf_copy3 := merge $context_values $root_conf_copy2 }}
{{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
{{- $_ := set $context.Values.__current_label "nodeData" $root_conf_copy4 }}
@@ -187,7 +187,7 @@ limitations under the License.
{{- $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_copy3 := merge $context_values $root_conf_copy2 }}
{{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
{{- $_ := set $context.Values.__default "nodeData" $root_conf_copy4 }}
@@ -198,7 +198,7 @@ limitations under the License.
{{- range $current_dict := $context.Values.__daemonset_list }}
{{- $context_novalues := omit $context "Values" }}
- {{- $merged_dict := mergeOverwrite $context_novalues $current_dict.nodeData }}
+ {{- $merged_dict := merge $current_dict.nodeData $context_novalues }}
{{- $_ := set $current_dict "nodeData" $merged_dict }}
{{/* Deep copy original daemonset_yaml */}}
{{- $_ := set $context.Values "__daemonset_yaml" ($daemonset_yaml | toYaml | fromYaml) }}
--
2.7.4

View File

@ -0,0 +1,77 @@
From e2e9b3c707599b4074ebf504f6a2fa5c185481e2 Mon Sep 17 00:00:00 2001
From: Angie Wang <angie.wang@windriver.com>
Date: Tue, 9 Jul 2019 13:37:29 -0400
Subject: [PATCH 1/1] Add TLS support for Gnocchi public endpoint
Signed-off-by: Angie Wang <angie.wang@windriver.com>
---
gnocchi/templates/secret-ingress-tls.yaml | 19 +++++++++++++++++++
gnocchi/values.yaml | 12 ++++++++++++
2 files changed, 31 insertions(+)
create mode 100644 gnocchi/templates/secret-ingress-tls.yaml
diff --git a/gnocchi/templates/secret-ingress-tls.yaml b/gnocchi/templates/secret-ingress-tls.yaml
new file mode 100644
index 0000000..fc279cd
--- /dev/null
+++ b/gnocchi/templates/secret-ingress-tls.yaml
@@ -0,0 +1,19 @@
+{{/*
+Copyright 2019 Wind River Systems, Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/}}
+
+{{- if .Values.manifests.secret_ingress_tls }}
+{{- include "helm-toolkit.manifests.secret_ingress_tls" ( dict "envAll" . "backendServiceType" "metric" ) }}
+{{- end }}
diff --git a/gnocchi/values.yaml b/gnocchi/values.yaml
index a4496b7..394e82a 100644
--- a/gnocchi/values.yaml
+++ b/gnocchi/values.yaml
@@ -472,6 +472,10 @@ secrets:
admin: gnocchi-db-indexer-admin
gnocchi: gnocchi-db-indexer-user
rbd: gnocchi-rbd-keyring
+ tls:
+ metric:
+ api:
+ public: gnocchi-tls-public
bootstrap:
enabled: false
@@ -538,6 +542,13 @@ endpoints:
public: gnocchi
host_fqdn_override:
default: null
+ # NOTE: this chart supports TLS for fqdn over-ridden public
+ # endpoints using the following format:
+ # public:
+ # host: null
+ # tls:
+ # crt: null
+ # key: null
path:
default: null
scheme:
@@ -633,6 +644,7 @@ manifests:
pod_gnocchi_test: true
secret_db: true
secret_keystone: true
+ secret_ingress_tls: true
service_api: true
service_ingress_api: true
service_statsd: true
--
2.7.4

View File

@ -0,0 +1,46 @@
From 326fcd76f54d7c099f4c3da6c31eefe0eef2e236 Mon Sep 17 00:00:00 2001
From: Ovidiu Poncea <ovidiu.poncea@windriver.com>
Date: Mon, 29 Jul 2019 08:00:01 -0400
Subject: [PATCH] Fix pod restarts on all workers when worker added/removed
---
helm-toolkit/templates/utils/_daemonset_overrides.tpl | 4 ++--
helm-toolkit/templates/utils/_hash.tpl | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/helm-toolkit/templates/utils/_daemonset_overrides.tpl b/helm-toolkit/templates/utils/_daemonset_overrides.tpl
index ab1177a..e564869 100644
--- a/helm-toolkit/templates/utils/_daemonset_overrides.tpl
+++ b/helm-toolkit/templates/utils/_daemonset_overrides.tpl
@@ -215,7 +215,7 @@ limitations under the License.
name uniqueness */}}
{{- $_ := set $current_dict "dns_1123_name" dict }}
{{- if hasKey $current_dict "matchExpressions" }}
- {{- $_ := set $current_dict "dns_1123_name" (printf (print $name_format2 "-" ($current_dict.matchExpressions | quote | sha256sum | trunc 8))) }}
+ {{- $_ := set $current_dict "dns_1123_name" (printf (print $name_format2 "-" ($current_dict.matchExpressions | toJson | sha256sum | trunc 8))) }}
{{- else }}
{{- $_ := set $current_dict "dns_1123_name" $name_format2 }}
{{- end }}
@@ -258,7 +258,7 @@ limitations under the License.
{{- 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 $current_dict.dns_1123_name $current_dict.nodeData | include $configmap_include }}
- {{- $values_hash := $cmap | quote | sha256sum }}
+ {{- $values_hash := $cmap | toJson | sha256sum }}
{{- $_ := set $context.Values.__daemonset_yaml.spec.template.metadata.annotations "configmap-etc-hash" $values_hash }}
{{/* generate configmap */}}
diff --git a/helm-toolkit/templates/utils/_hash.tpl b/helm-toolkit/templates/utils/_hash.tpl
index 1041ec0..e419e3b 100644
--- a/helm-toolkit/templates/utils/_hash.tpl
+++ b/helm-toolkit/templates/utils/_hash.tpl
@@ -19,5 +19,5 @@ limitations under the License.
{{- $context := index . 1 -}}
{{- $last := base $context.Template.Name }}
{{- $wtf := $context.Template.Name | replace $last $name -}}
-{{- include $wtf $context | sha256sum | quote -}}
+{{- include $wtf $context | toJson | sha256sum | quote -}}
{{- end -}}
--
2.7.4

View File

@ -0,0 +1,55 @@
From f4c56def0797f093f626720871bd5e525227685e Mon Sep 17 00:00:00 2001
From: Bin Yang <bin.yang@intel.com>
Date: Tue, 13 Aug 2019 10:15:14 +0800
Subject: [PATCH] add io_thread_pool for rabbitmq
Signed-off-by: Bin Yang <bin.yang@intel.com>
---
rabbitmq/templates/statefulset.yaml | 8 ++++++++
rabbitmq/values.yaml | 4 ++++
2 files changed, 12 insertions(+)
diff --git a/rabbitmq/templates/statefulset.yaml b/rabbitmq/templates/statefulset.yaml
index 41dc198..e0e61e6 100644
--- a/rabbitmq/templates/statefulset.yaml
+++ b/rabbitmq/templates/statefulset.yaml
@@ -105,6 +105,10 @@ spec:
key: RABBITMQ_ADMIN_PASSWORD
- name: RABBITMQ_DEFINITION_FILE
value: "{{ index $envAll.Values.conf.rabbitmq "management.load_definitions" }}"
+{{- if $envAll.Values.io_thread_pool.enabled }}
+ - name: RABBITMQ_IO_THREAD_POOL_SIZE
+ value: {{ $envAll.Values.io_thread_pool.size | quote }}
+{{- end }}
volumeMounts:
- name: pod-tmp
mountPath: /tmp
@@ -191,6 +195,10 @@ spec:
value: "{{ tuple "oslo_messaging" "internal" "amqp" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}"
- name: PORT_CLUSTERING
value: "{{ add (tuple "oslo_messaging" "internal" "amqp" . | include "helm-toolkit.endpoints.endpoint_port_lookup") 20000 }}"
+{{- if $envAll.Values.io_thread_pool.enabled }}
+ - name: RABBITMQ_IO_THREAD_POOL_SIZE
+ value: {{ $envAll.Values.io_thread_pool.size | quote }}
+{{- end }}
readinessProbe:
initialDelaySeconds: 10
timeoutSeconds: 10
diff --git a/rabbitmq/values.yaml b/rabbitmq/values.yaml
index 6c95787..9cd3a91 100644
--- a/rabbitmq/values.yaml
+++ b/rabbitmq/values.yaml
@@ -334,6 +334,10 @@ volume:
class_name: general
size: 256Mi
+io_thread_pool:
+ enabled: false
+ size: 64
+
manifests:
configmap_bin: true
configmap_etc: true
--
2.7.4

View File

@ -0,0 +1,63 @@
From 132df9829fa4c697e0b9701871888708973f9123 Mon Sep 17 00:00:00 2001
From: Gerry Kopec <Gerry.Kopec@windriver.com>
Date: Fri, 16 Aug 2019 14:29:46 -0400
Subject: [PATCH] Enable override of rabbitmq probe parameters
Add variables for initial delay, period and timeout for rabbitmq
liveness and readiness probes.
Change-Id: I8d2685118eb4ce3b8c27952892f7ad553fc5de77
Signed-off-by: Gerry Kopec <Gerry.Kopec@windriver.com>
---
rabbitmq/templates/statefulset.yaml | 10 ++++++----
rabbitmq/values.yaml | 9 +++++++++
2 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/rabbitmq/templates/statefulset.yaml b/rabbitmq/templates/statefulset.yaml
index e0e61e6..f71dc3e 100644
--- a/rabbitmq/templates/statefulset.yaml
+++ b/rabbitmq/templates/statefulset.yaml
@@ -200,14 +200,16 @@ spec:
value: {{ $envAll.Values.io_thread_pool.size | quote }}
{{- end }}
readinessProbe:
- initialDelaySeconds: 10
- timeoutSeconds: 10
+ initialDelaySeconds: {{ $envAll.Values.pod.probes.readiness.initialDelaySeconds }}
+ periodSeconds: {{ $envAll.Values.pod.probes.readiness.periodSeconds }}
+ timeoutSeconds: {{ $envAll.Values.pod.probes.readiness.timeoutSeconds }}
exec:
command:
- /tmp/rabbitmq-readiness.sh
livenessProbe:
- initialDelaySeconds: 30
- timeoutSeconds: 10
+ initialDelaySeconds: {{ $envAll.Values.pod.probes.liveness.initialDelaySeconds }}
+ periodSeconds: {{ $envAll.Values.pod.probes.liveness.periodSeconds }}
+ timeoutSeconds: {{ $envAll.Values.pod.probes.liveness.timeoutSeconds }}
exec:
command:
- /tmp/rabbitmq-liveness.sh
diff --git a/rabbitmq/values.yaml b/rabbitmq/values.yaml
index 9cd3a91..2bae4cb 100644
--- a/rabbitmq/values.yaml
+++ b/rabbitmq/values.yaml
@@ -145,6 +145,15 @@ pod:
limits:
memory: "1024Mi"
cpu: "2000m"
+ probes:
+ readiness:
+ initialDelaySeconds: 10
+ periodSeconds: 10
+ timeoutSeconds: 10
+ liveness:
+ initialDelaySeconds: 30
+ periodSeconds: 10
+ timeoutSeconds: 10
conf:
enabled_plugins:
--
2.7.4

View File

@ -0,0 +1,12 @@
---
apiVersion: v1
generated: 2019-01-02T15:19:36.215111369-06:00
repositories:
- caFile: ""
cache: /builddir/.helm/repository/cache/local-index.yaml
certFile: ""
keyFile: ""
name: local
password: ""
url: http://127.0.0.1:8879/charts
username: ""

View File

@ -12,30 +12,32 @@ BRANCH = "r/stx.3.0"
SRCREV_openstack-helm-infra = "c9d6676bf9a5aceb311dc31dadd07cba6a3d6392"
SRCREV_openstack-armada-app = "863f4b9733d3d4f4fd490606a94b84cfdaf2df2c"
# Patches pulled from:
# SRCREV_openstack-armada-app = "863f4b9733d3d4f4fd490606a94b84cfdaf2df2c"
# git://opendev.org/starlingx/openstack-armada-app
SRC_URI = " \
git://github.com/openstack/openstack-helm-infra;protocol=${PROTOCOL};name=openstack-helm-infra \
git://opendev.org/starlingx/openstack-armada-app;protocol=${PROTOCOL};branch=${BRANCH};name=openstack-armada-app;destsuffix=openstack-armada-app \
"
file://0001-Allow-multiple-containers-per-daemonset-pod.patch \
file://0002-Add-imagePullSecrets-in-service-account.patch \
file://0003-Set-Min-NGINX-handles.patch \
file://0004-Partial-revert-of-31e3469d28858d7b5eb6355e88b6f49fd6.patch \
file://0005-Add-TLS-support-for-Gnocchi-public-endpoint.patch \
file://0006-Fix-pod-restarts-on-all-workers-when-worker-added-re.patch \
file://0007-Add-io_thread_pool-for-rabbitmq.patch \
file://0008-Enable-override-of-rabbitmq-probe-parameters.patch \
file://repositories.yaml \
"
PATCHTOOL = "git"
PATCH_COMMIT_FUNCTIONS = "1"
S = "${WORKDIR}/git"
inherit allarch
patch_folder = "${WORKDIR}/openstack-armada-app/openstack-helm-infra/files"
helm_folder = "${nonarch_libdir}/helm"
do_patch () {
cd ${S}
git am ${patch_folder}/0001-Allow-multiple-containers-per-daemonset-pod.patch
git am ${patch_folder}/0002-Add-imagePullSecrets-in-service-account.patch
git am ${patch_folder}/0003-Set-Min-NGINX-handles.patch
git am ${patch_folder}/0004-Partial-revert-of-31e3469d28858d7b5eb6355e88b6f49fd6.patch
git am ${patch_folder}/0005-Add-TLS-support-for-Gnocchi-public-endpoint.patch
git am ${patch_folder}/0006-Fix-pod-restarts-on-all-workers-when-worker-added-re.patch
git am ${patch_folder}/0007-Add-io_thread_pool-for-rabbitmq.patch
git am ${patch_folder}/0008-Enable-override-of-rabbitmq-probe-parameters.patch
}
do_configure[noexec] = "1"
do_compile () {
@ -56,7 +58,7 @@ do_compile () {
mkdir ${helm_home}/cache/archive
# Stage a repository file that only has a local repo
install -m 0644 ${patch_folder}/repositories.yaml \
install -m 0644 ${WORKDIR}/repositories.yaml \
${helm_home}/repository/repositories.yaml
# Host a server for the charts