New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for default image pull secret name #921
Add support for default image pull secret name #921
Conversation
Currently it's supported to define imagePullSecrets in the runner spec e.g as a RunnerDeployment. However the controller can specify a default runner image. If this image is on a private registry it requires the image pull secret. This PR adds this option also to the controller to be consistent with supporting a default runner image. This makes it much easier when using runner images from private registries
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
still needed |
@fgalind1 Sorry for the delay and thanks for your contribution! I'm going to review/merge this towards our next feature release(0.21.0) |
944c8aa
to
7590eed
Compare
controllers/runner_controller.go
Outdated
pod.Spec.ImagePullSecrets = []corev1.LocalObjectReference{ | ||
{Name: imagePullSecret}, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pod.Spec.ImagePullSecrets = []corev1.LocalObjectReference{ | |
{Name: imagePullSecret}, | |
} | |
pod.Spec.ImagePullSecrets = append(pod.Spec.ImagePullSecrets, []corev1.LocalObjectReference{ | |
{Name: imagePullSecret}, | |
}) |
otherwise pod.spec.ImagePullSecrets always contain one element which correlate to the last element in defualtRUnnerImagePullSecrets, which won't be what you want :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks good catch - fixed in ffa0d58
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks a lot for your efforts and contribution @fgalind1!
Currently it's supported to define
ImagePullSecrets
in the runner spec e.g as aRunnerDeployment
. However the controller can specify a default runner image.If this image is on a private registry it requires the image pull secret. This PR adds this option also to the controller to be consistent with supporting a default runner image. This makes it much
easier when using runner images from private registries
Fixes #896