hostpathprovisioner

package
v0.19.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 52 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// OperatorImageDefault is the default value of the operator container image name.
	OperatorImageDefault = "hostpath-provisioner-operator"
	// ProvisionerImageDefault is the default value of the provisioner container image name.
	ProvisionerImageDefault = "hostpath-provisioner"
	// CsiProvisionerImageDefault is the default value of the hostpath provisioner csi container image name.
	CsiProvisionerImageDefault = "hostpath-provisioner-csi"
	// CsiNodeDriverRegistrationImageDefault is the default value of the sig storage csi node registration side car container image name.
	CsiNodeDriverRegistrationImageDefault = "registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.2.0"
	// LivenessProbeImageDefault is the default value of the liveness probe side car container image name.
	LivenessProbeImageDefault = "registry.k8s.io/sig-storage/livenessprobe:v2.3.0"
	// SnapshotterImageDefault is the default value of the csi snapshotter side car container image name.
	SnapshotterImageDefault = "registry.k8s.io/sig-storage/csi-snapshotter:v4.2.1"
	// CsiSigStorageProvisionerImageDefault is the default value of the sig storage csi provisioner side car container image name.
	CsiSigStorageProvisionerImageDefault = "registry.k8s.io/sig-storage/csi-provisioner:v3.4.1"

	// OperatorServiceAccountName is the name of Service Account used to run the operator.
	OperatorServiceAccountName = "hostpath-provisioner-operator"
	// ProvisionerServiceAccountName is the name of Service Account used to run the controller.
	ProvisionerServiceAccountName = "hostpath-provisioner-admin"
	// ProvisionerServiceAccountNameCsi is the name of Service Account used to run the csi driver.
	ProvisionerServiceAccountNameCsi = "hostpath-provisioner-admin-csi"

	// MultiPurposeHostPathProvisionerName is the name used for the DaemonSet, ClusterRole/Binding, SCC and k8s-app label value.
	MultiPurposeHostPathProvisionerName = "hostpath-provisioner"
	// PartOfLabelEnvVarName is the environment variable name for the part-of label value
	PartOfLabelEnvVarName = "INSTALLER_PART_OF_LABEL"
	// VersionLabelEnvVarName is the environment variable name for the version label value
	VersionLabelEnvVarName = "INSTALLER_VERSION_LABEL"

	// AppKubernetesPartOfLabel is the Kubernetes recommended part-of label
	AppKubernetesPartOfLabel = "app.kubernetes.io/part-of"
	// AppKubernetesVersionLabel is the Kubernetes recommended version label
	AppKubernetesVersionLabel = "app.kubernetes.io/version"
	// AppKubernetesManagedByLabel is the Kubernetes recommended managed-by label
	AppKubernetesManagedByLabel = "app.kubernetes.io/managed-by"
	// AppKubernetesComponentLabel is the Kubernetes recommended component label
	AppKubernetesComponentLabel = "app.kubernetes.io/component"

	// PrometheusLabelKey provides the label to indicate prometheus metrics are available in the pods.
	PrometheusLabelKey = "prometheus.hostpathprovisioner.kubevirt.io"
	// PrometheusLabelValue provides the label value which shouldn't be empty to avoid a prometheus WIP issue.
	PrometheusLabelValue = "true"
	// PrometheusServiceName is the name of the prometheus service created by the operator.
	PrometheusServiceName = "hpp-prometheus-metrics"
)

Variables

This section is empty.

Functions

func Add

func Add(mgr manager.Manager) error

Add creates a new HostPathProvisioner Controller and adds it to the Manager. The Manager will set fields on the Controller and Start it when the Manager is Started.

func AddFinalizer added in v0.11.0

func AddFinalizer(obj metav1.Object, name string)

AddFinalizer adds a finalizer to a resource

func HasFinalizer added in v0.11.0

func HasFinalizer(object metav1.Object, value string) bool

HasFinalizer returns true if a resource has a specific finalizer

func IsCrHealthy added in v0.5.0

IsCrHealthy returns true if the application is healthy. Healthy means the following status conditions are set: ApplicationAvailable: true Progressing: false Degraded: false

func IsHppAvailable added in v0.11.0

IsHppAvailable returns whether the HPP installation is available for use

func IsHppProgressing added in v0.11.0

func IsHppProgressing(cr *hostpathprovisionerv1.HostPathProvisioner) bool

IsHppProgressing returns whether the HPP installation is still doing progress of some sort

func MarkCrDeploying

func MarkCrDeploying(cr *hostpathprovisionerv1.HostPathProvisioner, reason, message string)

MarkCrDeploying marks the passed CR as currently deploying. The CR object needs to be updated by the caller afterwards. Deploying means the following status conditions are set: ApplicationAvailable: false Progressing: true Degraded: false

func MarkCrFailed

func MarkCrFailed(cr *hostpathprovisionerv1.HostPathProvisioner, reason, message string)

MarkCrFailed marks the passed CR as failed and requiring human intervention. The CR object needs to be updated by the caller afterwards. Failed means the following status conditions are set: ApplicationAvailable: false Progressing: false Degraded: true

func MarkCrFailedHealing

func MarkCrFailedHealing(cr *hostpathprovisionerv1.HostPathProvisioner, reason, message string)

MarkCrFailedHealing marks the passed CR as failed and healing. The CR object needs to be updated by the caller afterwards. FailedAndHealing means the following status conditions are set: ApplicationAvailable: false Progressing: true Degraded: true

func MarkCrHealthyMessage

func MarkCrHealthyMessage(cr *hostpathprovisionerv1.HostPathProvisioner, reason, message string)

MarkCrHealthyMessage marks the passed in CR as healthy. The CR object needs to be updated by the caller afterwards. Healthy means the following status conditions are set: ApplicationAvailable: true Progressing: false Degraded: false

func MarkCrUpgradeHealingDegraded

func MarkCrUpgradeHealingDegraded(cr *hostpathprovisionerv1.HostPathProvisioner, reason, message string)

MarkCrUpgradeHealingDegraded marks the passed CR as upgrading and degraded. The CR object needs to be updated by the caller afterwards. Failed means the following status conditions are set: ApplicationAvailable: true Progressing: true Degraded: true

func RemoveFinalizer added in v0.11.0

func RemoveFinalizer(obj metav1.Object, name string)

RemoveFinalizer removes a finalizer from a resource

Types

type ReconcileHostPathProvisioner

type ReconcileHostPathProvisioner struct {
	Log logr.Logger
	// contains filtered or unexported fields
}

ReconcileHostPathProvisioner reconciles a HostPathProvisioner object

func (*ReconcileHostPathProvisioner) Reconcile

Reconcile reads that state of the cluster for a HostPathProvisioner object and makes changes based on the state read and what is in the HostPathProvisioner.Spec The Controller will requeue the Request to be processed again if the returned error is non-nil or Result.Requeue is true, otherwise upon completion it will remove the work from the queue.

type StoragePoolInfo added in v0.11.0

type StoragePoolInfo struct {
	Name string `json:"name"`
	Path string `json:"path"`
}

StoragePoolInfo contains the name and path of a hostpath storage pool.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL