Allow an empty Certificate setting [#29]

I just plain misunderstood how kubernetes CAs worked!
This commit is contained in:
Erin Call 2019-12-20 16:09:57 -08:00
parent 80b26434f5
commit dc4ecb6b91
No known key found for this signature in database
GPG key ID: 4071FF6C15B8DAD1
2 changed files with 0 additions and 10 deletions

View file

@ -50,9 +50,6 @@ func (i *InitKube) Prepare(cfg Config) error {
if i.Token == "" { if i.Token == "" {
return errors.New("token is needed to deploy") return errors.New("token is needed to deploy")
} }
if i.Certificate == "" && !i.SkipTLSVerify {
return errors.New("certificate is needed to deploy")
}
if i.ServiceAccount == "" { if i.ServiceAccount == "" {
i.ServiceAccount = "helm" i.ServiceAccount = "helm"

View file

@ -134,13 +134,6 @@ func (suite *InitKubeTestSuite) TestPrepareRequiredConfig() {
init.APIServer = "Sysadmin" init.APIServer = "Sysadmin"
init.Token = "" init.Token = ""
suite.Error(init.Prepare(cfg), "Token should be required.") suite.Error(init.Prepare(cfg), "Token should be required.")
init.Token = "Aspire virtual currency"
init.Certificate = ""
suite.Error(init.Prepare(cfg), "Certificate should be required.")
init.SkipTLSVerify = true
suite.NoError(init.Prepare(cfg), "Certificate should not be required if SkipTLSVerify is true")
} }
func (suite *InitKubeTestSuite) TestPrepareDefaultsServiceAccount() { func (suite *InitKubeTestSuite) TestPrepareDefaultsServiceAccount() {