Skip to content

Commit

Permalink
Update chart
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Ruiz <[email protected]>
  • Loading branch information
migruiz4 committed Apr 4, 2024
1 parent 069f384 commit ea39328
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 14 deletions.
8 changes: 4 additions & 4 deletions bitnami/janusgraph/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
dependencies:
- name: cassandra
repository: oci://registry-1.docker.io/bitnamicharts
version: 11.0.0
version: 11.0.1
- name: common
repository: oci://registry-1.docker.io/bitnamicharts
version: 2.19.0
digest: sha256:444915dac9eb9da6d5ab7763959aeba74fbf1782772784bcfa1c0160354ddad7
generated: "2024-03-22T12:40:07.047827+01:00"
version: 2.19.1
digest: sha256:56cd02afb5fb2de6e6ce92b2a417314d7b266d41432ff1343d5117832ea04228
generated: "2024-04-01T12:56:21.01822+02:00"
37 changes: 36 additions & 1 deletion bitnami/janusgraph/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,46 @@ Returns the hostname of the configured storage backend
Returns the port of the configured storage backend
*/}}
{{- define "janusgraph.storage.port" -}}
{{- if .Values.storage.external.port -}}
{{- if .Values.storage.cassandra.enabled }}
{{- printf "%d" (int .Values.cassandra.service.ports.cql) -}}
{{- else if .Values.storage.external.port -}}
{{- printf "%d" (int .Values.storage.external.port) -}}
{{- end -}}
{{- end -}}

{{/*
Create the storage password secret name
*/}}
{{- define "janusgraph.storage.username" -}}
{{- if .Values.storage.cassandra.enabled -}}
{{- printf "%s" (default "cassandra" .Values.cassandra.dbUser.user) -}}
{{- else if .Values.storage.external.username -}}
{{- .Values.storage.external.username -}}
{{- end -}}
{{- end -}}

{{/*
Create the storage password secret name
*/}}
{{- define "janusgraph.storage.password.secretName" -}}
{{- if .Values.storage.cassandra.enabled -}}
{{- printf "%s-cassandra" (include "common.names.fullname" .) -}}
{{- else if .Values.storage.external.existingSecret -}}
{{- .Values.storage.external.existingSecret -}}
{{- end -}}
{{- end -}}

{{/*
Create the storage password secret key
*/}}
{{- define "janusgraph.storage.password.secretKey" -}}
{{- if .Values.storage.cassandra.enabled -}}
cassandra-password
{{- else if .Values.storage.external.existingSecretPasswordKey -}}
{{- .Values.storage.external.existingSecretPasswordKey -}}
{{- end -}}
{{- end -}}

{{/*
Returns true if a index management backend has been configured
*/}}
Expand Down
2 changes: 1 addition & 1 deletion bitnami/janusgraph/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ data:
storage.directory={{ .Values.storage.berkeleyje.directory }}
{{- else }}
storage.hostname={{ include "janusgraph.storage.hostname" . }}
{{ if (include "janusgraph.storage.port" .)}}
{{- if (include "janusgraph.storage.port" .)}}
storage.port={{ include "janusgraph.storage.port" . }}
{{- end }}
{{- end }}
Expand Down
15 changes: 14 additions & 1 deletion bitnami/janusgraph/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,19 @@ spec:
value: {{ ternary "true" "false" .Values.metrics.enabled | quote }}
- name: GREMLIN_AUTOCONFIGURE_POOL
value: "true"
{{- if (include "janusgraph.storage.username" .)}}
- name: JANUSGRAPH_CFG_STORAGE_USERNAME
value: {{ include "janusgraph.storage.username" . | quote }}
- name: JANUSGRAPH_CFG_STORAGE_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "janusgraph.storage.password.secretName" . }}
key: {{ include "janusgraph.storage.password.secretKey" . }}
{{- end }}
{{- if .Values.storage.cassandra.enabled }}
- name: JANUSGRAPH_CFG_STORAGE_CQL_KEYSPACE
value: {{ .Values.cassandra.keyspace | quote }}
{{- end }}
{{- if .Values.extraEnvVars }}
{{- include "common.tplvalues.render" (dict "value" .Values.extraEnvVars "context" $) | nindent 12 }}
{{- end }}
Expand Down Expand Up @@ -164,7 +177,7 @@ spec:
- name: janusgraph-conf
mountPath: /opt/bitnami/janusgraph/conf
- name: janusgraph-properties
mountPath: /opt/bitnami/janusgraph/conf/janusgraph.properties
mountPath: /bitnami/janusgraph/conf/janusgraph.properties
subPath: janusgraph.properties
{{- if .Values.extraVolumeMounts }}
{{- include "common.tplvalues.render" (dict "value" .Values.extraVolumeMounts "context" $) | nindent 12 }}
Expand Down
29 changes: 22 additions & 7 deletions bitnami/janusgraph/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,6 @@ diagnosticMode:
args:
- infinity

## @section Janusgraph Parameters
##
cassandra:
image:
debug: true
resourcesPreset: "none"
## Settings for the the storage backend
##
storage:
Expand All @@ -89,6 +83,7 @@ storage:
backend: ""
hostname: ""
port: ""
existingSecret: ""

## Settings for index management
##
Expand Down Expand Up @@ -652,7 +647,7 @@ persistence:
metrics:
## @param metrics.enabled Enable the export of Prometheus metrics
##
enabled: true
enabled: false
## Bitnami JMX exporter image
## ref: https://hub.docker.com/r/bitnami/jmx-exporter/tags/
## @param metrics.image.registry [default: REGISTRY_NAME] JMX exporter image registry
Expand Down Expand Up @@ -962,3 +957,23 @@ networkPolicy:
##
ingressNSMatchLabels: {}
ingressNSPodMatchLabels: {}

## @section Cassandra storage sub-chart
## Controlled by value storage.cassandra.enabled
##
cassandra:
## @param cassandra.keyspace Name for cassandra's janusgraph keyspace
##
keyspace: "bitnami_janusgraph"
## Database credentials
## @param cassandra.dbUser.user Cassandra admin user
## @param cassandra.dbUser.password Password for `dbUser.user`. Randomly generated if empty
##
dbUser:
user: bn_janusgraph
password: ""
## Cassandra service port
## @param cassandra.service.ports.cql Cassandra cql port
service:
ports:
cql: 9043

0 comments on commit ea39328

Please sign in to comment.