-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat(Backend + SDK): Update kfp backend and kubernetes sdk to support ConfigMaps as volumes and as env variables #10483
Conversation
…s and as env Signed-off-by: Alexey Roytman <roytman@il.ibm.com>
Hi @roytman. Thanks for your PR. I'm waiting for a kubeflow member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
Signed-off-by: Alexey Roytman <roytman@il.ibm.com>
/lint |
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.
@roytman: 0 warnings.
In response to this:
/lint
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.
Signed-off-by: Alexey Roytman <roytman@il.ibm.com>
/ok-to-test |
@@ -108,7 +107,7 @@ gocloud.dev,https://github.com/google/go-cloud/blob/v0.22.0/LICENSE,Apache-2.0 | |||
golang.org/x/crypto,https://cs.opensource.google/go/x/crypto/+/v0.9.0:LICENSE,BSD-3-Clause | |||
golang.org/x/net,https://cs.opensource.google/go/x/net/+/v0.10.0:LICENSE,BSD-3-Clause | |||
golang.org/x/oauth2,https://cs.opensource.google/go/x/oauth2/+/d3ed0bb2:LICENSE,BSD-3-Clause | |||
golang.org/x/sys,https://cs.opensource.google/go/x/sys/+/v0.8.0:LICENSE,BSD-3-Clause | |||
golang.org/x/sys/unix,https://cs.opensource.google/go/x/sys/+/v0.8.0:LICENSE,BSD-3-Clause |
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.
I don't think the latest commit changed the deps on the apiserver. It should only updated the kubernetes_platform version.
@@ -512,6 +512,39 @@ func extendPodSpecPatch( | |||
} | |||
} | |||
|
|||
// Get config map mount information |
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.
nit: maybe we can refactor these two for loops into functions so that we can also reuse them for secret mount and secret env
Signed-off-by: Alexey Roytman <roytman@il.ibm.com>
Signed-off-by: Alexey Roytman <roytman@il.ibm.com>
Signed-off-by: Alexey Roytman <roytman@il.ibm.com>
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.
Hi @Tomcli , sorry, I don't see how it can be done without changes in |
I'm thinking more of refactoring the common pieces between configmap and secret volume mount into a common function. Since it involved some object abstraction for configmapRef/secretRef, we can defer this to a follow up PR. /lgtm |
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 from SDK standpoint
config_map_key_to_env: Dict[str, str], | ||
) -> PipelineTask: | ||
"""Use a Kubernetes ConfigMap as an environment variable as described in | ||
https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#define-container-environment-variables-using-configmap-data. |
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.
Can we style the link using RST for clean rendering in the reference docs?
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, thanks
Signed-off-by: Alexey Roytman <roytman@il.ibm.com>
/lgtm for SDK |
config_map_name: str, | ||
config_map_key_to_env: Dict[str, str], | ||
) -> PipelineTask: | ||
"""use a Kubernetes ConfigMap as an environment variable as described by the `Kubernetes documentation |
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.
"""use a Kubernetes ConfigMap as an environment variable as described by the `Kubernetes documentation | |
"""Use a Kubernetes ConfigMap as an environment variable as described by the `Kubernetes documentation |
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.
fixed
c3cdaa2
to
ca2b0db
Compare
Signed-off-by: Alexey Roytman <roytman@il.ibm.com>
ca2b0db
to
e989d04
Compare
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
/lgtm for SDK |
Signed-off-by: Alexey Roytman <roytman@il.ibm.com>
@roytman: The following tests failed, say
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. I understand the commands that are listed here. |
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chensun, connor-mccarthy, Tomcli The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
… ConfigMaps as volumes and as env variables (kubeflow#10483) * Update kfp backend and kubernetes sdk to support ConfigMaps as volumes and as env Signed-off-by: Alexey Roytman <roytman@il.ibm.com> * update go.mod, apiserver.csv and driver.csv Signed-off-by: Alexey Roytman <roytman@il.ibm.com> * add test/snapshot/data files Signed-off-by: Alexey Roytman <roytman@il.ibm.com> * fix tests Signed-off-by: Alexey Roytman <roytman@il.ibm.com> * go mod tidy Signed-off-by: Alexey Roytman <roytman@il.ibm.com> * update backend/third_party_licenses/apiserver.csv Signed-off-by: Alexey Roytman <roytman@il.ibm.com> * update backend/third_party_licenses/apiserver.csv Signed-off-by: Alexey Roytman <roytman@il.ibm.com> * fix comments Signed-off-by: Alexey Roytman <roytman@il.ibm.com> * fix comments Signed-off-by: Alexey Roytman <roytman@il.ibm.com> * update go.mod, apiserver.csv and driver.csv Signed-off-by: Alexey Roytman <roytman@il.ibm.com> --------- Signed-off-by: Alexey Roytman <roytman@il.ibm.com>
… ConfigMaps as volumes and as env variables (kubeflow#10483) * Update kfp backend and kubernetes sdk to support ConfigMaps as volumes and as env Signed-off-by: Alexey Roytman <roytman@il.ibm.com> * update go.mod, apiserver.csv and driver.csv Signed-off-by: Alexey Roytman <roytman@il.ibm.com> * add test/snapshot/data files Signed-off-by: Alexey Roytman <roytman@il.ibm.com> * fix tests Signed-off-by: Alexey Roytman <roytman@il.ibm.com> * go mod tidy Signed-off-by: Alexey Roytman <roytman@il.ibm.com> * update backend/third_party_licenses/apiserver.csv Signed-off-by: Alexey Roytman <roytman@il.ibm.com> * update backend/third_party_licenses/apiserver.csv Signed-off-by: Alexey Roytman <roytman@il.ibm.com> * fix comments Signed-off-by: Alexey Roytman <roytman@il.ibm.com> * fix comments Signed-off-by: Alexey Roytman <roytman@il.ibm.com> * update go.mod, apiserver.csv and driver.csv Signed-off-by: Alexey Roytman <roytman@il.ibm.com> --------- Signed-off-by: Alexey Roytman <roytman@il.ibm.com>
… ConfigMaps as volumes and as env variables (kubeflow#10483) * Update kfp backend and kubernetes sdk to support ConfigMaps as volumes and as env Signed-off-by: Alexey Roytman <roytman@il.ibm.com> * update go.mod, apiserver.csv and driver.csv Signed-off-by: Alexey Roytman <roytman@il.ibm.com> * add test/snapshot/data files Signed-off-by: Alexey Roytman <roytman@il.ibm.com> * fix tests Signed-off-by: Alexey Roytman <roytman@il.ibm.com> * go mod tidy Signed-off-by: Alexey Roytman <roytman@il.ibm.com> * update backend/third_party_licenses/apiserver.csv Signed-off-by: Alexey Roytman <roytman@il.ibm.com> * update backend/third_party_licenses/apiserver.csv Signed-off-by: Alexey Roytman <roytman@il.ibm.com> * fix comments Signed-off-by: Alexey Roytman <roytman@il.ibm.com> * fix comments Signed-off-by: Alexey Roytman <roytman@il.ibm.com> * update go.mod, apiserver.csv and driver.csv Signed-off-by: Alexey Roytman <roytman@il.ibm.com> --------- Signed-off-by: Alexey Roytman <roytman@il.ibm.com>
… ConfigMaps as volumes and as env variables (kubeflow#10483) * Update kfp backend and kubernetes sdk to support ConfigMaps as volumes and as env Signed-off-by: Alexey Roytman <roytman@il.ibm.com> * update go.mod, apiserver.csv and driver.csv Signed-off-by: Alexey Roytman <roytman@il.ibm.com> * add test/snapshot/data files Signed-off-by: Alexey Roytman <roytman@il.ibm.com> * fix tests Signed-off-by: Alexey Roytman <roytman@il.ibm.com> * go mod tidy Signed-off-by: Alexey Roytman <roytman@il.ibm.com> * update backend/third_party_licenses/apiserver.csv Signed-off-by: Alexey Roytman <roytman@il.ibm.com> * update backend/third_party_licenses/apiserver.csv Signed-off-by: Alexey Roytman <roytman@il.ibm.com> * fix comments Signed-off-by: Alexey Roytman <roytman@il.ibm.com> * fix comments Signed-off-by: Alexey Roytman <roytman@il.ibm.com> * update go.mod, apiserver.csv and driver.csv Signed-off-by: Alexey Roytman <roytman@il.ibm.com> --------- Signed-off-by: Alexey Roytman <roytman@il.ibm.com>
Description of your changes:
Part of #9768
Fixes #10251
Update kfp backend and kubernetes sdk to support Config Maps as volumes and environment variables.
Checklist: