├── .gitignore
├── .travis.yml
├── CNAME
├── README.md
├── charts
├── coredns-forwarder
│ ├── .helmignore
│ ├── Chart.yaml
│ ├── README.md
│ ├── templates
│ │ ├── _helpers.tpl
│ │ └── configmap.yaml
│ └── values.yaml
├── elassandra-datacenter
│ ├── .helmignore
│ ├── Chart.yaml
│ ├── README.md
│ ├── templates
│ │ ├── _helpers.tpl
│ │ ├── app-role-binding.yaml
│ │ ├── app-role.yaml
│ │ ├── app-serviceaccount.yaml
│ │ ├── clusterrole.yaml
│ │ ├── clusterrolebinding.yaml
│ │ ├── elassandraconfigmap.yaml
│ │ ├── elassandradatacenter.yaml
│ │ └── nodeinfo.yaml
│ └── values.yaml
├── elassandra-operator
│ ├── .helmignore
│ ├── Chart.yaml
│ ├── README.md
│ ├── templates
│ │ ├── NOTES.txt
│ │ ├── _helpers.tpl
│ │ ├── clusterrole.yaml
│ │ ├── clusterrolebinding.yaml
│ │ ├── deployment.yaml
│ │ ├── ingress-seeds.yaml
│ │ ├── service.yaml
│ │ ├── serviceaccount.yaml
│ │ ├── tls-secret.yaml
│ │ └── validatingwebhookconfiguration.yaml
│ └── values.yaml
├── elassandra
│ ├── .helmignore
│ ├── Chart.yaml
│ ├── OWNERS
│ ├── README.md
│ ├── sample
│ │ └── create-storage-gce.yaml
│ ├── templates
│ │ ├── NOTES.txt
│ │ ├── _helpers.tpl
│ │ ├── configmap-configs.yaml
│ │ ├── configmap-scripts.yaml
│ │ ├── service-cassandra.yaml
│ │ ├── service-elasticsearch.yaml
│ │ ├── service.yaml
│ │ └── statefulset.yaml
│ └── values.yaml
├── fluent-bit
│ ├── Chart.yaml
│ ├── README.md
│ ├── templates
│ │ ├── NOTES.txt
│ │ ├── _helpers.tpl
│ │ ├── cluster-role.yaml
│ │ ├── cluster-rolebinding.yaml
│ │ ├── config.yaml
│ │ ├── daemonset.yaml
│ │ ├── elassandra-pipeline.yaml
│ │ ├── elassandra-template.yaml
│ │ ├── secret.yaml
│ │ ├── service.yaml
│ │ └── serviceaccount.yaml
│ └── values.yaml
└── storageclass
│ ├── .helmignore
│ ├── Chart.yaml
│ ├── README.md
│ ├── templates
│ ├── _helpers.tpl
│ └── storageclass.yaml
│ └── values.yaml
└── strapdata-logolong.png
/.gitignore:
--------------------------------------------------------------------------------
1 | # General files for the project
2 | pkg/*
3 | *.pyc
4 | bin/*
5 | .project
6 | /.bin
7 | /_test/secrets/*.json
8 |
9 | # OSX leaves these everywhere on SMB shares
10 | ._*
11 |
12 | # OSX trash
13 | .DS_Store
14 |
15 | # Files generated by JetBrains IDEs, e.g. IntelliJ IDEA
16 | .idea/
17 | *.iml
18 |
19 | # Vscode files
20 | .vscode
21 |
22 | # Emacs save files
23 | *~
24 | \#*\#
25 | .\#*
26 |
27 | # Vim-related files
28 | [._]*.s[a-w][a-z]
29 | [._]s[a-w][a-z]
30 | *.un~
31 | Session.vim
32 | .netrwhist
33 |
34 | # Chart dependencies
35 | **/charts/*.tgz
36 |
37 | .history
38 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | env:
2 | global:
3 | - HELM_URL=https://get.helm.sh
4 | - HELM_TGZ=helm-v2.14.3-linux-amd64.tar.gz
5 | - GH_URL=https://strapdata.github.io/helm-charts
6 | - secure: "W5/Qtf/yMIJDefUj5h94ev/+qpUKLdkfR2MdYCwGaITN9Kt3mb4sStbdjIllIoYF2K09yUXWXGzFQU66RcK09y6fm0Iu3GTJV8wDft/CR7QtCe8reoGt6GXufqce8+GljRg771G/NN1lD9Lhd5RsfR9LIR+QVIirlBiPOVfhSklXVKxaj4xeL9uQzBrSSlN6UUeDWE+vPFjB+ictxxZ5ElkK0G+I5YRK2qQuPiHynmE2H5JyuXDU73WKstDcAGT3n5o9mFyVGg3361j4LglvBOMowUFL/0daBrEsMkeYyjUPbCO3XVzNn5q0dgKPcVfbCdStyERo/9s+5KQHXfgtf5+3MClENEP/NWREM3SxH9n763bNiQEpbX/XVDOI0e88GGnKZ2cmVxeRXjfxCA42qTEibhIXAYMUIZ4jghXXXOcDH9dFsR2xou9JAC4rZ0sp9ze10YhB7+RDLKPsO64Q6CJHm1WbLG1Mwo/0fopRKlUhsz6KVZXj3QM7cM6Brk/1hlvNJcmIzQ3JPZJktCLVkqkqgBKke4/SrMsTWK0apmO0uKnsCZX6csEcN9NYpJOGPhgbGTkkjkNSSS4IirhS8wKTtIwjWhlkyBe/C9pXxZ/N/dRIeqz7XreW4yFAzBCWxVCXIjrGPgNJipcFDrM6JoYwvB1oyAmZy9BIhxIFImc="
7 |
8 | before_script:
9 | - wget -q ${HELM_URL}/${HELM_TGZ}
10 | - tar xzfv ${HELM_TGZ}
11 | - export PATH=`pwd`/linux-amd64/:$PATH
12 | - helm init --client-only
13 | script:
14 | - git clone -b gh-pages https://github.com/strapdata/helm-charts.git build
15 | - |
16 | for dir in ${TRAVIS_BUILD_DIR}/charts/*; do
17 | helm dep update $dir
18 | helm lint $dir
19 | helm package -d ${TRAVIS_BUILD_DIR}/build $dir
20 | done
21 | - helm repo index --url ${GH_URL} ${TRAVIS_BUILD_DIR}/build
22 | deploy:
23 | provider: pages
24 | local-dir: build
25 | skip-cleanup: true
26 | keep-history: true
27 | github-token: "$GITHUB_TOKEN"
28 | committer-from-gh: true
29 | on:
30 | branch: master
31 |
--------------------------------------------------------------------------------
/CNAME:
--------------------------------------------------------------------------------
1 | charts.strapdata.com
2 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Strapdata HELM Charts [](https://travis-ci.org/strapdata/helm-charts)
2 |
3 | [](http://www.strapdata.io)
4 |
5 | ## Usage
6 |
7 | Add this HELM repository
8 |
9 | helm repo add strapdata https://charts.strapdata.com
10 |
11 | Update this HELM repository
12 |
13 | helm repo update
14 |
15 | ## Install charts
16 |
17 | Install Elassandra from this HELM repository:
18 |
19 | helm install --namespace "defaut" --set image.repo=strapdata/elassandra --set image.tag=6.2.3.11 strapdata/elassandra
20 |
21 | Install Fluentbit with an Elasticsearch pipeline + template for an optimized storage with Elassandra
22 |
23 | ```bash
24 | helm install --name my-fluentbit --set trackOffsets="true",\
25 | backend.type="es",backend.es.host="elassandra-elasticsearch.default.svc.cluster.local",backend.es.time_key="es_time",backend.es.pipeline="fluentbit",\
26 | parsers.enabled=true,parsers.json[0].name="docker",parsers.json[0].timeKey="time",parsers.json[0].timeFormat="%Y-%m-%dT%H:%M:%S.%L",parsers.json[0].timeKeep="Off" ./stable/fluent-bit
27 | ```
28 |
--------------------------------------------------------------------------------
/charts/coredns-forwarder/.helmignore:
--------------------------------------------------------------------------------
1 | # Patterns to ignore when building packages.
2 | # This supports shell glob matching, relative path matching, and
3 | # negation (prefixed with !). Only one pattern per line.
4 | .DS_Store
5 | # Common VCS dirs
6 | .git/
7 | .gitignore
8 | .bzr/
9 | .bzrignore
10 | .hg/
11 | .hgignore
12 | .svn/
13 | # Common backup files
14 | *.swp
15 | *.bak
16 | *.tmp
17 | *~
18 | # Various IDEs
19 | .project
20 | .idea/
21 | *.tmproj
22 |
--------------------------------------------------------------------------------
/charts/coredns-forwarder/Chart.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | appVersion: "1.0"
3 | description: A Helm chart to deploy a core-dns forwarder
4 | name: coredns-forwarder
5 | version: 0.1.0
--------------------------------------------------------------------------------
/charts/coredns-forwarder/README.md:
--------------------------------------------------------------------------------
1 | # CoreDNS Config HELM Chart
--------------------------------------------------------------------------------
/charts/coredns-forwarder/templates/_helpers.tpl:
--------------------------------------------------------------------------------
1 | {{/* vim: set filetype=mustache: */}}
2 | {{/*
3 | Expand the name of the chart.
4 | */}}
5 | {{- define "core-dns-forwarder.name" -}}
6 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
7 | {{- end -}}
8 |
9 | {{/*
10 | Create a default fully qualified app name.
11 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
12 | If release name contains chart name it will be used as a full name.
13 | */}}
14 | {{- define "core-dns-forwarder.fullname" -}}
15 | {{- if .Values.fullnameOverride -}}
16 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
17 | {{- else -}}
18 | {{- $name := default .Chart.Name .Values.nameOverride -}}
19 | {{- if contains $name .Release.Name -}}
20 | {{- .Release.Name | trunc 63 | trimSuffix "-" -}}
21 | {{- else -}}
22 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
23 | {{- end -}}
24 | {{- end -}}
25 | {{- end -}}
26 |
27 | {{/*
28 | Return the appropriate apiVersion value to use for the elassandra-operator managed k8s resources
29 | */}}
30 | {{- define "core-dns-forwarder.apiVersion" -}}
31 | {{- printf "%s" "stable.strapdata.com/v1" -}}
32 | {{- end -}}
--------------------------------------------------------------------------------
/charts/coredns-forwarder/templates/configmap.yaml:
--------------------------------------------------------------------------------
1 | {{- $root := . -}}
2 | apiVersion: v1
3 | kind: ConfigMap
4 | metadata:
5 | name: coredns-custom
6 | namespace: kube-system
7 | data:
8 | hosts.override: |
9 | hosts nodes.hosts {{ .Values.nodes.domain }} {
10 | {{- range $entry := .Values.nodes.hosts }}
11 | {{ $entry.value }} {{ $entry.name }}.{{ $root.Values.nodes.domain }} {{ $entry.name }}
12 | {{- end }}
13 | fallthrough
14 | }
15 | dns.server: |
16 | {{ .Values.forwarders.domain }}:53 {
17 | errors
18 | cache 30
19 | forward {{ .Values.forwarders.domain }}{{ range $host := .Values.forwarders.hosts }} {{ $host }}{{ end }}
20 | }
21 |
--------------------------------------------------------------------------------
/charts/coredns-forwarder/values.yaml:
--------------------------------------------------------------------------------
1 | forwarders:
2 | domain: "test.strapkube.com"
3 | hosts: [ 40.90.4.8, 64.4.48.8, 13.107.24.8, 13.107.160.8 ]
4 |
5 | nodes:
6 | domain: "internal.strapdata.com"
7 | hosts:
8 | # - name: aks-nodepool1-37464561-0
9 | # value: 40.127.224.166
10 |
11 |
--------------------------------------------------------------------------------
/charts/elassandra-datacenter/.helmignore:
--------------------------------------------------------------------------------
1 | # Patterns to ignore when building packages.
2 | # This supports shell glob matching, relative path matching, and
3 | # negation (prefixed with !). Only one pattern per line.
4 | .DS_Store
5 | # Common VCS dirs
6 | .git/
7 | .gitignore
8 | .bzr/
9 | .bzrignore
10 | .hg/
11 | .hgignore
12 | .svn/
13 | # Common backup files
14 | *.swp
15 | *.bak
16 | *.tmp
17 | *~
18 | # Various IDEs
19 | .project
20 | .idea/
21 | *.tmproj
22 |
--------------------------------------------------------------------------------
/charts/elassandra-datacenter/Chart.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | appVersion: "1.1"
3 | description: A Helm chart for creating Elassandra datacenter using the Elassandra operator
4 | icon: https://github.com/strapdata/elassandra.io/blob/gh-pages/elassandra.svg
5 | name: elassandra-datacenter
6 | version: 0.3.0
7 | keywords:
8 | - cassandra
9 | - elasticsearch
10 | - elassandra
11 | - database
12 | - nosql
13 | - operator
14 | home: http://www.strapdata.com
15 | maintainers:
16 | - name: vroyer
17 | email: vroyer@strapdata.com
18 | - name: DBarthe
19 | email: barth@strapdata.com
20 | - name: eleleu
21 | email: eleleu@strapdata.com
--------------------------------------------------------------------------------
/charts/elassandra-datacenter/README.md:
--------------------------------------------------------------------------------
1 | # Elassandra Datacenter
2 |
3 | Elassandra Datacenter HELM chart.
--------------------------------------------------------------------------------
/charts/elassandra-datacenter/templates/_helpers.tpl:
--------------------------------------------------------------------------------
1 | {{/* vim: set filetype=mustache: */}}
2 | {{/*
3 | Expand the name of the chart.
4 | */}}
5 | {{- define "elassandra.name" -}}
6 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
7 | {{- end -}}
8 |
9 | {{/*
10 | Create a default fully qualified app name.
11 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
12 | If release name contains chart name it will be used as a full name.
13 | */}}
14 | {{- define "elassandra.fullname" -}}
15 | {{- if .Values.fullnameOverride -}}
16 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
17 | {{- else -}}
18 | {{- $name := default .Chart.Name .Values.nameOverride -}}
19 | {{- if contains $name .Release.Name -}}
20 | {{- .Release.Name | trunc 63 | trimSuffix "-" -}}
21 | {{- else -}}
22 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
23 | {{- end -}}
24 | {{- end -}}
25 | {{- end -}}
26 |
27 | {{/*
28 | Create chart name and version as used by the chart label.
29 | */}}
30 | {{- define "elassandra.chart" -}}
31 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
32 | {{- end -}}
33 |
34 | {{- define "elassandra.datacenterName" -}}
35 | {{ $length := len (split "-" .Release.Name) }}
36 | {{- if eq $length 2 -}}
37 | {{ (split "-" .Release.Name)._1 | lower }}
38 | {{- end -}}
39 | {{- if eq $length 3 -}}
40 | {{ (split "-" .Release.Name)._2 | lower }}
41 | {{- end -}}
42 | {{- end -}}
43 |
44 | {{- define "elassandra.clusterName" -}}
45 | {{ $length := len (split "-" .Release.Name) }}
46 | {{- if eq $length 2 -}}
47 | {{ (split "-" .Release.Name)._0 | lower }}
48 | {{- end -}}
49 | {{- if eq $length 3 -}}
50 | {{ (split "-" .Release.Name)._1 | lower }}
51 | {{- end -}}
52 | {{- end -}}
53 |
54 | {{- define "elassandra.resourceName" -}}
55 | elassandra-{{ template "elassandra.clusterName" . }}-{{ template "elassandra.datacenterName" . }}
56 | {{- end -}}
57 |
58 |
59 | {{- define "elassandra.serviceAccount" -}}
60 | {{ .Release.Namespace }}-{{ template "elassandra.clusterName" . }}-{{ template "elassandra.datacenterName" . }}
61 | {{- end -}}
62 |
63 | {{/*
64 | Compute the kibana version according to Elassandra image tag.
65 | * elassandra datacenter template use the .Value.elasticsearch.kibana.tag if define
66 | * otherwise, we extract the tag from the .Values.image.tag field, if the tag format
67 | doesn't match d+\.d+\.d+, the default value 6.8.4 is defined.
68 | */}}
69 | {{- define "kibana.version" -}}
70 | {{ $etag := len (regexFind "\\d+\\.\\d+\\.\\d+" .Values.image.tag ) }}
71 | {{- if eq $etag 0 -}}
72 | 6.8.4
73 | {{- else -}}
74 | {{ regexFind "\\d+\\.\\d+\\.\\d+" .Values.image.tag }}
75 | {{- end -}}
76 | {{- end -}}
--------------------------------------------------------------------------------
/charts/elassandra-datacenter/templates/app-role-binding.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.rbacEnabled }}
2 | apiVersion: rbac.authorization.k8s.io/v1beta1
3 | kind: RoleBinding
4 | metadata:
5 | labels:
6 | app: {{ template "elassandra.resourceName" . }}
7 | chart: {{ .Chart.Name }}-{{ .Chart.Version }}
8 | heritage: {{ .Release.Service }}
9 | release: {{ .Release.Name }}
10 | name: {{ template "elassandra.serviceAccount" . }}-rolebinding
11 | roleRef:
12 | apiGroup: rbac.authorization.k8s.io
13 | kind: Role
14 | name: {{ template "elassandra.serviceAccount" . }}-role
15 | subjects:
16 | - kind: ServiceAccount
17 | name: {{ template "elassandra.serviceAccount" . }}
18 | namespace: {{ .Release.Namespace }}
19 | {{- end }}
--------------------------------------------------------------------------------
/charts/elassandra-datacenter/templates/app-role.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.rbacEnabled }}
2 | apiVersion: rbac.authorization.k8s.io/v1
3 | kind: Role
4 | metadata:
5 | labels:
6 | app: {{ template "elassandra.resourceName" . }}
7 | chart: {{ .Chart.Name }}-{{ .Chart.Version }}
8 | heritage: {{ .Release.Service }}
9 | release: {{ .Release.Name }}
10 | name: {{ template "elassandra.serviceAccount" . }}-role
11 | rules:
12 | {{- end }}
13 |
--------------------------------------------------------------------------------
/charts/elassandra-datacenter/templates/app-serviceaccount.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.rbacEnabled }}
2 | apiVersion: v1
3 | kind: ServiceAccount
4 | metadata:
5 | labels:
6 | app: {{ template "elassandra.resourceName" . }}
7 | chart: {{ .Chart.Name }}-{{ .Chart.Version }}
8 | heritage: {{ .Release.Service }}
9 | release: {{ .Release.Name }}
10 | name: {{ template "elassandra.serviceAccount" . }}
11 | {{- end }}
--------------------------------------------------------------------------------
/charts/elassandra-datacenter/templates/clusterrole.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.rbacEnabled }}
2 | apiVersion: rbac.authorization.k8s.io/v1
3 | kind: ClusterRole
4 | metadata:
5 | labels:
6 | app: {{ template "elassandra.resourceName" . }}
7 | chart: {{ .Chart.Name }}-{{ .Chart.Version }}
8 | heritage: {{ .Release.Service }}
9 | release: {{ .Release.Name }}
10 | name: {{ template "elassandra.resourceName" . }}-node-reader
11 | rules:
12 | - apiGroups: [""]
13 | resources: ["nodes"]
14 | verbs: ["get", "list", "watch"]
15 | - apiGroups: [""]
16 | resources: ["pods"]
17 | verbs: ["get", "list", "watch"]
18 | - apiGroups: ["externaldns.k8s.io"]
19 | resources: ["dnsendpoints"]
20 | verbs: ["get", "create", "update"]
21 | {{- end }}
--------------------------------------------------------------------------------
/charts/elassandra-datacenter/templates/clusterrolebinding.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.rbacEnabled }}
2 | apiVersion: rbac.authorization.k8s.io/v1beta1
3 | kind: ClusterRoleBinding
4 | metadata:
5 | labels:
6 | app: {{ template "elassandra.resourceName" . }}
7 | chart: {{ .Chart.Name }}-{{ .Chart.Version }}
8 | heritage: {{ .Release.Service }}
9 | release: {{ .Release.Name }}
10 | name: {{ template "elassandra.resourceName" . }}nodeinfo
11 | roleRef:
12 | apiGroup: rbac.authorization.k8s.io
13 | kind: ClusterRole
14 | name: {{ template "elassandra.resourceName" . }}-node-reader
15 | subjects:
16 | - kind: ServiceAccount
17 | name: {{ template "elassandra.resourceName" . }}-nodeinfo
18 | namespace: {{ .Release.Namespace }}
19 | {{- end }}
--------------------------------------------------------------------------------
/charts/elassandra-datacenter/templates/elassandraconfigmap.yaml:
--------------------------------------------------------------------------------
1 | # Config files mounted in /etc/cassandra
2 | {{- if .Values.configs }}
3 | apiVersion: v1
4 | kind: ConfigMap
5 | metadata:
6 | name: {{ template "elassandra.resourceName" . }}
7 | namespace: {{ .Release.Namespace }}
8 | labels:
9 | app: {{ template "elassandra.name" . }}
10 | chart: {{ template "elassandra.chart" . }}
11 | release: {{ .Release.Name }}
12 | heritage: {{ .Release.Service }}
13 | {{- if .Values.labels }}
14 | {{ toYaml .Values.labels | indent 4 }}
15 | {{- end }}
16 | data:
17 | {{- range $key, $val := .Values.configs }}
18 | {{ $key }}: |-
19 | {{ $val | indent 4 }}
20 | {{- end }}
21 | {{- end }}
--------------------------------------------------------------------------------
/charts/elassandra-datacenter/templates/elassandradatacenter.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: elassandra.strapdata.com/v1beta1
2 | kind: ElassandraDatacenter
3 | metadata:
4 | name: {{ template "elassandra.resourceName" . }}
5 | namespace: {{ .Release.Namespace }}
6 | labels:
7 | app: "elassandra"
8 | app.kubernetes.io/managed-by: "elassandra-operator"
9 | elassandra.strapdata.com/cluster: {{ include "elassandra.clusterName" . }}
10 | elassandra.strapdata.com/datacenter: {{ include "elassandra.datacenterName" . }}
11 | chart: {{ template "elassandra.chart" . }}
12 | release: {{ .Release.Name }}
13 | heritage: {{ .Release.Service }}
14 | {{- if .Values.labels }}
15 | {{ toYaml .Values.labels | indent 4 }}
16 | {{- end }}
17 | spec:
18 | clusterName: {{ include "elassandra.clusterName" . | required "Invalid clusterName : Release name has to be clustername-dcname (in lowercase), clustername must match ([0-9a-z]+)" }}
19 | datacenterName: {{ include "elassandra.datacenterName" . | required "Invalid datacenterName : Release name has to be clustername-dcname (in lowercase), datacenterName must match ([0-9a-z]+)" }}
20 | replicas: {{ default "1" .Values.replicas }}
21 | parked: {{ default "false" .Values.parked }}
22 | autoScaleMode: {{ default "MANUAL" .Values.autoScaleMode }}
23 | nodeAffinityPolicy: {{ default "STRICT" .Values.nodeAffinityPolicy | quote }}
24 | maxPodUnavailable: {{ default 1 .Values.maxPodUnavailable }}
25 | {{- if .Values.webHookUrl }}
26 | webHookUrl: {{ .Values.webHookUrl }}
27 | {{- end }}
28 | elassandraImage: "{{ .Values.image.elassandraRepository }}:{{ .Values.image.tag }}"
29 | imagePullPolicy: {{ .Values.image.pullPolicy }}
30 | {{- if .Values.image.pullSecrets }}
31 | imagePullSecrets:
32 | {{- range $pullSecret := .Values.image.pullSecrets }}
33 | - {{ $pullSecret }}
34 | {{- end }}
35 | {{- end }}
36 | {{- if .Values.serviceAccount }}
37 | serviceAccount: {{ .Values.serviceAccount }}
38 | {{ else }}
39 | serviceAccount: {{ template "elassandra.serviceAccount" . }}
40 | {{- end }}
41 | {{- if .Values.podTemplate }}
42 | podTemplate:
43 | {{ toYaml .Values.podTemplate | indent 4 }}
44 | {{- end }}
45 | resources:
46 | {{ toYaml .Values.resources | indent 4 }}
47 | dataVolumeClaim:
48 | {{ toYaml .Values.dataVolumeClaim | indent 4 }}
49 | {{- if .Values.env }}
50 | env:
51 | {{ toYaml .Values.env | indent 4 }}
52 | {{- end }}
53 | {{- if .Values.scheduledBackups }}
54 | scheduledBackups:
55 | {{ toYaml .Values.scheduledBackups | indent 4 }}
56 | {{- end }}
57 | userConfigMapVolumeSource:
58 | name: {{ template "elassandra.resourceName" . }}
59 | items:
60 | {{- range $key, $val := .Values.configs }}
61 | - key: {{ $key }}
62 | path: {{ $key }}
63 | {{- end }}
64 | {{- if .Values.userConfigMapVolumeSource }}
65 | {{ toYaml .Values.userConfigMapVolumeSource | indent 4 }}
66 | {{- end }}
67 | {{- if .Values.userSecretVolumeSource }}
68 | userSecretVolumeSource:
69 | {{ toYaml .Values.userSecretVolumeSource | indent 4 }}
70 | {{- end }}
71 | {{- if .Values.elasticsearch }}
72 | elasticsearch:
73 | enabled: {{ .Values.elasticsearch.enabled | quote }}
74 | httpPort: {{ default "9200" .Values.elasticsearch.httpPort | quote }}
75 | transportPort: {{ default "9300" .Values.elasticsearch.transportPort | quote }}
76 | loadBalancerEnabled: {{ default "false" .Values.elasticsearch.loadBalancerEnabled | quote }}
77 | {{- if .Values.elasticsearch.loadBalancerIp }}
78 | loadBalancerIp: {{ .Values.elasticsearch.loadBalancerIp | quote }}
79 | {{- end }}
80 | ingressEnabled: {{ default "false" .Values.elasticsearch.ingressEnabled | quote }}
81 | {{- if .Values.elasticsearch.datacenterGroup }}
82 | datacenterGroup: {{ .Values.elasticsearch.datacenterGroup | quote }}
83 | {{- end }}
84 | {{- if .Values.elasticsearch.datacenterTags }}
85 | datacenterTags: {{ .Values.elasticsearch.datacenterTags }}
86 | {{- end }}
87 | {{- if .Values.elasticsearch.enterprise }}
88 | enterprise:
89 | {{ toYaml .Values.elasticsearch.enterprise | indent 6 }}
90 | {{- end }}
91 | {{- end }}
92 | {{- if .Values.kibana }}
93 | kibana:
94 | enabled: {{ .Values.kibana.enabled | quote }}
95 | {{- if .Values.kibana.image }}
96 | {{- if .Values.kibana.tag }}
97 | image: "{{ .Values.kibana.image }}:{{ .Values.kibana.tag }}"
98 | {{- else }}
99 | image: "{{ .Values.kibana.image }}:{{ template "kibana.version" . }}"
100 | {{- end }}
101 | {{- end }}
102 | {{- if .Values.kibana.spaces }}
103 | spaces:
104 | {{ toYaml .Values.kibana.spaces | indent 6 }}
105 | {{- end }}
106 | {{- end }}
107 | prometheus:
108 | enabled: {{ default "false" .Values.prometheus.enabled | quote }}
109 | port: {{ default "9500" .Values.prometheus.port | quote }}
110 | {{- if .Values.reaper }}
111 | reaper:
112 | enabled: {{ default "false" .Values.reaper.enabled | quote }}
113 | {{- if .Values.reaper.image }}
114 | image: {{ .Values.reaper.image }}
115 | {{- end }}
116 | {{- if .Values.reaper.ingressHost }}
117 | ingressHost: {{ .Values.reaper.ingressHost }}
118 | {{- end }}
119 | {{- if .Values.reaper.ingressAdminHost }}
120 | ingressAdminHost: {{ .Values.reaper.ingressAdminHost }}
121 | {{- end }}
122 | {{- if .Values.reaper.ingressAnnotations }}
123 | ingressAnnotations:
124 | {{ toYaml .Values.reaper.ingressAnnotations | indent 6 }}
125 | {{- end }}
126 | jwtSecret: {{ default "68d45d8f-419f-429e-8ba0-7b475cba795d" .Values.reaper.jwtSecret }}
127 | loggingLevel: {{ default "INFO" .Values.reaper.loggingLevel }}
128 | {{- if .Values.reaper.podTemplate }}
129 | podTemplate:
130 | {{ toYaml .Values.reaper.podTemplate | indent 6 }}
131 | {{- end }}
132 | {{- end }}
133 | networking:
134 | hostPortEnabled: {{ default "false" .Values.networking.hostPortEnabled | quote }}
135 | hostNetworkEnabled: {{ default "false" .Values.networking.hostNetworkEnabled | quote }}
136 | externalDns:
137 | enabled: {{ default "false" .Values.networking.externalDns.enabled | quote }}
138 | root: {{ default "xxx" .Values.networking.externalDns.root | quote }}
139 | domain: {{ .Values.networking.externalDns.domain | quote }}
140 | ttl: {{ default "300" .Values.networking.externalDns.ttl }}
141 | jvm:
142 | computeJvmMemorySettings: {{ default "true" .Values.jvm.computeJvmMemorySettings | quote }}
143 | jdbPort: {{ default "-1" .Values.jvm.jdbPort | quote }}
144 | jmxPort: {{ default "-1" .Values.jvm.jmxPort | quote }}
145 | jmxmpEnabled: {{ default "true" .Values.jvm.jmxmpEnabled | quote }}
146 | jmxmpOverSSL: {{ default "true" .Values.jvm.jmxmpOverSSL | quote }}
147 | cassandra:
148 | workload: {{ default "READ_WRITE" .Values.workload | quote }}
149 | commitlogsInitContainer: {{ default "false" .Values.cassandra.commitlogsInitContainer | quote }}
150 | nativePort: {{ default "9042" .Values.cassandra.nativePort | quote }}
151 | storagePort: {{ default "7000" .Values.cassandra.storagePort | quote }}
152 | sslStoragePort: {{ default "7001" .Values.cassandra.sslStoragePort | quote }}
153 | {{- if .Values.cassandra.ssl }}
154 | ssl:
155 | {{ toYaml .Values.cassandra.ssl | indent 6 }}
156 | {{- end }}
157 | {{- if .Values.cassandra.authentication }}
158 | authentication:
159 | {{ toYaml .Values.cassandra.authentication | indent 6 }}
160 | {{- end }}
161 | {{- if .Values.cassandra.remoteSeeds }}
162 | remoteSeeds:
163 | {{ toYaml .Values.cassandra.remoteSeeds | indent 6 }}
164 | {{- end }}
165 | {{- if .Values.cassandra.remoteSeeders }}
166 | remoteSeeders:
167 | {{ toYaml .Values.cassandra.remoteSeeders | indent 6 }}
168 | {{- end }}
169 | snitchPreferLocal: {{ default "true" .Values.cassandra.snitchPreferLocal | quote }}
170 | {{- if .Values.managedKeyspaces }}
171 | managedKeyspaces:
172 | {{ toYaml .Values.managedKeyspaces | indent 4 }}
173 | {{- end }}
174 |
--------------------------------------------------------------------------------
/charts/elassandra-datacenter/templates/nodeinfo.yaml:
--------------------------------------------------------------------------------
1 | {{- if or (.Values.networking.hostPortEnabled) (.Values.networking.hostNetworkEnabled) (.Values.networking.externalDns.enabled) }}
2 | ---
3 | apiVersion: v1
4 | kind: ServiceAccount
5 | metadata:
6 | labels:
7 | app: {{ template "elassandra.resourceName" . }}
8 | chart: {{ .Chart.Name }}-{{ .Chart.Version }}
9 | heritage: {{ .Release.Service }}
10 | release: {{ .Release.Name }}
11 | name: {{ template "elassandra.resourceName" . }}-nodeinfo
12 | ---
13 | # Create a service account API token bound to the nodeinfo serviceaccount
14 | # Must to be created after serviceaccount, otherwise deleted by the token controller
15 | # see https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#manually-create-a-service-account-api-token
16 | apiVersion: v1
17 | kind: Secret
18 | metadata:
19 | name: {{ template "elassandra.resourceName" . }}-nodeinfo
20 | namespace: {{ .Release.Namespace }}
21 | annotations:
22 | kubernetes.io/service-account.name: {{ template "elassandra.resourceName" . }}-nodeinfo
23 | # helm.sh/hook: post-install
24 | type: kubernetes.io/service-account-token
25 | {{- end }}
--------------------------------------------------------------------------------
/charts/elassandra-datacenter/values.yaml:
--------------------------------------------------------------------------------
1 | # Default values for elassandra.
2 | # This is a YAML-formatted file.
3 | # Declare variables to be passed into your templates.
4 | replicas: 1
5 | parked: false
6 | autoScaleMode: "MANUAL"
7 |
8 | image:
9 | elassandraRepository: strapdata/elassandra-node
10 | tag: latest
11 | pullPolicy: Always
12 | pullSecrets: []
13 |
14 | # Elassandra node affinity STRICT or SLACK
15 | nodeAffinityPolicy: STRICT
16 | maxPodUnavailable: 1
17 | rbacEnabled: true
18 | serviceAccount:
19 | podTemplate: {}
20 |
21 | # Resource config
22 | resources:
23 | requests:
24 | cpu: 500m
25 | memory: 1Gi
26 | limits:
27 | cpu: 2000m
28 | memory: 2Gi
29 |
30 | # Storage config
31 | dataVolumeClaim:
32 | accessModes:
33 | - ReadWriteOnce
34 | storageClassName: standard
35 | resources:
36 | requests:
37 | storage: 500Mi
38 | # PVC delete policy, KEEP_PVC or DELETE_PVC
39 | decommissionPolicy: "DELETE_PVC"
40 |
41 | # Kubernetes Network config
42 | networking:
43 | hostPortEnabled: false
44 | hostNetworkEnabled: false
45 | externalDns:
46 | enabled: false
47 | root: "xxx"
48 | domain: "example.com"
49 | ttl: 300
50 |
51 | managedKeyspaces: {}
52 | # - keyspace: gravitee
53 | # rf: 3
54 | # role: gravitee
55 | # login: true
56 | # superuser: false
57 | # secretKey: gravitee
58 | # grantStatements:
59 | # - "GRANT gravitee TO gravitee"
60 |
61 | # JVM config
62 | jvm:
63 | computeJvmMemorySettings: true
64 | jdbPort: 4242
65 | # JMXMP is mandatory
66 | jmxPort: 7199
67 | jmxmpEnabled: true
68 | jmxmpOverSSL: true
69 |
70 | # Cassandra configuration
71 | cassandra:
72 | ssl: true
73 | authentication: CASSANDRA
74 | # Tell Cassandra to use the local IP address (INTERNAL_IP).
75 | snitchPreferLocal: true
76 | # Cassandra seeds config
77 | remoteSeeds: []
78 | remoteSeeders: []
79 | nativePort: 39042
80 | storagePort: 37000
81 | sslStoragePort: 37001
82 |
83 | # Cassandra reaper config
84 | reaper:
85 | image: strapdata/cassandra-reaper:2.1.0-SNAPSHOT-strapkop
86 | enabled: true
87 | jwtSecret: "68d45d8f-419f-429e-8ba0-7b475cba795d"
88 | ingressAnnotations: {}
89 | ingressAdminHost:
90 | ingressHost:
91 | loggingLevel: "INFO"
92 | podTemplate: {}
93 |
94 | # Elasticsearch config
95 | elasticsearch:
96 | enabled: true
97 | httpPort: 9200
98 | transportPort: 9300
99 | ingressEnabled: false
100 | loadBalancerEnabled: false
101 | loadBalancerIp:
102 | datacenter:
103 | group:
104 | tags: []
105 | enterprise:
106 | enabled: true
107 | jmx: true
108 | https: true
109 | ssl: true
110 | aaa:
111 | enabled: true
112 | audit: true
113 | cbs: true
114 |
115 | # Kibana configuration
116 | kibana:
117 | enabled: true
118 | image: "docker.elastic.co/kibana/kibana-oss"
119 | spaces:
120 | - name: ""
121 | keyspaces: []
122 | podTemplate:
123 | ingressSuffix:
124 | ingressAnnotations: {}
125 |
126 | # Prometheus metrics exporter
127 | prometheus:
128 | enabled: true
129 | port: 9500
130 |
131 | # Override some config files in /etc/cassandra
132 | configs:
133 | logback.xml: |-
134 |
152 |
153 |
154 |
155 |
156 | ${CASSANDRA_LOGDIR}/system.log
157 |
158 | ${CASSANDRA_LOGDIR}/system.log.%i.zip
159 | 1
160 | 20
161 |
162 |
163 |
164 | 500MB
165 |
166 |
167 | %date{ISO8601} %-5level [%thread] %F:%L %M %msg%n
168 |
169 |
170 |
171 |
172 |
173 | %date{ISO8601} %-5level [%thread] %C.%M:%L %msg%n
174 |
175 |
176 |
177 |
178 | ${CASSANDRA_LOGDIR}/audit.log
179 |
180 | ${CASSANDRA_LOGDIR}/audit.log.%i.zip
181 | 1
182 | 20
183 |
184 |
185 | 500MB
186 |
187 |
188 | %date{ISO8601} %msg%n
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
--------------------------------------------------------------------------------
/charts/elassandra-operator/.helmignore:
--------------------------------------------------------------------------------
1 | # Patterns to ignore when building packages.
2 | # This supports shell glob matching, relative path matching, and
3 | # negation (prefixed with !). Only one pattern per line.
4 | .DS_Store
5 | # Common VCS dirs
6 | .git/
7 | .gitignore
8 | .bzr/
9 | .bzrignore
10 | .hg/
11 | .hgignore
12 | .svn/
13 | # Common backup files
14 | *.swp
15 | *.bak
16 | *.tmp
17 | *~
18 | # Various IDEs
19 | .project
20 | .idea/
21 | *.tmproj
22 |
--------------------------------------------------------------------------------
/charts/elassandra-operator/Chart.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | appVersion: "1.1"
3 | description: A Helm chart for the Elassandra operator
4 | icon: https://github.com/strapdata/elassandra.io/blob/gh-pages/elassandra.svg
5 | name: elassandra-operator
6 | version: 0.3.0
7 | keywords:
8 | - cassandra
9 | - elasticsearch
10 | - elassandra
11 | - database
12 | - nosql
13 | - operator
14 | home: http://www.strapdata.com
15 | maintainers:
16 | - name: vroyer
17 | email: vroyer@strapdata.com
18 | - name: DBarthe
19 | email: barth@strapdata.com
20 | - name: eleleu
21 | email: eleleu@strapdata.com
--------------------------------------------------------------------------------
/charts/elassandra-operator/README.md:
--------------------------------------------------------------------------------
1 | # Elassandra Operator Chart
2 |
3 | Elassandra Operator HELM 2 chart.
4 |
5 | ## Install the Elassandra Operator
6 |
7 | ```bash
8 | helm install --namespace default --name elassandra-operator --wait strapdata/elassandra-operator
9 | ```
10 |
11 | After installation succeeds, you can get a status of your deployment:
12 |
13 | ```bash
14 | helm status elassandra-operator
15 | ```
16 |
17 | By default, the elassandra operator starts with a maximum java heap of 512m, and with the following resources limit:
18 |
19 | ```yaml
20 | resources:
21 | limits:
22 | cpu: 500m
23 | memory: 786Mi
24 | requests:
25 | cpu: 100m
26 | memory: 768Mi
27 | ```
28 |
29 | You can adjust java settings by using the environment variable JAVA_TOOL_OPTIONS.
30 |
31 | ## Configuration
32 |
33 | The following table lists the configurable parameters of the Elassandra Operator chart and their default values.
34 |
35 | | Parameter | Description | Default |
36 | | ----------------------- | ---------------------------------------------------------- | --------------------------------------------------------- |
37 | | `image.repository` | `elassandra-operator` image repository | `strapdata/elassandra-operator` |
38 | | `image.tag` | `elassandra-operator` image tag | `6.8.4.5` |
39 | | `image.pullPolicy` | Image pull policy | `Always` |
40 | | `image.pullSecrets` | Image pull secrets | `nil` |
41 | | `replicas` | Number of `elassandra-operator` instance | `1` |
42 | | `watchNamespace` | Namespace in which this operator should manage resources | `nil` (watch all namespaces) |
43 | | `serverPort` | HTTPS server port | `443` |
44 | | `managementPort` | Management port | `8081` |
45 | | `jmxmpPort` | JMXMP port | `7199` |
46 | | `prometheusEnabled` | Enable prometheus metrics | `true` |
47 | | `taskRetention` | Elassandra task retention (Java duration) | `7D` |
48 | | `env` | Additional environment variables | `nil` |
49 | | `tls.key` | Operator TLS key (PEM base64 encoded) | `` |
50 | | `tls.crt` | Operator TLS server certificate (PEM base64 encoded) | `` |
51 | | `tls.caBundle` | Operator TLS CA bundle (PEM base64 encoded) | `tls.crt` |
52 | | `ingress.enabled` | Enables ingress for /seeds endpoint | `false` |
53 | | `ingress.hosts` | Ingress hosts | `[]` |
54 | | `ingress.annotations` | Ingress annotations | `{}` |
55 | | `ingress.tls` | Ingress TLS configuration | `[]` |
56 | | `nodeSelector` | Node labels for pod assignment | `{}` |
57 | | `rbacEnabled` | Enable RBAC | `true` |
58 | | `webhookEnabled` | Enable webhook validation | `true` |
59 | | `webhook.failurePolicy` | Webhook failure policy (**Fail** or **Ignore**) | `Fail` |
60 | | `webhook.timeoutSeconds` | Webhook validation timeout in seconds | `15` |
61 | | `tolerations` | Toleration labels for pod assignment | `[]` |
62 | | `affinity` | Affinity settings | `{}` |
63 |
64 | ## TLS configuration
65 |
66 | The elassandra operator expose HTTPS endpoints for:
67 |
68 | * Kubernetes readiness check (/ready)
69 | * Kubernetes webhook validation (/validation)
70 | * Expose Cassandra seeds IP addresses (/seeds) to Elassandra nodes.
71 |
72 | The operator TLS server certificate defined by **tls.crt** and **tls.key** must include a subjectAltName matching the FQDN of the operator service name
73 | (otherwise connection from elassandra nodes and the kubernetes API server to the operator will be rejected).
74 |
75 | The provided default server certificate only meet this condition when the operator is deployed in the **default** namespace.
76 | It was generated with the following command:
77 |
78 | ```bash
79 | openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes \
80 | -keyout elassandra-operator.key -out elassandra-operator.crt -extensions san -config \
81 | <(echo "[req]";
82 | echo distinguished_name=req;
83 | echo "[san]";
84 | echo subjectAltName=DNS:elassandra-operator.default.svc,DNS:elassandra-operator.default.svc.cluster.local,IP:127.0.0.1in pod/strapkop-elassandra-operator-6b47cb8f54-95swg
85 | ) \
86 | -subj "/CN=localhost"
87 | ```
88 |
89 | If you want to deploy the elassandra operator in another namespace, you must generate a server certificate and key matching your namespace.
90 |
91 | The **tls.caBundle** is used to configure the caBundle field of the [ValidatingWebhookConfiguration](see https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/).
92 | and by default, it contains the server certificate.
93 |
94 | The **tls.caBundle** is also used by elassandra nodes to trust connections to the remote Elassandra operators, in order to get the remote Cassandra seed IP addresses.
95 | In such a case, the **tls.caBundle** must also include trust certificates of remote elassandra operators.
--------------------------------------------------------------------------------
/charts/elassandra-operator/templates/NOTES.txt:
--------------------------------------------------------------------------------
1 | The Elassandra Operator has been installed. Check its status by running:
2 | kubectl --namespace {{ .Release.Namespace }} get pods -l "app={{ template "elassandra-operator.name" . }},release={{ .Release.Name }}"
3 |
4 | Visit http://operator.elassandra.io/ for instructions on how
5 | to create & configure Elassandra clusters using the Elassandra-Operator.
--------------------------------------------------------------------------------
/charts/elassandra-operator/templates/_helpers.tpl:
--------------------------------------------------------------------------------
1 | {{/* vim: set filetype=mustache: */}}
2 | {{/*
3 | Expand the name of the chart.
4 | */}}
5 | {{- define "elassandra-operator.name" -}}
6 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
7 | {{- end -}}
8 |
9 | {{/*
10 | Create a default fully qualified app name.
11 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
12 | If release name contains chart name it will be used as a full name.
13 | */}}
14 | {{- define "elassandra-operator.fullname" -}}
15 | {{- if .Values.fullnameOverride -}}
16 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
17 | {{- else -}}
18 | {{- $name := default .Chart.Name .Values.nameOverride -}}
19 | {{- if contains $name .Release.Name -}}
20 | {{- .Release.Name | trunc 63 | trimSuffix "-" -}}
21 | {{- else -}}
22 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
23 | {{- end -}}
24 | {{- end -}}
25 | {{- end -}}
26 |
27 | {{/*
28 | Return the appropriate apiVersion value to use for the elassandra-operator managed k8s resources
29 | */}}
30 | {{- define "elassandra-operator.apiVersion" -}}
31 | {{- printf "%s" "elassandra.strapdata.com/v1beta1" -}}
32 | {{- end -}}
33 |
--------------------------------------------------------------------------------
/charts/elassandra-operator/templates/clusterrole.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.rbacEnabled }}
2 | apiVersion: rbac.authorization.k8s.io/v1beta1
3 | kind: ClusterRole
4 | metadata:
5 | labels:
6 | app: {{ template "elassandra-operator.name" . }}
7 | chart: {{ .Chart.Name }}-{{ .Chart.Version }}
8 | heritage: {{ .Release.Service }}
9 | release: {{ .Release.Name }}
10 | name: {{ template "elassandra-operator.fullname" . }}
11 | rules:
12 | - apiGroups:
13 | - extensions
14 | resources:
15 | - thirdpartyresources
16 | verbs:
17 | - '*'
18 | - apiGroups:
19 | - apiextensions.k8s.io
20 | resources:
21 | - customresourcedefinitions
22 | verbs:
23 | - '*'
24 | - apiGroups:
25 | - elassandra.strapdata.com
26 | resources:
27 | - elassandradatacenter
28 | - elassandradatacenters
29 | - elassandradatacenter/status
30 | - elassandradatacenters/status
31 | - elassandratask
32 | - elassandratasks
33 | - elassandratask/status
34 | - elassandratasks/status
35 | verbs:
36 | - '*'
37 | - apiGroups:
38 | - apps
39 | resources:
40 | - statefulsets
41 | - deployments
42 | verbs: ['*']
43 | - apiGroups: ['']
44 | resources:
45 | - configmaps
46 | - secrets
47 | verbs: ['*']
48 | - apiGroups:
49 | - policy
50 | resources:
51 | - poddisruptionbudgets
52 | - poddisruptionbudgets/status
53 | verbs: ['get', 'create', 'update', 'delete', 'list']
54 | - apiGroups: ['']
55 | resources:
56 | - pods
57 | - serviceaccounts
58 | verbs: ['get', 'list', 'watch']
59 | - apiGroups: ['']
60 | resources:
61 | - services
62 | - endpoints
63 | - persistentvolumeclaims
64 | - persistentvolumes
65 | verbs: ['get', 'create', 'update', 'delete', 'list']
66 | - apiGroups:
67 | - extensions
68 | resources:
69 | - ingress
70 | - ingresses
71 | verbs: ['get', 'create', 'update', 'delete', 'list']
72 | - nonResourceURLs: ["/version", "/version/*"]
73 | verbs: ['get']
74 | - apiGroups: ['']
75 | resources:
76 | - nodes
77 | verbs: ['list', 'watch']
78 | - apiGroups: ['']
79 | resources:
80 | - namespaces
81 | verbs: ['list']
82 | {{- end }}
83 |
--------------------------------------------------------------------------------
/charts/elassandra-operator/templates/clusterrolebinding.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.rbacEnabled }}
2 | apiVersion: rbac.authorization.k8s.io/v1beta1
3 | kind: ClusterRoleBinding
4 | metadata:
5 | labels:
6 | app: {{ template "elassandra-operator.name" . }}
7 | chart: {{ .Chart.Name }}-{{ .Chart.Version }}
8 | heritage: {{ .Release.Service }}
9 | release: {{ .Release.Name }}
10 | name: {{ template "elassandra-operator.fullname" . }}
11 | roleRef:
12 | apiGroup: rbac.authorization.k8s.io
13 | kind: ClusterRole
14 | name: {{ template "elassandra-operator.fullname" . }}
15 | subjects:
16 | - kind: ServiceAccount
17 | name: {{ template "elassandra-operator.fullname" . }}
18 | namespace: {{ .Release.Namespace }}
19 | {{- end }}
--------------------------------------------------------------------------------
/charts/elassandra-operator/templates/deployment.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: apps/v1
2 | kind: Deployment
3 | metadata:
4 | labels:
5 | app: {{ template "elassandra-operator.name" . }}
6 | chart: {{ .Chart.Name }}-{{ .Chart.Version }}
7 | heritage: {{ .Release.Service }}
8 | release: {{ .Release.Name }}
9 | name: {{ template "elassandra-operator.fullname" . }}
10 | spec:
11 | replicas: {{ default "1" .Values.replicas }}
12 | selector:
13 | matchLabels:
14 | app: {{ template "elassandra-operator.name" . }}
15 | operator: elassandra
16 | release: {{ .Release.Name }}
17 | template:
18 | metadata:
19 | labels:
20 | app: {{ template "elassandra-operator.name" . }}
21 | operator: elassandra
22 | release: {{ .Release.Name }}
23 | annotations:
24 | prometheus.io/scrape: {{ default "true" .Values.prometheusEnabled | quote }}
25 | prometheus.io/port: {{ default "8081" .Values.managementPort | quote }}
26 | prometheus.io/path: "/prometheus"
27 | spec:
28 | {{- if .Values.image.pullSecrets }}
29 | imagePullSecrets:
30 | {{- range $pullSecret := .Values.image.pullSecrets }}
31 | - name: {{ $pullSecret }}
32 | {{- end }}
33 | {{- end }}
34 | terminationGracePeriodSeconds: 45
35 | initContainers:
36 | # build a PKCS12 keystore from the TLS secret for the micronaut server
37 | - name: init-tls-cert
38 | image: frapsoft/openssl
39 | command: ['sh', '-c', "openssl pkcs12 -export -in /tls-secret/tls.crt -inkey /tls-secret/tls.key -out /tls/operator.p12 -passout pass:changeit"]
40 | volumeMounts:
41 | - name: tls-secret-volume
42 | readOnly: true
43 | mountPath: "/tls-secret"
44 | - name: tls-volume
45 | mountPath: "/tls"
46 | containers:
47 | - name: {{ template "elassandra-operator.name" . }}
48 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
49 | imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
50 | terminationMessagePolicy: "FallbackToLogsOnError"
51 | volumeMounts:
52 | - name: tls-volume
53 | mountPath: "/tls"
54 | ports:
55 | - containerPort: {{ default 443 .Values.serverPort }}
56 | name: https
57 | - containerPort: {{ default 8081 .Values.managementPort }}
58 | name: management
59 | - containerPort: {{ default "-1" .Values.jmxmpPort }}
60 | name: jmxmp
61 | - containerPort: 5005
62 | name: jdb
63 | readinessProbe:
64 | httpGet:
65 | scheme: HTTPS
66 | path: /ready
67 | port: {{ default 443 .Values.serverPort }}
68 | initialDelaySeconds: 5
69 | periodSeconds: 10
70 | lifecycle:
71 | preStop:
72 | httpGet:
73 | scheme: HTTPS
74 | path: /shutdown/graceful
75 | port: {{ default 443 .Values.serverPort }}
76 | resources:
77 | {{ toYaml .Values.resources | indent 12 }}
78 | env:
79 | - name: OPERATOR_SERVICE_NAME
80 | value: {{ template "elassandra-operator.name" . }}
81 | - name: OPERATOR_SERVER_PORT
82 | value: {{ default "443" .Values.serverPort | quote }}
83 | - name: OPERATOR_MANAGEMENT_PORT
84 | value: {{ default "8081" .Values.managementPort | quote }}
85 | - name: OPERATOR_JMXMP_PORT
86 | value: {{ default "-1" .Values.jmxmpPort | quote }}
87 | - name: OPERATOR_PROMETHEUS_ENABLED
88 | value: {{ default "true" .Values.prometheusEnabled | quote }}
89 | - name: OPERATOR_TASKS_RETENTION
90 | value: {{ default "7D" .Values.taskRetention | quote }}
91 | - name: ADDRESS_TRANSLATOR_DNS_DOMAIN
92 | value: {{ default "internal.strapdata.com" .Values.translatorDnsDomain | quote }}
93 | - name: OPERATOR_NAMESPACE
94 | valueFrom:
95 | fieldRef:
96 | fieldPath: metadata.namespace
97 | {{- if .Values.watchNamespace }}
98 | - name: OPERATOR_WATCH_NAMESPACE
99 | value: {{ .Values.watchNamespace }}
100 | {{- end }}
101 | {{- if .Values.env }}
102 | {{- range $key, $val := .Values.env }}
103 | - name: {{ $key }}
104 | value: {{ $val | quote }}
105 | {{- end }}
106 | {{- end }}
107 | volumes:
108 | - name: tls-volume
109 | emptyDir: {}
110 | - name: tls-secret-volume
111 | secret:
112 | secretName: {{ template "elassandra-operator.name" . }}
113 | {{- if .Values.nodeSelector }}
114 | nodeSelector:
115 | {{ toYaml .Values.nodeSelector | indent 8 }}
116 | {{- end }}
117 | {{- if .Values.rbacEnabled }}
118 | serviceAccountName: {{ template "elassandra-operator.fullname" . }}
119 | {{- end }}
120 | {{- if .Values.tolerations }}
121 | tolerations:
122 | {{ toYaml .Values.tolerations | indent 8 }}
123 | securityContext:
124 | {{ toYaml .Values.securityContext | indent 8 }}
125 | {{- end }}
126 |
127 |
--------------------------------------------------------------------------------
/charts/elassandra-operator/templates/ingress-seeds.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.ingress.enabled -}}
2 | {{- $serviceAPIName := include "elassandra-operator.fullname" . -}}
3 | apiVersion: extensions/v1beta1
4 | kind: Ingress
5 | metadata:
6 | labels:
7 | app: {{ template "elassandra-operator.name" . }}
8 | chart: {{ .Chart.Name }}-{{ .Chart.Version }}
9 | heritage: {{ .Release.Service }}
10 | operator: elassandra
11 | release: {{ .Release.Name }}
12 | name: {{ template "elassandra-operator.fullname" . }}-internal
13 | annotations:
14 | {{- range $key, $value := .Values.ingress.annotations }}
15 | {{ $key }}: {{ $value | quote }}
16 | {{- end }}
17 | spec:
18 | rules:
19 | {{- range $host := .Values.ingress.hosts }}
20 | - host: {{ $host }}
21 | http:
22 | paths:
23 | - path: /seeds
24 | backend:
25 | serviceName: {{ $serviceAPIName }}
26 | servicePort: https
27 | {{- end }}
28 | {{- end -}}
--------------------------------------------------------------------------------
/charts/elassandra-operator/templates/service.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | labels:
5 | app: {{ template "elassandra-operator.name" . }}
6 | chart: {{ .Chart.Name }}-{{ .Chart.Version }}
7 | heritage: {{ .Release.Service }}
8 | operator: elassandra
9 | release: {{ .Release.Name }}
10 | name: {{ template "elassandra-operator.name" . }}
11 | spec:
12 | type: ClusterIP
13 | ports:
14 | - port: {{ default 443 .Values.serverPort }}
15 | targetPort: {{ default 443 .Values.serverPort }}
16 | protocol: TCP
17 | name: https
18 | - port: {{ default 8081 .Values.managementPort }}
19 | targetPort: {{ default 8081 .Values.managementPort }}
20 | protocol: TCP
21 | name: endpoints
22 | selector:
23 | app: {{ template "elassandra-operator.name" . }}
24 | release: {{ .Release.Name }}
--------------------------------------------------------------------------------
/charts/elassandra-operator/templates/serviceaccount.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.rbacEnabled }}
2 | apiVersion: v1
3 | kind: ServiceAccount
4 | metadata:
5 | labels:
6 | app: {{ template "elassandra-operator.name" . }}
7 | chart: {{ .Chart.Name }}-{{ .Chart.Version }}
8 | heritage: {{ .Release.Service }}
9 | release: {{ .Release.Name }}
10 | app.kubernetes.io/managed-by: "elassandra-operator"
11 | name: {{ template "elassandra-operator.fullname" . }}
12 | {{- end }}
--------------------------------------------------------------------------------
/charts/elassandra-operator/templates/tls-secret.yaml:
--------------------------------------------------------------------------------
1 | # Elassandra-operator TLS certificate and key
2 | apiVersion: v1
3 | kind: Secret
4 | metadata:
5 | name: {{ template "elassandra-operator.name" . }}
6 | labels:
7 | app: {{ template "elassandra-operator.name" . }}
8 | chart: {{ .Chart.Name }}-{{ .Chart.Version }}
9 | heritage: {{ .Release.Service }}
10 | release: {{ .Release.Name }}
11 | type: "kubernetes.io/tls"
12 | data:
13 | tls.crt: {{ .Values.tls.crt | quote }}
14 | tls.key: {{ .Values.tls.key | quote }}
--------------------------------------------------------------------------------
/charts/elassandra-operator/templates/validatingwebhookconfiguration.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.webhook.enabled }}
2 | apiVersion: admissionregistration.k8s.io/v1beta1
3 | kind: ValidatingWebhookConfiguration
4 | metadata:
5 | name: {{ template "elassandra-operator.fullname" . }}
6 | namespace: {{ .Release.Namespace }}
7 | labels:
8 | app: {{ template "elassandra-operator.name" . }}
9 | chart: {{ .Chart.Name }}-{{ .Chart.Version }}
10 | heritage: {{ .Release.Service }}
11 | operator: elassandra
12 | release: {{ .Release.Name }}
13 | webhooks:
14 | - name: "elassandradatacenter-webhook.elassandra.strapdata.com"
15 | rules:
16 | - apiGroups: ["elassandra.strapdata.com"]
17 | apiVersions: ["v1beta1"]
18 | operations: ["CREATE", "UPDATE"]
19 | resources: ["elassandradatacenters"]
20 | scope: "*"
21 | clientConfig:
22 | caBundle: {{ .Values.tls.crt | quote }}
23 | service:
24 | name: {{ template "elassandra-operator.name" . }}
25 | namespace: {{ .Release.Namespace }}
26 | path: "/validation"
27 | admissionReviewVersions: ["v1", "v1beta1"]
28 | failurePolicy: {{ default "Fail" .Values.webhook.failurePolicy | quote }}
29 | matchPolicy: "Equivalent"
30 | sideEffects: None
31 | timeoutSeconds: {{ default 15 .Values.webhook.timeoutSeconds }}
32 | {{- end }}
--------------------------------------------------------------------------------
/charts/elassandra-operator/values.yaml:
--------------------------------------------------------------------------------
1 | # Default values for elassandra-operator.
2 | # This is a YAML-formatted file.
3 | # Declare variables to be passed into your templates.
4 | image:
5 | repository: strapdata/elassandra-operator
6 | tag: 0.1.0
7 | pullPolicy: Always
8 | pullSecrets: []
9 |
10 | replicas: 1
11 |
12 | resources:
13 | limits:
14 | cpu: 500m
15 | memory: 786Mi
16 | requests:
17 | cpu: 100m
18 | memory: 768Mi
19 |
20 | # Elassandra-operator self-signed certificate+key with subjectAltName=DNS:elassandra-operator.default.svc,DNS:elassandra-operator.default.svc.cluster.local,IP:127.0.0.1
21 | # Used by k8s webhook validation and nodes http requests to the elassandra-operator.
22 | tls:
23 | key: "LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCk1JSUpRd0lCQURBTkJna3Foa2lHOXcwQkFRRUZBQVNDQ1Mwd2dna3BBZ0VBQW9JQ0FRQ2ZXdi92VzNIZDdYcjYKdjQ3N1p4OGlRaDRmcWdvaGk3RUFyQkIxUlJ4ZURaeHJpV0lLMzc3d0ErQXAwWWpRSGkvSmFRd043dGVneFduKwpSaDA2bWlCcnlBL01GTkdQQWc5aURrWXBYMkNZb2Z3N0VmK0Z6Rm13UnIydUZMa2Ira2xKbXdyZmZiMUVEbmk1CmVpNHV1U2hwRXRVaDg4c1RRSGV4d20yT3FuemdJZzJpNkxGMGlKNFBzUWZsam5aUDM5cVprNVlEM1hvUkdwc0IKbHlPam9oNGIwTm1tYmlhMElGcUozWG9VbnNZMVh6OXZ4S0VOL0FRbndJcndaVkM5bW9RQS9Wb0JvWk5iVGVRZgp3Qk91dkVWS1U1NGxYNVlqbUk2TG9lYXIxekN2Um9GTnUxR1NvU3NKM3BWM05Mam0yUjdLcUp4T3oxRmp1Mlg0C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dEUKNjJxVTlBQlNsSzFkdTFMaHI3bXZ4b0M0U3VsTFhrblRXTW95dE1mV0xxNXJUb2hxUDZ6c1R3SFRvWUtqdVMrbwo1bVQ1ZGttNXcvcDhQeHRueVVsa2dzT1E1UVpSNHF1K1V4TDh4K2FsSTRLa01yZ0pQZ0JTOWdOczJBNDlETm5tClBhcz0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo="
26 |
27 | # Elassandra-operator watched namespace
28 | watchNamespace:
29 |
30 | # Elassandra-operator config
31 | serverPort: 443
32 | managementPort: 8081
33 | jmxmpPort: 7199
34 | prometheusEnabled: true
35 | taskRetention: "7D"
36 | rbacEnabled: true
37 |
38 | # k8s webhook validation settings
39 | webhook:
40 | enabled: true
41 | failurePolicy: "Fail"
42 | timeoutSeconds: 15
43 |
44 | # Additional env variables
45 | env:
46 |
47 | # Ingress for /seeds for cross-kubernetes connection
48 | ingress:
49 | enabled: false
50 | hosts: []
51 | annotations: {}
52 | # kubernetes.io/ingress.class: traefik
53 | # tls:
54 | # - hosts: []
55 |
56 | nodeSelector: {}
57 |
58 | tolerations: []
59 |
60 | affinity: {}
61 |
--------------------------------------------------------------------------------
/charts/elassandra/.helmignore:
--------------------------------------------------------------------------------
1 | # Patterns to ignore when building packages.
2 | # This supports shell glob matching, relative path matching, and
3 | # negation (prefixed with !). Only one pattern per line.
4 | .DS_Store
5 | # Common VCS dirs
6 | .git/
7 | .gitignore
8 | # Common backup files
9 | *.swp
10 | *.bak
11 | *.tmp
12 | *~
13 | # Various IDEs
14 | .project
15 | .idea/
16 | *.tmproj
17 |
--------------------------------------------------------------------------------
/charts/elassandra/Chart.yaml:
--------------------------------------------------------------------------------
1 | name: elassandra
2 | version: 1.0.0
3 | appVersion: 6.2.3.9
4 | description: Elassandra is a fork of Elasticsearch modified to run on top of Apache Cassandra in a scalable and
5 | resilient peer-to-peer architecture. Elasticsearch code is embedded in Cassanda nodes providing advanced
6 | search features on Cassandra tables and Cassandra serve as an Elasticsearch data and configuration store.
7 | icon: https://github.com/strapdata/elassandra.io/blob/gh-pages/elassandra.svg
8 | sources:
9 | - https://github.com/strapdata/elassandra/tree/v6.2.3-strapdata
10 | keywords:
11 | - cassandra
12 | - elasticsearch
13 | - elassandra
14 | - database
15 | - nosql
16 | home: http://www.elassandra.io
17 | maintainers:
18 | - name: vroyer
19 | email: vroyer@strapdata.com
20 | - name: DBarthe
21 | email: barth@strapdata.com
22 | engine: gotpl
--------------------------------------------------------------------------------
/charts/elassandra/OWNERS:
--------------------------------------------------------------------------------
1 | approvers:
2 | - vroyer
3 | - DBarthe
4 | reviewers:
5 | - vroyer
6 | - DBarthe
7 |
--------------------------------------------------------------------------------
/charts/elassandra/README.md:
--------------------------------------------------------------------------------
1 | # Elassandra
2 |
3 | An [Elassandra](http://www.elassandra.io) Chart for Kubernetes.
4 |
5 | ## Install Chart
6 |
7 | To install the Elassandra Chart into your Kubernetes cluster (This Chart requires persistent volume by default, you may need to create a storage class before install chart. To create storage class, see Persist data section)
8 |
9 | ```bash
10 | helm install --namespace "default" -n "elassandra" strapdata/elassandra
11 | ```
12 |
13 | After installation succeeds, you can get a status of Chart
14 |
15 | ```bash
16 | helm status "elassandra"
17 | ```
18 |
19 | As show below, the Elassandra chart creates 2 clustered service for elasticsearch and cassandra.
20 |
21 | ```bash
22 | kubectl get all -o wide -n elassandra
23 | NAME READY STATUS RESTARTS AGE
24 | pod/elassandra-0 1/1 Running 0 51m
25 | pod/elassandra-1 1/1 Running 0 50m
26 | pod/elassandra-2 1/1 Running 0 49m
27 |
28 | NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
29 | service/elassandra ClusterIP None 7199/TCP,7000/TCP,7001/TCP,9300/TCP,9042/TCP,9160/TCP,9200/TCP 51m
30 | service/elassandra-cassandra ClusterIP 10.0.174.13 9042/TCP,9160/TCP 51m
31 | service/elassandra-elasticsearch ClusterIP 10.0.131.15 9200/TCP 51m
32 |
33 | NAME DESIRED CURRENT AGE
34 | statefulset.apps/elassandra 3 3 51m
35 | ```
36 |
37 | If you want to delete your Chart, use this command
38 |
39 | ```bash
40 | helm delete --purge "elassandra"
41 | ```
42 |
43 | ## Enable/Disable elasticsearch
44 |
45 | You can enable/disable the elasticsearch service by setting the following values in `values.yaml`
46 |
47 | ```yaml
48 | elasticsearch:
49 | enabled: true
50 | ```
51 |
52 | ## Persist data
53 | You need to create `StorageClass` before able to persist data in persistent volume.
54 | To create a `StorageClass` on Google Cloud, run the following
55 |
56 | ```bash
57 | kubectl create -f sample/create-storage-gce.yaml
58 | ```
59 |
60 | And set the following values in `values.yaml`
61 |
62 | ```yaml
63 | persistence:
64 | enabled: true
65 | ```
66 |
67 | If you want to create a `StorageClass` on other platform, please see documentation here [https://kubernetes.io/docs/user-guide/persistent-volumes/](https://kubernetes.io/docs/user-guide/persistent-volumes/)
68 |
69 | If you want to use SSD managed disk on Microsoft Azure, set `persistence.storageClassName: "managed-premium"` in `values.yaml`.
70 |
71 | When running a cluster without persistence, the termination of a pod will first initiate a decommissioning of that pod.
72 | Depending on the amount of data stored inside the cluster this may take a while. In order to complete a graceful
73 | termination, pods need to get more time for it. Set the following values in `values.yaml`:
74 |
75 | ```yaml
76 | podSettings:
77 | terminationGracePeriodSeconds: 1800
78 | ```
79 |
80 | ## Install Chart with specific cluster size
81 | By default, this Chart will create an elassandra with 3 nodes. If you want to change the cluster size during installation, you can use `--set config.cluster_size={value}` argument. Or edit `values.yaml`
82 |
83 | For example:
84 | Set cluster size to 5
85 |
86 | ```bash
87 | helm install --namespace "elassandra" -n "elassandra" --set config.cluster_size=5 incubator/elassandra/
88 | ```
89 |
90 | ## Install Chart with specific resource size
91 |
92 | By default, this Chart will create a cassandra with CPU 2 vCPU and 4Gi of memory which is suitable for development environment.
93 | If you want to use this Chart for production, I would recommend to update the CPU to 4 vCPU and 16Gi. Also increase size of `max_heap_size` and `heap_new_size`.
94 | To update the settings, edit `values.yaml`
95 |
96 | ## Configuration
97 |
98 | The following table lists the configurable parameters of the Cassandra chart and their default values.
99 |
100 | | Parameter | Description | Default |
101 | | ----------------------- | --------------------------------------------- | ---------------------------------------------------------- |
102 | | `image.repo` | `elassandra` image repository | `strapdata/elassandra` |
103 | | `image.tag` | `elassandra` image tag | `6.2.3.7` |
104 | | `image.pullPolicy` | Image pull policy | `Always` if `imageTag` is `latest`, else `IfNotPresent` |
105 | | `image.pullSecrets` | Image pull secrets | `nil` |
106 | | `elasticsearch.enabled` | Enable elasticsearch service | `true` |
107 | | `config.cluster_name` | The name of the cluster. | `elassandra` |
108 | | `config.cluster_size` | The number of nodes in the cluster. | `3` |
109 | | `config.seed_size` | The number of seed nodes used to bootstrap new clients joining the cluster. | `1` |
110 | | `config.num_tokens` | Initdb Arguments | `16` |
111 | | `config.dc_name` | Initdb Arguments | `DC1` |
112 | | `config.rack_name` | Initdb Arguments | `RAC1` |
113 | | `config.endpoint_snitch` | Initdb Arguments | `GossipingPropertyFileSnitch` |
114 | | `config.max_heap_size` | Initdb Arguments | `4096M` |
115 | | `config.heap_new_size` | Initdb Arguments | `512M` |
116 | | `config.ports.cql` | Initdb Arguments | `9042` |
117 | | `config.ports.thrift` | Initdb Arguments | `9160` |
118 | | `config.ports.elasticsearch` | Initdb Arguments | `9200` |
119 | | `config.ports.transport` | Initdb Arguments | `9300` |
120 | | `config.ports.agent` | The port of the JVM Agent (if any) | `nil` |
121 | | `config.start_rpc` | Initdb Arguments | `false` |
122 | | `configs` | Extra configuration mounted in /usr/share/cassandra/conf | |
123 | | `extraVolumeMounts` | Mount extra volume(s), | |
124 | | `extraVolumes` | Extra volumes | |
125 | | `persistence.enabled` | Use a PVC to persist data | `true` |
126 | | `persistence.storageClass` | Storage class of backing PVC | `nil` (uses alpha storage class annotation) |
127 | | `persistence.accessMode` | Use volume as ReadOnly or ReadWrite | `ReadWriteOnce` |
128 | | `persistence.size` | Size of data volume | `10Gi` |
129 | | `resources` | CPU/Memory resource requests/limits | Memory: `4Gi`, CPU: `2` |
130 | | `podManagementPolicy` | podManagementPolicy of the StatefulSet | `OrderedReady` |
131 | | `priorityClassName` | priorityClassName of the StatefulSet managed Pods| `""` |
132 | | `updateStrategy.type` | UpdateStrategy of the StatefulSet | `RollingUpdate` |
133 | | `livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated | `30` |
134 | | `livenessProbe.periodSeconds` | How often to perform the probe | `5` |
135 | | `livenessProbe.timeoutSeconds` | When the probe times out | `5` |
136 | | `livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | `1` |
137 | | `livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | `10` |
138 | | `readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated | `30` |
139 | | `readinessProbe.periodSeconds` | How often to perform the probe | `5` |
140 | | `readinessProbe.timeoutSeconds` | When the probe times out | `5` |
141 | | `readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | `1` |
142 | | `readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | `10` |
143 |
144 | ### Scale elassandra
145 | When you want to change the cluster size of your cassandra, you can use the helm upgrade command.
146 |
147 | ```bash
148 | helm upgrade --set config.cluster_size=5 elassandra incubator/elassandra
149 | ```
150 |
151 | ### Switch form Elassandra / Cassandra
152 | You can switch from Elassandra (Elasticsearch enabled) to pure Cassandra (Elasticsearch disabled) by setting the `elasticsearch.enabled` to `true` or `false`, this change java main class.
153 |
154 | **WARNING**: As soon as you have created one elasticsearch index in your elassandra cluster, the CQL schema requires that all nodes runs the elassandra binaries. Running a node with standard cassandra binaries will causes a *ClassNotFounException* when trying to instanciate the elasticsearch custom secondary index.
155 |
156 | ### Get elassandra status
157 |
158 | You can get your elassandra cluster status by running the command
159 |
160 | ```bash
161 | kubectl exec -it --namespace elassandra $(kubectl get pods --namespace elassandra -l app=elassandra-elassandra -o jsonpath='{.items[0].metadata.name}') nodetool status
162 | ```
163 |
164 | Output
165 | ```bash
166 | Datacenter: asia-east1
167 | ======================
168 | Status=Up/Down
169 | |/ State=Normal/Leaving/Joining/Moving
170 | -- Address Load Tokens Owns (effective) Host ID Rack
171 | UN 10.8.1.11 108.45 KiB 256 66.1% 410cc9da-8993-4dc2-9026-1dd381874c54 a
172 | UN 10.8.4.12 84.08 KiB 256 68.7% 96e159e1-ef94-406e-a0be-e58fbd32a830 c
173 | UN 10.8.3.6 103.07 KiB 256 65.2% 1a42b953-8728-4139-b070-b855b8fff326 b
174 | ```
175 | To check the elasticsearch cluster status:
176 |
177 | ```bash
178 | kubectl exec -it -n elassandra $(kubectl get pods -n elassandra -l app=elassandra,release=elassandra -o jsonpath='{.items[0].metadata.name}') curl http://localhost:9200/_cluster/state?pretty
179 | ```
180 |
181 | To check elasticsearch nodes status:
182 |
183 | ```bash
184 | kubectl exec -it -n elassandra $(kubectl get pods -n elassandra -l app=elassandra,release=elassandra -o jsonpath='{.items[0].metadata.name}') curl http://localhost:9200/_cat/nodes
185 | ```
186 |
187 | To check Elasticsearch indices:
188 |
189 | ```bash
190 | kubectl exec -it -n elassandra $(kubectl get pods -n elassandra -l app=elassandra,release=elassandra -o jsonpath='{.items[0].metadata.name}') curl http://localhost:9200/_cat/indices?v
191 | health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
192 | green open test kVpEHykCR7CT_Xnlastq7A 3 0 1 0 3.5kb 3.5kb
193 | ```
194 |
195 | ## Deploy Kibana
196 |
197 | To install the Kibana chart with the release name `elassandra`:
198 |
199 | ```console
200 | $ helm install --namespace "elassandra" --name kibana --set image.tag=6.2.3 --set env.ELASTICSEARCH_URL="http://elassandra-elasticsearch:9200" stable/kibana
201 | ```
202 |
203 | To forward the kibana port to POD localhost:5601 run the following:
204 |
205 | ```console
206 | kubectl port-forward -n elassandra $(kubectl get pods -n elassandra -l app=kibana -o jsonpath='{ .items[0].metadata.name }') 5601:5601
207 | ```
208 |
209 | ## Benchmark
210 | You can use [cassandra-stress](https://docs.datastax.com/en/cassandra/3.0/cassandra/tools/toolsCStress.html) tool to run the benchmark on the cluster by the following command
211 |
212 | ```bash
213 | kubectl exec -it --namespace elassandra $(kubectl get pods --namespace elassandra -l app=elassandra-elassandra -o jsonpath='{.items[0].metadata.name}') cassandra-stress
214 | ```
215 |
216 | Example of `cassandra-stress` argument
217 | - Run both read and write with ration 9:1
218 | - Operator total 1 million keys with uniform distribution
219 | - Use QUORUM for read/write
220 | - Generate 50 threads
221 | - Generate result in graph
222 | - Use NetworkTopologyStrategy with replica factor 2
223 |
224 | ```bash
225 | cassandra-stress mixed ratio\(write=1,read=9\) n=1000000 cl=QUORUM -pop dist=UNIFORM\(1..1000000\) -mode native cql3 -rate threads=50 -log file=~/mixed_autorate_r9w1_1M.log -graph file=test2.html title=test revision=test2 -schema "replication(strategy=NetworkTopologyStrategy, factor=2)"
226 | ```
227 |
228 | ## Advanced configuration
229 |
230 | Additional configurations defined under **configs** are exposed as configMap mounted in */usr/share/cassandra/conf*.
231 |
232 | ## Acknowledgment
233 |
234 | This HELM chart is largely based from the [cassandra charts](https://github.com/strapdata/charts/tree/master/incubator/cassandra) maintained by **KongZ**.
235 |
--------------------------------------------------------------------------------
/charts/elassandra/sample/create-storage-gce.yaml:
--------------------------------------------------------------------------------
1 | kind: StorageClass
2 | apiVersion: storage.k8s.io/v1
3 | metadata:
4 | name: generic
5 | provisioner: kubernetes.io/gce-pd
6 | parameters:
7 | type: pd-ssd
8 |
--------------------------------------------------------------------------------
/charts/elassandra/templates/NOTES.txt:
--------------------------------------------------------------------------------
1 | Elassandra can be accessed through CQL ({{ .Values.config.ports.cql }}/tcp) and HTTP Elasticsearch (9200/tcp) on the clustered services cassandra and elasticsearch or on each node {{ template "elassandra.fullname" . }}-.
2 |
3 | Check your cassandra cluster status:
4 | kubectl exec -it -n {{ .Release.Namespace }} $(kubectl get pods -n {{ .Release.Namespace }} -l app={{ template "elassandra.name" . }},release={{ .Release.Name }} -o jsonpath='{.items[0].metadata.name}') -- nodetool status
5 |
6 | Check your Elasticsearch cluster status, nodes or indices:
7 | kubectl exec -it -n {{ .Release.Namespace }} $(kubectl get pods -n {{ .Release.Namespace }} -l app={{ template "elassandra.name" . }},release={{ .Release.Name }} -o jsonpath='{.items[0].metadata.name}') -- curl http://localhost:9200/_cluster/state?pretty
8 | kubectl exec -it -n {{ .Release.Namespace }} $(kubectl get pods -n {{ .Release.Namespace }} -l app={{ template "elassandra.name" . }},release={{ .Release.Name }} -o jsonpath='{.items[0].metadata.name}') -- curl http://localhost:9200/_cat/nodes
9 | kubectl exec -it -n {{ .Release.Namespace }} $(kubectl get pods -n {{ .Release.Namespace }} -l app={{ template "elassandra.name" . }},release={{ .Release.Name }} -o jsonpath='{.items[0].metadata.name}') -- curl http://localhost:9200/_cat/indices?v
10 |
11 | To index a JSON document in Elassandra, run:
12 | kubectl exec -it -n {{ .Release.Namespace }} $(kubectl get pods -n {{ .Release.Namespace }} -l app={{ template "elassandra.name" . }},release={{ .Release.Name }} -o jsonpath='{.items[0].metadata.name}') -- curl -XPUT -H "Content-Type: application/json" http://localhost:9200/test/mytype/1 -d '{ "foo":"bar" }'
13 |
14 | If you want to connect to the Cassandra CQL run the following:
15 | kubectl exec -it -n {{ .Release.Namespace }} $(kubectl get pods -n {{ .Release.Namespace }} -l "app={{ template "elassandra.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") -- cqlsh
16 |
17 | Elassandra pod logs:
18 | kubectl logs -f -n {{ .Release.Namespace }} $(kubectl get pods -n {{ .Release.Namespace }} -l app={{ template "elassandra.name" . }},release={{ .Release.Name }} -o jsonpath='{ .items[0].metadata.name }')
19 |
20 | To forward the API port to localhost:9042 run the following:
21 | - kubectl port-forward -n {{ .Release.Namespace }} $(kubectl get pods -n {{ .Release.Namespace }} -l app={{ template "elassandra.name" . }},release={{ .Release.Name }} -o jsonpath='{ .items[0].metadata.name }') 9042:{{ .Values.config.ports.cql }}
22 |
23 | {{- if not .Values.persistence.enabled }}
24 | Note that the cluster is running with node-local storage instead of PersistentVolumes. In order to prevent data loss,
25 | pods will be decommissioned upon termination. Decommissioning may take some time, so you might also want to adjust the
26 | pod termination gace period, which is currently set to {{ .Values.podSettings.terminationGracePeriodSeconds }} seconds.
27 | {{- end}}
28 |
--------------------------------------------------------------------------------
/charts/elassandra/templates/_helpers.tpl:
--------------------------------------------------------------------------------
1 | {{/* vim: set filetype=mustache: */}}
2 | {{/*
3 | Expand the name of the chart.
4 | */}}
5 | {{- define "elassandra.name" -}}
6 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
7 | {{- end -}}
8 |
9 | {{/*
10 | Create a default fully qualified app name.
11 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
12 | If release name contains chart name it will be used as a full name.
13 | */}}
14 | {{- define "elassandra.fullname" -}}
15 | {{- if .Values.fullnameOverride -}}
16 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
17 | {{- else -}}
18 | {{- $name := default .Chart.Name .Values.nameOverride -}}
19 | {{- if contains $name .Release.Name -}}
20 | {{- .Release.Name | trunc 63 | trimSuffix "-" -}}
21 | {{- else -}}
22 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
23 | {{- end -}}
24 | {{- end -}}
25 | {{- end -}}
26 |
27 | {{/*
28 | Create chart name and version as used by the chart label.
29 | */}}
30 | {{- define "elassandra.chart" -}}
31 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
32 | {{- end -}}
33 |
--------------------------------------------------------------------------------
/charts/elassandra/templates/configmap-configs.yaml:
--------------------------------------------------------------------------------
1 | # Config files mounted in /usr/share/cassandra/conf
2 | # (it cannot be mounted in /etc/cassandra because chowned to cassandra in the docker-entrypoint.sh)
3 | {{- if .Values.configs }}
4 | apiVersion: v1
5 | kind: ConfigMap
6 | metadata:
7 | name: {{ template "elassandra.fullname" . }}-configs
8 | namespace: {{ .Release.Namespace }}
9 | labels:
10 | app: {{ template "elassandra.name" . }}
11 | chart: {{ template "elassandra.chart" . }}
12 | release: {{ .Release.Name }}
13 | heritage: {{ .Release.Service }}
14 | {{- if .Values.extraLabels }}
15 | {{ toYaml .Values.extraLabels | indent 4 }}
16 | {{- end }}
17 | data:
18 | {{- range $key, $val := .Values.configs }}
19 | {{ $key }}: |-
20 | {{ $val | indent 4 }}
21 | {{- end }}
22 | {{- end }}
23 |
--------------------------------------------------------------------------------
/charts/elassandra/templates/configmap-scripts.yaml:
--------------------------------------------------------------------------------
1 | # Scripts files mounted in /usr/share/cassandra/scripts
2 | {{- if .Values.scripts }}
3 | apiVersion: v1
4 | kind: ConfigMap
5 | metadata:
6 | name: {{ template "elassandra.fullname" . }}-scripts
7 | namespace: {{ .Release.Namespace }}
8 | labels:
9 | app: {{ template "elassandra.name" . }}
10 | chart: {{ template "elassandra.chart" . }}
11 | release: {{ .Release.Name }}
12 | heritage: {{ .Release.Service }}
13 | {{- if .Values.extraLabels }}
14 | {{ toYaml .Values.extraLabels | indent 4 }}
15 | {{- end }}
16 | data:
17 | {{- range $key, $val := .Values.scripts }}
18 | {{ $key }}: |-
19 | {{ $val | indent 4 }}
20 | {{- end }}
21 | {{- end }}
22 |
--------------------------------------------------------------------------------
/charts/elassandra/templates/service-cassandra.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | name: {{ .Release.Name }}-cassandra
5 | namespace: {{ .Release.Namespace }}
6 | labels:
7 | app: {{ template "elassandra.name" . }}
8 | chart: {{ template "elassandra.chart" . }}
9 | release: {{ .Release.Name }}
10 | heritage: {{ .Release.Service }}
11 | spec:
12 | type: ClusterIP
13 | ports:
14 | - name: cql
15 | port: {{ default 9042 .Values.config.ports.cql }}
16 | targetPort: {{ default 9042 .Values.config.ports.cql }}
17 | - name: thrift
18 | port: {{ default 9160 .Values.config.ports.thrift }}
19 | targetPort: {{ default 9160 .Values.config.ports.thrift }}
20 | selector:
21 | app: {{ template "elassandra.name" . }}
22 | release: {{ .Release.Name }}
23 |
--------------------------------------------------------------------------------
/charts/elassandra/templates/service-elasticsearch.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.elasticsearch.enabled -}}
2 | apiVersion: v1
3 | kind: Service
4 | metadata:
5 | name: {{ .Release.Name }}-elasticsearch
6 | namespace: {{ .Release.Namespace }}
7 | labels:
8 | app: {{ template "elassandra.name" . }}
9 | chart: {{ template "elassandra.chart" . }}
10 | release: {{ .Release.Name }}
11 | heritage: {{ .Release.Service }}
12 | spec:
13 | type: ClusterIP
14 | ports:
15 | - name: elasticsearch
16 | port: {{ default 9200 .Values.config.ports.elasticsearch }}
17 | targetPort: {{ default 9200 .Values.config.ports.elasticsearch }}
18 | selector:
19 | app: {{ template "elassandra.name" . }}
20 | release: {{ .Release.Name }}
21 | {{- end -}}
--------------------------------------------------------------------------------
/charts/elassandra/templates/service.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | name: {{ template "elassandra.fullname" . }}
5 | namespace: {{ .Release.Namespace }}
6 | annotations:
7 | # https://github.com/kubernetes/examples/issues/89
8 | service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
9 | labels:
10 | app: {{ template "elassandra.name" . }}
11 | chart: {{ template "elassandra.chart" . }}
12 | release: {{ .Release.Name }}
13 | heritage: {{ .Release.Service }}
14 | spec:
15 | clusterIP: None
16 | ports:
17 | - name: jmx
18 | port: 7199
19 | targetPort: 7199
20 | - name: intra
21 | port: 7000
22 | targetPort: 7000
23 | - name: tls
24 | port: 7001
25 | targetPort: 7001
26 | - name: transport
27 | port: {{ default 9300 .Values.config.ports.transport }}
28 | targetPort: {{ default 9300 .Values.config.ports.transport }}
29 | - name: cql
30 | port: {{ default 9042 .Values.config.ports.cql }}
31 | targetPort: {{ default 9042 .Values.config.ports.cql }}
32 | - name: thrift
33 | port: {{ default 9160 .Values.config.ports.thrift }}
34 | targetPort: {{ default 9160 .Values.config.ports.thrift }}
35 | - name: elasticsearch
36 | port: {{ default 9200 .Values.config.ports.elasticsearch }}
37 | targetPort: {{ default 9200 .Values.config.ports.elasticsearch }}
38 | {{- if .Values.config.ports.agent }}
39 | - name: agent
40 | port: {{ .Values.config.ports.agent }}
41 | targetPort: {{ .Values.config.ports.agent }}
42 | {{- end }}
43 | {{- if .Values.debug.enabled }}
44 | - name: jdwp
45 | port: {{ default 4242 .Values.debug.port }}
46 | targetPort: {{ default 4242 .Values.debug.port }}
47 | {{- end }}
48 | selector:
49 | app: {{ template "elassandra.name" . }}
50 | release: {{ .Release.Name }}
51 |
--------------------------------------------------------------------------------
/charts/elassandra/templates/statefulset.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: apps/v1
2 | kind: StatefulSet
3 | metadata:
4 | name: {{ template "elassandra.fullname" . }}
5 | labels:
6 | app: {{ template "elassandra.name" . }}
7 | chart: {{ template "elassandra.chart" . }}
8 | release: {{ .Release.Name }}
9 | heritage: {{ .Release.Service }}
10 | spec:
11 | selector:
12 | matchLabels:
13 | app: {{ template "elassandra.name" . }}
14 | release: {{ .Release.Name }}
15 | serviceName: {{ template "elassandra.fullname" . }}
16 | replicas: {{ .Values.config.cluster_size }}
17 | podManagementPolicy: {{ .Values.podManagementPolicy }}
18 | updateStrategy:
19 | type: RollingUpdate
20 | template:
21 | metadata:
22 | labels:
23 | app: {{ template "elassandra.name" . }}
24 | release: {{ .Release.Name }}
25 | {{- if .Values.podLabels }}
26 | {{ toYaml .Values.podLabels | indent 8 }}
27 | {{- end }}
28 | {{- if .Values.annotations }}
29 | annotations:
30 | {{ toYaml .Values.annotations | indent 8 }}
31 | {{- end }}
32 | spec:
33 | {{- if .Values.selector }}
34 | {{ toYaml .Values.selector | indent 6 }}
35 | {{- end }}
36 | {{- if .Values.securityContext.enabled }}
37 | securityContext:
38 | fsGroup: {{ default 999 .Values.securityContext.fsGroup }}
39 | runAsUser: {{ default 999 .Values.securityContext.runAsUser }}
40 | {{- end }}
41 | {{- if .Values.affinity }}
42 | affinity:
43 | {{ toYaml .Values.affinity | indent 8 }}
44 | {{- end }}
45 | initContainers:
46 | - name: increase-vm-max-map-count
47 | image: busybox
48 | imagePullPolicy: IfNotPresent
49 | command: ["sysctl", "-w", "vm.max_map_count=1048575"]
50 | securityContext:
51 | privileged: true
52 | - name: increase-ulimit
53 | image: busybox
54 | command: [ "sh","-c","ulimit -l unlimited" ]
55 | securityContext:
56 | privileged: true
57 | containers:
58 | - name: {{ template "elassandra.fullname" . }}
59 | image: "{{ .Values.image.repo }}:{{ .Values.image.tag }}"
60 | imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
61 | terminationMessagePolicy: "FallbackToLogsOnError"
62 | securityContext:
63 | privileged: false
64 | # applying fix in: https://github.com/kubernetes/kubernetes/issues/3595#issuecomment-287692878
65 | # https://docs.docker.com/engine/reference/run/#operator-exclusive-options
66 | capabilities:
67 | add: ["IPC_LOCK", "SYS_RESOURCE"]
68 | resources:
69 | {{ toYaml .Values.resources | indent 10 }}
70 | env:
71 | {{- $seed_size := default 1 .Values.config.seed_size | int -}}
72 | {{- $global := . }}
73 | - name: CASSANDRA_SEEDS
74 | value: "{{- range $i, $e := until $seed_size }}{{ template "elassandra.fullname" $global }}-{{ $i }}.{{ template "elassandra.fullname" $global }}.{{ $global.Release.Namespace }}.svc.cluster.local{{- if (lt ( add1 $i ) $seed_size ) }},{{- end }}{{- end }}"
75 | - name: MAX_HEAP_SIZE
76 | value: {{ default "2048M" .Values.config.max_heap_size | quote }}
77 | - name: HEAP_NEWSIZE
78 | value: {{ default "200M" .Values.config.heap_new_size | quote }}
79 | - name: CASSANDRA_ENDPOINT_SNITCH
80 | value: {{ default "GossipingPropertyFileSnitch" .Values.config.endpoint_snitch | quote }}
81 | - name: CASSANDRA_CLUSTER_NAME
82 | value: {{ default "Elassandra" .Values.config.cluster_name | quote }}
83 | - name: CASSANDRA_DC
84 | value: {{ default "DC1" .Values.config.dc_name | quote }}
85 | - name: CASSANDRA_RACK
86 | value: {{ default "RAC1" .Values.config.rack_name | quote }}
87 | - name: CASSANDRA_START_RPC
88 | value: {{ default "false" .Values.config.start_rpc | quote }}
89 | - name: CASSANDRA_DAEMON
90 | value: {{- if .Values.elasticsearch.enabled }} "org.apache.cassandra.service.ElassandraDaemon" {{ else }} "org.apache.cassandra.service.CassandraDaemon" {{- end }}
91 | - name: JVM_DEBUG_PORT
92 | value: {{ default "4242" .Values.debug.port | quote }}
93 | - name: POD_IP
94 | valueFrom:
95 | fieldRef:
96 | fieldPath: status.podIP
97 | - name: POD_NAME
98 | valueFrom:
99 | fieldRef:
100 | fieldPath: metadata.name
101 | - name: NAMESPACE
102 | valueFrom:
103 | fieldRef:
104 | fieldPath: metadata.namespace
105 | - name: PERSISTENCE_ENABLED
106 | value: "{{ default false .Values.persistence.enabled }}"
107 | {{- range $key, $val := .Values.env }}
108 | - name: {{ $key }}
109 | value: {{ $val | quote }}
110 | {{- end }}
111 | livenessProbe:
112 | tcpSocket:
113 | port: 7000
114 | initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
115 | periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
116 | timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
117 | successThreshold: {{ .Values.livenessProbe.successThreshold }}
118 | failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
119 | readinessProbe:
120 | exec:
121 | command: [ "/bin/bash", "-c", "/ready-probe.sh" ]
122 | initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
123 | periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
124 | timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
125 | successThreshold: {{ .Values.readinessProbe.successThreshold }}
126 | failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
127 | ports:
128 | - name: intra
129 | containerPort: 7000
130 | - name: tls
131 | containerPort: 7001
132 | - name: jmx
133 | containerPort: 7199
134 | - name: cql
135 | containerPort: {{ default 9042 .Values.config.ports.cql }}
136 | - name: thrift
137 | containerPort: {{ default 9160 .Values.config.ports.thrift }}
138 | - name: elasticsearch
139 | containerPort: {{ default 9200 .Values.config.ports.elasticsearch }}
140 | - name: transport
141 | containerPort: {{ default 9300 .Values.config.ports.transport }}
142 | {{- if .Values.config.ports.agent }}
143 | - name: agent
144 | containerPort: {{ .Values.config.ports.agent }}
145 | {{- end }}
146 | {{- if .Values.debug.enabled }}
147 | - name: jdwp
148 | containerPort: {{ default 4242 .Values.debug.port }}
149 | args: ["-f", "-d" ]
150 | {{- end }}
151 | volumeMounts:
152 | - name: data
153 | mountPath: /var/lib/cassandra
154 | {{- range $key, $val := .Values.scripts }}
155 | - name: scripts-volume
156 | mountPath: /usr/share/cassandra/scripts/{{ $key }}
157 | subPath: {{ $key }}
158 | {{- end }}
159 | {{- range $key, $val := .Values.configs }}
160 | - name: configs-volume
161 | mountPath: /usr/share/cassandra/conf/{{ $key }}
162 | subPath: {{ $key }}
163 | {{- end }}
164 | {{- if .Values.extraVolumeMounts }}
165 | {{ toYaml .Values.extraVolumeMounts | indent 8 }}
166 | {{- end }}
167 | lifecycle:
168 | preStop:
169 | exec:
170 | command: ["/bin/sh", "-c", "exec nodetool drain"]
171 | terminationGracePeriodSeconds: {{ default 30 .Values.podSettings.terminationGracePeriodSeconds }}
172 | {{- if .Values.priorityClassName }}
173 | priorityClassName: {{ .Values.priorityClassName }}
174 | {{- end }}
175 | {{- if .Values.image.pullSecrets }}
176 | imagePullSecrets:
177 | - name: {{ .Values.image.pullSecrets }}
178 | {{- end }}
179 | volumes:
180 | - name: scripts-volume
181 | configMap:
182 | name: {{ template "elassandra.fullname" . }}-scripts
183 | {{- if .Values.configs }}
184 | - name: configs-volume
185 | configMap:
186 | name: {{ template "elassandra.fullname" . }}-configs
187 | {{- end }}
188 | {{- if not .Values.persistence.enabled }}
189 | - name: data
190 | emptyDir: {}
191 | {{- else }}
192 | {{- if .Values.extraVolumes }}
193 | {{ toYaml .Values.extraVolumes | indent 6 }}
194 | {{- end }}
195 | volumeClaimTemplates:
196 | - metadata:
197 | name: data
198 | labels:
199 | app: {{ template "elassandra.name" . }}
200 | chart: {{ template "elassandra.chart" . }}
201 | release: {{ .Release.Name }}
202 | heritage: {{ .Release.Service }}
203 | spec:
204 | accessModes:
205 | - {{ .Values.persistence.accessMode | quote }}
206 | resources:
207 | requests:
208 | storage: {{ .Values.persistence.size | quote }}
209 | {{- if .Values.persistence.storageClass }}
210 | {{- if (eq "-" .Values.persistence.storageClass) }}
211 | storageClassName: ""
212 | {{- else }}
213 | storageClassName: "{{ .Values.persistence.storageClass }}"
214 | {{- end }}
215 | {{- end }}
216 | {{- end }}
217 |
--------------------------------------------------------------------------------
/charts/elassandra/values.yaml:
--------------------------------------------------------------------------------
1 | ## Elassandra image version
2 | ## ref: https://hub.docker.com/r/strapdata/
3 | image:
4 | repo: "strapdata/elassandra"
5 | tag: "latest"
6 | pullPolicy: IfNotPresent
7 | ## Specify ImagePullSecrets for Pods
8 | ## ref: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
9 | # pullSecrets: myregistrykey
10 |
11 | ## Persist data to a persistent volume
12 | persistence:
13 | enabled: true
14 | ## cassandra data Persistent Volume Storage Class
15 | ## If defined, storageClassName:
16 | ## If set to "-", storageClassName: "", which disables dynamic provisioning
17 | ## If undefined (the default) or set to null, no storageClassName spec is
18 | ## set, choosing the default provisioner. (gp2 on AWS, standard on
19 | ## GKE, AWS & OpenStack)
20 | ##
21 | storageClass: ""
22 | accessMode: ReadWriteOnce
23 | size: 10Gi
24 |
25 | ## Configure resource requests and limits
26 | ## ref: http://kubernetes.io/docs/user-guide/compute-resources/
27 | ## Minimum memory for development is 4GB and 2 CPU cores
28 | ## Minimum memory for production is 8GB and 4 CPU cores
29 | ## ref: http://docs.datastax.com/en/archived/cassandra/2.0/cassandra/architecture/architecturePlanningHardware_c.html
30 | resources: {}
31 | # requests:
32 | # memory: 4Gi
33 | # cpu: 2
34 | # limits:
35 | # memory: 4Gi
36 | # cpu: 2
37 |
38 | ## Change cassandra configuration parameters below:
39 | ## ref: http://docs.datastax.com/en/cassandra/3.0/cassandra/configuration/configCassandra_yaml.html
40 | ## Recommended max heap size is 1/2 of system memory
41 | ## Recommeneed heap new size is 1/4 of max heap size
42 | ## ref: http://docs.datastax.com/en/cassandra/3.0/cassandra/operations/opsTuneJVM.html
43 | config:
44 | cluster_name: elassandra
45 | cluster_size: 1
46 | seed_size: 1
47 | num_tokens: 16
48 | # If you want Cassandra to use this datacenter and rack name,
49 | # you need to set endpoint_snitch to GossipingPropertyFileSnitch.
50 | # Otherwise, these values are ignored and datacenter1 and rack1
51 | # are used.
52 | dc_name: DC1
53 | rack_name: RAC1
54 | endpoint_snitch: GossipingPropertyFileSnitch
55 | max_heap_size: 2048M
56 | heap_new_size: 512M
57 | start_rpc: false
58 | ports:
59 | cql: 9042
60 | thrift: 9160
61 | # If a JVM Agent is in place
62 | agent: 7500
63 |
64 | ## Elasticsearch enable/disabled by setting the java main class to org.apache.cassandra.service.ElassandraDaemon/org.apache.cassandra.service.CassandraDaemon
65 | elasticsearch:
66 | enabled: true
67 |
68 | # Enable JDWP for java debugging
69 | debug:
70 | enabled: true
71 | port: 4242
72 |
73 | ## Liveness and Readiness probe values.
74 | ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/
75 | livenessProbe:
76 | initialDelaySeconds: 30
77 | periodSeconds: 15
78 | timeoutSeconds: 5
79 | successThreshold: 1
80 | failureThreshold: 4
81 | readinessProbe:
82 | initialDelaySeconds: 30
83 | periodSeconds: 15
84 | timeoutSeconds: 5
85 | successThreshold: 1
86 | failureThreshold: 4
87 |
88 | ## Additional pod-level settings
89 | podSettings:
90 | # Change this to give pods more time to properly leave the cluster when not using persistent storage.
91 | terminationGracePeriodSeconds: 300
92 |
93 | podManagementPolicy: OrderedReady
94 |
95 | ## Pod Security Context
96 | securityContext:
97 | enabled: false
98 | fsGroup: 999
99 | runAsUser: 999
100 |
101 | # Additional env variables
102 | env:
103 | JVM_OPTS: "-Dcassandra.ring_delay_ms=60000 -XX:+ExitOnOutOfMemoryError -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:MaxRAMFraction=2"
104 |
105 | ## Extra config files mounted in /etc/cassandra.
106 | configs: []
107 |
108 | ## Extra scripts mounted in /usr/share/cassandra/scripts
109 | scripts:
110 | postStart.sh: |-
111 | #!/bin/bash
112 | echo "Elassandra started"
113 | exit 0
114 | preStop.sh: |-
115 | #!/bin/sh
116 | set -x
117 |
118 | gracefull_stop() {
119 | nodetool disablethrift
120 | nodetool disablebinary
121 | nodetool disablegossip
122 | nodetool flush
123 | nodetool drain
124 | nodetool stop
125 | nodetool stopdaemon
126 | }
127 |
128 | while [ $(nodetool status | awk "/$CASSANDRA_RACK/{ print \$1,\$2 }" | grep -v $POD_IP | awk '{ print $1 }' | grep -v UN) -eq 0 ] ; do
129 | echo "Waiting all nodes to recover a NORMAL status"
130 | sleep 5
131 | pidof java || exit 1
132 | done
133 |
134 | if [ "$PERSISTENCE_ENABLED" == "true" ]; then
135 | gracefull_stop
136 | else
137 | nodetool decommission
138 | fi
139 | exit 0
140 | ## Extra volumes containing additional files mounted in /usr/share/cassandra/conf.
141 | ## (eg. CA certificates)
142 | ## Ref: https://kubernetes.io/docs/concepts/storage/volumes/
143 | ##
144 | extraVolumes: []
145 |
146 | ## Extra volume mounts elassandra pod.
147 | ## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-volume-storage/
148 | ##
149 | extraVolumeMounts: []
150 |
151 | ## Additional pod labels
152 | ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
153 | podLabels: {}
154 |
155 | ## Additional annotations
156 | ## https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
157 | annotations: {}
158 |
159 | ## Name of Priority Class to assign pods
160 | # priorityClassName: ""
161 |
162 | ## Configure node selector. Edit code below for adding selector to pods
163 | ## ref: https://kubernetes.io/docs/user-guide/node-selection/
164 | # selector:
165 | # nodeSelector:
166 | # cloud.google.com/gke-nodepool: pool-db
167 | # selector:
168 | # nodeSelector:
169 | # node-role.kubernetes.io/node: "true"
170 |
171 | ## Affinity for pod assignment
172 | ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
173 | # affinity:
174 | # podAntiAffinity:
175 | # requiredDuringSchedulingIgnoredDuringExecution:
176 | # - labelSelector:
177 | # matchExpressions:
178 | # - key: app
179 | # operator: In
180 | # values:
181 | # - elassandra
182 | # topologyKey: "kubernetes.io/hostname"
183 |
--------------------------------------------------------------------------------
/charts/fluent-bit/Chart.yaml:
--------------------------------------------------------------------------------
1 | name: fluent-bit
2 | version: 0.11.1
3 | appVersion: 0.13.0
4 | description: Fast and Lightweight Log/Data Forwarder for Linux, BSD and OSX
5 | keywords:
6 | - logging
7 | - monitoring
8 | - fluent
9 | - fluentd
10 | sources:
11 | - http://fluentbit.io
12 | icon: http://fluentbit.io/assets/img/logo1-default.png
13 | home: http://fluentbit.io
14 | maintainers:
15 | - name: kfox1111
16 | email: Kevin.Fox@pnnl.gov
17 | - name: edsiper
18 | email: eduardo@treasure-data.com
19 |
--------------------------------------------------------------------------------
/charts/fluent-bit/README.md:
--------------------------------------------------------------------------------
1 | # Fluent-Bit Chart for Elassandra
2 |
3 | [Fluent Bit](http://fluentbit.io/) is an open source and multi-platform Log Forwarder.
4 |
5 | ## Chart Details
6 |
7 | This chart will do the following:
8 |
9 | * Install a configmap for Fluent Bit
10 | * Load Elasticsearch template and pipeline for Elassandra
11 | * Install a daemonset that provisions Fluent Bit [per-host architecture]
12 |
13 | ## Installing the Chart
14 |
15 | To install the chart with the release name `my-release`:
16 |
17 | ```bash
18 | $ helm install --name my-release strapdata/fluent-bit
19 | ```
20 |
21 | When installing this chart on [Minikube](https://kubernetes.io/docs/getting-started-guides/minikube/), it's required to specify that so the DaemonSet will be able to mount the log files properly, make sure to append the _--set on\_minikube=true_ option at the end of the _helm_ command, e.g:
22 |
23 | ```bash
24 | $ helm install --name my-release strapdata/fluent-bit --set on_minikube=true
25 | ```
26 |
27 | ## Configuration
28 |
29 | The following table lists the configurable parameters of the Fluent-Bit chart and the default values.
30 |
31 | | Parameter | Description | Default |
32 | | ----------------------- | ---------------------------------- | ----------------------- |
33 | | **Backend Selection** |
34 | | `backend.type` | Set the backend to which Fluent-Bit should flush the information it gathers | `forward` |
35 | | **Forward Backend** |
36 | | `backend.forward.host` | Target host where Fluent-Bit or Fluentd are listening for Forward messages | `fluentd` |
37 | | `backend.forward.port` | TCP Port of the target service | `24284` |
38 | | **ElasticSearch Backend** |
39 | | `backend.es.host` | IP address or hostname of the target Elasticsearch instance | `elasticsearch` |
40 | | `backend.es.port` | TCP port of the target Elasticsearch instance. | `9200` |
41 | | `backend.es.index` | Elastic Index name | `kubernetes_cluster` |
42 | | `backend.es.type` | Elastic Type name | `flb_type` |
43 | | `backend.es.time_key` | Elastic Time Key | `@timestamp` |
44 | | `backend.es.logstash_prefix` | Index Prefix. If Logstash_Prefix is equals to 'mydata' your index will become 'mydata-YYYY.MM.DD'. | `kubernetes_cluster` |
45 | | `backend.es.http_user` | Optional username credential for Elastic X-Pack access. | `` |
46 | | `backend.es.http_passwd:` | Password for user defined in HTTP_User. | `` |
47 | | `backend.es.tls` | Enable or disable TLS support | `off` |
48 | | `backend.es.tls_verify` | Force certificate validation | `on` |
49 | | `backend.es.tls_ca` | TLS CA certificate for the Elastic instance (in PEM format). Specify if tls: on. | `` |
50 | | `backend.es.tls_debug` | Set TLS debug verbosity level. It accept the following values: 0-4 | `1` |
51 | | **HTTP Backend** |
52 | | `backend.http.host` | IP address or hostname of the target HTTP Server | `127.0.0.1` |
53 | | `backend.http.port` | TCP port of the target HTTP Server | `80` |
54 | | `backend.http.uri` | Specify an optional HTTP URI for the target web server, e.g: /something | `"/"`
55 | | `backend.http.format` | Specify the data format to be used in the HTTP request body, by default it uses msgpack, optionally it can be set to json. | `msgpack` |
56 | | **Splunk Backend** |
57 | | `backend.splunk.host` | IP address or hostname of the target Splunk Server | `127.0.0.1` |
58 | | `backend.splunk.port` | TCP port of the target Splunk Server | `8088` |
59 | | `backend.splunk.token` | Specify the Authentication Token for the HTTP Event Collector interface. | `` |
60 | | `backend.splunk.send_raw` | If enabled, record keys and values are set in the main map. | `off` |
61 | | `backend.splunk.tls` | Enable or disable TLS support | `on` |
62 | | `backend.splunk.tls_verify` | Force TLS certificate validation | `off` |
63 | | `backend.splunk.message_key` | Tag applied to all incoming logs | `kubernetes` |
64 | | **Parsers** |
65 | | `parsers.enabled` | Enable custom parsers | `false` |
66 | | `parsers.regex` | List of regex parsers | `NULL` |
67 | | `parsers.json` | List of json parsers | `NULL` |
68 | | **General** |
69 | | `annotations` | Optional deamonset set annotations | `NULL` |
70 | | `podAnnotations` | Optional pod annotations | `NULL` |
71 | | `existingConfigMap` | ConfigMap override | `` |
72 | | `extraVolumeMounts` | Mount an extra volume, required to mount ssl certificates when elasticsearch has tls enabled | |
73 | | `extraVolume` | Extra volume | |
74 | | `filter.kubeURL` | Optional custom configmaps | `https://kubernetes.default.svc:443` |
75 | | `filter.kubeCAFile` | Optional custom configmaps | `/var/run/secrets/kubernetes.io/serviceaccount/ca.crt` |
76 | | `filter.kubeTokenFile` | Optional custom configmaps | `/var/run/secrets/kubernetes.io/serviceaccount/token` |
77 | | `filter.kubeTag` | Optional top-level tag for matching in filter | `kube` |
78 | | `image.fluent_bit.repository` | Image | `fluent/fluent-bit` |
79 | | `image.fluent_bit.tag` | Image tag | `0.13.0` |
80 | | `image.pullPolicy` | Image pull policy | `Always` |
81 | | `rbac.create` | Specifies whether RBAC resources should be created. | `true` |
82 | | `serviceAccount.create` | Specifies whether a ServiceAccount should be created. | `true` |
83 | | `serviceAccount.name` | The name of the ServiceAccount to use. | `NULL` |
84 | | `resources.limits.cpu` | CPU limit | `100m` |
85 | | `resources.limits.memory` | Memory limit | `500Mi` |
86 | | `resources.requests.cpu` | CPU request | `100m` |
87 | | `resources.requests.memory` | Memory request | `200Mi` |
88 | | `tolerations` | Optional daemonset tolerations | `NULL` |
89 | | `nodeSelector` | Node labels for fluent-bit pod assignment | `NULL` |
90 | | `metrics.enabled` | Specifies whether a service for metrics should be exposed | `false` |
91 | | `metrics.service.port` | Port on where metrics should be exposed | `2020` |
92 | | `metrics.service.type` | Service type for metrics | `ClusterIP` |
93 | | `trackOffsets` | Specify whether to track the file offsets for tailing docker logs. This allows fluent-bit to pick up where it left after pod restarts but requires access to a `hostPath` | `false` |
94 | | | | |
95 |
96 |
97 | Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.
98 |
99 | Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,
100 |
101 | ```bash
102 | $ helm install --name my-release -f values.yaml stable/fluent-bit
103 | ```
104 |
105 | > **Tip**: You can use the default [values.yaml](values.yaml)
106 |
--------------------------------------------------------------------------------
/charts/fluent-bit/templates/NOTES.txt:
--------------------------------------------------------------------------------
1 | fluent-bit is now running.
2 |
3 | {{- if eq .Values.backend.type "forward" }}
4 |
5 | It will forward all container logs to the svc named {{ .Values.backend.forward.host }} on port: {{ .Values.backend.forward.port }}
6 | {{- else if eq .Values.backend.type "es" }}
7 |
8 | It will forward all container logs to the svc named {{ .Values.backend.es.host }} on port: {{ .Values.backend.es.port }}
9 | {{- else if eq .Values.backend.type "http" }}
10 |
11 | It will forward all container logs to the svc named {{ .Values.backend.http.host }} on port: {{ .Values.backend.http.port }}
12 | {{- else if eq .Values.backend.type "splunk" }}
13 |
14 | It will forward all container logs to the svc named {{ .Values.backend.splunk.host }} on port: {{ .Values.backend.splunk.port }}
15 | {{- end }}
16 |
--------------------------------------------------------------------------------
/charts/fluent-bit/templates/_helpers.tpl:
--------------------------------------------------------------------------------
1 | {{/* vim: set filetype=mustache: */}}
2 | {{/*
3 | Expand the name of the chart.
4 | */}}
5 | {{- define "fluent-bit.name" -}}
6 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
7 | {{- end -}}
8 |
9 | {{/*
10 | Create a default fully qualified app name.
11 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
12 | */}}
13 | {{- define "fluent-bit.fullname" -}}
14 | {{- $name := default .Chart.Name .Values.nameOverride -}}
15 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
16 | {{- end -}}
17 |
18 | {{/*
19 | Return the appropriate apiVersion for RBAC APIs.
20 | */}}
21 | {{- define "rbac.apiVersion" -}}
22 | {{- if .Capabilities.APIVersions.Has "v1" -}}
23 | rbac.authorization.k8s.io/v1
24 | {{- else if .Capabilities.APIVersions.Has "v1beta1" -}}
25 | rbac.authorization.k8s.io/v1beta1
26 | {{- else -}}
27 | rbac.authorization.k8s.io/v1alpha1
28 | {{- end -}}
29 | {{- end -}}
30 |
31 | {{/*
32 | Create the name of the service account to use
33 | */}}
34 | {{- define "fluent-bit.serviceAccountName" -}}
35 | {{- if .Values.serviceAccount.create -}}
36 | {{ default (include "fluent-bit.fullname" .) .Values.serviceAccount.name }}
37 | {{- else -}}
38 | {{ default "default" .Values.serviceAccount.name }}
39 | {{- end -}}
40 | {{- end -}}
41 |
42 |
--------------------------------------------------------------------------------
/charts/fluent-bit/templates/cluster-role.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.rbac.create -}}
2 | apiVersion: {{ template "rbac.apiVersion" . }}
3 | kind: ClusterRole
4 | metadata:
5 | labels:
6 | app: {{ template "fluent-bit.name" . }}
7 | chart: {{ .Chart.Name }}-{{ .Chart.Version }}
8 | heritage: {{ .Release.Service }}
9 | release: {{ .Release.Name }}
10 | name: {{ template "fluent-bit.fullname" . }}
11 | rules:
12 | - apiGroups:
13 | - ""
14 | resources:
15 | - pods
16 | verbs:
17 | - get
18 | {{- end -}}
19 |
--------------------------------------------------------------------------------
/charts/fluent-bit/templates/cluster-rolebinding.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.rbac.create -}}
2 | apiVersion: {{ template "rbac.apiVersion" . }}
3 | kind: ClusterRoleBinding
4 | metadata:
5 | labels:
6 | app: {{ template "fluent-bit.name" . }}
7 | chart: {{ .Chart.Name }}-{{ .Chart.Version }}
8 | heritage: {{ .Release.Service }}
9 | release: {{ .Release.Name }}
10 | name: {{ template "fluent-bit.fullname" . }}
11 | roleRef:
12 | apiGroup: rbac.authorization.k8s.io
13 | kind: ClusterRole
14 | name: {{ template "fluent-bit.fullname" . }}
15 | subjects:
16 | - kind: ServiceAccount
17 | name: {{ template "fluent-bit.serviceAccountName" . }}
18 | namespace: {{ .Release.Namespace }}
19 | {{- end -}}
20 |
--------------------------------------------------------------------------------
/charts/fluent-bit/templates/config.yaml:
--------------------------------------------------------------------------------
1 | {{- if (empty .Values.existingConfigMap) -}}
2 | apiVersion: v1
3 | kind: ConfigMap
4 | metadata:
5 | name: {{ template "fluent-bit.fullname" . }}-config
6 | labels:
7 | app: {{ template "fluent-bit.fullname" . }}
8 | chart: {{ .Chart.Name }}-{{ .Chart.Version }}
9 | heritage: {{ .Release.Service }}
10 | release: {{ .Release.Name }}
11 | data:
12 | fluent-bit.conf: |-
13 | [SERVICE]
14 | Flush 1
15 | Daemon Off
16 | Log_Level info
17 | Parsers_File parsers.conf
18 | {{- if .Values.parsers.enabled }}
19 | Parsers_File parsers_custom.conf
20 | {{- end }}
21 | {{- if .Values.metrics.enabled }}
22 | HTTP_Server On
23 | HTTP_Listen 0.0.0.0
24 | HTTP_Port 2020
25 | {{- end }}
26 |
27 | [INPUT]
28 | Name tail
29 | Path /var/log/containers/*.log
30 | Parser docker
31 | Tag {{ .Values.filter.kubeTag }}.*
32 | Refresh_Interval 5
33 | Mem_Buf_Limit 5MB
34 | Skip_Long_Lines On
35 | {{- if .Values.trackOffsets }}
36 | DB /tail-db/tail-containers-state.db
37 | DB.Sync Normal
38 | {{- end }}
39 |
40 | [FILTER]
41 | Name kubernetes
42 | Match {{ .Values.filter.kubeTag }}.*
43 | Kube_URL {{ .Values.filter.kubeURL }}
44 | Kube_CA_File {{ .Values.filter.kubeCAFile }}
45 | Kube_Token_File {{ .Values.filter.kubeTokenFile }}
46 | {{- if .Values.filter.mergeJSONLog }}
47 | Merge_JSON_Log On
48 | {{- end }}
49 | {{- if .Values.filter.enableParser }}
50 | K8S-Logging.Parser On
51 | {{- end }}
52 | {{- if .Values.filter.enableExclude }}
53 | K8S-Logging.Exclude On
54 | {{- end }}
55 | {{ if eq .Values.backend.type "test" }}
56 | [OUTPUT]
57 | Name file
58 | Match *
59 | Path /tmp/fluent-bit.log
60 | {{ else if eq .Values.backend.type "forward" }}
61 | [OUTPUT]
62 | Name forward
63 | Match *
64 | Host {{ .Values.backend.forward.host }}
65 | Port {{ .Values.backend.forward.port }}
66 | Retry_Limit False
67 | {{ else if eq .Values.backend.type "es" }}
68 | [OUTPUT]
69 | Name es
70 | Match *
71 | Host {{ .Values.backend.es.host }}
72 | Port {{ .Values.backend.es.port }}
73 | Logstash_Format On
74 | Retry_Limit False
75 | Type {{ .Values.backend.es.type }}
76 | {{- if .Values.backend.es.time_key }}
77 | Time_Key {{ .Values.backend.es.time_key }}
78 | {{- end }}
79 | {{- if .Values.backend.es.pipeline }}
80 | Pipeline {{ .Values.backend.es.pipeline }}
81 | {{- end }}
82 |
83 | {{- if .Values.backend.es.logstash_prefix }}
84 | Logstash_Prefix {{ .Values.backend.es.logstash_prefix }}
85 | {{ else if .Values.backend.es.index }}
86 | Index {{ .Values.backend.es.index }}
87 | {{- end }}
88 | {{- if .Values.backend.es.logstash_dateformat }}
89 | Logstash_DateFormat {{ .Values.backend.es.logstash_dateformat }}
90 | {{- end }}
91 | {{- if .Values.backend.es.http_user }}
92 | HTTP_User {{ .Values.backend.es.http_user }}
93 | HTTP_Passwd {{ .Values.backend.es.http_passwd }}
94 | {{- end }}
95 | {{if eq .Values.backend.es.tls "on" }}
96 | tls {{ .Values.backend.es.tls }}
97 | tls.verify {{ .Values.backend.es.tls_verify }}
98 | tls.debug {{ .Values.backend.es.tls_debug }}
99 | {{- if .Values.backend.es.tls_ca }}
100 | tls.ca_file /secure/es-tls-ca.crt
101 | {{- end }}
102 | {{- end }}
103 |
104 | {{ else if eq .Values.backend.type "splunk" }}
105 | [OUTPUT]
106 | Name splunk
107 | Match *
108 | Host {{ .Values.backend.splunk.host }}
109 | Port {{ .Values.backend.splunk.port }}
110 | Splunk_Token {{ .Values.backend.splunk.token }}
111 | Splunk_Send_Raw {{ .Values.backend.splunk.send_raw}}
112 | TLS {{ .Values.backend.splunk.tls }}
113 | TLS.Verify {{ .Values.backend.splunk.tls_verify }}
114 | Message_Key {{ .Values.backend.splunk.message_key }}
115 |
116 | {{ else if eq .Values.backend.type "http" }}
117 | [OUTPUT]
118 | Name http
119 | Match *
120 | Host {{ .Values.backend.http.host }}
121 | Port {{ .Values.backend.http.port }}
122 | URI {{ .Values.backend.http.uri }}
123 | {{- if .Values.backend.http.proxy }}
124 | Proxy {{ .Values.backend.http.proxy }}
125 | {{- end }}
126 | Format {{ .Values.backend.http.format }}
127 | {{- end }}
128 | parsers.conf: |-
129 | {{- if .Values.parsers.regex }}
130 | {{- range .Values.parsers.regex }}
131 | [PARSER]
132 | Name {{ .name }}
133 | Format regex
134 | Regex {{ .regex }}
135 | {{- if .timeKey }}
136 | Time_Key {{ .timeKey }}
137 | {{- end }}
138 | {{- if .timeFormat }}
139 | Time_Format {{ .timeFormat }}
140 | {{- end }}
141 | {{ end }}
142 | {{- end }}
143 | {{- if .Values.parsers.json }}
144 | {{- range .Values.parsers.json }}
145 | [PARSER]
146 | Name {{ .name }}
147 | Format json
148 | {{- if .timeKeep }}
149 | Time_Keep {{ .timeKeep }}
150 | {{- end }}
151 | {{- if .timeKey }}
152 | Time_Key {{ .timeKey }}
153 | {{- end }}
154 | {{- if .timeFormat }}
155 | Time_Format {{ .timeFormat }}
156 | {{- end }}
157 | {{- if .decodeFieldAs }}
158 | Decode_Field_As {{ .decodeFieldAs }} {{ .decodeField | default "log" }}
159 | {{- end }}
160 | {{ end }}
161 | {{- end }}
162 |
163 | {{- end -}}
--------------------------------------------------------------------------------
/charts/fluent-bit/templates/daemonset.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: extensions/v1beta1
2 | kind: DaemonSet
3 | metadata:
4 | name: fluent-bit
5 | labels:
6 | app: {{ template "fluent-bit.fullname" . }}
7 | chart: {{ .Chart.Name }}-{{ .Chart.Version }}
8 | heritage: {{ .Release.Service }}
9 | release: {{ .Release.Name }}
10 | spec:
11 | updateStrategy:
12 | type: RollingUpdate
13 | template:
14 | metadata:
15 | labels:
16 | app: {{ template "fluent-bit.fullname" . }}
17 | release: {{ .Release.Name }}
18 | annotations:
19 | checksum/config: {{ include (print $.Template.BasePath "/config.yaml") . | sha256sum }}
20 | {{- if .Values.metrics.prometheus }}
21 | prometheus.io/scrape: "{{ default "true" .Values.metrics.prometheus.scrape | quote }}"
22 | {{- if .Values.metrics.service.port }}
23 | prometheus.io/port: "{{ .Values.metrics.service.port }}"
24 | {{- end }}
25 | {{- if .Values.metrics.prometheus.path }}
26 | prometheus.io/path: "{{ .Values.metrics.prometheus.path }}"
27 | {{- end }}
28 | {{- end }}
29 | {{- if .Values.podAnnotations }}
30 | {{ toYaml .Values.podAnnotations | indent 8 }}
31 | {{- end }}
32 | spec:
33 | serviceAccountName: {{ template "fluent-bit.serviceAccountName" . }}
34 | initContainers:
35 | - name: put-pipeline
36 | image: radial/busyboxplus:curl
37 | imagePullPolicy: IfNotPresent
38 | command: ["curl", "-H", "Content-Type: application/json", "-XPUT",
39 | {{- if .Values.backend.es.http_user }}
40 | "--user", "{{ .Values.backend.es.http_user }}:{{ .Values.backend.es.http_passwd }}",
41 | {{- end }}
42 | {{- if eq .Values.backend.es.tls "on" }}
43 | {{- if eq .Values.backend.es.tls_verify "off" }}
44 | "--insecure",
45 | {{- else }}
46 | "--cacert", "/secure/es-tls-ca.crt",
47 | {{- end }}
48 | {{- end }}
49 | "http{{if eq .Values.backend.es.tls "on" }}s{{ end }}://{{ .Values.backend.es.host }}:{{ .Values.backend.es.port }}/_ingest/pipeline/fluentbit", "-d", "@/fluent-bit/etc/fluentbit-pipeline.json"]
50 | volumeMounts:
51 | - name: pipeline
52 | mountPath: /fluent-bit/etc/fluentbit-pipeline.json
53 | subPath: fluentbit-pipeline.json
54 | - name: put-template
55 | image: radial/busyboxplus:curl
56 | imagePullPolicy: IfNotPresent
57 | command: ["curl", "-H", "Content-Type: application/json", "-XPUT",
58 | {{- if .Values.backend.es.http_user }}
59 | "--user", "{{ .Values.backend.es.http_user }}:{{ .Values.backend.es.http_passwd }}",
60 | {{- end }}
61 | {{- if eq .Values.backend.es.tls "on" }}
62 | {{- if eq .Values.backend.es.tls_verify "off" }}
63 | "--insecure",
64 | {{- else }}
65 | "--cacert", "/secure/es-tls-ca.crt",
66 | {{- end }}
67 | {{- end }}
68 | "http{{if eq .Values.backend.es.tls "on" }}s{{ end }}://{{ .Values.backend.es.host }}:{{ .Values.backend.es.port }}/_template/template_fluentbit", "-d", "@/fluent-bit/etc/fluentbit-template.json"]
69 | volumeMounts:
70 | - name: template
71 | mountPath: /fluent-bit/etc/fluentbit-template.json
72 | subPath: fluentbit-template.json
73 | containers:
74 | - name: fluent-bit
75 | image: "{{ .Values.image.fluent_bit.repository }}:{{ .Values.image.fluent_bit.tag }}"
76 | imagePullPolicy: "{{ .Values.image.pullPolicy }}"
77 | env:
78 | {{ toYaml .Values.env | indent 10 }}
79 | resources:
80 | {{ toYaml .Values.resources | indent 10 }}
81 | {{- if .Values.metrics.enabled }}
82 | ports:
83 | - name: metrics
84 | containerPort: 2020
85 | protocol: TCP
86 | {{- end }}
87 | volumeMounts:
88 | - name: varlog
89 | mountPath: /var/log
90 | - name: varlibdockercontainers
91 | mountPath: /var/lib/docker/containers
92 | readOnly: true
93 | - name: config
94 | mountPath: /fluent-bit/etc/fluent-bit.conf
95 | subPath: fluent-bit.conf
96 | {{- if .Values.parsers.enabled }}
97 | - name: config
98 | mountPath: /fluent-bit/etc/parsers_custom.conf
99 | subPath: parsers.conf
100 | {{- end }}
101 | {{- if .Values.backend.es.tls_ca }}
102 | - name: es-tls-secret
103 | mountPath: /secure/es-tls-ca.crt
104 | subPath: es-tls-ca.crt
105 | {{- end }}
106 | {{- if .Values.trackOffsets }}
107 | - name: tail-db
108 | mountPath: /tail-db
109 | {{- end }}
110 | {{- if .Values.extraVolumeMounts }}
111 | {{ toYaml .Values.extraVolumeMounts | indent 8 }}
112 | {{- end }}
113 | {{ if .Values.on_minikube }}
114 | - name: mnt
115 | mountPath: /mnt
116 | readOnly: true
117 | {{ end }}
118 | terminationGracePeriodSeconds: 10
119 | {{- if .Values.nodeSelector }}
120 | nodeSelector:
121 | {{ toYaml .Values.nodeSelector | indent 8 }}
122 | {{- end }}
123 | {{- if .Values.tolerations }}
124 | tolerations:
125 | {{ toYaml .Values.tolerations | indent 8 }}
126 | {{- end }}
127 | volumes:
128 | - name: varlog
129 | hostPath:
130 | path: /var/log
131 | - name: varlibdockercontainers
132 | hostPath:
133 | path: /var/lib/docker/containers
134 | {{- if .Values.backend.es.tls_ca }}
135 | - name: es-tls-secret
136 | secret:
137 | secretName: "{{ template "fluent-bit.fullname" . }}-es-tls-secret"
138 | {{- end }}
139 | {{- if .Values.trackOffsets }}
140 | - name: tail-db
141 | hostPath:
142 | path: /var/lib/fluent-bit
143 | type: DirectoryOrCreate
144 | {{- end }}
145 | - name: config
146 | configMap:
147 | name: {{ if .Values.existingConfigMap }}{{ .Values.existingConfigMap }}{{- else }}{{ template "fluent-bit.fullname" . }}-config{{- end }}
148 | - name: pipeline
149 | configMap:
150 | name: {{ template "fluent-bit.fullname" . }}-elassandra-pipeline
151 | - name: template
152 | configMap:
153 | name: {{ template "fluent-bit.fullname" . }}-elassandra-template
154 | {{- if .Values.extraVolumes }}
155 | {{ toYaml .Values.extraVolumes | indent 6 }}
156 | {{- end }}
157 | {{ if .Values.on_minikube }}
158 | - name: mnt
159 | hostPath:
160 | path: /mnt
161 | {{ end }}
162 |
--------------------------------------------------------------------------------
/charts/fluent-bit/templates/elassandra-pipeline.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: ConfigMap
3 | metadata:
4 | name: {{ template "fluent-bit.fullname" . }}-elassandra-pipeline
5 | namespace: {{ .Release.Namespace }}
6 | labels:
7 | app: {{ template "fluent-bit.fullname" . }}
8 | chart: {{ .Chart.Name }}-{{ .Chart.Version }}
9 | heritage: {{ .Release.Service }}
10 | release: {{ .Release.Name }}
11 | data:
12 | fluentbit-pipeline.json: |-
13 | {
14 | "description" : "fluentbit elassandra pipeline",
15 | "processors" : [
16 | {
17 | "timeuuid" : {
18 | "field": "es_time",
19 | "target_field": "ts",
20 | "formats" : ["ISO8601"],
21 | "timezone" : "Europe/Amsterdam"
22 | }
23 | },
24 | {
25 | "set" : {
26 | "field": "_id",
27 | "value": "[\"{{ "{{" }}kubernetes.docker_id{{ "}}" }}\",\"{{ "{{" }}ts{{ "}}" }}\"]"
28 | }
29 | },
30 | {
31 | "remove": {
32 | "field": ["kubernetes.docker_id", "time", "es_time"]
33 | }
34 | }
35 | ]
36 | }
--------------------------------------------------------------------------------
/charts/fluent-bit/templates/elassandra-template.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: ConfigMap
3 | metadata:
4 | name: {{ template "fluent-bit.fullname" . }}-elassandra-template
5 | namespace: {{ .Release.Namespace }}
6 | labels:
7 | app: {{ template "fluent-bit.fullname" . }}
8 | chart: {{ .Chart.Name }}-{{ .Chart.Version }}
9 | heritage: {{ .Release.Service }}
10 | release: {{ .Release.Name }}
11 | data:
12 | fluentbit-template.json: |-
13 | {
14 | "index_patterns": [ "fluentbit*" ],
15 | "mappings": {
16 | "flb_type": {
17 | "_meta": {
18 | "version": "6.2.3"
19 | },
20 | "date_detection": true,
21 | "dynamic_templates": [
22 | {
23 | "strings_as_keyword": {
24 | "mapping": {
25 | "ignore_above": 1024,
26 | "type": "keyword"
27 | },
28 | "match_mapping_type": "string"
29 | }
30 | }
31 | ],
32 | "properties": {
33 | "docker_id": {
34 | "cql_collection" : "singleton",
35 | "cql_primary_key_order" : 0,
36 | "cql_partition_key": true,
37 | "type": "keyword"
38 | },
39 | "ts": {
40 | "cql_collection" : "singleton",
41 | "cql_primary_key_order" : 1,
42 | "type": "date",
43 | "cql_type": "timeuuid"
44 | },
45 | "kubernetes": {
46 | "cql_collection" : "singleton",
47 | "cql_static_column" : "true",
48 | "properties": {
49 | "container_name": {
50 | "cql_collection" : "singleton",
51 | "type": "keyword"
52 | },
53 | "host": {
54 | "cql_collection" : "singleton",
55 | "type": "keyword"
56 | },
57 | "labels": {
58 | "properties": {
59 | "app": {
60 | "cql_collection" : "singleton",
61 | "type": "keyword"
62 | },
63 | "component": {
64 | "cql_collection" : "singleton",
65 | "type": "keyword"
66 | },
67 | "controller-revision-hash": {
68 | "cql_collection" : "singleton",
69 | "type": "keyword"
70 | },
71 | "k8s-app": {
72 | "cql_collection" : "singleton",
73 | "type": "keyword"
74 | },
75 | "kubernetes_io/cluster-service": {
76 | "cql_collection" : "singleton",
77 | "type": "keyword"
78 | },
79 | "name": {
80 | "cql_collection" : "singleton",
81 | "type": "keyword"
82 | },
83 | "pod-template-generation": {
84 | "cql_collection" : "singleton",
85 | "type": "keyword"
86 | },
87 | "pod-template-hash": {
88 | "cql_collection" : "singleton",
89 | "type": "keyword"
90 | },
91 | "tier": {
92 | "cql_collection" : "singleton",
93 | "type": "keyword"
94 | },
95 | "version": {
96 | "cql_collection" : "singleton",
97 | "type": "keyword"
98 | }
99 | }
100 | },
101 | "namespace_name": {
102 | "cql_collection" : "singleton",
103 | "type": "keyword"
104 | },
105 | "pod_id": {
106 | "cql_collection" : "singleton",
107 | "type": "keyword"
108 | },
109 | "pod_name": {
110 | "cql_collection" : "singleton",
111 | "type": "keyword"
112 | }
113 | }
114 | },
115 | "log": {
116 | "cql_collection" : "singleton",
117 | "type": "text",
118 | "fields": {
119 | "keyword": {
120 | "type": "keyword",
121 | "ignore_above": 8192
122 | }
123 | }
124 | },
125 | "stream": {
126 | "cql_collection" : "singleton",
127 | "type": "keyword"
128 | }
129 | }
130 | }
131 | },
132 | "settings": {
133 | "index": {
134 | "index_insert_only": true,
135 | "index_static_columns": true,
136 | "drop_on_delete_index": true,
137 | "keyspace": "fluentbit",
138 | "virtual_index": "fluentbit",
139 | "search_strategy_class": "RandomSearchStrategy",
140 | "replication": "DC1:1",
141 | "table_options": "compaction = {'compaction_window_size': '4', 'compaction_window_unit': 'HOURS', 'class': 'org.apache.cassandra.db.compaction.TimeWindowCompactionStrategy'}",
142 | "mapping": {
143 | "total_fields": {
144 | "limit": 10000
145 | }
146 | },
147 | "refresh_interval": "15s",
148 | "partition_function_class": "TimeUUIDPartitionFunction",
149 | "partition_function": "toDayIndex fluentbit-%1$tY.%1$tm.%1$td ts"
150 | }
151 | }
152 | }
153 | }
154 |
155 |
--------------------------------------------------------------------------------
/charts/fluent-bit/templates/secret.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Secret
3 | metadata:
4 | name: "{{ template "fluent-bit.fullname" . }}-es-tls-secret"
5 | labels:
6 | app: {{ template "fluent-bit.fullname" . }}
7 | chart: {{ .Chart.Name }}-{{ .Chart.Version }}
8 | heritage: {{ .Release.Service }}
9 | release: {{ .Release.Name }}
10 | type: Opaque
11 | data:
12 | es-tls-ca.crt: {{ .Values.backend.es.tls_ca | b64enc | quote }}
13 |
--------------------------------------------------------------------------------
/charts/fluent-bit/templates/service.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.metrics.enabled }}
2 | apiVersion: v1
3 | kind: Service
4 | metadata:
5 | name: {{ template "fluent-bit.fullname" . }}-metrics
6 | labels:
7 | app: {{ template "fluent-bit.fullname" . }}
8 | chart: {{ .Chart.Name }}-{{ .Chart.Version }}
9 | heritage: {{ .Release.Service }}
10 | release: {{ .Release.Name }}
11 | spec:
12 | type: {{ .Values.metrics.service.type}}
13 | sessionAffinity: None
14 | ports:
15 | - port: {{ .Values.metrics.service.port }}
16 | targetPort: metrics
17 | name: metrics
18 | selector:
19 | app: {{ template "fluent-bit.fullname" . }}
20 | release: {{ .Release.Name }}
21 | {{- end }}
22 |
--------------------------------------------------------------------------------
/charts/fluent-bit/templates/serviceaccount.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.serviceAccount.create -}}
2 | apiVersion: v1
3 | kind: ServiceAccount
4 | metadata:
5 | labels:
6 | app: {{ template "fluent-bit.name" . }}
7 | chart: {{ .Chart.Name }}-{{ .Chart.Version }}
8 | heritage: {{ .Release.Service }}
9 | release: {{ .Release.Name }}
10 | name: {{ template "fluent-bit.serviceAccountName" . }}
11 | {{- end -}}
12 |
--------------------------------------------------------------------------------
/charts/fluent-bit/values.yaml:
--------------------------------------------------------------------------------
1 | # Minikube stores its logs in a separate directory.
2 | # enable if started in minikube.
3 | on_minikube: false
4 |
5 | image:
6 | fluent_bit:
7 | repository: fluent/fluent-bit
8 | tag: 0.13.0
9 | pullPolicy: Always
10 |
11 | # When enabled, exposes json and prometheus metrics on {{ .Release.Name }}-metrics service
12 | metrics:
13 | enabled: false
14 | service:
15 | port: 2020
16 | type: ClusterIP
17 |
18 | # When enabled, fluent-bit will keep track of tailing offsets across pod restarts.
19 | trackOffsets: false
20 |
21 | backend:
22 | type: forward
23 | forward:
24 | host: fluentd
25 | port: 24284
26 | es:
27 | host: elasticsearch
28 | port: 9200
29 | # Elastic Index Name
30 | index: kubernetes_cluster
31 | type: flb_type
32 | logstash_prefix: kubernetes_cluster
33 | time_key: "@timestamp"
34 | # Optional username credential for Elastic X-Pack access
35 | http_user:
36 | # Password for user defined in HTTP_User
37 | http_passwd:
38 | # Optional TLS encryption to ElasticSearch instance
39 | tls: "off"
40 | tls_verify: "on"
41 | # TLS certificate for the Elastic (in PEM format). Use if tls=on and tls_verify=on.
42 | tls_ca: ""
43 | # TLS debugging levels = 1-5
44 | tls_debug: 1
45 | pipeline: ""
46 | splunk:
47 | host: 127.0.0.1
48 | port: 8088
49 | token: ""
50 | send_raw: "on"
51 | tls: "on"
52 | tls_verify: "off"
53 | message_key: "kubernetes"
54 |
55 | ##
56 | ## Ref: http://fluentbit.io/documentation/current/output/http.html
57 | ##
58 | http:
59 | host: 127.0.0.1
60 | port: 80
61 | uri: "/"
62 | ## Specify the data format to be used in the HTTP request body
63 | ## Can be either 'msgpack' or 'json'
64 | format: msgpack
65 |
66 | parsers:
67 | enabled: false
68 | ## List the respective parsers in key: value format per entry
69 | ## Regex required fields are name and regex. JSON required field
70 | ## is name.
71 | regex: []
72 | json: []
73 |
74 | env: []
75 |
76 | ## Annotations to add to the DaemonSet's Pods
77 | podAnnotations: {}
78 |
79 | ## ConfigMap override where fullname is {{.Release.Name}}-{{.Values.existingConfigMap}}
80 | ## Defining existingConfigMap will cause templates/config.yaml
81 | ## to NOT generate a ConfigMap resource
82 | ##
83 | existingConfigMap: ""
84 |
85 | ## Extra volumes containing additional files required for fluent-bit to work
86 | ## (eg. CA certificates)
87 | ## Ref: https://kubernetes.io/docs/concepts/storage/volumes/
88 | ##
89 | extraVolumes: []
90 |
91 | ## Extra volume mounts for the fluent-bit pod.
92 | ## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-volume-storage/
93 | ##
94 | extraVolumeMounts: []
95 |
96 | resources:
97 | limits:
98 | memory: 100Mi
99 | requests:
100 | cpu: 100m
101 | memory: 100Mi
102 |
103 | ## Node tolerations for fluent-bit scheduling to nodes with taints
104 | ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
105 | ##
106 | tolerations: []
107 | # - key: "key"
108 | # operator: "Equal|Exists"
109 | # value: "value"
110 | # effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)"
111 |
112 | ## Node labels for fluent-bit pod assignment
113 | ## Ref: https://kubernetes.io/docs/user-guide/node-selection/
114 | ##
115 | nodeSelector: {}
116 |
117 | filter:
118 | kubeURL: https://kubernetes.default.svc:443
119 | kubeCAFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
120 | kubeTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
121 | kubeTag: kube
122 | # If true, check to see if the log field content is a JSON string map, if so,
123 | # it append the map fields as part of the log structure.
124 | # mergeJSONLog: true
125 |
126 | # If true, enable the use of monitoring for a pod annotation of
127 | # fluentbit.io/parser: parser_name. parser_name must be the name
128 | # of a parser contained within parsers.conf
129 | # enableParser: true
130 |
131 | # If true, enable the use of monitoring for a pod annotation of
132 | # fluentbit.io/exclude: true. If present, discard logs from that pod.
133 | # enableExclude: true
134 |
135 | rbac:
136 | # Specifies whether RBAC resources should be created
137 | create: true
138 |
139 | serviceAccount:
140 | # Specifies whether a ServiceAccount should be created
141 | create: true
142 | # The name of the ServiceAccount to use.
143 | # If not set and create is true, a name is generated using the fullname template
144 | name:
145 |
--------------------------------------------------------------------------------
/charts/storageclass/.helmignore:
--------------------------------------------------------------------------------
1 | # Patterns to ignore when building packages.
2 | # This supports shell glob matching, relative path matching, and
3 | # negation (prefixed with !). Only one pattern per line.
4 | .DS_Store
5 | # Common VCS dirs
6 | .git/
7 | .gitignore
8 | .bzr/
9 | .bzrignore
10 | .hg/
11 | .hgignore
12 | .svn/
13 | # Common backup files
14 | *.swp
15 | *.bak
16 | *.tmp
17 | *~
18 | # Various IDEs
19 | .project
20 | .idea/
21 | *.tmproj
22 |
--------------------------------------------------------------------------------
/charts/storageclass/Chart.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | appVersion: "1.0"
3 | description: A Helm chart to deploy Kubernetes custom storageclass
4 | name: storageclass
5 | version: 0.1.0
6 | home: http://www.strapdata.com
7 | maintainers:
8 | - name: vroyer
9 | email: vroyer@strapdata.com
10 | - name: DBarthe
11 | email: barth@strapdata.com
12 |
--------------------------------------------------------------------------------
/charts/storageclass/README.md:
--------------------------------------------------------------------------------
1 | # HELM Chart to create storageClass
2 |
3 | HELM chart to define Kubernetes storageClass bound to an availability zone.
4 |
5 | Install example for GCP:
6 |
7 | ```
8 | helm install --name ssd-europe-west1-b --namespace kube-system \
9 | --set parameters.type="pd-ssd" \
10 | --set provisioner="kubernetes.io/gce-pd" \
11 | --set zone=europe-west1-b \
12 | --set nameOverride=ssd-b \
13 | strapdata/storageclass
14 | ```
15 |
16 | Install example for Azure:
17 |
18 | ```
19 | helm install --name ssd-northeurope-1 --namespace kube-system \
20 | --set parameters.kind="Managed" \
21 | --set parameters.cachingmode="ReadOnly" \
22 | --set parameters.storageaccounttype="StandardSSD_LRS" \
23 | --set provisioner="kubernetes.io/azure-disk" \
24 | --set zone=northeurope-1 \
25 | --set nameOverride=ssd-northeurope-1 \
26 | strapdata/storageclass
27 | ```
--------------------------------------------------------------------------------
/charts/storageclass/templates/_helpers.tpl:
--------------------------------------------------------------------------------
1 | {{/* vim: set filetype=mustache: */}}
2 | {{/*
3 | Expand the name of the chart.
4 | */}}
5 | {{- define "storageclass.name" -}}
6 | {{- if .Values.nameOverride -}}
7 | {{- .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
8 | {{- else -}}
9 | {{- printf "storageclass-%s-%s" .Values.type .Values.zone | trunc 63 | trimSuffix "-" -}}
10 | {{- end -}}
11 | {{- end -}}
12 |
13 | {{/*
14 | Create a default fully qualified app name.
15 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
16 | If release name contains chart name it will be used as a full name.
17 | */}}
18 | {{- define "storageclass.fullname" -}}
19 | {{- if .Values.fullnameOverride -}}
20 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
21 | {{- else -}}
22 | {{- $name := default .Chart.Name .Values.nameOverride -}}
23 | {{- if contains $name .Release.Name -}}
24 | {{- .Release.Name | trunc 63 | trimSuffix "-" -}}
25 | {{- else -}}
26 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
27 | {{- end -}}
28 | {{- end -}}
29 | {{- end -}}
30 |
31 |
--------------------------------------------------------------------------------
/charts/storageclass/templates/storageclass.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: storage.k8s.io/v1
2 | kind: StorageClass
3 | metadata:
4 | name: {{ template "storageclass.name" . }}
5 | labels:
6 | addonmanager.kubernetes.io/mode: EnsureExists
7 | kubernetes.io/cluster-service: "true"
8 |
9 | provisioner: {{ .Values.provisioner }}
10 | parameters:
11 | {{ toYaml .Values.parameters | indent 2 }}
12 |
13 | allowVolumeExpansion: true
14 | reclaimPolicy: Delete
15 | volumeBindingMode: Immediate
16 | allowedTopologies:
17 | - matchLabelExpressions:
18 | {{- if .Values.region }}
19 | - key: failure-domain.beta.kubernetes.io/region
20 | operator: In
21 | values:
22 | - {{ .Values.region }}
23 | {{- end }}
24 | {{- if .Values.zone }}
25 | - key: failure-domain.beta.kubernetes.io/zone
26 | operator: In
27 | values:
28 | - {{ .Values.zone }}
29 | {{- end }}
--------------------------------------------------------------------------------
/charts/storageclass/values.yaml:
--------------------------------------------------------------------------------
1 | # storageClassName
2 | nameOverride: "ssd-b"
3 |
4 | # Cloud availibility zone
5 | zone: "europe-west1-b"
6 |
7 | # Storage parameters and provisioner
8 | parameters:
9 | provisioner:
10 |
--------------------------------------------------------------------------------
/strapdata-logolong.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/strapdata/helm-charts/88de7bf2ebabdd12c488b39134f9533c62afdfae/strapdata-logolong.png
--------------------------------------------------------------------------------