Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(chart): provide CRDs in a subchart #414

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
/result*
__pycache__
/tests/bdd/openapi/
/chart/charts/
/chart/charts/*
# charts/crds is valid chart for git
!/chart/charts/crds/
/chart/Chart.lock
!/openapi/Cargo.toml
!/openapi/build.rs
Expand Down
3 changes: 3 additions & 0 deletions chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ version: 0.0.0
appVersion: "0.0.0"

dependencies:
- name: crds
version: "0.0.0"
condition: crds.enabled
- name: etcd
repository: https://charts.bitnami.com/bitnami
version: 8.6.0
Expand Down
19 changes: 16 additions & 3 deletions chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,28 @@ $ helm install mayastor . -n <mayastor-namespace>

### Installing the Chart via Helm Registry

To install the chart with the release name `my-release`:
To install the chart with the release name `mymayastor`:

```console
$ helm repo add openebs https://openebs.github.io/mayastor-extensions/
$ helm install my-release openebs/mayastor
$ helm repo add mayastor https://openebs.github.io/mayastor-extensions/
$ helm install mymayastor mayastor/mayastor
```

### Uninstall Helm Chart

```console
$ helm uninstall [RELEASE_NAME]
```

This removes all the Kubernetes components associated with the chart and deletes the release.

*See [helm uninstall](https://helm.sh/docs/helm/helm_uninstall/) for command documentation.*

## Chart Dependencies

| Repository | Name | Version |
|------------|------|---------|
| | crds | 0.0.0 |
niladrih marked this conversation as resolved.
Show resolved Hide resolved
| https://charts.bitnami.com/bitnami | etcd | 8.6.0 |
| https://grafana.github.io/helm-charts | loki-stack | 2.9.11 |
| https://jaegertracing.github.io/helm-charts | jaeger-operator | 2.25.0 |
Expand Down Expand Up @@ -93,6 +104,8 @@ $ helm install my-release openebs/mayastor
| base.&ZeroWidthSpace;jaeger.&ZeroWidthSpace;enabled | Enable jaeger tracing | `false` |
| base.&ZeroWidthSpace;logSilenceLevel | Silence specific module components | `nil` |
| base.&ZeroWidthSpace;metrics.&ZeroWidthSpace;enabled | Enable the metrics exporter | `true` |
| crds.&ZeroWidthSpace;enabled | Install CRDs | `true` |
| crds.&ZeroWidthSpace;jaeger.&ZeroWidthSpace;enabled | Install Jaeger CRDs | `false` |
| csi.&ZeroWidthSpace;controller.&ZeroWidthSpace;logLevel | Log level for the csi controller | `"info"` |
| csi.&ZeroWidthSpace;controller.&ZeroWidthSpace;preventVolumeModeConversion | Prevent modifying the volume mode when creating a PVC from an existing VolumeSnapshot | `true` |
| csi.&ZeroWidthSpace;controller.&ZeroWidthSpace;priorityClassName | Set PriorityClass, overrides global | `""` |
Expand Down
16 changes: 13 additions & 3 deletions chart/README.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,23 @@ $ helm install mayastor . -n <mayastor-namespace>

### Installing the Chart via Helm Registry

To install the chart with the release name `my-release`:
To install the chart with the release name `mymayastor`:

```console
$ helm repo add openebs https://openebs.github.io/mayastor-extensions/
$ helm install my-release openebs/{{ template "chart.name" . }}
$ helm repo add mayastor https://openebs.github.io/mayastor-extensions/
$ helm install mymayastor mayastor/{{ template "chart.name" . }}
```

### Uninstall Helm Chart

```console
$ helm uninstall [RELEASE_NAME]
```

This removes all the Kubernetes components associated with the chart and deletes the release.

*See [helm uninstall](https://helm.sh/docs/helm/helm_uninstall/) for command documentation.*

## Chart Dependencies

{{ template "chart.requirementsTable" . }}
Expand Down
7 changes: 7 additions & 0 deletions chart/charts/crds/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v2
name: crds
version: 0.0.0
description: |
A Helm chart that collects custom resource definitions (CRDs) from Mayastor. It also includes one CRD
from Jaeger tracing when enabled.

4 changes: 4 additions & 0 deletions chart/charts/crds/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Mayastor CRDs

This chart brings Custom Resource Definitions (CRDs) used by Mayastor.

Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.volumeSnapshots.enabled -}}
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down Expand Up @@ -145,3 +146,4 @@ status:
plural: ""
conditions: []
storedVersions: []
{{- end -}}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.volumeSnapshots.enabled -}}
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down Expand Up @@ -483,3 +484,4 @@ status:
plural: ""
conditions: []
storedVersions: []
{{- end -}}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.volumeSnapshots.enabled -}}
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down Expand Up @@ -385,3 +386,4 @@ status:
plural: ""
conditions: []
storedVersions: []
{{- end -}}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.jaeger.enabled -}}
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down Expand Up @@ -42,3 +43,4 @@ spec:
storage: true
subresources:
status: {}
{{- end -}}
6 changes: 6 additions & 0 deletions chart/charts/crds/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
jaeger:
# -- Install Jaeger CRDs
enabled: true
# -- Install Volume Snapshots CRD
volumeSnapshots:
enabled: true
7 changes: 7 additions & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
crds:
# -- Install CRDs
enabled: true
jaeger:
# -- Install Jaeger CRDs
enabled: false

image:
# -- Image registry to pull our product images
registry: docker.io
Expand Down
Loading