const ( SecretName = "gcp-creds" //nolint: gosec SecretNamespace = "external-secrets" SecretKey = "key.json" DockerPullSecretType = "docker-registry" )
var ( ErrNoName = errors.New("external secret name must be set") ErrNoNamespace = errors.New("external secret namespace or namespace selector must be set") ErrNameSpaceConflict = errors.New("cannot set both namesapce and namesapce selector for an external secret") ErrNoPath = errors.New("external secret path must be set") ErrNoProjectID = errors.New("external secret projectID must be set") )
func BuildDefaultEdgeClusterSecretStore(projectID string) *goext.ClusterSecretStore
ExternalSecret
type ExternalSecret struct {
// contains filtered or unexported fields
}
func DefaultExternalSecret() *ExternalSecret
func (p *ExternalSecret) Build() (*goext.ExternalSecret, error)
func (p *ExternalSecret) BuildClusterExternalSecret() (*goext.ClusterExternalSecret, error)
func (p *ExternalSecret) DockerConfig(secretName, field string) *ExternalSecret
DockerConfig the secretKey would be the secret manager's key without a . Where field is dockerconfigjson secretRef is dockerconfigjson
func (p *ExternalSecret) K8sSecretName(k8sSecretName string) *ExternalSecret
func (p *ExternalSecret) Labels(labels map[string]string) *ExternalSecret
func (p *ExternalSecret) MapSecretFieldToK8sSecretKey(secretManagerSecretName, secretManagerField, k8sSecretKey string) *ExternalSecret
func (p *ExternalSecret) MapSecretToK8sSecretKey(secretManagerSecretName, k8sSecretKey string) *ExternalSecret
MapSecretToK8sSecretKey is used to map the entire secret manager secret to the this field in the k8s secret
func (p *ExternalSecret) Name(name string) *ExternalSecret
func (p *ExternalSecret) Namespace(ns string) *ExternalSecret
func (p *ExternalSecret) Path(path string) *ExternalSecret
func (p *ExternalSecret) ProjectID(projectID string) *ExternalSecret
func (p *ExternalSecret) SetSecretType(secretType corev1.SecretType) *ExternalSecret
func (p *ExternalSecret) Validate() error