mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
add apache ignite helm chart (#9293)
* add apache ignite helm chart Signed-off-by: Oleksii Asiutin <sutok85@gmail.com> * Disable Ignite persistence if volumes are disabled Signed-off-by: Mykola Rybak <mykola.rybak@gmail.com> * Expose peerClassLoadingEnabled property Signed-off-by: Mykola Rybak <mykola.rybak@gmail.com> * Expose environment variable configuration Signed-off-by: Mykola Rybak <mykola.rybak@gmail.com> * add service account to support rbac Signed-off-by: Oleksii Asiutin <sutok85@gmail.com> * add ability to disable rbac Signed-off-by: Oleksii Asiutin <sutok85@gmail.com> * change appVersion and chart version Signed-off-by: Oleksii Asiutin <sutok85@gmail.com> * move all ignite: configs to top-level Signed-off-by: Oleksii Asiutin <sutok85@gmail.com> * update app version to 2.7.0 Signed-off-by: Oleksii Asiutin <sutok85@gmail.com> * fixed cluster activation commands new ignite version (2.7.0) has different binaries path Signed-off-by: Oleksii Asiutin <sutok85@gmail.com> * change "dataStorage" config key to "persistence" Most helm charts use "persistence" config key. So we follow the same convention. Signed-off-by: Oleksii Asiutin <sutok85@gmail.com> * 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 <sutok85@gmail.com>
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
8038ea7a49
commit
4cc13f2a63
@@ -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
|
||||
@@ -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
|
||||
@@ -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).
|
||||
@@ -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
|
||||
@@ -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 -}}
|
||||
@@ -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 }}
|
||||
@@ -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>
|
||||
@@ -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 }}
|
||||
@@ -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 }}
|
||||
@@ -0,0 +1,6 @@
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "ignite.serviceAccountName" . }}
|
||||
{{- end }}
|
||||
@@ -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 }}
|
||||
@@ -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" . }}
|
||||
@@ -0,0 +1,9 @@
|
||||
{{- if (.Values.persistence.enabled) }}
|
||||
kind: StorageClass
|
||||
apiVersion: storage.k8s.io/v1
|
||||
metadata:
|
||||
name: {{ include "ignite.fullname" . }}-wal-storage-class
|
||||
provisioner: {{ .Values.persistence.walVolume.provisioner }}
|
||||
parameters:
|
||||
{{ toYaml .Values.persistence.walVolume.provisionerParameters | indent 2 }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,56 @@
|
||||
# Default values for ignite.
|
||||
replicaCount: 2
|
||||
|
||||
image:
|
||||
repository: apacheignite/ignite
|
||||
tag: 2.7.0
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
nameOverride: ""
|
||||
fullnameOverride: ""
|
||||
|
||||
rbac:
|
||||
create: true
|
||||
|
||||
serviceAccount:
|
||||
create: true
|
||||
name:
|
||||
|
||||
env:
|
||||
OPTION_LIBS: "ignite-kubernetes,ignite-rest-http"
|
||||
IGNITE_QUIET: "false"
|
||||
JVM_OPTS: "-Djava.net.preferIPv4Stack=true"
|
||||
peerClassLoadingEnabled: false
|
||||
|
||||
persistence:
|
||||
enabled: false
|
||||
persistenceVolume:
|
||||
size: 8Gi
|
||||
provisioner: kubernetes.io/aws-ebs
|
||||
provisionerParameters:
|
||||
type: gp2
|
||||
fsType: ext4
|
||||
walVolume:
|
||||
size: 8Gi
|
||||
provisioner: kubernetes.io/aws-ebs
|
||||
provisionerParameters:
|
||||
type: gp2
|
||||
fsType: ext4
|
||||
|
||||
resources: {}
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
nodeSelector: {}
|
||||
|
||||
tolerations: []
|
||||
|
||||
affinity: {}
|
||||
Reference in New Issue
Block a user