mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-18 11:03:25 +02:00
Support client certs when accessing remote repos (#47)
This is important for deployments where the chart repo is protected by client cert validation.
helmfile.yaml is extended to support `certFile` and `keyFile`:
```
repositories:
- name: roboll
url: http://roboll.io/charts
certFile: optional_client_cert
keyFile: optional_client_key
```
Everything works the same if you don't provide values for them.
Regarding the implementation, the "helm repo add" command already supports the cert-file and key-file values, so we just have to pass them through.
This commit is contained in:
committed by
KUOKA Yusuke
parent
e4961a8c34
commit
1ad426b338
+7
-2
@@ -30,8 +30,13 @@ func (helm *execer) SetExtraArgs(args ...string) {
|
||||
helm.extra = args
|
||||
}
|
||||
|
||||
func (helm *execer) AddRepo(name, repository string) error {
|
||||
out, err := helm.exec("repo", "add", name, repository)
|
||||
func (helm *execer) AddRepo(name, repository, certfile, keyfile string) error {
|
||||
var args []string
|
||||
args = append(args, "repo", "add", name, repository)
|
||||
if certfile != "" && keyfile != "" {
|
||||
args = append(args, "--cert-file", certfile, "--key-file", keyfile)
|
||||
}
|
||||
out, err := helm.exec(args...)
|
||||
if helm.writer != nil {
|
||||
helm.writer.Write(out)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user