diff --git a/packages/core/fluxcd/Makefile b/packages/core/fluxcd/Makefile index 7f1ddacf..9a44bd14 100644 --- a/packages/core/fluxcd/Makefile +++ b/packages/core/fluxcd/Makefile @@ -11,3 +11,10 @@ apply: diff: helm template -n $(NAMESPACE) $(NAME) . --no-hooks --dry-run=server $(API_VERSIONS_FLAGS) | kubectl diff -n $(NAMESPACE) -f- + +update: + rm -rf charts + helm repo add fluxcd-community https://fluxcd-community.github.io/helm-charts + helm repo update fluxcd-community + helm pull fluxcd-community/flux2 --untar --untardir charts + sed -i 's/\.{{ \.Values\.clusterDomain | default "cluster\.local" }}\.//g' `grep -rl '.{{ .Values.clusterDomain | default "cluster.local" }}.' charts` diff --git a/packages/core/fluxcd/charts/flux2/templates/helm-controller.yaml b/packages/core/fluxcd/charts/flux2/templates/helm-controller.yaml index 0811c156..8177c17c 100644 --- a/packages/core/fluxcd/charts/flux2/templates/helm-controller.yaml +++ b/packages/core/fluxcd/charts/flux2/templates/helm-controller.yaml @@ -44,7 +44,7 @@ spec: - --default-service-account={{ .Values.multitenancy.defaultServiceAccount | default "default" }} {{- end}} {{- if .Values.notificationController.create }} - - --events-addr=http://notification-controller.$(RUNTIME_NAMESPACE).svc.{{ .Values.clusterDomain | default "cluster.local" }}. + - --events-addr=http://notification-controller.$(RUNTIME_NAMESPACE).svc {{- end}} - --watch-all-namespaces={{ .Values.watchAllNamespaces }} - --log-level={{ .Values.logLevel | default "info" }} diff --git a/packages/core/fluxcd/charts/flux2/templates/image-automation-controller.yaml b/packages/core/fluxcd/charts/flux2/templates/image-automation-controller.yaml index 47da44d5..40e4da8d 100644 --- a/packages/core/fluxcd/charts/flux2/templates/image-automation-controller.yaml +++ b/packages/core/fluxcd/charts/flux2/templates/image-automation-controller.yaml @@ -43,7 +43,7 @@ spec: - --no-cross-namespace-refs=true {{- end}} {{- if .Values.notificationController.create }} - - --events-addr=http://notification-controller.$(RUNTIME_NAMESPACE).svc.{{ .Values.clusterDomain | default "cluster.local" }}. + - --events-addr=http://notification-controller.$(RUNTIME_NAMESPACE).svc {{- end}} - --watch-all-namespaces={{ .Values.watchAllNamespaces }} - --log-level={{ .Values.logLevel | default "info" }} diff --git a/packages/core/fluxcd/charts/flux2/templates/image-reflector-controller.yaml b/packages/core/fluxcd/charts/flux2/templates/image-reflector-controller.yaml index 58abd295..6be9c3e1 100644 --- a/packages/core/fluxcd/charts/flux2/templates/image-reflector-controller.yaml +++ b/packages/core/fluxcd/charts/flux2/templates/image-reflector-controller.yaml @@ -43,7 +43,7 @@ spec: - --no-cross-namespace-refs=true {{- end}} {{- if .Values.notificationController.create }} - - --events-addr=http://notification-controller.$(RUNTIME_NAMESPACE).svc.{{ .Values.clusterDomain | default "cluster.local" }}. + - --events-addr=http://notification-controller.$(RUNTIME_NAMESPACE).svc {{- end}} - --watch-all-namespaces={{ .Values.watchAllNamespaces }} - --log-level={{ .Values.logLevel | default "info" }} diff --git a/packages/core/fluxcd/charts/flux2/templates/kustomize-controller.yaml b/packages/core/fluxcd/charts/flux2/templates/kustomize-controller.yaml index fff3ed0d..6473dbe0 100644 --- a/packages/core/fluxcd/charts/flux2/templates/kustomize-controller.yaml +++ b/packages/core/fluxcd/charts/flux2/templates/kustomize-controller.yaml @@ -44,7 +44,7 @@ spec: - --default-service-account={{ .Values.multitenancy.defaultServiceAccount | default "default" }} {{- end}} {{- if .Values.notificationController.create }} - - --events-addr=http://notification-controller.$(RUNTIME_NAMESPACE).svc.{{ .Values.clusterDomain | default "cluster.local" }}. + - --events-addr=http://notification-controller.$(RUNTIME_NAMESPACE).svc {{- end}} - --watch-all-namespaces={{ .Values.watchAllNamespaces }} - --log-level={{ .Values.logLevel | default "info" }} diff --git a/packages/core/fluxcd/charts/flux2/templates/source-controller.yaml b/packages/core/fluxcd/charts/flux2/templates/source-controller.yaml index 46c7cfe8..517b54bd 100644 --- a/packages/core/fluxcd/charts/flux2/templates/source-controller.yaml +++ b/packages/core/fluxcd/charts/flux2/templates/source-controller.yaml @@ -38,14 +38,14 @@ spec: containers: - args: {{- if .Values.notificationController.create }} - - --events-addr=http://notification-controller.$(RUNTIME_NAMESPACE).svc.{{ .Values.clusterDomain | default "cluster.local" }}. + - --events-addr=http://notification-controller.$(RUNTIME_NAMESPACE).svc {{- end}} - --watch-all-namespaces={{ .Values.watchAllNamespaces }} - --log-level={{ .Values.logLevel | default "info" }} - --log-encoding=json - --enable-leader-election - --storage-path=/data - - --storage-adv-addr=source-controller.$(RUNTIME_NAMESPACE).svc.{{ .Values.clusterDomain | default "cluster.local" }}. + - --storage-adv-addr=source-controller.$(RUNTIME_NAMESPACE).svc {{- range .Values.sourceController.container.additionalArgs }} - {{ . }} {{- end}} diff --git a/packages/system/dashboard/Makefile b/packages/system/dashboard/Makefile index 7172288b..f7a66c71 100644 --- a/packages/system/dashboard/Makefile +++ b/packages/system/dashboard/Makefile @@ -14,6 +14,7 @@ update-chart: helm pull bitnami/kubeapps --untar --untardir charts rm -rf charts/kubeapps/charts/postgresql/ ln -s ../../images charts/kubeapps/images + sed -i 's/.cluster.local//g' charts/kubeapps/templates/kubeappsapis/deployment.yaml update-dockerfiles: tag=$$(git ls-remote --tags --sort="v:refname" https://github.com/vmware-tanzu/kubeapps | awk -F'[/^]' 'END{print $$3}') && \ diff --git a/packages/system/dashboard/charts/kubeapps/templates/kubeappsapis/deployment.yaml b/packages/system/dashboard/charts/kubeapps/templates/kubeappsapis/deployment.yaml index 61d6e603..5791a2f4 100644 --- a/packages/system/dashboard/charts/kubeapps/templates/kubeappsapis/deployment.yaml +++ b/packages/system/dashboard/charts/kubeapps/templates/kubeappsapis/deployment.yaml @@ -133,7 +133,7 @@ spec: # longer-term pass something to the plugins so that the plugins won't need to # know these details). Currently they're used directly by the flux plugin - name: REDIS_ADDR - value: {{ printf "%s-master.%s.svc.cluster.local:6379" (include "kubeapps.redis.fullname" .) .Release.Namespace }} + value: {{ printf "%s-master.%s.svc:6379" (include "kubeapps.redis.fullname" .) .Release.Namespace }} - name: REDIS_PASSWORD valueFrom: secretKeyRef: