-
Notifications
You must be signed in to change notification settings - Fork 546
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
ggcr: Multiple k8s pull secrets for same registry doesn't work #1431
Comments
cc @jwcesign |
#1280 was supposed to handle the case where auth is correctly configured for If there's a bug in that logic though, we should fix it -- the kaniko issue that inspired that change (GoogleContainerTools/kaniko#687) was reopened because the behavior persisted. This doesn't account for the case where there are two creds configured both for the same registry(+repo), but one is invalid and the other works. It sounds like kubelet will collect all matching auths and try them in a loop, and ggcr (currently) doesn't -- it will choose one at ~random and use it, even if it fails and the other would have worked. It will be hard, but not impossible, for pkg/v1/remote to handle this fallback scenario, and try creds for |
I did test as follows: root@cesign [12:38:20 AM] [+47.0°C] [~/git/group-service-acceleration] [main *]
-> # kubectl create secret docker-registry jwcesign \
--docker-server=https://index.docker.io/v1/ \
--docker-username=jwcesign \
--docker-password=xxx \
--docker-email=jwcesign@163.com
root@cesign [12:40:14 AM] [+45.0°C] [~/git/group-service-acceleration] [main *]
-> # kubectl create secret docker-registry cesign \
--docker-server=https://index.docker.io/v1/ \
--docker-username=cesign \
--docker-password=xxx \
--docker-email=jwcesign@gmail.com then create service: root@cesign [12:38:59 AM] [+47.0°C] [~/git/group-service-acceleration/config] [main *]
-> # cat group-service-c.yaml
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: group-service-c
spec:
template:
metadata:
annotations:
autoscaling.knative.dev/minScale: "1"
autoscaling.knative.dev/maxScale: "1"
spec:
containerConcurrency: 1
timeoutSeconds: 30
imagePullSecrets:
- name: jwcesign
- name: cesign
containers:
- image: cesign/secret-test:latest
env:
- name: NOW_SERVICE
value: "group-service-c"
- name: NEXT_SERVICE
value: "" It will failed with 401 when resolving, but if with
I think even with this implementation, the problem can't be fixed |
Correct, see here. |
This issue is stale because it has been open for 90 days with no |
lifecycle/frozen |
Describe the bug
See: knative/serving#13126
To Reproduce
See linked issue:
The text was updated successfully, but these errors were encountered: