Skip to content

Commit

Permalink
Merge pull request #130 from port-labs/ocean-lowercase-installation-r…
Browse files Browse the repository at this point in the history
…esync-job-name

Ocean lowercase installation resync job name
  • Loading branch information
yairsimantov20 authored Jul 10, 2024
2 parents 9ee1f1f + 615998b commit 2e5fc68
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion charts/port-ocean/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: port-ocean
description: A Helm chart for Port Ocean integrations
type: application
version: 0.4.3
version: 0.5.0
appVersion: "0.1.0"
home: https://getport.io/
sources:
Expand Down
5 changes: 3 additions & 2 deletions charts/port-ocean/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,16 @@ The following table lists the configuration parameters of the `port-ocean` chart
| `scheduledResyncInterval` | The number in minutes to reschedule and poll data from the 3rd party system. When workload.kind is set to CronJob this parameter is required and should be in a format of a cron string | `null` |
| `sendRawDataExamples` | Enable sending raw data examples from the third party API to port for testing and managing the integration mapping | `true` |
| `podAnnotations` | Annotations to be added to the pod. | `{}` |
| `podServiceAccount.name` | Service account to attach to the pod. | `null` |
| `podServiceAccount.name` | Service account to attach to the pod. | `null` |
| `podSecurityContext` | Security context applied to the pod. | `{}` |
| `containerSecurityContext` | Security context applied to the container. | `{}` |
| `extraInitContainers` | Additional init containers to be added to the pod. | `[]` |
| `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.resyncOnInstall` | Should the first installation trigger a resync job. | `true` |
| `workload.cron.resyncOnUpgrade` | Should the upgrade trigger a resync job. | `true` |
| `workload.cron.suspend` | Should the cron scheduling be enabled | `true` |
| `securityContext` | Security context applied to the container. | `{}` |
| `resources` | Container resource requests and limits. | `{}` |
| `nodeSelector` | NodeSelector applied to the pod. | `{}` |
Expand Down
3 changes: 2 additions & 1 deletion charts/port-ocean/templates/cron-job/cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ metadata:
spec:
failedJobsHistoryLimit: 5
successfulJobsHistoryLimit: 1
schedule: {{ required "scheduledResyncInterval is required when using CronJob workload kind" .Values.scheduledResyncInterval | quote }}
schedule: {{ .Values.scheduledResyncInterval | default "0 */1 * * *" }}
suspend: {{ or .Values.workload.cron.suspend (eq .Values.scheduledResyncInterval "")}}
concurrencyPolicy: Replace
jobTemplate:
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{- $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 := print (randAlphaNum 4) "-" .Release.Revision }}
{{- $jobName := (print (randAlphaNum 4) "-" .Release.Revision) | lower }}
apiVersion: batch/v1
kind: Job
metadata:
Expand Down
1 change: 1 addition & 0 deletions charts/port-ocean/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ workload:
resyncTimeoutMinutes: null
resyncOnInstall: true
resyncOnUpgrade: true
suspend: false

resources:
requests:
Expand Down

0 comments on commit 2e5fc68

Please sign in to comment.