Merge pull request #121 from eminn/fix-custom-volume (#22190)

Signed-off-by: devOpsHelm <devops+1@hazelcast.com>
This commit is contained in:
devOpsHelm
2020-04-29 11:16:25 -07:00
committed by GitHub
parent 20a26fc4ea
commit 21797b166e
4 changed files with 77 additions and 5 deletions
+3 -3
View File
@@ -1,15 +1,15 @@
apiVersion: v1
appVersion: "4.0"
appVersion: "4.1"
tillerVersion: ">=2.7.2"
kubeVersion: ">=1.9.0-0"
description: Hazelcast Jet is an application embeddable, distributed computing engine built on top of Hazelcast In-Memory Data Grid (IMDG). With Hazelcast IMDG providing storage functionality, Hazelcast Jet performs parallel execution to enable data-intensive applications to operate in near real-time.
name: hazelcast-jet
version: 1.5.1
version: 1.6.0
keywords:
- hazelcast
- jet
- streaming
home: http://jet.hazelcast.org/
home: https://jet-start.sh
icon: http://hazelcast.com/images/logos/Hazelcast-Jet-Logo-Orange_Dark_Icon_200px.png
sources:
- https://github.com/hazelcast/hazelcast-jet
+57
View File
@@ -216,6 +216,9 @@ service |`+8080+`
|`+metrics.service.annotations+` |Annotations for the Prometheus discovery |
|`+customVolume+` |Configuration for a volume which will
be mounted as `/data/custom' (e.g. to mount a volume with custom JARs) |`+nil+`
|`+managementcenter.enabled+` |Turn on and off Hazelcast Jet Management Center
application |`+true+`
@@ -430,6 +433,60 @@ $ helm install --name my-jet-release \
----
endif::[]
=== Adding custom JAR files to the classpath
You can mount any volume which contains your JAR files
to the pods created by helm chart using `customVolume` configuration.
When the `customVolume` set, it will mount provided volume to the pod
on `/data/custom` path.
This path also appended to the classpath of running Java process.
For example, if you have existing host path Persistent Volume and
Persistent Volume Claims like below;
[source,yaml]
----
apiVersion: v1
kind: PersistentVolume
metadata:
name: jet-hostpathpv-volume
labels:
type: local
spec:
storageClassName: manual
capacity:
storage: 1Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/path/to/my/jars"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: jet-pv-claim
spec:
storageClassName: manual
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
----
You can configure your Helm chart to use it like below in your `values.yaml`
file.
[source,yaml]
----
customVolume:
persistentVolumeClaim:
claimName: jet-pv-claim
----
See https://kubernetes.io/docs/concepts/storage/[Volumes] section on the
Kubernetes documentation for other available options.
== Notable changes
=== 1.4.0
@@ -98,7 +98,15 @@ spec:
volumeMounts:
- name: hazelcast-jet-storage
mountPath: /data/hazelcast-jet
{{- if .Values.customVolume }}
- name: hazelcast-jet-custom-volume
mountPath: /data/custom
{{- end }}
env:
{{- if .Values.customVolume }}
- name: CLASSPATH
value: "/data/custom:/data/custom/*"
{{- end }}
{{- if .Values.metrics.enabled }}
- name: PROMETHEUS_PORT
value: "{{ .Values.metrics.service.port }}"
@@ -126,3 +134,7 @@ spec:
- name: hazelcast-jet-storage
configMap:
name: {{ template "hazelcast-jet.fullname" . }}-configuration
{{- if .Values.customVolume }}
- name: hazelcast-jet-custom-volume
{{ toYaml .Values.customVolume | indent 8 }}
{{- end }}
+5 -2
View File
@@ -5,7 +5,7 @@ image:
# repository is the Hazelcast Jet image name
repository: "hazelcast/hazelcast-jet"
# tag is the Hazelcast Jet image tag
tag: "4.0"
tag: "4.1"
# pullPolicy is the Docker image pull policy
# It's recommended to change this to 'Always' if the image tag is 'latest'
# ref: http://kubernetes.io/docs/user-guide/images/#updating-images
@@ -220,6 +220,9 @@ metrics:
prometheus.io/path: "/metrics"
prometheus.io/port: "8080"
# customVolume is the configuration for a volume will be mounted as '/data/custom/' (e.g. to mount a volume with custom JARs)
# customVolume:
# Hazelcast Jet Management Center application properties
managementcenter:
# enabled is a flag to enable Hazelcast Jet Management Center application
@@ -231,7 +234,7 @@ managementcenter:
# repository is the Hazelcast Jet Management Center image name
repository: "hazelcast/hazelcast-jet-management-center"
# tag is the Hazelcast Jet Management Center image tag
tag: "4.0"
tag: "4.1"
# pullPolicy is the Docker image pull policy
# It's recommended to change this to 'Always' if the image tag is 'latest'
# ref: http://kubernetes.io/docs/user-guide/images/#updating-images