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 | `""` |
| `imagePullSecrets` | Pull secrets for images | `[]` |
| `nameOverride` | Name override | `""` |
| `crNameOverride` | Name override for any custom resources | `""` |
| `namespaceOverride` | Namespace override | `""` |
| `fullnameOverride` | Fullname override | `""` |
| `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 }}
{{- .Values.controllerManager.className }}
{{- else }}
{{- .Release.Namespace }}-{{ .Release.Name }}
{{- .Release.Namespace }}-{{ default .Release.Name .Values.crNameOverride }}
{{- end -}}
{{- end -}}
@@ -49,7 +49,7 @@ matchLabels:
apiVersion: spire.spiffe.io/v1alpha1
kind: ClusterSPIFFEID
metadata:
name: {{ $root.Release.Namespace }}-{{ $root.Release.Name }}-{{ $key }}
name: {{ $root.Release.Namespace }}-{{ default $root.Release.Name $root.Values.crNameOverride }}-{{ $key }}
{{- with $value.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
@@ -23,7 +23,7 @@ data:
healthProbeBindAddress: 0.0.0.0:8083
leaderElection:
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" . }}
{{- with .Values.controllerManager.cacheNamespaces }}
cacheNamespaces:
@@ -16,7 +16,7 @@
apiVersion: spire.spiffe.io/v1alpha1
kind: ClusterFederatedTrustDomain
metadata:
name: {{ $root.Release.Namespace }}-{{ $root.Release.Name }}-{{ $key }}
name: {{ $root.Release.Namespace }}-{{ default $root.Release.Name $root.Values.crNameOverride }}-{{ $key }}
{{- with $value.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
@@ -16,7 +16,7 @@
apiVersion: spire.spiffe.io/v1alpha1
kind: ClusterStaticEntry
metadata:
name: {{ $root.Release.Namespace }}-{{ $root.Release.Name }}-{{ $key }}
name: {{ $root.Release.Namespace }}-{{ default $root.Release.Name $root.Values.crNameOverride }}-{{ $key }}
{{- with $value.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
@@ -26,6 +26,9 @@ imagePullSecrets: []
## @param nameOverride Name override
nameOverride: ""
## @param crNameOverride Name override for any custom resources
crNameOverride: ""
## @param namespaceOverride Namespace override
namespaceOverride: ""