Documentation ¶
Overview ¶
Package config includes helpers for parsing and accessing the information from the secrets CSI driver mount events.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MountConfig ¶
type MountConfig struct { Secrets []*Secret PodInfo *PodInfo TargetPath string Permissions os.FileMode // AuthPodADC identifies whether Workload Identity should be used for // authentication. This is the of the pod for volume mount (default) AuthPodADC bool // AuthProviderADC identifies whether the Application Default Credentials of the // GCP Provider DaemonSet should be used for authentication. // https://cloud.google.com/docs/authentication/production#automatically AuthProviderADC bool // AuthNodePublishSecret identifies whether the a K8s Secret provided on the // NodePublish call should be used for authentication. // https://kubernetes-csi.github.io/docs/secrets-and-credentials-storage-class.html // // If set then AuthKubeSecret will contain the json representation of the // Google credential (parseable by google.CredentialsFromJSON). AuthNodePublishSecret bool AuthKubeSecret []byte }
MountConfig holds the parsed information from a mount event.
func Parse ¶
func Parse(in *MountParams) (*MountConfig, error)
Parse parses the input MountParams to the more structured MountConfig.
type MountParams ¶
type MountParams struct { Attributes string KubeSecrets string TargetPath string Permissions os.FileMode }
MountParams hold unparsed arguments from the CSI Driver from the mount event.
type PodInfo ¶
type PodInfo struct { Namespace string Name string UID types.UID ServiceAccount string ServiceAccountTokens string }
PodInfo includes details about the pod that is receiving the mount event.
type Secret ¶
type Secret struct { // ResourceName refers to a SecretVersion in the format // projects/*/secrets/*/versions/*. ResourceName string `json:"resourceName" yaml:"resourceName"` // FileName is where the contents of the secret are to be written. FileName string `json:"fileName" yaml:"fileName"` // Path is the relative path where the contents of the secret are written. Path string `json:"path" yaml:"path"` // Mode is the optional file mode for the file containing the secret. Must be // an octal value between 0000 and 0777 or a decimal value between 0 and 511 Mode *int32 `json:"mode,omitempty" yaml:"mode,omitempty"` }
Secret holds the parameters of the SecretProviderClass CRD. Links the GCP secret resource name to a path in the filesystem.
func (*Secret) PathString ¶ added in v0.6.0
PathString returns either the FileName or Path parameter of the Secret.
Click to show internal directories.
Click to hide internal directories.