Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to upgrade Traefik #1322

Closed
dmorn opened this issue Apr 19, 2024 · 1 comment
Closed

Not able to upgrade Traefik #1322

dmorn opened this issue Apr 19, 2024 · 1 comment

Comments

@dmorn
Copy link
Contributor

dmorn commented Apr 19, 2024

Description

Traefik is not being updated anymore.

These are the relevant logs

if [[ ${KUBERNETES_SERVICE_HOST} =~ .*:.* ]]; then
    echo "KUBERNETES_SERVICE_HOST is using IPv6"
    CHART="${CHART//%\{KUBERNETES_API\}%/[${KUBERNETES_SERVICE_HOST}]:${KUBERNETES_SERVICE_PORT}}"
else
    CHART="${CHART//%\{KUBERNETES_API\}%/${KUBERNETES_SERVICE_HOST}:${KUBERNETES_SERVICE_PORT}}"
fi

set +v -x
+ [[ true != \t\r\u\e ]]
+ [[ '' == \1 ]]
+ [[ '' == \v\2 ]]
+ shopt -s nullglob
+ [[ -f /config/ca-file.pem ]]
+ [[ -f /tmp/ca-file.pem ]]
+ [[ -n '' ]]
+ helm_content_decode
+ set -e
+ ENC_CHART_PATH=/chart/traefik.tgz.base64
+ CHART_PATH=/tmp/traefik.tgz
+ [[ ! -f /chart/traefik.tgz.base64 ]]
+ return
+ [[ install != \d\e\l\e\t\e ]]
+ helm_repo_init
+ grep -q -e 'https\?://'
+ [[ helm_v3 == \h\e\l\m\_\v\3 ]]
+ [[ traefik/traefik == stable/* ]]
+ [[ -n https://traefik.github.io/charts ]]
+ [[ -f /auth/username ]]
+ helm_v3 repo add traefik https://traefik.github.io/charts
"traefik" already exists with the same configuration, skipping
+ helm_v3 repo update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "traefik" chart repository
Update Complete. ⎈Happy Helming!⎈
+ helm_update install --namespace traefik
+ [[ helm_v3 == \h\e\l\m\_\v\3 ]]
++ helm_v3 ls --all -f '^traefik$' --namespace traefik --output json
++ tr '' ''
++ jq -r '"\(.[0].chart),\(.[0].status)"'
+ LINE=traefik-26.1.0,deployed
+ IFS=,
+ read -r INSTALLED_VERSION STATUS _
+ VALUES=
+ for VALUES_FILE in /config/*.yaml
+ VALUES=' --values /config/values-01_HelmChart.yaml'
+ [[ install = \d\e\l\e\t\e ]]
+ [[ traefik-26.1.0 =~ ^(|null)$ ]]
+ [[ deployed =~ ^(pending-install|pending-upgrade|pending-rollback)$ ]]
+ [[ deployed == \d\e\p\l\o\y\e\d ]]
+ echo 'Already installed traefik'
+ [[ helm_v3 == \h\e\l\m\_\v\3 ]]
+ helm_v3 mapkubeapis traefik --namespace traefik
Already installed traefik
2024/04/19 09:28:31 Release 'traefik' will be checked for deprecated or removed Kubernetes APIs and will be updated if necessary to supported API versions.
2024/04/19 09:28:31 Get release 'traefik' latest version.
2024/04/19 09:28:31 Check release 'traefik' for deprecated or removed APIs...
2024/04/19 09:28:31 Finished checking release 'traefik' for deprecated or removed APIs.
2024/04/19 09:28:31 Release 'traefik' has no deprecated or removed APIs.
2024/04/19 09:28:31 Map of release 'traefik' deprecated or removed APIs to supported versions, completed successfully.
Upgrading traefik
+ echo 'Upgrading helm_v3 chart'
+ echo 'Upgrading traefik'
+ shift 1
+ helm_v3 upgrade --namespace traefik traefik traefik/traefik --values /config/values-01_HelmChart.yaml
Error: UPGRADE FAILED: template: traefik/templates/service.yaml:27:12: executing "traefik/templates/service.yaml" at <index (default dict $config.expose) $name>: error calling index: can't index item of type bool
Stream closed EOF for kube-system/helm-install-traefik-b46nc (helm)

Kube.tf file

module "kube-hetzner" {
  providers = {
    hcloud = hcloud
  }
  hcloud_token = var.hcloud_token != "" ? var.hcloud_token : local.hcloud_token
  source = "kube-hetzner/kube-hetzner/hcloud"
  version = "2.11.8"
  ssh_public_key = file("keys/ed25519.pub")  ssh_private_key = file("keys/ed25519")  
  control_plane_nodepools = [
    {
      name        = "control-fsn1",
      server_type = "cax21",
      location    = "fsn1",
      labels      = [],
      taints      = [],
      count       = 3    },
  ]

  agent_nodepools = [    {
      name        = "egress",
      server_type = "cpx11",
      location    = "fsn1",
      labels = [
        "node.kubernetes.io/role=egress"
      ],
      taints = [
        "node.kubernetes.io/role=egress:NoSchedule"
      ],
      floating_ip = true
      count = 0
    },
    {
      name        = "agent-fsn1",
      server_type = "cax21",
      location    = "fsn1",
      labels      = [
      ],
      taints      = [],
      count       = 0
    },
    {
      name        = "agent-med-fsn1",
      server_type = "cax31",
      location    = "fsn1",
      labels      = [
      ],
      taints      = [],
      count       = 4
    },
    {
      name        = "agent-large-fsn1",
      server_type = "cax41",
      location    = "fsn1",
      labels      = [
      ],
      taints      = [],
      count       = 0
    },
  ]  load_balancer_type     = "lb11"
  load_balancer_location = "fsn1"
   autoscaler_nodepools = [
     {
       name        = "autoscaled-small"
       server_type = "cax11"
       location    = "fsn1"
       min_nodes   = 0
       max_nodes   = 10
       labels      = {
         "node.kubernetes.io/role": "peak-workloads"
       }
       taints      =  [{
          key: "node.kubernetes.io/role"
          value: "peak-workloads"
          effect: "NoExecute"
       }]  
     }
   ]
  enable_longhorn = false
  disable_hetzner_csi = true
  traefik_additional_options = ["--log.level=DEBUG", "--api.dashboard=true", "--entryPoints.amqp.address=:5672"]
  traefik_additional_ports = [{name = "amqp", port = 5672, exposedPort = 5672}]

  extra_firewall_rules = [
    {
      description = "For RabbitMQ"
      direction       = "in"
      protocol        = "tcp"
      port            = "5672"
      source_ips      = ["0.0.0.0/0", "::/0"]    },  ]
}

provider "hcloud" {
  token = var.hcloud_token != "" ? var.hcloud_token : local.hcloud_token
}

terraform {
  required_version = ">= 1.5.0"
  required_providers {
    hcloud = {
      source  = "hetznercloud/hcloud"
      version = ">= 1.43.0"
    }
  }
}

output "kubeconfig" {
  value     = module.kube-hetzner.kubeconfig
  sensitive = true
}

variable "hcloud_token" {
  sensitive = true
  default   = ""
}

Screenshots

No response

Platform

Mac

@mysticaltech
Copy link
Collaborator

@dmorn This is more related to traefik that to this repo, please open an issue with them directly here https://github.com/traefik/traefik-helm-chart, I'm sure they will be able to help. Please do share the solution when you have it.

@mysticaltech mysticaltech changed the title [Bug]: Kube-system is not able to update Traefik Not able to upgrade Traefik May 23, 2024
@mysticaltech mysticaltech removed the bug Something isn't working label May 23, 2024
@kube-hetzner kube-hetzner locked and limited conversation to collaborators May 23, 2024
@mysticaltech mysticaltech converted this issue into discussion #1361 May 23, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants