-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
OpenStack: Add support for clouds.yaml for Swift state store #8793
Comments
Curious about your input on this @zetaab 😊 |
Sounds good |
I had a desire to also provide a pull request for the change, but I'm afraid my golang (go modules etc) skills aren't yet up to the task (although I saw how you did upgrade gophercloud in 769c02f). Also not sure how to test the change properly, or what kind of automated test coverage there is for |
deps are going to be updated in #8884 |
@zetaab Would we maybe want/need to add https://github.com/gophercloud/utils too? So |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
I stopped using Kops for my OpenStack clusters, so you won’t see me creating a PR for this. I’ll leave this open in case anyone else finds this and doesn’t mind fixing this. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
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. |
1. Describe IN DETAIL the feature/behavior/change you would like to see.
Most OpenStack clients support authenticating via either
OS_*
environment variables (often sourced from anopenrc
file), or via aclouds.yaml
file.The latter also supports defining multiple OpenStack clouds and/or regions in the same file.
However since Kops implements the older authentication method from gophercloud (
gophercloud.AuthOptions
), it doesn't yet/automatically support newer auth methods that the newerclientconfig.AuthOptions
supports.I'm suggesting we simply switch to this newer authentication method from gophercloud that supports both
openrc
andclouds.yaml
.This openstack spec describes a bit more about the ongoing change from
openrc
toclouds.yaml
: https://github.com/openstack/openstack-specs/blob/master/specs/clouds-yaml-support.rst2. Feel free to provide a design supporting your feature request.
Today we use
gophercloud.AuthOptions
inutil/pkg/vfs/swiftfs.go
, but my thinking is that we could switch to useclientconfig.ClientOpts
orclientconfig.AuthOptions
instead (and get support for this newer auth method).See more about how gophercloud did this switch here: gophercloud/gophercloud#252 (comment)
Here's gophercloud's documentation mentioning that
clientconfig
now is the recommended way for all authentication purposes: https://pkg.go.dev/github.com/gophercloud/gophercloud?tab=docHere's examples of how to use clientconfig: https://pkg.go.dev/github.com/gophercloud/utils/openstack/clientconfig?tab=doc
Here's an example of how the Terraform implementation does this: https://github.com/gophercloud/utils/blob/9864b6f1f12fbbad1665b34cc1022035ae86f334/terraform/auth/config.go#L94-L151
3. Other notes
I believe fixing this might also help alleviate some issues with unclear usage of
OS_*DOMAIN*
variables sincegophercloud/utils
covers this as seen in the code here.For reference, I've also discovered that Kops seems to implement its own kind of not-so-documented
~/.openstack/config
configuration file (documentation, implementation), but so far I assume thatclouds.yaml
doesn't fully replace that functionality.The text was updated successfully, but these errors were encountered: