mirror of
https://github.com/nais/wonderwall.git
synced 2026-08-23 21:16:14 +00:00
chart: add resourceSuffix value
Hack for resources that may conflict in parallel environments.
This commit is contained in:
@@ -110,3 +110,7 @@ values:
|
||||
type: string
|
||||
ignoreKind:
|
||||
- legacy
|
||||
resourceSuffix:
|
||||
description: Suffix for resources that may conflict in parallel environments.
|
||||
config:
|
||||
type: string
|
||||
|
||||
@@ -121,7 +121,13 @@ Aiven instance name.
|
||||
The last part of the fully qualified name (e.g. <instance> in `redis-<namespace>-<instance>`)
|
||||
*/}}
|
||||
{{- define "aiven.instanceName" -}}
|
||||
{{- printf "wonderwall-%s" . }}
|
||||
{{- $root := .root }}
|
||||
{{- $provider := .provider }}
|
||||
{{- if $root.Values.resourceSuffix }}
|
||||
{{- printf "wonderwall-%s-%s" $provider $root.Values.resourceSuffix }}
|
||||
{{- else }}
|
||||
{{- printf "wonderwall-%s" $provider }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
@@ -134,7 +140,7 @@ Expects a dict with the following keys:
|
||||
{{- define "aiven.redisName" -}}
|
||||
{{- $root := .root }}
|
||||
{{- $provider := .provider }}
|
||||
{{- printf "redis-%s-%s" $root.Release.Namespace (include "aiven.instanceName" $provider) }}
|
||||
{{- printf "redis-%s-%s" $root.Release.Namespace (include "aiven.instanceName" (dict "provider" $provider "root" $root)) }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
@@ -147,5 +153,5 @@ Expects a dict with the following keys:
|
||||
{{- define "aiven.serviceintegrationName" -}}
|
||||
{{- $root := .root }}
|
||||
{{- $provider := .provider }}
|
||||
{{- printf "serviceintegration-%s-%s" $root.Release.Namespace (include "aiven.instanceName" $provider) }}
|
||||
{{- printf "serviceintegration-%s-%s" $root.Release.Namespace (include "aiven.instanceName" (dict "provider" $provider "root" $root)) }}
|
||||
{{- end }}
|
||||
|
||||
@@ -65,7 +65,7 @@ Expects a dict as input with the following keys:
|
||||
{{- $provider := .provider }}
|
||||
{{- $access := .access }}
|
||||
{{- $secretName := .secretName -}}
|
||||
{{- $instance := include "aiven.instanceName" $provider }}
|
||||
{{- $instance := include "aiven.instanceName" (dict "provider" $provider "root" $root) }}
|
||||
---
|
||||
apiVersion: aiven.nais.io/v1
|
||||
kind: AivenApplication
|
||||
|
||||
@@ -3,7 +3,11 @@
|
||||
apiVersion: nais.io/v1
|
||||
kind: AzureAdApplication
|
||||
metadata:
|
||||
{{- if .Values.resourceSuffix }}
|
||||
name: {{ include "wonderwall.fullname" . }}-fa-{{ .Values.resourceSuffix }}
|
||||
{{- else }}
|
||||
name: {{ include "wonderwall.fullname" . }}-fa
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "wonderwall.labelsForwardAuth" . | nindent 4 }}
|
||||
spec:
|
||||
|
||||
@@ -70,6 +70,7 @@ resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 64Mi
|
||||
resourceSuffix: ""
|
||||
podDisruptionBudget:
|
||||
maxUnavailable: 1
|
||||
otel:
|
||||
|
||||
Reference in New Issue
Block a user