Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ The options in `Global` section are used for openstack-cloud-controller-manager
The secret of an application credential to authenticate with.
* `tls-insecure`
If set to `true`, then the server’s certificate will not be verified. Default is `false`.
* `token`
Keystone token.

### Networking

Expand Down
3 changes: 3 additions & 0 deletions pkg/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ type AuthOpts struct {
EndpointType gophercloud.Availability `gcfg:"os-endpoint-type" mapstructure:"os-endpoint-type" name:"os-endpointType" value:"optional"`
CAFile string `gcfg:"ca-file" mapstructure:"ca-file" name:"os-certAuthorityPath" value:"optional"`
TLSInsecure string `gcfg:"tls-insecure" mapstructure:"tls-insecure" name:"os-TLSInsecure" value:"optional" matches:"^true|false$"`
Token string `name:"os-token" value:"optional"`

// TLS client auth
CertFile string `gcfg:"cert-file" mapstructure:"cert-file" name:"os-clientCertPath" value:"optional" dependsOn:"os-clientKeyPath"`
Expand Down Expand Up @@ -150,6 +151,7 @@ func (authOpts AuthOpts) ToAuthOptions() gophercloud.AuthOptions {
ApplicationCredentialID: authOpts.ApplicationCredentialID,
ApplicationCredentialName: authOpts.ApplicationCredentialName,
ApplicationCredentialSecret: authOpts.ApplicationCredentialSecret,
Token: authOpts.Token,
},
}

Expand Down Expand Up @@ -231,6 +233,7 @@ func ReadClouds(authOpts *AuthOpts) error {
authOpts.ApplicationCredentialID = replaceEmpty(authOpts.ApplicationCredentialID, cloud.AuthInfo.ApplicationCredentialID)
authOpts.ApplicationCredentialName = replaceEmpty(authOpts.ApplicationCredentialName, cloud.AuthInfo.ApplicationCredentialName)
authOpts.ApplicationCredentialSecret = replaceEmpty(authOpts.ApplicationCredentialSecret, cloud.AuthInfo.ApplicationCredentialSecret)
authOpts.Token = replaceEmpty(authOpts.Token, cloud.AuthInfo.Token)

return nil
}
Expand Down