From c88a93a1e4524c869f09252798e9e5835b80003f Mon Sep 17 00:00:00 2001 From: Julien Cabillot Date: Mon, 18 Apr 2022 11:11:33 -0400 Subject: [PATCH] feat: import --- charts/offlineimap/.helmignore | 26 ++++++++++++++++ charts/offlineimap/Chart.yaml | 27 +++++++++++++++++ charts/offlineimap/README.md | 2 ++ charts/offlineimap/templates/NOTES.txt | 1 + charts/offlineimap/templates/common.yaml | 13 ++++++++ charts/offlineimap/templates/cronjob.yaml | 32 ++++++++++++++++++++ charts/offlineimap/values.yaml | 36 +++++++++++++++++++++++ 7 files changed, 137 insertions(+) create mode 100644 charts/offlineimap/.helmignore create mode 100644 charts/offlineimap/Chart.yaml create mode 100644 charts/offlineimap/README.md create mode 100644 charts/offlineimap/templates/NOTES.txt create mode 100644 charts/offlineimap/templates/common.yaml create mode 100644 charts/offlineimap/templates/cronjob.yaml create mode 100644 charts/offlineimap/values.yaml diff --git a/charts/offlineimap/.helmignore b/charts/offlineimap/.helmignore new file mode 100644 index 0000000..4379e2b --- /dev/null +++ b/charts/offlineimap/.helmignore @@ -0,0 +1,26 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ +# OWNERS file for Kubernetes +OWNERS +# helm-docs templates +*.gotmpl diff --git a/charts/offlineimap/Chart.yaml b/charts/offlineimap/Chart.yaml new file mode 100644 index 0000000..0bbf7fd --- /dev/null +++ b/charts/offlineimap/Chart.yaml @@ -0,0 +1,27 @@ +apiVersion: v2 + +description: Helm chart for offlineimap +name: offlineimap +type: application +version: 0.0.3 +kubeVersion: ">=1.16.0-0" +keywords: +- offlineimap +home: https://scm.docker.cabillot.eu/jcabillot/offlineimap-helm/ +#sources: +#- https://github.com/filebrowser/filebrowser +maintainers: +- name: Julien Cabillot + email: dockerimages@cabillot.eu + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +#appVersion: "1.16.0" +appVersion: "latest" + +dependencies: +- name: common + repository: "https://scm.docker.cabillot.eu/perso/helm-library-common/raw/branch/master/" + version: 4.2.0 diff --git a/charts/offlineimap/README.md b/charts/offlineimap/README.md new file mode 100644 index 0000000..b05c86d --- /dev/null +++ b/charts/offlineimap/README.md @@ -0,0 +1,2 @@ +# offlineimap-helm + diff --git a/charts/offlineimap/templates/NOTES.txt b/charts/offlineimap/templates/NOTES.txt new file mode 100644 index 0000000..90f7b65 --- /dev/null +++ b/charts/offlineimap/templates/NOTES.txt @@ -0,0 +1 @@ +{{- include "common.notes.defaultNotes" . -}} diff --git a/charts/offlineimap/templates/common.yaml b/charts/offlineimap/templates/common.yaml new file mode 100644 index 0000000..2163f2a --- /dev/null +++ b/charts/offlineimap/templates/common.yaml @@ -0,0 +1,13 @@ +{{/* Make sure all variables are set properly */}} +{{- include "common.values.setup" . }} + +{{/* custom render */}} + +{{- include "common.pvc" . }} + +{{- if .Values.secret -}} + {{ include "common.secret" . | nindent 0 }} +{{- end -}} + +{{- include "common.cronjob" . }} + diff --git a/charts/offlineimap/templates/cronjob.yaml b/charts/offlineimap/templates/cronjob.yaml new file mode 100644 index 0000000..5309111 --- /dev/null +++ b/charts/offlineimap/templates/cronjob.yaml @@ -0,0 +1,32 @@ +{{- define "common.cronjob" }} +--- +apiVersion: "batch/v1" +kind: "CronJob" +metadata: + name: {{ include "common.names.fullname" . }} + labels: + {{- include "common.labels" . | nindent 4 }} + {{- with .Values.controller.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.controller.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + schedule: {{ .Values.cronjob.schedule }} + concurrencyPolicy: {{ .Values.cronjob.concurrencyPolicy }} + successfulJobsHistoryLimit: {{ .Values.cronjob.successfulJobsHistoryLimit }} + failedJobsHistoryLimit: {{ .Values.cronjob.failedJobsHistoryLimit }} + jobTemplate: + spec: + backoffLimit: 0 + template: + spec: + containers: + {{- include "common.controller.mainContainer" . | nindent 2 }} + {{- with (include "common.controller.volumes" . | trim) }} + volumes: + {{- nindent 2 . }} + {{- end }} +{{- end }} diff --git a/charts/offlineimap/values.yaml b/charts/offlineimap/values.yaml new file mode 100644 index 0000000..9480b82 --- /dev/null +++ b/charts/offlineimap/values.yaml @@ -0,0 +1,36 @@ +# +# IMPORTANT NOTE +# +# This chart inherits from our common library chart. You can check the default values/options here: +# https://scm.docker.cabillot.eu/perso/helm-library-common +# + +image: + repository: docker.io/jcabillot/offlineimap + tag: "latest" + pullPolicy: Always + +env: + TZ: America/New_York + IMAP_USER: TODO + IMAP_PASS: TODO + IMAP_SRV: TODO + +ingress: + main: + enabled: false + +automountServiceAccountToken: false + +cronjob: + schedule: "0 */4 * * *" + concurrencyPolicy: "Forbid" + successfulJobsHistoryLimit: 3 + failedJobsHistoryLimit: 5 + +persistence: + dump: + enabled: true + type: hostPath + hostPath: /data/volume-offlineimap + mountPath: /dump