Documentation ¶
Index ¶
- Constants
- func Add(mgr manager.Manager) error
- func AddFinalizer(obj metav1.Object, name string)
- func HasFinalizer(object metav1.Object, value string) bool
- func IsCrHealthy(cr *hostpathprovisionerv1.HostPathProvisioner) bool
- func IsHppAvailable(cr *hostpathprovisionerv1.HostPathProvisioner) bool
- func IsHppProgressing(cr *hostpathprovisionerv1.HostPathProvisioner) bool
- func MarkCrDeploying(cr *hostpathprovisionerv1.HostPathProvisioner, reason, message string)
- func MarkCrFailed(cr *hostpathprovisionerv1.HostPathProvisioner, reason, message string)
- func MarkCrFailedHealing(cr *hostpathprovisionerv1.HostPathProvisioner, reason, message string)
- func MarkCrHealthyMessage(cr *hostpathprovisionerv1.HostPathProvisioner, reason, message string)
- func MarkCrUpgradeHealingDegraded(cr *hostpathprovisionerv1.HostPathProvisioner, reason, message string)
- func RemoveFinalizer(obj metav1.Object, name string)
- type ReconcileHostPathProvisioner
- type RecordRulesDesc
- type StoragePoolInfo
Constants ¶
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 ¶
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
AddFinalizer adds a finalizer to a resource
func HasFinalizer ¶ added in v0.11.0
HasFinalizer returns true if a resource has a specific finalizer
func IsCrHealthy ¶ added in v0.5.0
func IsCrHealthy(cr *hostpathprovisionerv1.HostPathProvisioner) bool
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
func IsHppAvailable(cr *hostpathprovisionerv1.HostPathProvisioner) bool
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
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 ¶
func (r *ReconcileHostPathProvisioner) Reconcile(context context.Context, request reconcile.Request) (reconcile.Result, error)
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 RecordRulesDesc ¶ added in v0.12.1
RecordRulesDesc represent HPP Prometheus Record Rules
func GetRecordRulesDesc ¶ added in v0.12.1
func GetRecordRulesDesc(namespace string) []RecordRulesDesc
GetRecordRulesDesc returns HPPgst Prometheus Record Rules
type StoragePoolInfo ¶ added in v0.11.0
StoragePoolInfo contains the name and path of a hostpath storage pool.