2021-12-11 11:08:25 +05:30
|
|
|
{{ if (eq (.Values.cloud | toString) "gcp" )}}
|
|
|
|
|
apiVersion: storage.k8s.io/v1
|
|
|
|
|
kind: StorageClass
|
|
|
|
|
metadata:
|
|
|
|
|
name: gce-resizable
|
|
|
|
|
provisioner: kubernetes.io/gce-pd
|
|
|
|
|
parameters:
|
|
|
|
|
type: pd-standard
|
|
|
|
|
fstype: ext4
|
|
|
|
|
replication-type: none
|
|
|
|
|
reclaimPolicy: Retain
|
|
|
|
|
#volumeBindingMode: Immediate
|
|
|
|
|
allowVolumeExpansion: true
|
2021-12-24 13:25:55 +07:00
|
|
|
---
|
2021-12-11 11:08:25 +05:30
|
|
|
{{- else if (eq (.Values.cloud | toString) "aws") }}
|
|
|
|
|
#
|
|
|
|
|
# AWS resizable disk example
|
|
|
|
|
#
|
|
|
|
|
apiVersion: storage.k8s.io/v1
|
|
|
|
|
kind: StorageClass
|
|
|
|
|
metadata:
|
|
|
|
|
name: gp2-resizable
|
|
|
|
|
provisioner: kubernetes.io/aws-ebs
|
|
|
|
|
parameters:
|
|
|
|
|
type: gp2
|
|
|
|
|
reclaimPolicy: Retain
|
|
|
|
|
#volumeBindingMode: Immediate
|
|
|
|
|
allowVolumeExpansion: true
|
|
|
|
|
---
|
2021-12-24 13:25:55 +07:00
|
|
|
{{- end }}
|
2021-12-11 11:08:25 +05:30
|
|
|
apiVersion: "clickhouse.altinity.com/v1"
|
|
|
|
|
kind: "ClickHouseInstallation"
|
|
|
|
|
metadata:
|
|
|
|
|
name: signoz
|
|
|
|
|
spec:
|
|
|
|
|
defaults:
|
|
|
|
|
templates:
|
|
|
|
|
dataVolumeClaimTemplate: default-volume-claim
|
|
|
|
|
# logVolumeClaimTemplate: default-volume-claim
|
|
|
|
|
serviceTemplate: chi-service-template
|
|
|
|
|
configuration:
|
|
|
|
|
zookeeper:
|
|
|
|
|
nodes:
|
|
|
|
|
- host: signoz-zookeeper
|
|
|
|
|
port: 2181
|
|
|
|
|
session_timeout_ms: 6000
|
|
|
|
|
clusters:
|
|
|
|
|
- name: cluster
|
|
|
|
|
# Templates are specified for this cluster explicitly
|
|
|
|
|
templates:
|
|
|
|
|
dataVolumeClaimTemplate: default-volume-claim
|
|
|
|
|
# logVolumeClaimTemplate: default-volume-claim
|
|
|
|
|
podTemplate: pod-template-with-volume
|
|
|
|
|
layout:
|
|
|
|
|
shardsCount: 1
|
|
|
|
|
replicasCount: 1
|
|
|
|
|
templates:
|
|
|
|
|
hostTemplates:
|
|
|
|
|
- name: port-distribution
|
|
|
|
|
portDistribution:
|
|
|
|
|
- type: ClusterScopeIndex
|
|
|
|
|
spec:
|
|
|
|
|
tcpPort: 9000
|
|
|
|
|
httpPort: 8123
|
|
|
|
|
interserverHTTPPort: 9009
|
|
|
|
|
|
|
|
|
|
podTemplates:
|
|
|
|
|
- name: pod-template-with-volume
|
|
|
|
|
spec:
|
|
|
|
|
containers:
|
|
|
|
|
- name: clickhouse
|
|
|
|
|
image: yandex/clickhouse-server:21.7
|
|
|
|
|
volumeMounts:
|
|
|
|
|
- name: default-volume-claim
|
|
|
|
|
mountPath: /var/lib/clickhouse
|
|
|
|
|
- name: initdb
|
|
|
|
|
mountPath: /docker-entrypoint-initdb.d
|
|
|
|
|
volumes:
|
|
|
|
|
- name: initdb
|
|
|
|
|
configMap:
|
|
|
|
|
name: initdb-config
|
|
|
|
|
serviceTemplates:
|
|
|
|
|
- name: chi-service-template
|
|
|
|
|
generateName: signoz-clickhouse
|
|
|
|
|
spec:
|
|
|
|
|
ports:
|
|
|
|
|
- name: http
|
|
|
|
|
port: 8123
|
|
|
|
|
- name: tcp
|
|
|
|
|
port: 9000
|
|
|
|
|
type: {{ .Values.clickhouseOperator.serviceType }}
|
|
|
|
|
volumeClaimTemplates:
|
|
|
|
|
- name: default-volume-claim
|
|
|
|
|
reclaimPolicy: Retain
|
|
|
|
|
spec:
|
|
|
|
|
{{- if (eq (.Values.cloud | toString) "gcp" )}}
|
|
|
|
|
storageClassName: gce-resizable
|
|
|
|
|
{{- else if (eq (.Values.cloud | toString) "aws") }}
|
|
|
|
|
storageClassName: gp2-resizable
|
2021-12-24 13:25:55 +07:00
|
|
|
{{- else if (eq (.Values.cloud | toString) "hcloud") }}
|
|
|
|
|
storageClassName: hcloud-volumes
|
2021-12-11 11:08:25 +05:30
|
|
|
{{- end }}
|
|
|
|
|
accessModes:
|
|
|
|
|
- ReadWriteOnce
|
|
|
|
|
resources:
|
|
|
|
|
requests:
|
|
|
|
|
storage: {{ .Values.clickhouseOperator.storage | quote }}
|