-
Notifications
You must be signed in to change notification settings - Fork 301
fix: Extract a template for the nextcloud container (app/cronjob) #712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -49,34 +49,8 @@ spec: | |
| {{- end}} | ||
| {{- end }} | ||
| containers: | ||
| - name: {{ .Chart.Name }} | ||
| image: {{ include "nextcloud.image" . }} | ||
| imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
| {{- with .Values.lifecycle }} | ||
| lifecycle: | ||
| {{- with .postStartCommand }} | ||
| postStart: | ||
| exec: | ||
| command: | ||
| {{- toYaml . | nindent 18 }} | ||
| {{- end }} | ||
| {{- with .preStopCommand }} | ||
| preStop: | ||
| exec: | ||
| command: | ||
| {{- toYaml . | nindent 18 }} | ||
| {{- end }} | ||
| {{- end }} | ||
| env: | ||
| {{- include "nextcloud.env" . | nindent 12 }} | ||
| resources: | ||
| {{- toYaml .Values.resources | nindent 12 }} | ||
| {{- with .Values.nextcloud.securityContext }} | ||
| securityContext: | ||
| {{- toYaml . | nindent 12 }} | ||
| {{- end }} | ||
| volumeMounts: | ||
| {{- include "nextcloud.volumeMounts" . | trim | nindent 12 }} | ||
| {{- $containerName := .Chart.Name }} | ||
| {{- include "nextcloud.container" ( dict "containerName" $containerName "securityContext" .Values.nextcloud.securityContext "rootContext" $ "context" .Values ) | nindent 8 }} | ||
| {{- range $hook, $shell := .Values.nextcloud.hooks }} | ||
| {{- if $shell }} | ||
| - name: nextcloud-hooks | ||
|
|
@@ -241,36 +215,8 @@ spec: | |
| {{- end }} | ||
| {{- end }}{{/* end-if nginx.enabled */}} | ||
| {{- if .Values.cronjob.enabled }} | ||
| - name: {{ .Chart.Name }}-cron | ||
| image: {{ include "nextcloud.image" . }} | ||
| imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
| command: | ||
| {{- toYaml .Values.cronjob.command | nindent 12 }} | ||
| {{- with .Values.cronjob.lifecycle }} | ||
| lifecycle: | ||
| {{- with .postStartCommand }} | ||
| postStart: | ||
| exec: | ||
| command: | ||
| {{- toYaml . | nindent 18 }} | ||
| {{- end }} | ||
| {{- with .preStopCommand }} | ||
| preStop: | ||
| exec: | ||
| command: | ||
| {{- toYaml . | nindent 18 }} | ||
| {{- end }} | ||
| {{- end }} | ||
| env: | ||
| {{- include "nextcloud.env" . | nindent 12 }} | ||
| resources: | ||
| {{- toYaml .Values.cronjob.resources | nindent 12 }} | ||
| {{- with .Values.cronjob.securityContext }} | ||
| securityContext: | ||
| {{- toYaml . | nindent 12 }} | ||
| {{- end }} | ||
| volumeMounts: | ||
| {{- include "nextcloud.volumeMounts" . | trim | nindent 12 }} | ||
| {{- $containerName := printf "%s-cron" .Chart.Name }} | ||
| {{- include "nextcloud.container" ( dict "containerName" $containerName "securityContext" .Values.cronjob.securityContext "rootContext" $ "context" .Values.cronjob ) | nindent 8 }} | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why we need
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh i see -> do you like to move the values.yaml (and make a breaking change / bump to major)? remembers me on #379 (comment)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @wrenix If it's okay for you I'd rather remove the As for the major version - I hope you remember that my actual goal is to move the cron sidecar to a Kubernetes CronJob.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @wrenix Any answer to my questions?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Might be unrelated but
|
||
| {{- end }}{{/* end-if cronjob.enabled */}} | ||
| {{- with .Values.nextcloud.extraSidecarContainers }} | ||
| {{- toYaml . | nindent 8 }} | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use
withinstatt ofif