Skip to content

Commit 20e9ebc

Browse files
rollingupdate rollout strategy for live events deployment
1 parent 61299b5 commit 20e9ebc

File tree

5 files changed

+12
-4
lines changed

5 files changed

+12
-4
lines changed

charts/port-ocean/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: port-ocean
33
description: A Helm chart for Port Ocean integrations
44
type: application
5-
version: 0.6.5
5+
version: 0.7.0
66
appVersion: "0.1.0"
77
home: https://getport.io/
88
sources:

charts/port-ocean/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ The following table lists the configuration parameters of the `port-ocean` chart
102102
| `liveEvents.worker.enabled` | Enable stand-alone live events worker | `false` |
103103
| `liveEvents.worker.replicaCount` | Number of stand-alone live events worker replicas | `1` |
104104
| `liveEvents.worker.resources` | Container resource requests and limits for stand-alone live events worker | `{}` |
105+
| `liveEvents.deployment.rolloutStrategy` | Standalone live events worker deployment rollout strategy. | `RollingUpdate` |
105106
| `liveEvents.service.enabled` | Specifies whether the service is enabled or not. | `true` |
106107
| `liveEvents.service.type` | Service type for the Port application. | `ClusterIP` |
107108
| `liveEvents.service.port` | Port number for the service. | `8000` |

charts/port-ocean/templates/cron-job/cron.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ spec:
8080
8181
echo "kubectl get jobs -l ${LABEL_SELECTOR} -o=json | jq -r \".items[] | select(.status.active > 0) | select(.metadata.name != \"$CURRENT_JOB_NAME\") | .metadata.name\""
8282
JOBS=$(kubectl get jobs -l ${LABEL_SELECTOR} -o=json --token=$TOKEN | jq -r ".items[] | select(.status.active > 0) | select(.metadata.name != \"$CURRENT_JOB_NAME\") | .metadata.name")
83-
echo "Found jobs: $JOBS"
8483
if [ -n "$JOBS" ]; then
84+
echo "Found jobs: $JOBS"
8585
for JOB in $JOBS; do
8686
echo "Setting deadline for job: $JOB"
8787
kubectl patch job $JOB -n ${NAMESPACE} -p "{\"spec\":{\"activeDeadlineSeconds\":$DEADLINE}, \"metadata\":{\"labels\":{\"canceled\": \"$CURRENT_JOB_NAME\"}}}" --token=$TOKEN
@@ -100,8 +100,8 @@ spec:
100100
101101
echo "Running: kubectl get deployment ${DEPLOYMENT_NAME} -o=json | jq -r \".metadata.name\""
102102
DEPLOYMENT=$(kubectl get deployment ${DEPLOYMENT_NAME} --token=$TOKEN -o=json | jq -r ".metadata.name")
103-
echo "Found deployment: $DEPLOYMENT"
104103
if [ -n $DEPLOYMENT ]; then
104+
echo "Found deployment: $DEPLOYMENT"
105105
echo "Rolling out $DEPLOYMENT"
106106
kubectl rollout restart deployment $DEPLOYMENT -n ${NAMESPACE} --token=$TOKEN
107107
else

charts/port-ocean/templates/deployment-live-events.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ metadata:
66
labels:
77
{{- include "port-ocean.liveEvents.labels" . | nindent 4 }}
88
spec:
9+
{{- with .Values.liveEvents.deployment.rolloutStrategy }}
910
strategy:
10-
type: {{ .Values.workload.deployment.rolloutStrategy | default "Recreate" }}
11+
{{- toYaml . | trim | nindent 4 }}
12+
{{- end }}
1113
replicas: {{ .Values.liveEvents.worker.replicaCount | default 1 }}
1214
selector:
1315
matchLabels:

charts/port-ocean/values.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,11 @@ liveEvents:
146146
limits:
147147
memory: "1024Mi"
148148
cpu: "500m"
149+
deployment:
150+
rolloutStrategy:
151+
type: RollingUpdate
152+
maxSurge: 25%
153+
maxUnavailable: 25%
149154
service:
150155
enabled: true
151156
type: ClusterIP

0 commit comments

Comments
 (0)