Documentation ¶
Index ¶
- type AccountKey
- type CloudINI
- type MetadataClient
- func (c *MetadataClient) GetLoadBalancerEndpoint(ctx context.Context) (host, port string, err error)
- func (c *MetadataClient) InitSecretHash(ctx context.Context) ([]byte, error)
- func (c *MetadataClient) List(ctx context.Context) ([]metadata.InstanceMetadata, error)
- func (c *MetadataClient) Self(ctx context.Context) (metadata.InstanceMetadata, error)
- func (c *MetadataClient) UID(ctx context.Context) (string, error)
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 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.
type MetadataClient ¶ added in v2.16.1
type MetadataClient struct {
// contains filtered or unexported fields
}
MetadataClient is the metadata client for OpenStack.
func New ¶
func New(ctx context.Context) (*MetadataClient, error)
New creates a new OpenStack metadata client.
func (*MetadataClient) GetLoadBalancerEndpoint ¶ added in v2.16.1
func (c *MetadataClient) GetLoadBalancerEndpoint(ctx context.Context) (host, port string, err error)
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 (*MetadataClient) InitSecretHash ¶ added in v2.16.1
func (c *MetadataClient) InitSecretHash(ctx context.Context) ([]byte, error)
InitSecretHash retrieves the InitSecretHash of the current instance.
func (*MetadataClient) List ¶ added in v2.16.1
func (c *MetadataClient) List(ctx context.Context) ([]metadata.InstanceMetadata, error)
List returns the metadata of all instances belonging to the same Constellation cluster.
func (*MetadataClient) Self ¶ added in v2.16.1
func (c *MetadataClient) Self(ctx context.Context) (metadata.InstanceMetadata, error)
Self returns the metadata of the current instance.