Skip to content

Commit

Permalink
Make customerid optional in CAPI Cluster Helm values
Browse files Browse the repository at this point in the history
Signed-off-by: Archisman <archisman@obmondo.com>
  • Loading branch information
Archisman committed Oct 8, 2024
1 parent 0c78ab7 commit 64f72b7
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions argocd-helm-charts/capi-cluster/templates/provider-aws.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
{{- if (.Values.provider).aws }}

# For non Obmondo users, no customerid is needed.
{{- $name := "aws" }}
{{- $namespace := "capi-cluster" }}

# For obmondo customers.
{{- if .Values.global.customerid }}
{{- $name = printf "%s-%s" $name .Values.global.customerid }}
{{- $namespace = printf "%s-%s" $namespace .Values.global.customerid }}
{{- end }}

apiVersion: operator.cluster.x-k8s.io/v1alpha2
kind: InfrastructureProvider
metadata:
name: aws-{{ .Values.global.customerid }}
namespace: capi-cluster-{{ .Values.global.customerid }}
name: {{ $name }}
namespace: {{ $namespace }}
spec:
configSecret:
name: {{ .Values.aws.secretName }}
namespace: capi-cluster-{{ .Values.global.customerid }}
namespace: {{ $namespace }}
version: {{ .Values.global.capa.version }}
fetchConfig:
url: https://github.com/kubernetes-sigs/cluster-api-provider-aws/releases/{{ .Values.global.capa.version }}/infrastructure-components.yaml
Expand Down

0 comments on commit 64f72b7

Please sign in to comment.