github.com/replicatedhq/ship@v0.55.0/integration/failing/init/jaeger-helm/expected/.ship/upstream/templates/spark-cronjob.yaml (about)

     1  {{- if .Values.spark.enabled -}}
     2  {{- if or (.Capabilities.APIVersions.Has "batch/v1beta1") (.Capabilities.APIVersions.Has "batch/v2alpha1") -}}
     3  apiVersion: {{ template "cronjob.apiVersion" $ }}
     4  kind: CronJob
     5  metadata:
     6    name: {{ template "jaeger.fullname" . }}-spark
     7    labels:
     8      app: {{ template "jaeger.name" . }}
     9      jaeger-infra: spark-cronjob
    10      chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
    11      component: spark
    12      heritage: {{ .Release.Service }}
    13      release: {{ .Release.Name }}
    14  {{- if .Values.spark.annotations }}
    15    annotations:
    16  {{ toYaml .Values.spark.annotations | indent 4 }}
    17  {{- end }}
    18  spec:
    19    schedule: {{ .Values.spark.schedule | quote }}
    20    successfulJobsHistoryLimit: {{ .Values.spark.successfulJobsHistoryLimit }}
    21    failedJobsHistoryLimit: {{ .Values.spark.failedJobsHistoryLimit }}
    22    jobTemplate:
    23      spec:
    24        template:
    25          metadata:
    26            labels:
    27              app: {{ template "jaeger.name" . }}
    28              component: spark
    29              release: {{ .Release.Name }}
    30              jaeger-infra: spark-instance
    31              {{- if .Values.spark.podLabels }}
    32  {{ toYaml .Values.spark.podLabels | indent 12 }}
    33              {{- end }}
    34          spec:
    35            nodeSelector:
    36  {{ toYaml .Values.spark.nodeSelector | indent 12 }}
    37  {{- if .Values.spark.tolerations }}
    38        tolerations:
    39  {{ toYaml .Values.spark.tolerations | indent 8 }}
    40  {{- end }}
    41            containers:
    42            - name: {{ template "jaeger.fullname" . }}-spark
    43              image: {{ .Values.spark.image }}:{{ .Values.spark.tag }}
    44              imagePullPolicy: {{ .Values.spark.pullPolicy }}
    45              env:
    46              - name: STORAGE
    47                valueFrom:
    48                  configMapKeyRef:
    49                    name: {{ template "jaeger.fullname" . }}
    50                    key: span-storage.type
    51              {{- if eq .Values.storage.type "cassandra" }}
    52              - name: CASSANDRA_CONTACT_POINTS
    53                valueFrom:
    54                  configMapKeyRef:
    55                    name: {{ template "jaeger.fullname" . }}
    56                    key: cassandra.contact-points
    57              - name: CASSANDRA_KEYSPACE
    58                valueFrom:
    59                  configMapKeyRef:
    60                    name: {{ template "jaeger.fullname" . }}
    61                    key: cassandra.keyspace
    62                {{- end }}
    63              {{- if eq .Values.storage.type "elasticsearch" }}
    64              - name: ES_NODES
    65                valueFrom:
    66                  configMapKeyRef:
    67                    name: {{ template "jaeger.fullname" . }}
    68                    key: es.server-urls
    69              - name: ES_NODES_WAN_ONLY
    70                valueFrom:
    71                  configMapKeyRef:
    72                    name: {{ template "jaeger.fullname" . }}
    73                    key: es.nodes-wan-only
    74              - name: ES_PASSWORD
    75                valueFrom:
    76                  configMapKeyRef:
    77                    name: {{ template "jaeger.fullname" . }}
    78                    key: es.password
    79              - name: ES_USERNAME
    80                valueFrom:
    81                  configMapKeyRef:
    82                    name: {{ template "jaeger.fullname" . }}
    83                    key: es.username
    84              {{- end }}
    85              resources:
    86  {{ toYaml .Values.spark.resources | indent 14 }}
    87            restartPolicy: OnFailure
    88  {{- end -}}
    89  {{- end -}}