This repository has been archived by the owner on Nov 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 262
Support import of repositories for Helm v2 _and_ v3 #141
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit is a follow up on #124 which added the same type of functionalities to the `helm/v3` package. Given all methods are now supported by both version implementations, the generic client interface has been updated to include the methods.
This was causing issues for airgapped or restricted instances of the operator as adding a repository causes Helm to attempt to connect with it, which may not be possible due to the earlier mentioned restrictions.
stefanprodan
approved these changes
Dec 10, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
With this flag it is possible to import repositories from an index file to a specific Helm client version. Example: `--helm-repository-import=v2:/var/v2.yaml,v3:/var/v3.yaml` causes the operator to import the `v2.yaml` repositories in the Helm v2 client, and the `v3.yaml` repositories in the Helm v3 client.
hiddeco
force-pushed
the
helm-v3/repo-management
branch
from
December 11, 2019 10:04
2f2f6e2
to
1f267a7
Compare
2opremio
reviewed
Dec 11, 2019
) | ||
|
||
var ( | ||
repositoryConfigLock sync.RWMutex |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a good reason to have this as a global variable? Can't it be part of Helm2
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There can theoretically be multiple versions of Helm2
while they all speak with the same repository index file (this is not completely true, as they can have different HELM_HOME
s and are thus working with a different file, but this is the simplest secure option).
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the missing bits in the
helm/v2
package, removes the hardcoded import that was temporary put into place in #124, and replaces it with a dedicated--helm-repository-import
flag which accepts a string slice of[helm version]:[path]
pairs.