-
Notifications
You must be signed in to change notification settings - Fork 84
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
Fix kubernetes cert connections #4519
base: master
Are you sure you want to change the base?
Conversation
codalab/worker/main.py
Outdated
@@ -222,7 +222,7 @@ def parse_args(): | |||
parser.add_argument( | |||
'--kubernetes-cert', | |||
type=str, | |||
help='Contents of the SSL cert for the Kubernetes cluster. Only applicable if --bundle-runtime is set to kubernetes and --kubernetes-cert-path is set to /dev/null.', | |||
help='Base64 encoded contents of the SSL cert for the Kubernetes cluster. Only applicable if --bundle-runtime is set to kubernetes and --kubernetes-cert-path is set to /dev/null.', |
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.
Is there not a way to use a path or environment variables?
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.
This is set using an environment variable -- CODALAB_WORKER_MANAGER_GPU_KUBERNETES_CERT
-- when starting up codalab_service.py.
We could use a path, but in that case we'd need to copy the cert file over to the worker pods on kubernetes when running them, which I think is a more complex solution.
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.
If it's already an environment variable, why do we need to pass it in as an argument?
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 try this
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.
This looks nice and clean. So we ended up being able to pass the cert as a file (rather than doing some weird base64 or quoting thing)? I thought we had trouble with this approach last time?
We passed it as a file, but through an environment variable rather than a command-line argument (we were trying a command-line argument earlier, which didn't work). |
Fix kubernetes cert connections -- we are now passing certs in through an environment variable. This removes the issues that were happening with the newlines being parsed.