Skip to content
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

k8s token refresh helper #3190

Closed
wants to merge 5 commits into from
Closed

k8s token refresh helper #3190

wants to merge 5 commits into from

Conversation

johrstrom
Copy link
Contributor

Fixes #3056

@treydock I'm going to need a little help on this as I can't create tokens in our environment. I may hop into root on dev, but you may also just know what to do directly.

@@ -1,3 +1,4 @@
#!/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
0 */2 * * * root [ -f /opt/ood/nginx_stage/sbin/nginx_stage ] && /opt/ood/nginx_stage/sbin/nginx_stage nginx_clean 2>&1 | logger -t nginx_clean
0 */8 * * * root [ -f /opt/ood/utils/k8s_token_refresh ] && /opt/ood/utils/k8s_token_refresh | logger -t ood_k8s_refresh
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The packaging systems need to create /opt/ood/utils. This location is really just a best guess as to where we should put this.

@treydock
Copy link
Contributor

I think this approach is wrong and no more secure than what we have now. See #3056 (comment)

@johrstrom
Copy link
Contributor Author

I think this approach is wrong and no more secure than what we have now. See #3056 (comment)

Thanks for the comments. How about we distribute and/or at least hold the helper script on github and get rid of the crontab entry? That way we have docs & mechanism that can be updated/modified but isn't forced.

@treydock
Copy link
Contributor

How about we distribute and/or at least hold the helper script on github and get rid of the crontab entry?

I think holding in git repo so can get a link out of Github sounds fine. Should maybe have a comment at top that it's an example of one way to handle tokens for OnDemand to integrate with Kubernetes.

I think long term what I'd like to work towards is using this approach but the middle-man be Hashicorp Vault and then the Vault agent token for OnDemand would be authorized to query a specific Vault location to pull out the token and the Kubernetes control plane would be authorized to write to the specific Vault location.

@johrstrom
Copy link
Contributor Author

I'm going to close this. there's little point in distributing a file if it's really just an issue of documentation. I can put the same in the docs directly and they can just copy + paste.

@johrstrom johrstrom closed this Dec 20, 2023
@johrstrom johrstrom deleted the k8s-crontab branch December 20, 2023 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

crontab entry for k8s token
3 participants