Skip to content

Commit

Permalink
Update md template to handle cluster upgrades with autoscaling config…
Browse files Browse the repository at this point in the history
…ured
  • Loading branch information
sp1999 authored and eks-distro-pr-bot committed Jun 11, 2024
1 parent 85c9588 commit 23e0c5f
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 8 deletions.
4 changes: 3 additions & 1 deletion pkg/providers/cloudstack/config/template-md.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,16 @@ metadata:
cluster.x-k8s.io/cluster-name: {{.clusterName}}
name: {{.workerNodeGroupName}}
namespace: {{.eksaSystemNamespace}}
{{- if .autoscalingConfig }}
{{- if .autoscalingConfig }}
annotations:
cluster.x-k8s.io/cluster-api-autoscaler-node-group-min-size: "{{ .autoscalingConfig.MinCount }}"
cluster.x-k8s.io/cluster-api-autoscaler-node-group-max-size: "{{ .autoscalingConfig.MaxCount }}"
{{- end }}
spec:
clusterName: {{.clusterName}}
{{- if not .autoscalingConfig }}
replicas: {{.workerReplicas}}
{{- end }}
selector:
matchLabels: {}
template:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ metadata:
cluster.x-k8s.io/cluster-api-autoscaler-node-group-max-size: "5"
spec:
clusterName: test
replicas: 3
selector:
matchLabels: {}
template:
Expand Down
2 changes: 2 additions & 0 deletions pkg/providers/docker/config/template-md.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ metadata:
{{- end }}
spec:
clusterName: {{.clusterName}}
{{- if not .autoscalingConfig }}
replicas: {{.workerReplicas}}
{{- end }}
selector:
matchLabels: null
template:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ metadata:
cluster.x-k8s.io/cluster-api-autoscaler-node-group-max-size: "5"
spec:
clusterName: test-cluster
replicas: 3
selector:
matchLabels: null
template:
Expand Down
6 changes: 4 additions & 2 deletions pkg/providers/nutanix/config/md-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ metadata:
cluster.x-k8s.io/cluster-name: "{{.clusterName}}"
name: "{{.workerNodeGroupName}}"
namespace: "{{.eksaSystemNamespace}}"
{{- if .autoscalingConfig }}
{{- if .autoscalingConfig }}
annotations:
cluster.x-k8s.io/cluster-api-autoscaler-node-group-min-size: "{{ .autoscalingConfig.MinCount }}"
cluster.x-k8s.io/cluster-api-autoscaler-node-group-max-size: "{{ .autoscalingConfig.MaxCount }}"
{{- end }}
{{- end }}
spec:
clusterName: "{{.clusterName}}"
{{- if not .autoscalingConfig }}
replicas: {{.workerReplicas}}
{{- end }}
selector:
matchLabels: {}
template:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ metadata:
cluster.x-k8s.io/cluster-api-autoscaler-node-group-max-size: "5"
spec:
clusterName: "eksa-unit-test"
replicas: 3
selector:
matchLabels: {}
template:
Expand Down
2 changes: 2 additions & 0 deletions pkg/providers/tinkerbell/config/template-md.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ metadata:
{{- end }}
spec:
clusterName: {{.clusterName}}
{{- if not .autoscalingConfig }}
replicas: {{.workerReplicas}}
{{- end }}
selector:
matchLabels: {}
template:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ metadata:
cluster.x-k8s.io/cluster-api-autoscaler-node-group-max-size: "5"
spec:
clusterName: test
replicas: 1
selector:
matchLabels: {}
template:
Expand Down
2 changes: 2 additions & 0 deletions pkg/providers/vsphere/config/template-md.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ metadata:
{{- end }}
spec:
clusterName: {{.clusterName}}
{{- if not .autoscalingConfig }}
replicas: {{.workerReplicas}}
{{- end }}
selector:
matchLabels: {}
template:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ metadata:
cluster.x-k8s.io/cluster-api-autoscaler-node-group-max-size: "5"
spec:
clusterName: test
replicas: 3
selector:
matchLabels: {}
template:
Expand Down

0 comments on commit 23e0c5f

Please sign in to comment.