-
Notifications
You must be signed in to change notification settings - Fork 348
Add pull image authentication. #88
Add pull image authentication. #88
Conversation
CRI validation test result:
|
After this release, all v0.1.0-alpha.1 goals are achieved. I'll cut the v0.1.0-alpha.1 release. After that we should be focusing on documentation before v0.1.0. If containerd cuts 1.0.0-alpha this week, which is unlikely, we'll update containerd api early next week before v0.1.0. Or else, we'll stick with current containerd version, and update after v0.1.0. @kubernetes-incubator/maintainers-cri-containerd |
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 just a couple nits
pkg/server/image_pull_test.go
Outdated
}{ | ||
"should not return error if auth config is nil": { | ||
auth: nil, | ||
expectErr: false, |
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.
not necessary, false is the default...
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.
Will do.
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.
Done.
testPasswd := "password" | ||
testAuthLen := base64.StdEncoding.EncodedLen(len(testUser + ":" + testPasswd)) | ||
testAuth := make([]byte, testAuthLen) | ||
base64.StdEncoding.Encode(testAuth, []byte(testUser+":"+testPasswd)) |
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.
maybe add a bad auth here to get closer to 100% test coverage on the api
For example:
invalidAuthLen := base64.StdEncoding.EncodedLen(len(testUser + "%" + testPasswd))
invalidDecodeAuth := make([]byte, invalidAuthLen)
base64.StdEncoding.Encode(invalidDecodeAuth, []byte(testUser+"%"+testPasswd)) // % is an invalid base64 char...and an invalid separator
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.
Will do.
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.
Done.
Signed-off-by: Lantao Liu <lantaol@google.com>
657ddaa
to
d5674be
Compare
Apply LGTM based on #88 (review). |
…tion Add pull image authentication.
…wcow Add CRI support for windows container/pod updates
Fixes #58.
I've tried this PR with a private image
taotaotheripper/node-problem-detector:v0.2
, it works.However, the node e2e test is still failing because of containerd/containerd#1064, which should possibly be fixed in containerd.
Signed-off-by: Lantao Liu lantaol@google.com