From 1f419fd6534236ba37bb7393e7f7653f2159bd20 Mon Sep 17 00:00:00 2001 From: Lucas Cavalcante Date: Thu, 30 Jun 2022 13:46:26 -0300 Subject: [PATCH] Fix Nginx Controller Helm plugin name collision MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If a Helm plugin from app (X) has the same name as other plugin from a different app (Y), app plugins from X is not installed as there is a plugin with the same name already installed. Internally Sysinv AppOperator has a HashTable and its key is the plugin name, therefore preventing adding plugins with same name. We change nginx plugin name so that other apps with different nginx pĺugins don't collide and prevent the platform from being able to apply/reapply nginx-platfrom-app 001_ingres-nginx -> 0001_ks-ingress-nginx Test Plan: PASS: Apply Nginx together with an app with previous nginx plugin name PASS: Name changed at system overrides, command: system helm-override-show nginx-ingress-controller nginx-ingress-controller kube-system Closes-bug: 1980394 Signed-off-by: Lucas Cavalcante Change-Id: I2a1b663d3867873d024c108d71ee074da1a39a5e --- .../k8sapp_nginx_ingress_controller/common/constants.py | 2 +- .../k8sapp_nginx_ingress_controller/setup.cfg | 2 +- .../fluxcd-manifests/ingress-nginx/helmrelease.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python-k8sapp-nginx-ingress-controller/k8sapp_nginx_ingress_controller/k8sapp_nginx_ingress_controller/common/constants.py b/python-k8sapp-nginx-ingress-controller/k8sapp_nginx_ingress_controller/k8sapp_nginx_ingress_controller/common/constants.py index 07ac3c9..1a7b15d 100644 --- a/python-k8sapp-nginx-ingress-controller/k8sapp_nginx_ingress_controller/k8sapp_nginx_ingress_controller/common/constants.py +++ b/python-k8sapp-nginx-ingress-controller/k8sapp_nginx_ingress_controller/k8sapp_nginx_ingress_controller/common/constants.py @@ -7,6 +7,6 @@ from sysinv.helm import common HELM_NS_NGINX_INGRESS_CONTROLLER = common.HELM_NS_KUBE_SYSTEM -HELM_CHART_INGRESS_NGINX = 'ingress-nginx' +HELM_CHART_INGRESS_NGINX = 'ks-ingress-nginx' HELM_CHART_LEGACY_INGRESS_NGINX = 'nginx-ingress' CHART_GROUP_INGRESS_NGINX = 'nginx-ingress' diff --git a/python-k8sapp-nginx-ingress-controller/k8sapp_nginx_ingress_controller/setup.cfg b/python-k8sapp-nginx-ingress-controller/k8sapp_nginx_ingress_controller/setup.cfg index 4eabf26..8d01509 100644 --- a/python-k8sapp-nginx-ingress-controller/k8sapp_nginx_ingress_controller/setup.cfg +++ b/python-k8sapp-nginx-ingress-controller/k8sapp_nginx_ingress_controller/setup.cfg @@ -33,7 +33,7 @@ systemconfig.helm_applications = nginx-ingress-controller = systemconfig.helm_plugins.nginx_ingress_controller systemconfig.helm_plugins.nginx_ingress_controller = - 001_ingress-nginx = k8sapp_nginx_ingress_controller.helm.ingress_nginx:IngressNginxHelm + 001_ks-ingress-nginx = k8sapp_nginx_ingress_controller.helm.ingress_nginx:IngressNginxHelm systemconfig.armada.manifest_ops = nginx-ingress-controller = k8sapp_nginx_ingress_controller.operator.manifest_nginx:IngressNginxArmadaManifestOperator 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 8970715..490ca66 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 @@ -7,7 +7,7 @@ apiVersion: "helm.toolkit.fluxcd.io/v2beta1" kind: HelmRelease metadata: - name: ingress-nginx + name: ks-ingress-nginx labels: chart_group: ingress-nginx spec: