Documentation
¶
Index ¶
- type AccountKey
- type Cloud
- func (c *Cloud) GetLoadBalancerEndpoint(ctx context.Context) (host, port string, err error)
- func (c *Cloud) GetNetworkIDs(ctx context.Context) ([]string, error)
- func (c *Cloud) InitSecretHash(ctx context.Context) ([]byte, error)
- func (c *Cloud) List(ctx context.Context) ([]metadata.InstanceMetadata, error)
- func (c *Cloud) Self(ctx context.Context) (metadata.InstanceMetadata, error)
- func (c *Cloud) UID(ctx context.Context) (string, error)
- type CloudINI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountKey ¶
type AccountKey struct {
AuthURL string
Username string
Password string
ProjectID string
ProjectName string
UserDomainName string
ProjectDomainName string
RegionName string
}
AccountKey is a OpenStack account key.
func AccountKeyFromURI ¶
func AccountKeyFromURI(serviceAccountURI string) (AccountKey, error)
AccountKeyFromURI parses ServiceAccountKey from URI.
func (AccountKey) CloudINI ¶
func (k AccountKey) CloudINI() CloudINI
CloudINI converts the AccountKey into a CloudINI.
func (AccountKey) ToCloudServiceAccountURI ¶
func (k AccountKey) ToCloudServiceAccountURI() string
ToCloudServiceAccountURI converts the AccountKey into a cloud service account URI.
type Cloud ¶
type Cloud struct {
// contains filtered or unexported fields
}
Cloud is the metadata client for OpenStack.
func (*Cloud) GetLoadBalancerEndpoint ¶
GetLoadBalancerEndpoint returns the endpoint of the load balancer. For OpenStack, the load balancer is a floating ip attached to a control plane node. TODO(malt3): Rewrite to use real load balancer once it is available.
func (*Cloud) GetNetworkIDs ¶ added in v2.8.0
GetNetworkIDs returns the IDs of the networks the current instance is part of. This method is OpenStack specific.
func (*Cloud) InitSecretHash ¶
InitSecretHash retrieves the InitSecretHash of the current instance.
func (*Cloud) List ¶
List returns the metadata of all instances belonging to the same Constellation cluster.
type CloudINI ¶
type CloudINI struct {
AuthURL string `` /* 141-byte string literal not displayed */
Username string `name:"os-userName" value:"optional" dependsOn:"os-password"`
Password string `name:"os-password" value:"optional" dependsOn:"os-domainID|os-domainName,os-projectID|os-projectName,os-userID|os-userName"`
ProjectID string `gcfg:"project-id" mapstructure:"project-id" name:"os-projectID" value:"optional" dependsOn:"os-password|os-clientCertPath"`
TenantName string `` /* 127-byte string literal not displayed */
UserDomainName string `gcfg:"user-domain-name" mapstructure:"user-domain-name" name:"os-userDomainName" value:"optional"`
TenantDomainName string `gcfg:"tenant-domain-name" mapstructure:"project-domain-name" name:"os-projectDomainName" value:"optional"`
Region string `name:"os-region"`
}
CloudINI is a struct that represents the cloud.ini file used by OpenStack k8s deployments.
func (CloudINI) CinderCSIConfiguration ¶ added in v2.8.0
CinderCSIConfiguration returns the string representation of the CloudINI subset cinder expects.
func (CloudINI) FullConfiguration ¶ added in v2.8.0
FullConfiguration returns the string representation of the full CloudINI.
func (CloudINI) YawolConfiguration ¶ added in v2.8.0
YawolConfiguration returns the string representation of the CloudINI subset yawol expects.