Skip to content

Commit c17a81a

Browse files
feat(system/local-storage): OpenEBS LocalPV hostpath default StorageClass
Adds a lightweight, kernel-module-free storage package for the container e2e lane (#3238), replacing cozystack.linstor (DRBD/ZFS) which cannot run in a container cluster. Vendors the OpenEBS dynamic-localpv-provisioner chart (4.5.1) via the standard nfs-driver pattern and configures its hostpath StorageClass as `local` + is-default-class=true, so app manifests that rely on the default StorageClass (storageClass: "") bind unchanged. Analytics phone-home is disabled for CI. Registers cozystack.local-storage as a PackageSource (dependsOn cozystack.networking) so it is installable standalone via `cozypkg add` against the platform `default` variant. Assisted-By: LLM Signed-off-by: Myasnikov Daniil <[email protected]>
1 parent 9f0e3ca commit c17a81a

16 files changed

Lines changed: 1138 additions & 0 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
apiVersion: cozystack.io/v1alpha1
3+
kind: PackageSource
4+
metadata:
5+
name: cozystack.local-storage
6+
spec:
7+
sourceRef:
8+
kind: OCIRepository
9+
name: cozystack-packages
10+
namespace: cozy-system
11+
path: /
12+
variants:
13+
- name: default
14+
dependsOn:
15+
- cozystack.networking
16+
components:
17+
- name: local-storage
18+
path: system/local-storage
19+
install:
20+
privileged: true
21+
namespace: cozy-local-storage
22+
releaseName: local-storage
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
images
2+
hack
3+
.gitkeep
4+
tests
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
apiVersion: v2
2+
name: cozy-local-storage
3+
version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
export NAME=local-storage
2+
export NAMESPACE=cozy-$(NAME)
3+
4+
include ../../../hack/common-envs.mk
5+
include ../../../hack/package.mk
6+
7+
update:
8+
rm -rf charts
9+
helm repo add openebs-localpv https://openebs.github.io/dynamic-localpv-provisioner
10+
helm repo update openebs-localpv
11+
helm pull openebs-localpv/localpv-provisioner --untar --untardir charts --version 4.5.1
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: v2
2+
appVersion: 4.5.1
3+
description: Helm chart for OpenEBS Dynamic Local PV. For instructions to install
4+
OpenEBS Dynamic Local PV using helm chart, refer to https://openebs.github.io/dynamic-localpv-provisioner/.
5+
home: https://openebs.io
6+
icon: https://raw.githubusercontent.com/cncf/artwork/master/projects/openebs/icon/color/openebs-icon-color.png
7+
keywords:
8+
- storage
9+
- local
10+
- dynamic-localpv
11+
name: localpv-provisioner
12+
sources:
13+
- https://github.com/openebs/dynamic-localpv-provisioner
14+
type: application
15+
version: 4.5.1
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
# OpenEBS LocalPV Provisioner
2+
3+
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
4+
![Chart Lint and Test](https://github.com/openebs/dynamic-localpv-provisioner/workflows/Chart%20Lint%20and%20Test/badge.svg)
5+
![Release Charts](https://github.com/openebs/dynamic-localpv-provisioner/workflows/Release%20Charts/badge.svg?branch=develop)
6+
7+
A Helm chart for openebs dynamic localpv provisioner. This chart bootstraps OpenEBS Dynamic LocalPV provisioner deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
8+
9+
10+
**Homepage:** <http://www.openebs.io/>
11+
12+
## Get Repo Info
13+
14+
```console
15+
helm repo add openebs-localpv https://openebs.github.io/dynamic-localpv-provisioner
16+
helm repo update
17+
```
18+
19+
_See [helm repo](https://helm.sh/docs/helm/helm_repo/) for command documentation._
20+
21+
## Install Chart
22+
23+
Please visit the [link](https://openebs.github.io/dynamic-localpv-provisioner/) for install instructions via helm3.
24+
25+
```console
26+
# Helm
27+
helm install [RELEASE_NAME] openebs-localpv/localpv-provisioner --namespace [NAMESPACE] --create-namespace
28+
```
29+
30+
_See [configuration](#configuration) below._
31+
32+
_See [helm install](https://helm.sh/docs/helm/helm_install/) for command documentation._
33+
34+
## Uninstall Chart
35+
36+
```console
37+
# Helm
38+
helm uninstall [RELEASE_NAME] --namespace [NAMESPACE]
39+
```
40+
41+
This removes all the Kubernetes components associated with the chart and deletes the release.
42+
43+
_See [helm uninstall](https://helm.sh/docs/helm/helm_uninstall/) for command documentation._
44+
45+
## Upgrading Chart
46+
47+
```console
48+
# Helm
49+
helm upgrade [RELEASE_NAME] [CHART] --install --namespace [NAMESPACE]
50+
```
51+
52+
53+
## Configuration
54+
55+
The following table lists the configurable parameters of the OpenEBS Dynamic LocalPV Provisioner chart and their default values.
56+
57+
You can modify different parameters by specifying the desired value in the `helm install` command by using the `--set` and/or the `--set-string` flag(s).
58+
59+
```console
60+
helm install openebs-localpv openebs-localpv/localpv-provisioner --namespace openebs --create-namespace
61+
```
62+
63+
Sample command to install the provisioner with nodeAffinityLabels "openebs.io/node-affinity-key-1" and "openebs.io/node-affinity-key-2" on the hostpath StorageClass:
64+
```console
65+
helm install openebs-localpv openebs-localpv/localpv-provisioner --namespace openebs --create-namespace \
66+
--set-string hostpathClass.nodeAffinityLabels="{openebs.io/node-affinity-key-1,openebs.io/node-affinity-key-2}"
67+
```
68+
69+
| Parameter | Description | Default |
70+
|-------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------|-------------------------------|
71+
| `globalImageRegistryOverride` | When set to true, the value of `global.imageRegistry` will override all image registry settings defined at local level | `"false"` |
72+
| `global.imagePullSecrets` | Global image pull secrets (merged with local imagePullSecrets and not overridden) | `[]` |
73+
| `global.imagePullPolicy` | Global override for image pull policy | `""` |
74+
| `global.analytics.enabled` | Global override for analytics | `null` |
75+
| `analytics.enabled` | Enable sending stats to Google Analytics | `true` |
76+
| `analytics.pingInterval` | Duration(hours) between sending ping stat | `24h` |
77+
| `extraLabels` | Additional labels to add to all chart resources | `{}` |
78+
| `global.imageRegistry` | Global override for container image registry (when `globalImageRegistryOverride` is set to true) | `"docker.io"` |
79+
| `helperPod.image.registry` | Registry for helper image | `""` |
80+
| `helperPod.image.repository` | Image for helper pod | `"openebs/linux-utils"` |
81+
| `helperPod.image.pullPolicy` | Pull policy for helper pod | `IfNotPresent` |
82+
| `helperPod.image.tag` | Image tag for helper image | `4.5.0` |
83+
| `helperPod.timeoutSecs` | The maximum number of seconds to wait for a helperPod (init, cleanup, quota) to complete | `120` |
84+
| `hostpathClass.basePath` | BasePath for openebs-hostpath StorageClass | `"/var/openebs/local"` |
85+
| `hostpathClass.enabled` | Enables creation of default Hostpath StorageClass | `true` |
86+
| `hostpathClass.isDefaultClass` | Make openebs-hostpath the default StorageClass | `"false"` |
87+
| `hostpathClass.nodeAffinityLabels` | Custom node label(or labels) key to uniquely identify nodes. `kubernetes.io/hostname` is the default label key for node selection. | `[]` |
88+
| `hostpathClass.xfsQuota.enabled` | Enable XFS Quota (requires XFS filesystem) | `false` |
89+
| `hostpathClass.ext4Quota.enabled` | Enable EXT4 Quota (requires EXT4 filesystem) | `false` |
90+
| `hostpathClass.reclaimPolicy` | ReclaimPolicy for Hostpath PVs | `"Delete"` |
91+
| `imagePullSecrets` | Provides image pull secrect | `""` |
92+
| `localpv.controller.workers` | The no. of concurrent worker goroutines for processing PVC create/delete events | `4` |
93+
| `localpv.enabled` | Enable LocalPV Provisioner | `true` |
94+
| `localpv.image.registry` | Registry for LocalPV Provisioner image | `""` |
95+
| `localpv.image.repository` | Image repository for LocalPV Provisioner | `openebs/localpv-provisioner` |
96+
| `localpv.image.pullPolicy` | Image pull policy for LocalPV Provisioner | `IfNotPresent` |
97+
| `localpv.image.tag` | Image tag for LocalPV Provisioner | `4.5.1` |
98+
| `localpv.updateStrategy.type` | Update strategy for LocalPV Provisioner | `RollingUpdate` |
99+
| `localpv.annotations` | Annotations for LocalPV Provisioner metadata | `""` |
100+
| `localpv.podAnnotations` | Annotations for LocalPV Provisioner pods metadata | `""` |
101+
| `localpv.privileged` | Run LocalPV Provisioner with extra privileges | `true` |
102+
| `localpv.resources` | Resource and request and limit for containers | `""` |
103+
| `localpv.podLabels` | Appends labels to the pods | `""` |
104+
| `localpv.nodeSelector` | Nodeselector for LocalPV Provisioner pods | `""` |
105+
| `localpv.nodeDeployment.enabled` | Enabled the NodeDeployment mode of installation | `""` |
106+
| `localpv.tolerations` | LocalPV Provisioner pod toleration values | `""` |
107+
| `localpv.securityContext` | Seurity context for container | `""` |
108+
| `localpv.healthCheck.initialDelaySeconds` | Delay before liveness probe is initiated | `30` |
109+
| `localpv.healthCheck.periodSeconds` | How often to perform the liveness probe | `60` |
110+
| `localpv.replicas` | No. of LocalPV Provisioner replica | `1` |
111+
| `localpv.enableLeaderElection` | Enable leader election | `true` |
112+
| `localpv.affinity` | LocalPV Provisioner pod affinity | `{}` |
113+
| `localpv.priorityClassName` | Sets priorityClassName in pod | `""` |
114+
| `rbac.create` | Enable RBAC Resources | `true` |
115+
| `rbac.pspEnabled` | Create pod security policy resources | `false` |
116+
117+
118+
A YAML file that specifies the values for the parameters can be provided while installing the chart. For example,
119+
120+
```bash
121+
helm install <release-name> -f values.yaml --namespace openebs openebs-localpv/localpv-provisioner
122+
```
123+
124+
> **Tip**: You can use the default [values.yaml](values.yaml)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
The OpenEBS Dynamic LocalPV Provisioner has been installed.
2+
Check its status by running:
3+
$ kubectl get pods -n {{ .Release.Namespace }}
4+
5+
Get started with the Dynamic LocalPV Provisioner Quickstart guide at:
6+
https://github.com/openebs/dynamic-localpv-provisioner/blob/develop/docs/quickstart.md
7+
8+
For more information, visit our Slack at https://kubernetes.slack.com/messages/openebs or view
9+
the OpenEBS documentation online at https://openebs.io/docs

0 commit comments

Comments
 (0)