Documentation ¶
Index ¶
- func AddString(slice *[]string, s string) bool
- func AnnotationsToEnv(o metav1.Object, mapping []storageapi.EnvVar) (env []corev1.EnvVar, err error)
- func CopyAnnotations(src, dest metav1.Object, mapping []storageapi.EnvVar)
- func DeletePod(ctx context.Context, client client.Client, name types.NamespacedName, ...) (done bool, err error)
- func DeleteResource(ctx context.Context, client client.Client, o client.Object, log logr.Logger) (done bool, err error)
- func GetCondition(conditions []metav1.Condition, condType string) *metav1.Condition
- func HasString(slice []string, s string) bool
- func NewProvisionerPod(src PodSource) (*corev1.Pod, error)
- func PodToRequestMapper(namespace, annName, annNamespace string) handler.EventHandler
- func ReconcilePod(ctx context.Context, client client.Client, name types.NamespacedName, ...) (done bool, pod *corev1.Pod, err error)
- func RemoveString(slice *[]string, s string) (removed bool)
- func ResourceName(ownerName, suffix string) string
- func SetCondition(conditions *[]metav1.Condition, newCond metav1.Condition) bool
- func StorageProvisionerFromJSON(data string) (*storageapi.StorageProvisioner, error)
- func StorageProvisionerToJSON(provisioner *storageapi.StorageProvisioner) (string, error)
- func StorageRootPathForNode(nodeName string, mapping []storageapi.NodePath) (string, error)
- func Substitute(o runtime.Object, values *template.Substitution) error
- func SubstituteProvisionerPlaceholders(tpl *storageapi.StorageProvisioner, p ProvisionerParams) error
- type ContainerParams
- type JobReconciler
- type JobRequest
- type PodSource
- type ProvisionerParams
- type Volume
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnnotationsToEnv ¶
func CopyAnnotations ¶
func CopyAnnotations(src, dest metav1.Object, mapping []storageapi.EnvVar)
func DeleteResource ¶
func GetCondition ¶
GetCondition returns the condition of the given type from the list of conditions or nil if it doesn't exist
func PodToRequestMapper ¶
func PodToRequestMapper(namespace, annName, annNamespace string) handler.EventHandler
func ReconcilePod ¶
func ReconcilePod(ctx context.Context, client client.Client, name types.NamespacedName, create func() (*corev1.Pod, error)) (done bool, pod *corev1.Pod, err error)
ReconcilePod reconciles a Pod
func RemoveString ¶
RemoveString removes a string from the given slice
func ResourceName ¶
func SetCondition ¶
SetCondition adds or updates a condition
func StorageProvisionerFromJSON ¶
func StorageProvisionerFromJSON(data string) (*storageapi.StorageProvisioner, error)
func StorageProvisionerToJSON ¶
func StorageProvisionerToJSON(provisioner *storageapi.StorageProvisioner) (string, error)
func StorageRootPathForNode ¶
func StorageRootPathForNode(nodeName string, mapping []storageapi.NodePath) (string, error)
func Substitute ¶
func Substitute(o runtime.Object, values *template.Substitution) error
func SubstituteProvisionerPlaceholders ¶
func SubstituteProvisionerPlaceholders(tpl *storageapi.StorageProvisioner, p ProvisionerParams) error
Types ¶
type ContainerParams ¶
type JobReconciler ¶
type JobReconciler struct { Client client.Client Recorder record.EventRecorder AnnotationOwnerName string AnnotationOwnerNamespace string }
TODO: use this in all controllers to run de/provisioner Pods
func (*JobReconciler) ReconcileJob ¶
func (r *JobReconciler) ReconcileJob(req JobRequest) (bool, error)
type JobRequest ¶
type PodSource ¶
type PodSource struct { PodName types.NamespacedName ContainerName string SubstitutedProvisioner *storageapi.StorageProvisioner Container *storageapi.ProvisionerContainer Env []corev1.EnvVar }
type ProvisionerParams ¶
type ProvisionerParams struct { NodeName string NodePath string PersistentVolumeName string PersistentVolumeClaim types.NamespacedName }
Click to show internal directories.
Click to hide internal directories.