rancher / tf-rancher-up

MIT License
14 stars 5 forks source link

Review of AWS RKE2 recipe #161

Open glovecchi0 opened 1 month ago

glovecchi0 commented 1 month ago

Division of the PR #145

To test It: recipes/upstream/aws/rke2/terraform.tfvars

prefix           = "glovecchio"
aws_region       = "eu-west-1"
instance_count   = 2
ssh_username     = "ubuntu"
rancher_hostname = "glovecchio"
rancher_password = "Mypassword.1234"
suryaboorlu commented 2 weeks ago

@glovecchi0 Initially I ran into the below error: ╷ │ Error: chart requires kubeVersion: < 1.29.0-0 which is incompatible with Kubernetes v1.30.4+rke2r1 │ │ with module.rancher_install.helm_release.rancher, │ on ../../../../modules/rancher/main.tf line 118, in resource "helm_release" "rancher": │ 118: resource "helm_release" "rancher" { │

Figured out that if we run the aws RKE2 recipe, RKE2 version will be the latest which will be v1.30.4+rke2r1 and then the rancher helm chart will fail to install as the rancher repo which we provided in the rancher module's main.tf is pointing to stable release where as the rancher version 2.9.1 which supports the RKE2 version 1.30.4 is not yet in the stable releases. So, I modified the helm_release.rancher.repository to "https://releases.rancher.com/server-charts/latest" and it worked.

Either we need to set the RKE2 version in the tfvars which supports the latest stable release or modify the rancher repository which support latest RKE2 release.

Code worked fine after that. Looks good.

glovecchi0 commented 2 weeks ago

@glovecchi0 Initially I ran into the below error: ╷ │ Error: chart requires kubeVersion: < 1.29.0-0 which is incompatible with Kubernetes v1.30.4+rke2r1 │ │ with module.rancher_install.helm_release.rancher, │ on ../../../../modules/rancher/main.tf line 118, in resource "helm_release" "rancher": │ 118: resource "helm_release" "rancher" { │

Figured out that if we run the aws RKE2 recipe, RKE2 version will be the latest which will be v1.30.4+rke2r1 and then the rancher helm chart will fail to install as the rancher repo which we provided in the rancher module's main.tf is pointing to stable release where as the rancher version 2.9.1 which supports the RKE2 version 1.30.4 is not yet in the stable releases. So, I modified the helm_release.rancher.repository to "https://releases.rancher.com/server-charts/latest" and it worked.

Either we need to set the RKE2 version in the tfvars which supports the latest stable release or modify the rancher repository which support latest RKE2 release.

Code worked fine after that. Looks good.

Good point! Thanks a lot, Surya!