added keystore support for custom functions auth#3869
Conversation
80170da to
d628e7a
Compare
8e45200 to
2f6762f
Compare
05b1321 to
63eb1eb
Compare
|
Thanks a lot @AndrewChubatiuk for taking a stab at fixing these issues that have been blocking some early adopters progress on testing composition functions! That's very helpful 🤓
Do the changes to make it compatible with crun 1.8.1 have any impact to compatibility with older versions of crun? Should we be considering pinning the version of crun we use, as suggested by @negz here? |
|
Great work @AndrewChubatiuk ! Thanks for digging into this! |
|
it should work with older versions, but anyway only 1.8.1 is available now for debian. I was using build container to test with older versions of crun |
negz
left a comment
There was a problem hiding this comment.
Thanks @AndrewChubatiuk. A few comments, but this looks good overall.
Please squash/cleanup your git commits before we merge this (but please do keep the sysfs fix in a separate commit).
internal/oci/pull.go
Outdated
| } | ||
| if opts.pull == ImagePullPolicyNever { | ||
| return nil, errors.New(errPullNever) | ||
| keychain, err := k8schain.NewInCluster(ctx, k8schain.Options{}) |
There was a problem hiding this comment.
Will NewInCluster always fail if in-cluster auth isn't supported?
Or more generally, what causes NewInCluster to fail and what causes remote.WithAuthFromKeychain to fail? It may be worth adding comments to clarify.
89df254 to
5dfec14
Compare
3c7e814 to
5f660df
Compare
a3dc9b5 to
800db13
Compare
turkenh
left a comment
There was a problem hiding this comment.
Thanks @AndrewChubatiuk, left a couple of comments!
I don't think this PR will be fixing #3718 though which is more about passing credentials for the function itself rather than pulling it image.
|
|
||
| // Secrets for pulling function images. | ||
| // +optional | ||
| ImagePullSecrets []ContainerFunctionImagePullSecret `json:"imagePullSecrets,omitempty"` |
There was a problem hiding this comment.
| ImagePullSecrets []ContainerFunctionImagePullSecret `json:"imagePullSecrets,omitempty"` | |
| ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"` |
Any reason not to use the same type as packagePullSecrets?
There was a problem hiding this comment.
Thanks @AndrewChubatiuk, left a couple of comments!
I don't think this PR will be fixing #3718 though which is more about passing credentials for the function itself rather than pulling it image.
it's true, removed this issue from PR
|
@turkenh made changes, not sure how it's better to pass service account and namespace to RunFunction |
a5186f3 to
41b0fb3
Compare
negz
left a comment
There was a problem hiding this comment.
Sorry this review took so long! I had to switch focus for a while but I expect to be working on Composition Functions again for at least a few weeks. I do think this needs a few more changes - please ping me on Crossplane Slack when you're ready for me to take another look.
internal/controller/apiextensions/composite/composition_ptf_test.go
Outdated
Show resolved
Hide resolved
606d6e5 to
9d55288
Compare
Signed-off-by: Andrew Chubatiuk <andrew.chubatiuk@motional.com>
9d55288 to
2d9f645
Compare
negz
left a comment
There was a problem hiding this comment.
Thanks for persisting with this @AndrewChubatiuk! It looks great. I have some ideas for small improvements, but I can open a follow-up PR for those. I'll copy you on that.
This reduces the complexity of RunFunction a little. This commit also has a few small cleanups following on to crossplane#3869 Signed-off-by: Nic Cope <nicc@rk0n.org>
This reduces the complexity of RunFunction a little. This commit also has a few small cleanups following on to crossplane#3869 Signed-off-by: Nic Cope <nicc@rk0n.org>
This reduces the complexity of RunFunction a little. This commit also has a few small cleanups following on to crossplane#3869 Signed-off-by: Nic Cope <nicc@rk0n.org>
This reduces the complexity of RunFunction a little. This commit also has a few small cleanups following on to crossplane#3869 Signed-off-by: Nic Cope <nicc@rk0n.org>
This reduces the complexity of RunFunction a little. This commit also has a few small cleanups following on to crossplane#3869 Signed-off-by: Nic Cope <nicc@rk0n.org>
Description of your changes
crossplane-xfn doesn't support pulling images from:
Fixes #3868
Fixes #3717
I have:
make reviewableto ensure this PR is ready for review.backport release-x.ylabels to auto-backport this PR if necessary.How has this code been tested
Build container locally with precompiled crun v1.8.1 and tested in AWS EKS with and without an access to ECR