Documentation
¶
Index ¶
- Constants
- Variables
- func GetDefaultServiceUserRoles() []string
- func GetFakeE2EClient(ctx context.Context, authOptions gophercloud.AuthOptions) (*gophercloud.ProviderClient, error)
- func GetPersephoneEndpoint(endpointLocator gophercloud.EndpointLocator, ...) (tokens.Endpoint, error)
- type ClientSet
- type ClusterUserClientSet
- func (c *ClusterUserClientSet) CreateApplicationCredential(ctx context.Context, name string, roleList []string) (*applicationcredentials.ApplicationCredential, error)
- func (c *ClusterUserClientSet) DeleteApplicationCredential(ctx context.Context, id string) error
- func (c *ClusterUserClientSet) GetValidApplicationCredential(ctx context.Context, namePrefix string) (*applicationcredentials.ApplicationCredential, error)
- type OpenStackServiceCatalogExtractor
- type PersephoneEndpointOpts
- type RegionOpenStackClientSet
Constants ¶
const OpenStackServiceType = "kubernetes"
OpenStackServiceType is the service type for the client (e.g., "compute", "object-store"), as defined by the OpenStack Service Types Authority.
Variables ¶
var FakeE2EOptions = fakeE2EOptions{}
Functions ¶
func GetDefaultServiceUserRoles ¶
func GetDefaultServiceUserRoles() []string
GetDefaultServiceUserRoles returns the default user roles used for the service users.
func GetFakeE2EClient ¶
func GetFakeE2EClient(ctx context.Context, authOptions gophercloud.AuthOptions) (*gophercloud.ProviderClient, error)
func GetPersephoneEndpoint ¶
func GetPersephoneEndpoint(endpointLocator gophercloud.EndpointLocator, catalogExtractor OpenStackServiceCatalogExtractor, persephoneOpts PersephoneEndpointOpts) (tokens.Endpoint, error)
GetPersephoneEndpoint locates a Persephone endpoint matching the provided search criteria.
Types ¶
type ClientSet ¶
type ClientSet struct {
// ProviderClient is a provider client.
ProviderClient *gophercloud.ProviderClient
// IdentityClient is an identity v3 client.
IdentityClient *gophercloud.ServiceClient
// NetworkClient is a network v2 client.
NetworkClient *gophercloud.ServiceClient
// DomainID is the OpenStack domain ID.
DomainID string
}
ClientSet contains multiple OpenStack clients.
func NewClientSet ¶
func NewClientSet(ctx context.Context, providerClient *gophercloud.ProviderClient, domainName string) (*ClientSet, error)
NewClientSet returns a new ClientSet based on the provided provider client and OpenStack domain name.
func (*ClientSet) DeleteClusterServiceUser ¶
DeleteClusterServiceUser deletes the service user created for a specific shoot cluster.
func (*ClientSet) GetUserByName ¶
GetUserByName returns the *users.User object for the given OpenStack username and domain ID. It returns <nil> if no such user is found, or an error if multiple users are found.
type ClusterUserClientSet ¶
type ClusterUserClientSet struct {
// ClientSet is the OpenStack ClientSet created for the cluster user.
ClientSet
// ProjectID is the ID of the project for the user.
ProjectID string
// User is the users.User object for the user.
User *users.User
}
ClusterUserClientSet is a ClientSet for a specific cluster user (a dedicated OpenStack user created for a Shoot). This cluster user will be used to manage application credentials (that are used for the related shoot cluster).
func NewClusterUserClientSet ¶
func NewClusterUserClientSet(ctx context.Context, clientSet *ClientSet, username, projectID string) (*ClusterUserClientSet, error)
NewClusterUserClientSet creates a new ClusterUserClientSet for the given username and project ID.
func (*ClusterUserClientSet) CreateApplicationCredential ¶
func (c *ClusterUserClientSet) CreateApplicationCredential(ctx context.Context, name string, roleList []string) (*applicationcredentials.ApplicationCredential, error)
CreateApplicationCredential creates new application credentials with the given name and roles.
func (*ClusterUserClientSet) DeleteApplicationCredential ¶
func (c *ClusterUserClientSet) DeleteApplicationCredential(ctx context.Context, id string) error
DeleteApplicationCredential deletes application credentials with the given ID.
func (*ClusterUserClientSet) GetValidApplicationCredential ¶
func (c *ClusterUserClientSet) GetValidApplicationCredential(ctx context.Context, namePrefix string) (*applicationcredentials.ApplicationCredential, error)
GetValidApplicationCredential gets valid application credentials for the given user ID. It filters all existing credentials by the given name prefix. If multiple valid credentials exist, the one with the earliest expiration is returned, provided it does not expire within the next 24 hours. If there is no such credential or no credentials at all for this user, <nil> is returned.
type OpenStackServiceCatalogExtractor ¶
type OpenStackServiceCatalogExtractor func() (*tokens.ServiceCatalog, error)
OpenStackServiceCatalogExtractor extracts/retrieves the entire OpenStack service catalog.
type PersephoneEndpointOpts ¶
type PersephoneEndpointOpts struct {
// Landscape is a mandatory landscape filter.
Landscape string
// Region is an optional region filter.
Region string
}
PersephoneEndpointOpts specifies search criteria for Persephone in an OpenStack service catalog.
type RegionOpenStackClientSet ¶
RegionOpenStackClientSet is a set of OpenStack clients for multiple regions. The key is the region name, the value is the ClientSet for this region.
func NewRegionOpenStackClientSet ¶
func NewRegionOpenStackClientSet(ctx context.Context, regions map[string]config.RegionalConfig, clusterUsersDomain string) (RegionOpenStackClientSet, error)
NewRegionOpenStackClientSet creates a new RegionOpenStackClientSet for the provided regions.