Skip to content
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

chore(updatecli) tracks aws load balancer helm release version #104

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jayfranco999
Copy link
Collaborator

As per jenkins-infra/helpdesk#4503

This pr tracks aws load balancer helm release version using github release as source,

Tested locally with success:

TARGETS
========

updateChartVersion
------------------

**Dry Run enabled**

⚠ - changes detected:
        path "resource.helm_release.cijenkinsio_agents_2_awslb.version" updated from "1.11.0" to "2.11.0" in file "eks-cijenkinsio-agents-2.tf"


ACTIONS
========


=============================

SUMMARY:



⚠ Bump `aws-load-balancer-controller` helm release version:
        Source:
                ✔ [lastChartVersion] aws-load-balancer-controller Helm Chart Latest Version
        Target:
                ⚠ [updateChartVersion] Update the helm release version for aws-load-balancer-controller


Run Summary
===========
Pipeline(s) run:
  * Changed:    1
  * Failed:     0
  * Skipped:    0
  * Succeeded:  0
  * Total:      1

Signed-off-by: jayfranco999 <[email protected]>
Signed-off-by: jayfranco999 <[email protected]>
@dduportal dduportal self-assigned this Jan 21, 2025
Copy link
Contributor

@dduportal dduportal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good, except for the updatecli source which does not track the correct version (see my inline comment).

Merging this PR won't break the infra, but it will raise an automatic PR which request us to bump from 1.11.0 to 2.x.y the chart version which is suspicious (and won't work) ;)

Comment on lines +17 to +28
lastChartVersion:
name: aws-load-balancer-controller Helm Chart Latest Version
kind: githubrelease
spec:
owner: kubernetes-sigs
repository: aws-load-balancer-controller
token: "{{ requiredEnv .github.token }}"
username: "{{ .github.username }}"
versionFilter:
kind: latest
transformers:
- trimprefix: "v"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the correct source. https://github.com/kubernetes-sigs/aws-load-balancer-controller hosts the Golang code for the Controller itself, so the releases such as https://github.com/kubernetes-sigs/aws-load-balancer-controller/releases/tag/v2.11.0 only point to a Docker image.

If you look at the Terraform code targeted by the Updatecli target, it tracks an Helm Chart named aws-load-balancer-controller hosted in the Helm Repository at https://aws.github.io/eks-charts (you can find more informations about Helm repository in https://helm.sh/docs/topics/chart_repository/ if needed).

=> Good news, Updatecli supports native sources for Helm Chart to retrieve the version (as documented in https://www.updatecli.io/docs/plugins/resource/helm_chart/).

You can look at one of our existing manifests tracking helm charts in https://github.com/jenkins-infra/kubernetes-management/blob/fe01e42d1300e8ebd293eeef1c30c361e8b77614/updatecli/updatecli.d/charts/datadog.yaml#L16-L21

@dduportal dduportal marked this pull request as draft January 22, 2025 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants