Skip to content

Commit f210ff2

Browse files
authored
Merge pull request #235 from port-labs/PORT-16801-bug-port-ocean-helm-chart-does-not-support-custom-container-image-names
(feat): Add support for custom container image name in port-ocean chart
2 parents f5900ba + 68604ed commit f210ff2

File tree

7 files changed

+24
-5
lines changed

7 files changed

+24
-5
lines changed

charts/port-ocean/Chart.yaml

Lines changed: 1 addition & 1 deletion
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.11.0
5+
version: 0.11.1
66
appVersion: "0.1.0"
77
home: https://getport.io/
88
sources:

charts/port-ocean/templates/_helpers.tpl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,20 @@ Get container name
179179
{{- printf "%s-container" $prefix }}
180180
{{- end }}
181181

182+
{{/*
183+
Get default image
184+
*/}}
185+
{{- define "port-ocean.defaultImage" -}}
186+
port-ocean-{{ .Values.integration.type }}:{{ .Values.integration.version | default "latest" }}
187+
{{- end }}
188+
189+
{{/*
190+
Get container image (registry + image name)
191+
*/}}
192+
{{- define "port-ocean.image" -}}
193+
{{ .Values.imageRegistry }}/{{ .Values.image | default (include "port-ocean.defaultImage" .) }}
194+
{{- end }}
195+
182196
{{/*
183197
Get deployment name
184198
*/}}

charts/port-ocean/templates/actions-processor/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ spec:
4444
containers:
4545
- name: {{ include "port-ocean.containerName" . }}
4646
imagePullPolicy: {{ .Values.imagePullPolicy }}
47-
image: '{{ .Values.imageRegistry }}/port-ocean-{{ .Values.integration.type }}:{{ .Values.integration.version | default "latest" }}'
47+
image: {{ include "port-ocean.image" . }}
4848
{{- if .Values.service.enabled }}
4949
securityContext:
5050
{{- if .Values.containerSecurityContext }}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ spec:
132132
containers:
133133
- name: {{ include "port-ocean.containerName" . }}
134134
imagePullPolicy: {{ .Values.imagePullPolicy }}
135-
image: '{{ .Values.imageRegistry }}/port-ocean-{{ .Values.integration.type }}:{{ .Values.integration.version | default "latest" }}'
135+
image: {{ include "port-ocean.image" . }}
136136
{{- if .Values.service.enabled }}
137137
securityContext:
138138
{{- if .Values.containerSecurityContext }}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ spec:
5757
containers:
5858
- name: {{ include "port-ocean.containerName" . }}
5959
imagePullPolicy: {{ .Values.imagePullPolicy }}
60-
image: '{{ .Values.imageRegistry }}/port-ocean-{{ .Values.integration.type }}:{{ .Values.integration.version | default "latest" }}'
60+
image: {{ include "port-ocean.image" . }}
6161
{{- if .Values.service.enabled }}
6262
securityContext:
6363
{{- if .Values.containerSecurityContext }}

charts/port-ocean/templates/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ spec:
5555
containers:
5656
- name: {{ include "port-ocean.containerName" . }}
5757
imagePullPolicy: {{ .Values.imagePullPolicy }}
58-
image: '{{ .Values.imageRegistry }}/port-ocean-{{ .Values.integration.type }}:{{ .Values.integration.version | default "latest" }}'
58+
image: {{ include "port-ocean.image" . }}
5959
{{- if .Values.service.enabled }}
6060
securityContext:
6161
{{- if .Values.containerSecurityContext }}

charts/port-ocean/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ extraLabels: { }
7878

7979
imageRegistry: "ghcr.io/port-labs"
8080

81+
# image: Custom container image name (without registry, but including tag)
82+
# If not specified, defaults to "port-ocean-{integration.type}:{integration.version}"
83+
# Example: "my-custom-ocean-image:v1.0.0" or "port-ocean-custom:latest"
84+
image: ""
85+
8186
imagePullPolicy: Always
8287

8388
imagePullSecrets: [ ]

0 commit comments

Comments
 (0)