Skip to content

Commit

Permalink
fixed machineDeployment SystemManagedMachiePool
Browse files Browse the repository at this point in the history
Signed-off-by: Devesh Sharma <devesh@obmondo.com>
  • Loading branch information
Devesh Sharma committed Aug 29, 2024
1 parent ea3df45 commit 5a1ce66
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if .Values.selfManagedCluster.enabled }}
{{- $global := . }} # Capture the global context
{{- $global := . }}
{{- range $index, $element := until 3 }}
apiVersion: cluster.x-k8s.io/v1beta1
kind: MachineDeployment
Expand Down
Original file line number Diff line number Diff line change
@@ -1,32 +1,33 @@
{{- if .Values.selfManagedCluster.enabled }}
{{- $global := . }}
{{- $pools := list "vmu" "vmus" }}
{{- range $index, $pool := $pools }}
apiVersion: cluster.x-k8s.io/v1beta1
kind: MachinePool
metadata:
labels:
cluster.x-k8s.io/cluster-name: {{ .Values.global.clusterName }}
name: {{ .Values.global.clusterName }}-{{ $pool }}-0
namespace: {{ .Release.Namespace }}
cluster.x-k8s.io/cluster-name: {{ $global.Values.global.clusterName }}
name: {{ $global.Values.global.clusterName }}-{{ $pool }}-0
namespace: {{ $global.Release.Namespace }}
spec:
clusterName: {{ .Values.global.clusterName }}
clusterName: {{ $global.Values.global.clusterName }}
failureDomains:
- "1"
- "3"
replicas: 3
template:
spec:
clusterName: {{ .Values.global.clusterName }}
clusterName: {{ $global.Values.global.clusterName }}
bootstrap:
configRef:
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
kind: KubeadmConfigTemplate
name: {{ .Values.global.clusterName }}-md-0
clusterName: {{ .Values.global.clusterName }}
name: {{ $global.Values.global.clusterName }}-md-0
clusterName: {{ $global.Values.global.clusterName }}
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: AzureMachinePool
name: spool1
version: {{ .Values.global.kubernetes.version }}
version: {{ $global.Values.global.kubernetes.version }}
{{- end }}
{{- end }}

0 comments on commit 5a1ce66

Please sign in to comment.