-
Notifications
You must be signed in to change notification settings - Fork 66
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
Added additional OpenStack credential flags #38
Added additional OpenStack credential flags #38
Conversation
@MartinWeindel I now removed the validation logic leaving it to gophercloud/OpenStack backend to provider a proper error handling. |
@@ -38,6 +39,7 @@ type Handler struct { | |||
|
|||
var _ provider.DNSHandler = &Handler{} | |||
|
|||
// NewHandler constructs a new DNSHandler object. | |||
func NewHandler(config *provider.DNSHandlerConfig) (provider.DNSHandler, error) { | |||
authConfig, err := readAuthConfig(config) |
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.
There is no need to use the readAuthConfig
function, since clientconfig.AuthOptions
already fetches env parameters. I also don't see a reason why do you need to keep the authConfig
struct. Take a look on this commit: 02d50ec
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.
The properties are read from a Kubernetes secret. Although the code may look similar to reading environmental parameters, this is not the case here. We only use the same names in the secret data. And the secrets are associated with the DNS providers, which can be managed during the runtime of the controller-manager.
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.
Thanks, I missed this part. Nevertheless, I don't like the current situation with the auth options. It looks even worse than in https://github.com/kubernetes/cloud-provider-openstack. I propose to create a package, which will handle all the auth options in one place.
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.
That's true, it looks a bit complicated now. I suggest to apply these changes to the pull request:
88eeb96
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 keep that for now as is?
What this PR does / why we need it:
This PR adds some additional authentication flags to the designate client code. It now support the following values:
userDomanName
,OS_USER_DOMAIN_NAME
userDomainID
,OS_USER_DOMAIN_ID
tenantID
,OS_PROJECT_ID
domainID
,OS_DOMAIN_ID
Which issue(s) this PR fixes:
This PR is needed for the overall extension support of this flags: https://github.com/gardener/gardener-extensions/issues/154
Release note: