Abstract
Local Static Provisioner, values and templates.
Local Static Provisioner and Templates#
This service enables easier use of static local storage provisioning to provide a slightly more dynamic usage.
Local Static Provisioner Chart#
This chart deploys a DaemonSet
that handles provisioning of local storage
resources.
- apiVersion
Local Static Provisioner Chart
This is the chart for the local static provisioner storage provisioner.
### # ```{rubric} Local Static Provisioner Chart # ``` # --- # This is the chart for the local static provisioner storage provisioner. # # ```{literalinclude} /local-static-provisioner/Chart.yaml # :language: yaml # ``` apiVersion: v2 appVersion: 2.6.0 description: Helm chart for the SIG Storage Local Volume Static Provisioner. home: https://github.com/kubernetes-sigs/sig-storage-local-static-provisioner/ icon: file://../../_static/local-static-provisioner.png keywords: - storage - local - volume name: local-static-provisioner sources: - https://github.com/kubernetes-sigs/sig-storage-local-static-provisioner/ type: application version: 2.0.0
Local Static Provisioner Values#
You can adjust the deployment of the local static provisioner with the contents
of the file local-static-provisioner/values.yaml
.
- nameOverride
Local Static Provisioner values
Values for the local static provisioner
### # ```{rubric} Local Static Provisioner values # ``` # --- # Values for the local static provisioner # # ```{literalinclude} /local-static-provisioner/values.yaml # :language: yaml # ``` # # Override the default chart name or release name nameOverride: "" fullnameOverride: "" ### # Role Based Access Control rbac: ### # rbac.create: `true` if rbac resources should be created create: true ### # list of additional rbac rules that may be needed by init containers extraRules: [] ### # Defines whether to generate a serviceAccount serviceAccount: ### # serviceAccount.create: Whether to create a service account or not create: true ### # serviceAccount.name: The name of the service account to create or use name: "storage" ### # Indicates if PVs should be dependents of the owner Node. setPVOwnerRef: false ### # Provisioner clean volumes in process by default. If set to true, provisioner # will use Jobs to clean. useJobForCleaning: false ### # Provisioner name contains Node.UID by default. If set to true, the provisioner # name will only use Node.Name. useNodeNameOnly: false ### # Resync period in reflectors will be random between minResyncPeriod and # 2*minResyncPeriod. Default: 5m0s. #minResyncPeriod: 5m0s # Additional volumes to create, for the default container and init containers # to consume additionalVolumes: [] ### # Mount the host's `/dev/` by default so that block device symlinks can be # resolved by the containers mountDevVolume: true ### # Additional volumes to mount to the default container, the volumes should # either be host paths or defined by additionalVolumes additionalVolumeMounts: [] ### # Map of label key-value pairs to apply to the PVs created by the # provisioner. Uncomment to add labels to the list. #labelsForPV: # pv-labels: can-be-selected # Indicates if Windows DaemonSet should be created enableWindows: false ### # Configuration for classes of static volumes. classes: ### # Defines name of storage classes. - name: usb ### # Path on the host where local volumes of this storage class are mounted # under. hostDir: /mnt/usb ### # Optionally specify mount path of local volumes. By default, we use same # path as hostDir in container. # mountDir: /mnt/fast-disks # The volume mode of created PersistentVolume object. Default to Filesystem # if not specified. volumeMode: Filesystem ### # Filesystem type to mount. # It applies only when the source path is a block device, # and desire volume mode is Filesystem. # Must be a filesystem type supported by the host operating system. fsType: btrfs ### # File name pattern to discover. By default, discover all file names. namePattern: "*" ### # Restrict topology of provisioned volumes to specific labels allowedTopologies: ### # Do a quick reset of the block device during its cleanup. # - "/scripts/quick_reset.sh" # or use dd to zero out block dev in two iterations by uncommenting these lines # - "/scripts/dd_zero.sh" # - "2" # or run shred utility for 2 iteration.s blockCleanerCommand: - "/scripts/shred.sh" - "2" # or blkdiscard utility by uncommenting the line below. # - "/scripts/blkdiscard.sh" # Uncomment to create storage class object with default configuration. # storageClass: true # Uncomment to create storage class object and configure it. # storageClass: # reclaimPolicy: Delete # Available reclaim policies: Delete/Retain, defaults: Delete. # isDefaultClass: true # set as default class ### # Defines annotations for each Pod in the DaemonSet. podAnnotations: {} ### # Defines labels for each Pod in the DaemonSet. podLabels: {} ### # Defines Provisioner's image name including container registry. image: registry.k8s.io/sig-storage/local-volume-provisioner:v2.6.0 ### # Defines Image download policy, see kubernetes documentation for available values. # imagePullPolicy: Always # Defines a name of the Pod Priority Class to use with the Provisioner DaemonSet # Note that if you want to make it critical, specify "system-cluster-critical" # or "system-node-critical" and deploy in kube-system namespace. # Ref: https://k8s.io/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/#marking-pod-as-critical #priorityClassName: system-node-critical # If configured, nodeSelector will add a nodeSelector field to the DaemonSet PodSpec. # # NodeSelector constraint for local-volume-provisioner scheduling to nodes. # Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector nodeSelector: {} nodeSelectorWindows: {} ### # List of node labels to be copied to the PVs created by the provisioner in a format: # # nodeLabels: # - failure-domain.beta.kubernetes.io/zone # - failure-domain.beta.kubernetes.io/region # # If configured, tolerations will add a toleration field to the DaemonSet PodSpec. # # Node tolerations for local-volume-provisioner scheduling to nodes with taints. # Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ tolerations: [] ### # If configured, affinity will add a affinity filed to the DeamonSet PodSpec. # Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity affinity: {} ### # If configured, resources will set the requests/limits field to the Daemonset PodSpec. # Ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ resources: {} # limits: # memory: "512Mi" # cpu: "1000m" # requests: # memory: "32Mi" # cpu: "10m" ### # # If set to false, containers created by the Provisioner Daemonset will run without extra privileges. privileged: true ### # Any init containers can be configured here. # Ref: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ initContainers: [] ### # # Configure Prometheus monitoring # serviceMonitor: enabled: false ### # Interval at which Prometheus scrapes the provisioner interval: 10s ### # Namespace Prometheus is installed in defaults to release namespace namespace: ### Defaults to whats used if you follow CoreOS [Prometheus Install Instructions](https://github.com/coreos/prometheus-operator/tree/master/helm#tldr) # [Prometheus Selector Label](https://github.com/coreos/prometheus-operator/blob/master/helm/prometheus/templates/prometheus.yaml#L65) # [Kube Prometheus Selector Label](https://github.com/coreos/prometheus-operator/blob/master/helm/kube-prometheus/values.yaml#L298) additionalLabels: {} relabelings: [] # - sourceLabels: [__meta_kubernetes_pod_node_name] # separator: ; # regex: ^(.*)$ # targetLabel: nodename # replacement: $1 # action: replace
Override the default chart name or release name
- rbac
Role Based Access Control
- serviceAccount
Defines whether to generate a serviceAccount
- setPVOwnerRef
Indicates if PVs should be dependents of the owner Node.
- useJobForCleaning
Provisioner clean volumes in process by default. If set to true, provisioner will use Jobs to clean.
- useNodeNameOnly
Provisioner name contains Node.UID by default. If set to true, the provisioner name will only use Node.Name.
- additionalVolumes
Resync period in reflectors will be random between minResyncPeriod and 2*minResyncPeriod. Default: 5m0s. minResyncPeriod: 5m0s Additional volumes to create, for the default container and init containers to consume
- mountDevVolume
Mount the host’s
/dev/
by default so that block device symlinks can be resolved by the containers- additionalVolumeMounts
Additional volumes to mount to the default container, the volumes should either be host paths or defined by additionalVolumes
- enableWindows
Map of label key-value pairs to apply to the PVs created by the provisioner. Uncomment to add labels to the list. labelsForPV: pv-labels: can-be-selected Indicates if Windows DaemonSet should be created
- classes
Configuration for classes of static volumes.
- podAnnotations
Defines annotations for each Pod in the DaemonSet.
- podLabels
Defines labels for each Pod in the DaemonSet.
- image
Defines Provisioner’s image name including container registry.
- nodeSelector
Defines Image download policy, see kubernetes documentation for available values. imagePullPolicy: Always Defines a name of the Pod Priority Class to use with the Provisioner DaemonSet Note that if you want to make it critical, specify “system-cluster-critical” or “system-node-critical” and deploy in kube-system namespace. Ref: https://k8s.io/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/#marking-pod-as-critical priorityClassName: system-node-critical If configured, nodeSelector will add a nodeSelector field to the DaemonSet PodSpec.
NodeSelector constraint for local-volume-provisioner scheduling to nodes. Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
- tolerations
List of node labels to be copied to the PVs created by the provisioner in a format:
nodeLabels:
If configured, tolerations will add a toleration field to the DaemonSet PodSpec.
Node tolerations for local-volume-provisioner scheduling to nodes with taints. Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
- affinity
If configured, affinity will add a affinity filed to the DeamonSet PodSpec. Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity
- resources
If configured, resources will set the requests/limits field to the Daemonset PodSpec. Ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
- privileged
If set to false, containers created by the Provisioner Daemonset will run without extra privileges.
- initContainers
Any init containers can be configured here. Ref: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
- serviceMonitor
Configure Prometheus monitoring
Section author: Xander Harris xandertheharris@gmail.com