package
0.0.0-20240815173558-303cc3735024
Repository: https://github.com/libopenstorage/operator.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
AddOrUpdateStoragePodTolerations adds tolerations to the given pod spec that are required for running storage pods as they need to tolerate built-in taints in the system TODO: make the storage cluster pod a critical pod to guarantee scheduling.
AppendObjectList gets objects from k8s and adds to the list.
CheckPredicatesForStoragePod checks if a StorageCluster pod can run on a node Returned booleans are: - shouldRun: Returns true when a pod should run on the node if a storage pod is not already running on that node.
CreateCRD creates a crd if not present.
CreateOrAppendToSecret creates a secret if not present, else appends data to it.
CreateOrUpdateAlertManager creates a AlertManager object if not present, else updates it.
CreateOrUpdateClusterRole creates a cluster role if not present, else updates it if it has changed.
CreateOrUpdateClusterRoleBinding creates a cluster role binding if not present, else updates it if it has changed.
CreateOrUpdateConfigMap creates a config map if not present, else updates it if it has changed returns whether data is modified.
CreateOrUpdateConsolePlugin creates a ConsolePlougin instance of ConsolePlugin CRD if not present, else updates it.
CreateOrUpdateCRD creates a crd if not present or update it.
CreateOrUpdateCSIDriver creates a CSIDriver if not present, else updates it if it has changed.
CreateOrUpdateCSIDriverBeta creates a CSIDriver if not present, else updates it if it has changed.
CreateOrUpdateDaemonSet creates a daemon set if not present, else updates it.
CreateOrUpdateDeployment creates a deployment if not present, else updates it.
CreateOrUpdatePodDisruptionBudget creates a PodDisruptionBudget object if not present, else updates it.
CreateOrUpdatePrometheus creates a Prometheus object if not present, else updates it.
CreateOrUpdatePrometheusRule creates a PrometheusRule if not present, else updates it.
CreateOrUpdateRole creates a role if not present, else updates it if it has changed.
CreateOrUpdateRoleBinding creates a role binding if not present, else updates it if it has changed.
CreateOrUpdateSecret creates a secret if not present, else updates it.
CreateOrUpdateService creates a service if not present, else updates it.
CreateOrUpdateServiceAccount creates a service account if not present, else updates it if it has changed.
CreateOrUpdateServiceMonitor creates a ServiceMonitor if not present, else updates it.
CreateOrUpdateStatefulSet creates a stateful set if not present, else updates it.
CreateOrUpdateStorageNode creates a StorageNode if not present, else updates it.
CreateStorageClass creates a storage class only if not present.
DeleteAlertManager deletes a AlertManager instance if present and owned.
DeleteClusterRole deletes a cluster role if present.
DeleteClusterRoleBinding deletes a cluster role binding if present.
DeleteConfigMap deletes a config map if present and owned.
DeleteConsolePlugin deletes a ConsolePlugin instance of ConsolePlugin CRD if present and owned.
DeleteCSIDriver deletes the CSIDriver beta object if present.
DeleteCSIDriverBeta deletes the CSIDriver beta object if present.
DeleteDaemonSet deletes a DaemonSet if present and owned.
DeleteDeployment deletes a deployment if present and owned.
DeletePodDisruptionBudget deletes a PodDisruptionBudget instance if present and owned.
DeletePodsByLabel deletes pods by label, from a given namespace.
DeletePrometheus deletes a Prometheus instance if present and owned.
DeletePrometheusRule deletes a PrometheusRule if present and owned.
DeleteRole deletes a role if present and owned.
DeleteRoleBinding deletes a role binding if present and owned.
DeleteSecret deletes a secret if present and owned.
DeleteService deletes a service if present and owned.
DeleteServiceAccount deletes a service account if present and owned.
DeleteServiceMonitor deletes a ServiceMonitor if present and owned.
DeleteStatefulSet deletes a stateful set if present and owned.
DeleteStorageClass deletes a storage class if present.
GetAllObjects gets all objects from k8s.
GetContainerFromDeployment returns the container given the name in the deployment.
GetCRDFromFile parses a CRD definition filename from crdBaseDir and returns the parsed object.
GetDaemonSet get daemonset.
GetDaemonSetFromFile parses a DaemonSet object from a file.
GetDaemonSetPods returns a list of pods for the given daemon set.
No description provided by the author
No description provided by the author
GetDeployment get deployment.
GetDeploymentFromFile parses a Deployment object from a file.
GetFullVersion returns the full kubernetes server version.
GetImageFromDeployment returns the image for given container in the deployment.
GetImagePullPolicyFromDeployment returns the image pull policy for given container in the deployment.
GetPodsByOwner returns pods for a given owner and namespace.
GetRoleBindingFromFile parses a RoleBinding object from a file.
GetRoleFromFile parses a Role object from a file.
GetSecret gets secret.
GetV1beta1CRDFromFile parses a CRD definition filename from crdBaseDir and returns the parsed object.
GetValueFromEnv returns a value for the given key name in list of env vars.
GetValueFromEnvVar returns the value of v1.EnvVar Value or ValueFrom.
GetVersion returns the kubernetes server version.
InfoEvent logs and records a info event for the given object on the given recorder.
IsClusterBeingUpgraded checks if the Kubernetes cluster is being upgraded.
IsNewKubernetesRegistry returns true if the kubernetes images for the given k8s version are stored in a newer container registry.
IsNodeBeingDeleted returns true if the underlying machine for the Kubernetes node is being deleted.
IsNodeCordoned returns true if the given noode is marked unschedulable.
IsPodRecentlyCreatedAfterNodeCordoned returns true if the given node is cordoned and the pod has been created within the delay, exponential backoff is applied here.
NewK8sClient returns a new controller runtime Kubernetes client.
ParseObjectFromFile reads the given file and loads the object from the file in obj.
UpdateStorageCluster updates given StorageCluster object on the latest copy.
UpdateStorageClusterStatus updates the status of given StorageCluster object on the latest copy.
WarningEvent logs and records a warning event for the given object on the given recorder.

# Constants

Constants for k8s object kinds.
Constants for k8s object kinds.
Constants for k8s object kinds.
Constants for k8s object kinds.
Constants for k8s object kinds.
Constants for k8s object kinds.
Constants for k8s object kinds.
UpdateRevisionConflictErr contains controller-runtime update error message when updating stale objects.

# Variables

K8sVer1_13 k8s 1.13.
K8sVer1_17 k8s 1.17.
K8sVer1_18 k8s 1.18.
K8sVer1_20 k8s 1.20.
K8sVer1_22 k8s 1.22.
K8sVer1_24 k8s 1.24.
K8sVer1_25 k8s 1.25.
K8sVer1_26 k8s 1.26.
MinVersionForKubeSchedulerConfiguration k8s 1.23.0.

# Structs

NodeInfo contains information of a k8s node, consumed by controllers.

# Type aliases

EnvByName date interface type to sort Kubernetes environment variables by name.
VolumeByName date interface type to sort Kubernetes volumes by name.
VolumeMountByName date interface type to sort Kubernetes volume mounts by name.