Skip to content

Commit

Permalink
Merge pull request #26 from 23technologies/set-issuer-values
Browse files Browse the repository at this point in the history
Configure issuer in 23ke-config secret
  • Loading branch information
fynluk committed Apr 6, 2023
2 parents 3a8da35 + 2a0a43a commit dd31ce6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/install/v2/install_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ func init() {
"gardenlet.seedpodcidr": "100.73.0.0/16",
"gardenlet.seedservicecidr": "100.88.0.0/13",
"issuer.acme.email": "test@example.org",
"issuer.acme.server": "example.acme.server",
"issuer.ca": "my-great-ca",
"kubeapiserver.basicauthpassword": "my-basic-auth-password",

"version": "test",
Expand Down Expand Up @@ -130,6 +132,8 @@ func init() {
viper.Set("kubeApiServer.basicAuthPassword", testConfig["kubeapiserver.basicauthpassword"])
viper.Set("clusterIdentity", testConfig["clusteridentity"])
viper.Set("cloudprofiles", testConfig["cloudprofiles"])
viper.Set("issuer.ca", testConfig["issuer.ca"])
viper.Set("issuer.acme.server", testConfig["issuer.acme.server"])

_, err = git.PlainInit(configRepo, true)
if err != nil {
Expand Down Expand Up @@ -192,6 +196,9 @@ issuer:
enabled: true
acme:
email: test@example.org
server: %s
ca: |
%s
kubeApiServer:
basicAuthPassword: %s
backups:
Expand All @@ -214,6 +221,8 @@ backups:
testConfig["domainconfig"].(map[string]any)["credentials"].(map[string]string)["clientsecret"],
testConfig["domainconfig"].(map[string]any)["credentials"].(map[string]string)["subscriptionid"],
testConfig["domainconfig"].(map[string]any)["credentials"].(map[string]string)["tenantid"],
testConfig["issuer.acme.server"],
testConfig["issuer.ca"],
testConfig["kubeapiserver.basicauthpassword"],
testConfig["backupconfig"].(map[string]any)["enabled"].(bool),
testConfig["backupconfig"].(map[string]any)["provider"].(string),
Expand Down
3 changes: 3 additions & 0 deletions pkg/install/v2/secrets.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,11 @@ stringData:
basicAuthPassword: {{ .KubeApiServer.BasicAuthPassword }}
issuer:
enabled: true
ca: |
{{- nindent 8 .Issuer.Ca }}
acme:
email: {{ .Issuer.Acme.Email }}
server: {{ .Issuer.Acme.Server }}
domains:
global: # means used for ingress, gardener defaultDomain and internalDomain
{{- nindent 8 (toYaml .DomainConfig) }}
Expand Down

0 comments on commit dd31ce6

Please sign in to comment.