VictoriaMetrics / helm-charts

Helm charts for VictoriaMetrics, VictoriaLogs and ecosystem
https://victoriametrics.github.io/helm-charts/
Apache License 2.0
345 stars 331 forks source link

Cleanup job created with invalid image #1196

Closed BryanFauble closed 3 months ago

BryanFauble commented 3 months ago

When removing the helm chart deployed through terraform a job is created with this spec.containers:

    spec:
      containers:
      - args:
        - delete
        - vmagents,vmalertmanagers,vmalerts,vmauths,vmclusters,vmsingles
        - --all
        - --ignore-not-found=true
        image: bitnami/kubectl:1.30+

However, the image is not in a valid format that can run within AWS EKS. Events on the pod:

│ Events:                                                                                                                                                                                                                                          │
│   Type     Reason         Age                    From                                 Message                                                                                                                                                    │
│   ----     ------         ----                   ----                                 -------                                                                                                                                                    │
│   Normal   Scheduled      9m6s                   default-scheduler                    Successfully assigned victoria-metrics/victoria-metrics-k8s-stack-scrapers-victoria-metrics-operagms7p to ip-***.ec2.internal                            │
│   Warning  Failed         6m54s (x12 over 9m6s)  kubelet, ip-***.ec2.internal  Error: InvalidImageName                                                                                                                                    │
│   Warning  InspectFailed  3m56s (x26 over 9m6s)  kubelet, ip-***.ec2.internal  Failed to apply default image tag "bitnami/kubectl:1.30+": couldn't parse image name "bitnami/kubectl:1.30+": invalid reference format    
Haleygo commented 3 months ago

Must be fixed in victoria-metrics-operator-0.33.5 or victoria-metrics-k8s-stack-0.24.5.

fix cleanup job image tag when .Capabilities.KubeVersion.Minor returns version with plus sign. See https://github.com/VictoriaMetrics/helm-charts/pull/1169 by @dimaslv.