Skip to content

[Bug]: Update Lease failed on nginx-ingress update to 3.7.0 #6663

@thomas-schn

Description

@thomas-schn

Version

3.7.0

What Kubernetes platforms are you running on?

EKS Amazon

Steps to reproduce

I updated my nginx-ingress-controller in eks from Version 3.6.2 to 3.7.0. The eks-cluster is provisioned with terraform helm-provider.
During Update process I got the following error-message:

Error: Unable to continue with update: Lease "internal-ingress-controller-nginx-ingress-leader-election" in namespace
 "ingress-internal" exists and cannot be imported into the current release: invalid ownership metadata; label validation
 error: missing key "app.kubernetes.io/managed-by": must be set to "Helm"; annotation validation error: missing key 
 "meta.helm.sh/release-name": must be set to "internal-ingress-controller"; annotation validation error: missing key 
 "meta.helm.sh/release-namespace": must be set to "ingress-internal"
│ 
│   with module.cluster.module.nginx_ingress_controller_internal[0].helm_release.nginx_ingress_controller_helm,
│   on ../../modules/eks/nginx-ingress-controller/main.tf line 104, in resource "helm_release" "nginx_ingress_controller_helm":
│  104: resource "helm_release" "nginx_ingress_controller_helm" {
│ 
╵ 

The describe on my lease resource in my cluster looks like this:

~ kubectl -n ingress-internal describe lease/internal-ingress-controller-nginx-ingress-leader-election
Name:         internal-ingress-controller-nginx-ingress-leader-election
Namespace:    ingress-internal
Labels:       <none>
Annotations:  <none>
API Version:  coordination.k8s.io/v1
Kind:         Lease
Metadata:
  Creation Timestamp:  2022-11-08T11:03:42Z
  Resource Version:    185034718
  UID:                 10111f40-61f1-41d2-894e-c47b4fb92841
Spec:
  Acquire Time:            2023-12-04T10:06:03.514514Z
  Holder Identity:         internal-ingress-controller-nginx-ingress-nginx-ingress-cont2lnm5
  Lease Duration Seconds:  30
  Lease Transitions:       25
  Renew Time:              2024-01-30T13:46:25.679644Z
Events:                    <none>

Did I miss some new configuration for my cluster?
For now, I fixed it, by manually adding the missing annotations and label to my existing lease-resource befor updating to new nginx-ingress-version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn issue reporting a potential bugneeds triageAn issue that needs to be triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions