Add AuthConfig struct and pass domains in AUTH_APPROVED_DOMAINS environment variable

This commit is contained in:
M. Mert Yildiran 2023-05-24 01:50:59 +03:00
parent 2126fc83a7
commit 4bb68afaaf
No known key found for this signature in database
GPG Key ID: DA5D6DCBB758A461
2 changed files with 9 additions and 0 deletions

View File

@ -80,10 +80,15 @@ type ResourcesConfig struct {
Hub ResourceRequirements `yaml:"hub"`
}
type AuthConfig struct {
ApprovedDomains []string `yaml:"approvedDomains"`
}
type IngressConfig struct {
Enabled bool `yaml:"enabled" default:"false"`
Host string `yaml:"host" default:"ks.svc.cluster.local"`
TLS []networking.IngressTLS `yaml:"tls"`
Auth AuthConfig `yaml:"auth"`
}
type TapConfig struct {

View File

@ -265,6 +265,10 @@ func (provider *Provider) BuildHubPod(opts *PodOptions) (*core.Pod, error) {
Name: "SCRIPTING_SCRIPTS",
Value: string(scriptsMarshalled),
},
{
Name: "AUTH_APPROVED_DOMAINS",
Value: strings.Join(config.Config.Tap.Ingress.Auth.ApprovedDomains, ","),
},
},
},
}