Skip to content

Commit

Permalink
Feature/add support to kfd 1 28 0 (#499)
Browse files Browse the repository at this point in the history
* chore: enable symlinks copy + bump compatibility

* feat: add onprem upgrade paths for 1.26, 1.27, 1.28

* feat: add upgrade paths also for kfddistribution and ekscluster

* chore: add new tfvar file for previous versions

* chore: bump kfd and furyctl version

* fix: add missing version in compat matrix

* feat: add tests to new kfd versions

* fix: compatibility check for 1.28.0

* fix: compatibility check for 1.27.5 1.26.6

* docs: add an universal upgrade guide

* chore: bump go dep of kfd 1.28.0

---------

Co-authored-by: Samuele Chiocca <[email protected]>
  • Loading branch information
Al-Pragliola and nutellinoit authored Apr 12, 2024
1 parent fe59f50 commit c3c3eef
Show file tree
Hide file tree
Showing 73 changed files with 2,773 additions and 670 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<!-- FIXME: UPDATE THE BUILD BADGE WITH THE RIGHT BRANCH -->

[![Build Status](https://ci.sighup.io/api/badges/sighupio/furyctl/status.svg)](https://ci.sighup.io/sighupio/furyctl)
![Release](https://img.shields.io/badge/furyctl-v0.27.8-blue)
![Release](https://img.shields.io/badge/furyctl-v0.28.0-blue)
![Slack](https://img.shields.io/badge/slack-@kubernetes/fury-yellow.svg?logo=slack)
![License](https://img.shields.io/github/license/sighupio/furyctl)
[![Go Report Card](https://goreportcard.com/badge/github.com/sighupio/furyctl)](https://goreportcard.com/report/github.com/sighupio/furyctl)
Expand Down Expand Up @@ -80,7 +80,7 @@ $ furyctl version
...
goVersion: go1.22
osArch: amd64
version: 0.27.8
version: 0.28.0
```

### Installing from source
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,130 +82,130 @@ eks_map_roles = {{ toPrettyJson $roles | join "," }}
{{- $nodePools := list }}

{{- range $np := .spec.kubernetes.nodePools }}
{{- $currNodePool := dict "name" $np.name "version" nil "min_size" $np.size.min "max_size" $np.size.max "instance_type" $np.instance.type "spot" false "volume_size" 35 "subnets" nil "additional_firewall_rules" nil "labels" nil "taints" nil "tags" nil }}
{{- $currNodePool := dict "name" $np.name "version" nil "min_size" $np.size.min "max_size" $np.size.max "instance_type" $np.instance.type "spot_instance" false "volume_size" 35 "subnets" nil "additional_firewall_rules" nil "labels" nil "taints" nil "tags" nil }}

{{- if hasKeyAny $np "type" }}
{{- $currNodePool = merge $currNodePool (dict "type" $np.type) }}
{{- $currNodePool = mergeOverwrite $currNodePool (dict "type" $np.type) }}
{{- end}}

{{- if hasKeyAny $np "ami" }}
{{- $currNodePool = merge $currNodePool (dict "ami_id" $np.ami.id) }}
{{- $currNodePool = mergeOverwrite $currNodePool (dict "ami_id" $np.ami.id) }}
{{- end }}

{{- if hasKeyAny $np.instance "spot" }}
{{- $currNodePool = merge $currNodePool (dict "spot" $np.instance.spot) }}
{{- $currNodePool = mergeOverwrite $currNodePool (dict "spot_instance" $np.instance.spot) }}
{{- end }}

{{- if hasKeyAny $np "containerRuntime" }}
{{- $currNodePool = merge $currNodePool (dict "container_runtime" $np.containerRuntime) }}
{{- $currNodePool = mergeOverwrite $currNodePool (dict "container_runtime" $np.containerRuntime) }}
{{- end }}

{{- if hasKeyAny $np.instance "maxPods" }}
{{- $currNodePool = merge $currNodePool (dict "max_pods" $np.instance.maxPods) }}
{{- $currNodePool = mergeOverwrite $currNodePool (dict "max_pods" $np.instance.maxPods) }}
{{- end }}

{{- if hasKeyAny $np.instance "volumeSize" }}
{{- $currNodePool = merge $currNodePool (dict "volume_size" $np.instance.volumeSize) }}
{{- $currNodePool = mergeOverwrite $currNodePool (dict "volume_size" $np.instance.volumeSize) }}
{{- end }}

{{- if and (hasKeyAny $np "subnetIds") (gt (len $np.subnetIds) 0) }}
{{- $currNodePool = merge $currNodePool (dict "subnets" $np.subnetIds) }}
{{- $currNodePool = mergeOverwrite $currNodePool (dict "subnets" $np.subnetIds) }}
{{- end }}

{{- if hasKeyAny $np "additionalFirewallRules" }}
{{- $additionalFirewallRules := dict }}

{{- if and (hasKeyAny $np.additionalFirewallRules "cidrBlocks") (gt (len $np.additionalFirewallRules.cidrBlocks) 0)}}
{{- $cidrBlocks := list }}

{{- range $c := $np.additionalFirewallRules.cidrBlocks }}
{{- $currCidrBlock := dict "description" $c.name "type" $c.type "protocol" $c.protocol "from_port" $c.ports.from "to_port" $c.ports.to "tags" (dict) "cidr_blocks" ($c.cidrBlocks | uniq) }}

{{- if hasKeyAny $c "tags" }}
{{- $tags := dict }}

{{- range $k, $v := $c.tags }}
{{- $tags = merge $tags (dict $k $v) }}
{{- $tags = mergeOverwrite $tags (dict $k $v) }}
{{- end }}

{{- $currCidrBlock = merge $currCidrBlock (dict "tags" $tags) }}
{{- $currCidrBlock = mergeOverwrite $currCidrBlock (dict "tags" $tags) }}
{{- end }}

{{- $cidrBlocks = append $cidrBlocks $currCidrBlock }}
{{- end }}

{{- $additionalFirewallRules = merge $additionalFirewallRules (dict "cidr_blocks" $cidrBlocks) }}
{{- $additionalFirewallRules = mergeOverwrite $additionalFirewallRules (dict "cidr_blocks" $cidrBlocks) }}
{{- end }}

{{- if and (hasKeyAny $np.additionalFirewallRules "sourceSecurityGroupId") (gt (len $np.additionalFirewallRules.sourceSecurityGroupId) 0)}}
{{- $sourceSecurityGroupId := list }}

{{- range $s := $np.additionalFirewallRules.sourceSecurityGroupId }}
{{- $currSourceSecurityGroupId := dict "description" $s.name "type" $s.type "protocol" $s.protocol "from_port" $s.ports.from "to_port" $s.ports.to "tags" (dict) "source_security_group_id" $s.sourceSecurityGroupId }}

{{- if hasKeyAny $s "tags" }}
{{- $tags := dict }}

{{- range $k, $v := $s.tags }}
{{- $tags = merge $tags (dict $k $v) }}
{{- $tags = mergeOverwrite $tags (dict $k $v) }}
{{- end }}

{{- $currSourceSecurityGroupId = merge $currSourceSecurityGroupId (dict "tags" $tags) }}
{{- $currSourceSecurityGroupId = mergeOverwrite $currSourceSecurityGroupId (dict "tags" $tags) }}
{{- end }}

{{- $sourceSecurityGroupId = append $sourceSecurityGroupId $currSourceSecurityGroupId }}
{{- end }}

{{- $additionalFirewallRules = merge $additionalFirewallRules (dict "source_security_group_id" $sourceSecurityGroupId) }}
{{- $additionalFirewallRules = mergeOverwrite $additionalFirewallRules (dict "source_security_group_id" $sourceSecurityGroupId) }}
{{- end }}

{{- if and (hasKeyAny $np.additionalFirewallRules "self") (gt (len $np.additionalFirewallRules.self) 0)}}
{{- $self := list }}

{{- range $s := $np.additionalFirewallRules.self }}
{{- $currSelf := dict "description" $s.name "type" $s.type "protocol" $s.protocol "from_port" $s.ports.from "to_port" $s.ports.to "tags" (dict) "self" $s.self }}

{{- if hasKeyAny $s "tags" }}
{{- $tags := dict }}

{{- range $k, $v := $s.tags }}
{{- $tags = merge $tags (dict $k $v) }}
{{- $tags = mergeOverwrite $tags (dict $k $v) }}
{{- end }}

{{- $currSelf = merge $currSelf (dict "tags" $tags) }}
{{- $currSelf = mergeOverwrite $currSelf (dict "tags" $tags) }}
{{- end }}

{{- $self = append $self $currSelf }}
{{- end }}

{{- $additionalFirewallRules = merge $additionalFirewallRules (dict "self" $self) }}
{{- $additionalFirewallRules = mergeOverwrite $additionalFirewallRules (dict "self" $self) }}
{{- end }}

{{- $currNodePool = merge $currNodePool (dict "additional_firewall_rules" $additionalFirewallRules) }}
{{- $currNodePool = mergeOverwrite $currNodePool (dict "additional_firewall_rules" $additionalFirewallRules) }}
{{- end }}

{{- if and (hasKeyAny $np "labels") (gt (len $np.labels) 0) }}
{{- $labels := dict }}

{{- range $k, $v := $np.labels }}
{{- $labels = merge $labels (dict $k $v) }}
{{- $labels = mergeOverwrite $labels (dict $k $v) }}
{{- end }}

{{- $currNodePool = merge $currNodePool (dict "labels" $labels) }}
{{- $currNodePool = mergeOverwrite $currNodePool (dict "labels" $labels) }}
{{- end }}

{{- if and (hasKeyAny $np "taints") (gt (len $np.taints) 0) }}
{{- $currNodePool = merge $currNodePool (dict "taints" $np.taints) }}
{{- $currNodePool = mergeOverwrite $currNodePool (dict "taints" $np.taints) }}
{{- end }}

{{- if and (hasKeyAny $np "tags") (gt (len $np.tags) 0) }}
{{- $tags := dict }}

{{- range $k, $v := $np.tags }}
{{- $tags = merge $tags (dict $k $v) }}
{{- $tags = mergeOverwrite $tags (dict $k $v) }}
{{- end }}

{{- $currNodePool = merge $currNodePool (dict "tags" $tags) }}
{{- $currNodePool = mergeOverwrite $currNodePool (dict "tags" $tags) }}
{{- end }}

{{- $nodePools = append $nodePools $currNodePool }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,130 +82,130 @@ eks_map_roles = {{ toPrettyJson $roles | join "," }}
{{- $nodePools := list }}

{{- range $np := .spec.kubernetes.nodePools }}
{{- $currNodePool := dict "name" $np.name "version" nil "min_size" $np.size.min "max_size" $np.size.max "instance_type" $np.instance.type "spot" false "volume_size" 35 "subnets" nil "additional_firewall_rules" nil "labels" nil "taints" nil "tags" nil }}
{{- $currNodePool := dict "name" $np.name "version" nil "min_size" $np.size.min "max_size" $np.size.max "instance_type" $np.instance.type "spot_instance" false "volume_size" 35 "subnets" nil "additional_firewall_rules" nil "labels" nil "taints" nil "tags" nil }}

{{- if hasKeyAny $np "type" }}
{{- $currNodePool = merge $currNodePool (dict "type" $np.type) }}
{{- $currNodePool = mergeOverwrite $currNodePool (dict "type" $np.type) }}
{{- end}}

{{- if hasKeyAny $np "ami" }}
{{- $currNodePool = merge $currNodePool (dict "ami_id" $np.ami.id) }}
{{- $currNodePool = mergeOverwrite $currNodePool (dict "ami_id" $np.ami.id) }}
{{- end }}

{{- if hasKeyAny $np.instance "spot" }}
{{- $currNodePool = merge $currNodePool (dict "spot" $np.instance.spot) }}
{{- $currNodePool = mergeOverwrite $currNodePool (dict "spot_instance" $np.instance.spot) }}
{{- end }}

{{- if hasKeyAny $np "containerRuntime" }}
{{- $currNodePool = merge $currNodePool (dict "container_runtime" $np.containerRuntime) }}
{{- $currNodePool = mergeOverwrite $currNodePool (dict "container_runtime" $np.containerRuntime) }}
{{- end }}

{{- if hasKeyAny $np.instance "maxPods" }}
{{- $currNodePool = merge $currNodePool (dict "max_pods" $np.instance.maxPods) }}
{{- $currNodePool = mergeOverwrite $currNodePool (dict "max_pods" $np.instance.maxPods) }}
{{- end }}

{{- if hasKeyAny $np.instance "volumeSize" }}
{{- $currNodePool = merge $currNodePool (dict "volume_size" $np.instance.volumeSize) }}
{{- $currNodePool = mergeOverwrite $currNodePool (dict "volume_size" $np.instance.volumeSize) }}
{{- end }}

{{- if and (hasKeyAny $np "subnetIds") (gt (len $np.subnetIds) 0) }}
{{- $currNodePool = merge $currNodePool (dict "subnets" $np.subnetIds) }}
{{- $currNodePool = mergeOverwrite $currNodePool (dict "subnets" $np.subnetIds) }}
{{- end }}

{{- if hasKeyAny $np "additionalFirewallRules" }}
{{- $additionalFirewallRules := dict }}

{{- if and (hasKeyAny $np.additionalFirewallRules "cidrBlocks") (gt (len $np.additionalFirewallRules.cidrBlocks) 0)}}
{{- $cidrBlocks := list }}

{{- range $c := $np.additionalFirewallRules.cidrBlocks }}
{{- $currCidrBlock := dict "description" $c.name "type" $c.type "protocol" $c.protocol "from_port" $c.ports.from "to_port" $c.ports.to "tags" (dict) "cidr_blocks" ($c.cidrBlocks | uniq) }}

{{- if hasKeyAny $c "tags" }}
{{- $tags := dict }}

{{- range $k, $v := $c.tags }}
{{- $tags = merge $tags (dict $k $v) }}
{{- $tags = mergeOverwrite $tags (dict $k $v) }}
{{- end }}

{{- $currCidrBlock = merge $currCidrBlock (dict "tags" $tags) }}
{{- $currCidrBlock = mergeOverwrite $currCidrBlock (dict "tags" $tags) }}
{{- end }}

{{- $cidrBlocks = append $cidrBlocks $currCidrBlock }}
{{- end }}

{{- $additionalFirewallRules = merge $additionalFirewallRules (dict "cidr_blocks" $cidrBlocks) }}
{{- $additionalFirewallRules = mergeOverwrite $additionalFirewallRules (dict "cidr_blocks" $cidrBlocks) }}
{{- end }}

{{- if and (hasKeyAny $np.additionalFirewallRules "sourceSecurityGroupId") (gt (len $np.additionalFirewallRules.sourceSecurityGroupId) 0)}}
{{- $sourceSecurityGroupId := list }}

{{- range $s := $np.additionalFirewallRules.sourceSecurityGroupId }}
{{- $currSourceSecurityGroupId := dict "description" $s.name "type" $s.type "protocol" $s.protocol "from_port" $s.ports.from "to_port" $s.ports.to "tags" (dict) "source_security_group_id" $s.sourceSecurityGroupId }}

{{- if hasKeyAny $s "tags" }}
{{- $tags := dict }}

{{- range $k, $v := $s.tags }}
{{- $tags = merge $tags (dict $k $v) }}
{{- $tags = mergeOverwrite $tags (dict $k $v) }}
{{- end }}

{{- $currSourceSecurityGroupId = merge $currSourceSecurityGroupId (dict "tags" $tags) }}
{{- $currSourceSecurityGroupId = mergeOverwrite $currSourceSecurityGroupId (dict "tags" $tags) }}
{{- end }}

{{- $sourceSecurityGroupId = append $sourceSecurityGroupId $currSourceSecurityGroupId }}
{{- end }}

{{- $additionalFirewallRules = merge $additionalFirewallRules (dict "source_security_group_id" $sourceSecurityGroupId) }}
{{- $additionalFirewallRules = mergeOverwrite $additionalFirewallRules (dict "source_security_group_id" $sourceSecurityGroupId) }}
{{- end }}

{{- if and (hasKeyAny $np.additionalFirewallRules "self") (gt (len $np.additionalFirewallRules.self) 0)}}
{{- $self := list }}

{{- range $s := $np.additionalFirewallRules.self }}
{{- $currSelf := dict "description" $s.name "type" $s.type "protocol" $s.protocol "from_port" $s.ports.from "to_port" $s.ports.to "tags" (dict) "self" $s.self }}

{{- if hasKeyAny $s "tags" }}
{{- $tags := dict }}

{{- range $k, $v := $s.tags }}
{{- $tags = merge $tags (dict $k $v) }}
{{- $tags = mergeOverwrite $tags (dict $k $v) }}
{{- end }}

{{- $currSelf = merge $currSelf (dict "tags" $tags) }}
{{- $currSelf = mergeOverwrite $currSelf (dict "tags" $tags) }}
{{- end }}

{{- $self = append $self $currSelf }}
{{- end }}

{{- $additionalFirewallRules = merge $additionalFirewallRules (dict "self" $self) }}
{{- $additionalFirewallRules = mergeOverwrite $additionalFirewallRules (dict "self" $self) }}
{{- end }}

{{- $currNodePool = merge $currNodePool (dict "additional_firewall_rules" $additionalFirewallRules) }}
{{- $currNodePool = mergeOverwrite $currNodePool (dict "additional_firewall_rules" $additionalFirewallRules) }}
{{- end }}

{{- if and (hasKeyAny $np "labels") (gt (len $np.labels) 0) }}
{{- $labels := dict }}

{{- range $k, $v := $np.labels }}
{{- $labels = merge $labels (dict $k $v) }}
{{- $labels = mergeOverwrite $labels (dict $k $v) }}
{{- end }}

{{- $currNodePool = merge $currNodePool (dict "labels" $labels) }}
{{- $currNodePool = mergeOverwrite $currNodePool (dict "labels" $labels) }}
{{- end }}

{{- if and (hasKeyAny $np "taints") (gt (len $np.taints) 0) }}
{{- $currNodePool = merge $currNodePool (dict "taints" $np.taints) }}
{{- $currNodePool = mergeOverwrite $currNodePool (dict "taints" $np.taints) }}
{{- end }}

{{- if and (hasKeyAny $np "tags") (gt (len $np.tags) 0) }}
{{- $tags := dict }}

{{- range $k, $v := $np.tags }}
{{- $tags = merge $tags (dict $k $v) }}
{{- $tags = mergeOverwrite $tags (dict $k $v) }}
{{- end }}

{{- $currNodePool = merge $currNodePool (dict "tags" $tags) }}
{{- $currNodePool = mergeOverwrite $currNodePool (dict "tags" $tags) }}
{{- end }}

{{- $nodePools = append $nodePools $currNodePool }}
Expand Down
Loading

0 comments on commit c3c3eef

Please sign in to comment.