From 911caa234979bc2688a8d8fef1f7fce1fc5ec8e5 Mon Sep 17 00:00:00 2001 From: Joshua Reed Date: Tue, 20 Feb 2024 14:54:38 -0700 Subject: [PATCH] Auto-increment chart versions Enable auto-versioning of helm charts to ensure the FluxCD helm controller recognizes chart changes. To guarantee the helm chart version is incremented when a helm chart change is submitted, the following is implemented: - Provide a top level hierarchy for helm charts to differentiate between upstream and custom charts: helm-charts/{custom,upstream} - Arrange exiting helm chart in appropriate helm-charts location. Custom for helm charts built and maintained in this repository. Upstream for directly used and/or directly used plus patched. - stx-APP-helm now contains only manifests and final application packaging rules. No custom helm charts should be delivered here. - Use StarlingX debian git revcount packaging mechanisms to derive the semver PATCH version for custom helm charts. Chart version (MAJOR.MINOR.PATCH) is passed to 'helm package' command to force the version, where PATCH == 'git revcount' - Use StarlingX debian git revcount packaging mechanisms to derive the semver BUILD version for upstream helm charts which maintains the upstream chart version and adds a versioned BUILD extension. ::= "." "." ::= "+" Chart version (MAJOR.MINOR.PATCH+STX.REV) is passed to 'helm package' command to force the version, where REV == 'git revcount' - Establish a new package(s) for the custom or upstream helm chart(s). - Enforce a baseline version for all helm charts; eg 'APP-helm'. Maintain current rev counts for all new packages, where applicable. - Update 'stx-APP-helm' to: - Update the build dependencies to include the new helm chart package and remove dependency on helm - Update the rules to remove building the dependency APP helm chart(s) and automatically update the chart versions in the FluxCD helmrelease.yaml files. Test Plan: PASS - Build all packages generating an application tarball verifying all versions on the charts and application make sense. PASS - Introduce temporary chart changes and ensure that the versions increment as expected. PASS - Validate basic application lifecycle operations: upload/apply/remove/delete. Story: 2010929 Task: 49597 Change-Id: Ia7dd6dac535b0f42cd1161bc0786e65f5cbf9b9f Signed-off-by: Joshua Reed --- debian_pkg_dirs | 1 + .../debian/deb_folder/changelog | 6 ++ .../debian/deb_folder/control | 15 ++++ .../debian/deb_folder/copyright | 41 ++++++++++ .../deb_folder/ingress-nginx-helm.install | 1 + .../patches}/0001-add-toleration-fluxcd.patch | 0 .../debian/deb_folder/patches/series | 1 + .../debian/deb_folder/rules | 30 ++++++++ .../debian/deb_folder/source/format | 1 + .../ingress-nginx-helm/debian/meta_data.yaml | 15 ++++ .../ingress-nginx-helm}/files/Makefile | 8 +- .../debian/deb_folder/changelog | 6 ++ .../debian/deb_folder/control | 3 +- .../debian/deb_folder/copyright | 4 +- .../debian/deb_folder/rules | 75 ++++++++----------- .../debian/meta_data.yaml | 7 +- .../stx-nginx-ingress-controller-helm/README | 5 -- .../files/0001-add-toleration-armada.patch | 30 -------- .../files/index.yaml | 3 - .../files/repositories.yaml | 12 --- .../ingress-nginx/helmrelease.yaml | 2 +- 21 files changed, 155 insertions(+), 111 deletions(-) create mode 100644 helm-charts/upstream/ingress-nginx-helm/debian/deb_folder/changelog create mode 100644 helm-charts/upstream/ingress-nginx-helm/debian/deb_folder/control create mode 100644 helm-charts/upstream/ingress-nginx-helm/debian/deb_folder/copyright create mode 100644 helm-charts/upstream/ingress-nginx-helm/debian/deb_folder/ingress-nginx-helm.install rename {stx-nginx-ingress-controller-helm/stx-nginx-ingress-controller-helm/files => helm-charts/upstream/ingress-nginx-helm/debian/deb_folder/patches}/0001-add-toleration-fluxcd.patch (100%) create mode 100644 helm-charts/upstream/ingress-nginx-helm/debian/deb_folder/patches/series create mode 100644 helm-charts/upstream/ingress-nginx-helm/debian/deb_folder/rules create mode 100644 helm-charts/upstream/ingress-nginx-helm/debian/deb_folder/source/format create mode 100644 helm-charts/upstream/ingress-nginx-helm/debian/meta_data.yaml rename {stx-nginx-ingress-controller-helm/stx-nginx-ingress-controller-helm => helm-charts/upstream/ingress-nginx-helm/ingress-nginx-helm}/files/Makefile (75%) delete mode 100644 stx-nginx-ingress-controller-helm/stx-nginx-ingress-controller-helm/README delete mode 100644 stx-nginx-ingress-controller-helm/stx-nginx-ingress-controller-helm/files/0001-add-toleration-armada.patch delete mode 100644 stx-nginx-ingress-controller-helm/stx-nginx-ingress-controller-helm/files/index.yaml delete mode 100644 stx-nginx-ingress-controller-helm/stx-nginx-ingress-controller-helm/files/repositories.yaml diff --git a/debian_pkg_dirs b/debian_pkg_dirs index a2dc44c..cc481ee 100644 --- a/debian_pkg_dirs +++ b/debian_pkg_dirs @@ -1,2 +1,3 @@ +helm-charts/upstream/ingress-nginx-helm python3-k8sapp-nginx-ingress-controller stx-nginx-ingress-controller-helm diff --git a/helm-charts/upstream/ingress-nginx-helm/debian/deb_folder/changelog b/helm-charts/upstream/ingress-nginx-helm/debian/deb_folder/changelog new file mode 100644 index 0000000..9f74a0d --- /dev/null +++ b/helm-charts/upstream/ingress-nginx-helm/debian/deb_folder/changelog @@ -0,0 +1,6 @@ +ingress-nginx-helm (4.8-2) unstable; urgency=medium + + * Initial release. + + -- Joshua Reed Fri, 16 Feb 2024 14:54:00 +0000 + diff --git a/helm-charts/upstream/ingress-nginx-helm/debian/deb_folder/control b/helm-charts/upstream/ingress-nginx-helm/debian/deb_folder/control new file mode 100644 index 0000000..30e7f7f --- /dev/null +++ b/helm-charts/upstream/ingress-nginx-helm/debian/deb_folder/control @@ -0,0 +1,15 @@ +Source: ingress-nginx-helm +Section: libs +Priority: optional +Maintainer: StarlingX Developers +Build-Depends: debhelper-compat (= 13), + helm +Standards-Version: 4.5.1 +Homepage: https://www.starlingx.io + +Package: ingress-nginx-helm +Section: libs +Architecture: any +Depends: ${misc:Depends} +Description: StarlingX Nginx Helm Charts + This package contains helm charts for the Nginx Ingress application. diff --git a/helm-charts/upstream/ingress-nginx-helm/debian/deb_folder/copyright b/helm-charts/upstream/ingress-nginx-helm/debian/deb_folder/copyright new file mode 100644 index 0000000..a66df6c --- /dev/null +++ b/helm-charts/upstream/ingress-nginx-helm/debian/deb_folder/copyright @@ -0,0 +1,41 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: ingress-nginx-helm +Source: https://opendev.org/starlingx/nginx-ingress-controller-armada-app/ + +Files: * +Copyright: (c) 2024 Wind River Systems, Inc +License: Apache-2 + 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 + . + https://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. + . + On Debian-based systems the full text of the Apache version 2.0 license + can be found in `/usr/share/common-licenses/Apache-2.0'. + +# If you want to use GPL v2 or later for the /debian/* files use +# the following clauses, or change it to suit. Delete these two lines +Files: debian/* +Copyright: 2022 Wind River Systems, Inc +License: Apache-2 + 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 + . + https://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. + . + On Debian-based systems the full text of the Apache version 2.0 license + can be found in `/usr/share/common-licenses/Apache-2.0'. diff --git a/helm-charts/upstream/ingress-nginx-helm/debian/deb_folder/ingress-nginx-helm.install b/helm-charts/upstream/ingress-nginx-helm/debian/deb_folder/ingress-nginx-helm.install new file mode 100644 index 0000000..8a0c6de --- /dev/null +++ b/helm-charts/upstream/ingress-nginx-helm/debian/deb_folder/ingress-nginx-helm.install @@ -0,0 +1 @@ +usr/lib/helm/* diff --git a/stx-nginx-ingress-controller-helm/stx-nginx-ingress-controller-helm/files/0001-add-toleration-fluxcd.patch b/helm-charts/upstream/ingress-nginx-helm/debian/deb_folder/patches/0001-add-toleration-fluxcd.patch similarity index 100% rename from stx-nginx-ingress-controller-helm/stx-nginx-ingress-controller-helm/files/0001-add-toleration-fluxcd.patch rename to helm-charts/upstream/ingress-nginx-helm/debian/deb_folder/patches/0001-add-toleration-fluxcd.patch diff --git a/helm-charts/upstream/ingress-nginx-helm/debian/deb_folder/patches/series b/helm-charts/upstream/ingress-nginx-helm/debian/deb_folder/patches/series new file mode 100644 index 0000000..63cdcd7 --- /dev/null +++ b/helm-charts/upstream/ingress-nginx-helm/debian/deb_folder/patches/series @@ -0,0 +1 @@ +0001-add-toleration-fluxcd.patch diff --git a/helm-charts/upstream/ingress-nginx-helm/debian/deb_folder/rules b/helm-charts/upstream/ingress-nginx-helm/debian/deb_folder/rules new file mode 100644 index 0000000..1b3d91a --- /dev/null +++ b/helm-charts/upstream/ingress-nginx-helm/debian/deb_folder/rules @@ -0,0 +1,30 @@ +#!/usr/bin/make -f +# export DH_VERBOSE = 1 + +export DEB_VERSION = $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ') +export PATCH_VERSION = $(shell echo $(DEB_VERSION) | cut -f 4 -d '.') +export CHART_BASE_VERSION = $(shell echo $(DEB_VERSION) | sed 's/-/./' | cut -d '.' -f 1-3) +export CHART_VERSION = $(CHART_BASE_VERSION)+STX.$(PATCH_VERSION) + +export ROOT = debian/tmp +export APP_FOLDER = $(ROOT)/usr/lib/helm + +%: + dh $@ + +override_dh_auto_build: + mkdir -p ingress-nginx + + # Copy ingress-nginx charts + cp -r charts/* ingress-nginx + + cp Makefile ingress-nginx + + cd ingress-nginx && make CHART_VERSION=$(CHART_VERSION) ingress-nginx + +override_dh_auto_install: + # Install the app tar file. + install -d -m 755 $(APP_FOLDER) + install -p -D -m 755 ingress-nginx/ingress-nginx*.tgz $(APP_FOLDER) + +override_dh_auto_test: diff --git a/helm-charts/upstream/ingress-nginx-helm/debian/deb_folder/source/format b/helm-charts/upstream/ingress-nginx-helm/debian/deb_folder/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/helm-charts/upstream/ingress-nginx-helm/debian/deb_folder/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/helm-charts/upstream/ingress-nginx-helm/debian/meta_data.yaml b/helm-charts/upstream/ingress-nginx-helm/debian/meta_data.yaml new file mode 100644 index 0000000..814f4b6 --- /dev/null +++ b/helm-charts/upstream/ingress-nginx-helm/debian/meta_data.yaml @@ -0,0 +1,15 @@ +--- +debname: ingress-nginx-helm +debver: 4.8-2 +dl_path: + name: controller-v1.9.3.tar.gz + url: https://mirror.starlingx.windriver.com/mirror/debian/github.com/kubernetes/ingress-nginx/archive/controller-v1.9.3.tar.gz + sha256sum: 1047a9edd5d4ccf9a8b1a7941d3083a31987f32890a16b05862c49fb842e49bb +src_files: + - ingress-nginx-helm/files/Makefile +revision: + dist: $STX_DIST + stx_patch: 0 + GITREVCOUNT: + BASE_SRCREV: 0eceb0371b546979204e7c7b88416a2b641aac29 + SRC_DIR: ${MY_REPO}/stx/nginx-ingress-controller-armada-app/helm-charts/upstream/ingress-nginx-helm diff --git a/stx-nginx-ingress-controller-helm/stx-nginx-ingress-controller-helm/files/Makefile b/helm-charts/upstream/ingress-nginx-helm/ingress-nginx-helm/files/Makefile similarity index 75% rename from stx-nginx-ingress-controller-helm/stx-nginx-ingress-controller-helm/files/Makefile rename to helm-charts/upstream/ingress-nginx-helm/ingress-nginx-helm/files/Makefile index eff605d..a50cdab 100644 --- a/stx-nginx-ingress-controller-helm/stx-nginx-ingress-controller-helm/files/Makefile +++ b/helm-charts/upstream/ingress-nginx-helm/ingress-nginx-helm/files/Makefile @@ -1,7 +1,7 @@ # -# Copyright 2017 The Openstack-Helm Authors. +# Copyright 2019 The Openstack-Helm Authors. # -# Copyright (c) 2019 Wind River Systems, Inc. +# Copyright (c) 2019,2024 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # @@ -25,18 +25,16 @@ $(CHARTS): init-%: if [ -f $*/Makefile ]; then make -C $*; fi - if [ -f $*/requirements.yaml ]; then helm dep up $*; fi lint-%: init-% if [ -d $* ]; then helm lint $*; fi build-%: lint-% - if [ -d $* ]; then helm package $*; fi + if [ -d $* ]; then helm package --version $(CHART_VERSION) $*; fi clean: @echo "Clean all build artifacts" rm -f */templates/_partials.tpl */templates/_globals.tpl - rm -f *tgz */charts/*tgz */requirements.lock rm -rf */charts */tmpcharts %: diff --git a/stx-nginx-ingress-controller-helm/debian/deb_folder/changelog b/stx-nginx-ingress-controller-helm/debian/deb_folder/changelog index 722eb66..8cdff91 100644 --- a/stx-nginx-ingress-controller-helm/debian/deb_folder/changelog +++ b/stx-nginx-ingress-controller-helm/debian/deb_folder/changelog @@ -1,3 +1,9 @@ +stx-nginx-ingress-controller-helm (1.0-2) unstable; urgency=medium + + * Update package to automatically version itself. + + -- Joshua Reed Fri, 16 Feb 2024 11:06:42 +0000 + stx-nginx-ingress-controller-helm (1.0-1) unstable; urgency=medium * Initial release. diff --git a/stx-nginx-ingress-controller-helm/debian/deb_folder/control b/stx-nginx-ingress-controller-helm/debian/deb_folder/control index 05a9434..22f858e 100644 --- a/stx-nginx-ingress-controller-helm/debian/deb_folder/control +++ b/stx-nginx-ingress-controller-helm/debian/deb_folder/control @@ -3,9 +3,8 @@ Section: libs Priority: optional Maintainer: StarlingX Developers Build-Depends: debhelper-compat (= 13), - chartmuseum, helm, - procps, + ingress-nginx-helm, python3-k8sapp-nginx-ingress-controller, python3-k8sapp-nginx-ingress-controller-wheels, build-info diff --git a/stx-nginx-ingress-controller-helm/debian/deb_folder/copyright b/stx-nginx-ingress-controller-helm/debian/deb_folder/copyright index 042618e..d667f7f 100644 --- a/stx-nginx-ingress-controller-helm/debian/deb_folder/copyright +++ b/stx-nginx-ingress-controller-helm/debian/deb_folder/copyright @@ -3,7 +3,7 @@ Upstream-Name: stx-nginx-ingress-controller-helm Source: https://opendev.org/starlingx/nginx-ingress-controller-armada-app/ Files: * -Copyright: (c) 2013-2021 Wind River Systems, Inc +Copyright: (c) 2013-2024 Wind River Systems, Inc License: Apache-2 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ License: Apache-2 # If you want to use GPL v2 or later for the /debian/* files use # the following clauses, or change it to suit. Delete these two lines Files: debian/* -Copyright: 2021 Wind River Systems, Inc +Copyright: 2024 Wind River Systems, Inc License: Apache-2 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/stx-nginx-ingress-controller-helm/debian/deb_folder/rules b/stx-nginx-ingress-controller-helm/debian/deb_folder/rules index 3d1f382..20abb50 100755 --- a/stx-nginx-ingress-controller-helm/debian/deb_folder/rules +++ b/stx-nginx-ingress-controller-helm/debian/deb_folder/rules @@ -10,69 +10,54 @@ export REVISION = $(shell echo $(DEB_VERSION) | cut -f 4 -d '.') export APP_NAME = nginx-ingress-controller export APP_VERSION = $(RELEASE)-$(REVISION) -export APP_TARBALL_FLUXCD = $(APP_NAME)-$(APP_VERSION).tgz +export APP_TARBALL = $(APP_NAME)-$(APP_VERSION).tgz +export HELM_FOLDER = /usr/lib/helm export HELM_REPO = stx-platform -export STAGING_FLUXCD = staging-fluxcd -export FLUXCD_NGINX_PKG = helm-charts-ingress-nginx-1.9.3.tar.gz +export STAGING = staging %: dh $@ override_dh_auto_build: - - ############ - # FLUXCD # - ############ - mkdir -p fluxcd - cd fluxcd ; \ - tar xvfz ../$(FLUXCD_NGINX_PKG) ; \ - rm helm-charts/Makefile ; \ - mv -f helm-charts/* . - - # Apply the daemonset tolerations patch to fluxcd - cd fluxcd ; patch --no-backup-if-mismatch --fuzz=0 -p1 < ../files/0001-add-toleration-fluxcd.patch ; \ - - # Host a server for the helm charts. - cd fluxcd ; chartmuseum --debug --port=8879 --context-path='/charts' --storage="local" \ - --storage-local-rootdir="." & - sleep 2 - helm repo add local http://localhost:8879/charts - - # Create the TGZ file. - cp files/Makefile fluxcd/charts - cd fluxcd/charts && make ingress-nginx - - # Terminate the helm chart server. - pkill chartmuseum - # Setup the staging directory. - mkdir -p $(STAGING_FLUXCD) - cp files/metadata.yaml $(STAGING_FLUXCD) - mkdir -p $(STAGING_FLUXCD)/charts - cp fluxcd/charts/*.tgz $(STAGING_FLUXCD)/charts + mkdir -p $(STAGING) + cp files/metadata.yaml $(STAGING) + cp -Rv fluxcd-manifests $(STAGING) + mkdir -p $(STAGING)/charts + cp /usr/lib/helm/*.tgz $(STAGING)/charts + + # Adjust the helmrelease yamls based on the chart versions + for c in $(STAGING)/charts/*; do \ + chart=$$(basename $$c .tgz); \ + chart_name=$${chart%-*}; \ + chart_version=$${chart##*-}; \ + echo "Found $$chart; name: $$chart_name, version: $$chart_version"; \ + chart_manifest=$$(find $(STAGING)/fluxcd-manifests -name helmrelease.yaml -exec grep -q "chart:.*$$chart_name" {} \; -print); \ + echo "Updating manifest: $$chart_manifest"; \ + sed -i "s/REPLACE_HELM_CHART_VERSION/$$chart_version/g" $$chart_manifest; \ + grep version $$chart_manifest; \ + done # Populate metadata. - sed -i 's/APP_REPLACE_NAME/$(APP_NAME)/g' $(STAGING_FLUXCD)/metadata.yaml - sed -i 's/APP_REPLACE_VERSION/$(APP_VERSION)/g' $(STAGING_FLUXCD)/metadata.yaml - sed -i 's/HELM_REPLACE_REPO/$(HELM_REPO)/g' $(STAGING_FLUXCD)/metadata.yaml + sed -i 's/APP_REPLACE_NAME/$(APP_NAME)/g' $(STAGING)/metadata.yaml + sed -i 's/APP_REPLACE_VERSION/$(APP_VERSION)/g' $(STAGING)/metadata.yaml + sed -i 's/HELM_REPLACE_REPO/$(HELM_REPO)/g' $(STAGING)/metadata.yaml # Copy the plugins: installed in the buildroot - mkdir -p $(STAGING_FLUXCD)/plugins - cp /plugins/*.whl $(STAGING_FLUXCD)/plugins + mkdir -p $(STAGING)/plugins + cp /plugins/*.whl $(STAGING)/plugins - cp -R fluxcd-manifests $(STAGING_FLUXCD)/ - - # calculate checksum of all files in app_staging - cd $(STAGING_FLUXCD) && find . -type f ! -name '*.md5' -print0 | xargs -0 md5sum > checksum.md5 - tar cfz $(APP_TARBALL_FLUXCD) -C $(STAGING_FLUXCD)/ . + # Create the app package. + cd $(STAGING) && find . -type f ! -name '*.md5' -print0 | xargs -0 md5sum > checksum.md5 + tar cfz $(APP_TARBALL) -C $(STAGING)/ . # Cleanup staging - rm -rf $(STAGING_FLUXCD) + rm -rf $(STAGING) override_dh_auto_install: # Install the app tar file. install -d -m 755 $(APP_FOLDER) - install -p -D -m 755 $(APP_TARBALL_FLUXCD) $(APP_FOLDER) + install -p -D -m 755 $(APP_TARBALL) $(APP_FOLDER) override_dh_auto_test: diff --git a/stx-nginx-ingress-controller-helm/debian/meta_data.yaml b/stx-nginx-ingress-controller-helm/debian/meta_data.yaml index c4803e2..9486826 100644 --- a/stx-nginx-ingress-controller-helm/debian/meta_data.yaml +++ b/stx-nginx-ingress-controller-helm/debian/meta_data.yaml @@ -1,12 +1,7 @@ --- debname: stx-nginx-ingress-controller-helm -debver: 1.0-1 +debver: 1.0-2 src_path: stx-nginx-ingress-controller-helm -dl_files: - helm-charts-ingress-nginx-1.9.3.tar.gz: - topdir: helm-charts - url: https://mirror.starlingx.windriver.com/mirror/debian/github.com/kubernetes/ingress-nginx/archive/controller-v1.9.3.tar.gz - sha256sum: 1047a9edd5d4ccf9a8b1a7941d3083a31987f32890a16b05862c49fb842e49bb revision: dist: $STX_DIST GITREVCOUNT: diff --git a/stx-nginx-ingress-controller-helm/stx-nginx-ingress-controller-helm/README b/stx-nginx-ingress-controller-helm/stx-nginx-ingress-controller-helm/README deleted file mode 100644 index b773ef4..0000000 --- a/stx-nginx-ingress-controller-helm/stx-nginx-ingress-controller-helm/README +++ /dev/null @@ -1,5 +0,0 @@ -This directory contains all StarlingX charts that need to be built for this -application. Some charts are common across applications. These common charts -reside in the stx-config/kubernetes/helm-charts directory. To include these in -this application update the build_srpm.data file and use the COPY_LIST_TO_TAR -mechanism to populate these common charts. diff --git a/stx-nginx-ingress-controller-helm/stx-nginx-ingress-controller-helm/files/0001-add-toleration-armada.patch b/stx-nginx-ingress-controller-helm/stx-nginx-ingress-controller-helm/files/0001-add-toleration-armada.patch deleted file mode 100644 index 910718b..0000000 --- a/stx-nginx-ingress-controller-helm/stx-nginx-ingress-controller-helm/files/0001-add-toleration-armada.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 6951585d3ee91cf0c7ebcf65fd86293515523875 Mon Sep 17 00:00:00 2001 -From: Sachin Gopala Krishna -Date: Fri, 28 Oct 2022 05:45:20 -0400 -Subject: [PATCH] Add toleration to daemonset - ---- - charts/ingress-nginx/templates/controller-daemonset.yaml | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/charts/ingress-nginx/templates/controller-daemonset.yaml b/charts/ingress-nginx/templates/controller-daemonset.yaml -index 365a3cea7..0fc84dbb2 100644 ---- a/charts/ingress-nginx/templates/controller-daemonset.yaml -+++ b/charts/ingress-nginx/templates/controller-daemonset.yaml -@@ -68,6 +68,13 @@ spec: - value: {{ $value | quote }} - {{- end }} - {{- end }} -+ tolerations: -+ - key: "node-role.kubernetes.io/master" -+ operator: "Exists" -+ effect: "NoSchedule" -+ - key: "node-role.kubernetes.io/control-plane" -+ operator: "Exists" -+ effect: "NoSchedule" - containers: - - name: {{ .Values.controller.containerName }} - {{- with .Values.controller.image }} --- -2.25.1 - diff --git a/stx-nginx-ingress-controller-helm/stx-nginx-ingress-controller-helm/files/index.yaml b/stx-nginx-ingress-controller-helm/stx-nginx-ingress-controller-helm/files/index.yaml deleted file mode 100644 index 36db709..0000000 --- a/stx-nginx-ingress-controller-helm/stx-nginx-ingress-controller-helm/files/index.yaml +++ /dev/null @@ -1,3 +0,0 @@ -apiVersion: v1 -entries: {} -generated: 2019-01-07T12:33:46.098166523-06:00 diff --git a/stx-nginx-ingress-controller-helm/stx-nginx-ingress-controller-helm/files/repositories.yaml b/stx-nginx-ingress-controller-helm/stx-nginx-ingress-controller-helm/files/repositories.yaml deleted file mode 100644 index e613b63..0000000 --- a/stx-nginx-ingress-controller-helm/stx-nginx-ingress-controller-helm/files/repositories.yaml +++ /dev/null @@ -1,12 +0,0 @@ -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: "" - diff --git a/stx-nginx-ingress-controller-helm/stx-nginx-ingress-controller-helm/fluxcd-manifests/ingress-nginx/helmrelease.yaml b/stx-nginx-ingress-controller-helm/stx-nginx-ingress-controller-helm/fluxcd-manifests/ingress-nginx/helmrelease.yaml index ff40652..c6d4014 100644 --- a/stx-nginx-ingress-controller-helm/stx-nginx-ingress-controller-helm/fluxcd-manifests/ingress-nginx/helmrelease.yaml +++ b/stx-nginx-ingress-controller-helm/stx-nginx-ingress-controller-helm/fluxcd-manifests/ingress-nginx/helmrelease.yaml @@ -15,7 +15,7 @@ spec: chart: spec: chart: ingress-nginx - version: 4.8.2 + version: REPLACE_HELM_CHART_VERSION sourceRef: kind: HelmRepository name: stx-platform