Skip to content
Snippets Groups Projects
Unverified Commit 47d34ad2 authored by phlg's avatar phlg Committed by GitHub
Browse files

library-chart : add CM for ivysettings.xml (#50)

parent a03bfa88
No related branches found
No related tags found
No related merge requests found
apiVersion: v2
name: library-chart
version: 1.3.5
version: 1.3.6
type: library
......@@ -269,6 +269,44 @@ metadata:
data:
spark-defaults.conf: |
{{- include "library-chart.sparkConf" . | nindent 4 }}
{{- if .Values.repository.mavenRepository -}}
{{ printf "spark.jars.ivySettings /opt/spark/conf/ivysettings.xml" }}
{{- end }}
{{- end }}
{{- end }}
{{/* ConfigMap for Ivy Settings (custom maven repository for Spark) */}}
{{- define "library-chart.ivySettings" -}}
{{ printf "<ivysettings>" }}
{{ printf "<settings defaultResolver=\"custom_maven_repository\"/>" | indent 4 }}
{{ printf "<resolvers>" | indent 4 }}
{{ printf "<ibiblio name=\"custom_maven_repository\" m2compatible=\"true\" root=\"%s\"/>" .Values.repository.mavenRepository | indent 8 }}
{{ printf "</resolvers>" | indent 4 }}
{{ printf "</ivysettings>" }}
{{- end -}}
{{/* Create the name of the config map Ivy Settings to use */}}
{{- define "library-chart.configMapNameIvySettings" -}}
{{- if and (.Values.spark.default) (.Values.repository.mavenRepository) }}
{{- $name:= (printf "%s-configmapivysettings" (include "library-chart.fullname" .) ) }}
{{- $name }}
{{- end }}
{{- end }}
{{/* Template to generate a ConfigMap for Ivy Settings */}}
{{- define "library-chart.configMapIvySettings" -}}
{{- if and (.Values.spark.default) (.Values.repository.mavenRepository) }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "library-chart.configMapNameIvySettings" . }}
labels:
{{- include "library-chart.labels" . | nindent 4 }}
data:
ivysettings.xml: |
{{- include "library-chart.ivySettings" . | nindent 4 }}
{{- end }}
{{- end }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment