Skip to content
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
2 changes: 2 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ jobs:
run: make build-multifile-installer
- name: Generate operator helm charts
run: make build-helm-installer
- name: Generate operator helm document
run: make generate-helm-docs
- name: Check for uncommitted changes
run: make check-all-committed
- name: Show the uncommitted "git diff"
Expand Down
25 changes: 25 additions & 0 deletions .helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Patterns to ignore when building Helm packages.
# Operating system files
.DS_Store

# Version control directories
.git/
.gitignore
.bzr/
.hg/
.hgignore
.svn/

# Backup and temporary files
*.swp
*.tmp
*.bak
*.orig
*~

# IDE and editor-related files
.idea/
.vscode/

# Helm chart artifacts
dist/chart/*.tgz
17 changes: 16 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ mod.check:#check go module dependencies
@echo 'running "go mod verify"'
@go mod verify
@echo 'checking for modified files.'
# fail in case there are uncommitted changes
# fail in case there are uncommitted changes
@ git diff --quiet || (echo "files were modified: " ; git status --porcelain ; false)

.PHONY: test
Expand Down Expand Up @@ -220,6 +220,14 @@ build-csi-rbac:
$(KUSTOMIZE) build build > deploy/multifile/csi-rbac.yaml
rm -rf build

##@ Docs
.PHONY: generate-helm-docs
generate-helm-docs: helm-docs
$(HELM_DOCS) -c deploy/charts/ceph-csi-operator \
-t docs/helm-charts/operator-chart.gotmpl.md \
-t docs/helm-charts/_templates.gotmpl \
-o ../../../docs/helm-charts/operator-chart.md

##@ Deployment

ifndef ignore-not-found
Expand Down Expand Up @@ -260,13 +268,20 @@ CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen-$(CONTROLLER_TOOLS_VERSION)
ENVTEST ?= $(LOCALBIN)/setup-envtest-$(ENVTEST_VERSION)
GOLANGCI_LINT = $(LOCALBIN)/golangci-lint-$(GOLANGCI_LINT_VERSION)
HELMIFY ?= $(LOCALBIN)/helmify-$(HELMIFY_VERSION)
HELM_DOCS ?= $(LOCALBIN)/helm-docs-$(HELM_DOCS_VERSION)

## Tool Versions
KUSTOMIZE_VERSION ?= v5.3.0
CONTROLLER_TOOLS_VERSION ?= v0.14.0
ENVTEST_VERSION ?= release-0.17
GOLANGCI_LINT_VERSION ?= v1.63.4
HELMIFY_VERSION ?= v0.4.18
HELM_DOCS_VERSION ?= v1.14.2

.PHONY: helm-docs
helm-docs: $(HELM_DOCS) ## Download helm-docs locally if necessary.
$(HELM_DOCS): $(LOCALBIN)
$(call go-install-tool,$(HELM_DOCS),github.com/norwoodj/helm-docs/cmd/helm-docs,$(HELM_DOCS_VERSION))

.PHONY: helmify
helmify: $(HELMIFY) ## Download helmify locally if necessary.
Expand Down
14 changes: 14 additions & 0 deletions docs/helm-charts/_templates.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{ define "chart.valuesTable" -}}
| Parameter | Description | Default |
|-----------|-------------|---------|
{{- range .Values }}
| `{{ .Key }}` | {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} |
{{- end }}
{{- end -}}

{{ define "generatedDocsWarning" -}}
<!---
Document is generated by `make generate-helm-docs`. DO NOT EDIT.
Edit the corresponding *.gotmpl.md file instead
-->
{{- end -}}
72 changes: 72 additions & 0 deletions docs/helm-charts/operator-chart.gotmpl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
title: Ceph-CSI Operator Helm Chart
---
{{ template "generatedDocsWarning" . }}

Installs [ceph-csi-operator](https://github.com/ceph/ceph-csi-operator) to automates the deployment, configuration, and management of [ceph-csi](https://github.com/ceph/ceph-csi) drivers using new Kubernetes APIs defined as a set of Custom Resource Definitions (CRDs).

## Introduction

This chart bootstraps a [ceph-csi-operator](https://github.com/ceph/ceph-csi-operator) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.

## Prerequisites

* Kubernetes 1.32+
* Helm 3.x

See the [Helm support matrix](https://helm.sh/docs/topics/version_skew/) for more details.

## Installing

The Ceph-CSI Operator helm chart will install the basic components necessary to install [ceph-csi](https://github.com/ceph/ceph-csi) on Kubernetes cluster.

1. Install the Helm chart

The `helm install` command deploys ceph-csi-operator on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.

ceph-csi-operator currently publishes builds of the ceph-csi operator to tagged versions.

### **Released version**


```console
helm repo add ceph-csi-operator https://ceph.github.io/ceph-csi-operator-charts
helm install --create-namespace --namespace ceph-csi-operator-system ceph-csi-operator/operator -f values.yaml
```

For example settings, see the next section or [values.yaml](https://github.com/ceph/ceph-csi-operator/tree/main/deploy/charts/ceph-csi-operator/values.yaml)

## Configuration

The following table lists the configurable parameters of the ceph-csi-operator chart and their default values.

{{ template "chart.valuesTable" . }}

### **Development Build**

To deploy from a local build from your development environment:

1. Build the cephcsi-operator container image: `make docker-build`
1. Copy the image to your K8s cluster, such as with the `docker save` then the `docker load` commands
1. Install the helm chart:

```console
cd deploy/charts/ceph-csi-operator
helm install --create-namespace --namespace ceph-csi-operator-system ceph-csi-operator .
```

## Uninstalling the Chart

To see the currently installed Rook chart:

```console
helm ls --namespace ceph-csi-operator-system
```

To uninstall/delete the `ceph-csi-operator` deployment:

```console
helm delete --namespace ceph-csi-operator-system ceph-csi-operator
```

The command removes all the Kubernetes components associated with the chart and deletes the release.
97 changes: 97 additions & 0 deletions docs/helm-charts/operator-chart.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
---
title: Ceph-CSI Operator Helm Chart
---
<!---
Document is generated by `make generate-helm-docs`. DO NOT EDIT.
Edit the corresponding *.gotmpl.md file instead
-->

Installs [ceph-csi-operator](https://github.com/ceph/ceph-csi-operator) to automates the deployment, configuration, and management of [ceph-csi](https://github.com/ceph/ceph-csi) drivers using new Kubernetes APIs defined as a set of Custom Resource Definitions (CRDs).

## Introduction

This chart bootstraps a [ceph-csi-operator](https://github.com/ceph/ceph-csi-operator) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.

## Prerequisites

* Kubernetes 1.32+
* Helm 3.x

See the [Helm support matrix](https://helm.sh/docs/topics/version_skew/) for more details.

## Installing

The Ceph-CSI Operator helm chart will install the basic components necessary to install [ceph-csi](https://github.com/ceph/ceph-csi) on Kubernetes cluster.

1. Install the Helm chart

The `helm install` command deploys ceph-csi-operator on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.

ceph-csi-operator currently publishes builds of the ceph-csi operator to tagged versions.

### **Released version**

```console
helm repo add ceph-csi-operator https://ceph.github.io/ceph-csi-operator-charts
helm install --create-namespace --namespace ceph-csi-operator-system ceph-csi-operator/operator -f values.yaml
```

For example settings, see the next section or [values.yaml](https://github.com/ceph/ceph-csi-operator/tree/main/deploy/charts/ceph-csi-operator/values.yaml)

## Configuration

The following table lists the configurable parameters of the ceph-csi-operator chart and their default values.

| Parameter | Description | Default |
|-----------|-------------|---------|
| `cephfsCtrlpluginSa.serviceAccount.annotations` | | `{}` |
| `cephfsNodepluginSa.serviceAccount.annotations` | | `{}` |
| `controllerManager.manager.args[0]` | | `"--leader-elect"` |
| `controllerManager.manager.containerSecurityContext.allowPrivilegeEscalation` | | `false` |
| `controllerManager.manager.containerSecurityContext.capabilities.drop[0]` | | `"ALL"` |
| `controllerManager.manager.containerSecurityContext.readOnlyRootFilesystem` | | `true` |
| `controllerManager.manager.env.csiServiceAccountPrefix` | | `"ceph-csi-operator-"` |
| `controllerManager.manager.env.watchNamespace` | | `""` |
| `controllerManager.manager.image.repository` | | `"quay.io/cephcsi/ceph-csi-operator"` |
| `controllerManager.manager.image.tag` | | `"latest"` |
| `controllerManager.manager.resources.limits.cpu` | | `"500m"` |
| `controllerManager.manager.resources.limits.memory` | | `"128Mi"` |
| `controllerManager.manager.resources.requests.cpu` | | `"10m"` |
| `controllerManager.manager.resources.requests.memory` | | `"64Mi"` |
| `controllerManager.podSecurityContext.runAsNonRoot` | | `true` |
| `controllerManager.replicas` | | `1` |
| `controllerManager.serviceAccount.annotations` | | `{}` |
| `kubernetesClusterDomain` | | `"cluster.local"` |
| `nfsCtrlpluginSa.serviceAccount.annotations` | | `{}` |
| `nfsNodepluginSa.serviceAccount.annotations` | | `{}` |
| `rbdCtrlpluginSa.serviceAccount.annotations` | | `{}` |
| `rbdNodepluginSa.serviceAccount.annotations` | | `{}` |

### **Development Build**

To deploy from a local build from your development environment:

1. Build the cephcsi-operator container image: `make docker-build`
1. Copy the image to your K8s cluster, such as with the `docker save` then the `docker load` commands
1. Install the helm chart:

```console
cd deploy/charts/ceph-csi-operator
helm install --create-namespace --namespace ceph-csi-operator-system ceph-csi-operator .
```

## Uninstalling the Chart

To see the currently installed Rook chart:

```console
helm ls --namespace ceph-csi-operator-system
```

To uninstall/delete the `ceph-csi-operator` deployment:

```console
helm delete --namespace ceph-csi-operator-system ceph-csi-operator
```

The command removes all the Kubernetes components associated with the chart and deletes the release.
Loading