From c8d679480052657210cfde6ff8b8a857745fae7a Mon Sep 17 00:00:00 2001 From: mershad-manesh <105240903+mershad-manesh@users.noreply.github.com> Date: Tue, 28 Nov 2023 14:26:34 -0500 Subject: [PATCH] Fixing a small number of bugs (#50) * bug fixes * bug fixes --- horizon/Chart.yaml | 2 +- horizon/templates/docker.secret.yaml | 3 ++- horizon/templates/opennms-core.clusterrole.yaml | 2 +- horizon/templates/opennms-core.clusterrolebinding.yaml | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/horizon/Chart.yaml b/horizon/Chart.yaml index bb936c7..1cf75a8 100644 --- a/horizon/Chart.yaml +++ b/horizon/Chart.yaml @@ -17,7 +17,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 1.1.6 +version: 1.1.7 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/horizon/templates/docker.secret.yaml b/horizon/templates/docker.secret.yaml index f6206f7..fde4b2d 100644 --- a/horizon/templates/docker.secret.yaml +++ b/horizon/templates/docker.secret.yaml @@ -1,4 +1,5 @@ # ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ +{{- $namespace := include "namespace" . }} {{- range $k, $r := .Values.imagePullSecrets }} # TODO: find a better way to format this JSON that won't be sensitive to special characters {{- $json := printf "{\"auths\":{\"%s\":{\"username\":\"%s\",\"password\":\"%s\",\"email\":\"%s\",\"auth\":\"%s\"}}}" $r.dockerServer $r.dockerUsername $r.dockerPassword $r.dockerEmail (printf "%s:%s" $r.dockerUsername $r.dockerPassword | b64enc) }} @@ -8,7 +9,7 @@ kind: Secret type: kubernetes.io/dockerconfigjson metadata: name: {{ $r.name }} - namespace: {{ include "grafana.namespace" . }} + namespace: {{ $namespace }} data: .dockerconfigjson: {{ $json | b64enc }} {{- end }} diff --git a/horizon/templates/opennms-core.clusterrole.yaml b/horizon/templates/opennms-core.clusterrole.yaml index 60756b4..8510abe 100644 --- a/horizon/templates/opennms-core.clusterrole.yaml +++ b/horizon/templates/opennms-core.clusterrole.yaml @@ -1,4 +1,4 @@ -{{- if and (eq (include "onOpenShift" .) "true") (.Values.dependencies.clusterRoleBinding) }} +{{- if and (eq (include "onOpenShift" .) "true") (.Values.dependencies.clusterRole) }} kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: diff --git a/horizon/templates/opennms-core.clusterrolebinding.yaml b/horizon/templates/opennms-core.clusterrolebinding.yaml index 38b7a56..35fc0e9 100644 --- a/horizon/templates/opennms-core.clusterrolebinding.yaml +++ b/horizon/templates/opennms-core.clusterrolebinding.yaml @@ -1,4 +1,4 @@ -{{- if and (eq (include "onOpenShift" .) "true") (.Values.dependencies.clusterRole) }} +{{- if and (eq (include "onOpenShift" .) "true") (.Values.dependencies.clusterRoleBinding) }} kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: