Documentation ¶
Index ¶
- func GetAuthorities(params *VBVParams) ([]versionbundle.Authority, error)
- func GetVersionBundleVersion(params *VBVParams) (string, error)
- func IsClusterDeletion(err error) bool
- func IsInvalidConfig(err error) bool
- func IsMissingVaultToken(err error) bool
- func IsNotFound(err error) bool
- func IsTooManyResults(err error) bool
- func IsUnexpectedStatusPhase(err error) bool
- func IsUnknownProvider(err error) bool
- func IsWait(err error) bool
- func IsWaitTimeout(err error) bool
- type Guest
- func (g *Guest) EnsureNamespacesExists(ctx context.Context, namespaces []string) error
- func (g *Guest) G8sClient() versioned.Interface
- func (g *Guest) Initialize() error
- func (g *Guest) K8sClient() kubernetes.Interface
- func (g *Guest) RestConfig() *rest.Config
- func (g *Guest) Setup(ctx context.Context) error
- func (g *Guest) WaitForAPIDown() error
- func (g *Guest) WaitForAPIUp() error
- func (g *Guest) WaitForGuestReady(ctx context.Context) error
- func (g *Guest) WaitForNodesReady(ctx context.Context, expectedNodes int) error
- type GuestConfig
- type Host
- func (h *Host) AWSCluster(name string) (*v1alpha1.AWSConfig, error)
- func (h *Host) ApplyAWSConfigPatch(patch []PatchSpec, clusterName string) error
- func (h *Host) DeleteGuestCluster(ctx context.Context, provider string) error
- func (h *Host) ExtClient() apiextensionsclient.Interface
- func (h *Host) G8sClient() versioned.Interface
- func (h *Host) K8sAggregationClient() *aggregationclient.Clientset
- func (h *Host) K8sClient() kubernetes.Interface
- func (h *Host) RestConfig() *rest.Config
- func (h *Host) TargetNamespace() string
- type HostConfig
- type PatchSpec
- type VBVParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAuthorities ¶
func GetAuthorities(params *VBVParams) ([]versionbundle.Authority, error)
func GetVersionBundleVersion ¶
func IsClusterDeletion ¶
IsClusterDeletion asserts clusterDeletionError.
func IsInvalidConfig ¶
IsInvalidConfig asserts invalidConfigError.
func IsMissingVaultToken ¶
IsMissingVaultToken asserts missingVaultTokenError.
func IsTooManyResults ¶
IsTooManyResults asserts invalidConfigError.
func IsUnexpectedStatusPhase ¶
IsUnexpectedStatusPhase asserts notFoundError.
func IsUnknownProvider ¶
IsUnknownProvider asserts unknownProviderError.
Types ¶
type Guest ¶
type Guest struct {
// contains filtered or unexported fields
}
func NewGuest ¶
func NewGuest(config GuestConfig) (*Guest, error)
func (*Guest) EnsureNamespacesExists ¶
func (*Guest) G8sClient ¶
G8sClient returns the guest cluster framework's apiextensions clientset. The client being returned is properly configured once Guest.Setup() is executed successfully.
func (*Guest) Initialize ¶
Initialize sets up the Guest fields that are not directly injected.
func (*Guest) K8sClient ¶
func (g *Guest) K8sClient() kubernetes.Interface
K8sClient returns the guest cluster framework's Kubernetes client. The client being returned is properly configured once Guest.Setup() is executed successfully.
func (*Guest) RestConfig ¶
RestConfig returns the guest cluster framework's rest config. The config being returned is properly configured once Guest.Setup() is executed successfully.
func (*Guest) Setup ¶
Setup provides a separate initialization step because of the nature of the host/guest cluster design. We have to setup things in different stages. Constructing the frameworks can be done right away but setting them up can only happen as soon as certain requirements have been met. A requirement for the guest framework is a set up host cluster.
func (*Guest) WaitForAPIDown ¶
func (*Guest) WaitForAPIUp ¶
type GuestConfig ¶
type GuestConfig struct { Logger micrologger.Logger HostK8sClient kubernetes.Interface ClusterID string CommonDomain string }
type Host ¶
type Host struct {
// contains filtered or unexported fields
}
func NewHost ¶
func NewHost(c HostConfig) (*Host, error)
func (*Host) ApplyAWSConfigPatch ¶
func (*Host) DeleteGuestCluster ¶
func (*Host) ExtClient ¶
func (h *Host) ExtClient() apiextensionsclient.Interface
func (*Host) K8sAggregationClient ¶
func (h *Host) K8sAggregationClient() *aggregationclient.Clientset
K8sAggregationClient returns the host cluster framework's Kubernetes aggregation client.
func (*Host) K8sClient ¶
func (h *Host) K8sClient() kubernetes.Interface
K8sClient returns the host cluster framework's Kubernetes client.
func (*Host) RestConfig ¶
RestConfig returns the host cluster framework's rest config.
func (*Host) TargetNamespace ¶
type HostConfig ¶
type PatchSpec ¶
type PatchSpec struct { Op string `json:"op"` Path string `json:"path"` Value interface{} `json:"value"` }
PatchSpec is a generic patch type to update objects with JSONPatchType operations.
type VBVParams ¶
type VBVParams struct { // Component is the name of an authority inside a versionbundle IndexRelease. // e.g. aws-operator Component string // Provider is the provider of a versionbundle IndexRelease. // This can be aws, azure or kvm. Provider string // Token is a Github token which is authorized to read from the installations // repository. Token string // VType is the version type of a versionbundle IndexRelease which can be // either wip or active. VType string }
VBVParams holds information which we can use to query versionbundle version information from the installations repository.