Initial commit
This commit is contained in:
6
charts/lvm-localpv/Chart.lock
Normal file
6
charts/lvm-localpv/Chart.lock
Normal file
@@ -0,0 +1,6 @@
|
||||
dependencies:
|
||||
- name: crds
|
||||
repository: ""
|
||||
version: 1.8.0
|
||||
digest: sha256:21f9b5c7bfa148f097a5fb8ec53c5b14c94cc3cebe06fc55d5b79960b72f79cb
|
||||
generated: "2025-11-18T07:25:52.778067818Z"
|
||||
21
charts/lvm-localpv/Chart.yaml
Normal file
21
charts/lvm-localpv/Chart.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
apiVersion: v2
|
||||
appVersion: 1.8.0
|
||||
dependencies:
|
||||
- condition: crds.enabled
|
||||
name: crds
|
||||
repository: ""
|
||||
version: 1.8.0
|
||||
description: CSI Driver for dynamic provisioning of LVM Persistent Local Volumes.
|
||||
home: https://openebs.io/
|
||||
icon: https://raw.githubusercontent.com/cncf/artwork/master/projects/openebs/icon/color/openebs-icon-color.png
|
||||
keywords:
|
||||
- cloud-native-storage
|
||||
- block-storage
|
||||
- filesystem
|
||||
- LVM
|
||||
- Local Persistent Volumes
|
||||
- storage
|
||||
name: lvm-localpv
|
||||
sources:
|
||||
- https://github.com/openebs/lvm-localpv
|
||||
version: 1.8.0
|
||||
153
charts/lvm-localpv/README.md
Normal file
153
charts/lvm-localpv/README.md
Normal file
@@ -0,0 +1,153 @@
|
||||
|
||||
# OpenEBS LocalPV Provisioner
|
||||
|
||||
[](https://opensource.org/licenses/Apache-2.0)
|
||||

|
||||

|
||||
|
||||
A Helm chart for openebs lvm localpv provisioner. This chart bootstraps OpenEBS LVM LocalPV provisioner deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
|
||||
|
||||
|
||||
**Homepage:** <http://www.openebs.io/>
|
||||
|
||||
## Get Repo Info
|
||||
|
||||
```console
|
||||
helm repo add openebs-lvmlocalpv https://openebs.github.io/lvm-localpv
|
||||
helm repo update
|
||||
```
|
||||
|
||||
_See [helm repo](https://helm.sh/docs/helm/helm_repo/) for command documentation._
|
||||
|
||||
## Install Chart
|
||||
|
||||
Please visit the [link](https://openebs.github.io/lvm-localpv/) for install instructions via helm3.
|
||||
|
||||
```console
|
||||
# Helm
|
||||
$ helm install [RELEASE_NAME] openebs-lvmlocalpv/lvm-localpv --namespace [NAMESPACE]
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>Click here if you're using MicroK8s.</summary>
|
||||
|
||||
```console
|
||||
microk8s helm3 install [RELEASE_NAME] openebs-lvmlocalpv/lvm-localpv --namespace [NAMESPACE] --set-string lvmNode.kubeletDir="/var/snap/microk8s/common/var/lib/kubelet/"
|
||||
```
|
||||
</details>
|
||||
|
||||
|
||||
**Note:** If moving from the operator to helm
|
||||
- Make sure the namespace provided in the helm install command is same as `OPENEBS_NAMESPACE` (by default it is `openebs`) env in the controller deployment.
|
||||
- Before installing, clean up the stale deployment and daemonset from `kube-system` namespace using the below commands
|
||||
```sh
|
||||
kubectl delete deployment openebs-lvm-controller -n kube-system
|
||||
kubectl delete ds openebs-lvm-node -n kube-system
|
||||
```
|
||||
|
||||
|
||||
_See [configuration](#configuration) below._
|
||||
|
||||
_See [helm install](https://helm.sh/docs/helm/helm_install/) for command documentation._
|
||||
|
||||
## Uninstall Chart
|
||||
|
||||
```console
|
||||
# Helm
|
||||
$ helm uninstall [RELEASE_NAME]
|
||||
```
|
||||
|
||||
This removes all the Kubernetes components associated with the chart and deletes the release.
|
||||
|
||||
_See [helm uninstall](https://helm.sh/docs/helm/helm_uninstall/) for command documentation._
|
||||
|
||||
## Upgrading Chart
|
||||
|
||||
```console
|
||||
# Helm
|
||||
$ helm upgrade [RELEASE_NAME] [CHART] --install --namespace [NAMESPACE]
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
The following table lists the configurable parameters of the OpenEBS LVM Localpv chart and their default values.
|
||||
|
||||
```console
|
||||
helm install openebs-lvmlocalpv openebs-lvmlocalpv/lvm-localpv --namespace openebs --create-namespace
|
||||
```
|
||||
<details>
|
||||
<summary>Click here if you're using MicroK8s.</summary>
|
||||
|
||||
If you are using MicroK8s, it is necessary to add the following flag:
|
||||
|
||||
```console
|
||||
--set-string lvmNode.kubeletDir="/var/snap/microk8s/common/var/lib/kubelet/"
|
||||
```
|
||||
</details>
|
||||
|
||||
| Parameter | Description | Default |
|
||||
|-----------------------------------------------------|----------------------------------------------------------------------------------|-----------------------------------------|
|
||||
| `crds.csi.volumeSnapshots.enabled` | Enable/Disable installation of VolumeSnapshot-related CRDs | `true` |
|
||||
| `imagePullSecrets` | Provides image pull secret | `""` |
|
||||
| `lvmPlugin.image.registry` | Registry for openebs-lvm-plugin image | `""` |
|
||||
| `lvmPlugin.image.repository` | Image repository for openebs-lvm-plugin | `openebs/lvm-driver` |
|
||||
| `lvmPlugin.image.pullPolicy` | Image pull policy for openebs-lvm-plugin | `IfNotPresent` |
|
||||
| `lvmPlugin.image.tag` | Image tag for openebs-lvm-plugin | `1.6.1` |
|
||||
| `lvmPlugin.metricsPort` | The TCP port number used for exposing lvm-metrics | `9500` |
|
||||
| `lvmPlugin.allowedTopologies` | The comma seperated list of allowed node topologies | `kubernetes.io/hostname,` |
|
||||
| `lvmNode.driverRegistrar.image.registry` | Registry for csi-node-driver-registrar image | `registry.k8s.io/` |
|
||||
| `lvmNode.driverRegistrar.image.repository` | Image repository for csi-node-driver-registrar | `sig-storage/csi-node-driver-registrar` |
|
||||
| `lvmNode.driverRegistrar.image.pullPolicy` | Image pull policy for csi-node-driver-registrar | `IfNotPresent` |
|
||||
| `lvmNode.driverRegistrar.image.tag` | Image tag for csi-node-driver-registrar | `v2.8.0` |
|
||||
| `lvmNode.updateStrategy.type` | Update strategy for lvmnode daemonset | `RollingUpdate` |
|
||||
| `lvmNode.kubeletDir` | Kubelet mount point for lvmnode daemonset | `"/var/lib/kubelet/"` |
|
||||
| `lvmNode.annotations` | Annotations for lvmnode daemonset metadata | `""` |
|
||||
| `lvmNode.podAnnotations` | Annotations for lvmnode daemonset's pods metadata | `""` |
|
||||
| `lvmNode.resources` | Resource and request and limit for lvmnode daemonset containers | `""` |
|
||||
| `lvmNode.labels` | Labels for lvmnode daemonset metadata | `""` |
|
||||
| `lvmNode.podLabels` | Appends labels to the lvmnode daemonset pods | `""` |
|
||||
| `lvmNode.nodeSelector` | Nodeselector for lvmnode daemonset pods | `""` |
|
||||
| `lvmNode.tolerations` | lvmnode daemonset's pod toleration values | `""` |
|
||||
| `lvmNode.securityContext` | Security context for lvmnode daemonset container | `""` |
|
||||
| `lvmController.resizer.image.registry` | Registry for csi-resizer image | `registry.k8s.io/` |
|
||||
| `lvmController.resizer.image.repository` | Image repository for csi-resizer | `sig-storage/csi-resizer` |
|
||||
| `lvmController.resizer.image.pullPolicy` | Image pull policy for csi-resizer | `IfNotPresent` |
|
||||
| `lvmController.resizer.image.tag` | Image tag for csi-resizer | `v1.8.0` |
|
||||
| `lvmController.snapshotter.image.registry` | Registry for csi-snapshotter image | `registry.k8s.io/` |
|
||||
| `lvmController.snapshotter.image.repository` | Image repository for csi-snapshotter | `sig-storage/csi-snapshotter` |
|
||||
| `lvmController.snapshotter.image.pullPolicy` | Image pull policy for csi-snapshotter | `IfNotPresent` |
|
||||
| `lvmController.snapshotter.image.tag` | Image tag for csi-snapshotter | `v6.2.2` |
|
||||
| `lvmController.snapshotController.image.registry` | Registry for snapshot-controller image | `registry.k8s.io/` |
|
||||
| `lvmController.snapshotController.image.repository` | Image repository for snapshot-controller | `sig-storage/snapshot-controller` |
|
||||
| `lvmController.snapshotController.image.pullPolicy` | Image pull policy for snapshot-controller | `IfNotPresent` |
|
||||
| `lvmController.snapshotController.image.tag` | Image tag for snapshot-controller | `v6.2.2` |
|
||||
| `lvmController.provisioner.image.registry` | Registry for csi-provisioner image | `registry.k8s.io/` |
|
||||
| `lvmController.provisioner.image.repository` | Image repository for csi-provisioner | `sig-storage/csi-provisioner` |
|
||||
| `lvmController.provisioner.image.pullPolicy` | Image pull policy for csi-provisioner | `IfNotPresent` |
|
||||
| `lvmController.provisioner.image.tag` | Image tag for csi-provisioner | `v3.5.0` |
|
||||
| `lvmController.updateStrategy.type` | Update strategy for lvm localpv controller deployment | `RollingUpdate` |
|
||||
| `lvmController.annotations` | Annotations for lvm localpv controller deployment metadata | `""` |
|
||||
| `lvmController.podAnnotations` | Annotations for lvm localpv controller deployment's pods metadata | `""` |
|
||||
| `lvmController.resources` | Resource and request and limit for lvm localpv controller deployment containers | `""` |
|
||||
| `lvmController.labels` | Labels for lvm localpv controller deployment metadata | `""` |
|
||||
| `lvmController.podLabels` | Appends labels to the lvm localpv controller deployment pods | `""` |
|
||||
| `lvmController.nodeSelector` | Nodeselector for lvm localpv controller deployment pods | `""` |
|
||||
| `lvmController.tolerations` | lvm localpv controller deployment's pod toleration values | `""` |
|
||||
| `lvmController.topologySpreadConstraints` | lvm localpv controller deployment's pod topologySpreadConstraints values | `""` |
|
||||
| `lvmController.securityContext` | Security context for lvm localpv controller deployment container | `""` |
|
||||
| `rbac.pspEnabled` | Enable PodSecurityPolicy | `false` |
|
||||
| `serviceAccount.lvmNode.create` | Create a service account for lvmnode or not | `true` |
|
||||
| `serviceAccount.lvmNode.name` | Name for the lvmnode service account | `openebs-lvm-node-sa` |
|
||||
| `serviceAccount.lvmController.create` | Create a service account for lvm localpv controller or not | `true` |
|
||||
| `serviceAccount.lvmController.name` | Name for the lvm localpv controller service account | `openebs-lvm-controller-sa` |
|
||||
| `analytics.enabled` | Enable or Disable google analytics for the controller | `true` |
|
||||
|
||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.
|
||||
|
||||
Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,
|
||||
|
||||
```bash
|
||||
helm install <release-name> -f values.yaml openebs/lvm-localpv
|
||||
```
|
||||
|
||||
> **Tip**: You can use the default [values.yaml](values.yaml)
|
||||
23
charts/lvm-localpv/charts/crds/.helmignore
Normal file
23
charts/lvm-localpv/charts/crds/.helmignore
Normal file
@@ -0,0 +1,23 @@
|
||||
# Patterns to ignore when building packages.
|
||||
# This supports shell glob matching, relative path matching, and
|
||||
# negation (prefixed with !). Only one pattern per line.
|
||||
.DS_Store
|
||||
# Common VCS dirs
|
||||
.git/
|
||||
.gitignore
|
||||
.bzr/
|
||||
.bzrignore
|
||||
.hg/
|
||||
.hgignore
|
||||
.svn/
|
||||
# Common backup files
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*.orig
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
||||
4
charts/lvm-localpv/charts/crds/Chart.yaml
Normal file
4
charts/lvm-localpv/charts/crds/Chart.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
apiVersion: v2
|
||||
description: A Helm chart that collects CustomResourceDefinitions (CRDs) from lvm-localpv.
|
||||
name: crds
|
||||
version: 1.8.0
|
||||
18
charts/lvm-localpv/charts/crds/templates/_helpers.tpl
Normal file
18
charts/lvm-localpv/charts/crds/templates/_helpers.tpl
Normal file
@@ -0,0 +1,18 @@
|
||||
{{/* vim: set filetype=mustache: */}}
|
||||
|
||||
{{/*
|
||||
Adds extra annotations to CRDs. This targets two scenarios: preventing CRD recycling in case
|
||||
the chart is removed; and adding custom annotations.
|
||||
NOTE: This function assumes the element `metadata.annotations` already exists.
|
||||
Usage:
|
||||
{{- include "crds.extraAnnotations" .Values.csi.volumeSnapshots | nindent 4 }}
|
||||
*/}}
|
||||
|
||||
{{- define "crds.extraAnnotations" -}}
|
||||
{{- if .keep -}}
|
||||
helm.sh/resource-policy: keep
|
||||
{{ end }}
|
||||
{{- with .annotations }}
|
||||
{{- toYaml . }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,155 @@
|
||||
{{- if .Values.csi.volumeSnapshots.enabled -}}
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
api-approved.kubernetes.io: https://github.com/kubernetes-csi/external-snapshotter/pull/814
|
||||
controller-gen.kubebuilder.io/version: v0.11.3
|
||||
{{- include "crds.extraAnnotations" .Values.csi.volumeSnapshots | nindent 4 }}
|
||||
creationTimestamp: null
|
||||
name: volumesnapshotclasses.snapshot.storage.k8s.io
|
||||
spec:
|
||||
group: snapshot.storage.k8s.io
|
||||
names:
|
||||
kind: VolumeSnapshotClass
|
||||
listKind: VolumeSnapshotClassList
|
||||
plural: volumesnapshotclasses
|
||||
shortNames:
|
||||
- vsclass
|
||||
- vsclasses
|
||||
singular: volumesnapshotclass
|
||||
scope: Cluster
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .driver
|
||||
name: Driver
|
||||
type: string
|
||||
- description: Determines whether a VolumeSnapshotContent created through the
|
||||
VolumeSnapshotClass should be deleted when its bound VolumeSnapshot is deleted.
|
||||
jsonPath: .deletionPolicy
|
||||
name: DeletionPolicy
|
||||
type: string
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: VolumeSnapshotClass specifies parameters that a underlying storage
|
||||
system uses when creating a volume snapshot. A specific VolumeSnapshotClass
|
||||
is used by specifying its name in a VolumeSnapshot object. VolumeSnapshotClasses
|
||||
are non-namespaced
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |
|
||||
APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
type: string
|
||||
deletionPolicy:
|
||||
description: deletionPolicy determines whether a VolumeSnapshotContent
|
||||
created through the VolumeSnapshotClass should be deleted when its bound
|
||||
VolumeSnapshot is deleted. Supported values are "Retain" and "Delete".
|
||||
"Retain" means that the VolumeSnapshotContent and its physical snapshot
|
||||
on underlying storage system are kept. "Delete" means that the VolumeSnapshotContent
|
||||
and its physical snapshot on underlying storage system are deleted.
|
||||
Required.
|
||||
enum:
|
||||
- Delete
|
||||
- Retain
|
||||
type: string
|
||||
driver:
|
||||
description: driver is the name of the storage driver that handles this
|
||||
VolumeSnapshotClass. Required.
|
||||
type: string
|
||||
kind:
|
||||
description: |
|
||||
Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
parameters:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: parameters is a key-value map with storage driver specific
|
||||
parameters for creating snapshots. These values are opaque to Kubernetes.
|
||||
type: object
|
||||
required:
|
||||
- deletionPolicy
|
||||
- driver
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources: {}
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .driver
|
||||
name: Driver
|
||||
type: string
|
||||
- description: |
|
||||
Determines whether a VolumeSnapshotContent created through the
|
||||
VolumeSnapshotClass should be deleted when its bound VolumeSnapshot is deleted.
|
||||
jsonPath: .deletionPolicy
|
||||
name: DeletionPolicy
|
||||
type: string
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
deprecated: true
|
||||
deprecationWarning: snapshot.storage.k8s.io/v1beta1 VolumeSnapshotClass is deprecated;
|
||||
use snapshot.storage.k8s.io/v1 VolumeSnapshotClass
|
||||
name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: VolumeSnapshotClass specifies parameters that a underlying storage
|
||||
system uses when creating a volume snapshot. A specific VolumeSnapshotClass
|
||||
is used by specifying its name in a VolumeSnapshot object. VolumeSnapshotClasses
|
||||
are non-namespaced
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |
|
||||
APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
type: string
|
||||
deletionPolicy:
|
||||
description: deletionPolicy determines whether a VolumeSnapshotContent
|
||||
created through the VolumeSnapshotClass should be deleted when its bound
|
||||
VolumeSnapshot is deleted. Supported values are "Retain" and "Delete".
|
||||
"Retain" means that the VolumeSnapshotContent and its physical snapshot
|
||||
on underlying storage system are kept. "Delete" means that the VolumeSnapshotContent
|
||||
and its physical snapshot on underlying storage system are deleted.
|
||||
Required.
|
||||
enum:
|
||||
- Delete
|
||||
- Retain
|
||||
type: string
|
||||
driver:
|
||||
description: driver is the name of the storage driver that handles this
|
||||
VolumeSnapshotClass. Required.
|
||||
type: string
|
||||
kind:
|
||||
description: |
|
||||
Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
parameters:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: parameters is a key-value map with storage driver specific
|
||||
parameters for creating snapshots. These values are opaque to Kubernetes.
|
||||
type: object
|
||||
required:
|
||||
- deletionPolicy
|
||||
- driver
|
||||
type: object
|
||||
served: false
|
||||
storage: false
|
||||
subresources: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,499 @@
|
||||
{{- if .Values.csi.volumeSnapshots.enabled -}}
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
api-approved.kubernetes.io: https://github.com/kubernetes-csi/external-snapshotter/pull/814
|
||||
controller-gen.kubebuilder.io/version: v0.11.3
|
||||
{{- include "crds.extraAnnotations" .Values.csi.volumeSnapshots | nindent 4 }}
|
||||
creationTimestamp: null
|
||||
name: volumesnapshotcontents.snapshot.storage.k8s.io
|
||||
spec:
|
||||
group: snapshot.storage.k8s.io
|
||||
names:
|
||||
kind: VolumeSnapshotContent
|
||||
listKind: VolumeSnapshotContentList
|
||||
plural: volumesnapshotcontents
|
||||
shortNames:
|
||||
- vsc
|
||||
- vscs
|
||||
singular: volumesnapshotcontent
|
||||
scope: Cluster
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- description: Indicates if the snapshot is ready to be used to restore a volume.
|
||||
jsonPath: .status.readyToUse
|
||||
name: ReadyToUse
|
||||
type: boolean
|
||||
- description: Represents the complete size of the snapshot in bytes
|
||||
jsonPath: .status.restoreSize
|
||||
name: RestoreSize
|
||||
type: integer
|
||||
- description: Determines whether this VolumeSnapshotContent and its physical
|
||||
snapshot on the underlying storage system should be deleted when its bound
|
||||
VolumeSnapshot is deleted.
|
||||
jsonPath: .spec.deletionPolicy
|
||||
name: DeletionPolicy
|
||||
type: string
|
||||
- description: Name of the CSI driver used to create the physical snapshot on
|
||||
the underlying storage system.
|
||||
jsonPath: .spec.driver
|
||||
name: Driver
|
||||
type: string
|
||||
- description: Name of the VolumeSnapshotClass to which this snapshot belongs.
|
||||
jsonPath: .spec.volumeSnapshotClassName
|
||||
name: VolumeSnapshotClass
|
||||
type: string
|
||||
- description: Name of the VolumeSnapshot object to which this VolumeSnapshotContent
|
||||
object is bound.
|
||||
jsonPath: .spec.volumeSnapshotRef.name
|
||||
name: VolumeSnapshot
|
||||
type: string
|
||||
- description: Namespace of the VolumeSnapshot object to which this VolumeSnapshotContent
|
||||
object is bound.
|
||||
jsonPath: .spec.volumeSnapshotRef.namespace
|
||||
name: VolumeSnapshotNamespace
|
||||
type: string
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: VolumeSnapshotContent represents the actual "on-disk" snapshot
|
||||
object in the underlying storage system
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |
|
||||
APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
type: string
|
||||
kind:
|
||||
description: |
|
||||
Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
spec:
|
||||
description: spec defines properties of a VolumeSnapshotContent created
|
||||
by the underlying storage system. Required.
|
||||
properties:
|
||||
deletionPolicy:
|
||||
description: deletionPolicy determines whether this VolumeSnapshotContent
|
||||
and its physical snapshot on the underlying storage system should
|
||||
be deleted when its bound VolumeSnapshot is deleted. Supported values
|
||||
are "Retain" and "Delete". "Retain" means that the VolumeSnapshotContent
|
||||
and its physical snapshot on underlying storage system are kept.
|
||||
"Delete" means that the VolumeSnapshotContent and its physical snapshot
|
||||
on underlying storage system are deleted. For dynamically provisioned
|
||||
snapshots, this field will automatically be filled in by the CSI
|
||||
snapshotter sidecar with the "DeletionPolicy" field defined in the
|
||||
corresponding VolumeSnapshotClass. For pre-existing snapshots, users
|
||||
MUST specify this field when creating the VolumeSnapshotContent
|
||||
object. Required.
|
||||
enum:
|
||||
- Delete
|
||||
- Retain
|
||||
type: string
|
||||
driver:
|
||||
description: driver is the name of the CSI driver used to create the
|
||||
physical snapshot on the underlying storage system. This MUST be
|
||||
the same as the name returned by the CSI GetPluginName() call for
|
||||
that driver. Required.
|
||||
type: string
|
||||
source:
|
||||
description: source specifies whether the snapshot is (or should be)
|
||||
dynamically provisioned or already exists, and just requires a Kubernetes
|
||||
object representation. This field is immutable after creation. Required.
|
||||
oneOf:
|
||||
- required:
|
||||
- snapshotHandle
|
||||
- required:
|
||||
- volumeHandle
|
||||
properties:
|
||||
snapshotHandle:
|
||||
description: snapshotHandle specifies the CSI "snapshot_id" of
|
||||
a pre-existing snapshot on the underlying storage system for
|
||||
which a Kubernetes object representation was (or should be)
|
||||
created. This field is immutable.
|
||||
type: string
|
||||
volumeHandle:
|
||||
description: volumeHandle specifies the CSI "volume_id" of the
|
||||
volume from which a snapshot should be dynamically taken from.
|
||||
This field is immutable.
|
||||
type: string
|
||||
type: object
|
||||
sourceVolumeMode:
|
||||
description: SourceVolumeMode is the mode of the volume whose snapshot
|
||||
is taken. Can be either “Filesystem” or “Block”. If not specified,
|
||||
it indicates the source volume's mode is unknown. This field is
|
||||
immutable. This field is an alpha field.
|
||||
type: string
|
||||
volumeSnapshotClassName:
|
||||
description: name of the VolumeSnapshotClass from which this snapshot
|
||||
was (or will be) created. Note that after provisioning, the VolumeSnapshotClass
|
||||
may be deleted or recreated with different set of values, and as
|
||||
such, should not be referenced post-snapshot creation.
|
||||
type: string
|
||||
volumeSnapshotRef:
|
||||
description: volumeSnapshotRef specifies the VolumeSnapshot object
|
||||
to which this VolumeSnapshotContent object is bound. VolumeSnapshot.Spec.VolumeSnapshotContentName
|
||||
field must reference to this VolumeSnapshotContent's name for the
|
||||
bidirectional binding to be valid. For a pre-existing VolumeSnapshotContent
|
||||
object, name and namespace of the VolumeSnapshot object MUST be
|
||||
provided for binding to happen. This field is immutable after creation.
|
||||
Required.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
fieldPath:
|
||||
description: |
|
||||
If referring to a piece of an object instead of
|
||||
an entire object, this string should contain a valid JSON/Go
|
||||
field access statement, such as desiredState.manifest.containers[2].
|
||||
For example, if the object reference is to a container within
|
||||
a pod, this would take on a value like: "spec.containers{name}"
|
||||
(where "name" refers to the name of the container that triggered
|
||||
the event) or if no container name is specified "spec.containers[2]"
|
||||
(container with index 2 in this pod). This syntax is chosen
|
||||
only to have some well-defined way of referencing a part of
|
||||
an object. TODO: this design is not final and this field is
|
||||
subject to change in the future.
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
|
||||
type: string
|
||||
namespace:
|
||||
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
|
||||
type: string
|
||||
resourceVersion:
|
||||
description: |
|
||||
Specific resourceVersion to which this reference
|
||||
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
|
||||
type: string
|
||||
uid:
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
required:
|
||||
- deletionPolicy
|
||||
- driver
|
||||
- source
|
||||
- volumeSnapshotRef
|
||||
type: object
|
||||
status:
|
||||
description: status represents the current information of a snapshot.
|
||||
properties:
|
||||
creationTime:
|
||||
description: |
|
||||
creationTime is the timestamp when the point-in-time
|
||||
snapshot is taken by the underlying storage system. In dynamic snapshot
|
||||
creation case, this field will be filled in by the CSI snapshotter
|
||||
sidecar with the "creation_time" value returned from CSI "CreateSnapshot"
|
||||
gRPC call. For a pre-existing snapshot, this field will be filled
|
||||
with the "creation_time" value returned from the CSI "ListSnapshots"
|
||||
gRPC call if the driver supports it. If not specified, it indicates
|
||||
the creation time is unknown. The format of this field is a Unix
|
||||
nanoseconds time encoded as an int64. On Unix, the command `date
|
||||
+%s%N` returns the current time in nanoseconds since 1970-01-01
|
||||
00:00:00 UTC.
|
||||
format: int64
|
||||
type: integer
|
||||
error:
|
||||
description: error is the last observed error during snapshot creation,
|
||||
if any. Upon success after retry, this error field will be cleared.
|
||||
properties:
|
||||
message:
|
||||
description: |
|
||||
message is a string detailing the encountered error
|
||||
during snapshot creation if specified. NOTE: message may be
|
||||
logged, and it should not contain sensitive information.
|
||||
type: string
|
||||
time:
|
||||
description: time is the timestamp when the error was encountered.
|
||||
format: date-time
|
||||
type: string
|
||||
type: object
|
||||
readyToUse:
|
||||
description: readyToUse indicates if a snapshot is ready to be used
|
||||
to restore a volume. In dynamic snapshot creation case, this field
|
||||
will be filled in by the CSI snapshotter sidecar with the "ready_to_use"
|
||||
value returned from CSI "CreateSnapshot" gRPC call. For a pre-existing
|
||||
snapshot, this field will be filled with the "ready_to_use" value
|
||||
returned from the CSI "ListSnapshots" gRPC call if the driver supports
|
||||
it, otherwise, this field will be set to "True". If not specified,
|
||||
it means the readiness of a snapshot is unknown.
|
||||
type: boolean
|
||||
restoreSize:
|
||||
description: restoreSize represents the complete size of the snapshot
|
||||
in bytes. In dynamic snapshot creation case, this field will be
|
||||
filled in by the CSI snapshotter sidecar with the "size_bytes" value
|
||||
returned from CSI "CreateSnapshot" gRPC call. For a pre-existing
|
||||
snapshot, this field will be filled with the "size_bytes" value
|
||||
returned from the CSI "ListSnapshots" gRPC call if the driver supports
|
||||
it. When restoring a volume from this snapshot, the size of the
|
||||
volume MUST NOT be smaller than the restoreSize if it is specified,
|
||||
otherwise the restoration will fail. If not specified, it indicates
|
||||
that the size is unknown.
|
||||
format: int64
|
||||
minimum: 0
|
||||
type: integer
|
||||
snapshotHandle:
|
||||
description: snapshotHandle is the CSI "snapshot_id" of a snapshot
|
||||
on the underlying storage system. If not specified, it indicates
|
||||
that dynamic snapshot creation has either failed or it is still
|
||||
in progress.
|
||||
type: string
|
||||
volumeGroupSnapshotContentName:
|
||||
description: VolumeGroupSnapshotContentName is the name of the VolumeGroupSnapshotContent
|
||||
of which this VolumeSnapshotContent is a part of.
|
||||
type: string
|
||||
type: object
|
||||
required:
|
||||
- spec
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
- additionalPrinterColumns:
|
||||
- description: Indicates if the snapshot is ready to be used to restore a volume.
|
||||
jsonPath: .status.readyToUse
|
||||
name: ReadyToUse
|
||||
type: boolean
|
||||
- description: Represents the complete size of the snapshot in bytes
|
||||
jsonPath: .status.restoreSize
|
||||
name: RestoreSize
|
||||
type: integer
|
||||
- description: Determines whether this VolumeSnapshotContent and its physical
|
||||
snapshot on the underlying storage system should be deleted when its bound
|
||||
VolumeSnapshot is deleted.
|
||||
jsonPath: .spec.deletionPolicy
|
||||
name: DeletionPolicy
|
||||
type: string
|
||||
- description: Name of the CSI driver used to create the physical snapshot on
|
||||
the underlying storage system.
|
||||
jsonPath: .spec.driver
|
||||
name: Driver
|
||||
type: string
|
||||
- description: Name of the VolumeSnapshotClass to which this snapshot belongs.
|
||||
jsonPath: .spec.volumeSnapshotClassName
|
||||
name: VolumeSnapshotClass
|
||||
type: string
|
||||
- description: Name of the VolumeSnapshot object to which this VolumeSnapshotContent
|
||||
object is bound.
|
||||
jsonPath: .spec.volumeSnapshotRef.name
|
||||
name: VolumeSnapshot
|
||||
type: string
|
||||
- description: Namespace of the VolumeSnapshot object to which this VolumeSnapshotContent
|
||||
object is bound.
|
||||
jsonPath: .spec.volumeSnapshotRef.namespace
|
||||
name: VolumeSnapshotNamespace
|
||||
type: string
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
deprecated: true
|
||||
deprecationWarning: snapshot.storage.k8s.io/v1beta1 VolumeSnapshotContent is deprecated;
|
||||
use snapshot.storage.k8s.io/v1 VolumeSnapshotContent
|
||||
name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: VolumeSnapshotContent represents the actual "on-disk" snapshot
|
||||
object in the underlying storage system
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |
|
||||
APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
type: string
|
||||
kind:
|
||||
description: |
|
||||
Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
spec:
|
||||
description: spec defines properties of a VolumeSnapshotContent created
|
||||
by the underlying storage system. Required.
|
||||
properties:
|
||||
deletionPolicy:
|
||||
description: deletionPolicy determines whether this VolumeSnapshotContent
|
||||
and its physical snapshot on the underlying storage system should
|
||||
be deleted when its bound VolumeSnapshot is deleted. Supported values
|
||||
are "Retain" and "Delete". "Retain" means that the VolumeSnapshotContent
|
||||
and its physical snapshot on underlying storage system are kept.
|
||||
"Delete" means that the VolumeSnapshotContent and its physical snapshot
|
||||
on underlying storage system are deleted. For dynamically provisioned
|
||||
snapshots, this field will automatically be filled in by the CSI
|
||||
snapshotter sidecar with the "DeletionPolicy" field defined in the
|
||||
corresponding VolumeSnapshotClass. For pre-existing snapshots, users
|
||||
MUST specify this field when creating the VolumeSnapshotContent
|
||||
object. Required.
|
||||
enum:
|
||||
- Delete
|
||||
- Retain
|
||||
type: string
|
||||
driver:
|
||||
description: driver is the name of the CSI driver used to create the
|
||||
physical snapshot on the underlying storage system. This MUST be
|
||||
the same as the name returned by the CSI GetPluginName() call for
|
||||
that driver. Required.
|
||||
type: string
|
||||
source:
|
||||
description: source specifies whether the snapshot is (or should be)
|
||||
dynamically provisioned or already exists, and just requires a Kubernetes
|
||||
object representation. This field is immutable after creation. Required.
|
||||
properties:
|
||||
snapshotHandle:
|
||||
description: snapshotHandle specifies the CSI "snapshot_id" of
|
||||
a pre-existing snapshot on the underlying storage system for
|
||||
which a Kubernetes object representation was (or should be)
|
||||
created. This field is immutable.
|
||||
type: string
|
||||
volumeHandle:
|
||||
description: volumeHandle specifies the CSI "volume_id" of the
|
||||
volume from which a snapshot should be dynamically taken from.
|
||||
This field is immutable.
|
||||
type: string
|
||||
type: object
|
||||
volumeSnapshotClassName:
|
||||
description: name of the VolumeSnapshotClass from which this snapshot
|
||||
was (or will be) created. Note that after provisioning, the VolumeSnapshotClass
|
||||
may be deleted or recreated with different set of values, and as
|
||||
such, should not be referenced post-snapshot creation.
|
||||
type: string
|
||||
volumeSnapshotRef:
|
||||
description: volumeSnapshotRef specifies the VolumeSnapshot object
|
||||
to which this VolumeSnapshotContent object is bound. VolumeSnapshot.Spec.VolumeSnapshotContentName
|
||||
field must reference to this VolumeSnapshotContent's name for the
|
||||
bidirectional binding to be valid. For a pre-existing VolumeSnapshotContent
|
||||
object, name and namespace of the VolumeSnapshot object MUST be
|
||||
provided for binding to happen. This field is immutable after creation.
|
||||
Required.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent.
|
||||
type: string
|
||||
fieldPath:
|
||||
description: |
|
||||
If referring to a piece of an object instead of
|
||||
an entire object, this string should contain a valid JSON/Go
|
||||
field access statement, such as desiredState.manifest.containers[2].
|
||||
For example, if the object reference is to a container within
|
||||
a pod, this would take on a value like: "spec.containers{name}"
|
||||
(where "name" refers to the name of the container that triggered
|
||||
the event) or if no container name is specified "spec.containers[2]"
|
||||
(container with index 2 in this pod). This syntax is chosen
|
||||
only to have some well-defined way of referencing a part of
|
||||
an object. TODO: this design is not final and this field is
|
||||
subject to change in the future.
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
|
||||
type: string
|
||||
namespace:
|
||||
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
|
||||
type: string
|
||||
resourceVersion:
|
||||
description: |
|
||||
Specific resourceVersion to which this reference
|
||||
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
|
||||
type: string
|
||||
uid:
|
||||
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
|
||||
type: string
|
||||
type: object
|
||||
required:
|
||||
- deletionPolicy
|
||||
- driver
|
||||
- source
|
||||
- volumeSnapshotRef
|
||||
type: object
|
||||
status:
|
||||
description: status represents the current information of a snapshot.
|
||||
properties:
|
||||
creationTime:
|
||||
description: creationTime is the timestamp when the point-in-time
|
||||
snapshot is taken by the underlying storage system. In dynamic snapshot
|
||||
creation case, this field will be filled in by the CSI snapshotter
|
||||
sidecar with the "creation_time" value returned from CSI "CreateSnapshot"
|
||||
gRPC call. For a pre-existing snapshot, this field will be filled
|
||||
with the "creation_time" value returned from the CSI "ListSnapshots"
|
||||
gRPC call if the driver supports it. If not specified, it indicates
|
||||
the creation time is unknown. The format of this field is a Unix
|
||||
nanoseconds time encoded as an int64. On Unix, the command `date
|
||||
+%s%N` returns the current time in nanoseconds since 1970-01-01
|
||||
00:00:00 UTC.
|
||||
format: int64
|
||||
type: integer
|
||||
error:
|
||||
description: error is the last observed error during snapshot creation,
|
||||
if any. Upon success after retry, this error field will be cleared.
|
||||
properties:
|
||||
message:
|
||||
description: |
|
||||
message is a string detailing the encountered error
|
||||
during snapshot creation if specified. NOTE: message may be
|
||||
logged, and it should not contain sensitive information.
|
||||
type: string
|
||||
time:
|
||||
description: time is the timestamp when the error was encountered.
|
||||
format: date-time
|
||||
type: string
|
||||
type: object
|
||||
readyToUse:
|
||||
description: readyToUse indicates if a snapshot is ready to be used
|
||||
to restore a volume. In dynamic snapshot creation case, this field
|
||||
will be filled in by the CSI snapshotter sidecar with the "ready_to_use"
|
||||
value returned from CSI "CreateSnapshot" gRPC call. For a pre-existing
|
||||
snapshot, this field will be filled with the "ready_to_use" value
|
||||
returned from the CSI "ListSnapshots" gRPC call if the driver supports
|
||||
it, otherwise, this field will be set to "True". If not specified,
|
||||
it means the readiness of a snapshot is unknown.
|
||||
type: boolean
|
||||
restoreSize:
|
||||
description: restoreSize represents the complete size of the snapshot
|
||||
in bytes. In dynamic snapshot creation case, this field will be
|
||||
filled in by the CSI snapshotter sidecar with the "size_bytes" value
|
||||
returned from CSI "CreateSnapshot" gRPC call. For a pre-existing
|
||||
snapshot, this field will be filled with the "size_bytes" value
|
||||
returned from the CSI "ListSnapshots" gRPC call if the driver supports
|
||||
it. When restoring a volume from this snapshot, the size of the
|
||||
volume MUST NOT be smaller than the restoreSize if it is specified,
|
||||
otherwise the restoration will fail. If not specified, it indicates
|
||||
that the size is unknown.
|
||||
format: int64
|
||||
minimum: 0
|
||||
type: integer
|
||||
snapshotHandle:
|
||||
description: snapshotHandle is the CSI "snapshot_id" of a snapshot
|
||||
on the underlying storage system. If not specified, it indicates
|
||||
that dynamic snapshot creation has either failed or it is still
|
||||
in progress.
|
||||
type: string
|
||||
type: object
|
||||
required:
|
||||
- spec
|
||||
type: object
|
||||
served: false
|
||||
storage: false
|
||||
subresources:
|
||||
status: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,400 @@
|
||||
{{- if .Values.csi.volumeSnapshots.enabled -}}
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
api-approved.kubernetes.io: https://github.com/kubernetes-csi/external-snapshotter/pull/814
|
||||
controller-gen.kubebuilder.io/version: v0.11.3
|
||||
{{- include "crds.extraAnnotations" .Values.csi.volumeSnapshots | nindent 4 }}
|
||||
creationTimestamp: null
|
||||
name: volumesnapshots.snapshot.storage.k8s.io
|
||||
spec:
|
||||
group: snapshot.storage.k8s.io
|
||||
names:
|
||||
kind: VolumeSnapshot
|
||||
listKind: VolumeSnapshotList
|
||||
plural: volumesnapshots
|
||||
shortNames:
|
||||
- vs
|
||||
singular: volumesnapshot
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- description: Indicates if the snapshot is ready to be used to restore a volume.
|
||||
jsonPath: .status.readyToUse
|
||||
name: ReadyToUse
|
||||
type: boolean
|
||||
- description: If a new snapshot needs to be created, this contains the name of
|
||||
the source PVC from which this snapshot was (or will be) created.
|
||||
jsonPath: .spec.source.persistentVolumeClaimName
|
||||
name: SourcePVC
|
||||
type: string
|
||||
- description: If a snapshot already exists, this contains the name of the existing
|
||||
VolumeSnapshotContent object representing the existing snapshot.
|
||||
jsonPath: .spec.source.volumeSnapshotContentName
|
||||
name: SourceSnapshotContent
|
||||
type: string
|
||||
- description: Represents the minimum size of volume required to rehydrate from
|
||||
this snapshot.
|
||||
jsonPath: .status.restoreSize
|
||||
name: RestoreSize
|
||||
type: string
|
||||
- description: The name of the VolumeSnapshotClass requested by the VolumeSnapshot.
|
||||
jsonPath: .spec.volumeSnapshotClassName
|
||||
name: SnapshotClass
|
||||
type: string
|
||||
- description: Name of the VolumeSnapshotContent object to which the VolumeSnapshot
|
||||
object intends to bind to. Please note that verification of binding actually
|
||||
requires checking both VolumeSnapshot and VolumeSnapshotContent to ensure
|
||||
both are pointing at each other. Binding MUST be verified prior to usage of
|
||||
this object.
|
||||
jsonPath: .status.boundVolumeSnapshotContentName
|
||||
name: SnapshotContent
|
||||
type: string
|
||||
- description: Timestamp when the point-in-time snapshot was taken by the underlying
|
||||
storage system.
|
||||
jsonPath: .status.creationTime
|
||||
name: CreationTime
|
||||
type: date
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: VolumeSnapshot is a user's request for either creating a point-in-time
|
||||
snapshot of a persistent volume, or binding to a pre-existing snapshot.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |
|
||||
APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
type: string
|
||||
kind:
|
||||
description: |
|
||||
Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
spec:
|
||||
description: 'spec defines the desired characteristics of a snapshot requested
|
||||
by a user. More info: https://kubernetes.io/docs/concepts/storage/volume-snapshots#volumesnapshots
|
||||
Required.'
|
||||
properties:
|
||||
source:
|
||||
description: source specifies where a snapshot will be created from.
|
||||
This field is immutable after creation. Required.
|
||||
oneOf:
|
||||
- required:
|
||||
- persistentVolumeClaimName
|
||||
- required:
|
||||
- volumeSnapshotContentName
|
||||
properties:
|
||||
persistentVolumeClaimName:
|
||||
description: persistentVolumeClaimName specifies the name of the
|
||||
PersistentVolumeClaim object representing the volume from which
|
||||
a snapshot should be created. This PVC is assumed to be in the
|
||||
same namespace as the VolumeSnapshot object. This field should
|
||||
be set if the snapshot does not exists, and needs to be created.
|
||||
This field is immutable.
|
||||
type: string
|
||||
volumeSnapshotContentName:
|
||||
description: volumeSnapshotContentName specifies the name of a
|
||||
pre-existing VolumeSnapshotContent object representing an existing
|
||||
volume snapshot. This field should be set if the snapshot already
|
||||
exists and only needs a representation in Kubernetes. This field
|
||||
is immutable.
|
||||
type: string
|
||||
type: object
|
||||
volumeSnapshotClassName:
|
||||
description: |
|
||||
VolumeSnapshotClassName is the name of the VolumeSnapshotClass
|
||||
requested by the VolumeSnapshot. VolumeSnapshotClassName may be
|
||||
left nil to indicate that the default SnapshotClass should be used.
|
||||
A given cluster may have multiple default Volume SnapshotClasses:
|
||||
one default per CSI Driver. If a VolumeSnapshot does not specify
|
||||
a SnapshotClass, VolumeSnapshotSource will be checked to figure
|
||||
out what the associated CSI Driver is, and the default VolumeSnapshotClass
|
||||
associated with that CSI Driver will be used. If more than one VolumeSnapshotClass
|
||||
exist for a given CSI Driver and more than one have been marked
|
||||
as default, CreateSnapshot will fail and generate an event. Empty
|
||||
string is not allowed for this field.
|
||||
type: string
|
||||
required:
|
||||
- source
|
||||
type: object
|
||||
status:
|
||||
description: status represents the current information of a snapshot.
|
||||
Consumers must verify binding between VolumeSnapshot and VolumeSnapshotContent
|
||||
objects is successful (by validating that both VolumeSnapshot and VolumeSnapshotContent
|
||||
point at each other) before using this object.
|
||||
properties:
|
||||
boundVolumeSnapshotContentName:
|
||||
description: |
|
||||
boundVolumeSnapshotContentName is the name of the VolumeSnapshotContent
|
||||
object to which this VolumeSnapshot object intends to bind to. If
|
||||
not specified, it indicates that the VolumeSnapshot object has not
|
||||
been successfully bound to a VolumeSnapshotContent object yet. NOTE:
|
||||
To avoid possible security issues, consumers must verify binding
|
||||
between VolumeSnapshot and VolumeSnapshotContent objects is successful
|
||||
(by validating that both VolumeSnapshot and VolumeSnapshotContent
|
||||
point at each other) before using this object.
|
||||
type: string
|
||||
creationTime:
|
||||
description: creationTime is the timestamp when the point-in-time
|
||||
snapshot is taken by the underlying storage system. In dynamic snapshot
|
||||
creation case, this field will be filled in by the snapshot controller
|
||||
with the "creation_time" value returned from CSI "CreateSnapshot"
|
||||
gRPC call. For a pre-existing snapshot, this field will be filled
|
||||
with the "creation_time" value returned from the CSI "ListSnapshots"
|
||||
gRPC call if the driver supports it. If not specified, it may indicate
|
||||
that the creation time of the snapshot is unknown.
|
||||
format: date-time
|
||||
type: string
|
||||
error:
|
||||
description: error is the last observed error during snapshot creation,
|
||||
if any. This field could be helpful to upper level controllers(i.e.,
|
||||
application controller) to decide whether they should continue on
|
||||
waiting for the snapshot to be created based on the type of error
|
||||
reported. The snapshot controller will keep retrying when an error
|
||||
occurs during the snapshot creation. Upon success, this error field
|
||||
will be cleared.
|
||||
properties:
|
||||
message:
|
||||
description: 'message is a string detailing the encountered error
|
||||
during snapshot creation if specified. NOTE: message may be
|
||||
logged, and it should not contain sensitive information.'
|
||||
type: string
|
||||
time:
|
||||
description: time is the timestamp when the error was encountered.
|
||||
format: date-time
|
||||
type: string
|
||||
type: object
|
||||
readyToUse:
|
||||
description: readyToUse indicates if the snapshot is ready to be used
|
||||
to restore a volume. In dynamic snapshot creation case, this field
|
||||
will be filled in by the snapshot controller with the "ready_to_use"
|
||||
value returned from CSI "CreateSnapshot" gRPC call. For a pre-existing
|
||||
snapshot, this field will be filled with the "ready_to_use" value
|
||||
returned from the CSI "ListSnapshots" gRPC call if the driver supports
|
||||
it, otherwise, this field will be set to "True". If not specified,
|
||||
it means the readiness of a snapshot is unknown.
|
||||
type: boolean
|
||||
restoreSize:
|
||||
description: restoreSize represents the minimum size of volume required
|
||||
to create a volume from this snapshot. In dynamic snapshot creation
|
||||
case, this field will be filled in by the snapshot controller with
|
||||
the "size_bytes" value returned from CSI "CreateSnapshot" gRPC call.
|
||||
For a pre-existing snapshot, this field will be filled with the
|
||||
"size_bytes" value returned from the CSI "ListSnapshots" gRPC call
|
||||
if the driver supports it. When restoring a volume from this snapshot,
|
||||
the size of the volume MUST NOT be smaller than the restoreSize
|
||||
if it is specified, otherwise the restoration will fail. If not
|
||||
specified, it indicates that the size is unknown.
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
type: string
|
||||
x-kubernetes-int-or-string: true
|
||||
volumeGroupSnapshotName:
|
||||
description: VolumeGroupSnapshotName is the name of the VolumeGroupSnapshot
|
||||
of which this VolumeSnapshot is a part of.
|
||||
type: string
|
||||
type: object
|
||||
required:
|
||||
- spec
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
- additionalPrinterColumns:
|
||||
- description: Indicates if the snapshot is ready to be used to restore a volume.
|
||||
jsonPath: .status.readyToUse
|
||||
name: ReadyToUse
|
||||
type: boolean
|
||||
- description: If a new snapshot needs to be created, this contains the name of
|
||||
the source PVC from which this snapshot was (or will be) created.
|
||||
jsonPath: .spec.source.persistentVolumeClaimName
|
||||
name: SourcePVC
|
||||
type: string
|
||||
- description: If a snapshot already exists, this contains the name of the existing
|
||||
VolumeSnapshotContent object representing the existing snapshot.
|
||||
jsonPath: .spec.source.volumeSnapshotContentName
|
||||
name: SourceSnapshotContent
|
||||
type: string
|
||||
- description: Represents the minimum size of volume required to rehydrate from
|
||||
this snapshot.
|
||||
jsonPath: .status.restoreSize
|
||||
name: RestoreSize
|
||||
type: string
|
||||
- description: The name of the VolumeSnapshotClass requested by the VolumeSnapshot.
|
||||
jsonPath: .spec.volumeSnapshotClassName
|
||||
name: SnapshotClass
|
||||
type: string
|
||||
- description: Name of the VolumeSnapshotContent object to which the VolumeSnapshot
|
||||
object intends to bind to. Please note that verification of binding actually
|
||||
requires checking both VolumeSnapshot and VolumeSnapshotContent to ensure
|
||||
both are pointing at each other. Binding MUST be verified prior to usage of
|
||||
this object.
|
||||
jsonPath: .status.boundVolumeSnapshotContentName
|
||||
name: SnapshotContent
|
||||
type: string
|
||||
- description: Timestamp when the point-in-time snapshot was taken by the underlying
|
||||
storage system.
|
||||
jsonPath: .status.creationTime
|
||||
name: CreationTime
|
||||
type: date
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
deprecated: true
|
||||
deprecationWarning: snapshot.storage.k8s.io/v1beta1 VolumeSnapshot is deprecated;
|
||||
use snapshot.storage.k8s.io/v1 VolumeSnapshot
|
||||
name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: VolumeSnapshot is a user's request for either creating a point-in-time
|
||||
snapshot of a persistent volume, or binding to a pre-existing snapshot.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: |
|
||||
APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
|
||||
type: string
|
||||
kind:
|
||||
description: |
|
||||
Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
|
||||
type: string
|
||||
spec:
|
||||
description: |
|
||||
spec defines the desired characteristics of a snapshot requested
|
||||
by a user. More info: https://kubernetes.io/docs/concepts/storage/volume-snapshots#volumesnapshots
|
||||
Required.
|
||||
properties:
|
||||
source:
|
||||
description: source specifies where a snapshot will be created from.
|
||||
This field is immutable after creation. Required.
|
||||
properties:
|
||||
persistentVolumeClaimName:
|
||||
description: persistentVolumeClaimName specifies the name of the
|
||||
PersistentVolumeClaim object representing the volume from which
|
||||
a snapshot should be created. This PVC is assumed to be in the
|
||||
same namespace as the VolumeSnapshot object. This field should
|
||||
be set if the snapshot does not exists, and needs to be created.
|
||||
This field is immutable.
|
||||
type: string
|
||||
volumeSnapshotContentName:
|
||||
description: volumeSnapshotContentName specifies the name of a
|
||||
pre-existing VolumeSnapshotContent object representing an existing
|
||||
volume snapshot. This field should be set if the snapshot already
|
||||
exists and only needs a representation in Kubernetes. This field
|
||||
is immutable.
|
||||
type: string
|
||||
type: object
|
||||
volumeSnapshotClassName:
|
||||
description: |
|
||||
VolumeSnapshotClassName is the name of the VolumeSnapshotClass
|
||||
requested by the VolumeSnapshot. VolumeSnapshotClassName may be
|
||||
left nil to indicate that the default SnapshotClass should be used.
|
||||
A given cluster may have multiple default Volume SnapshotClasses:
|
||||
one default per CSI Driver. If a VolumeSnapshot does not specify
|
||||
a SnapshotClass, VolumeSnapshotSource will be checked to figure
|
||||
out what the associated CSI Driver is, and the default VolumeSnapshotClass
|
||||
associated with that CSI Driver will be used. If more than one VolumeSnapshotClass
|
||||
exist for a given CSI Driver and more than one have been marked
|
||||
as default, CreateSnapshot will fail and generate an event. Empty
|
||||
string is not allowed for this field.
|
||||
type: string
|
||||
required:
|
||||
- source
|
||||
type: object
|
||||
status:
|
||||
description: status represents the current information of a snapshot.
|
||||
Consumers must verify binding between VolumeSnapshot and VolumeSnapshotContent
|
||||
objects is successful (by validating that both VolumeSnapshot and VolumeSnapshotContent
|
||||
point at each other) before using this object.
|
||||
properties:
|
||||
boundVolumeSnapshotContentName:
|
||||
description: |
|
||||
boundVolumeSnapshotContentName is the name of the VolumeSnapshotContent
|
||||
object to which this VolumeSnapshot object intends to bind to. If
|
||||
not specified, it indicates that the VolumeSnapshot object has not
|
||||
been successfully bound to a VolumeSnapshotContent object yet. NOTE:
|
||||
To avoid possible security issues, consumers must verify binding
|
||||
between VolumeSnapshot and VolumeSnapshotContent objects is successful
|
||||
(by validating that both VolumeSnapshot and VolumeSnapshotContent
|
||||
point at each other) before using this object.
|
||||
type: string
|
||||
creationTime:
|
||||
description: creationTime is the timestamp when the point-in-time
|
||||
snapshot is taken by the underlying storage system. In dynamic snapshot
|
||||
creation case, this field will be filled in by the snapshot controller
|
||||
with the "creation_time" value returned from CSI "CreateSnapshot"
|
||||
gRPC call. For a pre-existing snapshot, this field will be filled
|
||||
with the "creation_time" value returned from the CSI "ListSnapshots"
|
||||
gRPC call if the driver supports it. If not specified, it may indicate
|
||||
that the creation time of the snapshot is unknown.
|
||||
format: date-time
|
||||
type: string
|
||||
error:
|
||||
description: error is the last observed error during snapshot creation,
|
||||
if any. This field could be helpful to upper level controllers(i.e.,
|
||||
application controller) to decide whether they should continue on
|
||||
waiting for the snapshot to be created based on the type of error
|
||||
reported. The snapshot controller will keep retrying when an error
|
||||
occurs during the snapshot creation. Upon success, this error field
|
||||
will be cleared.
|
||||
properties:
|
||||
message:
|
||||
description: |
|
||||
message is a string detailing the encountered error
|
||||
during snapshot creation if specified. NOTE: message may be
|
||||
logged, and it should not contain sensitive information.
|
||||
type: string
|
||||
time:
|
||||
description: time is the timestamp when the error was encountered.
|
||||
format: date-time
|
||||
type: string
|
||||
type: object
|
||||
readyToUse:
|
||||
description: readyToUse indicates if the snapshot is ready to be used
|
||||
to restore a volume. In dynamic snapshot creation case, this field
|
||||
will be filled in by the snapshot controller with the "ready_to_use"
|
||||
value returned from CSI "CreateSnapshot" gRPC call. For a pre-existing
|
||||
snapshot, this field will be filled with the "ready_to_use" value
|
||||
returned from the CSI "ListSnapshots" gRPC call if the driver supports
|
||||
it, otherwise, this field will be set to "True". If not specified,
|
||||
it means the readiness of a snapshot is unknown.
|
||||
type: boolean
|
||||
restoreSize:
|
||||
description: restoreSize represents the minimum size of volume required
|
||||
to create a volume from this snapshot. In dynamic snapshot creation
|
||||
case, this field will be filled in by the snapshot controller with
|
||||
the "size_bytes" value returned from CSI "CreateSnapshot" gRPC call.
|
||||
For a pre-existing snapshot, this field will be filled with the
|
||||
"size_bytes" value returned from the CSI "ListSnapshots" gRPC call
|
||||
if the driver supports it. When restoring a volume from this snapshot,
|
||||
the size of the volume MUST NOT be smaller than the restoreSize
|
||||
if it is specified, otherwise the restoration will fail. If not
|
||||
specified, it indicates that the size is unknown.
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
type: string
|
||||
x-kubernetes-int-or-string: true
|
||||
type: object
|
||||
required:
|
||||
- spec
|
||||
type: object
|
||||
served: false
|
||||
storage: false
|
||||
subresources:
|
||||
status: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
{{- end -}}
|
||||
208
charts/lvm-localpv/charts/crds/templates/lvmnode.yaml
Normal file
208
charts/lvm-localpv/charts/crds/templates/lvmnode.yaml
Normal file
@@ -0,0 +1,208 @@
|
||||
{{- if .Values.lvmLocalPv.enabled -}}
|
||||
##############################################
|
||||
########### ############
|
||||
########### LVMNode CRD ############
|
||||
########### ############
|
||||
##############################################
|
||||
|
||||
# LVMNode CRD is autogenerated via `make manifests` command.
|
||||
# Do the modification in the code and run the `make manifests` command
|
||||
# to generate the CRD definition
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.13.0
|
||||
{{- include "crds.extraAnnotations" .Values.lvmLocalPv | nindent 4 }}
|
||||
creationTimestamp: null
|
||||
name: lvmnodes.local.openebs.io
|
||||
spec:
|
||||
group: local.openebs.io
|
||||
names:
|
||||
kind: LVMNode
|
||||
listKind: LVMNodeList
|
||||
plural: lvmnodes
|
||||
shortNames:
|
||||
- lvmnode
|
||||
singular: lvmnode
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: LVMNode records information about all lvm volume groups available
|
||||
in a node. In general, the openebs node-agent creates the LVMNode object
|
||||
& periodically synchronizing the volume groups available in the node. LVMNode
|
||||
has an owner reference pointing to the corresponding node object.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
volumeGroups:
|
||||
items:
|
||||
description: VolumeGroup specifies attributes of a given vg exists on
|
||||
node.
|
||||
properties:
|
||||
allocationPolicy:
|
||||
description: 'AllocationPolicy indicates the volume group allocation
|
||||
policy. AllocationPolicy has the following mapping between int
|
||||
and string for its value: [-1: "", 0: "normal", 1: "contiguous",
|
||||
2: "cling", 3: "anywhere", 4: "inherited"]'
|
||||
type: integer
|
||||
free:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: Free specifies the available capacity of volume group.
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
lvCount:
|
||||
description: LVCount denotes total number of logical volumes in
|
||||
volume group.
|
||||
format: int32
|
||||
minimum: 0
|
||||
type: integer
|
||||
maxLv:
|
||||
description: MaxLV denotes maximum number of logical volumes allowed
|
||||
in volume group or 0 if unlimited.
|
||||
format: int32
|
||||
type: integer
|
||||
maxPv:
|
||||
description: MaxPV denotes maximum number of physical volumes allowed
|
||||
in volume group or 0 if unlimited.
|
||||
format: int32
|
||||
type: integer
|
||||
metadataCount:
|
||||
description: MetadataCount denotes number of metadata areas on the
|
||||
volume group.
|
||||
format: int32
|
||||
type: integer
|
||||
metadataFree:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: MetadataFree specifies the available metadata area
|
||||
space for the volume group
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
metadataSize:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: MetadataSize specifies size of smallest metadata area
|
||||
for the volume group
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
metadataUsedCount:
|
||||
description: MetadataUsedCount denotes number of used metadata areas
|
||||
in volume group
|
||||
format: int32
|
||||
type: integer
|
||||
missingPvCount:
|
||||
description: MissingPVCount denotes number of physical volumes in
|
||||
volume group which are missing.
|
||||
format: int32
|
||||
type: integer
|
||||
name:
|
||||
description: Name of the lvm volume group.
|
||||
minLength: 1
|
||||
type: string
|
||||
permissions:
|
||||
description: 'Permission indicates the volume group permission which
|
||||
can be writable or read-only. Permission has the following mapping
|
||||
between int and string for its value: [-1: "", 0: "writeable",
|
||||
1: "read-only"]'
|
||||
type: integer
|
||||
pvCount:
|
||||
description: PVCount denotes total number of physical volumes constituting
|
||||
the volume group.
|
||||
format: int32
|
||||
minimum: 0
|
||||
type: integer
|
||||
size:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: Size specifies the total size of volume group.
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
snapCount:
|
||||
description: SnapCount denotes number of snapshots in volume group.
|
||||
format: int32
|
||||
type: integer
|
||||
thinPools:
|
||||
description: ThinPools hosted by the volume group.
|
||||
items:
|
||||
description: ThinPool LV present on VG.
|
||||
properties:
|
||||
free:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: Free capacity of thinpool. In bytes, if no unit
|
||||
specified.
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
name:
|
||||
description: Name of the thinpool lv.
|
||||
type: string
|
||||
size:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: Size of the thinpool lv. In bytes, if no unit
|
||||
specified.
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
required:
|
||||
- free
|
||||
- name
|
||||
- size
|
||||
type: object
|
||||
type: array
|
||||
uuid:
|
||||
description: UUID denotes a unique identity of a lvm volume group.
|
||||
minLength: 1
|
||||
type: string
|
||||
required:
|
||||
- allocationPolicy
|
||||
- free
|
||||
- lvCount
|
||||
- maxLv
|
||||
- maxPv
|
||||
- metadataCount
|
||||
- metadataFree
|
||||
- metadataSize
|
||||
- metadataUsedCount
|
||||
- missingPvCount
|
||||
- name
|
||||
- permissions
|
||||
- pvCount
|
||||
- size
|
||||
- snapCount
|
||||
- uuid
|
||||
type: object
|
||||
type: array
|
||||
required:
|
||||
- volumeGroups
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
{{- end -}}
|
||||
98
charts/lvm-localpv/charts/crds/templates/lvmsnapshot.yaml
Normal file
98
charts/lvm-localpv/charts/crds/templates/lvmsnapshot.yaml
Normal file
@@ -0,0 +1,98 @@
|
||||
{{- if .Values.lvmLocalPv.enabled -}}
|
||||
##############################################
|
||||
########### ############
|
||||
########### LVMSnapshot CRD ############
|
||||
########### ############
|
||||
##############################################
|
||||
|
||||
# LVMSnapshot CRD is autogenerated via `make manifests` command.
|
||||
# Do the modification in the code and run the `make manifests` command
|
||||
# to generate the CRD definition
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.4.0
|
||||
{{- include "crds.extraAnnotations" .Values.lvmLocalPv | nindent 4 }}
|
||||
creationTimestamp: null
|
||||
name: lvmsnapshots.local.openebs.io
|
||||
spec:
|
||||
group: local.openebs.io
|
||||
names:
|
||||
kind: LVMSnapshot
|
||||
listKind: LVMSnapshotList
|
||||
plural: lvmsnapshots
|
||||
singular: lvmsnapshot
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: LVMSnapshot represents an LVM Snapshot of the lvm volume
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: LVMSnapshotSpec defines LVMSnapshot spec
|
||||
properties:
|
||||
ownerNodeID:
|
||||
description: OwnerNodeID is the Node ID where the volume group is
|
||||
present which is where the snapshot has been provisioned. OwnerNodeID
|
||||
can not be edited after the snapshot has been provisioned.
|
||||
minLength: 1
|
||||
type: string
|
||||
snapSize:
|
||||
description: SnapSize specifies the space reserved for the snapshot
|
||||
type: string
|
||||
thinProvision:
|
||||
description: ThinProvision specifies whether the snapshot is thin-provisioned
|
||||
or not.
|
||||
type: boolean
|
||||
volGroup:
|
||||
description: VolGroup specifies the name of the volume group where
|
||||
the snapshot has been created.
|
||||
type: string
|
||||
required:
|
||||
- ownerNodeID
|
||||
- volGroup
|
||||
type: object
|
||||
status:
|
||||
description: SnapStatus string that reflects if the snapshot was created
|
||||
successfully
|
||||
properties:
|
||||
lvSize:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: LvSize specifies the size allocated for the snapshot
|
||||
in the VG
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
state:
|
||||
type: string
|
||||
type: object
|
||||
required:
|
||||
- spec
|
||||
- status
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
{{- end -}}
|
||||
161
charts/lvm-localpv/charts/crds/templates/lvmvolume.yaml
Normal file
161
charts/lvm-localpv/charts/crds/templates/lvmvolume.yaml
Normal file
@@ -0,0 +1,161 @@
|
||||
{{- if .Values.lvmLocalPv.enabled -}}
|
||||
##############################################
|
||||
########### ############
|
||||
########### LVMVolume CRD ############
|
||||
########### ############
|
||||
##############################################
|
||||
|
||||
# LVMVolume CRD is autogenerated via `make manifests` command.
|
||||
# Do the modification in the code and run the `make manifests` command
|
||||
# to generate the CRD definition
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.4.0
|
||||
{{- include "crds.extraAnnotations" .Values.lvmLocalPv | nindent 4 }}
|
||||
creationTimestamp: null
|
||||
name: lvmvolumes.local.openebs.io
|
||||
spec:
|
||||
group: local.openebs.io
|
||||
names:
|
||||
kind: LVMVolume
|
||||
listKind: LVMVolumeList
|
||||
plural: lvmvolumes
|
||||
shortNames:
|
||||
- lvmvol
|
||||
singular: lvmvolume
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- description: volume group where the volume is created
|
||||
jsonPath: .spec.volGroup
|
||||
name: VolGroup
|
||||
type: string
|
||||
- description: Node where the volume is created
|
||||
jsonPath: .spec.ownerNodeID
|
||||
name: Node
|
||||
type: string
|
||||
- description: Size of the volume
|
||||
jsonPath: .spec.capacity
|
||||
name: Size
|
||||
type: string
|
||||
- description: Status of the volume
|
||||
jsonPath: .status.state
|
||||
name: Status
|
||||
type: string
|
||||
- description: Age of the volume
|
||||
jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: LVMVolume represents a LVM based volume
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: VolumeInfo defines LVM info
|
||||
properties:
|
||||
capacity:
|
||||
description: Capacity of the volume
|
||||
minLength: 1
|
||||
type: string
|
||||
ownerNodeID:
|
||||
description: OwnerNodeID is the Node ID where the volume group is
|
||||
present which is where the volume has been provisioned. OwnerNodeID
|
||||
can not be edited after the volume has been provisioned.
|
||||
minLength: 1
|
||||
type: string
|
||||
shared:
|
||||
description: Shared specifies whether the volume can be shared among
|
||||
multiple pods. If it is not set to "yes", then the LVM LocalPV Driver
|
||||
will not allow the volumes to be mounted by more than one pods.
|
||||
enum:
|
||||
- "yes"
|
||||
- "no"
|
||||
type: string
|
||||
source:
|
||||
description: |-
|
||||
Source defines the data source from which the volume should be created.
|
||||
It can reference either a snapshot or an existing volume.
|
||||
If not specified, a standard LVM volume will be created.
|
||||
If specified, the new volume will be created using the defined data source.
|
||||
type: string
|
||||
thinProvision:
|
||||
description: ThinProvision specifies whether logical volumes can be
|
||||
thinly provisioned. If it is set to "yes", then the LVM LocalPV
|
||||
Driver will create thinProvision i.e. logical volumes that are larger
|
||||
than the available extents.
|
||||
enum:
|
||||
- "yes"
|
||||
- "no"
|
||||
type: string
|
||||
vgPattern:
|
||||
description: VgPattern specifies the regex to choose volume groups
|
||||
where volume needs to be created.
|
||||
type: string
|
||||
volGroup:
|
||||
description: VolGroup specifies the name of the volume group where
|
||||
the volume has been created.
|
||||
type: string
|
||||
required:
|
||||
- capacity
|
||||
- ownerNodeID
|
||||
- vgPattern
|
||||
- volGroup
|
||||
type: object
|
||||
status:
|
||||
description: VolStatus string that specifies the current state of the
|
||||
volume provisioning request.
|
||||
properties:
|
||||
error:
|
||||
description: Error denotes the error occurred during provisioning/expanding
|
||||
a volume. Error field should only be set when State becomes Failed.
|
||||
properties:
|
||||
code:
|
||||
description: VolumeErrorCode represents the error code to represent
|
||||
specific class of errors.
|
||||
type: string
|
||||
message:
|
||||
type: string
|
||||
type: object
|
||||
state:
|
||||
description: State specifies the current state of the volume provisioning
|
||||
request. The state "Pending" means that the volume creation request
|
||||
has not processed yet. The state "Ready" means that the volume has
|
||||
been created and it is ready for the use. "Failed" means that volume
|
||||
provisioning has been failed and will not be retried by node agent
|
||||
controller.
|
||||
enum:
|
||||
- Pending
|
||||
- Ready
|
||||
- Failed
|
||||
type: string
|
||||
type: object
|
||||
required:
|
||||
- spec
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
{{- end -}}
|
||||
12
charts/lvm-localpv/charts/crds/values.yaml
Normal file
12
charts/lvm-localpv/charts/crds/values.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
lvmLocalPv:
|
||||
# Install lvm-localpv CRDs
|
||||
enabled: true
|
||||
# Keep CRDs on chart uninstall
|
||||
keep: true
|
||||
|
||||
csi:
|
||||
volumeSnapshots:
|
||||
# Install Volume Snapshot CRDs
|
||||
enabled: true
|
||||
# Keep CRDs on chart uninstall
|
||||
keep: true
|
||||
5
charts/lvm-localpv/templates/NOTES.txt
Normal file
5
charts/lvm-localpv/templates/NOTES.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
The OpenEBS LVM LocalPV has been installed. Check its status by running:
|
||||
$ kubectl get pods -n {{ .Release.Namespace }} -l role=openebs-lvm
|
||||
|
||||
For more information, visit our Slack at https://openebs.io/community or view
|
||||
the documentation online at http://docs.openebs.io/.
|
||||
145
charts/lvm-localpv/templates/_helpers.tpl
Normal file
145
charts/lvm-localpv/templates/_helpers.tpl
Normal file
@@ -0,0 +1,145 @@
|
||||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "lvmlocalpv.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified localpv provisioner name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "lvmlocalpv.fullname" -}}
|
||||
{{- if .Values.fullnameOverride -}}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- if contains $name .Release.Name -}}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "lvmlocalpv.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
{{/*
|
||||
Create the name of the service account for controller
|
||||
*/}}
|
||||
{{- define "lvmlocalpv.lvmController.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.lvmController.create }}
|
||||
{{- default (include "lvmlocalpv.fullname" .) .Values.serviceAccount.lvmController.name }}
|
||||
{{- else }}
|
||||
{{- default "default" .Values.serviceAccount.lvmController.name }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "lvmlocalpv.lvmNode.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.lvmNode.create }}
|
||||
{{- default (include "lvmlocalpv.fullname" .) .Values.serviceAccount.lvmNode.name }}
|
||||
{{- else }}
|
||||
{{- default "default" .Values.serviceAccount.lvmNode.name }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Define meta labels for openebs lvm-localpv components
|
||||
*/}}
|
||||
{{- define "lvmlocalpv.common.metaLabels" -}}
|
||||
chart: {{ template "lvmlocalpv.chart" . }}
|
||||
heritage: {{ .Release.Service }}
|
||||
openebs.io/version: {{ .Chart.AppVersion | quote }}
|
||||
role: {{ .Values.role | quote }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create match labels for openebs lvm-localpv controller
|
||||
*/}}
|
||||
{{- define "lvmlocalpv.lvmController.matchLabels" -}}
|
||||
app: {{ .Values.lvmController.componentName | quote }}
|
||||
release: {{ .Release.Name }}
|
||||
component: {{ .Values.lvmController.componentName | quote }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create component labels for lvmlocalpv controller
|
||||
*/}}
|
||||
{{- define "lvmlocalpv.lvmController.componentLabels" -}}
|
||||
openebs.io/component-name: {{ .Values.lvmController.componentName | quote }}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
{{/*
|
||||
Create labels for openebs lvm-localpv controller
|
||||
*/}}
|
||||
{{- define "lvmlocalpv.lvmController.labels" -}}
|
||||
{{ include "lvmlocalpv.common.metaLabels" . }}
|
||||
{{ include "lvmlocalpv.lvmController.matchLabels" . }}
|
||||
{{ include "lvmlocalpv.lvmController.componentLabels" . }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create match labels for openebs lvm-localpv node daemon
|
||||
*/}}
|
||||
{{- define "lvmlocalpv.lvmNode.matchLabels" -}}
|
||||
name: {{ .Values.lvmNode.componentName | quote }}
|
||||
release: {{ .Release.Name }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create component labels openebs lvm-localpv node daemon
|
||||
*/}}
|
||||
{{- define "lvmlocalpv.lvmNode.componentLabels" -}}
|
||||
openebs.io/component-name: {{ .Values.lvmNode.componentName | quote }}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
{{/*
|
||||
Create labels for openebs lvm-localpv node daemon
|
||||
*/}}
|
||||
{{- define "lvmlocalpv.lvmNode.labels" -}}
|
||||
{{ include "lvmlocalpv.common.metaLabels" . }}
|
||||
{{ include "lvmlocalpv.lvmNode.matchLabels" . }}
|
||||
{{ include "lvmlocalpv.lvmNode.componentLabels" . }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create the name of the priority class for csi node plugin
|
||||
*/}}
|
||||
{{- define "lvmlocalpv.lvmNode.priorityClassName" -}}
|
||||
{{- if .Values.lvmNode.priorityClass.create }}
|
||||
{{- printf "%s-%s" .Release.Name .Values.lvmNode.priorityClass.name | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- printf "%s" .Values.lvmNode.priorityClass.name | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the name of the priority class for csi controller plugin
|
||||
*/}}
|
||||
{{- define "lvmlocalpv.lvmController.priorityClassName" -}}
|
||||
{{- if .Values.lvmController.priorityClass.create }}
|
||||
{{- printf "%s-%s" .Release.Name .Values.lvmController.priorityClass.name | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- printf "%s" .Values.lvmController.priorityClass.name | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Ensure that the path to kubelet ends with a slash
|
||||
*/}}
|
||||
{{- define "lvmlocalpv.lvmNode.kubeletDir" -}}
|
||||
{{- printf "%s/" (.Values.lvmNode.kubeletDir | trimSuffix "/") -}}
|
||||
{{- end }}
|
||||
10
charts/lvm-localpv/templates/csidriver.yaml
Normal file
10
charts/lvm-localpv/templates/csidriver.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# Create the CSI Driver object
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: CSIDriver
|
||||
metadata:
|
||||
name: local.csi.openebs.io
|
||||
spec:
|
||||
# do not require volumeattachment
|
||||
attachRequired: false
|
||||
podInfoOnMount: true
|
||||
storageCapacity: {{ .Values.storageCapacity }}
|
||||
163
charts/lvm-localpv/templates/lvm-controller.yaml
Normal file
163
charts/lvm-localpv/templates/lvm-controller.yaml
Normal file
@@ -0,0 +1,163 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "lvmlocalpv.fullname" . }}-controller
|
||||
{{- with .Values.lvmController.annotations }}
|
||||
annotations: {{ toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "lvmlocalpv.lvmController.labels" . | nindent 4 }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "lvmlocalpv.lvmController.matchLabels" . | nindent 6 }}
|
||||
replicas: {{ .Values.lvmController.replicas }}
|
||||
template:
|
||||
metadata:
|
||||
{{- with .Values.lvmController.podAnnotations }}
|
||||
annotations: {{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "lvmlocalpv.lvmController.labels" . | nindent 8 }}
|
||||
{{- with .Values.lvmController.podLabels}}
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end}}
|
||||
{{- with .Values.loggingLabels}}
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end}}
|
||||
spec:
|
||||
{{- if .Values.lvmController.priorityClass.create }}
|
||||
priorityClassName: {{ template "lvmlocalpv.lvmController.priorityClassName" . }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ .Values.serviceAccount.lvmController.name }}
|
||||
containers:
|
||||
- name: {{ .Values.lvmController.resizer.name }}
|
||||
image: "{{ .Values.lvmController.resizer.image.registry }}{{ .Values.lvmController.resizer.image.repository }}:{{ .Values.lvmController.resizer.image.tag }}"
|
||||
args:
|
||||
- "--v={{ .Values.lvmController.logLevel }}"
|
||||
- "--csi-address=$(ADDRESS)"
|
||||
{{- if gt (int .Values.lvmController.replicas) 1 }}
|
||||
- "--leader-election"
|
||||
{{- end }}
|
||||
env:
|
||||
- name: ADDRESS
|
||||
value: /var/lib/csi/sockets/pluginproxy/csi.sock
|
||||
imagePullPolicy: {{ .Values.lvmController.resizer.image.pullPolicy }}
|
||||
volumeMounts:
|
||||
- name: socket-dir
|
||||
mountPath: /var/lib/csi/sockets/pluginproxy/
|
||||
resources:
|
||||
{{- toYaml .Values.lvmController.resources | nindent 12 }}
|
||||
- name: {{ .Values.lvmController.snapshotter.name }}
|
||||
image: "{{ .Values.lvmController.snapshotter.image.registry }}{{ .Values.lvmController.snapshotter.image.repository }}:{{ .Values.lvmController.snapshotter.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.lvmController.snapshotter.image.pullPolicy }}
|
||||
args:
|
||||
- "--csi-address=$(ADDRESS)"
|
||||
{{- if gt (int .Values.lvmController.replicas) 1 }}
|
||||
- "--leader-election"
|
||||
{{- end }}
|
||||
env:
|
||||
- name: ADDRESS
|
||||
value: /var/lib/csi/sockets/pluginproxy/csi.sock
|
||||
volumeMounts:
|
||||
- name: socket-dir
|
||||
mountPath: /var/lib/csi/sockets/pluginproxy/
|
||||
resources:
|
||||
{{- toYaml .Values.lvmController.resources | nindent 12 }}
|
||||
- name: {{ .Values.lvmController.snapshotController.name }}
|
||||
image: "{{ .Values.lvmController.snapshotController.image.registry }}{{ .Values.lvmController.snapshotController.image.repository }}:{{ .Values.lvmController.snapshotController.image.tag }}"
|
||||
args:
|
||||
- "--v={{ .Values.lvmController.logLevel }}"
|
||||
{{- if gt (int .Values.lvmController.replicas) 1 }}
|
||||
- "--leader-election=true"
|
||||
{{- end }}
|
||||
imagePullPolicy: {{ .Values.lvmController.snapshotController.image.pullPolicy }}
|
||||
resources:
|
||||
{{- toYaml .Values.lvmController.resources | nindent 12 }}
|
||||
- name: {{ .Values.lvmController.provisioner.name }}
|
||||
image: "{{ .Values.lvmController.provisioner.image.registry }}{{ .Values.lvmController.provisioner.image.repository }}:{{ .Values.lvmController.provisioner.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.lvmController.provisioner.image.pullPolicy }}
|
||||
args:
|
||||
- "--csi-address=$(ADDRESS)"
|
||||
- "--v={{ .Values.lvmController.logLevel }}"
|
||||
- "--feature-gates=Topology=true"
|
||||
- "--strict-topology"
|
||||
{{- if gt (int .Values.lvmController.replicas) 1 }}
|
||||
- "--leader-election"
|
||||
{{- end }}
|
||||
- "--enable-capacity={{ .Values.storageCapacity }}"
|
||||
- "--extra-create-metadata=true"
|
||||
- "--default-fstype=ext4"
|
||||
env:
|
||||
- name: ADDRESS
|
||||
value: /var/lib/csi/sockets/pluginproxy/csi.sock
|
||||
- name: NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
- name: POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
volumeMounts:
|
||||
- name: socket-dir
|
||||
mountPath: /var/lib/csi/sockets/pluginproxy/
|
||||
resources:
|
||||
{{- toYaml .Values.lvmController.resources | nindent 12 }}
|
||||
- name: {{ .Values.lvmPlugin.name }}
|
||||
image: "{{ .Values.lvmPlugin.image.registry }}{{ .Values.lvmPlugin.image.repository }}:{{ .Values.lvmPlugin.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.lvmPlugin.image.pullPolicy }}
|
||||
env:
|
||||
- name: OPENEBS_CONTROLLER_DRIVER
|
||||
value: controller
|
||||
- name: OPENEBS_CSI_ENDPOINT
|
||||
value: unix:///var/lib/csi/sockets/pluginproxy/csi.sock
|
||||
- name: OPENEBS_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
- name: OPENEBS_IO_INSTALLER_TYPE
|
||||
value: "lvm-localpv-helm"
|
||||
- name: OPENEBS_IO_ENABLE_ANALYTICS
|
||||
value: "{{ .Values.analytics.enabled }}"
|
||||
{{- if .Values.analytics.gaId }}
|
||||
- name: GA_ID
|
||||
value: {{ .Values.analytics.gaId | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.analytics.gaKey }}
|
||||
- name: GA_KEY
|
||||
value: {{ .Values.analytics.gaKey | quote }}
|
||||
{{- end }}
|
||||
args :
|
||||
- "--endpoint=$(OPENEBS_CSI_ENDPOINT)"
|
||||
- "--plugin=$(OPENEBS_CONTROLLER_DRIVER)"
|
||||
- "--kube-api-qps={{ .Values.lvmController.kubeClientRateLimiter.qps }}"
|
||||
- "--kube-api-burst={{ .Values.lvmController.kubeClientRateLimiter.burst }}"
|
||||
volumeMounts:
|
||||
- name: socket-dir
|
||||
mountPath: /var/lib/csi/sockets/pluginproxy/
|
||||
resources:
|
||||
{{- toYaml .Values.lvmController.resources | nindent 12 }}
|
||||
volumes:
|
||||
- name: socket-dir
|
||||
emptyDir: {}
|
||||
{{- if .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{ toYaml .Values.imagePullSecrets | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.lvmController.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ toYaml .Values.lvmController.nodeSelector | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.lvmController.securityContext }}
|
||||
securityContext:
|
||||
{{ toYaml .Values.lvmController.securityContext | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.lvmController.tolerations }}
|
||||
tolerations:
|
||||
{{ toYaml .Values.lvmController.tolerations | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.lvmController.topologySpreadConstraints }}
|
||||
topologySpreadConstraints:
|
||||
{{ toYaml .Values.lvmController.topologySpreadConstraints | indent 8 }}
|
||||
{{- end }}
|
||||
18
charts/lvm-localpv/templates/lvm-node-service.yaml
Normal file
18
charts/lvm-localpv/templates/lvm-node-service.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
{{- if .Values.lvmPlugin.metricsPort }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "lvmlocalpv.fullname" . }}-node-service
|
||||
labels:
|
||||
{{- include "lvmlocalpv.lvmNode.labels" . | nindent 4 }}
|
||||
spec:
|
||||
clusterIP: None
|
||||
ports:
|
||||
- name: metrics
|
||||
port: {{ .Values.lvmPlugin.metricsPort }}
|
||||
targetPort: {{ .Values.lvmPlugin.metricsPort }}
|
||||
selector:
|
||||
{{- with .Values.lvmNode.podLabels }}
|
||||
{{ toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
23
charts/lvm-localpv/templates/lvm-node-servicemonitor.yaml
Normal file
23
charts/lvm-localpv/templates/lvm-node-servicemonitor.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
{{- if and ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) .Values.lvmNode.serviceMonitor.enabled }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: {{ template "lvmlocalpv.fullname" . }}-node-servicemonitor
|
||||
namespace: {{- .Release.Namespace }}
|
||||
labels:
|
||||
#release: prometheus # Adjust to match your Prometheus Operator's release name
|
||||
{{- .Values.lvmNode.serviceMonitor.labels | toYaml | nindent 4 }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "lvmlocalpv.lvmNode.labels" . | nindent 6 }}
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- {{- .Release.Namespace }}
|
||||
endpoints:
|
||||
- port: metrics
|
||||
path: /metrics
|
||||
interval: 30s
|
||||
scrapeTimeout: 10s
|
||||
{{- end }}
|
||||
|
||||
161
charts/lvm-localpv/templates/lvm-node.yaml
Normal file
161
charts/lvm-localpv/templates/lvm-node.yaml
Normal file
@@ -0,0 +1,161 @@
|
||||
kind: DaemonSet
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: {{ template "lvmlocalpv.fullname" . }}-node
|
||||
{{- with .Values.lvmNode.annotations }}
|
||||
annotations: {{ toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "lvmlocalpv.lvmNode.labels" . | nindent 4 }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "lvmlocalpv.lvmNode.matchLabels" . | nindent 6 }}
|
||||
updateStrategy:
|
||||
rollingUpdate:
|
||||
maxUnavailable: 100%
|
||||
type: RollingUpdate
|
||||
template:
|
||||
metadata:
|
||||
{{- with .Values.lvmNode.podAnnotations }}
|
||||
annotations: {{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "lvmlocalpv.lvmNode.labels" . | nindent 8 }}
|
||||
{{- with .Values.lvmNode.podLabels}}
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end}}
|
||||
{{- with .Values.loggingLabels}}
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- end}}
|
||||
spec:
|
||||
{{- if .Values.lvmNode.priorityClass.create }}
|
||||
priorityClassName: {{ template "lvmlocalpv.lvmNode.priorityClassName" . }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ .Values.serviceAccount.lvmNode.name }}
|
||||
hostNetwork: {{ .Values.lvmNode.hostNetwork }}
|
||||
containers:
|
||||
- name: {{ .Values.lvmNode.driverRegistrar.name }}
|
||||
image: "{{ .Values.lvmNode.driverRegistrar.image.registry }}{{ .Values.lvmNode.driverRegistrar.image.repository }}:{{ .Values.lvmNode.driverRegistrar.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.lvmNode.driverRegistrar.image.pullPolicy }}
|
||||
args:
|
||||
- "--v={{ .Values.lvmNode.logLevel }}"
|
||||
- "--csi-address=$(ADDRESS)"
|
||||
- "--kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)"
|
||||
lifecycle:
|
||||
preStop:
|
||||
exec:
|
||||
command: ["/bin/sh", "-c", "rm -rf /registration/lvm-localpv /registration/lvm-localpv-reg.sock"]
|
||||
env:
|
||||
- name: ADDRESS
|
||||
value: /plugin/csi.sock
|
||||
- name: DRIVER_REG_SOCK_PATH
|
||||
value: {{ printf "%s%s" (include "lvmlocalpv.lvmNode.kubeletDir" .) "plugins/lvm-localpv/csi.sock" | quote }}
|
||||
- name: KUBE_NODE_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
- name: NODE_DRIVER
|
||||
value: openebs-lvm
|
||||
volumeMounts:
|
||||
- name: plugin-dir
|
||||
mountPath: /plugin
|
||||
- name: registration-dir
|
||||
mountPath: /registration
|
||||
resources:
|
||||
{{- toYaml .Values.lvmNode.resources | nindent 12 }}
|
||||
- name: {{ .Values.lvmPlugin.name }}
|
||||
securityContext:
|
||||
privileged: true
|
||||
allowPrivilegeEscalation: true
|
||||
image: "{{ .Values.lvmPlugin.image.registry }}{{ .Values.lvmPlugin.image.repository }}:{{ .Values.lvmPlugin.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.lvmPlugin.image.pullPolicy }}
|
||||
args:
|
||||
- "--nodeid=$(OPENEBS_NODE_ID)"
|
||||
- "--endpoint=$(OPENEBS_CSI_ENDPOINT)"
|
||||
- "--plugin=$(OPENEBS_NODE_DRIVER)"
|
||||
- "--kube-api-qps={{ .Values.lvmNode.kubeClientRateLimiter.qps }}"
|
||||
- "--kube-api-burst={{ .Values.lvmNode.kubeClientRateLimiter.burst }}"
|
||||
{{- if .Values.lvmPlugin.ioLimits.enabled }}
|
||||
- "--setiolimits"
|
||||
- "--container-runtime=$(CONTAINER_RUNTIME)"
|
||||
- "--riops-per-gb=$(RIOPS_PER_GB)"
|
||||
- "--wiops-per-gb=$(WIOPS_PER_GB)"
|
||||
{{- end }}
|
||||
{{- if .Values.lvmPlugin.metricsPort }}
|
||||
- "--listen-address=$(METRICS_LISTEN_ADDRESS)"
|
||||
{{- end }}
|
||||
env:
|
||||
- name: OPENEBS_NODE_ID
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
- name: OPENEBS_CSI_ENDPOINT
|
||||
value: unix:///plugin/csi.sock
|
||||
- name: OPENEBS_NODE_DRIVER
|
||||
value: agent
|
||||
- name: OPENEBS_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
{{- if .Values.lvmPlugin.ioLimits.enabled }}
|
||||
- name: CONTAINER_RUNTIME
|
||||
value: {{ .Values.lvmPlugin.ioLimits.containerRuntime }}
|
||||
- name: RIOPS_PER_GB
|
||||
value: {{ .Values.lvmPlugin.ioLimits.readIopsPerGB }}
|
||||
- name: WIOPS_PER_GB
|
||||
value: {{ .Values.lvmPlugin.ioLimits.writeIopsPerGB }}
|
||||
{{- end }}
|
||||
{{- if .Values.lvmPlugin.metricsPort }}
|
||||
- name: METRICS_LISTEN_ADDRESS
|
||||
value: :{{ .Values.lvmPlugin.metricsPort }}
|
||||
{{- end }}
|
||||
{{- if .Values.lvmPlugin.allowedTopologies }}
|
||||
- name: ALLOWED_TOPOLOGIES
|
||||
value: {{ .Values.lvmPlugin.allowedTopologies }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: plugin-dir
|
||||
mountPath: /plugin
|
||||
- name: device-dir
|
||||
mountPath: /dev
|
||||
- name: pods-mount-dir
|
||||
mountPath: {{ include "lvmlocalpv.lvmNode.kubeletDir" . | quote }}
|
||||
# needed so that any mounts setup inside this container are
|
||||
# propagated back to the host machine.
|
||||
mountPropagation: "Bidirectional"
|
||||
resources:
|
||||
{{- toYaml .Values.lvmNode.resources | nindent 12 }}
|
||||
volumes:
|
||||
- name: device-dir
|
||||
hostPath:
|
||||
path: /dev
|
||||
type: Directory
|
||||
- name: registration-dir
|
||||
hostPath:
|
||||
path: {{ printf "%s%s" (include "lvmlocalpv.lvmNode.kubeletDir" .) "plugins_registry/" | quote }}
|
||||
type: DirectoryOrCreate
|
||||
- name: plugin-dir
|
||||
hostPath:
|
||||
path: {{ printf "%s%s" (include "lvmlocalpv.lvmNode.kubeletDir" .) "plugins/lvm-localpv/" | quote }}
|
||||
type: DirectoryOrCreate
|
||||
- name: pods-mount-dir
|
||||
hostPath:
|
||||
path: {{ include "lvmlocalpv.lvmNode.kubeletDir" . | quote }}
|
||||
type: Directory
|
||||
{{- if .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{ toYaml .Values.imagePullSecrets | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.lvmNode.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ toYaml .Values.lvmNode.nodeSelector | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.lvmNode.securityContext }}
|
||||
securityContext:
|
||||
{{ toYaml .Values.lvmNode.securityContext | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.lvmNode.tolerations }}
|
||||
tolerations:
|
||||
{{ toYaml .Values.lvmNode.tolerations | indent 8 }}
|
||||
{{- end }}
|
||||
19
charts/lvm-localpv/templates/priority-class.yaml
Normal file
19
charts/lvm-localpv/templates/priority-class.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
{{- if .Values.lvmController.priorityClass.create }}
|
||||
apiVersion: scheduling.k8s.io/v1
|
||||
kind: PriorityClass
|
||||
metadata:
|
||||
name: {{ template "lvmlocalpv.lvmController.priorityClassName" . }}
|
||||
value: 900000000
|
||||
globalDefault: false
|
||||
description: "This priority class should be used for the CStor CSI driver controller deployment only."
|
||||
{{- end }}
|
||||
---
|
||||
{{- if .Values.lvmNode.priorityClass.create }}
|
||||
apiVersion: scheduling.k8s.io/v1
|
||||
kind: PriorityClass
|
||||
metadata:
|
||||
name: {{ template "lvmlocalpv.lvmNode.priorityClassName" . }}
|
||||
value: 900001000
|
||||
globalDefault: false
|
||||
description: "This priority class should be used for the CStor CSI driver node deployment only."
|
||||
{{- end }}
|
||||
24
charts/lvm-localpv/templates/psp.yaml
Normal file
24
charts/lvm-localpv/templates/psp.yaml
Normal file
@@ -0,0 +1,24 @@
|
||||
{{- if .Values.rbac.pspEnabled }}
|
||||
apiVersion: policy/v1beta1
|
||||
kind: PodSecurityPolicy
|
||||
metadata:
|
||||
name: openebs-lvm-node-psp
|
||||
labels:
|
||||
{{- include "lvmlocalpv.lvmNode.labels" . | nindent 4 }}
|
||||
spec:
|
||||
privileged: true
|
||||
allowPrivilegeEscalation: true
|
||||
allowedCapabilities: ['*']
|
||||
volumes: ['*']
|
||||
hostNetwork: {{ .Values.lvmNode.hostNetwork}}
|
||||
hostIPC: true
|
||||
hostPID: true
|
||||
runAsUser:
|
||||
rule: 'RunAsAny'
|
||||
seLinux:
|
||||
rule: 'RunAsAny'
|
||||
supplementalGroups:
|
||||
rule: 'RunAsAny'
|
||||
fsGroup:
|
||||
rule: 'RunAsAny'
|
||||
{{- end }}
|
||||
195
charts/lvm-localpv/templates/rbac.yaml
Normal file
195
charts/lvm-localpv/templates/rbac.yaml
Normal file
@@ -0,0 +1,195 @@
|
||||
{{- if .Values.serviceAccount.lvmController.create -}}
|
||||
kind: ServiceAccount
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: {{ .Values.serviceAccount.lvmController.name }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "lvmlocalpv.lvmController.labels" . | nindent 4 }}
|
||||
---
|
||||
kind: ClusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: openebs-lvm-provisioner-role
|
||||
labels:
|
||||
{{- include "lvmlocalpv.lvmController.labels" . | nindent 4 }}
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["namespaces"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["persistentvolumes", "services"]
|
||||
verbs: ["get", "list", "watch", "create", "delete", "update", "patch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["persistentvolumeclaims"]
|
||||
verbs: ["get", "list", "watch", "update"]
|
||||
- apiGroups: [""]
|
||||
resources: ["persistentvolumeclaims/status"]
|
||||
verbs: ["update", "patch"]
|
||||
- apiGroups: ["storage.k8s.io"]
|
||||
resources: ["storageclasses", "csinodes"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: [ "storage.k8s.io" ]
|
||||
resources: [ "csistoragecapacities"]
|
||||
verbs: ["*"]
|
||||
- apiGroups: [""]
|
||||
resources: ["events"]
|
||||
verbs: ["list", "watch", "create", "update", "patch"]
|
||||
- apiGroups: ["coordination.k8s.io"]
|
||||
resources: ["leases"]
|
||||
verbs: ["get", "watch", "list", "delete", "update", "create"]
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["pods"]
|
||||
verbs: ["get", "list", "watch", "update", "patch"]
|
||||
- apiGroups: ["local.openebs.io"]
|
||||
resources: ["lvmvolumes", "lvmsnapshots", "lvmnodes"]
|
||||
verbs: ["*"]
|
||||
---
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: openebs-lvm-provisioner-binding
|
||||
labels:
|
||||
{{- include "lvmlocalpv.lvmController.labels" . | nindent 4 }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ .Values.serviceAccount.lvmController.name }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: openebs-lvm-provisioner-role
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
---
|
||||
kind: ClusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: openebs-lvm-snapshotter-role
|
||||
labels:
|
||||
{{- include "lvmlocalpv.lvmController.labels" . | nindent 4 }}
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["persistentvolumes"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["persistentvolumeclaims"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: ["storage.k8s.io"]
|
||||
resources: ["storageclasses"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["events"]
|
||||
verbs: ["list", "watch", "create", "update", "patch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["secrets"]
|
||||
verbs: ["get", "list"]
|
||||
- apiGroups: ["snapshot.storage.k8s.io"]
|
||||
resources: ["volumesnapshotclasses"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: ["snapshot.storage.k8s.io"]
|
||||
resources: ["volumesnapshotcontents"]
|
||||
verbs: ["create", "get", "list", "watch", "update", "delete", "patch"]
|
||||
- apiGroups: ["snapshot.storage.k8s.io"]
|
||||
resources: ["volumesnapshots"]
|
||||
verbs: ["get", "list", "watch", "update", "patch"]
|
||||
- apiGroups: ["snapshot.storage.k8s.io"]
|
||||
resources: ["volumesnapshotcontents/status"]
|
||||
verbs: ["update"]
|
||||
- apiGroups: ["snapshot.storage.k8s.io"]
|
||||
resources: ["volumesnapshots/status"]
|
||||
verbs: ["update"]
|
||||
- apiGroups: ["apiextensions.k8s.io"]
|
||||
resources: ["customresourcedefinitions"]
|
||||
verbs: ["create", "list", "watch", "delete"]
|
||||
---
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: openebs-lvm-snapshotter-binding
|
||||
labels:
|
||||
{{- include "lvmlocalpv.lvmController.labels" . | nindent 4 }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ .Values.serviceAccount.lvmController.name }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: openebs-lvm-snapshotter-role
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
---
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.serviceAccount.lvmNode.create }}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ .Values.serviceAccount.lvmNode.name }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "lvmlocalpv.lvmNode.labels" . | nindent 4 }}
|
||||
---
|
||||
kind: ClusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: openebs-lvm-driver-registrar-role
|
||||
labels:
|
||||
{{- include "lvmlocalpv.lvmNode.labels" . | nindent 4 }}
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["events"]
|
||||
verbs: ["get", "list", "watch", "create", "update", "patch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["persistentvolumes", "nodes", "services"]
|
||||
verbs: ["get", "list"]
|
||||
- apiGroups: ["local.openebs.io"]
|
||||
resources: ["lvmvolumes", "lvmsnapshots", "lvmnodes"]
|
||||
verbs: ["get", "list", "watch", "create", "update", "patch"]
|
||||
---
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: openebs-lvm-driver-registrar-binding
|
||||
labels:
|
||||
{{- include "lvmlocalpv.lvmNode.labels" . | nindent 4 }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ .Values.serviceAccount.lvmNode.name }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: openebs-lvm-driver-registrar-role
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
|
||||
{{- if .Values.rbac.pspEnabled }}
|
||||
---
|
||||
kind: ClusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: openebs-lvm-node-role
|
||||
labels:
|
||||
{{- include "lvmlocalpv.lvmNode.labels" . | nindent 4 }}
|
||||
rules:
|
||||
- apiGroups: ['policy']
|
||||
resources: ['podsecuritypolicies']
|
||||
verbs: ['use']
|
||||
resourceNames:
|
||||
- openebs-lvm-node-psp
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: openebs-lvm-node-binding
|
||||
labels:
|
||||
{{- include "lvmlocalpv.lvmNode.labels" . | nindent 4 }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: openebs-lvm-node-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ .Values.serviceAccount.lvmNode.name }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
202
charts/lvm-localpv/values.yaml
Normal file
202
charts/lvm-localpv/values.yaml
Normal file
@@ -0,0 +1,202 @@
|
||||
# Default values for openebs-lvmlocalpv.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
imagePullSecrets:
|
||||
# - name: "image-pull-secret"
|
||||
|
||||
# enable storage capacity tracking feature
|
||||
# Ref: https://kubernetes:io/docs/concepts/storage/storage-capacity
|
||||
storageCapacity: true
|
||||
|
||||
rbac:
|
||||
# rbac.pspEnabled: `true` if PodSecurityPolicy resources should be created
|
||||
pspEnabled: false
|
||||
|
||||
loggingLabels:
|
||||
openebs.io/logging: "true"
|
||||
|
||||
# lvmNode contains the configurables for
|
||||
# the lvm node daemonset
|
||||
lvmNode:
|
||||
componentName: openebs-lvm-node
|
||||
driverRegistrar:
|
||||
name: "csi-node-driver-registrar"
|
||||
image:
|
||||
# Make sure that registry name end with a '/'.
|
||||
# For example : registry.k8s.io/ is a correct value here and quay.io is incorrect
|
||||
registry: registry.k8s.io/
|
||||
repository: sig-storage/csi-node-driver-registrar
|
||||
pullPolicy: IfNotPresent
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
tag: v2.13.0
|
||||
updateStrategy:
|
||||
type: RollingUpdate
|
||||
annotations: {}
|
||||
podAnnotations: {}
|
||||
# This can be configured to run on various different k8s distributions like
|
||||
# microk8s where kubelet dir is different
|
||||
kubeletDir: "/var/lib/kubelet/"
|
||||
resources: {}
|
||||
# limits:
|
||||
# cpu: 10m
|
||||
# memory: 32Mi
|
||||
# requests:
|
||||
# cpu: 10m
|
||||
# memory: 32Mi
|
||||
## Labels to be added to openebs-lvm node pods
|
||||
podLabels:
|
||||
app: openebs-lvm-node
|
||||
nodeSelector: {}
|
||||
tolerations: []
|
||||
securityContext: {}
|
||||
labels: {}
|
||||
priorityClass:
|
||||
create: true
|
||||
name: lvm-localpv-csi-node-critical
|
||||
logLevel: 5
|
||||
# Configure kubernetes client API requests rate.
|
||||
kubeClientRateLimiter:
|
||||
# Configure the number of queries per second.
|
||||
qps: 0
|
||||
# Configure the maximum number of queries allowed after
|
||||
# accounting for rolled over qps from previous seconds.
|
||||
burst: 0
|
||||
# Disable or enable the use of hostNetwork for the lvm node daemonset.
|
||||
hostNetwork: false
|
||||
serviceMonitor:
|
||||
enabled: false
|
||||
# add labels to the serviceMonitor if you make use of serviceMonitorSelector in prometheus operator
|
||||
# labels:
|
||||
# release: prometheus
|
||||
|
||||
# lvmController contains the configurables for
|
||||
# the lvm controller deployment
|
||||
lvmController:
|
||||
componentName: openebs-lvm-controller
|
||||
replicas: 1
|
||||
logLevel: 5
|
||||
resizer:
|
||||
name: "csi-resizer"
|
||||
image:
|
||||
# Make sure that registry name end with a '/'.
|
||||
# For example : registry.k8s.io/ is a correct value here and quay.io is incorrect
|
||||
registry: registry.k8s.io/
|
||||
repository: sig-storage/csi-resizer
|
||||
pullPolicy: IfNotPresent
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
tag: v1.11.2
|
||||
snapshotter:
|
||||
name: "csi-snapshotter"
|
||||
image:
|
||||
# Make sure that registry name end with a '/'.
|
||||
# For example : registry.k8s.io/ is a correct value here and quay.io is incorrect
|
||||
registry: registry.k8s.io/
|
||||
repository: sig-storage/csi-snapshotter
|
||||
pullPolicy: IfNotPresent
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
tag: v7.0.0
|
||||
snapshotController:
|
||||
name: "snapshot-controller"
|
||||
image:
|
||||
# Make sure that registry name end with a '/'.
|
||||
# For example : registry.k8s.io/ is a correct value here and quay.io is incorrect
|
||||
registry: registry.k8s.io/
|
||||
repository: sig-storage/snapshot-controller
|
||||
pullPolicy: IfNotPresent
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
tag: v7.0.0
|
||||
provisioner:
|
||||
name: "csi-provisioner"
|
||||
image:
|
||||
# Make sure that registry name end with a '/'.
|
||||
# For example : registry.k8s.io/ is a correct value here and quay.io is incorrect
|
||||
registry: registry.k8s.io/
|
||||
repository: sig-storage/csi-provisioner
|
||||
pullPolicy: IfNotPresent
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
tag: v5.2.0
|
||||
updateStrategy:
|
||||
type: RollingUpdate
|
||||
annotations: {}
|
||||
podAnnotations: {}
|
||||
resources: {}
|
||||
# limits:
|
||||
# cpu: 10m
|
||||
# memory: 32Mi
|
||||
# requests:
|
||||
# cpu: 10m
|
||||
# memory: 32Mi
|
||||
## Labels to be added to openebs-lvm controller pods
|
||||
podLabels:
|
||||
name: openebs-lvm-controller
|
||||
nodeSelector: {}
|
||||
tolerations: []
|
||||
topologySpreadConstraints: []
|
||||
securityContext: {}
|
||||
priorityClass:
|
||||
create: true
|
||||
name: lvm-localpv-csi-controller-critical
|
||||
# Configure kubernetes client API requests rate.
|
||||
kubeClientRateLimiter:
|
||||
# Configure the number of queries per second.
|
||||
qps: 0
|
||||
# Configure the maximum number of queries allowed after
|
||||
# accounting for rolled over qps from previous seconds.
|
||||
burst: 0
|
||||
|
||||
# lvmPlugin is the common csi container used by the
|
||||
# controller deployment and node daemonset
|
||||
lvmPlugin:
|
||||
name: "openebs-lvm-plugin"
|
||||
image:
|
||||
# Make sure that registry name end with a '/'.
|
||||
# For example : registry.k8s.io/ is a correct value here and quay.io is incorrect
|
||||
registry: docker.io/
|
||||
repository: openebs/lvm-driver
|
||||
pullPolicy: IfNotPresent
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
tag: 1.8.0
|
||||
ioLimits:
|
||||
enabled: false
|
||||
containerRuntime: containerd
|
||||
readIopsPerGB: ""
|
||||
writeIopsPerGB: ""
|
||||
# The TCP port number used for exposing lvm-metrics.
|
||||
# If not set, service will not be created to expose metrics endpoint
|
||||
# to serviceMonitor andlisten-address flag will not be set.
|
||||
metricsPort: 9500
|
||||
# Comma seperated list of k8s worker node topologies
|
||||
allowedTopologies: "kubernetes.io/hostname,"
|
||||
|
||||
role: openebs-lvm
|
||||
|
||||
serviceAccount:
|
||||
lvmController:
|
||||
# Specifies whether a service account should be created
|
||||
create: true
|
||||
# The name of the service account to use.
|
||||
# If not set and create is true, a name is generated using the fullname template
|
||||
name: openebs-lvm-controller-sa
|
||||
lvmNode:
|
||||
# Specifies whether a service account should be created
|
||||
create: true
|
||||
# The name of the service account to use.
|
||||
# If not set and create is true, a name is generated using the fullname template
|
||||
name: openebs-lvm-node-sa
|
||||
|
||||
analytics:
|
||||
enabled: true
|
||||
|
||||
crds:
|
||||
lvmLocalPv:
|
||||
# Install lvm-localpv CRDs
|
||||
enabled: true
|
||||
# Keep CRDs on chart uninstall
|
||||
keep: true
|
||||
csi:
|
||||
volumeSnapshots:
|
||||
# Install Volume Snapshot CRDs
|
||||
enabled: true
|
||||
# Keep CRDs on chart uninstall
|
||||
keep: true
|
||||
Reference in New Issue
Block a user