Tagging and Pushing Images
Step 1: Set Environment Variables
First, export the VERSION
and CUSTOM-DOCKER-REGISTRY
environment variables in your shell:
export VERSION=<YOUR-DESIRED-VERSION>
export CUSTOM_DOCKER_REGISTRY=<YOUR-CUSTOM-DOCKER-REGISTRY>
Replace <YOUR-DESIRED-VERSION>
with the version of the Odigos images you want to use, and <YOUR-CUSTOM-DOCKER-REGISTRY>
with the URL of your custom Docker registry.
Step 2: Pull the Images
Start by pulling the required images from the official Odigos registry onto your local machine or CI environment:
docker pull registry.odigos.io/odigos-scheduler:$VERSION
docker pull registry.odigos.io/odigos-instrumentor:$VERSION
docker pull registry.odigos.io/odigos-ui:$VERSION
docker pull registry.odigos.io/odigos-autoscaler:$VERSION
docker pull registry.odigos.io/odigos-odiglet:$VERSION
docker pull registry.odigos.io/odigos-collector:$VERSION
Step 3: Tag the Images
Next, Tag each image with your custom Docker registry prefix:
docker tag registry.odigos.io/odigos-scheduler:$VERSION $CUSTOM_DOCKER_REGISTRY/odigos-scheduler:$VERSION
docker tag registry.odigos.io/odigos-instrumentor:$VERSION $CUSTOM_DOCKER_REGISTRY/odigos-instrumentor:$VERSION
docker tag registry.odigos.io/odigos-ui:$VERSION $CUSTOM_DOCKER_REGISTRY/odigos-ui:$VERSION
docker tag registry.odigos.io/odigos-autoscaler:$VERSION $CUSTOM_DOCKER_REGISTRY/odigos-autoscaler:$VERSION
docker tag registry.odigos.io/odigos-odiglet:$VERSION $CUSTOM_DOCKER_REGISTRY/odigos-odiglet:$VERSION
docker tag registry.odigos.io/odigos-collector:$VERSION $CUSTOM_DOCKER_REGISTRY/odigos-collector:$VERSION
Note: Prior to v1.0.155, Odigos images were prefixed with keyval/
(such as keyval/odigos-scheduler
) In v1.0.155+, this is no longer the case, and Odigos does not assume this prefix. If you were hosting custom images prior to this version, you may have to re-tag your images to remove the keyval/
prefix.
Step 4: Push the Images
Now, push the tagged images to your custom Docker registry:
docker push $CUSTOM_DOCKER_REGISTRY/odigos-scheduler:$VERSION
docker push $CUSTOM_DOCKER_REGISTRY/odigos-instrumentor:$VERSION
docker push $CUSTOM_DOCKER_REGISTRY/odigos-ui:$VERSION
docker push $CUSTOM_DOCKER_REGISTRY/odigos-autoscaler:$VERSION
docker push $CUSTOM_DOCKER_REGISTRY/odigos-odiglet:$VERSION
docker push $CUSTOM_DOCKER_REGISTRY/odigos-collector:$VERSION
If your Docker registry is private, configure your Kubernetes cluster to pull images from it. Refer to the official Kubernetes documentation for guidance: Pull an Image from a Private Registry.
Note: To ensure your Odigos deployments and daemonsets can pull images from a private registry, patch them to add the image pull secret.
Use the following commands:
export ODIGOS_NAMESPACE=<NAMESPACE-WHERE-ODIGOS-IS-INSTALLED>
export IMAGE_PULL_SECRET=<NAME-OF-IMAGE-PULL-SECRET>
kubectl patch deployment odigos-ui -n $ODIGOS_NAMESPACE \
--type='json' -p='[{"op": "add", "path": "/spec/template/spec/imagePullSecrets", "value": [{"name": '$IMAGE_PULL_SECRET'}]}]'
kubectl patch deployment odigos-scheduler -n $ODIGOS_NAMESPACE \
--type='json' -p='[{"op": "add", "path": "/spec/template/spec/imagePullSecrets", "value": [{"name": '$IMAGE_PULL_SECRET'}]}]'
kubectl patch deployment odigos-instrumentor -n $ODIGOS_NAMESPACE \
--type='json' -p='[{"op": "add", "path": "/spec/template/spec/imagePullSecrets", "value": [{"name": '$IMAGE_PULL_SECRET'}]}]'
kubectl patch deployment odigos-autoscaler -n $ODIGOS_NAMESPACE \
--type='json' -p='[{"op": "add", "path": "/spec/template/spec/imagePullSecrets", "value": [{"name": '$IMAGE_PULL_SECRET'}]}]'
kubectl patch deployment odigos-gateway -n $ODIGOS_NAMESPACE \
--type='json' -p='[{"op": "add", "path": "/spec/template/spec/imagePullSecrets", "value": [{"name": '$IMAGE_PULL_SECRET'}]}]'
kubectl patch daemonset odiglet -n $ODIGOS_NAMESPACE \
--type='json' -p='[{"op": "add", "path": "/spec/template/spec/imagePullSecrets", "value": [{"name": '$IMAGE_PULL_SECRET'}]}]'
kubectl patch daemonset odigos-data-collection -n $ODIGOS_NAMESPACE \
--type='json' -p='[{"op": "add", "path": "/spec/template/spec/imagePullSecrets", "value": [{"name": '$IMAGE_PULL_SECRET'}]}]'
Step 6: Install Odigos Using Custom Images
Finally, install Odigos using the images from your custom Docker registry:
odigos install --image-prefix=$CUSTOM_DOCKER_REGISTRY
odigos install --image-prefix=$CUSTOM_DOCKER_REGISTRY
helm repo update
helm upgrade --install odigos odigos/odigos --namespace odigos-system --create-namespace --set imagePrefix=$CUSTOM_DOCKER_REGISTRY
kubectl label namespace odigos-system odigos.io/system-object="true"