cleanup: remove tls configures about helm v2 (#880)
This commit is contained in:
parent
12a984d70f
commit
ae77967bf2
|
|
@ -195,14 +195,6 @@ helmDefaults:
|
|||
recreatePods: true
|
||||
# forces resource update through delete/recreate if needed (default false)
|
||||
force: false
|
||||
# enable TLS for request to Tiller (default false)
|
||||
tls: true
|
||||
# path to TLS CA certificate file (default "$HELM_HOME/ca.pem")
|
||||
tlsCACert: "path/to/ca.pem"
|
||||
# path to TLS certificate file (default "$HELM_HOME/cert.pem")
|
||||
tlsCert: "path/to/cert.pem"
|
||||
# path to TLS key file (default "$HELM_HOME/key.pem")
|
||||
tlsKey: "path/to/key.pem"
|
||||
# limit the maximum number of revisions saved per release. Use 0 for no limit. (default 10)
|
||||
historyMax: 10
|
||||
# when using helm 3.2+, automatically create release namespaces if they do not exist (default true)
|
||||
|
|
@ -294,16 +286,7 @@ releases:
|
|||
atomic: true
|
||||
# when true, cleans up any new resources created during a failed release (default false)
|
||||
cleanupOnFail: false
|
||||
# enable TLS for request to Tiller (default false)
|
||||
tls: true
|
||||
# path to TLS CA certificate file (default "$HELM_HOME/ca.pem")
|
||||
tlsCACert: "path/to/ca.pem"
|
||||
# path to TLS certificate file (default "$HELM_HOME/cert.pem")
|
||||
tlsCert: "path/to/cert.pem"
|
||||
# path to TLS key file (default "$HELM_HOME/key.pem")
|
||||
tlsKey: "path/to/key.pem"
|
||||
# --kube-context to be passed to helm commands
|
||||
# CAUTION: this doesn't work as expected for `tilerless: true`.
|
||||
# See https://github.com/roboll/helmfile/issues/642
|
||||
# (default "", which means the standard kubeconfig, either ~/kubeconfig or the file pointed by $KUBECONFIG environment variable)
|
||||
kubeContext: kube-context
|
||||
|
|
|
|||
|
|
@ -190,12 +190,8 @@ type HelmSpec struct {
|
|||
// Cascade '--cascade' to helmv3 delete, available values: background, foreground, or orphan, default: background
|
||||
Cascade *string `yaml:"cascade,omitempty"`
|
||||
|
||||
TLS bool `yaml:"tls"`
|
||||
TLSCACert string `yaml:"tlsCACert,omitempty"`
|
||||
TLSKey string `yaml:"tlsKey,omitempty"`
|
||||
TLSCert string `yaml:"tlsCert,omitempty"`
|
||||
DisableValidation *bool `yaml:"disableValidation,omitempty"`
|
||||
DisableOpenAPIValidation *bool `yaml:"disableOpenAPIValidation,omitempty"`
|
||||
DisableValidation *bool `yaml:"disableValidation,omitempty"`
|
||||
DisableOpenAPIValidation *bool `yaml:"disableOpenAPIValidation,omitempty"`
|
||||
}
|
||||
|
||||
// RepositorySpec that defines values for a helm repo
|
||||
|
|
@ -314,11 +310,6 @@ type ReleaseSpec struct {
|
|||
|
||||
KubeContext string `yaml:"kubeContext,omitempty"`
|
||||
|
||||
TLS *bool `yaml:"tls,omitempty"`
|
||||
TLSCACert string `yaml:"tlsCACert,omitempty"`
|
||||
TLSKey string `yaml:"tlsKey,omitempty"`
|
||||
TLSCert string `yaml:"tlsCert,omitempty"`
|
||||
|
||||
// These values are used in templating
|
||||
VerifyTemplate *string `yaml:"verifyTemplate,omitempty"`
|
||||
WaitTemplate *string `yaml:"waitTemplate,omitempty"`
|
||||
|
|
@ -2435,7 +2426,7 @@ func findChartDirectory(topLevelDir string) (string, error) {
|
|||
return topLevelDir, errors.New("no Chart.yaml found")
|
||||
}
|
||||
|
||||
// appendConnectionFlags append all the helm command-line flags related to K8s API and Tiller connection including the kubecontext
|
||||
// appendConnectionFlags append all the helm command-line flags related to K8s API including the kubecontext
|
||||
func (st *HelmState) appendConnectionFlags(flags []string, release *ReleaseSpec) []string {
|
||||
adds := st.connectionFlags(release)
|
||||
flags = append(flags, adds...)
|
||||
|
|
@ -2444,28 +2435,6 @@ func (st *HelmState) appendConnectionFlags(flags []string, release *ReleaseSpec)
|
|||
|
||||
func (st *HelmState) connectionFlags(release *ReleaseSpec) []string {
|
||||
flags := []string{}
|
||||
if release.TLS != nil && *release.TLS || release.TLS == nil && st.HelmDefaults.TLS {
|
||||
flags = append(flags, "--tls")
|
||||
}
|
||||
|
||||
if release.TLSKey != "" {
|
||||
flags = append(flags, "--tls-key", release.TLSKey)
|
||||
} else if st.HelmDefaults.TLSKey != "" {
|
||||
flags = append(flags, "--tls-key", st.HelmDefaults.TLSKey)
|
||||
}
|
||||
|
||||
if release.TLSCert != "" {
|
||||
flags = append(flags, "--tls-cert", release.TLSCert)
|
||||
} else if st.HelmDefaults.TLSCert != "" {
|
||||
flags = append(flags, "--tls-cert", st.HelmDefaults.TLSCert)
|
||||
}
|
||||
|
||||
if release.TLSCACert != "" {
|
||||
flags = append(flags, "--tls-ca-cert", release.TLSCACert)
|
||||
} else if st.HelmDefaults.TLSCACert != "" {
|
||||
flags = append(flags, "--tls-ca-cert", st.HelmDefaults.TLSCACert)
|
||||
}
|
||||
|
||||
if release.KubeContext != "" {
|
||||
flags = append(flags, "--kube-context", release.KubeContext)
|
||||
} else if st.Environments[st.Env.Name].KubeContext != "" {
|
||||
|
|
|
|||
|
|
@ -38,39 +38,39 @@ func TestGenerateID(t *testing.T) {
|
|||
run(testcase{
|
||||
subject: "baseline",
|
||||
release: ReleaseSpec{Name: "foo", Chart: "incubator/raw"},
|
||||
want: "foo-values-6cbf8f5f9f",
|
||||
want: "foo-values-fc7df494d",
|
||||
})
|
||||
|
||||
run(testcase{
|
||||
subject: "different bytes content",
|
||||
release: ReleaseSpec{Name: "foo", Chart: "incubator/raw"},
|
||||
data: []byte(`{"k":"v"}`),
|
||||
want: "foo-values-6cb9d4f956",
|
||||
want: "foo-values-56b47664f5",
|
||||
})
|
||||
|
||||
run(testcase{
|
||||
subject: "different map content",
|
||||
release: ReleaseSpec{Name: "foo", Chart: "incubator/raw"},
|
||||
data: map[string]interface{}{"k": "v"},
|
||||
want: "foo-values-5bdffb5f4b",
|
||||
want: "foo-values-558ff84c89",
|
||||
})
|
||||
|
||||
run(testcase{
|
||||
subject: "different chart",
|
||||
release: ReleaseSpec{Name: "foo", Chart: "stable/envoy"},
|
||||
want: "foo-values-6595bd68c6",
|
||||
want: "foo-values-5595f4fc5c",
|
||||
})
|
||||
|
||||
run(testcase{
|
||||
subject: "different name",
|
||||
release: ReleaseSpec{Name: "bar", Chart: "incubator/raw"},
|
||||
want: "bar-values-75698946b",
|
||||
want: "bar-values-5bf654bff9",
|
||||
})
|
||||
|
||||
run(testcase{
|
||||
subject: "specific ns",
|
||||
release: ReleaseSpec{Name: "foo", Chart: "incubator/raw", Namespace: "myns"},
|
||||
want: "myns-foo-values-5bf477bbfb",
|
||||
want: "myns-foo-values-c685d945",
|
||||
})
|
||||
|
||||
for id, n := range ids {
|
||||
|
|
|
|||
|
|
@ -10,5 +10,4 @@ environments:
|
|||
helmDefaults:
|
||||
verify: false
|
||||
wait: true
|
||||
timeout: 1800
|
||||
tls: false
|
||||
timeout: 1800
|
||||
Loading…
Reference in New Issue