mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-12-27 00:19:36 -05:00
8da6a23aa5
terraform: collect apiserver cert SANs and support custom endpoint constants: add new constants for cluster configuration and custom endpoint cloud: support apiserver cert sans and prepare for endpoint migration on AWS config: add customEndpoint field bootstrapper: use per-CSP apiserver cert SANs cli: route customEndpoint to terraform and add migration for apiserver cert SANs bootstrapper: change interface of GetLoadBalancerEndpoint to return host and port separately
40 lines
1.5 KiB
Go
40 lines
1.5 KiB
Go
/*
|
|
Copyright (c) Edgeless Systems GmbH
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
|
|
/*
|
|
# Cloud
|
|
|
|
This package provides functions to interact with cloud providers.
|
|
This is mainly used to fetch information about the current instance, or other instances of the Constellation cluster.
|
|
|
|
Implementation of the cloud provider specific code is done in subpackages named after the CSP.
|
|
Code that is commonly used by other packages that do not require actual interaction with the CSP API,
|
|
such as CSP URI string parsing or data types, should go in a <CSP>shared package instead.
|
|
|
|
A cloud package should implement the following interface:
|
|
|
|
type Cloud interface {
|
|
List(ctx context.Context) ([]metadata.InstanceMetadata, error)
|
|
Self(ctx context.Context) (metadata.InstanceMetadata, error)
|
|
GetLoadBalancerEndpoint(ctx context.Context) (string, error)
|
|
InitSecretHash(ctx context.Context) ([]byte, error)
|
|
UID(ctx context.Context) (string, error)
|
|
}
|
|
*/
|
|
package cloud
|
|
|
|
const (
|
|
// TagRole is the tag/label key used to identify the role of a node.
|
|
TagRole = "constellation-role"
|
|
// TagUID is the tag/label key used to identify the UID of a cluster.
|
|
TagUID = "constellation-uid"
|
|
// TagInitSecretHash is the tag/label key used to identify the hash of the init secret.
|
|
TagInitSecretHash = "constellation-init-secret-hash"
|
|
// TagCustomEndpoint is the tag/label key used to identify the custom endpoint
|
|
// or dns name that should be added to tls cert SANs.
|
|
TagCustomEndpoint = "constellation-custom-endpoint"
|
|
)
|