Documentation ¶
Index ¶
- Constants
- Variables
- func RemoveMapEmptyValues(m map[string]interface{})
- func ToSecretsYAML(values map[string]interface{}) (string, error)
- func UnmarshalSecretsYAML(secretsYaml string) (map[string]interface{}, error)
- func VerifyBootSecrets(secretsYAML string) error
- type SecretCallback
- type SecretManager
Constants ¶
View Source
const ( // KindLocal for using a local Secret in Kubernetes KindLocal = "local" // KindGoogleSecretManager for using Google Secret Manager KindGoogleSecretManager = "gsm" // KindFake for a fake secret manager KindFake = "fake" // KindVault for a vault based secret manager KindVault = "vault" // LocalSecret the name of the Kubernetes Secret used to load/store the // secrets /* #nosec */ LocalSecret = "jx-boot-secrets" // LocalSecretKey the key in the local Secret to store the YAML secrets LocalSecretKey = "secrets.yaml" // DefaultSecretsYaml the default YAML DefaultSecretsYaml = `secrets: adminUser: username: password: hmacToken: pipelineUser: username: token: email: ` )
Variables ¶
View Source
var ( // KindValues the kind of secret managers we support KindValues = []string{KindGoogleSecretManager, KindLocal} )
Functions ¶
func RemoveMapEmptyValues ¶ added in v0.0.78
func RemoveMapEmptyValues(m map[string]interface{})
RemoveMapEmptyValues recursively removes all empty string or nil entries
func ToSecretsYAML ¶ added in v0.0.78
ToSecretsYAML converts the data to secrets YAML
func UnmarshalSecretsYAML ¶ added in v0.0.78
UnmarshalSecretsYAML unmarshals the given Secrets YAML
func VerifyBootSecrets ¶ added in v0.0.57
VerifyBootSecrets verifies the boot secrets
Types ¶
type SecretCallback ¶
type SecretManager ¶
type SecretManager interface { // UpsertSecrets inserts or updates the secrets using some kind of storage // with the callback taking the current or default secrets, invoking the callback to modify them // then storing them in a cloud secret manager, local kubernetes Secret or vault etc. UpsertSecrets(callback SecretCallback, defaultYaml string) error // Kind returns the kind of the Secret Manager Kind() string // String returns the string description of the secrets manager String() string }
Click to show internal directories.
Click to hide internal directories.