added possibility to use latest containers for CCM and CSI

This commit is contained in:
Karim Naufal 2022-01-15 09:14:25 +01:00
parent cd9bcd9710
commit 13c97069b5
4 changed files with 8 additions and 8 deletions

View File

@ -122,7 +122,7 @@ ssh rancher@xxx.xxx.xxx.xxx -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=no
By default, k3os and its embedded k3s instance get upgraded automatically on each node, thanks to its embedded system upgrade controller.
_You can also choose to automatically kustomize the Hetzner CCM and CSI to set their container images to "latest" and with an imagePullPolicy of "Always". That means that when the nodes upgrade, these container images will be automatically upgraded too. For more info on this, see [terraform.tfvars.example](terraform.tfvars.example)._
_You can also choose to automatically kustomize the Hetzner CCM and CSI to set their container images to "latest" with an imagePullPolicy of "Always". That means that when the nodes upgrade, these container images will be automatically upgraded too. For more info on this, see [terraform.tfvars.example](terraform.tfvars.example)._
_If you wish to turn off automatic upgrade on a specific node, you need to take out the label `k3os.io/upgrade=latest`. It can be done with the following command:_

View File

@ -147,7 +147,7 @@ resource "hcloud_firewall" "k3s" {
resource "local_file" "hetzner_ccm_config" {
content = templatefile("${path.module}/templates/hetzner_ccm.yaml.tpl", {
ccm_version = var.hetzner_ccm_version != null ? var.hetzner_ccm_version : data.github_release.hetzner_ccm.release_tag
patch_name = var.hetzner_ccm_container_latest ? "patch_latest" : "patch"
patch_name = var.hetzner_ccm_containers_latest ? "patch_latest" : "patch"
})
filename = "${path.module}/hetzner/ccm/kustomization.yaml"
file_permission = "0644"
@ -157,7 +157,7 @@ resource "local_file" "hetzner_ccm_config" {
resource "local_file" "hetzner_csi_config" {
content = templatefile("${path.module}/templates/hetzner_csi.yaml.tpl", {
csi_version = var.hetzner_csi_version != null ? var.hetzner_csi_version : data.github_release.hetzner_csi.release_tag
patch_name = var.hetzner_csi_container_latest ? "patch_latest" : ""
patch_name = var.hetzner_csi_containers_latest ? "patch_latest" : ""
})
filename = "${path.module}/hetzner/csi/kustomization.yaml"
file_permission = "0644"

View File

@ -17,9 +17,9 @@ agents_num = 2
# hetzner_ccm_version = ""
# hetzner_csi_version = ""
# If you want to kustomize the Hetzner CCM and CSI containers with the "latest" or "canary" tags and imagePullPolicy Always,
# If you want to kustomize the Hetzner CCM and CSI containers with the "latest" tags and imagePullPolicy Always,
# to have them automatically update when the node themselve get updated via the rancher system upgrade controller, the default is "false".
# If you choose to keep the default of "false", you can always use ArgoCD to monitor the CSI and CCM manifest for new releases,
# that is probably the more "vanilla" option to keep these components always updated.
# hetzner_ccm_container_latest = true
# hetzner_csi_container_latest = true
# hetzner_ccm_containers_latest = true
# hetzner_csi_containers_latest = true

View File

@ -56,13 +56,13 @@ variable "hetzner_csi_version" {
description = "Version of Container Storage Interface driver for Hetzner Cloud"
}
variable "hetzner_ccm_container_latest" {
variable "hetzner_ccm_containers_latest" {
type = bool
default = false
description = "Whether to kustomize the Hetzner CCM manifest with the latest or canary tags for containers"
}
variable "hetzner_csi_container_latest" {
variable "hetzner_csi_containers_latest" {
type = bool
default = false
description = "Whether to kustomize the Hetzner CSI manifest with the latest or canary tags for containers"