Deploy a custom-coded Ocean integration
Scaffolds include a Dockerfile. Build your own image, then run it with Docker or deploy it with the Ocean Helm chart using that image.
Build a Docker image
From the integration directory (adjust the tag as needed):
docker build -t my-custom-coded-ocean-integration:latest .
The scaffold Dockerfile installs Poetry dependencies and runs the Ocean process. Keep secrets out of the image. Pass Port credentials and integration config as environment variables or Kubernetes secrets at runtime.
Run with Docker
docker run --rm \
-e OCEAN__PORT__CLIENT_ID="<PORT_CLIENT_ID>" \
-e OCEAN__PORT__CLIENT_SECRET="<PORT_CLIENT_SECRET>" \
-e OCEAN__INTEGRATION__IDENTIFIER="my-private-integration" \
-e OCEAN__INTEGRATION__TYPE="myIntegration" \
-e OCEAN__EVENT_LISTENER__TYPE="POLLING" \
-e OCEAN__INTEGRATION__CONFIG__API_BASE_URL="https://api.example.com" \
-e OCEAN__INTEGRATION__CONFIG__API_TOKEN="<TOKEN>" \
-p 8000:8000 \
my-custom-coded-ocean-integration:latest
Use the same env var naming as in test and run locally.
Deploy with Helm
- Push your image to a registry your cluster can pull.
- Add the Port Helm repository:
helm repo add port-labs https://port-labs.github.io/helm-charts
helm repo update
- Install the
port-oceanchart and point it at your image. The chart usesimageRegistryplusimage(repository path and tag, without the registry prefix):
helm upgrade --install my-private-integration port-labs/port-ocean \
--set port.clientId="<PORT_CLIENT_ID>" \
--set port.clientSecret="<PORT_CLIENT_SECRET>" \
--set initializePortResources=true \
--set integration.identifier="my-private-integration" \
--set integration.type="myIntegration" \
--set integration.eventListener.type="POLLING" \
--set imageRegistry="YOUR_REGISTRY" \
--set image="my-custom-coded-ocean-integration:latest" \
--set integration.secrets.apiToken="<TOKEN>" \
--set integration.config.apiBaseUrl="https://api.example.com"
See the port-ocean chart values for the full list of knobs.
For listener choices, scheduled resync, proxies, TLS, and health endpoints, use:
After deploy
Confirm the integration appears under Connectors, that a resync completes, and that entities match your mapping. Use the integration's sync status and event log when troubleshooting.