Skip to content

Commit

Permalink
Fix: volumemounts (#7)
Browse files Browse the repository at this point in the history
* fix: mount volume created by pvc template

* fix: chart directory in scripts

* bump: keeper-sts chart version

* docs: run make docs
  • Loading branch information
zumic96 authored Dec 2, 2024
1 parent 8f62e63 commit d49ebe7
Show file tree
Hide file tree
Showing 9 changed files with 188 additions and 18 deletions.
49 changes: 45 additions & 4 deletions charts/clickhouse-eks/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,53 @@


# clickhouse-eks

![Version: 0.1.3](https://img.shields.io/badge/Version-0.1.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square)
![Version: 0.1.6](https://img.shields.io/badge/Version-0.1.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square)

A Helm chart for ClickHouse running on AWS EKS across AZs using a nodeSelector to pin resources to run on specific VMs types

## Installing the Chart

```sh
# add the kubernetes-blueprints-for-clickhouse chart repository
helm repo add kubernetes-blueprints-for-clickhouse https://altinity.github.io/kubernetes-blueprints-for-clickhouse

# use this command to install clickhouse-eks chart (it will also create a `clickhouse` namespace)
helm install ch kubernetes-blueprints-for-clickhouse/clickhouse-eks --namespace clickhouse --create-namespace
```

> Use `-f` flag to override default values: `helm install -f newvalues.yaml`
## Upgrading the Chart
```sh
# get latest repository versions
helm repo update

# upgrade to a newer version using the release name (`ch`)
helm upgrade ch kubernetes-blueprints-for-clickhouse/clickhouse-eks --namespace clickhouse
```

## Uninstalling the Chart

```sh
# uninstall using the release name (`ch`)
helm uninstall ch --namespace clickhouse
```

> This command removes all the Kubernetes components associated with the chart and deletes the release.
## Connecting to your ClickHouse Cluster

```sh
# list your pods
kubectl get pods --namespace clickhouse

# pick any of your available pods and connect through the clickhouse-client
kubectl exec -it chi-eks-dev-0-0-0 --namespace clickhouse -- clickhouse-client
```

> Use `kubectl port forward` to access your ClickHouse cluster from outside: `kubectl port-forward service clickhouse-eks 9000:9000 & clickhouse-client`
## Values

| Key | Type | Default | Description |
Expand All @@ -20,6 +64,3 @@ A Helm chart for ClickHouse running on AWS EKS across AZs using a nodeSelector t
| clickhouse.storage_class_name | string | `"gp2"` | Storage class for ClickHouse data |
| clickhouse.user | string | `"default"` | ClickHouse user name |
| clickhouse.zones | list | `["us-east-1a","us-east-1a","us-east-1c"]` | AWS availability zones for creating replicas |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
2 changes: 1 addition & 1 deletion charts/clickhouse-keeper-sts/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: clickhouse-keeper-sts
description: A ClickHouse Keeper chart for Kubernetes
type: application
version: 0.1.4
version: 0.1.5
appVersion: "24.3.6.48"
50 changes: 46 additions & 4 deletions charts/clickhouse-keeper-sts/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,53 @@


# clickhouse-keeper-sts

![Version: 0.1.3](https://img.shields.io/badge/Version-0.1.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 24.3.6.48](https://img.shields.io/badge/AppVersion-24.3.6.48-informational?style=flat-square)
![Version: 0.1.5](https://img.shields.io/badge/Version-0.1.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 24.3.6.48](https://img.shields.io/badge/AppVersion-24.3.6.48-informational?style=flat-square)

A ClickHouse Keeper chart for Kubernetes

## Installing the Chart

```sh
# add the kubernetes-blueprints-for-clickhouse chart repository
helm repo add kubernetes-blueprints-for-clickhouse https://altinity.github.io/kubernetes-blueprints-for-clickhouse

# use this command to install clickhouse-keeper-sts chart (it will also create a `clickhouse` namespace)
helm install ch kubernetes-blueprints-for-clickhouse/clickhouse-keeper-sts --namespace clickhouse --create-namespace
```

> Use `-f` flag to override default values: `helm install -f newvalues.yaml`
## Upgrading the Chart
```sh
# get latest repository versions
helm repo update

# upgrade to a newer version using the release name (`ch`)
helm upgrade ch kubernetes-blueprints-for-clickhouse/clickhouse-keeper-sts --namespace clickhouse
```

## Uninstalling the Chart

```sh
# uninstall using the release name (`ch`)
helm uninstall ch --namespace clickhouse
```

> This command removes all the Kubernetes components associated with the chart and deletes the release.
## Connecting to your ClickHouse Cluster

```sh
# list your pods
kubectl get pods --namespace clickhouse

# pick any of your available pods and connect through the clickhouse-client
kubectl exec -it chi-eks-dev-0-0-0 --namespace clickhouse -- clickhouse-client
```

> Use `kubectl port forward` to access your ClickHouse cluster from outside: `kubectl port-forward service clickhouse-eks 9000:9000 & clickhouse-client`
## Values

| Key | Type | Default | Description |
Expand Down Expand Up @@ -36,6 +80,7 @@ A ClickHouse Keeper chart for Kubernetes
| persistence.storageClass | string | `""` | |
| podAnnotations | object | `{}` | |
| podLabels | object | `{}` | |
| podSecurityContext.fsGroup | int | `101` | |
| podSecurityContext.runAsGroup | int | `101` | |
| podSecurityContext.runAsUser | int | `101` | |
| replicaCount | int | `1` | |
Expand All @@ -46,6 +91,3 @@ A ClickHouse Keeper chart for Kubernetes
| tolerations | list | `[]` | |
| volumeMounts | list | `[]` | |
| volumes | list | `[]` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
4 changes: 4 additions & 0 deletions charts/clickhouse-keeper-sts/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ spec:
volumeMounts:
- name: clickhouse-keeper-settings
mountPath: /etc/clickhouse-keeper/
{{- if .Values.persistence.enabled }}
- name: {{ printf "%s-data" (include "clickhouse-keeper.fullname" .) }}
mountPath: /var/lib/clickhouse-keeper
{{- end }}
{{- with .Values.volumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
Expand Down
1 change: 1 addition & 0 deletions charts/clickhouse-keeper-sts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ podLabels: {}
podSecurityContext:
runAsUser: 101
runAsGroup: 101
fsGroup: 101

securityContext: {}

Expand Down
49 changes: 45 additions & 4 deletions charts/clickhouse/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@


# clickhouse

![Version: 0.1.3](https://img.shields.io/badge/Version-0.1.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 23.8.8.21](https://img.shields.io/badge/AppVersion-23.8.8.21-informational?style=flat-square)
![Version: 0.1.5](https://img.shields.io/badge/Version-0.1.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 23.8.8.21](https://img.shields.io/badge/AppVersion-23.8.8.21-informational?style=flat-square)

A Helm chart for creating a ClickHouse Cluster with the Altinity Operator for ClickHouse

Expand All @@ -11,6 +13,48 @@ A Helm chart for creating a ClickHouse Cluster with the Altinity Operator for Cl
| https://docs.altinity.com/clickhouse-operator | operator(altinity-clickhouse-operator) | 0.23.6 |
| https://helm.altinity.com | keeper(clickhouse-keeper-sts) | 0.1.3 |

## Installing the Chart

```sh
# add the kubernetes-blueprints-for-clickhouse chart repository
helm repo add kubernetes-blueprints-for-clickhouse https://altinity.github.io/kubernetes-blueprints-for-clickhouse

# use this command to install clickhouse chart (it will also create a `clickhouse` namespace)
helm install ch kubernetes-blueprints-for-clickhouse/clickhouse --namespace clickhouse --create-namespace
```

> Use `-f` flag to override default values: `helm install -f newvalues.yaml`
## Upgrading the Chart
```sh
# get latest repository versions
helm repo update

# upgrade to a newer version using the release name (`ch`)
helm upgrade ch kubernetes-blueprints-for-clickhouse/clickhouse --namespace clickhouse
```

## Uninstalling the Chart

```sh
# uninstall using the release name (`ch`)
helm uninstall ch --namespace clickhouse
```

> This command removes all the Kubernetes components associated with the chart and deletes the release.
## Connecting to your ClickHouse Cluster

```sh
# list your pods
kubectl get pods --namespace clickhouse

# pick any of your available pods and connect through the clickhouse-client
kubectl exec -it chi-eks-dev-0-0-0 --namespace clickhouse -- clickhouse-client
```

> Use `kubectl port forward` to access your ClickHouse cluster from outside: `kubectl port-forward service clickhouse-eks 9000:9000 & clickhouse-client`
## Values

| Key | Type | Default | Description |
Expand Down Expand Up @@ -40,6 +84,3 @@ A Helm chart for creating a ClickHouse Cluster with the Altinity Operator for Cl
| keeper.enabled | bool | `false` | Whether to enable Keeper. Required for replicated tables. |
| keeper.replicaCount | int | `3` | Number of keeper replicas. Must be an odd number. !! DO NOT CHANGE AFTER INITIAL DEPLOYMENT |
| operator.enabled | bool | `true` | Whether to enabled the Altinity Operator for ClickHouse. Disable if you already have the Operator installed cluster-wide. |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
47 changes: 44 additions & 3 deletions charts/keeper-sts/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,53 @@


# keeper-sts

![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square)

A Helm chart for setting up ClickHouse Keeper using StatefulSet

## Installing the Chart

```sh
# add the kubernetes-blueprints-for-clickhouse chart repository
helm repo add kubernetes-blueprints-for-clickhouse https://altinity.github.io/kubernetes-blueprints-for-clickhouse

# use this command to install keeper-sts chart (it will also create a `clickhouse` namespace)
helm install ch kubernetes-blueprints-for-clickhouse/keeper-sts --namespace clickhouse --create-namespace
```

> Use `-f` flag to override default values: `helm install -f newvalues.yaml`
## Upgrading the Chart
```sh
# get latest repository versions
helm repo update

# upgrade to a newer version using the release name (`ch`)
helm upgrade ch kubernetes-blueprints-for-clickhouse/keeper-sts --namespace clickhouse
```

## Uninstalling the Chart

```sh
# uninstall using the release name (`ch`)
helm uninstall ch --namespace clickhouse
```

> This command removes all the Kubernetes components associated with the chart and deletes the release.
## Connecting to your ClickHouse Cluster

```sh
# list your pods
kubectl get pods --namespace clickhouse

# pick any of your available pods and connect through the clickhouse-client
kubectl exec -it chi-eks-dev-0-0-0 --namespace clickhouse -- clickhouse-client
```

> Use `kubectl port forward` to access your ClickHouse cluster from outside: `kubectl port-forward service clickhouse-eks 9000:9000 & clickhouse-client`
## Values

| Key | Type | Default | Description |
Expand All @@ -15,6 +59,3 @@ A Helm chart for setting up ClickHouse Keeper using StatefulSet
| keeper.replicas | int | `1` | Number of ClickHouse Keeper replicas |
| keeper.storage | string | `"25Gi"` | Storage disk size for ClickHouse Keeper |
| keeper.tcp_port | int | `2181` | ClickHouse Keeper TCP port |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
2 changes: 1 addition & 1 deletion scripts/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -euo pipefail

GIT_REPO_ROOT=$(git rev-parse --show-toplevel)
CHARTS_DIRECTORY="${GIT_REPO_ROOT}/helm"
CHARTS_DIRECTORY="${GIT_REPO_ROOT}/charts"

FAILED=()

Expand Down
2 changes: 1 addition & 1 deletion scripts/validate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -euo pipefail

GIT_REPO_ROOT=$(git rev-parse --show-toplevel)
CHARTS_DIRECTORY="${GIT_REPO_ROOT}/helm"
CHARTS_DIRECTORY="${GIT_REPO_ROOT}/charts"

FAILED=()

Expand Down

0 comments on commit d49ebe7

Please sign in to comment.