Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Make chart ops insensitive to (missing) slashes #1735

Merged
merged 1 commit into from
Feb 15, 2019

Conversation

hiddeco
Copy link
Member

@hiddeco hiddeco commented Feb 13, 2019

Fixes #1732.

Image for testing available as hiddeco/helm-operator:1732-trailing-slash-repo-url.

@hiddeco hiddeco force-pushed the 1732-trailing-slash-repo-url branch from fc5973f to 65f8545 Compare February 14, 2019 16:00
Before this change it was possible that a user provided correct
credentials for a repository, but the operator was unable to find them
due to too strict comparisons, also, the URL the operator constructed
to download a tarball of a chart was missing a path element when a
given repo URL did not end with a trailing slash.

To get around the first issue the repo URL from the `repositories.yaml`
and the repo URL from the given HelmRelease are both stripped from their
trailing slashes during comparison.

To get around the second issue a CleanRepoURL function was added and
implemented, which returns the RepoURL but ensures it always ends with
a trailing slash.
@hiddeco hiddeco force-pushed the 1732-trailing-slash-repo-url branch from 65f8545 to 9978918 Compare February 14, 2019 16:04
Copy link
Member

@squaremo squaremo left a comment

Choose a reason for hiding this comment

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

Looks good to me too 👍

@hiddeco hiddeco merged commit dcfce1b into master Feb 15, 2019
@hiddeco hiddeco deleted the 1732-trailing-slash-repo-url branch February 15, 2019 09:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants