Commit a7138f29 authored by João Alexandre Cunha's avatar João Alexandre Cunha
Browse files
parents 669e6ea7 5b2a9414
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ chart:test:
  variables:
    GO_VERSION: "1.18.6"
  script:
    - apk add build-base
    - apk add build-base yamllint
    - wget https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz
    - tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz
    - export PATH=$PATH:/usr/local/go/bin
+19 −9
Original line number Diff line number Diff line
@@ -12,12 +12,16 @@ items:
  metadata:
    name: "{{ template "trackableappname" $ }}-{{ $jobName}}"
    annotations:
      {{ if $.Values.gitlab.app }}app.gitlab.com/app: {{ $.Values.gitlab.app | quote }}{{ end }}
      {{ if $.Values.gitlab.env }}app.gitlab.com/env: {{ $.Values.gitlab.env | quote }}{{ end }}
      {{- if $.Values.gitlab.app }}
      app.gitlab.com/app: {{ $.Values.gitlab.app | quote }}
      {{- end }}
      {{- if $.Values.gitlab.env }}
      app.gitlab.com/env: {{ $.Values.gitlab.env | quote }}
      {{- end }}
    labels:
      track: "{{ $.Values.application.track }}"
      tier: "{{ $.Values.application.tier }}"
      {{ include "sharedlabels" $ | nindent 6 }}
      {{- include "sharedlabels" $ | nindent 6 }}
  spec:
    concurrencyPolicy: {{ default "Forbid" $jobConfig.concurrencyPolicy }}
    failedJobsHistoryLimit: {{ default 1 $jobConfig.failedJobsHistoryLimit }}
@@ -36,8 +40,12 @@ items:
          metadata:
            annotations:
              checksum/application-secrets: "{{ $.Values.application.secretChecksum }}"
              {{ if $.Values.gitlab.app }}app.gitlab.com/app: {{ $.Values.gitlab.app | quote }}{{ end }}
              {{ if $.Values.gitlab.env }}app.gitlab.com/env: {{ $.Values.gitlab.env | quote }}{{ end }}
              {{- if $.Values.gitlab.app }}
              app.gitlab.com/app: {{ $.Values.gitlab.app | quote }}
              {{- end }}
              {{- if $.Values.gitlab.env }}
              app.gitlab.com/env: {{ $.Values.gitlab.env | quote }}
              {{- end }}
              {{- if $.Values.podAnnotations }}
              {{- toYaml $.Values.podAnnotations | nindent 14 }}
              {{- end }}
@@ -47,8 +55,10 @@ items:
              track: "{{ $.Values.application.track }}"
              tier: cronjob
          spec:
            {{- with $.Values.image.secrets }}
            imagePullSecrets:
              {{- toYaml $.Values.image.secrets | nindent 14 }}
            {{- toYaml . | nindent 12 }}
            {{- end }}
            restartPolicy: {{ default "OnFailure" $jobConfig.restartPolicy }}
            {{- with $nodeSelectorConfig := default $.Values.nodeSelector $jobConfig.nodeSelector -}}
            {{- if $nodeSelectorConfig  }}
@@ -65,7 +75,7 @@ items:
            {{- with $tolerationsConfig := default $.Values.tolerations $jobConfig.tolerations -}}
            {{- if $tolerationsConfig }}
            tolerations:
            {{- toYaml $tolerationsConfig | nindent 14 }}
            {{- toYaml $tolerationsConfig | nindent 12 }}
            {{- end }}
            {{- end }}
            {{- with $affinityConfig := default $.Values.affinity $jobConfig.affinity -}}
@@ -76,7 +86,7 @@ items:
            {{- end }}
            {{- if $jobConfig.extraVolumes }}
            volumes:
            {{- toYaml $jobConfig.extraVolumes | nindent 14 }}
            {{- toYaml $jobConfig.extraVolumes | nindent 12 }}
            {{- end }}
            containers:
            - name: {{ $.Chart.Name }}
@@ -190,7 +200,7 @@ items:
                {{- toYaml $.Values.resources | nindent 16 }}
              {{- if $jobConfig.extraVolumeMounts }}
              volumeMounts:
              {{- toYaml $jobConfig.extraVolumeMounts | nindent 16 }}
              {{- toYaml $jobConfig.extraVolumeMounts | nindent 14 }}
              {{- end }}                
{{- end -}}
{{- end -}}
+3 −1
Original line number Diff line number Diff line
@@ -16,8 +16,10 @@ spec:
{{ include "sharedlabels" . | indent 8 }}
    spec:
      restartPolicy: Never
      {{- with $.Values.image.secrets }}
      imagePullSecrets:
{{- toYaml .Values.image.secrets | nindent 10 }}
      {{- toYaml . | nindent 6 }}
      {{- end }}
      containers:
      - name: {{ .Chart.Name }}
        image: {{ template "imagename" . }}
+3 −1
Original line number Diff line number Diff line
@@ -16,8 +16,10 @@ spec:
{{ include "sharedlabels" . | indent 8 }}
    spec:
      restartPolicy: Never
      {{- with $.Values.image.secrets }}
      imagePullSecrets:
{{- toYaml .Values.image.secrets | nindent 10 }}
      {{- toYaml . | nindent 6 }}
      {{- end }}
      containers:
      - name: {{ .Chart.Name }}
        image: {{ template "imagename" . }}
+34 −24
Original line number Diff line number Diff line
@@ -4,8 +4,12 @@ kind: Deployment
metadata:
  name: {{ template "trackableappname" . }}
  annotations:
    {{ if .Values.gitlab.app }}app.gitlab.com/app: {{ .Values.gitlab.app | quote }}{{ end }}
    {{ if .Values.gitlab.env }}app.gitlab.com/env: {{ .Values.gitlab.env | quote }}{{ end }}
    {{- if .Values.gitlab.app }}
    app.gitlab.com/app: {{ .Values.gitlab.app | quote }}
    {{- end }}
    {{- if .Values.gitlab.env }}
    app.gitlab.com/env: {{ .Values.gitlab.env | quote }}
    {{- end }}
  labels:
    track: "{{ .Values.application.track }}"
    tier: "{{ .Values.application.tier }}"
@@ -26,8 +30,12 @@ spec:
    metadata:
      annotations:
        checksum/application-secrets: "{{ .Values.application.secretChecksum }}"
        {{ if .Values.gitlab.app }}app.gitlab.com/app: {{ .Values.gitlab.app | quote }}{{ end }}
        {{ if .Values.gitlab.env }}app.gitlab.com/env: {{ .Values.gitlab.env | quote }}{{ end }}
        {{- if .Values.gitlab.app }}
        app.gitlab.com/app: {{ .Values.gitlab.app | quote }}
        {{- end }}
        {{- if .Values.gitlab.env }}
        app.gitlab.com/env: {{ .Values.gitlab.env | quote }}
        {{- end }}
{{- if .Values.podAnnotations }}
{{- toYaml .Values.podAnnotations | nindent 8 }}
{{- end }}
@@ -39,8 +47,10 @@ spec:
{{- if or (.Values.serviceAccount.name) (.Values.serviceAccountName) }}
      serviceAccountName: {{ .Values.serviceAccount.name | default .Values.serviceAccountName | quote }}
{{- end }}
      {{- with $.Values.image.secrets }}
      imagePullSecrets:
{{- toYaml .Values.image.secrets | nindent 10 }}
      {{- toYaml . | nindent 6 }}
      {{- end }}
{{- if .Values.nodeSelector }}
      nodeSelector:
{{- toYaml .Values.nodeSelector | nindent 8 }}
@@ -61,7 +71,7 @@ spec:
{{- end }}
{{- if .Values.tolerations }}
      tolerations:
{{- toYaml .Values.tolerations | nindent 8 }}
{{- toYaml .Values.tolerations | nindent 6 }}
{{- end }}
{{- if .Values.affinity }}
      affinity:
@@ -69,11 +79,11 @@ spec:
{{- end }}
{{- if .Values.initContainers }}
      initContainers:
{{- toYaml .Values.initContainers | nindent 8 }}
{{- toYaml .Values.initContainers | nindent 6 }}
{{- end }}
{{- if .Values.topologySpreadConstraints }}
      topologySpreadConstraints:
{{- toYaml .Values.topologySpreadConstraints | nindent 8 }}
{{- toYaml .Values.topologySpreadConstraints | nindent 6 }}
{{- end }}
{{- if or (.Values.persistence.enabled) (.Values.extraVolumes) }}
      volumes:
@@ -82,18 +92,18 @@ spec:
{{- range $volume := .Values.persistence.volumes }}
      - name: {{ $volume.name | quote }}
        persistentVolumeClaim:
            {{ $args := dict "context" $context "name" $volume.name }}
          {{- $args := dict "context" $context "name" $volume.name }}
          claimName: {{ template "pvcName" $args }}
{{- end }}
{{- end }}
{{- if .Values.extraVolumes }}
{{- toYaml .Values.extraVolumes | nindent 8 }}
{{- toYaml .Values.extraVolumes | nindent 6 }}
{{- end }}
{{- end }}
      terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
{{- if .Values.hostAliases }}
      hostAliases:
{{- toYaml .Values.hostAliases | nindent 8 }}
{{- toYaml .Values.hostAliases | nindent 6 }}
{{- end }}
{{- if .Values.priorityClassName }}
      priorityClassName: {{ .Values.priorityClassName }}
@@ -188,7 +198,7 @@ spec:
{{- else if eq .Values.livenessProbe.probeType "exec" }}
          exec:
            command:
{{- toYaml .Values.livenessProbe.command | nindent 14 }}
{{- toYaml .Values.livenessProbe.command | nindent 12 }}
{{- end }}
          initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
          timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
@@ -213,7 +223,7 @@ spec:
{{- else if eq .Values.readinessProbe.probeType "exec" }}
          exec:
            command:
{{- toYaml .Values.readinessProbe.command | nindent 14 }}
{{- toYaml .Values.readinessProbe.command | nindent 12 }}
{{- end }}
          initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
          timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
@@ -238,7 +248,7 @@ spec:
{{- else if eq .Values.startupProbe.probeType "exec" }}
          exec:
            command:
{{- toYaml .Values.startupProbe.command | nindent 14 }}
{{- toYaml .Values.startupProbe.command | nindent 12 }}
{{- end }}
          initialDelaySeconds: {{ .Values.startupProbe.initialDelaySeconds }}
          timeoutSeconds: {{ .Values.startupProbe.timeoutSeconds }}
@@ -250,7 +260,7 @@ spec:
{{- toYaml .Values.containerSecurityContext | nindent 10 }}
{{- end }}
        resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- toYaml .Values.resources | nindent 10 }}
{{- if or (.Values.persistence.enabled) (.Values.extraVolumeMounts) }}
        volumeMounts:
{{- if .Values.persistence.enabled }}
@@ -263,7 +273,7 @@ spec:
{{- end }}
{{- end }}
{{- if .Values.extraVolumeMounts }}
{{- toYaml .Values.extraVolumeMounts | nindent 10 }}
{{- toYaml .Values.extraVolumeMounts | nindent 8 }}
{{- end }}
{{- end }}
{{- end -}}
Loading