File tree 6 files changed +28
-3
lines changed
6 files changed +28
-3
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ apiVersion: v2
2
2
name : port-ocean
3
3
description : A Helm chart for Port Ocean integrations
4
4
type : application
5
- version : 0.6.4
5
+ version : 0.7.0
6
6
appVersion : " 0.1.0"
7
7
home : https://getport.io/
8
8
sources :
Original file line number Diff line number Diff line change @@ -102,6 +102,7 @@ The following table lists the configuration parameters of the `port-ocean` chart
102
102
| ` liveEvents.worker.enabled ` | Enable stand-alone live events worker | ` false ` |
103
103
| ` liveEvents.worker.replicaCount ` | Number of stand-alone live events worker replicas | ` 1 ` |
104
104
| ` 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 ` |
105
106
| ` liveEvents.service.enabled ` | Specifies whether the service is enabled or not. | ` true ` |
106
107
| ` liveEvents.service.type ` | Service type for the Port application. | ` ClusterIP ` |
107
108
| ` liveEvents.service.port ` | Port number for the service. | ` 8000 ` |
Original file line number Diff line number Diff line change 20
20
- apiGroups : [ "" ]
21
21
resources : [ "pods" ]
22
22
verbs : [ "get", "list", "watch" ]
23
+ - apiGroups : [ "apps" ]
24
+ resources : [ "deployments" ]
25
+ verbs : [ "get", "list", "patch" ]
23
26
---
24
27
apiVersion : rbac.authorization.k8s.io/v1
25
28
kind : RoleBinding
Original file line number Diff line number Diff line change 80
80
81
81
echo "kubectl get jobs -l ${LABEL_SELECTOR} -o=json | jq -r \".items[] | select(.status.active > 0) | select(.metadata.name != \"$CURRENT_JOB_NAME\") | .metadata.name\""
82
82
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"
84
83
if [ -n "$JOBS" ]; then
84
+ echo "Found jobs: $JOBS"
85
85
for JOB in $JOBS; do
86
86
echo "Setting deadline for job: $JOB"
87
87
kubectl patch job $JOB -n ${NAMESPACE} -p "{\"spec\":{\"activeDeadlineSeconds\":$DEADLINE}, \"metadata\":{\"labels\":{\"canceled\": \"$CURRENT_JOB_NAME\"}}}" --token=$TOKEN
94
94
else
95
95
echo "No running resync jobs found. Starting new job: $CURRENT_JOB_NAME"
96
96
fi
97
+
98
+ # Rollout live events deployment if exists to match integration image versions
99
+ DEPLOYMENT_NAME={{ include "port-ocean.liveEvents.deploymentName" . }}
100
+
101
+ echo "Running: kubectl get deployment ${DEPLOYMENT_NAME} -o=json | jq -r \".metadata.name\""
102
+ DEPLOYMENT=$(kubectl get deployment ${DEPLOYMENT_NAME} --token=$TOKEN -o=json | jq -r ".metadata.name")
103
+ if [ -n $DEPLOYMENT ]; then
104
+ echo "Found deployment: $DEPLOYMENT"
105
+ echo "Rolling out $DEPLOYMENT"
106
+ kubectl rollout restart deployment $DEPLOYMENT -n ${NAMESPACE} --token=$TOKEN
107
+ else
108
+ echo "Deployment $DEPLOYMENT_NAME does not exist. Skipping rollout restart."
109
+ fi
110
+
97
111
echo "Exiting init container"
98
112
containers :
99
113
- name : {{ include "port-ocean.containerName" . }}
Original file line number Diff line number Diff line change @@ -6,8 +6,10 @@ metadata:
6
6
labels :
7
7
{{- include "port-ocean.liveEvents.labels" . | nindent 4 }}
8
8
spec :
9
+ {{- with .Values.liveEvents.deployment.rolloutStrategy }}
9
10
strategy :
10
- type : {{ .Values.workload.deployment.rolloutStrategy | default "Recreate" }}
11
+ {{- toYaml . | trim | nindent 4 }}
12
+ {{- end }}
11
13
replicas : {{ .Values.liveEvents.worker.replicaCount | default 1 }}
12
14
selector :
13
15
matchLabels :
Original file line number Diff line number Diff line change @@ -146,6 +146,11 @@ liveEvents:
146
146
limits :
147
147
memory : " 1024Mi"
148
148
cpu : " 500m"
149
+ deployment :
150
+ rolloutStrategy :
151
+ type : RollingUpdate
152
+ maxSurge : 25%
153
+ maxUnavailable : 25%
149
154
service :
150
155
enabled : true
151
156
type : ClusterIP
You can’t perform that action at this time.
0 commit comments