defaults

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SecurityContextConstraints is the permission control mechanism in OpenShift
	SecurityContextConstraints = "nfs-provisioner"

	// HostPathDir is the default directory that NFS server will use
	HostPathDir = "/home/core/nfs"

	// StorageSize is the default PVC size for NFS server
	StorageSize = "10Gi"

	// Pvc is the default storage for NFS server
	Pvc = "nfs-server"

	// SCForNFSPvc is the default storageClass name to create PVC for NFS server
	SCForNFSPvc = "local-sc"

	// ServiceAccount is the project level main sa that has power to control NFS provisioners
	ServiceAccount = "nfs-provisioner"

	// ClusterRole is for NFS Provisioner to create SC/PV/PVC
	ClusterRole = "nfs-provisioner-runner"

	// ClusterRoleBinding matches ClusterRole and ServiceAccount
	ClusterRoleBinding = "nfs-provisioner-runner"

	// Role gives the permissions to get endpoints/services for NFS server
	Role = "leader-locking-nfs-provisioner"

	// RoleBinding gives the Role to the SA
	RoleBinding = "leader-locking-nfs-provisioner"

	// Deployment is for NFS server
	Deployment = "nfs-provisioner"

	// Service is for NFS provisioner to access to NFS Server
	Service = "nfs-provisioner"

	// SCForNFSProvisioner is for NFS Provisioner
	SCForNFSProvisioner = "nfs"

	// NFSImage is the default NFS provisioner image
	NFSImage = "registry.k8s.io/sig-storage/nfs-provisioner:v4.0.8"

	// NFSImagePullPolicy is the default pull policy for NFS provisioner image
	NFSImagePullPolicy = corev1.PullIfNotPresent
)

Default values for NFSProvisioner resources

Variables

View Source
var NodeSelector = map[string]string{"app": "nfs-provisioner"}

NodeSelector is for the node where NFS server will be running

Functions

func ApplyDefaults

func ApplyDefaults(nfs *cachev1alpha1.NFSProvisioner)

ApplyDefaults mutates the NFSProvisioner resource to apply default values for any unset optional fields.

Defaults:

  • spec.storageSize: "10Gi"
  • spec.scForNFS: "nfs"
  • spec.nfsImageConfiguration.image: (default NFS provisioner image)
  • spec.nfsImageConfiguration.imagePullPolicy: "IfNotPresent"

Types

This section is empty.

Jump to

Keyboard shortcuts

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