diff --git a/pkg/configmapandsecret/secretfactory.go b/pkg/configmapandsecret/secretfactory.go index cf0e7a44b..815224bea 100644 --- a/pkg/configmapandsecret/secretfactory.go +++ b/pkg/configmapandsecret/secretfactory.go @@ -89,10 +89,10 @@ func (f *SecretFactory) MakeSecret(args *types.SecretArgs) (*corev1.Secret, erro func addKvToSecret(secret *corev1.Secret, keyName, data string) error { // Note, the rules for SecretKeys keys are the exact same as the ones for ConfigMap. if errs := validation.IsConfigMapKey(keyName); len(errs) != 0 { - return fmt.Errorf("%q is not a valid key name for a ConfigMap: %s", keyName, strings.Join(errs, ";")) + return fmt.Errorf("%q is not a valid key name for a Secret: %s", keyName, strings.Join(errs, ";")) } if _, entryExists := secret.Data[keyName]; entryExists { - return fmt.Errorf("cannot add key %s, another key by that name already exists: %v", keyName, secret.Data) + return fmt.Errorf("cannot add key %s, another key by that name already exists", keyName) } secret.Data[keyName] = []byte(data) return nil @@ -110,7 +110,6 @@ func (f *SecretFactory) keyValuesFromCommands(sources map[string]string) ([]kvPa var kvs []kvPair for k, cmd := range sources { content, err := f.createSecretKey(cmd) - fmt.Println("createSecretKey:", content) if err != nil { return nil, err } diff --git a/pkg/types/kustomization.go b/pkg/types/kustomization.go index cb896b89a..44eb0d1ad 100644 --- a/pkg/types/kustomization.go +++ b/pkg/types/kustomization.go @@ -120,17 +120,15 @@ type SecretArgs struct { } // CommandSources contains some generic sources for secrets. -// Only one field can be set. type CommandSources struct { // Map of keys to commands to generate the values - Commands map[string]string `json:"commands,omitempty" yaml:"literals,omitempty"` + Commands map[string]string `json:"commands,omitempty" yaml:"commands,omitempty"` // EnvCommand to output lines of key=val pairs to create a secret. // i.e. a Docker .env file or a .ini file. - EnvCommand string `json:"envCommand,omitempty" yaml:"env,omitempty"` + EnvCommand string `json:"envCommand,omitempty" yaml:"envCommand,omitempty"` } // DataSources contains some generic sources for configmaps. -// Only one field can be set. type DataSources struct { // LiteralSources is a list of literal sources. // Each literal source should be a key and literal value,