forked from helm/charts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add apache ignite helm chart (helm#9293)
* add apache ignite helm chart Signed-off-by: Oleksii Asiutin <[email protected]> * Disable Ignite persistence if volumes are disabled Signed-off-by: Mykola Rybak <[email protected]> * Expose peerClassLoadingEnabled property Signed-off-by: Mykola Rybak <[email protected]> * Expose environment variable configuration Signed-off-by: Mykola Rybak <[email protected]> * add service account to support rbac Signed-off-by: Oleksii Asiutin <[email protected]> * add ability to disable rbac Signed-off-by: Oleksii Asiutin <[email protected]> * change appVersion and chart version Signed-off-by: Oleksii Asiutin <[email protected]> * move all ignite: configs to top-level Signed-off-by: Oleksii Asiutin <[email protected]> * update app version to 2.7.0 Signed-off-by: Oleksii Asiutin <[email protected]> * fixed cluster activation commands new ignite version (2.7.0) has different binaries path Signed-off-by: Oleksii Asiutin <[email protected]> * change "dataStorage" config key to "persistence" Most helm charts use "persistence" config key. So we follow the same convention. Signed-off-by: Oleksii Asiutin <[email protected]> * adapt chart configs to RBAC standards according to this link https://docs.helm.sh/chart_best_practices/#role-based-access-control Signed-off-by: Oleksii Asiutin <[email protected]>
- Loading branch information
1 parent
8038ea7
commit 4cc13f2
Showing
14 changed files
with
448 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: v1 | ||
appVersion: "2.7.0" | ||
description: Apache Ignite is an open-source distributed database, caching and processing platform designed to store and compute on large volumes of data across a cluster of nodes. | ||
name: ignite | ||
version: 1.0.0 | ||
keywords: | ||
- java | ||
- datagrid | ||
- caching | ||
- jvm | ||
- sql | ||
- key-value | ||
- nosql | ||
- distributed | ||
home: https://ignite.apache.org/ | ||
icon: https://ignite.apache.org/images/Ignite_tm_Logo_wht_RGB.svg | ||
sources: | ||
- https://github.com/apache/ignite | ||
maintainers: | ||
- name: aasiutin | ||
- name: greyteardrop | ||
engine: gotpl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# apache-ignite | ||
|
||
This is a helm chart for [Apache Ignite](https://ignite.apache.org/) | ||
|
||
Apache Ignite is an open-source distributed database, caching and processing | ||
platform designed to store and compute on large volumes of data across a | ||
cluster of nodes. | ||
|
||
## Install | ||
|
||
```console | ||
$ helm install --name my-release stable/ignite | ||
``` | ||
|
||
## Configuring persistence | ||
|
||
Data persistence and WAL persistence can be enabled by specifying appropriate | ||
variables. Please note that default persistence configuration is for AWS EBS. | ||
|
||
```console | ||
helm install --name my-release \ | ||
--set persistence.enabled=true \ | ||
--set persistence.size=100Gi \ | ||
--set wal_persistence.enabled=true \ | ||
--set wal_persistence.size=8Gi \ | ||
stable/ignite | ||
``` | ||
|
||
To configure persistence for other volume plugins you should edit | ||
`persistence.provisioner` and `persistence.provisioner_parameters` variables. | ||
(and the same variables for `wal_persistence` section). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{{- if (.Values.persistence.enabled) }} | ||
You need to activate your ignite deployment. To do it please ensure all | ||
stateful set pods are in "Running" state : | ||
|
||
kubectl get pods -n {{ .Release.Namespace }} -l app={{ include "ignite.fullname" . }} | ||
|
||
and then execute: | ||
|
||
kubectl exec -n {{ .Release.Namespace }} {{ include "ignite.fullname" . }}-0 -- /opt/ignite/apache-ignite/bin/control.sh --activate | ||
|
||
{{- end }} | ||
To check cluster state please run: | ||
|
||
kubectl exec -n {{ .Release.Namespace }} {{ include "ignite.fullname" . }}-0 -- /opt/ignite/apache-ignite/bin/control.sh --state |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "ignite.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create a default fully qualified app name. | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
If release name contains chart name it will be used as a full name. | ||
*/}} | ||
{{- define "ignite.fullname" -}} | ||
{{- if .Values.fullnameOverride -}} | ||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} | ||
{{- else -}} | ||
{{- $name := default .Chart.Name .Values.nameOverride -}} | ||
{{- if contains $name .Release.Name -}} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}} | ||
{{- else -}} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create the name of the service account to use | ||
*/}} | ||
{{- define "ignite.serviceAccountName" -}} | ||
{{- if .Values.serviceAccount.create -}} | ||
{{ default (include "ignite.fullname" .) .Values.serviceAccount.name }} | ||
{{- else -}} | ||
{{ default "default" .Values.serviceAccount.name }} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create chart name and version as used by the chart label. | ||
*/}} | ||
{{- define "ignite.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{{- if .Values.rbac.create }} | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
kind: ClusterRole | ||
metadata: | ||
name: {{ include "ignite.fullname" . }} | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: # Here are resources you can access | ||
- pods | ||
- endpoints | ||
verbs: # That is what you can do with them | ||
- get | ||
- list | ||
- watch | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ include "ignite.fullname" . }}-configmap | ||
data: | ||
ignite-config.xml: | | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Licensed to the Apache Software Foundation (ASF) under one or more | ||
contributor license agreements. See the NOTICE file distributed with | ||
this work for additional information regarding copyright ownership. | ||
The ASF licenses this file to You under the Apache License, Version 2.0 | ||
(the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<!-- | ||
Configuration example with Kubernetes IP finder and Ignite persistence enabled. | ||
WAL files and database files are stored in separate disk drives. | ||
--> | ||
<beans xmlns="http://www.springframework.org/schema/beans" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation=" | ||
http://www.springframework.org/schema/beans | ||
http://www.springframework.org/schema/beans/spring-beans.xsd"> | ||
<bean class="org.apache.ignite.configuration.IgniteConfiguration"> | ||
<property name="peerClassLoadingEnabled" value="{{ .Values.peerClassLoadingEnabled | default false }}"/> | ||
{{- if (.Values.persistence.enabled) }} | ||
<!-- Enabling Apache Ignite Persistent Store. --> | ||
<property name="dataStorageConfiguration"> | ||
<bean class="org.apache.ignite.configuration.DataStorageConfiguration"> | ||
|
||
<property name="defaultDataRegionConfiguration"> | ||
<bean class="org.apache.ignite.configuration.DataRegionConfiguration"> | ||
<property name="persistenceEnabled" value="true"/> | ||
</bean> | ||
</property> | ||
|
||
<!-- | ||
Sets a path to the root directory where data and indexes are | ||
to be persisted. It's assumed the directory is on a dedicated disk. | ||
--> | ||
<property name="storagePath" value="/persistence"/> | ||
|
||
<!-- | ||
Sets a path to the directory where WAL is stored. | ||
It's assumed the directory is on a dedicated disk. | ||
--> | ||
<property name="walPath" value="/wal"/> | ||
|
||
<!-- | ||
Sets a path to the directory where WAL archive is stored. | ||
It's assumed the directory is on the same drive with the WAL files. | ||
--> | ||
<property name="walArchivePath" value="/wal/archive"/> | ||
</bean> | ||
</property> | ||
|
||
{{- end }} | ||
<!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. --> | ||
<property name="discoverySpi"> | ||
<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"> | ||
<property name="ipFinder"> | ||
<!-- | ||
Enables Kubernetes IP finder and setting custom namespace and service names. | ||
--> | ||
<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.kubernetes.TcpDiscoveryKubernetesIpFinder"> | ||
<property name="namespace" value="{{ .Release.Namespace }}"/> | ||
<property name="serviceName" value="{{ include "ignite.fullname" . }}"/> | ||
</bean> | ||
</property> | ||
</bean> | ||
</property> | ||
</bean> | ||
</beans> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{{- if (.Values.persistence.enabled) }} | ||
kind: StorageClass | ||
apiVersion: storage.k8s.io/v1 | ||
metadata: | ||
name: {{ include "ignite.fullname" . }}-persistence-storage-class | ||
provisioner: {{ .Values.persistence.persistenceVolume.provisioner }} | ||
parameters: | ||
{{ toYaml .Values.persistence.persistenceVolume.provisionerParameters | indent 2 }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{{- if .Values.rbac.create }} | ||
kind: ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
metadata: | ||
name: {{ include "ignite.fullname" . }} | ||
roleRef: | ||
kind: ClusterRole | ||
name: {{ include "ignite.fullname" . }} | ||
apiGroup: rbac.authorization.k8s.io | ||
subjects: | ||
- kind: ServiceAccount | ||
name: {{ include "ignite.fullname" . }} | ||
namespace: {{ .Release.Namespace }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{{- if .Values.serviceAccount.create }} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: {{ include "ignite.serviceAccountName" . }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: {{ include "ignite.fullname" . }} | ||
labels: | ||
app.kubernetes.io/name: {{ include "ignite.name" . }} | ||
helm.sh/chart: {{ include "ignite.chart" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: {{ include "ignite.fullname" . }} | ||
serviceName: {{ include "ignite.fullname" . }} | ||
replicas: {{ .Values.replicaCount }} | ||
template: | ||
metadata: | ||
labels: | ||
app: {{ include "ignite.fullname" . }} | ||
spec: | ||
serviceAccountName: {{ include "ignite.serviceAccountName" . }} | ||
volumes: | ||
- name: config-volume | ||
configMap: | ||
name: {{ include "ignite.fullname" . }}-configmap | ||
items: | ||
- key: ignite-config.xml | ||
path: default-config.xml | ||
containers: | ||
- name: ignite | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" | ||
resources: | ||
{{ toYaml .Values.resources | indent 10 }} | ||
{{- if .Values.env }} | ||
env: | ||
{{- range $name, $value := .Values.env }} | ||
- name: "{{ $name }}" | ||
value: "{{ $value }}" | ||
{{- end }} | ||
{{- end }} | ||
ports: | ||
- containerPort: 11211 # JDBC port number. | ||
- containerPort: 47100 # communication SPI port number. | ||
- containerPort: 47500 # discovery SPI port number. | ||
- containerPort: 49112 # JMX port number. | ||
- containerPort: 10800 # SQL port number. | ||
- containerPort: 8080 # REST port number. | ||
- containerPort: 10900 #Thin clients port number. | ||
volumeMounts: | ||
{{- if (.Values.persistence.enabled) }} | ||
- mountPath: "/wal" | ||
name: ignite-wal | ||
- mountPath: "/persistence" | ||
name: ignite-persistence | ||
{{- end }} | ||
- name: config-volume | ||
mountPath: /opt/ignite/apache-ignite-fabric/config | ||
{{- with .Values.nodeSelector }} | ||
nodeSelector: | ||
{{ toYaml . | indent 8 }} | ||
{{- end }} | ||
{{- with .Values.affinity }} | ||
affinity: | ||
{{ toYaml . | indent 8 }} | ||
{{- end }} | ||
{{- with .Values.tolerations }} | ||
tolerations: | ||
{{ toYaml . | indent 8 }} | ||
{{- end }} | ||
volumeClaimTemplates: | ||
{{- if (.Values.persistence.enabled) }} | ||
- metadata: | ||
name: ignite-persistence | ||
spec: | ||
accessModes: [ "ReadWriteOnce" ] | ||
storageClassName: "{{ include "ignite.fullname" . }}-persistence-storage-class" | ||
resources: | ||
requests: | ||
storage: {{ .Values.persistence.persistenceVolume.size }} | ||
- metadata: | ||
name: ignite-wal | ||
spec: | ||
accessModes: [ "ReadWriteOnce" ] | ||
storageClassName: "{{ include "ignite.fullname" . }}-wal-storage-class" | ||
resources: | ||
requests: | ||
storage: {{ .Values.persistence.walVolume.size }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ include "ignite.fullname" . }} | ||
labels: | ||
app: {{ include "ignite.fullname" . }} | ||
spec: | ||
ports: | ||
- name: jdbc | ||
port: 11211 | ||
targetPort: 11211 | ||
- name: spi-communication | ||
port: 47100 | ||
targetPort: 47100 | ||
- name: spi-discovery | ||
port: 47500 | ||
targetPort: 47500 | ||
- name: jmx | ||
port: 49112 | ||
targetPort: 49112 | ||
- name: sql | ||
port: 10800 | ||
targetPort: 10800 | ||
- name: rest | ||
port: 8080 | ||
targetPort: 8080 | ||
- name: thin-clients | ||
port: 10900 | ||
targetPort: 10900 | ||
clusterIP: None | ||
selector: | ||
app: {{ include "ignite.fullname" . }} |
Oops, something went wrong.