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

OpenStack: Add support for clouds.yaml for Swift state store #8793

Closed
MPV opened this issue Mar 25, 2020 · 10 comments
Closed

OpenStack: Add support for clouds.yaml for Swift state store #8793

MPV opened this issue Mar 25, 2020 · 10 comments
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@MPV
Copy link

MPV commented Mar 25, 2020

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 an openrc file), or via a clouds.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 newer clientconfig.AuthOptions supports.

I'm suggesting we simply switch to this newer authentication method from gophercloud that supports both openrc and clouds.yaml.

This openstack spec describes a bit more about the ongoing change from openrc to clouds.yaml: https://github.com/openstack/openstack-specs/blob/master/specs/clouds-yaml-support.rst

2. Feel free to provide a design supporting your feature request.

Today we use gophercloud.AuthOptions in util/pkg/vfs/swiftfs.go, but my thinking is that we could switch to use clientconfig.ClientOpts or clientconfig.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=doc

Here'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 since gophercloud/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 that clouds.yaml doesn't fully replace that functionality.

@MPV
Copy link
Author

MPV commented Mar 25, 2020

Curious about your input on this @zetaab 😊

@zetaab
Copy link
Member

zetaab commented Apr 7, 2020

Sounds good

@MPV
Copy link
Author

MPV commented Apr 7, 2020

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 kops + OpenStack here.

@zetaab
Copy link
Member

zetaab commented Apr 9, 2020

deps are going to be updated in #8884

@MPV
Copy link
Author

MPV commented Apr 9, 2020

@zetaab Would we maybe want/need to add https://github.com/gophercloud/utils too?

So gophercloud/utils/openstack/clientconfig could be used (for the above).

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 8, 2020
@MPV
Copy link
Author

MPV commented Jul 21, 2020

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.

@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Aug 20, 2020
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

4 participants