plugin-barman-cloud icon indicating copy to clipboard operation
plugin-barman-cloud copied to clipboard

Sidecar image with private registry & authentication in air-gapped environment

Open vadius45 opened this issue 1 year ago • 2 comments

Follow-up on https://github.com/cloudnative-pg/plugin-barman-cloud/issues/391

Hello,

I understand I can modify the location of the sidecar image with an env variable in the operator deployment and it works fine with our lab environment, where we use the harbor registry and no auth. That said, we are required to use other registries from dev to prod environments and I don't understand how I can define imagePullSecrets for the sidecar container since it's not a regular PodSpec resource.

Any advice or suggestion ?

For the record, we transitioned all other images ( controllers + PG) to our internal registry with authentication, no issue.

Thanks

vadius45 avatar Aug 31 '25 08:08 vadius45

Hi @vadius45! I'm Dosu and I’m helping the plugin-barman-cloud team.

Currently, there is no supported way to specify imagePullSecrets for the plugin-barman-cloud sidecar container, since it isn't exposed as a regular PodSpec resource. The only documented method for using a private registry is to override the sidecar image location via the SIDECAR_IMAGE environment variable in the operator deployment, then restart the plugin pod for the change to take effect source.

If you need registry authentication, a Kubernetes-level workaround is to attach your imagePullSecrets to the default ServiceAccount in the namespace. This way, all pods—including those with injected sidecars—will use those secrets for image pulls, unless overridden elsewhere. Note that this applies to every pod in the namespace, not just the sidecar source.

There is ongoing user interest and a feature request to support imagePullSecrets for the sidecar via the Cluster CRD, but this is not yet implemented source. For now, keep an eye on upstream issues and documentation for future updates.

To reply, just mention @dosu.


Docs are dead. Just use Dosu.

Leave Feedback Ask Dosu about plugin-barman-cloud Share Dosu with your team

dosubot[bot] avatar Aug 31 '25 08:08 dosubot[bot]

The sidecar runs in the cluster's pods, so it uses the pull secrets of the Cluster. Set spec.imagePullSecrets on the Cluster, the same way as for the PostgreSQL image. There is no separate setting for the sidecar. If you use a custom spec.serviceAccountName, add the secrets to that service account yourself. I'm adding this to the docs.

mnencia avatar Nov 04 '26 13:11 mnencia