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

feat: Handle repository aliases #8

Merged
merged 3 commits into from
Oct 7, 2024
Merged

Conversation

Jumanjii
Copy link
Contributor

@Jumanjii Jumanjii commented Oct 4, 2024

This PR adds the ability to handle repository aliases.
ArgoCD helm repositories could be referenced by Application using @qonto, for example.

Until now, the upgrade manager would have skipped the application because it did not know how to handle the repository reference.

{"time":"2024-07-16T09:28:51.279338872Z","level":"INFO","msg":"Found 55 applications in xxx namespace"}
{"time":"2024-07-16T09:28:51.575640087Z","level":"ERROR","msg":"Could not load xxxx chart as software, error: could not determine RepoBackendType for url @qonto"}

With the modification introduced in this PR, it can now handle those "@qonto" references if they are defined in the configuration file.

(config file)

     repositories-aliases:
        "@my-alias": "https://prometheus-community.github.io/helm-charts"

(chart found using alias)

apiVersion: v2
appVersion: v2.3.3
description: A Helm chart for ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes.
name: TestApp5
version: 4.5.8
dependencies:
  - name: kube-prometheus-stack
    version: 60.0.0
    repository: '@my-alias'

(result)

time=2024-10-04T18:06:18.103+02:00 level=DEBUG msg="Populate dependency software for dep kube-prometheus-stack repo backend @my-alias"
time=2024-10-04T18:06:18.103+02:00 level=DEBUG msg="Repo URL @my-alias resolved to https://prometheus-community.github.io/helm-charts"
time=2024-10-04T18:06:18.103+02:00 level=DEBUG msg="Configuring HelmRepoBackend for kube-prometheus-stack"

Signed-off-by: Allan Jacquet-Cretides <allan.jacquet@qonto.com>
Signed-off-by: Allan Jacquet-Cretides <allan.jacquet@qonto.com>
@Jumanjii
Copy link
Contributor Author

Jumanjii commented Oct 4, 2024

#sre

Signed-off-by: Allan Jacquet-Cretides <allan.jacquet@qonto.com>
@alexandrediasldev
Copy link

LGTM 👍

@Jumanjii Jumanjii merged commit dcfd1c3 into main Oct 7, 2024
3 checks passed
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