Documentation ¶
Overview ¶
Package types defines some common types for Secrets, PersistentVolumes and PersistentVolumeClaims based on the core Kubernetes types, wrapped into their own types to provide additional functionality required for this tool.
Index ¶
- Constants
- Variables
- type MaprSecret
- func (t *MaprSecret) GetCluster() string
- func (t *MaprSecret) GetCreationTime() time.Time
- func (t *MaprSecret) GetExpirationTime() time.Time
- func (t *MaprSecret) GetSecretName() string
- func (t *MaprSecret) GetSecretNamespace() string
- func (t *MaprSecret) GetStatusString() string
- func (t *MaprSecret) GetUser() string
- type MaprVolume
- type MaprVolumeClaim
- type PersistentVolume
- func (v *PersistentVolume) GetClaimName() string
- func (v *PersistentVolume) GetClaimNamespace() string
- func (v *PersistentVolume) GetName() string
- func (v *PersistentVolume) GetSecretName() string
- func (v *PersistentVolume) GetSecretNamespace() string
- func (v *PersistentVolume) GetVolumeHandle() string
- func (v *PersistentVolume) GetVolumePath() string
- func (v *PersistentVolume) IsMaprCSIBased() bool
- func (volume *PersistentVolume) UsesSecret(namespace, name string) bool
- type PersistentVolumeClaim
- type Secret
Constants ¶
const ( // default MapR CSI provisioner identifiers MaprCSIProvisionerKDF = "com.mapr.csi-kdf" MaprCSIProvisionerNFSKDF = "com.mapr.csi-nfskdf" )
Variables ¶
var ( // MaprCSIProvisioners is a list of the default MapR CSI provisioners // that we support. MaprCSIProvisioners = []string{ MaprCSIProvisionerKDF, MaprCSIProvisionerNFSKDF, } )
Functions ¶
This section is empty.
Types ¶
type MaprSecret ¶
type MaprSecret struct { Secret *Secret `json:"secret"` Ticket *ticket.Ticket `json:"ticket"` NumPVC uint32 `json:"-"` }
MaprSecret is used to store a secret and its corresponding ticket parsed from that secret
func NewMaprSecret ¶
func NewMaprSecret(s *Secret) *MaprSecret
NewMaprSecret creates a new MaprSecret from a Secret
func (*MaprSecret) GetCluster ¶
func (t *MaprSecret) GetCluster() string
GetCluster returns the cluster of the ticket
func (*MaprSecret) GetCreationTime ¶
func (t *MaprSecret) GetCreationTime() time.Time
GetCreationTime returns the creation time of the ticket
func (*MaprSecret) GetExpirationTime ¶
func (t *MaprSecret) GetExpirationTime() time.Time
GetExpirationTime returns the expiration time of the ticket
func (*MaprSecret) GetSecretName ¶
func (t *MaprSecret) GetSecretName() string
GetSecretName returns the name of the secret
func (*MaprSecret) GetSecretNamespace ¶
func (t *MaprSecret) GetSecretNamespace() string
GetSecretNamespace returns the namespace of the secret
func (*MaprSecret) GetStatusString ¶
func (t *MaprSecret) GetStatusString() string
GetStatusString returns a human readable string describing the status of the ticket
func (*MaprSecret) GetUser ¶
func (t *MaprSecret) GetUser() string
GetUser returns the user of the ticket
type MaprVolume ¶
type MaprVolume struct { Volume *PersistentVolume Ticket *MaprSecret }
MaprVolume is a wrapper around a PersistentVolume that provides additional functionality.
type MaprVolumeClaim ¶
type MaprVolumeClaim struct { Claim *PersistentVolumeClaim Volume *PersistentVolume Ticket *MaprSecret }
MaprVolumeClaim is used to store a claim, the volume it is bound to, and the ticket used by that volume
type PersistentVolume ¶
type PersistentVolume coreV1.PersistentVolume
PersistentVolume is a wrapper around coreV1.PersistentVolume that provides additional functionality.
func (*PersistentVolume) GetClaimName ¶
func (v *PersistentVolume) GetClaimName() string
GetClaimName returns the name of the PVC that is bound to the volume
func (*PersistentVolume) GetClaimNamespace ¶
func (v *PersistentVolume) GetClaimNamespace() string
GetClaimNamespace returns the namespace of the PVC that is bound to the volume
func (*PersistentVolume) GetName ¶
func (v *PersistentVolume) GetName() string
GetName returns the name of the volume
func (*PersistentVolume) GetSecretName ¶
func (v *PersistentVolume) GetSecretName() string
GetSecretName returns the name of the NodePublishSecretRef of the volume
func (*PersistentVolume) GetSecretNamespace ¶
func (v *PersistentVolume) GetSecretNamespace() string
GetSecretNamespace returns the namespace of the NodePublishSecretRef of the volume
func (*PersistentVolume) GetVolumeHandle ¶
func (v *PersistentVolume) GetVolumeHandle() string
GetVolumeHandle returns the volume handle of the volume
func (*PersistentVolume) GetVolumePath ¶
func (v *PersistentVolume) GetVolumePath() string
GetVolumePath returns the volume path of the volume
func (*PersistentVolume) IsMaprCSIBased ¶
func (v *PersistentVolume) IsMaprCSIBased() bool
IsMaprCSIBased returns true if the volume is provisioned by one of the MapR CSI provisioners and false otherwise.
func (*PersistentVolume) UsesSecret ¶
func (volume *PersistentVolume) UsesSecret(namespace, name string) bool
UsesSecret returns true if the volume uses the specified secret and false otherwise. If the secret name is equal to the value of SecretAll, all volumes that use a secret from the specified namespace are returned. If the secret namespace is equal to the value of NamespaceAll, basically all volumes that any secret in any namespace will evaluate to true.
type PersistentVolumeClaim ¶
type PersistentVolumeClaim coreV1.PersistentVolumeClaim
PersistentVolumeClaim is a wrapper around coreV1.PersistentVolumeClaim that provides additional functionality.
func (*PersistentVolumeClaim) GetName ¶
func (c *PersistentVolumeClaim) GetName() string
GetName returns the name of the claim
func (*PersistentVolumeClaim) GetNamespace ¶
func (c *PersistentVolumeClaim) GetNamespace() string
GetNamespace returns the namespace of the claim
func (*PersistentVolumeClaim) IsBound ¶
func (c *PersistentVolumeClaim) IsBound() bool
IsBound returns true if the claim is bound to a volume