mirror of
https://github.com/bitnami/charts.git
synced 2026-03-27 15:27:10 +08:00
[bitnami/clickhouse] feat: 🎉 Add chart (#12623)
* [bitnami/clickhouse] feat: 🎉 Add chart Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com> * [bitnami/clickhouse] feat: ✨ Add extra overrides Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com> * [bitnami/clickhouse] fix: 🐛 Incorrect reference to metrics Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com> * [bitnami/clickhouse] test: ✅ Update GOSS reference Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com> * [bitnami/clickhouse] test: ✅ Update GOSS permission test Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com> * [bitnami/clickhouse] fix: 🐛 Do not create extra-configmap unless necessary Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com> * [bitnami/clickhouse] feat: ✨ Add log level Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com> * [bitnami/clickhouse] fix: ✏️ Undo kafka values change Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com> * [bitnami/clickhouse] test: ✅ Adapt to testing best practices Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com> * [bitnami/clickhouse] test: ✅ Update run parameters Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com> * [bitnami/clickhouse] test: ✅ Add runtime parameters to vib-publish and randomize goss database inputs Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com> * [bitnami/clickhouse] test: ✅ Fix incorrect testing tcp port Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com> * [bitnami/clickhouse] test: ✅ Fix incorrect GOSS parameter --username Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com> * [bitnami/clickhouse] test: ✅ Fix incorrect runtime_parameters Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com> * [bitnami/clickhouse] test: ✅ Fix table name Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com> * [bitnami/clickhouse] docs: 📝 Fix README Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com> * Update README.md with readme-generator-for-helm Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com> * [bitnami/clickhouse] test: ✅ Change runtime_parameters Co-authored-by: Jose Antonio Carmona <jcarmona@vmware.com> Signed-off-by: Javier J. Salmerón-García <jsalmeron@vmware.com> * [bitnami/clickhouse] test: ✅ Change host in GOSS tests Co-authored-by: Jose Antonio Carmona <jcarmona@vmware.com> Signed-off-by: Javier J. Salmerón-García <jsalmeron@vmware.com> * [bitnami/clickhouse] test: ✅ Update runtime parameters Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com> * [bitnami/clickhouse] test: ✅ Add missing GOSS value Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com> * [bitnami/clickhouse] chore: 🔧 Add to CD Pipeline Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com> * [bitnami/clickhouse] fix: 🐛 Use proper dependency helper for zk service Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com> Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com> Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com> Signed-off-by: Javier J. Salmerón-García <jsalmeron@vmware.com> Co-authored-by: Bitnami Containers <bitnami-bot@vmware.com> Co-authored-by: Jose Antonio Carmona <jcarmona@vmware.com>
This commit is contained in:
committed by
GitHub
parent
8d6acd04eb
commit
c6bf0b9adb
21
bitnami/clickhouse/.helmignore
Normal file
21
bitnami/clickhouse/.helmignore
Normal file
@@ -0,0 +1,21 @@
|
||||
# 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
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
9
bitnami/clickhouse/Chart.lock
Normal file
9
bitnami/clickhouse/Chart.lock
Normal file
@@ -0,0 +1,9 @@
|
||||
dependencies:
|
||||
- name: zookeeper
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 10.2.1
|
||||
- name: common
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 1.17.1
|
||||
digest: sha256:d479e1101414ee3e721a91eff09e923b7f301690226026fdabda3ecfa41796a6
|
||||
generated: "2022-09-20T10:27:14.334929+02:00"
|
||||
28
bitnami/clickhouse/Chart.yaml
Normal file
28
bitnami/clickhouse/Chart.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
annotations:
|
||||
category: Database
|
||||
apiVersion: v2
|
||||
appVersion: 22.8.5
|
||||
dependencies:
|
||||
- condition: zookeeper.enabled
|
||||
name: zookeeper
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 10.x.x
|
||||
- name: common
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
tags:
|
||||
- bitnami-common
|
||||
version: 1.x.x
|
||||
description: ClickHouse is an open-source column-oriented OLAP database management system. Use it to boost your database performance while providing linear scalability and hardware efficiency.
|
||||
home: https://clickhouse.com/
|
||||
icon: https://bitnami.com/assets/stacks/clickhouse/img/clickhouse-stack-220x234.png
|
||||
keywords:
|
||||
- database
|
||||
- sharding
|
||||
maintainers:
|
||||
- name: Bitnami
|
||||
url: https://github.com/bitnami/charts
|
||||
name: clickhouse
|
||||
sources:
|
||||
- https://github.com/bitnami/containers/tree/main/bitnami/clickhouse
|
||||
- https://github.com/ClickHouse/ClickHouse
|
||||
version: 0.1.0
|
||||
471
bitnami/clickhouse/README.md
Normal file
471
bitnami/clickhouse/README.md
Normal file
@@ -0,0 +1,471 @@
|
||||
# ClickHouse packaged by Bitnami
|
||||
|
||||
ClickHouse is an open-source column-oriented OLAP database management system. Use it to boost your database performance while providing linear scalability and hardware efficiency.
|
||||
|
||||
## TL;DR
|
||||
|
||||
```console
|
||||
$ helm repo add bitnami https://charts.bitnami.com/bitnami
|
||||
$ helm install my-release bitnami/clickhouse
|
||||
```
|
||||
|
||||
## Introduction
|
||||
|
||||
Bitnami charts for Helm are carefully engineered, actively maintained and are the quickest and easiest way to deploy containers on a Kubernetes cluster that are ready to handle production workloads.
|
||||
|
||||
This chart bootstraps a [ClickHouse](https://github.com/clickhouse/clickhouse) Deployment in a [Kubernetes](https://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
|
||||
|
||||
Bitnami charts can be used with [Kubeapps](https://kubeapps.com/) for deployment and management of Helm Charts in clusters.
|
||||
|
||||
[Learn more about the default configuration of the chart](https://docs.bitnami.com/kubernetes/infrastructure/clickhouse/get-started/).
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Kubernetes 1.19+
|
||||
- Helm 3.2.0+
|
||||
- PV provisioner support in the underlying infrastructure
|
||||
- ReadWriteMany volumes for deployment scaling
|
||||
|
||||
## Installing the Chart
|
||||
|
||||
To install the chart with the release name `my-release`:
|
||||
|
||||
```console
|
||||
helm install my-release bitnami/clickhouse
|
||||
```
|
||||
|
||||
The command deploys ClickHouse on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation.
|
||||
|
||||
> **Tip**: List all releases using `helm list`
|
||||
|
||||
## Uninstalling the Chart
|
||||
|
||||
To uninstall/delete the `my-release` deployment:
|
||||
|
||||
```console
|
||||
helm delete my-release
|
||||
```
|
||||
|
||||
The command removes all the Kubernetes components associated with the chart and deletes the release.
|
||||
|
||||
## Parameters
|
||||
|
||||
### Global parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| ------------------------- | ----------------------------------------------- | ----- |
|
||||
| `global.imageRegistry` | Global Docker image registry | `""` |
|
||||
| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` |
|
||||
| `global.storageClass` | Global StorageClass for Persistent Volume(s) | `""` |
|
||||
|
||||
|
||||
### Common parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| ------------------------ | --------------------------------------------------------------------------------------- | --------------- |
|
||||
| `kubeVersion` | Override Kubernetes version | `""` |
|
||||
| `nameOverride` | String to partially override common.names.name | `""` |
|
||||
| `fullnameOverride` | String to fully override common.names.fullname | `""` |
|
||||
| `namespaceOverride` | String to fully override common.names.namespace | `""` |
|
||||
| `commonLabels` | Labels to add to all deployed objects | `{}` |
|
||||
| `commonAnnotations` | Annotations to add to all deployed objects | `{}` |
|
||||
| `clusterDomain` | Kubernetes cluster domain name | `cluster.local` |
|
||||
| `extraDeploy` | Array of extra objects to deploy with the release | `[]` |
|
||||
| `diagnosticMode.enabled` | Enable diagnostic mode (all probes will be disabled and the command will be overridden) | `false` |
|
||||
| `diagnosticMode.command` | Command to override all containers in the deployment | `["sleep"]` |
|
||||
| `diagnosticMode.args` | Args to override all containers in the deployment | `["infinity"]` |
|
||||
|
||||
|
||||
### ClickHouse Parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | --------------------- |
|
||||
| `image.registry` | ClickHouse image registry | `docker.io` |
|
||||
| `image.repository` | ClickHouse image repository | `bitnami/clickhouse` |
|
||||
| `image.tag` | ClickHouse image tag (immutable tags are recommended) | `22.8.5-debian-11-r3` |
|
||||
| `image.pullPolicy` | ClickHouse image pull policy | `IfNotPresent` |
|
||||
| `image.pullSecrets` | ClickHouse image pull secrets | `[]` |
|
||||
| `image.debug` | Enable ClickHouse image debug mode | `false` |
|
||||
| `shards` | Number of ClickHouse shards to deploy | `2` |
|
||||
| `replicaCount` | Number of ClickHouse replicas per shard to deploy | `2` |
|
||||
| `containerPorts.http` | ClickHouse HTTP container port | `8123` |
|
||||
| `containerPorts.tcp` | ClickHouse TCP container port | `9000` |
|
||||
| `containerPorts.tcpSecure` | ClickHouse TCP container port | `9440` |
|
||||
| `containerPorts.mysql` | ClickHouse MySQL container port | `9004` |
|
||||
| `containerPorts.postgresql` | ClickHouse PostgreSQL container port | `9005` |
|
||||
| `containerPorts.interserver` | ClickHouse Interserver container port | `9009` |
|
||||
| `containerPorts.metrics` | ClickHouse metrics container port | `8001` |
|
||||
| `livenessProbe.enabled` | Enable livenessProbe on ClickHouse containers | `true` |
|
||||
| `livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `10` |
|
||||
| `livenessProbe.periodSeconds` | Period seconds for livenessProbe | `10` |
|
||||
| `livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `1` |
|
||||
| `livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `3` |
|
||||
| `livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` |
|
||||
| `readinessProbe.enabled` | Enable readinessProbe on ClickHouse containers | `true` |
|
||||
| `readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `10` |
|
||||
| `readinessProbe.periodSeconds` | Period seconds for readinessProbe | `10` |
|
||||
| `readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `1` |
|
||||
| `readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `3` |
|
||||
| `readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` |
|
||||
| `startupProbe.enabled` | Enable startupProbe on ClickHouse containers | `false` |
|
||||
| `startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `10` |
|
||||
| `startupProbe.periodSeconds` | Period seconds for startupProbe | `10` |
|
||||
| `startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `1` |
|
||||
| `startupProbe.failureThreshold` | Failure threshold for startupProbe | `3` |
|
||||
| `startupProbe.successThreshold` | Success threshold for startupProbe | `1` |
|
||||
| `customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` |
|
||||
| `customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` |
|
||||
| `customStartupProbe` | Custom startupProbe that overrides the default one | `{}` |
|
||||
| `resources.limits` | The resources limits for the ClickHouse containers | `{}` |
|
||||
| `resources.requests` | The requested resources for the ClickHouse containers | `{}` |
|
||||
| `podSecurityContext.enabled` | Enabled ClickHouse pods' Security Context | `true` |
|
||||
| `podSecurityContext.fsGroup` | Set ClickHouse pod's Security Context fsGroup | `1001` |
|
||||
| `podSecurityContext.seccompProfile.type` | Set ClickHouse container's Security Context seccomp profile | `RuntimeDefault` |
|
||||
| `containerSecurityContext.enabled` | Enabled ClickHouse containers' Security Context | `true` |
|
||||
| `containerSecurityContext.runAsUser` | Set ClickHouse containers' Security Context runAsUser | `1001` |
|
||||
| `containerSecurityContext.runAsNonRoot` | Set ClickHouse containers' Security Context runAsNonRoot | `true` |
|
||||
| `containerSecurityContext.allowPrivilegeEscalation` | Set ClickHouse container's privilege escalation | `false` |
|
||||
| `containerSecurityContext.capabilities.drop` | Set ClickHouse container's Security Context runAsNonRoot | `["ALL"]` |
|
||||
| `auth.username` | ClickHouse Admin username | `default` |
|
||||
| `auth.password` | ClickHouse Admin password | `""` |
|
||||
| `auth.existingSecret` | Name of a secret containing the Admin password | `""` |
|
||||
| `auth.existingSecretKey` | Name of the key inside the existing secret | `""` |
|
||||
| `logLevel` | Logging level | `information` |
|
||||
| `defaultConfigurationOverrides` | Default configuration overrides (evaluated as a template) | `""` |
|
||||
| `existingOverridesConfigmap` | The name of an existing ConfigMap with your custom configuration for ClickHouse | `""` |
|
||||
| `extraOverrides` | Extra configuration overrides (evaluated as a template) apart from the default | `""` |
|
||||
| `extraOverridesConfigmap` | The name of an existing ConfigMap with extra configuration for ClickHouse | `""` |
|
||||
| `extraOverridesSecret` | The name of an existing ConfigMap with your custom configuration for ClickHouse | `""` |
|
||||
| `initdbScripts` | Dictionary of initdb scripts | `{}` |
|
||||
| `initdbScriptsSecret` | ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`) | `""` |
|
||||
| `startdbScripts` | Dictionary of startdb scripts | `{}` |
|
||||
| `startdbScriptsSecret` | ConfigMap with the startdb scripts (Note: Overrides `startdbScripts`) | `""` |
|
||||
| `command` | Override default container command (useful when using custom images) | `[]` |
|
||||
| `args` | Override default container args (useful when using custom images) | `[]` |
|
||||
| `hostAliases` | ClickHouse pods host aliases | `[]` |
|
||||
| `podLabels` | Extra labels for ClickHouse pods | `{}` |
|
||||
| `podAnnotations` | Annotations for ClickHouse pods | `{}` |
|
||||
| `podAffinityPreset` | Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
|
||||
| `podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `soft` |
|
||||
| `nodeAffinityPreset.type` | Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
|
||||
| `nodeAffinityPreset.key` | Node label key to match. Ignored if `affinity` is set | `""` |
|
||||
| `nodeAffinityPreset.values` | Node label values to match. Ignored if `affinity` is set | `[]` |
|
||||
| `affinity` | Affinity for ClickHouse pods assignment | `{}` |
|
||||
| `nodeSelector` | Node labels for ClickHouse pods assignment | `{}` |
|
||||
| `tolerations` | Tolerations for ClickHouse pods assignment | `[]` |
|
||||
| `updateStrategy.type` | ClickHouse statefulset strategy type | `RollingUpdate` |
|
||||
| `podManagementPolicy` | Statefulset Pod management policy, it needs to be Parallel to be able to complete the cluster join | `Parallel` |
|
||||
| `priorityClassName` | ClickHouse pods' priorityClassName | `""` |
|
||||
| `topologySpreadConstraints` | Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template | `[]` |
|
||||
| `schedulerName` | Name of the k8s scheduler (other than default) for ClickHouse pods | `""` |
|
||||
| `terminationGracePeriodSeconds` | Seconds Redmine pod needs to terminate gracefully | `""` |
|
||||
| `lifecycleHooks` | for the ClickHouse container(s) to automate configuration before or after startup | `{}` |
|
||||
| `extraEnvVars` | Array with extra environment variables to add to ClickHouse nodes | `[]` |
|
||||
| `extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars for ClickHouse nodes | `""` |
|
||||
| `extraEnvVarsSecret` | Name of existing Secret containing extra env vars for ClickHouse nodes | `""` |
|
||||
| `extraVolumes` | Optionally specify extra list of additional volumes for the ClickHouse pod(s) | `[]` |
|
||||
| `extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the ClickHouse container(s) | `[]` |
|
||||
| `sidecars` | Add additional sidecar containers to the ClickHouse pod(s) | `[]` |
|
||||
| `initContainers` | Add additional init containers to the ClickHouse pod(s) | `[]` |
|
||||
| `tls.enabled` | Enable TLS traffic support | `false` |
|
||||
| `tls.autoGenerated` | Generate automatically self-signed TLS certificates | `false` |
|
||||
| `tls.certificatesSecret` | Name of an existing secret that contains the certificates | `""` |
|
||||
| `tls.certFilename` | Certificate filename | `""` |
|
||||
| `tls.certKeyFilename` | Certificate key filename | `""` |
|
||||
| `tls.certCAFilename` | CA Certificate filename | `""` |
|
||||
|
||||
|
||||
### Traffic Exposure Parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| ------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ------------------------ |
|
||||
| `service.type` | ClickHouse service type | `ClusterIP` |
|
||||
| `service.ports.http` | ClickHouse service HTTP port | `8123` |
|
||||
| `service.ports.tcp` | ClickHouse service TCP port | `9000` |
|
||||
| `service.ports.tcpSecure` | ClickHouse service TCP (secure) port | `9440` |
|
||||
| `service.ports.mysql` | ClickHouse service MySQL port | `9004` |
|
||||
| `service.ports.postgresql` | ClickHouse service PostgreSQL port | `9005` |
|
||||
| `service.ports.interserver` | ClickHouse service Interserver port | `9009` |
|
||||
| `service.ports.metrics` | ClickHouse service metrics port | `8001` |
|
||||
| `service.nodePorts.http` | Node port for HTTP | `""` |
|
||||
| `service.nodePorts.tcp` | Node port for TCP | `""` |
|
||||
| `service.nodePorts.tcpSecure` | Node port for TCP (with TLS) | `""` |
|
||||
| `service.nodePorts.mysql` | Node port for MySQL | `""` |
|
||||
| `service.nodePorts.postgresql` | Node port for PostgreSQL | `""` |
|
||||
| `service.nodePorts.interserver` | Node port for Interserver | `""` |
|
||||
| `service.nodePorts.metrics` | Node port for metrics | `""` |
|
||||
| `service.clusterIP` | ClickHouse service Cluster IP | `""` |
|
||||
| `service.loadBalancerIP` | ClickHouse service Load Balancer IP | `""` |
|
||||
| `service.loadBalancerSourceRanges` | ClickHouse service Load Balancer sources | `[]` |
|
||||
| `service.externalTrafficPolicy` | ClickHouse service external traffic policy | `Cluster` |
|
||||
| `service.annotations` | Additional custom annotations for ClickHouse service | `{}` |
|
||||
| `service.extraPorts` | Extra ports to expose in ClickHouse service (normally used with the `sidecars` value) | `[]` |
|
||||
| `service.sessionAffinity` | Control where client requests go, to the same pod or round-robin | `None` |
|
||||
| `service.sessionAffinityConfig` | Additional settings for the sessionAffinity | `{}` |
|
||||
| `externalAccess.enabled` | Enable Kubernetes external cluster access to ClickHouse | `false` |
|
||||
| `externalAccess.service.type` | Kubernetes Service type for external access. It can be NodePort, LoadBalancer or ClusterIP | `LoadBalancer` |
|
||||
| `externalAccess.service.ports.http` | ClickHouse service HTTP port | `80` |
|
||||
| `externalAccess.service.ports.tcp` | ClickHouse service TCP port | `9000` |
|
||||
| `externalAccess.service.ports.tcpSecure` | ClickHouse service TCP (secure) port | `9440` |
|
||||
| `externalAccess.service.ports.mysql` | ClickHouse service MySQL port | `9004` |
|
||||
| `externalAccess.service.ports.postgresql` | ClickHouse service PostgreSQL port | `9005` |
|
||||
| `externalAccess.service.ports.interserver` | ClickHouse service Interserver port | `9009` |
|
||||
| `externalAccess.service.ports.metrics` | ClickHouse service metrics port | `8001` |
|
||||
| `externalAccess.service.loadBalancerIPs` | Array of load balancer IPs for each ClickHouse . Length must be the same as replicaCount | `[]` |
|
||||
| `externalAccess.service.loadBalancerAnnotations` | Array of load balancer annotations for each ClickHouse . Length must be the same as replicaCount | `[]` |
|
||||
| `externalAccess.service.loadBalancerSourceRanges` | Address(es) that are allowed when service is LoadBalancer | `[]` |
|
||||
| `externalAccess.service.nodePorts.http` | Node port for HTTP | `[]` |
|
||||
| `externalAccess.service.nodePorts.tcp` | Node port for TCP | `[]` |
|
||||
| `externalAccess.service.nodePorts.tcpSecure` | Node port for TCP (with TLS) | `[]` |
|
||||
| `externalAccess.service.nodePorts.mysql` | Node port for MySQL | `[]` |
|
||||
| `externalAccess.service.nodePorts.postgresql` | Node port for PostgreSQL | `[]` |
|
||||
| `externalAccess.service.nodePorts.interserver` | Node port for Interserver | `[]` |
|
||||
| `externalAccess.service.nodePorts.metrics` | Node port for metrics | `[]` |
|
||||
| `externalAccess.service.labels` | Service labels for external access | `{}` |
|
||||
| `externalAccess.service.annotations` | Service annotations for external access | `{}` |
|
||||
| `externalAccess.service.extraPorts` | Extra ports to expose in the ClickHouse external service | `[]` |
|
||||
| `ingress.enabled` | Enable ingress record generation for ClickHouse | `false` |
|
||||
| `ingress.pathType` | Ingress path type | `ImplementationSpecific` |
|
||||
| `ingress.apiVersion` | Force Ingress API version (automatically detected if not set) | `""` |
|
||||
| `ingress.hostname` | Default host for the ingress record | `clickhouse.local` |
|
||||
| `ingress.ingressClassName` | IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+) | `""` |
|
||||
| `ingress.path` | Default path for the ingress record | `/` |
|
||||
| `ingress.annotations` | Additional annotations for the Ingress resource. To enable certificate autogeneration, place here your cert-manager annotations. | `{}` |
|
||||
| `ingress.tls` | Enable TLS configuration for the host defined at `ingress.hostname` parameter | `false` |
|
||||
| `ingress.selfSigned` | Create a TLS secret for this ingress record using self-signed certificates generated by Helm | `false` |
|
||||
| `ingress.extraHosts` | An array with additional hostname(s) to be covered with the ingress record | `[]` |
|
||||
| `ingress.extraPaths` | An array with additional arbitrary paths that may need to be added to the ingress under the main host | `[]` |
|
||||
| `ingress.extraTls` | TLS configuration for additional hostname(s) to be covered with this ingress record | `[]` |
|
||||
| `ingress.secrets` | Custom TLS certificates as secrets | `[]` |
|
||||
| `ingress.extraRules` | Additional rules to be covered with this ingress record | `[]` |
|
||||
|
||||
|
||||
### Persistence Parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| -------------------------- | ---------------------------------------------------------------------- | ------------------- |
|
||||
| `persistence.enabled` | Enable persistence using Persistent Volume Claims | `true` |
|
||||
| `persistence.storageClass` | Storage class of backing PVC | `""` |
|
||||
| `persistence.annotations` | Persistent Volume Claim annotations | `{}` |
|
||||
| `persistence.accessModes` | Persistent Volume Access Modes | `["ReadWriteOnce"]` |
|
||||
| `persistence.size` | Size of data volume | `8Gi` |
|
||||
| `persistence.selector` | Selector to match an existing Persistent Volume for WordPress data PVC | `{}` |
|
||||
| `persistence.dataSource` | Custom PVC data source | `{}` |
|
||||
|
||||
|
||||
### Init Container Parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| ------------------------------------------------------ | ----------------------------------------------------------------------------------------------- | ----------------------- |
|
||||
| `volumePermissions.enabled` | Enable init container that changes the owner/group of the PV mount point to `runAsUser:fsGroup` | `false` |
|
||||
| `volumePermissions.image.registry` | Bitnami Shell image registry | `docker.io` |
|
||||
| `volumePermissions.image.repository` | Bitnami Shell image repository | `bitnami/bitnami-shell` |
|
||||
| `volumePermissions.image.tag` | Bitnami Shell image tag (immutable tags are recommended) | `11-debian-11-r36` |
|
||||
| `volumePermissions.image.pullPolicy` | Bitnami Shell image pull policy | `IfNotPresent` |
|
||||
| `volumePermissions.image.pullSecrets` | Bitnami Shell image pull secrets | `[]` |
|
||||
| `volumePermissions.resources.limits` | The resources limits for the init container | `{}` |
|
||||
| `volumePermissions.resources.requests` | The requested resources for the init container | `{}` |
|
||||
| `volumePermissions.containerSecurityContext.runAsUser` | Set init container's Security Context runAsUser | `0` |
|
||||
|
||||
|
||||
### Other Parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| --------------------------------------------- | ------------------------------------------------------------------------------------------------------ | ------- |
|
||||
| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `true` |
|
||||
| `serviceAccount.name` | The name of the ServiceAccount to use. | `""` |
|
||||
| `serviceAccount.annotations` | Additional Service Account annotations (evaluated as a template) | `{}` |
|
||||
| `serviceAccount.automountServiceAccountToken` | Automount service account token for the server service account | `true` |
|
||||
| `metrics.enabled` | Enable the export of Prometheus metrics | `false` |
|
||||
| `metrics.podAnnotations` | Annotations for metrics scraping | `{}` |
|
||||
| `metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` |
|
||||
| `metrics.serviceMonitor.namespace` | Namespace in which Prometheus is running | `""` |
|
||||
| `metrics.serviceMonitor.annotations` | Additional custom annotations for the ServiceMonitor | `{}` |
|
||||
| `metrics.serviceMonitor.labels` | Extra labels for the ServiceMonitor | `{}` |
|
||||
| `metrics.serviceMonitor.jobLabel` | The name of the label on the target service to use as the job name in Prometheus | `""` |
|
||||
| `metrics.serviceMonitor.honorLabels` | honorLabels chooses the metric's labels on collisions with target labels | `false` |
|
||||
| `metrics.serviceMonitor.interval` | Interval at which metrics should be scraped. | `""` |
|
||||
| `metrics.serviceMonitor.scrapeTimeout` | Timeout after which the scrape is ended | `""` |
|
||||
| `metrics.serviceMonitor.metricRelabelings` | Specify additional relabeling of metrics | `[]` |
|
||||
| `metrics.serviceMonitor.relabelings` | Specify general relabeling | `[]` |
|
||||
| `metrics.serviceMonitor.selector` | Prometheus instance selector labels | `{}` |
|
||||
|
||||
|
||||
### External Zookeeper paramaters
|
||||
|
||||
| Name | Description | Value |
|
||||
| --------------------------- | ----------------------------------------- | ------ |
|
||||
| `externalZookeeper.servers` | List of external zookeeper servers to use | `[]` |
|
||||
| `externalZookeeper.port` | Port of the Zookeeper servers | `2888` |
|
||||
|
||||
|
||||
### Zookeeper subchart parameters
|
||||
|
||||
| Name | Description | Value |
|
||||
| -------------------------------- | ----------------------------- | ------ |
|
||||
| `zookeeper.enabled` | Deploy Zookeeper subchart | `true` |
|
||||
| `zookeeper.replicaCount` | Number of Zookeeper instances | `2` |
|
||||
| `zookeeper.service.ports.client` | Zookeeper client port | `2181` |
|
||||
|
||||
|
||||
See https://github.com/bitnami-labs/readme-generator-for-helm to create the table
|
||||
|
||||
The above parameters map to the env variables defined in [bitnami/clickhouse](https://github.com/bitnami/containers/tree/main/bitnami/clickhouse). For more information please refer to the [bitnami/clickhouse](https://github.com/bitnami/containers/tree/main/bitnami/clickhouse) image documentation.
|
||||
|
||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
||||
|
||||
```console
|
||||
helm install my-release \
|
||||
--set auth.username=admin \
|
||||
--set auth.password=password \
|
||||
bitnami/clickhouse
|
||||
```
|
||||
|
||||
The above command sets the ClickHouse administrator account username and password to `admin` and `password` respectively.
|
||||
|
||||
> NOTE: Once this chart is deployed, it is not possible to change the application's access credentials, such as usernames or passwords, using Helm. To change these application credentials after deployment, delete any persistent volumes (PVs) used by the chart and re-deploy it, or use the application's built-in administrative tools if available.
|
||||
|
||||
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,
|
||||
|
||||
```console
|
||||
helm install my-release -f values.yaml bitnami/clickhouse
|
||||
```
|
||||
|
||||
> **Tip**: You can use the default [values.yaml](values.yaml)
|
||||
|
||||
## Configuration and installation details
|
||||
|
||||
### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/)
|
||||
|
||||
It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image.
|
||||
|
||||
Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist.
|
||||
|
||||
### External Zookeeper support
|
||||
|
||||
You may want to have ClickHouse connect to an external zookeeper rather than installing one inside your cluster. Typical reasons for this are to use a managed database service, or to share a common database server for all your applications. To achieve this, the chart allows you to specify credentials for an external database with the [`externalZookeeper` parameter](#parameters). You should also disable the Zookeeper installation with the `zookeeper.enabled` option. Here is an example:
|
||||
|
||||
```console
|
||||
zookeper.enabled=false
|
||||
externalZookeeper.host=myexternalhost
|
||||
externalZookeeper.user=myuser
|
||||
externalZookeeper.password=mypassword
|
||||
externalZookeeper.database=mydatabase
|
||||
externalZookeeper.port=3306
|
||||
```
|
||||
|
||||
### TLS secrets
|
||||
|
||||
The chart also facilitates the creation of TLS secrets for use with the Ingress controller, with different options for certificate management. [Learn more about TLS secrets](https://docs.bitnami.com/kubernetes/apps/clickhouse/administration/enable-tls/).
|
||||
|
||||
## Persistence
|
||||
|
||||
The [Bitnami ClickHouse](https://github.com/bitnami/containers/tree/main/bitnami/clickhouse) image stores the ClickHouse data and configurations at the `/bitnami` path of the container. Persistent Volume Claims are used to keep the data across deployments. [Learn more about persistence in the chart documentation](https://docs.bitnami.com/kubernetes/apps/clickhouse/configuration/chart-persistence/).
|
||||
|
||||
### Additional environment variables
|
||||
|
||||
In case you want to add extra environment variables (useful for advanced operations like custom init scripts), you can use the `extraEnvVars` property.
|
||||
|
||||
```yaml
|
||||
clickhouse:
|
||||
extraEnvVars:
|
||||
- name: LOG_LEVEL
|
||||
value: error
|
||||
```
|
||||
|
||||
Alternatively, you can use a ConfigMap or a Secret with the environment variables. To do so, use the `extraEnvVarsCM` or the `extraEnvVarsSecret` values.
|
||||
|
||||
### Sidecars
|
||||
|
||||
If additional containers are needed in the same pod as ClickHouse (such as additional metrics or logging exporters), they can be defined using the `sidecars` parameter. If these sidecars export extra ports, extra port definitions can be added using the `service.extraPorts` parameter. [Learn more about configuring and using sidecar containers](https://docs.bitnami.com/kubernetes/apps/clickhouse/administration/configure-use-sidecars/).
|
||||
|
||||
### Ingress without TLS
|
||||
|
||||
For using ingress (example without TLS):
|
||||
|
||||
```yaml
|
||||
ingress:
|
||||
## If true, ClickHouse server Ingress will be created
|
||||
##
|
||||
enabled: true
|
||||
|
||||
## ClickHouse server Ingress annotations
|
||||
##
|
||||
annotations: {}
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
# kubernetes.io/tls-acme: 'true'
|
||||
|
||||
## ClickHouse server Ingress hostnames
|
||||
## Must be provided if Ingress is enabled
|
||||
##
|
||||
hosts:
|
||||
- clickhouse.domain.com
|
||||
```
|
||||
|
||||
### Ingress TLS
|
||||
|
||||
If your cluster allows automatic creation/retrieval of TLS certificates (e.g. [kube-lego](https://github.com/jetstack/kube-lego)), please refer to the documentation for that mechanism.
|
||||
|
||||
To manually configure TLS, first create/retrieve a key & certificate pair for the address(es) you wish to protect. Then create a TLS secret (named `clickhouse-server-tls` in this example) in the namespace. Include the secret's name, along with the desired hostnames, in the Ingress TLS section of your custom `values.yaml` file:
|
||||
|
||||
```yaml
|
||||
ingress:
|
||||
## If true, ClickHouse server Ingress will be created
|
||||
##
|
||||
enabled: true
|
||||
|
||||
## ClickHouse server Ingress annotations
|
||||
##
|
||||
annotations: {}
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
# kubernetes.io/tls-acme: 'true'
|
||||
|
||||
## ClickHouse server Ingress hostnames
|
||||
## Must be provided if Ingress is enabled
|
||||
##
|
||||
hosts:
|
||||
- clickhouse.domain.com
|
||||
|
||||
## ClickHouse server Ingress TLS configuration
|
||||
## Secrets must be manually created in the namespace
|
||||
##
|
||||
tls:
|
||||
- secretName: clickhouse-server-tls
|
||||
hosts:
|
||||
- clickhouse.domain.com
|
||||
```
|
||||
|
||||
### Using custom scripts
|
||||
|
||||
For advanced operations, the Bitnami ClickHouse chart allows using custom init and start scripts that will be mounted in `/docker-entrypoint.initdb.d` and `/docker-entrypoint.startdb.d` . The `init` scripts will be run on the first boot whereas the `start` scripts will be run on every container start. For adding the scripts directly as values use the `initdbScripts` and `startdbScripts` values. For using Secrets use the `initdbScriptsSecret` and `startdbScriptsSecret`.
|
||||
|
||||
```yaml
|
||||
initdbScriptsSecret: init-scripts-secret
|
||||
startdbScriptsSecret: start-scripts-secret
|
||||
```
|
||||
|
||||
### Pod affinity
|
||||
|
||||
This chart allows you to set your custom affinity using the `affinity` parameter. Find more information about Pod affinity in the [kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity).
|
||||
|
||||
As an alternative, use one of the preset configurations for pod affinity, pod anti-affinity, and node affinity available at the [bitnami/common](https://github.com/bitnami/charts/tree/master/bitnami/common#affinities) chart. To do so, set the `podAffinityPreset`, `podAntiAffinityPreset`, or `nodeAffinityPreset` parameters.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
Find more information about how to deal with common errors related to Bitnami's Helm charts in [this troubleshooting guide](https://docs.bitnami.com/general/how-to/troubleshoot-helm-chart-issues).
|
||||
|
||||
## License
|
||||
|
||||
Copyright © 2022 Bitnami
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
58
bitnami/clickhouse/templates/NOTES.txt
Normal file
58
bitnami/clickhouse/templates/NOTES.txt
Normal file
@@ -0,0 +1,58 @@
|
||||
CHART NAME: {{ .Chart.Name }}
|
||||
CHART VERSION: {{ .Chart.Version }}
|
||||
APP VERSION: {{ .Chart.AppVersion }}
|
||||
|
||||
** Please be patient while the chart is being deployed **
|
||||
|
||||
{{- if .Values.diagnosticMode.enabled }}
|
||||
The chart has been deployed in diagnostic mode. All probes have been disabled and the command has been overwritten with:
|
||||
|
||||
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 4 }}
|
||||
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 4 }}
|
||||
|
||||
Get the list of pods by executing:
|
||||
|
||||
kubectl get pods --namespace {{ include "common.names.namespace" . | quote }} -l app.kubernetes.io/instance={{ .Release.Name }}
|
||||
|
||||
Access the pod you want to debug by executing
|
||||
|
||||
kubectl exec --namespace {{ include "common.names.namespace" . | quote }} -ti <NAME OF THE POD> -- bash
|
||||
|
||||
In order to replicate the container startup scripts execute this command:
|
||||
|
||||
/opt/bitnami/scripts/clickhouse/entrypoint.sh /opt/bitnami/scripts/clickhouse/run.sh
|
||||
|
||||
{{- else }}
|
||||
|
||||
ClickHouse is available in the following address:
|
||||
|
||||
{{- if .Values.externalAccess.enabled }}
|
||||
|
||||
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||
|
||||
kubectl get svc --namespace {{ template "common.names.namespace" . }} -l "app.kubernetes.io/name={{ template "common.names.fullname" . }},app.kubernetes.io/instance={{ .Release.Name }},app.kubernetes.io/component=clickhouse" -w
|
||||
|
||||
{{- else if (eq "LoadBalancer" .Values.service.type) }}
|
||||
|
||||
export SERVICE_IP=$(kubectl get svc --namespace {{ template "common.names.namespace" . }} {{ template "common.names.fullname" . }} --template "{{ "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}" }}")
|
||||
|
||||
{{- else if (eq "NodePort" .Values.service.type)}}
|
||||
|
||||
export NODE_IP=$(kubectl get nodes --namespace {{ template "common.names.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||
export NODE_PORT=$(kubectl get --namespace {{ template "common.names.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "common.names.fullname" . }})
|
||||
|
||||
{{- else if (eq "ClusterIP" .Values.service.type)}}
|
||||
|
||||
kubectl port-forward --namespace {{ template "common.names.namespace" . }} svc/{{ template "common.names.fullname" . }} {{ .Values.service.ports.tcp }}:9000 &
|
||||
|
||||
{{- end }}
|
||||
|
||||
Credentials:
|
||||
|
||||
echo "Username : {{ .Values.auth.username }}"
|
||||
echo "Password : $(kubectl get secret --namespace {{ .Release.Namespace }} {{ include "clickhouse.secretName" . }} -o jsonpath="{.data.{{ include "clickhouse.secretKey" .}}}" | base64 -d)"
|
||||
|
||||
{{- end }}
|
||||
|
||||
{{- include "common.warnings.rollingTag" .Values.image }}
|
||||
{{- include "clickhouse.validateValues" . }}
|
||||
201
bitnami/clickhouse/templates/_helpers.tpl
Normal file
201
bitnami/clickhouse/templates/_helpers.tpl
Normal file
@@ -0,0 +1,201 @@
|
||||
{{/*
|
||||
Return the proper ClickHouse image name
|
||||
*/}}
|
||||
{{- define "clickhouse.image" -}}
|
||||
{{ include "common.images.image" (dict "imageRoot" .Values.image "global" .Values.global) }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper image name (for the init container volume-permissions image)
|
||||
*/}}
|
||||
{{- define "clickhouse.volumePermissions.image" -}}
|
||||
{{- include "common.images.image" ( dict "imageRoot" .Values.volumePermissions.image "global" .Values.global ) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper Docker Image Registry Secret Names
|
||||
*/}}
|
||||
{{- define "clickhouse.imagePullSecrets" -}}
|
||||
{{- include "common.images.pullSecrets" (dict "images" (list .Values.image .Values.volumePermissions.image) "global" .Values.global) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return true if a TLS credentials secret object should be created
|
||||
*/}}
|
||||
{{- define "clickhouse.createTlsSecret" -}}
|
||||
{{- if and .Values.tls.autoGenerated (not .Values.tls.certificatesSecret) }}
|
||||
{{- true -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the path to the CA cert file.
|
||||
*/}}
|
||||
{{- define "clickhouse.tlsSecretName" -}}
|
||||
{{- if .Values.tls.autoGenerated }}
|
||||
{{- printf "%s-crt" (include "common.names.fullname" .) -}}
|
||||
{{- else -}}
|
||||
{{ required "A secret containing TLS certificates is required when TLS is enabled" .Values.tls.certificatesSecret }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the path to the cert file.
|
||||
*/}}
|
||||
{{- define "clickhouse.tlsCert" -}}
|
||||
{{- if .Values.tls.autoGenerated }}
|
||||
{{- printf "/opt/bitnami/clickhouse/certs/tls.crt" -}}
|
||||
{{- else -}}
|
||||
{{- required "Certificate filename is required when TLS in enabled" .Values.tls.certFilename | printf "/opt/bitnami/clickhouse/certs/%s" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the path to the cert key file.
|
||||
*/}}
|
||||
{{- define "clickhouse.tlsCertKey" -}}
|
||||
{{- if .Values.tls.autoGenerated }}
|
||||
{{- printf "/opt/bitnami/clickhouse/certs/tls.key" -}}
|
||||
{{- else -}}
|
||||
{{- required "Certificate Key filename is required when TLS in enabled" .Values.tls.certKeyFilename | printf "/opt/bitnami/clickhouse/certs/%s" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the path to the CA cert file.
|
||||
*/}}
|
||||
{{- define "clickhouse.tlsCACert" -}}
|
||||
{{- if .Values.tls.autoGenerated }}
|
||||
{{- printf "/opt/bitnami/clickhouse/certs/ca.crt" -}}
|
||||
{{- else -}}
|
||||
{{- printf "/opt/bitnami/clickhouse/certs/%s" .Values.tls.certCAFilename -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Get the ClickHouse configuration configmap.
|
||||
*/}}
|
||||
{{- define "clickhouse.configmapName" -}}
|
||||
{{- if .Values.existingOverridesConfigmap -}}
|
||||
{{- .Values.existingOverridesConfigmap -}}
|
||||
{{- else }}
|
||||
{{- printf "%s" (include "common.names.fullname" . ) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Get the ClickHouse configuration configmap.
|
||||
*/}}
|
||||
{{- define "clickhouse.extraConfigmapName" -}}
|
||||
{{- if .Values.extraOverridesConfigmap -}}
|
||||
{{- .Values.extraOverridesConfigmap -}}
|
||||
{{- else }}
|
||||
{{- printf "%s-extra" (include "common.names.fullname" . ) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Get the Clickhouse password secret name
|
||||
*/}}
|
||||
{{- define "clickhouse.secretName" -}}
|
||||
{{- if .Values.auth.existingSecret -}}
|
||||
{{- .Values.auth.existingSecret -}}
|
||||
{{- else }}
|
||||
{{- printf "%s" (include "common.names.fullname" . ) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Get the ClickHouse password key inside the secret
|
||||
*/}}
|
||||
{{- define "clickhouse.secretKey" -}}
|
||||
{{- if .Values.auth.existingSecret -}}
|
||||
{{- .Values.auth.existingSecretKey -}}
|
||||
{{- else }}
|
||||
{{- print "admin-password" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Get the startialization scripts Secret name.
|
||||
*/}}
|
||||
{{- define "clickhouse.startdbScriptsSecret" -}}
|
||||
{{- if .Values.startdbScriptsSecret -}}
|
||||
{{- printf "%s" (tpl .Values.startdbScriptsSecret $) -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-start-scripts" (include "common.names.fullname" .) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Get the initialization scripts Secret name.
|
||||
*/}}
|
||||
{{- define "clickhouse.initdbScriptsSecret" -}}
|
||||
{{- if .Values.initdbScriptsSecret -}}
|
||||
{{- printf "%s" (tpl .Values.initdbScriptsSecret $) -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-init-scripts" (include "common.names.fullname" .) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the path to the CA cert file.
|
||||
*/}}
|
||||
{{- define "clickhouse.headlessServiceName" -}}
|
||||
{{- printf "%s-headless" (include "common.names.fullname" .) -}}
|
||||
{{- 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).
|
||||
*/}}
|
||||
{{- define "clickhouse.zookeeper.fullname" -}}
|
||||
{{- include "common.names.dependency.fullname" (dict "chartName" "zookeeper" "chartValues" .Values.zookeeper "context" $) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the path to the CA cert file.
|
||||
*/}}
|
||||
{{- define "clickhouse.zookeeper.headlessServiceName" -}}
|
||||
{{- printf "%s-headless" (include "clickhouse.zookeeper.fullname" .) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "clickhouse.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create -}}
|
||||
{{ default (include "common.names.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else -}}
|
||||
{{ default "default" .Values.serviceAccount.name }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Compile all warnings into a single message.
|
||||
*/}}
|
||||
{{- define "clickhouse.validateValues" -}}
|
||||
{{- $messages := list -}}
|
||||
{{- $messages := append $messages (include "clickhouse.validateValues.zookeeper" .) -}}
|
||||
{{- $messages := without $messages "" -}}
|
||||
{{- $message := join "\n" $messages -}}
|
||||
|
||||
{{- if $message -}}
|
||||
{{- printf "\nVALUES VALIDATION:\n%s" $message -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* Validate values of ClickHouse - Zookeeper */}}
|
||||
{{- define "clickhouse.validateValues.zookeeper" -}}
|
||||
{{- if and .Values.zookeeper.enabled .Values.externalZookeeper.servers -}}
|
||||
clickhouse: Multiple Zookeeper
|
||||
You can only use one zookeeper
|
||||
Please choose installing a Zookeeper chart (--set zookeeper.enabled=true) or
|
||||
using an external instance (--set zookeeper.servers )
|
||||
{{- end -}}
|
||||
{{- if and (not .Values.zookeeper.enabled) (not .Values.externalZookeeper.servers) (ne (int .Values.shards) 1) (ne (int .Values.replicaCount) 1) -}}
|
||||
clickhouse: No Zookeeper
|
||||
If you are deploying more than one ClickHouse instance, you need to enable Zookeeper. Please choose installing a Zookeeper chart (--set zookeeper.enabled=true) or
|
||||
using an external instance (--set zookeeper.servers )
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
18
bitnami/clickhouse/templates/configmap-extra.yaml
Normal file
18
bitnami/clickhouse/templates/configmap-extra.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
{{- if and .Values.extraOverrides (not .Values.extraOverridesConfigmap) }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ printf "%s-extra" (include "common.names.fullname" .) }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: clickhouse
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
data:
|
||||
01_extra_overrides.xml: |
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.extraOverrides "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
18
bitnami/clickhouse/templates/configmap.yaml
Normal file
18
bitnami/clickhouse/templates/configmap.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
{{- if not .Values.existingOverridesConfigmap }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ template "common.names.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: clickhouse
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
data:
|
||||
00_default_overrides.xml: |
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.defaultConfigurationOverrides "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
4
bitnami/clickhouse/templates/extra-list.yaml
Normal file
4
bitnami/clickhouse/templates/extra-list.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
{{- range .Values.extraDeploy }}
|
||||
---
|
||||
{{ include "common.tplvalues.render" (dict "value" . "context" $) }}
|
||||
{{- end }}
|
||||
44
bitnami/clickhouse/templates/ingress-tls-secrets.yaml
Normal file
44
bitnami/clickhouse/templates/ingress-tls-secrets.yaml
Normal file
@@ -0,0 +1,44 @@
|
||||
{{- if .Values.ingress.enabled }}
|
||||
{{- if .Values.ingress.secrets }}
|
||||
{{- range .Values.ingress.secrets }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ .name }}
|
||||
namespace: {{ $.Release.Namespace | quote }}
|
||||
labels: {{- include "common.labels.standard" $ | nindent 4 }}
|
||||
{{- if $.Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if $.Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
type: kubernetes.io/tls
|
||||
data:
|
||||
tls.crt: {{ .certificate | b64enc }}
|
||||
tls.key: {{ .key | b64enc }}
|
||||
---
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if and .Values.ingress.tls .Values.ingress.selfSigned }}
|
||||
{{- $ca := genCA "clickhouse-ca" 365 }}
|
||||
{{- $cert := genSignedCert .Values.ingress.hostname nil (list .Values.ingress.hostname) 365 $ca }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ printf "%s-tls" .Values.ingress.hostname }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
type: kubernetes.io/tls
|
||||
data:
|
||||
tls.crt: {{ $cert.Cert | b64enc | quote }}
|
||||
tls.key: {{ $cert.Key | b64enc | quote }}
|
||||
ca.crt: {{ $ca.Cert | b64enc | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
60
bitnami/clickhouse/templates/ingress.yaml
Executable file
60
bitnami/clickhouse/templates/ingress.yaml
Executable file
@@ -0,0 +1,60 @@
|
||||
{{- if .Values.ingress.enabled }}
|
||||
apiVersion: {{ include "common.capabilities.ingress.apiVersion" . }}
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ include "common.names.fullname" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
{{- if .Values.ingress.annotations }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.ingress.annotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.commonAnnotations }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if and .Values.ingress.ingressClassName (eq "true" (include "common.ingress.supportsIngressClassname" .)) }}
|
||||
ingressClassName: {{ .Values.ingress.ingressClassName | quote }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- if .Values.ingress.hostname }}
|
||||
- host: {{ .Values.ingress.hostname | quote }}
|
||||
http:
|
||||
paths:
|
||||
{{- if .Values.ingress.extraPaths }}
|
||||
{{- toYaml .Values.ingress.extraPaths | nindent 10 }}
|
||||
{{- end }}
|
||||
- path: {{ .Values.ingress.path }}
|
||||
{{- if eq "true" (include "common.ingress.supportsPathType" .) }}
|
||||
pathType: {{ .Values.ingress.pathType }}
|
||||
{{- end }}
|
||||
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "common.names.fullname" .) "servicePort" "http" "context" $) | nindent 14 }}
|
||||
{{- end }}
|
||||
{{- range .Values.ingress.extraHosts }}
|
||||
- host: {{ .name | quote }}
|
||||
http:
|
||||
paths:
|
||||
- path: {{ default "/" .path }}
|
||||
{{- if eq "true" (include "common.ingress.supportsPathType" $) }}
|
||||
pathType: {{ default "ImplementationSpecific" .pathType }}
|
||||
{{- end }}
|
||||
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "common.names.fullname" $) "servicePort" "http" "context" $) | nindent 14 }}
|
||||
{{- end }}
|
||||
{{- if .Values.ingress.extraRules }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.ingress.extraRules "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if or (and .Values.ingress.tls (or (include "common.ingress.certManagerRequest" ( dict "annotations" .Values.ingress.annotations )) .Values.ingress.selfSigned)) .Values.ingress.extraTls }}
|
||||
tls:
|
||||
{{- if and .Values.ingress.tls (or (include "common.ingress.certManagerRequest" ( dict "annotations" .Values.ingress.annotations )) .Values.ingress.selfSigned) }}
|
||||
- hosts:
|
||||
- {{ .Values.ingress.hostname | quote }}
|
||||
secretName: {{ printf "%s-tls" .Values.ingress.hostname }}
|
||||
{{- end }}
|
||||
{{- if .Values.ingress.extraTls }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.ingress.extraTls "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
17
bitnami/clickhouse/templates/init-scripts-secret.yaml
Normal file
17
bitnami/clickhouse/templates/init-scripts-secret.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
{{- if and .Values.initdbScripts (not .Values.initdbScriptsSecret) }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ printf "%s-init-scripts" (include "common.names.fullname" .) }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: clickhouse
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
stringData:
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.initdbScripts "context" .) | nindent 2 }}
|
||||
{{- end }}
|
||||
18
bitnami/clickhouse/templates/secret.yaml
Normal file
18
bitnami/clickhouse/templates/secret.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
{{- if not .Values.auth.existingSecret }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ template "common.names.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: clickhouse
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
type: Opaque
|
||||
data:
|
||||
admin-password: {{ include "common.secrets.passwords.manage" (dict "secret" (include "common.names.fullname" .) "key" "admin-password" "providedValues" (list "auth.password") "context" $) }}
|
||||
{{- end }}
|
||||
22
bitnami/clickhouse/templates/service-account.yaml
Normal file
22
bitnami/clickhouse/templates/service-account.yaml
Normal file
@@ -0,0 +1,22 @@
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "clickhouse.serviceAccountName" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: clickhouse
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.serviceAccount.annotations .Values.commonAnnotations }}
|
||||
annotations:
|
||||
{{- if .Values.commonAnnotations }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.serviceAccount.annotations }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.serviceAccount.annotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
|
||||
{{- end }}
|
||||
114
bitnami/clickhouse/templates/service-external-access.yaml
Normal file
114
bitnami/clickhouse/templates/service-external-access.yaml
Normal file
@@ -0,0 +1,114 @@
|
||||
{{- if $.Values.externalAccess.enabled }}
|
||||
{{- $shards := $.Values.shards | int }}
|
||||
{{- $replicas := $.Values.replicaCount | int }}
|
||||
{{- $totalNodes := mul $shards $replicas }}
|
||||
{{- range $shard, $e := until $shards }}
|
||||
{{- range $i, $_e := until $replicas }}
|
||||
{{- $targetPod := printf "%s-shard%d-%d" (include "common.names.fullname" $) $shard $i }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ printf "%s-external" $targetPod | trunc 63 | trimSuffix "-" }}
|
||||
namespace: {{ $.Release.Namespace | quote }}
|
||||
labels: {{- include "common.labels.standard" $ | nindent 4 }}
|
||||
app.kubernetes.io/component: clickhouse
|
||||
pod: {{ $targetPod }}
|
||||
{{- if $.Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" $.Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if $.Values.externalAccess.service.labels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" $.Values.externalAccess.service.labels "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if or $.Values.externalAccess.service.annotations $.Values.commonAnnotations $.Values.externalAccess.service.loadBalancerAnnotations }}
|
||||
annotations:
|
||||
{{- if and (not (empty $.Values.externalAccess.service.loadBalancerAnnotations)) (eq (len $.Values.externalAccess.service.loadBalancerAnnotations) $totalNodes) }}
|
||||
{{ include "common.tplvalues.render" ( dict "value" (index $.Values.externalAccess.service.loadBalancerAnnotations $i) "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if $.Values.externalAccess.service.annotations }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" $.Values.externalAccess.service.annotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if $.Values.commonAnnotations }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" $.Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ $.Values.externalAccess.service.type }}
|
||||
{{- if eq $.Values.externalAccess.service.type "LoadBalancer" }}
|
||||
{{- if and (not (empty $.Values.externalAccess.service.loadBalancerIPs)) (eq (len $.Values.externalAccess.service.loadBalancerIPs) $totalNodes) }}
|
||||
loadBalancerIP: {{ index $.Values.externalAccess.service.loadBalancerIPs $i }}
|
||||
{{- end }}
|
||||
{{- if $.Values.externalAccess.service.loadBalancerSourceRanges }}
|
||||
loadBalancerSourceRanges: {{- toYaml $.Values.externalAccess.service.loadBalancerSourceRanges | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
port: {{ $.Values.externalAccess.service.ports.http }}
|
||||
targetPort: http
|
||||
{{- if not (empty $.Values.externalAccess.service.nodePorts.http) }}
|
||||
nodePort: {{ index $.Values.externalAccess.service.nodePorts.http $i }}
|
||||
{{- else }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
{{- if $.Values.metrics.enabled }}
|
||||
- name: http-metrics
|
||||
port: {{ $.Values.externalAccess.service.ports.metrics }}
|
||||
targetPort: http-metrics
|
||||
{{- if not (empty $.Values.externalAccess.service.nodePorts.metrics) }}
|
||||
nodePort: {{ index $.Values.externalAccess.service.nodePorts.metrics $i }}
|
||||
{{- else }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
- name: tcp
|
||||
port: {{ $.Values.externalAccess.service.ports.tcp }}
|
||||
targetPort: tcp
|
||||
{{- if not (empty $.Values.externalAccess.service.nodePorts.tcp) }}
|
||||
nodePort: {{ index $.Values.externalAccess.service.nodePorts.tcp $i }}
|
||||
{{- else }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
{{- if $.Values.tls.enabled }}
|
||||
- name: tcp-secure
|
||||
port: {{ $.Values.externalAccess.service.ports.tcpSecure }}
|
||||
targetPort: tcp-secure
|
||||
{{- if not (empty $.Values.externalAccess.service.nodePorts.tcpSecure) }}
|
||||
nodePort: {{ index $.Values.externalAccess.service.nodePorts.tcpSecure $i }}
|
||||
{{- else }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
- name: tcp-mysql
|
||||
port: {{ $.Values.externalAccess.service.ports.mysql }}
|
||||
targetPort: tcp-mysql
|
||||
{{- if not (empty $.Values.externalAccess.service.nodePorts.mysql) }}
|
||||
nodePort: {{ index $.Values.externalAccess.service.nodePorts.mysql $i }}
|
||||
{{- else }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
- name: tcp-postgresql
|
||||
port: {{ $.Values.externalAccess.service.ports.postgresql }}
|
||||
targetPort: tcp-postgresql
|
||||
{{- if not (empty $.Values.externalAccess.service.nodePorts.postgresql) }}
|
||||
nodePort: {{ index $.Values.externalAccess.service.nodePorts.postgresql $i }}
|
||||
{{- else }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
- name: tcp-intersrv
|
||||
port: {{ $.Values.externalAccess.service.ports.interserver }}
|
||||
targetPort: tcp-intersrv
|
||||
{{- if not (empty $.Values.externalAccess.service.nodePorts.interserver) }}
|
||||
nodePort: {{ index $.Values.externalAccess.service.nodePorts.interserver $i }}
|
||||
{{- else }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
{{- if $.Values.externalAccess.service.extraPorts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" $.Values.externalAccess.service.extraPorts "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
selector: {{- include "common.labels.matchLabels" $ | nindent 4 }}
|
||||
app.kubernetes.io/component: clickhouse
|
||||
statefulset.kubernetes.io/pod-name: {{ $targetPod }}
|
||||
---
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
55
bitnami/clickhouse/templates/service-headless.yaml
Normal file
55
bitnami/clickhouse/templates/service-headless.yaml
Normal file
@@ -0,0 +1,55 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "clickhouse.headlessServiceName" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: clickhouse
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.service.annotations .Values.commonAnnotations }}
|
||||
annotations:
|
||||
{{- if .Values.service.annotations }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.service.annotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.commonAnnotations }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: ClusterIP
|
||||
clusterIP: None
|
||||
publishNotReadyAddresses: true
|
||||
ports:
|
||||
- name: http
|
||||
targetPort: http
|
||||
port: {{ .Values.service.ports.http }}
|
||||
protocol: TCP
|
||||
- name: tcp
|
||||
targetPort: tcp
|
||||
port: {{ .Values.service.ports.tcp }}
|
||||
protocol: TCP
|
||||
{{- if .Values.tls.enabled }}
|
||||
- name: tcp-secure
|
||||
targetPort: tcp-secure
|
||||
port: {{ .Values.service.ports.tcpSecure }}
|
||||
protocol: TCP
|
||||
{{- end }}
|
||||
- name: mysql
|
||||
targetPort: mysql
|
||||
port: {{ .Values.service.ports.mysql }}
|
||||
protocol: TCP
|
||||
- name: tcp-postgresql
|
||||
targetPort: tcp-postgresql
|
||||
port: {{ .Values.service.ports.postgresql }}
|
||||
protocol: TCP
|
||||
- name: http-intersrv
|
||||
targetPort: http-intersrv
|
||||
port: {{ .Values.service.ports.interserver }}
|
||||
protocol: TCP
|
||||
{{- if .Values.service.extraPorts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.service.extraPorts "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: clickhouse
|
||||
112
bitnami/clickhouse/templates/service.yaml
Normal file
112
bitnami/clickhouse/templates/service.yaml
Normal file
@@ -0,0 +1,112 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "common.names.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: clickhouse
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.service.annotations .Values.commonAnnotations }}
|
||||
annotations:
|
||||
{{- if .Values.service.annotations }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.service.annotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.commonAnnotations }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
{{- if and .Values.service.clusterIP (eq .Values.service.type "ClusterIP") }}
|
||||
clusterIP: {{ .Values.service.clusterIP }}
|
||||
{{- end }}
|
||||
{{- if .Values.service.sessionAffinity }}
|
||||
sessionAffinity: {{ .Values.service.sessionAffinity }}
|
||||
{{- end }}
|
||||
{{- if .Values.service.sessionAffinityConfig }}
|
||||
sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.service.sessionAffinityConfig "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if or (eq .Values.service.type "LoadBalancer") (eq .Values.service.type "NodePort") }}
|
||||
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy | quote }}
|
||||
{{- end }}
|
||||
{{- if and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerSourceRanges)) }}
|
||||
loadBalancerSourceRanges: {{ .Values.service.loadBalancerSourceRanges }}
|
||||
{{- end }}
|
||||
{{- if and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerIP)) }}
|
||||
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
targetPort: http
|
||||
port: {{ .Values.service.ports.http }}
|
||||
protocol: TCP
|
||||
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.http)) }}
|
||||
nodePort: {{ .Values.service.nodePorts.http }}
|
||||
{{- else if eq .Values.service.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
- name: tcp
|
||||
targetPort: tcp
|
||||
port: {{ .Values.service.ports.tcp }}
|
||||
protocol: TCP
|
||||
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.tcp)) }}
|
||||
nodePort: {{ .Values.service.nodePorts.tcp }}
|
||||
{{- else if eq .Values.service.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
{{- if .Values.tls.enabled }}
|
||||
- name: tcp-secure
|
||||
targetPort: tcp-secure
|
||||
port: {{ .Values.service.ports.tcpSecure }}
|
||||
protocol: TCP
|
||||
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.tcpSecure)) }}
|
||||
nodePort: {{ .Values.service.nodePorts.tcpSecure }}
|
||||
{{- else if eq .Values.service.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
- name: tcp-mysql
|
||||
targetPort: tcp-mysql
|
||||
port: {{ .Values.service.ports.mysql }}
|
||||
protocol: TCP
|
||||
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.mysql)) }}
|
||||
nodePort: {{ .Values.service.nodePorts.mysql }}
|
||||
{{- else if eq .Values.service.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
- name: tcp-postgresql
|
||||
targetPort: tcp-postgresql
|
||||
port: {{ .Values.service.ports.postgresql }}
|
||||
protocol: TCP
|
||||
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.postgresql)) }}
|
||||
nodePort: {{ .Values.service.nodePorts.postgresql }}
|
||||
{{- else if eq .Values.service.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
- name: http-intersrv
|
||||
targetPort: http-intersrv
|
||||
port: {{ .Values.service.ports.interserver }}
|
||||
protocol: TCP
|
||||
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.interserver)) }}
|
||||
nodePort: {{ .Values.service.nodePorts.interserver }}
|
||||
{{- else if eq .Values.service.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.enabled }}
|
||||
- name: http-metrics
|
||||
targetPort: http-metrics
|
||||
port: {{ .Values.service.ports.metrics }}
|
||||
protocol: TCP
|
||||
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.metrics)) }}
|
||||
nodePort: {{ .Values.service.nodePorts.metrics }}
|
||||
{{- else if eq .Values.service.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.service.extraPorts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.service.extraPorts "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: clickhouse
|
||||
49
bitnami/clickhouse/templates/servicemonitor.yaml
Normal file
49
bitnami/clickhouse/templates/servicemonitor.yaml
Normal file
@@ -0,0 +1,49 @@
|
||||
{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: {{ include "common.names.fullname" . }}
|
||||
namespace: {{ default (include "common.names.namespace" .) .Values.metrics.serviceMonitor.namespace | quote }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
{{- if .Values.metrics.serviceMonitor.labels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.labels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
{{- if .Values.commonAnnotations }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.serviceMonitor.annotations }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.annotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
jobLabel: {{ .Values.metrics.serviceMonitor.jobLabel | quote }}
|
||||
selector:
|
||||
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
|
||||
{{- if .Values.metrics.serviceMonitor.selector }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.selector "context" $) | nindent 6 }}
|
||||
{{- end }}
|
||||
endpoints:
|
||||
- port: http-metrics
|
||||
path: "/metrics"
|
||||
{{- if .Values.metrics.serviceMonitor.interval }}
|
||||
interval: {{ .Values.metrics.serviceMonitor.interval }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.serviceMonitor.scrapeTimeout }}
|
||||
scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.serviceMonitor.honorLabels }}
|
||||
honorLabels: {{ .Values.metrics.serviceMonitor.honorLabels }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.serviceMonitor.metricRelabelings }}
|
||||
metricRelabelings: {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.metricRelabelings "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.serviceMonitor.relabelings }}
|
||||
relabelings: {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.relabelings "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- {{ include "common.names.namespace" . | quote }}
|
||||
{{- end }}
|
||||
17
bitnami/clickhouse/templates/start-scripts-secret.yaml
Normal file
17
bitnami/clickhouse/templates/start-scripts-secret.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
{{- if and .Values.startdbScripts (not .Values.startdbScriptsSecret) }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ printf "%s-start-scripts" (include "common.names.fullname" .) }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: clickhouse
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
stringData:
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.startdbScripts "context" .) | nindent 2 }}
|
||||
{{- end }}
|
||||
362
bitnami/clickhouse/templates/statefulset.yaml
Normal file
362
bitnami/clickhouse/templates/statefulset.yaml
Normal file
@@ -0,0 +1,362 @@
|
||||
{{- $replicas := .Values.shards | int }}
|
||||
{{- range $i, $e := until $replicas }}
|
||||
apiVersion: {{ include "common.capabilities.statefulset.apiVersion" $ }}
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ printf "%s-shard%d" (include "common.names.fullname" $ ) $i }}
|
||||
namespace: {{ include "common.names.namespace" $ | quote }}
|
||||
labels: {{- include "common.labels.standard" $ | nindent 4 }}
|
||||
app.kubernetes.io/component: clickhouse
|
||||
{{- if $.Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" $.Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if $.Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $.Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
replicas: {{ $.Values.replicaCount }}
|
||||
podManagementPolicy: {{ $.Values.podManagementPolicy | quote }}
|
||||
selector:
|
||||
matchLabels: {{ include "common.labels.matchLabels" $ | nindent 6 }}
|
||||
app.kubernetes.io/component: clickhouse
|
||||
serviceName: {{ printf "%s-headless" (include "common.names.fullname" $) }}
|
||||
{{- if $.Values.updateStrategy }}
|
||||
updateStrategy: {{- toYaml $.Values.updateStrategy | nindent 4 }}
|
||||
{{- end }}
|
||||
template:
|
||||
metadata:
|
||||
{{- if or $.Values.podAnnotations (and $.Values.metrics.enabled $.Values.metrics.podAnnotations) }}
|
||||
annotations:
|
||||
{{- if $.Values.podAnnotations }}
|
||||
{{- include "common.tplvalues.render" (dict "value" $.Values.podAnnotations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if and $.Values.metrics.enabled $.Values.metrics.podAnnotations }}
|
||||
{{- include "common.tplvalues.render" (dict "value" $.Values.metrics.podAnnotations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
labels: {{- include "common.labels.standard" $ | nindent 8 }}
|
||||
app.kubernetes.io/component: clickhouse
|
||||
{{- if $.Values.podLabels }}
|
||||
{{- include "common.tplvalues.render" (dict "value" $.Values.podLabels "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
serviceAccountName: {{ template "clickhouse.serviceAccountName" $ }}
|
||||
{{- include "clickhouse.imagePullSecrets" $ | nindent 6 }}
|
||||
{{- if $.Values.hostAliases }}
|
||||
hostAliases: {{- include "common.tplvalues.render" (dict "value" $.Values.hostAliases "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if $.Values.affinity }}
|
||||
affinity: {{- include "common.tplvalues.render" ( dict "value" $.Values.affinity "context" $) | nindent 8 }}
|
||||
{{- else }}
|
||||
affinity:
|
||||
podAffinity: {{- include "common.affinities.pods" (dict "type" $.Values.podAffinityPreset "component" "clickhouse" "context" $) | nindent 10 }}
|
||||
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" $.Values.podAntiAffinityPreset "component" "clickhouse" "context" $) | nindent 10 }}
|
||||
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" $.Values.nodeAffinityPreset.type "key" $.Values.nodeAffinityPreset.key "values" $.Values.nodeAffinityPreset.values) | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- if $.Values.nodeSelector }}
|
||||
nodeSelector: {{- include "common.tplvalues.render" ( dict "value" $.Values.nodeSelector "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if $.Values.tolerations }}
|
||||
tolerations: {{- include "common.tplvalues.render" (dict "value" $.Values.tolerations "context" .) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if $.Values.priorityClassName }}
|
||||
priorityClassName: {{ $.Values.priorityClassName | quote }}
|
||||
{{- end }}
|
||||
{{- if $.Values.schedulerName }}
|
||||
schedulerName: {{ $.Values.schedulerName | quote }}
|
||||
{{- end }}
|
||||
{{- if $.Values.topologySpreadConstraints }}
|
||||
topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" $.Values.topologySpreadConstraints "context" .) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if $.Values.podSecurityContext.enabled }}
|
||||
securityContext: {{- omit $.Values.podSecurityContext "enabled" | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if $.Values.terminationGracePeriodSeconds }}
|
||||
terminationGracePeriodSeconds: {{ $.Values.terminationGracePeriodSeconds }}
|
||||
{{- end }}
|
||||
initContainers:
|
||||
{{- if and $.Values.tls.enabled (not $.Values.volumePermissions.enabled) }}
|
||||
- name: copy-certs
|
||||
image: {{ include "clickhouse.volumePermissions.image" $ }}
|
||||
imagePullPolicy: {{ $.Values.volumePermissions.image.pullPolicy | quote }}
|
||||
{{- if $.Values.resources }}
|
||||
resources: {{- toYaml $.Values.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
# We don't require a privileged container in this case
|
||||
{{- if $.Values.containerSecurityContext.enabled }}
|
||||
securityContext: {{- omit $.Values.containerSecurityContext "enabled" | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
command:
|
||||
- /bin/sh
|
||||
- -ec
|
||||
- |
|
||||
cp -L /tmp/certs/* /opt/bitnami/clickhouse/certs/
|
||||
chmod 600 {{ include "clickhouse.tlsCertKey" $ }}
|
||||
volumeMounts:
|
||||
- name: raw-certificates
|
||||
mountPath: /tmp/certs
|
||||
- name: clickhouse-certificates
|
||||
mountPath: /opt/bitnami/clickhouse/certs
|
||||
{{- else if and $.Values.volumePermissions.enabled $.Values.persistence.enabled }}
|
||||
- name: volume-permissions
|
||||
image: {{ include "clickhouse.volumePermissions.image" $ }}
|
||||
imagePullPolicy: {{ $.Values.volumePermissions.image.pullPolicy | quote }}
|
||||
command: |
|
||||
mkdir -p /bitnami/clickhouse/data
|
||||
chmod 700 /bitnami/clickhouse/data
|
||||
chown {{ $.Values.containerSecurityContext.runAsUser }}:{{ $.Values.podSecurityContext.fsGroup }} /bitnami/clickhouse
|
||||
find /bitnami/clickhouse -mindepth 1 -maxdepth 1 -not -name ".snapshot" -not -name "lost+found" | \
|
||||
xargs -r chown -R {{ $.Values.containerSecurityContext.runAsUser }}:{{ $.Values.podSecurityContext.fsGroup }}
|
||||
{{- if $.Values.tls.enabled }}
|
||||
cp /tmp/certs/* /opt/bitnami/clickhouse/certs/
|
||||
{{- if eq ( toString ( $.Values.volumePermissions.containerSecurityContext.runAsUser )) "auto" }}
|
||||
chown -R `id -u`:`id -G | cut -d " " -f2` /opt/bitnami/clickhouse/certs/
|
||||
{{- else }}
|
||||
chown -R {{ $.Values.containerSecurityContext.runAsUser }}:{{ $.Values.podSecurityContext.fsGroup }} /opt/bitnami/clickhouse/certs/
|
||||
{{- end }}
|
||||
chmod 600 {{ include "clickhouse.tlsCertKey" $ }}
|
||||
{{- end }}
|
||||
{{- if $.Values.containerSecurityContext.enabled }}
|
||||
securityContext: {{- omit $.Values.containerSecurityContext "enabled" | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if $.Values.volumePermissions.resources }}
|
||||
resources: {{- toYaml $.Values.volumePermissions.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /bitnami/clickhouse
|
||||
- name: config
|
||||
mountPath: /bitnami/clickhouse/conf/default
|
||||
{{- if $.Values.tls.enabled }}
|
||||
- name: raw-certificates
|
||||
mountPath: /tmp/certs
|
||||
- name: clickhouse-certificates
|
||||
mountPath: /opt/bitnami/clickhouse/certs
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if $.Values.initContainers }}
|
||||
{{- include "common.tplvalues.render" (dict "value" $.Values.initContainers "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: clickhouse
|
||||
image: {{ template "clickhouse.image" $ }}
|
||||
imagePullPolicy: {{ $.Values.image.pullPolicy }}
|
||||
{{- if $.Values.containerSecurityContext.enabled }}
|
||||
securityContext: {{- omit $.Values.containerSecurityContext "enabled" | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if $.Values.diagnosticMode.enabled }}
|
||||
command: {{- include "common.tplvalues.render" (dict "value" $.Values.diagnosticMode.command "context" $) | nindent 12 }}
|
||||
{{- else if $.Values.command }}
|
||||
command: {{- include "common.tplvalues.render" (dict "value" $.Values.command "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if $.Values.diagnosticMode.enabled }}
|
||||
args: {{- include "common.tplvalues.render" (dict "value" $.Values.diagnosticMode.args "context" $) | nindent 12 }}
|
||||
{{- else if $.Values.args }}
|
||||
args: {{- include "common.tplvalues.render" (dict "value" $.Values.args "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: BITNAMI_DEBUG
|
||||
value: {{ ternary "true" "false" (or $.Values.image.debug $.Values.diagnosticMode.enabled) | quote }}
|
||||
- name: CLICKHOUSE_HTTP_PORT
|
||||
value: {{ $.Values.containerPorts.http | quote }}
|
||||
- name: CLICKHOUSE_TCP_PORT
|
||||
value: {{ $.Values.containerPorts.tcp | quote }}
|
||||
- name: CLICKHOUSE_MYSQL_PORT
|
||||
value: {{ $.Values.containerPorts.mysql | quote }}
|
||||
- name: CLICKHOUSE_POSTGRESQL_PORT
|
||||
value: {{ $.Values.containerPorts.postgresql | quote }}
|
||||
- name: CLICKHOUSE_INTERSERVER_HTTP_PORT
|
||||
value: {{ $.Values.containerPorts.interserver | quote }}
|
||||
{{- if $.Values.tls.enabled }}
|
||||
- name: CLICKHOUSE_TCP_SECURE_PORT
|
||||
value: {{ $.Values.containerPorts.tcpSecure | quote }}
|
||||
{{- end }}
|
||||
{{- if $.Values.metrics.enabled }}
|
||||
- name: CLICKHOUSE_METRICS_PORT
|
||||
value: {{ $.Values.containerPorts.metrics | quote }}
|
||||
{{- end }}
|
||||
- name: CLICKHOUSE_ADMIN_USER
|
||||
value: {{ $.Values.auth.username | quote }}
|
||||
- name: CLICKHOUSE_SHARD_ID
|
||||
value: {{ printf "shard%d" $i | quote }}
|
||||
- name: CLICKHOUSE_REPLICA_ID
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
- name: CLICKHOUSE_ADMIN_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "clickhouse.secretName" $ }}
|
||||
key: {{ include "clickhouse.secretKey" $ }}
|
||||
{{- if $.Values.tls.enabled }}
|
||||
- name: CLICKHOUSE_TLS_CERT_FILE
|
||||
value: {{ include "clickhouse.tlsCert" $ | quote}}
|
||||
- name: CLICKHOUSE_TLS_KEY_FILE
|
||||
value: {{ include "clickhouse.tlsCertKey" $ | quote }}
|
||||
- name: CLICKHOUSE_TLS_CA_FILE
|
||||
value: {{ include "clickhouse.tlsCACert" $ | quote }}
|
||||
{{- end }}
|
||||
{{- if $.Values.extraEnvVars }}
|
||||
{{- include "common.tplvalues.render" (dict "value" $.Values.extraEnvVars "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
envFrom:
|
||||
{{- if $.Values.extraEnvVarsCM }}
|
||||
- configMapRef:
|
||||
name: {{ include "common.tplvalues.render" (dict "value" $.Values.extraEnvVarsCM "context" $) }}
|
||||
{{- end }}
|
||||
{{- if $.Values.extraEnvVarsSecret }}
|
||||
- secretRef:
|
||||
name: {{ include "common.tplvalues.render" (dict "value" $.Values.extraEnvVarsSecret "context" $) }}
|
||||
{{- end }}
|
||||
{{- if $.Values.resources }}
|
||||
resources: {{- toYaml $.Values.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ $.Values.containerPorts.http }}
|
||||
- name: tcp
|
||||
containerPort: {{ $.Values.containerPorts.tcp }}
|
||||
{{- if $.Values.tls.enabled }}
|
||||
- name: tcp-secure
|
||||
containerPort: {{ $.Values.containerPorts.tcpSecure }}
|
||||
{{- end }}
|
||||
- name: tcp-postgresql
|
||||
containerPort: {{ $.Values.containerPorts.postgresql }}
|
||||
- name: tcp-mysql
|
||||
containerPort: {{ $.Values.containerPorts.mysql }}
|
||||
- name: http-intersrv
|
||||
containerPort: {{ $.Values.containerPorts.interserver }}
|
||||
{{- if $.Values.metrics.enabled }}
|
||||
- name: http-metrics
|
||||
containerPort: {{ $.Values.containerPorts.metrics }}
|
||||
{{- end }}
|
||||
{{- if not $.Values.diagnosticMode.enabled }}
|
||||
{{- if $.Values.customLivenessProbe }}
|
||||
livenessProbe: {{- include "common.tplvalues.render" (dict "value" $.Values.customLivenessProbe "context" $) | nindent 12 }}
|
||||
{{- else if $.Values.livenessProbe.enabled }}
|
||||
livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit $.Values.livenessProbe "enabled") "context" $) | nindent 12 }}
|
||||
httpGet:
|
||||
path: /ping
|
||||
port: http
|
||||
{{- end }}
|
||||
{{- if $.Values.customReadinessProbe }}
|
||||
readinessProbe: {{- include "common.tplvalues.render" (dict "value" $.Values.customReadinessProbe "context" $) | nindent 12 }}
|
||||
{{- else if $.Values.readinessProbe.enabled }}
|
||||
readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit $.Values.readinessProbe "enabled") "context" $) | nindent 12 }}
|
||||
httpGet:
|
||||
path: /ping
|
||||
port: http
|
||||
{{- end }}
|
||||
{{- if $.Values.customStartupProbe }}
|
||||
startupProbe: {{- include "common.tplvalues.render" (dict "value" $.Values.customStartupProbe "context" $) | nindent 12 }}
|
||||
{{- else if $.Values.startupProbe.enabled }}
|
||||
startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit $.Values.startupProbe "enabled") "context" $) | nindent 12 }}
|
||||
httpGet:
|
||||
path: /ping
|
||||
port: http
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if $.Values.lifecycleHooks }}
|
||||
lifecycle: {{- include "common.tplvalues.render" (dict "value" $.Values.lifecycleHooks "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /bitnami/clickhouse
|
||||
- name: config
|
||||
mountPath: /bitnami/clickhouse/etc/conf.d/default
|
||||
{{- if or $.Values.extraOverridesConfigmap $.Values.extraOverrides }}
|
||||
- name: extra-config
|
||||
mountPath: /bitnami/clickhouse/etc/conf.d/extra-configmap
|
||||
{{- end }}
|
||||
{{- if $.Values.extraOverridesSecret }}
|
||||
- name: extra-secret
|
||||
mountPath: /bitnami/clickhouse/etc/conf.d/extra-secret
|
||||
{{- end }}
|
||||
{{- if $.Values.tls.enabled }}
|
||||
- name: clickhouse-certificates
|
||||
mountPath: /bitnami/clickhouse/certs
|
||||
{{- end }}
|
||||
{{- if or $.Values.initdbScriptsSecret $.Values.initdbScripts }}
|
||||
- name: custom-init-scripts
|
||||
mountPath: /docker-entrypoint-initdb.d
|
||||
{{- end }}
|
||||
{{- if or $.Values.startdbScriptsSecret $.Values.startdbScripts }}
|
||||
- name: custom-start-scripts
|
||||
mountPath: /docker-entrypoint-startdb.d
|
||||
{{- end }}
|
||||
{{- if $.Values.extraVolumeMounts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" $.Values.extraVolumeMounts "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if $.Values.sidecars }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" $.Values.sidecars "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: config
|
||||
configMap:
|
||||
name: {{ template "clickhouse.configmapName" $ }}
|
||||
{{- if or $.Values.initdbScriptsSecret $.Values.initdbScripts }}
|
||||
- name: custom-init-scripts
|
||||
secret:
|
||||
secretName: {{ include "clickhouse.initdbScriptsSecret" $ }}
|
||||
{{- end }}
|
||||
{{- if or $.Values.startdbScriptsSecret $.Values.startdbScripts }}
|
||||
- name: custom-start-scripts
|
||||
secret:
|
||||
secretName: {{ include "clickhouse.startdbScriptsSecret" $ }}
|
||||
{{- end }}
|
||||
{{- if or $.Values.extraOverridesConfigmap $.Values.extraOverrides }}
|
||||
- name: extra-config
|
||||
configMap:
|
||||
name: {{ template "clickhouse.extraConfigmapName" $ }}
|
||||
{{- end }}
|
||||
{{- if $.Values.extraOverridesSecret }}
|
||||
- name: extra-secret
|
||||
secret:
|
||||
secretName: {{ $.Values.extraOverridesSecret }}
|
||||
{{- end }}
|
||||
{{- if not $.Values.persistence.enabled }}
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
{{- if $.Values.tls.enabled }}
|
||||
- name: raw-certificates
|
||||
secret:
|
||||
secretName: {{ include "clickhouse.tlsSecretName" $ }}
|
||||
- name: clickhouse-certificates
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
{{- if $.Values.extraVolumes }}
|
||||
{{- include "common.tplvalues.render" (dict "value" $.Values.extraVolumes "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if $.Values.persistence.enabled }}
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
annotations:
|
||||
{{- if $.Values.persistence.annotations }}
|
||||
{{- include "common.tplvalues.render" (dict "value" $.Values.persistence.annotations "context" $) | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- if $.Values.commonAnnotations }}
|
||||
{{- include "common.tplvalues.render" (dict "value" $.Values.commonAnnotations "context" $) | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- if $.Values.commonLabels }}
|
||||
labels: {{- include "common.tplvalues.render" (dict "value" $.Values.commonLabels "context" $) | nindent 10 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
accessModes:
|
||||
{{- range $.Values.persistence.accessModes }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ $.Values.persistence.size | quote }}
|
||||
{{- if $.Values.persistence.selector }}
|
||||
selector: {{- include "common.tplvalues.render" (dict "value" $.Values.persistence.selector "context" $) | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- if $.Values.persistence.dataSource }}
|
||||
dataSource: {{- include "common.tplvalues.render" (dict "value" $.Values.persistence.dataSource "context" $) | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- include "common.storage.class" (dict "persistence" $.Values.persistence "global" $.Values.global) | nindent 8 }}
|
||||
{{- end }}
|
||||
---
|
||||
{{- end }}
|
||||
26
bitnami/clickhouse/templates/tls-secret.yaml
Normal file
26
bitnami/clickhouse/templates/tls-secret.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
{{- if (include "clickhouse.createTlsSecret" . ) }}
|
||||
{{- $ca := genCA "clickhouse-ca" 365 }}
|
||||
{{- $fullname := include "common.names.fullname" . }}
|
||||
{{- $releaseNamespace := .Release.Namespace }}
|
||||
{{- $clusterDomain := .Values.clusterDomain }}
|
||||
{{- $primaryHeadlessServiceName := printf "%s-headless" (include "common.names.fullname" .)}}
|
||||
{{- $altNames := list (printf "*.%s.%s.svc.%s" $fullname $releaseNamespace $clusterDomain) (printf "%s.%s.svc.%s" $fullname $releaseNamespace $clusterDomain) (printf "*.%s.%s.svc.%s" $primaryHeadlessServiceName $releaseNamespace $clusterDomain) (printf "%s.%s.svc.%s" $primaryHeadlessServiceName $releaseNamespace $clusterDomain) $fullname }}
|
||||
{{- $crt := genSignedCert $fullname nil $altNames 365 $ca }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ printf "%s-crt" (include "common.names.fullname" .) }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
type: kubernetes.io/tls
|
||||
data:
|
||||
ca.crt: {{ $ca.Cert | b64enc | quote }}
|
||||
tls.crt: {{ $crt.Cert | b64enc | quote }}
|
||||
tls.key: {{ $crt.Key | b64enc | quote }}
|
||||
{{- end }}
|
||||
971
bitnami/clickhouse/values.yaml
Normal file
971
bitnami/clickhouse/values.yaml
Normal file
@@ -0,0 +1,971 @@
|
||||
## @section Global parameters
|
||||
## Global Docker image parameters
|
||||
## Please, note that this will override the image parameters, including dependencies, configured to use the global value
|
||||
## Current available global Docker image parameters: imageRegistry, imagePullSecrets and storageClass
|
||||
##
|
||||
|
||||
## @param global.imageRegistry Global Docker image registry
|
||||
## @param global.imagePullSecrets Global Docker registry secret names as an array
|
||||
## @param global.storageClass Global StorageClass for Persistent Volume(s)
|
||||
##
|
||||
global:
|
||||
imageRegistry: ""
|
||||
## E.g.
|
||||
## imagePullSecrets:
|
||||
## - myRegistryKeySecretName
|
||||
##
|
||||
imagePullSecrets: []
|
||||
storageClass: ""
|
||||
|
||||
## @section Common parameters
|
||||
##
|
||||
|
||||
## @param kubeVersion Override Kubernetes version
|
||||
##
|
||||
kubeVersion: ""
|
||||
## @param nameOverride String to partially override common.names.name
|
||||
##
|
||||
nameOverride: ""
|
||||
## @param fullnameOverride String to fully override common.names.fullname
|
||||
##
|
||||
fullnameOverride: ""
|
||||
## @param namespaceOverride String to fully override common.names.namespace
|
||||
##
|
||||
namespaceOverride: ""
|
||||
## @param commonLabels Labels to add to all deployed objects
|
||||
##
|
||||
commonLabels: {}
|
||||
## @param commonAnnotations Annotations to add to all deployed objects
|
||||
##
|
||||
commonAnnotations: {}
|
||||
## @param clusterDomain Kubernetes cluster domain name
|
||||
##
|
||||
clusterDomain: cluster.local
|
||||
## @param extraDeploy Array of extra objects to deploy with the release
|
||||
##
|
||||
extraDeploy: []
|
||||
|
||||
## Enable diagnostic mode in the deployment
|
||||
##
|
||||
diagnosticMode:
|
||||
## @param diagnosticMode.enabled Enable diagnostic mode (all probes will be disabled and the command will be overridden)
|
||||
##
|
||||
enabled: false
|
||||
## @param diagnosticMode.command Command to override all containers in the deployment
|
||||
##
|
||||
command:
|
||||
- sleep
|
||||
## @param diagnosticMode.args Args to override all containers in the deployment
|
||||
##
|
||||
args:
|
||||
- infinity
|
||||
|
||||
## @section ClickHouse Parameters
|
||||
##
|
||||
|
||||
## Bitnami ClickHouse image
|
||||
## ref: https://hub.docker.com/r/bitnami/clickhouse/tags/
|
||||
## @param image.registry ClickHouse image registry
|
||||
## @param image.repository ClickHouse image repository
|
||||
## @param image.tag ClickHouse image tag (immutable tags are recommended)
|
||||
## @param image.pullPolicy ClickHouse image pull policy
|
||||
## @param image.pullSecrets ClickHouse image pull secrets
|
||||
## @param image.debug Enable ClickHouse image debug mode
|
||||
##
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/clickhouse
|
||||
tag: 22.8.5-debian-11-r3
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
##
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
## e.g:
|
||||
## pullSecrets:
|
||||
## - myRegistryKeySecretName
|
||||
##
|
||||
pullSecrets: []
|
||||
## Enable debug mode
|
||||
##
|
||||
debug: false
|
||||
## @param shards Number of ClickHouse shards to deploy
|
||||
##
|
||||
shards: 2
|
||||
|
||||
## @param replicaCount Number of ClickHouse replicas per shard to deploy
|
||||
##
|
||||
replicaCount: 2
|
||||
## @param containerPorts.http ClickHouse HTTP container port
|
||||
## @param containerPorts.tcp ClickHouse TCP container port
|
||||
## @param containerPorts.tcpSecure ClickHouse TCP container port
|
||||
## @param containerPorts.mysql ClickHouse MySQL container port
|
||||
## @param containerPorts.postgresql ClickHouse PostgreSQL container port
|
||||
## @param containerPorts.interserver ClickHouse Interserver container port
|
||||
## @param containerPorts.metrics ClickHouse metrics container port
|
||||
##
|
||||
containerPorts:
|
||||
http: 8123
|
||||
tcp: 9000
|
||||
tcpSecure: 9440
|
||||
mysql: 9004
|
||||
postgresql: 9005
|
||||
interserver: 9009
|
||||
metrics: 8001
|
||||
## Configure extra options for ClickHouse containers' liveness and readiness probes
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes
|
||||
## @param livenessProbe.enabled Enable livenessProbe on ClickHouse containers
|
||||
## @param livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe
|
||||
## @param livenessProbe.periodSeconds Period seconds for livenessProbe
|
||||
## @param livenessProbe.timeoutSeconds Timeout seconds for livenessProbe
|
||||
## @param livenessProbe.failureThreshold Failure threshold for livenessProbe
|
||||
## @param livenessProbe.successThreshold Success threshold for livenessProbe
|
||||
##
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
failureThreshold: 3
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 1
|
||||
## @param readinessProbe.enabled Enable readinessProbe on ClickHouse containers
|
||||
## @param readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe
|
||||
## @param readinessProbe.periodSeconds Period seconds for readinessProbe
|
||||
## @param readinessProbe.timeoutSeconds Timeout seconds for readinessProbe
|
||||
## @param readinessProbe.failureThreshold Failure threshold for readinessProbe
|
||||
## @param readinessProbe.successThreshold Success threshold for readinessProbe
|
||||
##
|
||||
readinessProbe:
|
||||
enabled: true
|
||||
failureThreshold: 3
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 1
|
||||
## @param startupProbe.enabled Enable startupProbe on ClickHouse containers
|
||||
## @param startupProbe.initialDelaySeconds Initial delay seconds for startupProbe
|
||||
## @param startupProbe.periodSeconds Period seconds for startupProbe
|
||||
## @param startupProbe.timeoutSeconds Timeout seconds for startupProbe
|
||||
## @param startupProbe.failureThreshold Failure threshold for startupProbe
|
||||
## @param startupProbe.successThreshold Success threshold for startupProbe
|
||||
##
|
||||
startupProbe:
|
||||
enabled: false
|
||||
failureThreshold: 3
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 1
|
||||
## @param customLivenessProbe Custom livenessProbe that overrides the default one
|
||||
##
|
||||
customLivenessProbe: {}
|
||||
## @param customReadinessProbe Custom readinessProbe that overrides the default one
|
||||
##
|
||||
customReadinessProbe: {}
|
||||
## @param customStartupProbe Custom startupProbe that overrides the default one
|
||||
##
|
||||
customStartupProbe: {}
|
||||
## ClickHouse resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
## @param resources.limits The resources limits for the ClickHouse containers
|
||||
## @param resources.requests The requested resources for the ClickHouse containers
|
||||
##
|
||||
resources:
|
||||
limits: {}
|
||||
requests: {}
|
||||
## Configure Pods Security Context
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
|
||||
## @param podSecurityContext.enabled Enabled ClickHouse pods' Security Context
|
||||
## @param podSecurityContext.fsGroup Set ClickHouse pod's Security Context fsGroup
|
||||
## @param podSecurityContext.seccompProfile.type Set ClickHouse container's Security Context seccomp profile
|
||||
##
|
||||
podSecurityContext:
|
||||
enabled: true
|
||||
fsGroup: 1001
|
||||
seccompProfile:
|
||||
type: "RuntimeDefault"
|
||||
## Configure Container Security Context
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
|
||||
## @param containerSecurityContext.enabled Enabled ClickHouse containers' Security Context
|
||||
## @param containerSecurityContext.runAsUser Set ClickHouse containers' Security Context runAsUser
|
||||
## @param containerSecurityContext.runAsNonRoot Set ClickHouse containers' Security Context runAsNonRoot
|
||||
## @param containerSecurityContext.allowPrivilegeEscalation Set ClickHouse container's privilege escalation
|
||||
## @param containerSecurityContext.capabilities.drop Set ClickHouse container's Security Context runAsNonRoot
|
||||
##
|
||||
containerSecurityContext:
|
||||
enabled: true
|
||||
runAsUser: 1001
|
||||
runAsNonRoot: true
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop: ["ALL"]
|
||||
|
||||
## Authentication
|
||||
## @param auth.username ClickHouse Admin username
|
||||
## @param auth.password ClickHouse Admin password
|
||||
## @param auth.existingSecret Name of a secret containing the Admin password
|
||||
## @param auth.existingSecretKey Name of the key inside the existing secret
|
||||
##
|
||||
auth:
|
||||
username: default
|
||||
password: ""
|
||||
existingSecret: ""
|
||||
existingSecretKey: ""
|
||||
|
||||
## @param logLevel Logging level
|
||||
##
|
||||
logLevel: information
|
||||
|
||||
## @param defaultConfigurationOverrides [string] Default configuration overrides (evaluated as a template)
|
||||
##
|
||||
defaultConfigurationOverrides: |
|
||||
<clickhouse>
|
||||
<!-- Macros -->
|
||||
<macros>
|
||||
<shard from_env="CLICKHOUSE_SHARD_ID"></shard>
|
||||
<replica from_env="CLICKHOUSE_REPLICA_ID"></replica>
|
||||
<layer>{{ include "common.names.fullname" . }}</layer>
|
||||
</macros>
|
||||
<!-- Log Level -->
|
||||
<logger>
|
||||
<level>{{ .Values.logLevel }}</level>
|
||||
</logger>
|
||||
{{- if or (ne (int .Values.shards) 1) (ne (int .Values.replicaCount) 1)}}
|
||||
<!-- Cluster configuration - Any update of the shards and replicas requires helm upgrade -->
|
||||
<remote_servers>
|
||||
<default>
|
||||
{{- $shards := $.Values.shards | int }}
|
||||
{{- range $shard, $e := until $shards }}
|
||||
<shard>
|
||||
{{- $replicas := $.Values.replicaCount | int }}
|
||||
{{- range $i, $_e := until $replicas }}
|
||||
<replica>
|
||||
<host>{{ printf "%s-shard%d-%d.%s.%s.svc.%s" (include "common.names.fullname" $ ) $shard $i (include "clickhouse.headlessServiceName" $) (include "common.names.namespace" $) $.Values.clusterDomain }}</host>
|
||||
<port>{{ $.Values.service.ports.tcp }}</port>
|
||||
</replica>
|
||||
{{- end }}
|
||||
</shard>
|
||||
{{- end }}
|
||||
</default>
|
||||
</remote_servers>
|
||||
{{- end }}
|
||||
{{- if or .Values.zookeeper.enabled .Values.externalZookeeper.servers }}
|
||||
<!-- Zookeeper configuration -->
|
||||
<zookeeper>
|
||||
{{- if .Values.zookeeper.enabled }}
|
||||
{{/* Zookeeper configuration using the helm chart */}}
|
||||
{{- $nodes := .Values.zookeeper.replicaCount | int }}
|
||||
{{- range $node, $e := until $nodes }}
|
||||
<node>
|
||||
<host>{{ printf "%s-%d.%s.%s.svc.%s" (include "clickhouse.zookeeper.fullname" $ ) $node (include "clickhouse.zookeeper.headlessServiceName" $) (include "common.names.namespace" $) $.Values.clusterDomain }}</host>
|
||||
<port>{{ $.Values.zookeeper.service.ports.client }}</port>
|
||||
</node>
|
||||
{{- end }}
|
||||
{{- else if .Values.externalZookeeper.servers }}
|
||||
{{/* Zookeeper configuration using an external instance */}}
|
||||
{{- range $node :=.Values.externalZookeeper.servers }}
|
||||
<node>
|
||||
<host>{{ $node }}</host>
|
||||
<port>{{ $.Values.externalZookeeper.port }}</port>
|
||||
</node>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
</zookeeper>
|
||||
{{- end }}
|
||||
{{- if .Values.tls.enabled }}
|
||||
<!-- TLS configuration -->
|
||||
<tcp_port_secure from_env="CLICKHOUSE_TCP_SECURE_PORT"></tcp_port_secure>
|
||||
<openSSL>
|
||||
<server>
|
||||
{{- $certFileName := default "tls.crt" .Values.tls.certFilename }}
|
||||
{{- $keyFileName := default "tls.key" .Values.tls.certKeyFilename }}
|
||||
<certificateFile>/bitnami/clickhouse/certs/{{$certFileName}}</certificateFile>
|
||||
<privateKeyFile>/bitnami/clickhouse/certs/{{$keyFileName}}</privateKeyFile>
|
||||
<verificationMode>none</verificationMode>
|
||||
<cacheSessions>true</cacheSessions>
|
||||
<disableProtocols>sslv2,sslv3</disableProtocols>
|
||||
<preferServerCiphers>true</preferServerCiphers>
|
||||
{{- if or .Values.tls.autoGenerated .Values.tls.certCAFilename }}
|
||||
{{- $caFileName := default "ca.crt" .Values.tls.certFilename }}
|
||||
<caConfig>/bitnami/clickhouse/certs/{{$caFileName}}</caConfig>
|
||||
{{- else }}
|
||||
<loadDefaultCAFile>true</loadDefaultCAFile>
|
||||
{{- end }}
|
||||
</server>
|
||||
<client>
|
||||
<loadDefaultCAFile>true</loadDefaultCAFile>
|
||||
<cacheSessions>true</cacheSessions>
|
||||
<disableProtocols>sslv2,sslv3</disableProtocols>
|
||||
<preferServerCiphers>true</preferServerCiphers>
|
||||
<verificationMode>none</verificationMode>
|
||||
<invalidCertificateHandler>
|
||||
<name>AcceptCertificateHandler</name>
|
||||
</invalidCertificateHandler>
|
||||
</client>
|
||||
</openSSL>
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.enabled }}
|
||||
<!-- Prometheus metrics -->
|
||||
<prometheus>
|
||||
<endpoint>/metrics</endpoint>
|
||||
<port from_env="CLICKHOUSE_METRICS_PORT"></port>
|
||||
<metrics>true</metrics>
|
||||
<events>true</events>
|
||||
<asynchronous_metrics>true</asynchronous_metrics>
|
||||
</prometheus>
|
||||
{{- end }}
|
||||
</clickhouse>
|
||||
|
||||
## @param existingOverridesConfigmap The name of an existing ConfigMap with your custom configuration for ClickHouse
|
||||
##
|
||||
existingOverridesConfigmap: ""
|
||||
|
||||
## @param extraOverrides Extra configuration overrides (evaluated as a template) apart from the default
|
||||
##
|
||||
extraOverrides: ""
|
||||
|
||||
## @param extraOverridesConfigmap The name of an existing ConfigMap with extra configuration for ClickHouse
|
||||
##
|
||||
extraOverridesConfigmap: ""
|
||||
|
||||
## @param extraOverridesSecret The name of an existing ConfigMap with your custom configuration for ClickHouse
|
||||
##
|
||||
extraOverridesSecret: ""
|
||||
|
||||
## @param initdbScripts Dictionary of initdb scripts
|
||||
## Specify dictionary of scripts to be run at first boot
|
||||
## Example:
|
||||
## initdbScripts:
|
||||
## my_init_script.sh: |
|
||||
## #!/bin/bash
|
||||
## echo "Do something."
|
||||
##
|
||||
initdbScripts: {}
|
||||
## @param initdbScriptsSecret ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`)
|
||||
##
|
||||
initdbScriptsSecret: ""
|
||||
|
||||
## @param startdbScripts Dictionary of startdb scripts
|
||||
## Specify dictionary of scripts to be run on every start
|
||||
## Example:
|
||||
## startdbScripts:
|
||||
## my_start_script.sh: |
|
||||
## #!/bin/bash
|
||||
## echo "Do something."
|
||||
##
|
||||
startdbScripts: {}
|
||||
## @param startdbScriptsSecret ConfigMap with the startdb scripts (Note: Overrides `startdbScripts`)
|
||||
##
|
||||
startdbScriptsSecret: ""
|
||||
|
||||
## @param command Override default container command (useful when using custom images)
|
||||
##
|
||||
command: []
|
||||
## @param args Override default container args (useful when using custom images)
|
||||
##
|
||||
args: []
|
||||
## @param hostAliases ClickHouse pods host aliases
|
||||
## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
|
||||
##
|
||||
hostAliases: []
|
||||
## @param podLabels Extra labels for ClickHouse pods
|
||||
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
|
||||
##
|
||||
podLabels: {}
|
||||
## @param podAnnotations Annotations for ClickHouse pods
|
||||
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
|
||||
##
|
||||
podAnnotations: {}
|
||||
## @param podAffinityPreset Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard`
|
||||
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
|
||||
##
|
||||
podAffinityPreset: ""
|
||||
## @param podAntiAffinityPreset Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard`
|
||||
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
|
||||
##
|
||||
podAntiAffinityPreset: soft
|
||||
## Node affinity preset
|
||||
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
|
||||
##
|
||||
nodeAffinityPreset:
|
||||
## @param nodeAffinityPreset.type Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard`
|
||||
##
|
||||
type: ""
|
||||
## @param nodeAffinityPreset.key Node label key to match. Ignored if `affinity` is set
|
||||
##
|
||||
key: ""
|
||||
## @param nodeAffinityPreset.values Node label values to match. Ignored if `affinity` is set
|
||||
## E.g.
|
||||
## values:
|
||||
## - e2e-az1
|
||||
## - e2e-az2
|
||||
##
|
||||
values: []
|
||||
## @param affinity Affinity for ClickHouse pods assignment
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
## NOTE: `podAffinityPreset`, `podAntiAffinityPreset`, and `nodeAffinityPreset` will be ignored when it's set
|
||||
##
|
||||
affinity: {}
|
||||
## @param nodeSelector Node labels for ClickHouse pods assignment
|
||||
## ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
##
|
||||
nodeSelector: {}
|
||||
## @param tolerations Tolerations for ClickHouse pods assignment
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
|
||||
##
|
||||
tolerations: []
|
||||
## @param updateStrategy.type ClickHouse statefulset strategy type
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
|
||||
##
|
||||
updateStrategy:
|
||||
## StrategyType
|
||||
## Can be set to RollingUpdate or OnDelete
|
||||
##
|
||||
type: RollingUpdate
|
||||
|
||||
## @param podManagementPolicy Statefulset Pod management policy, it needs to be Parallel to be able to complete the cluster join
|
||||
## Ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies
|
||||
##
|
||||
podManagementPolicy: Parallel
|
||||
|
||||
## @param priorityClassName ClickHouse pods' priorityClassName
|
||||
##
|
||||
priorityClassName: ""
|
||||
## @param topologySpreadConstraints Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template
|
||||
## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/#spread-constraints-for-pods
|
||||
##
|
||||
topologySpreadConstraints: []
|
||||
## @param schedulerName Name of the k8s scheduler (other than default) for ClickHouse pods
|
||||
## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
|
||||
##
|
||||
schedulerName: ""
|
||||
## @param terminationGracePeriodSeconds Seconds Redmine pod needs to terminate gracefully
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods
|
||||
##
|
||||
terminationGracePeriodSeconds: ""
|
||||
## @param lifecycleHooks for the ClickHouse container(s) to automate configuration before or after startup
|
||||
##
|
||||
lifecycleHooks: {}
|
||||
## @param extraEnvVars Array with extra environment variables to add to ClickHouse nodes
|
||||
## e.g:
|
||||
## extraEnvVars:
|
||||
## - name: FOO
|
||||
## value: "bar"
|
||||
##
|
||||
extraEnvVars: []
|
||||
## @param extraEnvVarsCM Name of existing ConfigMap containing extra env vars for ClickHouse nodes
|
||||
##
|
||||
extraEnvVarsCM: ""
|
||||
## @param extraEnvVarsSecret Name of existing Secret containing extra env vars for ClickHouse nodes
|
||||
##
|
||||
extraEnvVarsSecret: ""
|
||||
## @param extraVolumes Optionally specify extra list of additional volumes for the ClickHouse pod(s)
|
||||
##
|
||||
extraVolumes: []
|
||||
## @param extraVolumeMounts Optionally specify extra list of additional volumeMounts for the ClickHouse container(s)
|
||||
##
|
||||
extraVolumeMounts: []
|
||||
## @param sidecars Add additional sidecar containers to the ClickHouse pod(s)
|
||||
## e.g:
|
||||
## sidecars:
|
||||
## - name: your-image-name
|
||||
## image: your-image
|
||||
## imagePullPolicy: Always
|
||||
## ports:
|
||||
## - name: portname
|
||||
## containerPort: 1234
|
||||
##
|
||||
sidecars: []
|
||||
## @param initContainers Add additional init containers to the ClickHouse pod(s)
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
|
||||
## e.g:
|
||||
## initContainers:
|
||||
## - name: your-image-name
|
||||
## image: your-image
|
||||
## imagePullPolicy: Always
|
||||
## command: ['sh', '-c', 'echo "hello world"']
|
||||
##
|
||||
initContainers: []
|
||||
|
||||
## TLS configuration
|
||||
##
|
||||
tls:
|
||||
## @param tls.enabled Enable TLS traffic support
|
||||
##
|
||||
enabled: false
|
||||
## @param tls.autoGenerated Generate automatically self-signed TLS certificates
|
||||
##
|
||||
autoGenerated: false
|
||||
## @param tls.certificatesSecret Name of an existing secret that contains the certificates
|
||||
##
|
||||
certificatesSecret: ""
|
||||
## @param tls.certFilename Certificate filename
|
||||
##
|
||||
certFilename: ""
|
||||
## @param tls.certKeyFilename Certificate key filename
|
||||
##
|
||||
certKeyFilename: ""
|
||||
## @param tls.certCAFilename CA Certificate filename
|
||||
## If provided, PostgreSQL will authenticate TLS/SSL clients by requesting them a certificate
|
||||
## ref: https://www.postgresql.org/docs/9.6/auth-methods.html
|
||||
##
|
||||
certCAFilename: ""
|
||||
|
||||
## @section Traffic Exposure Parameters
|
||||
##
|
||||
|
||||
## ClickHouse service parameters
|
||||
##
|
||||
service:
|
||||
## @param service.type ClickHouse service type
|
||||
##
|
||||
type: ClusterIP
|
||||
## @param service.ports.http ClickHouse service HTTP port
|
||||
## @param service.ports.tcp ClickHouse service TCP port
|
||||
## @param service.ports.tcpSecure ClickHouse service TCP (secure) port
|
||||
## @param service.ports.mysql ClickHouse service MySQL port
|
||||
## @param service.ports.postgresql ClickHouse service PostgreSQL port
|
||||
## @param service.ports.interserver ClickHouse service Interserver port
|
||||
## @param service.ports.metrics ClickHouse service metrics port
|
||||
##
|
||||
ports:
|
||||
http: 8123
|
||||
tcp: 9000
|
||||
tcpSecure: 9440
|
||||
mysql: 9004
|
||||
postgresql: 9005
|
||||
interserver: 9009
|
||||
metrics: 8001
|
||||
## Node ports to expose
|
||||
## @param service.nodePorts.http Node port for HTTP
|
||||
## @param service.nodePorts.tcp Node port for TCP
|
||||
## @param service.nodePorts.tcpSecure Node port for TCP (with TLS)
|
||||
## @param service.nodePorts.mysql Node port for MySQL
|
||||
## @param service.nodePorts.postgresql Node port for PostgreSQL
|
||||
## @param service.nodePorts.interserver Node port for Interserver
|
||||
## @param service.nodePorts.metrics Node port for metrics
|
||||
## NOTE: choose port between <30000-32767>
|
||||
##
|
||||
nodePorts:
|
||||
http: ""
|
||||
tcp: ""
|
||||
tcpSecure: ""
|
||||
mysql: ""
|
||||
postgresql: ""
|
||||
interserver: ""
|
||||
metrics: ""
|
||||
## @param service.clusterIP ClickHouse service Cluster IP
|
||||
## e.g.:
|
||||
## clusterIP: None
|
||||
##
|
||||
clusterIP: ""
|
||||
## @param service.loadBalancerIP ClickHouse service Load Balancer IP
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-loadbalancer
|
||||
##
|
||||
loadBalancerIP: ""
|
||||
## @param service.loadBalancerSourceRanges ClickHouse service Load Balancer sources
|
||||
## ref: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
|
||||
## e.g:
|
||||
## loadBalancerSourceRanges:
|
||||
## - 10.10.10.0/24
|
||||
##
|
||||
loadBalancerSourceRanges: []
|
||||
## @param service.externalTrafficPolicy ClickHouse service external traffic policy
|
||||
## ref http://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip
|
||||
##
|
||||
externalTrafficPolicy: Cluster
|
||||
## @param service.annotations Additional custom annotations for ClickHouse service
|
||||
##
|
||||
annotations: {}
|
||||
## @param service.extraPorts Extra ports to expose in ClickHouse service (normally used with the `sidecars` value)
|
||||
##
|
||||
extraPorts: []
|
||||
## @param service.sessionAffinity Control where client requests go, to the same pod or round-robin
|
||||
## Values: ClientIP or None
|
||||
## ref: https://kubernetes.io/docs/user-guide/services/
|
||||
##
|
||||
sessionAffinity: None
|
||||
## @param service.sessionAffinityConfig Additional settings for the sessionAffinity
|
||||
## sessionAffinityConfig:
|
||||
## clientIP:
|
||||
## timeoutSeconds: 300
|
||||
##
|
||||
sessionAffinityConfig: {}
|
||||
|
||||
## External Access to ClickHouse configuration
|
||||
##
|
||||
externalAccess:
|
||||
## @param externalAccess.enabled Enable Kubernetes external cluster access to ClickHouse
|
||||
##
|
||||
enabled: false
|
||||
## Parameters to configure K8s service(s) used to externally access ClickHouse
|
||||
## Note: A new service per will be created
|
||||
##
|
||||
service:
|
||||
## @param externalAccess.service.type Kubernetes Service type for external access. It can be NodePort, LoadBalancer or ClusterIP
|
||||
##
|
||||
type: LoadBalancer
|
||||
## @param externalAccess.service.ports.http ClickHouse service HTTP port
|
||||
## @param externalAccess.service.ports.tcp ClickHouse service TCP port
|
||||
## @param externalAccess.service.ports.tcpSecure ClickHouse service TCP (secure) port
|
||||
## @param externalAccess.service.ports.mysql ClickHouse service MySQL port
|
||||
## @param externalAccess.service.ports.postgresql ClickHouse service PostgreSQL port
|
||||
## @param externalAccess.service.ports.interserver ClickHouse service Interserver port
|
||||
## @param externalAccess.service.ports.metrics ClickHouse service metrics port
|
||||
##
|
||||
ports:
|
||||
http: 80
|
||||
tcp: 9000
|
||||
tcpSecure: 9440
|
||||
mysql: 9004
|
||||
postgresql: 9005
|
||||
interserver: 9009
|
||||
metrics: 8001
|
||||
## @param externalAccess.service.loadBalancerIPs Array of load balancer IPs for each ClickHouse . Length must be the same as replicaCount
|
||||
## e.g:
|
||||
## loadBalancerIPs:
|
||||
## - X.X.X.X
|
||||
## - Y.Y.Y.Y
|
||||
##
|
||||
loadBalancerIPs: []
|
||||
## @param externalAccess.service.loadBalancerAnnotations Array of load balancer annotations for each ClickHouse . Length must be the same as replicaCount
|
||||
## e.g:
|
||||
## loadBalancerAnnotations:
|
||||
## - external-dns.alpha.kubernetes.io/hostname: 1.external.example.com.
|
||||
## - external-dns.alpha.kubernetes.io/hostname: 2.external.example.com.
|
||||
##
|
||||
loadBalancerAnnotations: []
|
||||
## @param externalAccess.service.loadBalancerSourceRanges Address(es) that are allowed when service is LoadBalancer
|
||||
## ref: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
|
||||
## e.g:
|
||||
## loadBalancerSourceRanges:
|
||||
## - 10.10.10.0/24
|
||||
##
|
||||
loadBalancerSourceRanges: []
|
||||
## @param externalAccess.service.nodePorts.http Node port for HTTP
|
||||
## @param externalAccess.service.nodePorts.tcp Node port for TCP
|
||||
## @param externalAccess.service.nodePorts.tcpSecure Node port for TCP (with TLS)
|
||||
## @param externalAccess.service.nodePorts.mysql Node port for MySQL
|
||||
## @param externalAccess.service.nodePorts.postgresql Node port for PostgreSQL
|
||||
## @param externalAccess.service.nodePorts.interserver Node port for Interserver
|
||||
## @param externalAccess.service.nodePorts.metrics Node port for metrics
|
||||
## NOTE: choose port between <30000-32767>
|
||||
## e.g:
|
||||
## nodePorts:
|
||||
## tls:
|
||||
## - 30001
|
||||
## - 30002
|
||||
##
|
||||
nodePorts:
|
||||
http: []
|
||||
tcp: []
|
||||
tcpSecure: []
|
||||
mysql: []
|
||||
postgresql: []
|
||||
interserver: []
|
||||
metrics: []
|
||||
## @param externalAccess.service.labels Service labels for external access
|
||||
##
|
||||
labels: {}
|
||||
## @param externalAccess.service.annotations Service annotations for external access
|
||||
##
|
||||
annotations: {}
|
||||
## @param externalAccess.service.extraPorts Extra ports to expose in the ClickHouse external service
|
||||
##
|
||||
extraPorts: []
|
||||
|
||||
## ClickHouse ingress parameters
|
||||
## ref: http://kubernetes.io/docs/user-guide/ingress/
|
||||
##
|
||||
ingress:
|
||||
## @param ingress.enabled Enable ingress record generation for ClickHouse
|
||||
##
|
||||
enabled: false
|
||||
## @param ingress.pathType Ingress path type
|
||||
##
|
||||
pathType: ImplementationSpecific
|
||||
## @param ingress.apiVersion Force Ingress API version (automatically detected if not set)
|
||||
##
|
||||
apiVersion: ""
|
||||
## @param ingress.hostname Default host for the ingress record
|
||||
##
|
||||
hostname: clickhouse.local
|
||||
## @param ingress.ingressClassName IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+)
|
||||
## This is supported in Kubernetes 1.18+ and required if you have more than one IngressClass marked as the default for your cluster .
|
||||
## ref: https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/
|
||||
##
|
||||
ingressClassName: ""
|
||||
## @param ingress.path Default path for the ingress record
|
||||
## NOTE: You may need to set this to '/*' in order to use this with ALB ingress controllers
|
||||
##
|
||||
path: /
|
||||
## @param ingress.annotations Additional annotations for the Ingress resource. To enable certificate autogeneration, place here your cert-manager annotations.
|
||||
## Use this parameter to set the required annotations for cert-manager, see
|
||||
## ref: https://cert-manager.io/docs/usage/ingress/#supported-annotations
|
||||
## e.g:
|
||||
## annotations:
|
||||
## kubernetes.io/ingress.class: nginx
|
||||
## cert-manager.io/cluster-issuer: cluster-issuer-name
|
||||
##
|
||||
annotations: {}
|
||||
## @param ingress.tls Enable TLS configuration for the host defined at `ingress.hostname` parameter
|
||||
## TLS certificates will be retrieved from a TLS secret with name: `{{- printf "%s-tls" .Values.ingress.hostname }}`
|
||||
## You can:
|
||||
## - Use the `ingress.secrets` parameter to create this TLS secret
|
||||
## - Rely on cert-manager to create it by setting the corresponding annotations
|
||||
## - Rely on Helm to create self-signed certificates by setting `ingress.selfSigned=true`
|
||||
##
|
||||
tls: false
|
||||
## @param ingress.selfSigned Create a TLS secret for this ingress record using self-signed certificates generated by Helm
|
||||
##
|
||||
selfSigned: false
|
||||
## @param ingress.extraHosts An array with additional hostname(s) to be covered with the ingress record
|
||||
## e.g:
|
||||
## extraHosts:
|
||||
## - name: clickhouse.local
|
||||
## path: /
|
||||
##
|
||||
extraHosts: []
|
||||
## @param ingress.extraPaths An array with additional arbitrary paths that may need to be added to the ingress under the main host
|
||||
## e.g:
|
||||
## extraPaths:
|
||||
## - path: /*
|
||||
## backend:
|
||||
## serviceName: ssl-redirect
|
||||
## servicePort: use-annotation
|
||||
##
|
||||
extraPaths: []
|
||||
## @param ingress.extraTls TLS configuration for additional hostname(s) to be covered with this ingress record
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/#tls
|
||||
## e.g:
|
||||
## extraTls:
|
||||
## - hosts:
|
||||
## - clickhouse.local
|
||||
## secretName: clickhouse.local-tls
|
||||
##
|
||||
extraTls: []
|
||||
## @param ingress.secrets Custom TLS certificates as secrets
|
||||
## NOTE: 'key' and 'certificate' are expected in PEM format
|
||||
## NOTE: 'name' should line up with a 'secretName' set further up
|
||||
## If it is not set and you're using cert-manager, this is unneeded, as it will create a secret for you with valid certificates
|
||||
## If it is not set and you're NOT using cert-manager either, self-signed certificates will be created valid for 365 days
|
||||
## It is also possible to create and manage the certificates outside of this helm chart
|
||||
## Please see README.md for more information
|
||||
## e.g:
|
||||
## secrets:
|
||||
## - name: clickhouse.local-tls
|
||||
## key: |-
|
||||
## -----BEGIN RSA PRIVATE KEY-----
|
||||
## ...
|
||||
## -----END RSA PRIVATE KEY-----
|
||||
## certificate: |-
|
||||
## -----BEGIN CERTIFICATE-----
|
||||
## ...
|
||||
## -----END CERTIFICATE-----
|
||||
##
|
||||
secrets: []
|
||||
## @param ingress.extraRules Additional rules to be covered with this ingress record
|
||||
## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-rules
|
||||
## e.g:
|
||||
## extraRules:
|
||||
## - host: example.local
|
||||
## http:
|
||||
## path: /
|
||||
## backend:
|
||||
## service:
|
||||
## name: example-svc
|
||||
## port:
|
||||
## name: http
|
||||
##
|
||||
extraRules: []
|
||||
|
||||
## @section Persistence Parameters
|
||||
##
|
||||
|
||||
## Enable persistence using Persistent Volume Claims
|
||||
## ref: https://kubernetes.io/docs/user-guide/persistent-volumes/
|
||||
##
|
||||
persistence:
|
||||
## @param persistence.enabled Enable persistence using Persistent Volume Claims
|
||||
##
|
||||
enabled: true
|
||||
## @param persistence.storageClass Storage class of backing PVC
|
||||
## If defined, storageClassName: <storageClass>
|
||||
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||
## If undefined (the default) or set to null, no storageClassName spec is
|
||||
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||
## GKE, AWS & OpenStack)
|
||||
##
|
||||
storageClass: ""
|
||||
## @param persistence.annotations Persistent Volume Claim annotations
|
||||
##
|
||||
annotations: {}
|
||||
## @param persistence.accessModes Persistent Volume Access Modes
|
||||
##
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
## @param persistence.size Size of data volume
|
||||
##
|
||||
size: 8Gi
|
||||
## @param persistence.selector Selector to match an existing Persistent Volume for WordPress data PVC
|
||||
## If set, the PVC can't have a PV dynamically provisioned for it
|
||||
## E.g.
|
||||
## selector:
|
||||
## matchLabels:
|
||||
## app: my-app
|
||||
##
|
||||
selector: {}
|
||||
## @param persistence.dataSource Custom PVC data source
|
||||
##
|
||||
dataSource: {}
|
||||
## @section Init Container Parameters
|
||||
##
|
||||
|
||||
## 'volumePermissions' init container parameters
|
||||
## Changes the owner and group of the persistent volume mount point to runAsUser:fsGroup values
|
||||
## based on the *podSecurityContext/*containerSecurityContext parameters
|
||||
##
|
||||
volumePermissions:
|
||||
## @param volumePermissions.enabled Enable init container that changes the owner/group of the PV mount point to `runAsUser:fsGroup`
|
||||
##
|
||||
enabled: false
|
||||
## Bitnami Shell image
|
||||
## ref: https://hub.docker.com/r/bitnami/bitnami-shell/tags/
|
||||
## @param volumePermissions.image.registry Bitnami Shell image registry
|
||||
## @param volumePermissions.image.repository Bitnami Shell image repository
|
||||
## @param volumePermissions.image.tag Bitnami Shell image tag (immutable tags are recommended)
|
||||
## @param volumePermissions.image.pullPolicy Bitnami Shell image pull policy
|
||||
## @param volumePermissions.image.pullSecrets Bitnami Shell image pull secrets
|
||||
##
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/bitnami-shell
|
||||
tag: 11-debian-11-r36
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
## e.g:
|
||||
## pullSecrets:
|
||||
## - myRegistryKeySecretName
|
||||
##
|
||||
pullSecrets: []
|
||||
## Init container's resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
## @param volumePermissions.resources.limits The resources limits for the init container
|
||||
## @param volumePermissions.resources.requests The requested resources for the init container
|
||||
##
|
||||
resources:
|
||||
limits: {}
|
||||
requests: {}
|
||||
## Init container Container Security Context
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
|
||||
## @param volumePermissions.containerSecurityContext.runAsUser Set init container's Security Context runAsUser
|
||||
## NOTE: when runAsUser is set to special value "auto", init container will try to chown the
|
||||
## data folder to auto-determined user&group, using commands: `id -u`:`id -G | cut -d" " -f2`
|
||||
## "auto" is especially useful for OpenShift which has scc with dynamic user ids (and 0 is not allowed)
|
||||
##
|
||||
containerSecurityContext:
|
||||
runAsUser: 0
|
||||
|
||||
## @section Other Parameters
|
||||
##
|
||||
|
||||
## ServiceAccount configuration
|
||||
##
|
||||
serviceAccount:
|
||||
## @param serviceAccount.create Specifies whether a ServiceAccount should be created
|
||||
##
|
||||
create: true
|
||||
## @param serviceAccount.name The name of the ServiceAccount to use.
|
||||
## If not set and create is true, a name is generated using the common.names.fullname template
|
||||
##
|
||||
name: ""
|
||||
## @param serviceAccount.annotations Additional Service Account annotations (evaluated as a template)
|
||||
##
|
||||
annotations: {}
|
||||
## @param serviceAccount.automountServiceAccountToken Automount service account token for the server service account
|
||||
##
|
||||
automountServiceAccountToken: true
|
||||
|
||||
## Prometheus metrics
|
||||
##
|
||||
metrics:
|
||||
## @param metrics.enabled Enable the export of Prometheus metrics
|
||||
##
|
||||
enabled: false
|
||||
## @param metrics.podAnnotations [object] Annotations for metrics scraping
|
||||
##
|
||||
podAnnotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "{{ .Values.containerPorts.metrics }}"
|
||||
## Prometheus Operator ServiceMonitor configuration
|
||||
##
|
||||
serviceMonitor:
|
||||
## @param metrics.serviceMonitor.enabled if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`)
|
||||
##
|
||||
enabled: false
|
||||
## @param metrics.serviceMonitor.namespace Namespace in which Prometheus is running
|
||||
##
|
||||
namespace: ""
|
||||
## @param metrics.serviceMonitor.annotations Additional custom annotations for the ServiceMonitor
|
||||
##
|
||||
annotations: {}
|
||||
## @param metrics.serviceMonitor.labels Extra labels for the ServiceMonitor
|
||||
##
|
||||
labels: {}
|
||||
## @param metrics.serviceMonitor.jobLabel The name of the label on the target service to use as the job name in Prometheus
|
||||
##
|
||||
jobLabel: ""
|
||||
## @param metrics.serviceMonitor.honorLabels honorLabels chooses the metric's labels on collisions with target labels
|
||||
##
|
||||
honorLabels: false
|
||||
## @param metrics.serviceMonitor.interval Interval at which metrics should be scraped.
|
||||
## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
|
||||
## e.g:
|
||||
## interval: 10s
|
||||
##
|
||||
interval: ""
|
||||
## @param metrics.serviceMonitor.scrapeTimeout Timeout after which the scrape is ended
|
||||
## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
|
||||
## e.g:
|
||||
## scrapeTimeout: 10s
|
||||
##
|
||||
scrapeTimeout: ""
|
||||
## @param metrics.serviceMonitor.metricRelabelings Specify additional relabeling of metrics
|
||||
##
|
||||
metricRelabelings: []
|
||||
## @param metrics.serviceMonitor.relabelings Specify general relabeling
|
||||
##
|
||||
relabelings: []
|
||||
## @param metrics.serviceMonitor.selector Prometheus instance selector labels
|
||||
## ref: https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-configuration
|
||||
## selector:
|
||||
## prometheus: my-prometheus
|
||||
##
|
||||
selector: {}
|
||||
|
||||
## @section External Zookeeper paramaters
|
||||
##
|
||||
externalZookeeper:
|
||||
## @param externalZookeeper.servers List of external zookeeper servers to use
|
||||
## @param externalZookeeper.port Port of the Zookeeper servers
|
||||
##
|
||||
servers: []
|
||||
port: 2888
|
||||
|
||||
## @section Zookeeper subchart parameters
|
||||
##
|
||||
## @param zookeeper.enabled Deploy Zookeeper subchart
|
||||
## @param zookeeper.replicaCount Number of Zookeeper instances
|
||||
## @param zookeeper.service.ports.client Zookeeper client port
|
||||
##
|
||||
zookeeper:
|
||||
enabled: true
|
||||
replicaCount: 2
|
||||
service:
|
||||
ports:
|
||||
client: 2181
|
||||
Reference in New Issue
Block a user