Skip to content

Commit

Permalink
[manila-csi-plugin]: be more tolerant about openstack auth
Browse files Browse the repository at this point in the history
Remove the dependency on `os-password` for a couple of fields. These
fields do not necessarily depend on a password being set, as we could be
using application credentials for example. The logic was wrong.

This prevents manila driver from entering an error state when it finds
unnecessary fields in the clouds.yaml. It now simply ignores them.

Fixes kubernetes#2757.
  • Loading branch information
mandre committed Jan 13, 2025
1 parent bbb82f4 commit c0ab03f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pkg/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,16 @@ import (

type AuthOpts struct {
AuthURL string `gcfg:"auth-url" mapstructure:"auth-url" name:"os-authURL" dependsOn:"os-password|os-trustID|os-applicationCredentialSecret|os-clientCertPath"`
UserID string `gcfg:"user-id" mapstructure:"user-id" name:"os-userID" value:"optional" dependsOn:"os-password"`
Username string `name:"os-userName" value:"optional" dependsOn:"os-password"`
UserID string `gcfg:"user-id" mapstructure:"user-id" name:"os-userID" value:"optional"`
Username string `name:"os-userName" value:"optional"`
Password string `name:"os-password" value:"optional" dependsOn:"os-domainID|os-domainName,os-projectID|os-projectName,os-userID|os-userName"`
TenantID string `gcfg:"tenant-id" mapstructure:"project-id" name:"os-projectID" value:"optional" dependsOn:"os-password|os-clientCertPath"`
TenantName string `gcfg:"tenant-name" mapstructure:"project-name" name:"os-projectName" value:"optional" dependsOn:"os-password|os-clientCertPath"`
TenantID string `gcfg:"tenant-id" mapstructure:"project-id" name:"os-projectID" value:"optional"`
TenantName string `gcfg:"tenant-name" mapstructure:"project-name" name:"os-projectName" value:"optional"`
TrustID string `gcfg:"trust-id" mapstructure:"trust-id" name:"os-trustID" value:"optional"`
TrusteeID string `gcfg:"trustee-id" mapstructure:"trustee-id" name:"os-trusteeID" value:"optional" dependsOn:"os-trustID"`
TrusteePassword string `gcfg:"trustee-password" mapstructure:"trustee-password" name:"os-trusteePassword" value:"optional" dependsOn:"os-trustID"`
DomainID string `gcfg:"domain-id" mapstructure:"domain-id" name:"os-domainID" value:"optional" dependsOn:"os-password|os-clientCertPath"`
DomainName string `gcfg:"domain-name" mapstructure:"domain-name" name:"os-domainName" value:"optional" dependsOn:"os-password|os-clientCertPath"`
DomainID string `gcfg:"domain-id" mapstructure:"domain-id" name:"os-domainID" value:"optional"`
DomainName string `gcfg:"domain-name" mapstructure:"domain-name" name:"os-domainName" value:"optional"`
TenantDomainID string `gcfg:"tenant-domain-id" mapstructure:"project-domain-id" name:"os-projectDomainID" value:"optional"`
TenantDomainName string `gcfg:"tenant-domain-name" mapstructure:"project-domain-name" name:"os-projectDomainName" value:"optional"`
UserDomainID string `gcfg:"user-domain-id" mapstructure:"user-domain-id" name:"os-userDomainID" value:"optional"`
Expand Down

0 comments on commit c0ab03f

Please sign in to comment.