dynamic host creation
This commit is contained in:
@@ -9,12 +9,13 @@ import (
|
||||
)
|
||||
|
||||
type configFileStruct struct {
|
||||
AllowAdminNoMutate bool `yaml:"allow-admin-nomutate"`
|
||||
AllowAdminNoMutateToggle string `yaml:"allow-admin-nomutate-toggle"`
|
||||
DockerhubRegistry string `yaml:"dockerhub-registry"`
|
||||
MutateIgnoredImages []string `yaml:"mutate-ignored-images"`
|
||||
CertificateAuthority CertStruct `yaml:"certificate-authority"`
|
||||
Certificate CertStruct `yaml:"certificate"`
|
||||
AllowAdminNoMutate bool `yaml:"allow-admin-nomutate"`
|
||||
AllowAdminNoMutateToggle string `yaml:"allow-admin-nomutate-toggle"`
|
||||
DockerhubRegistry string `yaml:"dockerhub-registry"`
|
||||
MutateIgnoredImages []string `yaml:"mutate-ignored-images"`
|
||||
CertificateAuthority CertStruct `yaml:"certificate-authority"`
|
||||
Certificate CertStruct `yaml:"certificate"`
|
||||
Kubernetes KubernetesStruct `yaml:"kubernetes"`
|
||||
}
|
||||
|
||||
type CertStruct struct {
|
||||
@@ -23,6 +24,11 @@ type CertStruct struct {
|
||||
PublicKey string `yaml:"public-key"`
|
||||
}
|
||||
|
||||
type KubernetesStruct struct {
|
||||
Namespace string `yaml:"namespace"`
|
||||
ServiceName string `yaml:"service-name"`
|
||||
}
|
||||
|
||||
func getConfigFileData(fileLocation string) (configFileStruct, error) {
|
||||
// does file exist
|
||||
if _, err := os.Stat(fileLocation); os.IsNotExist(err) {
|
||||
|
||||
Reference in New Issue
Block a user