You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: kubectl-cnpg: pgbench job fails to pull images from private registries (missing ImagePullSecrets) #10037
When using the kubectl cnpg pgbench command against a cluster that uses a private registry, the generated Job fails with ImagePullBackOff. While the Job correctly identifies the image to use from cluster.Status.Image, it does not copy the ImagePullSecrets defined in the Cluster spec to the Job's Pod template.
Create a CNPG Cluster using an image from a private registry requiring imagePullSecrets.
Run the pgbench plugin command: kubectl cnpg pgbench --job-name bench-test.
Inspect the created job: kubectl get job bench-test -o yaml.
Observe that spec.template.spec.imagePullSecrets is missing.
Probable Root Cause:
In internal/cmd/plugin/pgbench/pgbench.go, the buildJob function populates the PodSpec but omits the ImagePullSecrets field from the cluster specification.
Proposed Fix:
The imagePullSecrets from the Cluster object should be passed into the PodSpec of the Job
Activity
fix(cnpg,plugin): propagate ImagePullSecrets to pgbench Job pod templ…
fix(cnpg,plugin): propagate ImagePullSecrets to pgbench Job pod templ…
fix(cnpg,plugin): propagate ImagePullSecrets to pgbench Job pod templ…
fix(cnpg,plugin): propagate ImagePullSecrets to pgbench Job pod templ…