Update the CRs to enable multiple instance nesting without naming conflicts (#189)

This commit is contained in:
kfox1111
2024-01-24 09:20:18 +01:00
committed by GitHub
parent 4c307c1be1
commit 4a6c705e6a
7 changed files with 9 additions and 5 deletions
@@ -88,6 +88,7 @@ In order to run Tornjak with simple HTTP Connection only, make sure you don't cr
| `image.tag` | Overrides the image tag whose default is the chart appVersion | `""` | | `image.tag` | Overrides the image tag whose default is the chart appVersion | `""` |
| `imagePullSecrets` | Pull secrets for images | `[]` | | `imagePullSecrets` | Pull secrets for images | `[]` |
| `nameOverride` | Name override | `""` | | `nameOverride` | Name override | `""` |
| `crNameOverride` | Name override for any custom resources | `""` |
| `namespaceOverride` | Namespace override | `""` | | `namespaceOverride` | Namespace override | `""` |
| `fullnameOverride` | Fullname override | `""` | | `fullnameOverride` | Fullname override | `""` |
| `serviceAccount.create` | Specifies whether a service account should be created | `true` | | `serviceAccount.create` | Specifies whether a service account should be created | `true` |
@@ -261,6 +261,6 @@ The code below determines what connection type should be used.
{{- if .Values.controllerManager.className }} {{- if .Values.controllerManager.className }}
{{- .Values.controllerManager.className }} {{- .Values.controllerManager.className }}
{{- else }} {{- else }}
{{- .Release.Namespace }}-{{ .Release.Name }} {{- .Release.Namespace }}-{{ default .Release.Name .Values.crNameOverride }}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
@@ -49,7 +49,7 @@ matchLabels:
apiVersion: spire.spiffe.io/v1alpha1 apiVersion: spire.spiffe.io/v1alpha1
kind: ClusterSPIFFEID kind: ClusterSPIFFEID
metadata: metadata:
name: {{ $root.Release.Namespace }}-{{ $root.Release.Name }}-{{ $key }} name: {{ $root.Release.Namespace }}-{{ default $root.Release.Name $root.Values.crNameOverride }}-{{ $key }}
{{- with $value.annotations }} {{- with $value.annotations }}
annotations: annotations:
{{- toYaml . | nindent 4 }} {{- toYaml . | nindent 4 }}
@@ -23,7 +23,7 @@ data:
healthProbeBindAddress: 0.0.0.0:8083 healthProbeBindAddress: 0.0.0.0:8083
leaderElection: leaderElection:
leaderElect: true leaderElect: true
resourceName: {{ .Release.Name | sha256sum | trunc 8 }}.spiffe.io resourceName: {{ printf "%s-%s" .Release.Namespace (default .Release.Name .Values.crNameOverride) | sha256sum | trunc 8 }}.spiffe.io
resourceNamespace: {{ include "spire-server.namespace" . }} resourceNamespace: {{ include "spire-server.namespace" . }}
{{- with .Values.controllerManager.cacheNamespaces }} {{- with .Values.controllerManager.cacheNamespaces }}
cacheNamespaces: cacheNamespaces:
@@ -16,7 +16,7 @@
apiVersion: spire.spiffe.io/v1alpha1 apiVersion: spire.spiffe.io/v1alpha1
kind: ClusterFederatedTrustDomain kind: ClusterFederatedTrustDomain
metadata: metadata:
name: {{ $root.Release.Namespace }}-{{ $root.Release.Name }}-{{ $key }} name: {{ $root.Release.Namespace }}-{{ default $root.Release.Name $root.Values.crNameOverride }}-{{ $key }}
{{- with $value.annotations }} {{- with $value.annotations }}
annotations: annotations:
{{- toYaml . | nindent 4 }} {{- toYaml . | nindent 4 }}
@@ -16,7 +16,7 @@
apiVersion: spire.spiffe.io/v1alpha1 apiVersion: spire.spiffe.io/v1alpha1
kind: ClusterStaticEntry kind: ClusterStaticEntry
metadata: metadata:
name: {{ $root.Release.Namespace }}-{{ $root.Release.Name }}-{{ $key }} name: {{ $root.Release.Namespace }}-{{ default $root.Release.Name $root.Values.crNameOverride }}-{{ $key }}
{{- with $value.annotations }} {{- with $value.annotations }}
annotations: annotations:
{{- toYaml . | nindent 4 }} {{- toYaml . | nindent 4 }}
@@ -26,6 +26,9 @@ imagePullSecrets: []
## @param nameOverride Name override ## @param nameOverride Name override
nameOverride: "" nameOverride: ""
## @param crNameOverride Name override for any custom resources
crNameOverride: ""
## @param namespaceOverride Namespace override ## @param namespaceOverride Namespace override
namespaceOverride: "" namespaceOverride: ""