Initial commit
This commit is contained in:
23
charts/rawfile-localpv/.helmignore
Normal file
23
charts/rawfile-localpv/.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/
|
||||
6
charts/rawfile-localpv/Chart.lock
Normal file
6
charts/rawfile-localpv/Chart.lock
Normal file
@@ -0,0 +1,6 @@
|
||||
dependencies:
|
||||
- name: crds
|
||||
repository: ""
|
||||
version: 0.0.1
|
||||
digest: sha256:eada35ade10b2e420bcff49387a38c1d75d4841081f7630e5e1f5dd5fe6390c5
|
||||
generated: "2025-11-20T16:39:08.138493849Z"
|
||||
23
charts/rawfile-localpv/Chart.yaml
Normal file
23
charts/rawfile-localpv/Chart.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
apiVersion: v2
|
||||
appVersion: 0.12.0
|
||||
dependencies:
|
||||
- condition: crds.enabled
|
||||
name: crds
|
||||
repository: ""
|
||||
version: 0.0.1
|
||||
description: RawFile Driver Container Storage Interface
|
||||
home: https://openebs.io/
|
||||
icon: https://raw.githubusercontent.com/cncf/artwork/main/projects/openebs/icon/color/openebs-icon-color.png
|
||||
keywords:
|
||||
- cloud-native-storage
|
||||
- filesystem
|
||||
- sparse
|
||||
- rawfile
|
||||
- Local Persistent Volumes
|
||||
- storage
|
||||
kubeVersion: '>= 1.21'
|
||||
name: rawfile-localpv
|
||||
sources:
|
||||
- https://github.com/openebs/rawfile-localpv
|
||||
type: application
|
||||
version: 0.12.0
|
||||
102
charts/rawfile-localpv/README.md
Normal file
102
charts/rawfile-localpv/README.md
Normal file
@@ -0,0 +1,102 @@
|
||||
# rawfile-localpv
|
||||
|
||||
  
|
||||
|
||||
RawFile Driver Container Storage Interface
|
||||
|
||||
**Homepage:** <https://openebs.io/>
|
||||
|
||||
## Source Code
|
||||
|
||||
* <https://github.com/openebs/rawfile-localpv>
|
||||
|
||||
## Requirements
|
||||
|
||||
Kubernetes: `>= 1.21`
|
||||
|
||||
| Repository | Name | Version |
|
||||
|------------|------|---------|
|
||||
| | crds | 0.0.1 |
|
||||
|
||||
## Install and Upgrades
|
||||
|
||||
Please follow the [install guide](https://github.com/openebs/rawfile-localpv/tree/v0.12.0/docs/install-guide.md)
|
||||
|
||||
## Values
|
||||
|
||||
| Key | Type | Default | Description |
|
||||
|-----|------|---------|-------------|
|
||||
| auth.enabled | bool | `true` | Enables authentication for internal gRPC server |
|
||||
| auth.token | string | `""` | Sets authentication token for internal gRPC server, will generate one if nothing provided |
|
||||
| capacityOverride | string | `""` | Overrides total capacity of the storage for data dir storage on each host (Support size values) [e.g. `50GB` or `10MiB`] |
|
||||
| controller.externalResizer.image.registry | string | `""` | Image registry for `csi-resizer` |
|
||||
| controller.externalResizer.image.repository | string | `"sig-storage/csi-resizer"` | Image Repository for `csi-resizer` |
|
||||
| controller.externalResizer.image.tag | string | `"v1.13.2"` | Image tag for `csi-resizer` |
|
||||
| controller.grpcWorkers | int | `10` | Number of gRPC workers for controller component |
|
||||
| controller.image.pullPolicy | string | `""` | Overrides default image pull policy for node component |
|
||||
| controller.image.repository | string | `""` | Overrides default image repository for node component |
|
||||
| controller.image.tag | string | `""` | Overrides default image tag for node component |
|
||||
| controller.priorityClassName | string | `"system-cluster-critical"` | priorityClassName for controller component since this part is critical for cluster `system-cluster-critical` is default |
|
||||
| controller.resources | object | `{}` | Sets compute resources for controller component |
|
||||
| controller.tolerations | list | `[{"effect":"NoSchedule","key":"node-role.kubernetes.io/master","operator":"Equal","value":"true"}]` | Tolerations for controller component |
|
||||
| crds.csi.volumeSnapshots.enabled | bool | `true` | Install Volume Snapshot CRDs |
|
||||
| crds.enabled | bool | `true` | Disables the installation of all CRDs if set to false |
|
||||
| global.analytics.enabled | bool | `true` | Enable OpenEBS analytics which help track engine traction and usage. |
|
||||
| global.imagePullPolicy | string | `"IfNotPresent"` | Default pull policy for images |
|
||||
| global.imagePullSecrets | list | `[]` | Default image pull secret for images |
|
||||
| global.imageRegistry | string | `"docker.io"` | Default image registry for Images from DockerHub |
|
||||
| global.k8sImageRegistry | string | `"registry.k8s.io"` | Default image registry for Images from Kubernetes (registry.k8s.io) |
|
||||
| image.pullPolicy | string | `"IfNotPresent"` | Default image pull policy for node and controller components |
|
||||
| image.registry | string | `""` | Image registry for rawfile-localpv (default is global.imageRegistry) |
|
||||
| image.repository | string | `"openebs/rawfile-localpv"` | Image repository for rawfile-localpv |
|
||||
| image.tag | string | `""` | Default image tag for node and controller components (uses AppVersion if empty) |
|
||||
| imagePullSecrets | list | `[]` | Sets image pull secret while pulling images from a private registry |
|
||||
| logFormat | string | `"json"` | Format of the logs (json, pretty) |
|
||||
| logLevel | string | `"INFO"` | Level of the logs (DEBUG, INFO, etc.) |
|
||||
| metrics.enabled | bool | `true` | Completely enable or disable metrics |
|
||||
| metrics.port | int | `9100` | Sets metrics port |
|
||||
| metrics.serviceMonitor.enabled | bool | `false` | Enables prometheus service monitor |
|
||||
| metrics.serviceMonitor.interval | string | `"1m"` | Sets prometheus target interval |
|
||||
| node.dataDirPath | string | `"/var/csi/rawfile"` | Data dir path for provisioner to be used by provisioner |
|
||||
| node.driverRegistrar.image.registry | string | `""` | Image Registry for `csi-node-driver-registrar` |
|
||||
| node.driverRegistrar.image.repository | string | `"sig-storage/csi-node-driver-registrar"` | Image Repository for `csi-node-driver-registrar` |
|
||||
| node.driverRegistrar.image.tag | string | `"v2.13.0"` | Image Tag for `csi-node-driver-registrar` |
|
||||
| node.externalProvisioner.image.registry | string | `""` | Image Registry for `csi-provisioner` |
|
||||
| node.externalProvisioner.image.repository | string | `"sig-storage/csi-provisioner"` | Image Repository for `csi-provisioner` |
|
||||
| node.externalProvisioner.image.tag | string | `"v5.2.0"` | Image Tag for `csi-provisioner` |
|
||||
| node.externalSnapshotter.image.registry | string | `""` | Image Registry for `csi-snapshotter` |
|
||||
| node.externalSnapshotter.image.repository | string | `"sig-storage/csi-snapshotter"` | Image Repository for `csi-snapshotter` |
|
||||
| node.externalSnapshotter.image.tag | string | `"v8.2.1"` | Image Tag for `csi-snapshotter` |
|
||||
| node.grpcWorkers | int | `10` | Number of gRPC workers for node component |
|
||||
| node.image.pullPolicy | string | `""` | Overrides default image pull policy for node component |
|
||||
| node.image.repository | string | `""` | Overrides default image repository for node component |
|
||||
| node.image.tag | string | `""` | Overrides default image tag for node component |
|
||||
| node.internalGRPC.port | int | `4500` | Port Number used for internal communication gRPC server |
|
||||
| node.internalGRPC.workers | int | `10` | gRPC worker count used for internal communication |
|
||||
| node.kubeletPath | string | `"/var/lib/kubelet"` | Kubelet path (Set to `/var/lib/k0s/kubelet` for k0s) |
|
||||
| node.metadataDirPath | string | `"/var/local/openebs/rawfile/{{ .Release.Name }}/meta"` | Metadata dir path for rawfile volumes metadata and tasks store file |
|
||||
| node.metrics.enabled | bool | `false` | |
|
||||
| node.priorityClassName | string | `"system-node-critical"` | priorityClassName for node component since this part is critical for node `system-node-critical` is default |
|
||||
| node.resources | object | `{}` | Sets compute resources for node component |
|
||||
| node.snapshotController.image.registry | string | `""` | Image Registry for `snapshot-controller` |
|
||||
| node.snapshotController.image.repository | string | `"sig-storage/snapshot-controller"` | Image Repository for `snapshot-controller` |
|
||||
| node.snapshotController.image.tag | string | `"v8.2.1"` | Image Tag for `snapshot-controller` |
|
||||
| node.tolerations | string | `nil` | Tolerations for node component |
|
||||
| provisionerName | string | `"rawfile.csi.openebs.io"` | Name of the registered CSI Driver in the cluster |
|
||||
| reservedCapacity | string | `""` | Used to reserve capacity on each node for data dir storage on each host (Supports percentage and size) [e.g. `25%` or `50GB` or `10MiB`] |
|
||||
| snapshotClasses[0].deletionPolicy | string | `"Delete"` | Sets deletion policy for snapshots created using this class (Delete or Retain) |
|
||||
| snapshotClasses[0].enabled | bool | `true` | Enable or disable SnapshotClass |
|
||||
| snapshotClasses[0].isDefault | bool | `false` | Make the snapshot class as default |
|
||||
| snapshotClasses[0].name | string | `"rawfile-localpv"` | Name of the SnapshotClass |
|
||||
| storageClasses[0].allowVolumeExpansion | bool | `true` | volumes are able to expand/resize or not? |
|
||||
| storageClasses[0].copyOnWrite | string | `""` | Enables CoW on storage class (defaults to autodetect) |
|
||||
| storageClasses[0].enabled | bool | `true` | Enable or disable StorageClass |
|
||||
| storageClasses[0].formatOptions | list | `[]` | Sets format options for filesystem volumes |
|
||||
| storageClasses[0].freezeFs | string | `""` | Enables FreezeFS on storage class can be used to enable snapshotting of inused volumes when CoW is disabled/not supported (False by default) |
|
||||
| storageClasses[0].fsType | string | `"ext4"` | Sets filesystem type for volumes (Currently supports `btrfs`, `xfs` and `ext4` [which is default]) |
|
||||
| storageClasses[0].isDefault | bool | `false` | Make the storage class as default |
|
||||
| storageClasses[0].mountOptions | list | `[]` | Sets mount options for filesystem volumes |
|
||||
| storageClasses[0].name | string | `"rawfile-localpv"` | Name of the StorageClass |
|
||||
| storageClasses[0].reclaimPolicy | string | `"Delete"` | Sets default reclaimPolicy for StorageClass volumes |
|
||||
| storageClasses[0].thinProvision | string | `""` | Enables thin provisioning of volumes |
|
||||
| storageClasses[0].volumeBindingMode | string | `"WaitForFirstConsumer"` | Sets volumeBindingMode for StorageClass |
|
||||
20
charts/rawfile-localpv/README.md.gotmpl
Normal file
20
charts/rawfile-localpv/README.md.gotmpl
Normal file
@@ -0,0 +1,20 @@
|
||||
{{ template "chart.header" . }}
|
||||
{{ template "chart.deprecationWarning" . }}
|
||||
|
||||
{{ template "chart.badgesSection" . }}
|
||||
|
||||
{{ template "chart.description" . }}
|
||||
|
||||
{{ template "chart.homepageLine" . }}
|
||||
|
||||
{{ template "chart.maintainersSection" . }}
|
||||
|
||||
{{ template "chart.sourcesSection" . }}
|
||||
|
||||
{{ template "chart.requirementsSection" . }}
|
||||
|
||||
## Install and Upgrades
|
||||
|
||||
Please follow the [install guide](https://github.com/openebs/rawfile-localpv/tree/v{{ template "chart.version" . }}/docs/install-guide.md)
|
||||
|
||||
{{ template "chart.valuesSection" . }}
|
||||
4
charts/rawfile-localpv/charts/crds/Chart.yaml
Normal file
4
charts/rawfile-localpv/charts/crds/Chart.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
apiVersion: v2
|
||||
description: 'A Helm chart that collects CustomResourceDefinitions (CRDs). '
|
||||
name: crds
|
||||
version: 0.0.1
|
||||
13
charts/rawfile-localpv/charts/crds/README.md
Normal file
13
charts/rawfile-localpv/charts/crds/README.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# crds
|
||||
|
||||

|
||||
|
||||
A Helm chart that collects CustomResourceDefinitions (CRDs).
|
||||
|
||||
## Values
|
||||
|
||||
| Key | Type | Default | Description |
|
||||
|-----|------|---------|-------------|
|
||||
| csi.volumeSnapshots.annotations | object | `{}` | Annotations to be added to all CRDs |
|
||||
| csi.volumeSnapshots.enabled | bool | `true` | Install Volume Snapshot CRDs |
|
||||
| csi.volumeSnapshots.keep | bool | `true` | Keep CRDs on chart uninstall |
|
||||
19
charts/rawfile-localpv/charts/crds/templates/_helpers.tpl
Normal file
19
charts/rawfile-localpv/charts/crds/templates/_helpers.tpl
Normal file
@@ -0,0 +1,19 @@
|
||||
{{/* 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 -}}
|
||||
10
charts/rawfile-localpv/charts/crds/values.yaml
Normal file
10
charts/rawfile-localpv/charts/crds/values.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
csi:
|
||||
volumeSnapshots:
|
||||
# -- Install Volume Snapshot CRDs
|
||||
enabled: true
|
||||
# -- Keep CRDs on chart uninstall
|
||||
keep: true
|
||||
# -- Annotations to be added to all CRDs
|
||||
annotations: {}
|
||||
# Example for Argo CD to prevent CRDs from being recycled
|
||||
# argocd.argoproj.io/sync-options: Prune=false
|
||||
122
charts/rawfile-localpv/templates/_helpers.tpl
Normal file
122
charts/rawfile-localpv/templates/_helpers.tpl
Normal file
@@ -0,0 +1,122 @@
|
||||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "rawfile-localpv.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app 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 "rawfile-localpv.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 "rawfile-localpv.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "rawfile-localpv.labels" -}}
|
||||
helm.sh/chart: {{ include "rawfile-localpv.chart" . }}
|
||||
{{ include "rawfile-localpv.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "rawfile-localpv.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "rawfile-localpv.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "rawfile-localpv.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
{{- default (include "rawfile-localpv.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else }}
|
||||
{{- default "default" .Values.serviceAccount.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Some helpers to handle image global information
|
||||
*/}}
|
||||
{{- define "rawfile-localpv.controller-image-tag" -}}
|
||||
{{- $imageTag := .Values.controller.image.tag | default .Values.image.tag | default (printf "v%s" .Chart.AppVersion) }}
|
||||
{{- printf "%s" $imageTag }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "rawfile-localpv.controller-image-repository" -}}
|
||||
{{- printf "%s" .Values.controller.image.repository | default .Values.image.repository }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "rawfile-localpv.controller-image" -}}
|
||||
{{- $imageRegistry := .Values.image.registry | default .Values.global.imageRegistry }}
|
||||
{{- printf "%s/%s:%s" $imageRegistry (include "rawfile-localpv.controller-image-repository" .) (include "rawfile-localpv.controller-image-tag" .) }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "rawfile-localpv.controller-pull-policy" -}}
|
||||
{{- printf "%s" (.Values.controller.image.pullPolicy | default .Values.image.pullPolicy | default .Values.global.imagePullPolicy) }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "rawfile-localpv.controller-resources" -}}
|
||||
{{- toYaml (.Values.controller.resources) }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "rawfile-localpv.node-image-tag" -}}
|
||||
{{- $imageTag := .Values.node.image.tag | default .Values.image.tag | default (printf "v%s" .Chart.AppVersion) }}
|
||||
{{- printf "%s" $imageTag }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "rawfile-localpv.node-image-registry" -}}
|
||||
{{- printf "%s" .Values.image.registry | default .Values.global.imageRegistry }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "rawfile-localpv.node-image-repository" -}}
|
||||
{{- printf "%s" .Values.node.image.repository | default .Values.image.repository }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "rawfile-localpv.node-image" -}}
|
||||
{{- $imageRegistry := .Values.image.registry | default .Values.global.imageRegistry }}
|
||||
{{- printf "%s/%s:%s" $imageRegistry (include "rawfile-localpv.node-image-repository" .) (include "rawfile-localpv.node-image-tag" .) }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "rawfile-localpv.node-pull-policy" -}}
|
||||
{{- printf "%s" (.Values.node.image.pullPolicy | default .Values.image.pullPolicy | default .Values.global.imagePullPolicy) }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "rawfile-localpv.node-resources" -}}
|
||||
{{- toYaml (.Values.node.resources) }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "rawfile-localpv.node-kubelet-path" -}}
|
||||
{{- printf "%s/" (.Values.node.kubeletPath | trimSuffix "/") -}}
|
||||
{{- end }}
|
||||
|
||||
{{- define "rawfile-localpv.metadata-dir-path" -}}
|
||||
{{- tpl .Values.node.metadataDirPath . }}
|
||||
{{- end }}
|
||||
13
charts/rawfile-localpv/templates/controller/service.yaml
Normal file
13
charts/rawfile-localpv/templates/controller/service.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "rawfile-localpv.fullname" . }}-controller
|
||||
labels:
|
||||
{{- include "rawfile-localpv.labels" . | nindent 4 }}
|
||||
component: controller
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
{{- include "rawfile-localpv.selectorLabels" . | nindent 4 }}
|
||||
component: controller
|
||||
clusterIP: None
|
||||
99
charts/rawfile-localpv/templates/controller/statefulset.yaml
Normal file
99
charts/rawfile-localpv/templates/controller/statefulset.yaml
Normal file
@@ -0,0 +1,99 @@
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ include "rawfile-localpv.fullname" . }}-controller
|
||||
spec:
|
||||
replicas: 1
|
||||
serviceName: {{ include "rawfile-localpv.fullname" . }}
|
||||
selector:
|
||||
matchLabels: &selectorLabels
|
||||
{{- include "rawfile-localpv.selectorLabels" . | nindent 6 }}
|
||||
component: controller
|
||||
template:
|
||||
metadata:
|
||||
labels: *selectorLabels
|
||||
spec:
|
||||
serviceAccount: {{ include "rawfile-localpv.fullname" . }}-driver
|
||||
priorityClassName: {{ .Values.controller.priorityClassName }}
|
||||
tolerations:
|
||||
{{- .Values.controller.tolerations | toYaml | nindent 8 }}
|
||||
volumes:
|
||||
- name: socket-dir
|
||||
emptyDir: {}
|
||||
containers:
|
||||
- name: csi-driver
|
||||
image: "{{ include "rawfile-localpv.controller-image" . }}"
|
||||
imagePullPolicy: "{{ include "rawfile-localpv.controller-pull-policy" . }}"
|
||||
args:
|
||||
- csi-driver
|
||||
- --enable-metrics=false
|
||||
env:
|
||||
- name: PROVISIONER_NAME
|
||||
value: "{{ .Values.provisionerName }}"
|
||||
- name: CSI_DRIVER__ENDPOINT
|
||||
value: unix:///csi/csi.sock
|
||||
- name: CSI_DRIVER__NODE_ID
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: spec.nodeName
|
||||
- name: NAMESPACE
|
||||
value: {{ .Release.Namespace }}
|
||||
- name: LOG_LEVEL
|
||||
value: {{ .Values.logLevel }}
|
||||
- name: LOG_FORMAT
|
||||
value: {{ .Values.logFormat }}
|
||||
- name: CSI_DRIVER__PLUGIN_TYPE
|
||||
value: controller
|
||||
{{- if .Values.reservedCapacity }}
|
||||
- name: RESERVED_CAPACITY
|
||||
value: {{ .Values.reservedCapacity | toString | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.capacityOverride }}
|
||||
- name: CAPACITY_OVERRIDE
|
||||
value: {{ .Values.capacityOverride | toString | quote }}
|
||||
{{- end }}
|
||||
- name: CSI_DRIVER__GRPC_WORKERS
|
||||
value: {{ .Values.controller.grpcWorkers | toString | quote }}
|
||||
- name: GA_ENABLED
|
||||
value: "{{ .Values.global.analytics.enabled }}"
|
||||
{{- if .Values.global.analytics.gaId }}
|
||||
- name: GA_ID
|
||||
value: {{ .Values.global.analytics.gaId | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.analytics.gaKey }}
|
||||
- name: GA_KEY
|
||||
value: {{ .Values.global.analytics.gaKey | quote }}
|
||||
{{- end }}
|
||||
- name: CSI_DRIVER__INTERNAL_PORT
|
||||
value: {{ .Values.node.internalGRPC.port | toString | quote }}
|
||||
- name: CSI_DRIVER__NODE_DS
|
||||
value: {{ include "rawfile-localpv.fullname" . }}-node
|
||||
{{- if .Values.auth.enabled }}
|
||||
- name: CSI_DRIVER__INTERNAL_SIGNATURE
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "rawfile-localpv.fullname" . }}-secrets
|
||||
key: internal-signature
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: socket-dir
|
||||
mountPath: /csi
|
||||
ports:
|
||||
- name: csi-probe
|
||||
containerPort: 9808
|
||||
resources:
|
||||
{{- include "rawfile-localpv.controller-resources" . | nindent 12 }}
|
||||
- name: external-resizer
|
||||
image: {{ printf "%s/%s:%s" (.Values.controller.externalResizer.image.registry | default .Values.global.k8sImageRegistry) .Values.controller.externalResizer.image.repository .Values.controller.externalResizer.image.tag }}
|
||||
imagePullPolicy: IfNotPresent
|
||||
args:
|
||||
- "--csi-address=$(ADDRESS)"
|
||||
- "--handle-volume-inuse-error=false"
|
||||
- "--timeout=30s"
|
||||
env:
|
||||
- name: ADDRESS
|
||||
value: /csi/csi.sock
|
||||
volumeMounts:
|
||||
- name: socket-dir
|
||||
mountPath: /csi
|
||||
11
charts/rawfile-localpv/templates/driver.yaml
Normal file
11
charts/rawfile-localpv/templates/driver.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: CSIDriver
|
||||
metadata:
|
||||
name: {{ .Values.provisionerName }}
|
||||
spec:
|
||||
attachRequired: false
|
||||
podInfoOnMount: true
|
||||
fsGroupPolicy: File
|
||||
storageCapacity: true
|
||||
volumeLifecycleModes:
|
||||
- Persistent
|
||||
220
charts/rawfile-localpv/templates/node-plugin/daemonset.yaml
Normal file
220
charts/rawfile-localpv/templates/node-plugin/daemonset.yaml
Normal file
@@ -0,0 +1,220 @@
|
||||
apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
name: {{ include "rawfile-localpv.fullname" . }}-node
|
||||
spec:
|
||||
updateStrategy:
|
||||
rollingUpdate:
|
||||
maxUnavailable: "100%"
|
||||
selector:
|
||||
matchLabels: &selectorLabels
|
||||
{{- include "rawfile-localpv.selectorLabels" . | nindent 6 }}
|
||||
component: node
|
||||
template:
|
||||
metadata:
|
||||
labels: *selectorLabels
|
||||
spec:
|
||||
serviceAccount: {{ include "rawfile-localpv.fullname" . }}-driver
|
||||
priorityClassName: {{ .Values.node.priorityClassName }}
|
||||
tolerations:
|
||||
{{- .Values.node.tolerations | toYaml | nindent 8 }}
|
||||
volumes:
|
||||
- name: registration-dir
|
||||
hostPath:
|
||||
path: {{ include "rawfile-localpv.node-kubelet-path" . }}plugins_registry
|
||||
type: Directory
|
||||
- name: socket-dir
|
||||
hostPath:
|
||||
path: {{ include "rawfile-localpv.node-kubelet-path" . }}plugins/rawfile-localpv
|
||||
type: DirectoryOrCreate
|
||||
- name: mountpoint-dir
|
||||
hostPath:
|
||||
path: {{ include "rawfile-localpv.node-kubelet-path" . }}
|
||||
type: DirectoryOrCreate
|
||||
- name: data-dir
|
||||
hostPath:
|
||||
path: {{ .Values.node.dataDirPath }}
|
||||
type: DirectoryOrCreate
|
||||
- name: metadata-dir
|
||||
hostPath:
|
||||
path: {{ include "rawfile-localpv.metadata-dir-path" . }}
|
||||
type: DirectoryOrCreate
|
||||
- name: device
|
||||
hostPath:
|
||||
path: /dev
|
||||
type: Directory
|
||||
containers:
|
||||
- name: csi-driver
|
||||
image: "{{ include "rawfile-localpv.node-image" . }}"
|
||||
imagePullPolicy: "{{ include "rawfile-localpv.node-pull-policy" . }}"
|
||||
securityContext:
|
||||
privileged: true
|
||||
env:
|
||||
- name: PROVISIONER_NAME
|
||||
value: "{{ .Values.provisionerName }}"
|
||||
- name: CSI_DRIVER__ENDPOINT
|
||||
value: unix:///csi/csi.sock
|
||||
- name: CSI_DRIVER__NODE_ID
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: spec.nodeName
|
||||
- name: CSI_DRIVER__ENABLE_METRICS
|
||||
value: {{ .Values.metrics.enabled | toString | quote }}
|
||||
- name: CSI_DRIVER__METRICS_PORT
|
||||
value: {{ .Values.metrics.port | toString | quote }}
|
||||
- name: CSI_DRIVER__METADATA_DIR
|
||||
value: {{ include "rawfile-localpv.metadata-dir-path" . }}
|
||||
- name: NAMESPACE
|
||||
value: {{ .Release.Namespace }}
|
||||
- name: LOG_LEVEL
|
||||
value: {{ .Values.logLevel }}
|
||||
- name: LOG_FORMAT
|
||||
value: {{ .Values.logFormat }}
|
||||
- name: CSI_DRIVER__PLUGIN_TYPE
|
||||
value: node
|
||||
{{- if .Values.reservedCapacity }}
|
||||
- name: RESERVED_CAPACITY
|
||||
value: {{ .Values.reservedCapacity | toString | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.capacityOverride }}
|
||||
- name: CAPACITY_OVERRIDE
|
||||
value: {{ .Values.capacityOverride | toString | quote }}
|
||||
{{- end }}
|
||||
- name: CSI_DRIVER__GRPC_WORKERS
|
||||
value: {{ .Values.node.grpcWorkers | toString | quote }}
|
||||
- name: GA_ENABLED
|
||||
value: "{{ .Values.global.analytics.enabled }}"
|
||||
{{- if .Values.global.analytics.gaId }}
|
||||
- name: GA_ID
|
||||
value: {{ .Values.global.analytics.gaId | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.global.analytics.gaKey }}
|
||||
- name: GA_KEY
|
||||
value: {{ .Values.global.analytics.gaKey | quote }}
|
||||
{{- end }}
|
||||
- name: CSI_DRIVER__INTERNAL_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: status.podIP
|
||||
- name: CSI_DRIVER__INTERNAL_PORT
|
||||
value: {{ .Values.node.internalGRPC.port | toString | quote }}
|
||||
- name: CSI_DRIVER__INTERNAL_GRPC_WORKERS
|
||||
value: {{ .Values.node.internalGRPC.workers | toString | quote }}
|
||||
- name: CSI_DRIVER__NODE_DS
|
||||
value: {{ include "rawfile-localpv.fullname" . }}-node
|
||||
{{- if .Values.auth.enabled }}
|
||||
- name: CSI_DRIVER__INTERNAL_SIGNATURE
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "rawfile-localpv.fullname" . }}-secrets
|
||||
key: internal-signature
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: metrics
|
||||
containerPort: {{ .Values.metrics.port }}
|
||||
- name: csi-probe
|
||||
containerPort: 9808
|
||||
volumeMounts:
|
||||
- name: socket-dir
|
||||
mountPath: /csi
|
||||
- name: mountpoint-dir
|
||||
mountPath: {{ include "rawfile-localpv.node-kubelet-path" . }}
|
||||
mountPropagation: "Bidirectional"
|
||||
- name: data-dir
|
||||
mountPath: /data
|
||||
- name: metadata-dir
|
||||
mountPath: {{ include "rawfile-localpv.metadata-dir-path" . }}
|
||||
- name: device
|
||||
mountPath: /dev
|
||||
resources:
|
||||
{{- include "rawfile-localpv.controller-resources" . | nindent 12 }}
|
||||
- name: node-driver-registrar
|
||||
image: {{ printf "%s/%s:%s" (.Values.node.driverRegistrar.image.registry | default .Values.global.k8sImageRegistry) .Values.node.driverRegistrar.image.repository .Values.node.driverRegistrar.image.tag }}
|
||||
imagePullPolicy: IfNotPresent
|
||||
args:
|
||||
- --csi-address=$(ADDRESS)
|
||||
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
|
||||
- --health-port=9809
|
||||
env:
|
||||
- name: ADDRESS
|
||||
value: /csi/csi.sock
|
||||
- name: DRIVER_REG_SOCK_PATH
|
||||
value: {{ include "rawfile-localpv.node-kubelet-path" . }}plugins/rawfile-localpv/csi.sock
|
||||
ports:
|
||||
- containerPort: 9809
|
||||
name: healthz
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: healthz
|
||||
initialDelaySeconds: 5
|
||||
timeoutSeconds: 5
|
||||
volumeMounts:
|
||||
- name: socket-dir
|
||||
mountPath: /csi
|
||||
- name: registration-dir
|
||||
mountPath: /registration
|
||||
resources:
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 100Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 100Mi
|
||||
- name: external-provisioner
|
||||
image: {{ printf "%s/%s:%s" (.Values.node.externalProvisioner.image.registry | default .Values.global.k8sImageRegistry) .Values.node.externalProvisioner.image.repository .Values.node.externalProvisioner.image.tag }}
|
||||
imagePullPolicy: IfNotPresent
|
||||
args:
|
||||
- "--csi-address=$(ADDRESS)"
|
||||
- "--feature-gates=Topology=true"
|
||||
- "--strict-topology"
|
||||
- "--immediate-topology=false"
|
||||
- "--timeout=120s"
|
||||
- "--enable-capacity=true"
|
||||
- "--capacity-for-immediate-binding=true"
|
||||
- "--capacity-ownerref-level=1" # DaemonSet
|
||||
- "--node-deployment=true"
|
||||
- "--extra-create-metadata=true"
|
||||
env:
|
||||
- name: ADDRESS
|
||||
value: /csi/csi.sock
|
||||
- name: NODE_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
- name: NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
- name: POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
volumeMounts:
|
||||
- name: socket-dir
|
||||
mountPath: /csi
|
||||
- name: external-snapshotter
|
||||
image: {{ printf "%s/%s:%s" (.Values.node.externalSnapshotter.image.registry | default .Values.global.k8sImageRegistry) .Values.node.externalSnapshotter.image.repository .Values.node.externalSnapshotter.image.tag }}
|
||||
imagePullPolicy: IfNotPresent
|
||||
args:
|
||||
- "--csi-address=$(ADDRESS)"
|
||||
- "--node-deployment=true"
|
||||
- "--extra-create-metadata=true"
|
||||
env:
|
||||
- name: ADDRESS
|
||||
value: /csi/csi.sock
|
||||
- name: NODE_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
volumeMounts:
|
||||
- name: socket-dir
|
||||
mountPath: /csi
|
||||
- name: snapshot-controller
|
||||
args:
|
||||
- "--v=2"
|
||||
- "--enable-distributed-snapshotting=true"
|
||||
image: {{ printf "%s/%s:%s" (.Values.node.snapshotController.image.registry | default .Values.global.k8sImageRegistry) .Values.node.snapshotController.image.repository .Values.node.snapshotController.image.tag }}
|
||||
imagePullPolicy: IfNotPresent
|
||||
20
charts/rawfile-localpv/templates/node-plugin/service.yaml
Normal file
20
charts/rawfile-localpv/templates/node-plugin/service.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "rawfile-localpv.fullname" . }}-node
|
||||
labels:
|
||||
{{- include "rawfile-localpv.labels" . | nindent 4 }}
|
||||
component: node
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- name: metrics
|
||||
port: {{ .Values.metrics.port }}
|
||||
targetPort: metrics
|
||||
protocol: TCP
|
||||
- name: internal
|
||||
port: {{ .Values.node.internalGRPC.port }}
|
||||
protocol: TCP
|
||||
selector:
|
||||
{{- include "rawfile-localpv.selectorLabels" . | nindent 4 }}
|
||||
component: node
|
||||
@@ -0,0 +1,25 @@
|
||||
{{- if .Values.metrics.enabled }}
|
||||
{{- if .Values.metrics.serviceMonitor.enabled }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: {{ include "rawfile-localpv.fullname" . }}-node
|
||||
labels:
|
||||
{{- include "rawfile-localpv.labels" . | nindent 4 }}
|
||||
spec:
|
||||
endpoints:
|
||||
- port: metrics
|
||||
path: /metrics
|
||||
{{- with .Values.metrics.serviceMonitor.interval }}
|
||||
interval: {{ . }}
|
||||
{{- end }}
|
||||
jobLabel: "helm.sh/chart"
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- {{ .Release.Namespace }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "rawfile-localpv.selectorLabels" . | nindent 6 }}
|
||||
component: node
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
191
charts/rawfile-localpv/templates/rbac.yaml
Normal file
191
charts/rawfile-localpv/templates/rbac.yaml
Normal file
@@ -0,0 +1,191 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "rawfile-localpv.fullname" . }}-driver
|
||||
imagePullSecrets:
|
||||
{{- toYaml .Values.imagePullSecrets | nindent 2 }}
|
||||
---
|
||||
kind: ClusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: {{ include "rawfile-localpv.fullname" . }}-provisioner
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["secrets"]
|
||||
verbs: ["get", "list"]
|
||||
- apiGroups: [""]
|
||||
resources: ["persistentvolumes"]
|
||||
verbs: ["get", "list", "watch", "create", "delete"]
|
||||
- apiGroups: [""]
|
||||
resources: ["persistentvolumeclaims"]
|
||||
verbs: ["get", "list", "watch", "update"]
|
||||
- apiGroups: ["storage.k8s.io"]
|
||||
resources: ["storageclasses"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["events"]
|
||||
verbs: ["list", "watch", "create", "update", "patch"]
|
||||
- apiGroups: ["snapshot.storage.k8s.io"]
|
||||
resources: ["volumesnapshots"]
|
||||
verbs: ["get", "list"]
|
||||
- apiGroups: ["snapshot.storage.k8s.io"]
|
||||
resources: ["volumesnapshotcontents"]
|
||||
verbs: ["get", "list"]
|
||||
- apiGroups: ["storage.k8s.io"]
|
||||
resources: ["csinodes"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: ["storage.k8s.io"]
|
||||
resources: ["volumeattachments"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: ["storage.k8s.io"]
|
||||
resources: ["csistoragecapacities"]
|
||||
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
|
||||
- apiGroups: [""]
|
||||
resources: ["pods", "pods/log"]
|
||||
verbs: ["get"]
|
||||
- apiGroups: ["apps"]
|
||||
resources: ["daemonsets"]
|
||||
verbs: ["get"]
|
||||
---
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: {{ include "rawfile-localpv.fullname" . }}-provisioner
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "rawfile-localpv.fullname" . }}-driver
|
||||
namespace: {{ .Release.Namespace }}
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: {{ include "rawfile-localpv.fullname" . }}-provisioner
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
---
|
||||
kind: ClusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: {{ include "rawfile-localpv.fullname" . }}-broker
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["persistentvolumes"]
|
||||
verbs: ["get"]
|
||||
- apiGroups: [""]
|
||||
resources: ["pods"]
|
||||
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
|
||||
---
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: {{ include "rawfile-localpv.fullname" . }}-broker
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "rawfile-localpv.fullname" . }}-driver
|
||||
namespace: {{ .Release.Namespace }}
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: {{ include "rawfile-localpv.fullname" . }}-broker
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
---
|
||||
kind: ClusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: {{ include "rawfile-localpv.fullname" . }}-resizer
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["secrets"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["persistentvolumes"]
|
||||
verbs: ["get", "list", "watch", "patch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["persistentvolumeclaims"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["pods"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["persistentvolumeclaims/status"]
|
||||
verbs: ["patch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["events"]
|
||||
verbs: ["list", "watch", "create", "update", "patch"]
|
||||
---
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: {{ include "rawfile-localpv.fullname" . }}-resizer
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "rawfile-localpv.fullname" . }}-driver
|
||||
namespace: {{ .Release.Namespace }}
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: {{ include "rawfile-localpv.fullname" . }}-resizer
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
---
|
||||
kind: ClusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: {{ include "rawfile-localpv.fullname" . }}-snapshotter
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["events"]
|
||||
verbs: ["list", "watch", "create", "update", "patch"]
|
||||
- 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: ["volumesnapshotcontents/status"]
|
||||
verbs: ["update", "patch"]
|
||||
- apiGroups: ["snapshot.storage.k8s.io"]
|
||||
resources: ["volumesnapshots"]
|
||||
verbs: ["get", "list", "watch", "update", "patch", "delete"]
|
||||
- apiGroups: ["snapshot.storage.k8s.io"]
|
||||
resources: ["volumesnapshots/status"]
|
||||
verbs: ["update", "patch"]
|
||||
---
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: {{ include "rawfile-localpv.fullname" . }}-snapshotter
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "rawfile-localpv.fullname" . }}-driver
|
||||
namespace: {{ .Release.Namespace }}
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: {{ include "rawfile-localpv.fullname" . }}-snapshotter
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
---
|
||||
{{- if .Values.global.analytics.enabled }}
|
||||
kind: ClusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: {{ include "rawfile-localpv.fullname" . }}-analytics
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["namespaces"]
|
||||
verbs: ["get"]
|
||||
- apiGroups: [""]
|
||||
resources: ["configmaps"]
|
||||
verbs: ["create", "get", "update", "patch"]
|
||||
---
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: {{ include "rawfile-localpv.fullname" . }}-analytics
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "rawfile-localpv.fullname" . }}-driver
|
||||
namespace: {{ .Release.Namespace }}
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: {{ include "rawfile-localpv.fullname" . }}-analytics
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
---
|
||||
{{- end }}
|
||||
19
charts/rawfile-localpv/templates/secret.yaml
Normal file
19
charts/rawfile-localpv/templates/secret.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
{{- $secret_name := printf "%s-secrets" (include "rawfile-localpv.fullname" .) }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "rawfile-localpv.labels" . | nindent 4 }}
|
||||
name: {{ $secret_name }}
|
||||
type: Opaque
|
||||
data:
|
||||
{{- $old_sec := lookup "v1" "Secret" .Release.Namespace $secret_name }}
|
||||
{{- if not .Values.auth.token }}
|
||||
{{- if or (not $old_sec) (not $old_sec.data) }}
|
||||
internal-signature: {{ randAlphaNum 32 | b64enc }}
|
||||
{{- else }}
|
||||
internal-signature: {{ index $old_sec.data "internal-signature" }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
internal-signature: {{ .Values.auth.token }}
|
||||
{{- end }}
|
||||
16
charts/rawfile-localpv/templates/snapshotclass.yaml
Normal file
16
charts/rawfile-localpv/templates/snapshotclass.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
{{- $vals := .Values }}
|
||||
{{- range $class := .Values.snapshotClasses }}
|
||||
{{- if $class.enabled }}
|
||||
apiVersion: snapshot.storage.k8s.io/v1
|
||||
kind: VolumeSnapshotClass
|
||||
metadata:
|
||||
name: {{ $class.name }}
|
||||
annotations:
|
||||
"helm.sh/hook": post-install
|
||||
"helm.sh/hook-weight": "-5"
|
||||
{{- if $class.isDefault }}snapshot.storage.kubernetes.io/is-default-class: "true"{{ end }}
|
||||
driver: {{ $vals.provisionerName }}
|
||||
deletionPolicy: {{ $class.deletionPolicy }}
|
||||
---
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
26
charts/rawfile-localpv/templates/storageclass.yaml
Normal file
26
charts/rawfile-localpv/templates/storageclass.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
{{- $vals := .Values }}
|
||||
{{- range $class := .Values.storageClasses }}
|
||||
{{- if $class.enabled }}
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
name: {{ $class.name }}
|
||||
annotations:
|
||||
"helm.sh/hook": post-install
|
||||
"helm.sh/hook-weight": "-5"
|
||||
{{- if $class.isDefault }}storageclass.kubernetes.io/is-default-class: "true"{{ end }}
|
||||
provisioner: {{ $vals.provisionerName }}
|
||||
reclaimPolicy: {{ $class.reclaimPolicy }}
|
||||
volumeBindingMode: {{ $class.volumeBindingMode }}
|
||||
allowVolumeExpansion: {{ $class.allowVolumeExpansion }}
|
||||
mountOptions:
|
||||
{{- toYaml ($class.mountOptions | default (list)) | nindent 2 }}
|
||||
parameters:
|
||||
csi.storage.k8s.io/fstype: {{ $class.fsType | default "ext4" }}
|
||||
thinProvision: {{ $class.thinProvision | default "false" | toString | quote }}
|
||||
formatOptions: {{ ($class.formatOptions | default (list)) | join " " | quote }}
|
||||
copyOnWrite: {{ $class.copyOnWrite | default "false" | toString | quote }}
|
||||
freezeFs: {{ $class.freezeFs | default "false" | toString | quote }}
|
||||
---
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
221
charts/rawfile-localpv/values.yaml
Normal file
221
charts/rawfile-localpv/values.yaml
Normal file
@@ -0,0 +1,221 @@
|
||||
# -- Name of the registered CSI Driver in the cluster
|
||||
provisionerName: "rawfile.csi.openebs.io"
|
||||
|
||||
# -- Level of the logs (DEBUG, INFO, etc.)
|
||||
logLevel: INFO
|
||||
# -- Format of the logs (json, pretty)
|
||||
logFormat: json
|
||||
|
||||
# -- Used to reserve capacity on each node for data dir storage on each host (Supports percentage and size) [e.g. `25%` or `50GB` or `10MiB`]
|
||||
reservedCapacity: ""
|
||||
# -- Overrides total capacity of the storage for data dir storage on each host (Support size values) [e.g. `50GB` or `10MiB`]
|
||||
capacityOverride: ""
|
||||
|
||||
auth:
|
||||
# -- Enables authentication for internal gRPC server
|
||||
enabled: true
|
||||
# -- Sets authentication token for internal gRPC server, will generate one if nothing provided
|
||||
token: ""
|
||||
|
||||
global:
|
||||
# -- Default image registry for Images from DockerHub
|
||||
imageRegistry: docker.io
|
||||
# -- Default image registry for Images from Kubernetes (registry.k8s.io)
|
||||
k8sImageRegistry: registry.k8s.io
|
||||
# -- Default pull policy for images
|
||||
imagePullPolicy: IfNotPresent
|
||||
# -- Default image pull secret for images
|
||||
imagePullSecrets: []
|
||||
analytics:
|
||||
# -- Enable OpenEBS analytics which help track engine traction and usage.
|
||||
enabled: true
|
||||
|
||||
image:
|
||||
# -- Image registry for rawfile-localpv (default is global.imageRegistry)
|
||||
registry: ""
|
||||
# -- Image repository for rawfile-localpv
|
||||
repository: openebs/rawfile-localpv
|
||||
# -- Default image tag for node and controller components (uses AppVersion if empty)
|
||||
tag: ""
|
||||
# -- Default image pull policy for node and controller components
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
controller:
|
||||
image:
|
||||
# -- Overrides default image repository for node component
|
||||
repository: ""
|
||||
# -- Overrides default image tag for node component
|
||||
tag: ""
|
||||
# -- Overrides default image pull policy for node component
|
||||
pullPolicy: ""
|
||||
|
||||
externalResizer:
|
||||
image:
|
||||
# -- Image registry for `csi-resizer`
|
||||
registry: ""
|
||||
# -- Image Repository for `csi-resizer`
|
||||
repository: sig-storage/csi-resizer
|
||||
# -- Image tag for `csi-resizer`
|
||||
tag: v1.13.2
|
||||
|
||||
# -- Sets compute resources for controller component
|
||||
resources:
|
||||
{}
|
||||
# limits:
|
||||
# cpu: 1
|
||||
# memory: 100Mi
|
||||
# requests:
|
||||
# cpu: 10m
|
||||
# memory: 100Mi
|
||||
|
||||
# -- priorityClassName for controller component since this part is critical for cluster `system-cluster-critical` is default
|
||||
priorityClassName: system-cluster-critical
|
||||
|
||||
# -- Tolerations for controller component
|
||||
tolerations:
|
||||
- key: "node-role.kubernetes.io/master"
|
||||
operator: Equal
|
||||
value: "true"
|
||||
effect: NoSchedule
|
||||
|
||||
# -- Number of gRPC workers for controller component
|
||||
grpcWorkers: 10
|
||||
|
||||
node:
|
||||
image:
|
||||
# -- Overrides default image repository for node component
|
||||
repository: ""
|
||||
# -- Overrides default image tag for node component
|
||||
tag: ""
|
||||
# -- Overrides default image pull policy for node component
|
||||
pullPolicy: ""
|
||||
|
||||
driverRegistrar:
|
||||
image:
|
||||
# -- Image Registry for `csi-node-driver-registrar`
|
||||
registry: ""
|
||||
# -- Image Repository for `csi-node-driver-registrar`
|
||||
repository: sig-storage/csi-node-driver-registrar
|
||||
# -- Image Tag for `csi-node-driver-registrar`
|
||||
tag: v2.13.0
|
||||
|
||||
externalProvisioner:
|
||||
image:
|
||||
# -- Image Registry for `csi-provisioner`
|
||||
registry: ""
|
||||
# -- Image Repository for `csi-provisioner`
|
||||
repository: sig-storage/csi-provisioner
|
||||
# -- Image Tag for `csi-provisioner`
|
||||
tag: v5.2.0
|
||||
|
||||
externalSnapshotter:
|
||||
image:
|
||||
# -- Image Registry for `csi-snapshotter`
|
||||
registry: ""
|
||||
# -- Image Repository for `csi-snapshotter`
|
||||
repository: sig-storage/csi-snapshotter
|
||||
# -- Image Tag for `csi-snapshotter`
|
||||
tag: v8.2.1
|
||||
|
||||
snapshotController:
|
||||
image:
|
||||
# -- Image Registry for `snapshot-controller`
|
||||
registry: ""
|
||||
# -- Image Repository for `snapshot-controller`
|
||||
repository: sig-storage/snapshot-controller
|
||||
# -- Image Tag for `snapshot-controller`
|
||||
tag: v8.2.1
|
||||
|
||||
# -- Data dir path for provisioner to be used by provisioner
|
||||
dataDirPath: /var/csi/rawfile
|
||||
|
||||
# -- Metadata dir path for rawfile volumes metadata and tasks store file
|
||||
metadataDirPath: /var/local/openebs/rawfile/{{ .Release.Name }}/meta
|
||||
|
||||
# -- Kubelet path (Set to `/var/lib/k0s/kubelet` for k0s)
|
||||
kubeletPath: /var/lib/kubelet
|
||||
|
||||
# -- Sets compute resources for node component
|
||||
resources:
|
||||
{}
|
||||
# limits:
|
||||
# cpu: 1
|
||||
# memory: 100Mi
|
||||
# requests:
|
||||
# cpu: 10m
|
||||
# memory: 100Mi
|
||||
metrics:
|
||||
enabled: false
|
||||
|
||||
# -- priorityClassName for node component since this part is critical for node `system-node-critical` is default
|
||||
priorityClassName: system-node-critical
|
||||
|
||||
# -- Tolerations for node component
|
||||
tolerations:
|
||||
|
||||
# -- Number of gRPC workers for node component
|
||||
grpcWorkers: 10
|
||||
|
||||
internalGRPC:
|
||||
# -- Port Number used for internal communication gRPC server
|
||||
port: 4500
|
||||
# --gRPC worker count used for internal communication
|
||||
workers: 10
|
||||
|
||||
# -- Sets image pull secret while pulling images from a private registry
|
||||
imagePullSecrets: []
|
||||
|
||||
metrics:
|
||||
# -- Completely enable or disable metrics
|
||||
enabled: true
|
||||
# -- Sets metrics port
|
||||
port: 9100
|
||||
serviceMonitor:
|
||||
# -- Enables prometheus service monitor
|
||||
enabled: false
|
||||
# -- Sets prometheus target interval
|
||||
interval: 1m
|
||||
|
||||
storageClasses:
|
||||
- # -- Name of the StorageClass
|
||||
name: rawfile-localpv
|
||||
# -- Enable or disable StorageClass
|
||||
enabled: true
|
||||
# -- Sets volumeBindingMode for StorageClass
|
||||
volumeBindingMode: WaitForFirstConsumer
|
||||
# -- Make the storage class as default
|
||||
isDefault: false
|
||||
# -- volumes are able to expand/resize or not?
|
||||
allowVolumeExpansion: true
|
||||
# -- Sets default reclaimPolicy for StorageClass volumes
|
||||
reclaimPolicy: Delete
|
||||
# -- Sets filesystem type for volumes (Currently supports `btrfs`, `xfs` and `ext4` [which is default])
|
||||
fsType: ext4
|
||||
# -- Enables thin provisioning of volumes
|
||||
thinProvision: ""
|
||||
# -- Sets mount options for filesystem volumes
|
||||
mountOptions: []
|
||||
# -- Sets format options for filesystem volumes
|
||||
formatOptions: []
|
||||
# -- Enables CoW on storage class (defaults to autodetect)
|
||||
copyOnWrite: ""
|
||||
# -- Enables FreezeFS on storage class can be used to enable snapshotting of inused volumes when CoW is disabled/not supported (False by default)
|
||||
freezeFs: ""
|
||||
|
||||
snapshotClasses:
|
||||
- # -- Name of the SnapshotClass
|
||||
name: rawfile-localpv
|
||||
# -- Enable or disable SnapshotClass
|
||||
enabled: true
|
||||
# -- Sets deletion policy for snapshots created using this class (Delete or Retain)
|
||||
deletionPolicy: Delete
|
||||
# -- Make the snapshot class as default
|
||||
isDefault: false
|
||||
|
||||
crds:
|
||||
# -- Disables the installation of all CRDs if set to false
|
||||
enabled: true
|
||||
csi:
|
||||
volumeSnapshots:
|
||||
# -- Install Volume Snapshot CRDs
|
||||
enabled: true
|
||||
Reference in New Issue
Block a user