Repository navigation
Adding support for imagePullSecrets - #168
Conversation
This adds support for specifying imagePullSecrets for a private registry. The secrets are specified in the same format they would be on a Deployment and need to exist in the knative-serving namespace in order to work.
knative-prow-robot
left a comment
There was a problem hiding this comment.
@garron: 0 warnings.
Details
In response to this:
Fixes #124
Proposed Changes
- Adds support for specifying imagePullSecrets for a private registry.
- The secrets are specified in the same format they would be on a Deployment
- The secret needs to be created in the knative-serving namespace in order to work
I attempted to minimize duplication in the tests by doing a small amount of refactoring as I was reusing examples.
Release Note
Add support for providing imagePullSecrets when using a private registry for the knative images.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
| log.Debugf("Adding ImagePullSecrets: %v", registry.ImagePullSecrets) | ||
| existingSecrets := deployment.Spec.Template.Spec.ImagePullSecrets | ||
| deployment.Spec.Template.Spec.ImagePullSecrets = append(registry.ImagePullSecrets, existingSecrets...) | ||
| if len(existingSecrets) > 0 { |
There was a problem hiding this comment.
I do not think you need to check the length of the existing secrets, you can directly use:
deployment.Spec.Template.Spec.ImagePullSecrets = append(
deployment.Spec.Template.Spec.ImagePullSecrets, registry.ImagePullSecrets...)
|
/lgtm |
|
The following is the coverage report on pkg/.
|
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: garron, houshengbo The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Fixes #124
Proposed Changes
I attempted to minimize duplication in the tests by doing a small amount of refactoring as I was reusing examples.
Release Note