{{- if .Values.graphinsights.enabled }}
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ template "cmem.name-graphinsights" . }}
  labels:
    {{- include "cmem.labels-graphinsights" . | nindent 4 }}
data:
  JAVA_TOOL_OPTIONS: -Djava.io.tmpdir=/tmp {{ .Values.graphinsights.config.javaToolOptions }}
  SERVER_PORT: {{ .Values.graphinsights.service.port | quote }}
  SERVER_SERVLET_CONTEXTPATH: "/graphinsights"
  SERVER_SERVLET_SESSION_TIMEOUT: "36000s"
  DEPLOY_BASE_URL: {{ .Values.global.protocol }}://{{ .Values.global.hostname }}
  OAUTH_ISSUER_URL: {{  .Values.global.keycloakIssuerUrl | quote }}
  OAUTH_JWK_SET_URL: {{ print .Values.global.keycloakIssuerUrl "/protocol/openid-connect/certs" | quote }}
  GRAPHINSIGHTS_OAUTH_CLIENT_ID: {{ .Values.global.oauthClientIdGraphInsights | quote }}
  LOGGING_LEVEL_ROOT: DEBUG
{{- end }}
