Skip to content

Commit

Permalink
better configuration for the extra volumes & mounts
Browse files Browse the repository at this point in the history
  • Loading branch information
yairsimantov20 committed Jun 12, 2024
1 parent 97022ee commit 7a52cea
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
2 changes: 2 additions & 0 deletions charts/port-ocean/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ The following table lists the configuration parameters of the `port-ocean` chart
| `workload.kind` | Kind of the workload. Can be either Deployment or CronJob | `Deployment` |
| `workload.deployment.rolloutStrategy` | Deployment rollout strategy. | `Recreate` |
| `workload.cron.resyncTimeoutMinutes` | Timeout in minutes for the resync cron job. When set to 0 or null, the cron job will not have a timeout. | `60` |
| `workload.cron.resyncOnInstall` | Should the first instllation trigger a resync job. | `true` |
| `workload.cron.resyncOnUpgrade` | Should the upgrade trigger a resync job. | `true` |
| `securityContext` | Security context applied to the container. | `{}` |
| `resources` | Container resource requests and limits. | `{}` |
| `nodeSelector` | NodeSelector applied to the pod. | `{}` |
Expand Down
4 changes: 2 additions & 2 deletions charts/port-ocean/templates/cron-job/cron.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{{- if eq .Values.workload.kind "CronJob" }}
{{- $maxRunTimeSeconds := "" }}
{{- if (.Values.workload.cron).resyncTimeout }}
{{- if (.Values.workload.cron).resyncTimeoutMinutes }}
{{- $minute := 60 }}
{{- $maxRunTimeSeconds = (mul (.Values.workload.cron).resyncTimeout $minute )}}
{{- $maxRunTimeSeconds = (mul (.Values.workload.cron).resyncTimeoutMinutes $minute )}}
{{- end }}
apiVersion: batch/v1
kind: CronJob
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{{- if and (eq .Values.workload.kind "CronJob") }}
{{- $resyncOnInstall := (.Values.workload.cron).resyncOnInstall | default true }}
{{- $resyncOnUpgrade := (.Values.workload.cron).resyncOnUpgrade | default true }}
{{- if and (eq .Values.workload.kind "CronJob") (or $resyncOnInstall $resyncOnUpgrade) }}
{{- $jobName := .Release.Revision }}
apiVersion: batch/v1
kind: Job
Expand Down
7 changes: 5 additions & 2 deletions charts/port-ocean/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ workload:
deployment:
rolloutStrategy: "Recreate"

# cron:
# resyncTimeout: 60
cron:
# number of minutes to wait before cancelling the resync
resyncTimeoutMinutes: null
resyncOnInstall: true
resyncOnUpgrade: true

resources:
requests:
Expand Down

0 comments on commit 7a52cea

Please sign in to comment.