There are several ways provided for you to customize the images pulled by the Harbor operator.
Set the image pulling path of each Harbor component or dependent service via the operator environment variables when deploying the operator controller into the Kubernetes cluster. The image paths set by this way will be applicable to all the Harbor clusters deployed from the operator.
By default, the environment variables settings of the image pulling paths are not activated in the default full stack operator deployment manifest and Harbor operator only deployment manifest. You can follow the way shown below to enable it.
- Uncomment the following content section in the full stack or Harbor operator only kustomization yaml file.
# - patch/image-source.yaml
-
Regenerate the deployment manifest with the updated kustomization file and apply it
# Change workdir cd manifests/cluster # Generate the deployment manifest kustomize build . -o my_new_deployment.yaml # Apply kubectl apply -f my_new_deployment.yaml # Or use command pipe kustomize build . | kubectl apply -f -
or directly apply via kustomization file
# Change workdir
cd manifests/cluster
# Apply with kustomization template file
kubectl apply -k kustomization.yaml
Configure spec.imageSource
to specify the general image source from where pulling images. The image settings configured here are applicable to all the components of the deploying Harbor.
For how to configure it, refer to the CRD spec
Each component including both Harbor components and its in-cluster dependent services has related configurations to specify image pulling source for the specified component.
For how to configure the image source for the specified Harbor component, refer to the portal section of the CRD spec.
For how to configure the image source for the specified in-cluster dependent service, refer to the in-cluster storage section of CRD spec.