executables

package
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2022 License: Apache-2.0 Imports: 49 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TinkerbellCertUrlKey       = "TINKERBELL_CERT_URL"
	TinkerbellGrpcAuthorityKey = "TINKERBELL_GRPC_AUTHORITY"
)
View Source
const (
	Shared = "Shared"
)

Variables

This section is empty.

Functions

func DefaultEksaImage

func DefaultEksaImage() string

func NewExecutableBuilder

func NewExecutableBuilder(ctx context.Context, image string, mountDirs ...string) (*ExecutableBuilder, Closer, error)

Types

type AwsCli

type AwsCli struct {
	Executable
}

func NewAwsCli

func NewAwsCli(executable Executable) *AwsCli

func (*AwsCli) CreateAccessKey

func (ac *AwsCli) CreateAccessKey(ctx context.Context, username string) (string, error)

type Closer added in v0.7.0

type Closer func(ctx context.Context) error

func (Closer) CheckErr added in v0.7.0

func (c Closer) CheckErr(ctx context.Context)

CheckErr just calls the closer and logs an error if present It's mostly a helper for defering the close in a oneliner without ignoring the error

func (Closer) Close added in v0.7.0

func (c Closer) Close(ctx context.Context) error

Close implements interface types.Closer

type Clusterawsadm

type Clusterawsadm struct {
	Executable
}

func NewClusterawsadm

func NewClusterawsadm(executable Executable) *Clusterawsadm

func (*Clusterawsadm) BootstrapCreds

func (c *Clusterawsadm) BootstrapCreds(ctx context.Context, envs map[string]string) (string, error)

func (*Clusterawsadm) BootstrapIam

func (c *Clusterawsadm) BootstrapIam(ctx context.Context, envs map[string]string, configFile string) error

func (*Clusterawsadm) DeleteCloudformationStack

func (c *Clusterawsadm) DeleteCloudformationStack(ctx context.Context, envs map[string]string, fileName string) error

func (*Clusterawsadm) ListAccessKeys

func (c *Clusterawsadm) ListAccessKeys(ctx context.Context, userName string) (string, error)

type Clusterctl

type Clusterctl struct {
	Executable
	// contains filtered or unexported fields
}

func NewClusterctl

func NewClusterctl(executable Executable, writer filewriter.FileWriter) *Clusterctl

func (*Clusterctl) GetWorkloadKubeconfig

func (c *Clusterctl) GetWorkloadKubeconfig(ctx context.Context, clusterName string, cluster *types.Cluster) ([]byte, error)

func (*Clusterctl) InitInfrastructure

func (c *Clusterctl) InitInfrastructure(ctx context.Context, clusterSpec *cluster.Spec, cluster *types.Cluster, provider providers.Provider) error

func (*Clusterctl) InstallEtcdadmProviders added in v0.6.0

func (c *Clusterctl) InstallEtcdadmProviders(ctx context.Context, clusterSpec *cluster.Spec, cluster *types.Cluster, infraProvider providers.Provider, installProviders []string) error

func (*Clusterctl) MoveManagement

func (c *Clusterctl) MoveManagement(ctx context.Context, from, to *types.Cluster) error

func (*Clusterctl) Upgrade added in v0.6.0

func (c *Clusterctl) Upgrade(ctx context.Context, managementCluster *types.Cluster, provider providers.Provider, newSpec *cluster.Spec, changeDiff *clusterapi.CAPIChangeDiff) error

type ClustersResponse

type ClustersResponse struct {
	Items []types.CAPICluster `json:"items,omitempty"`
}

type Cmk added in v0.8.0

type Cmk struct {
	// contains filtered or unexported fields
}

Cmk this struct wraps around the CloudMonkey executable CLI to perform operations against a CloudStack endpoint

func NewCmk added in v0.8.0

func NewCmk(executable Executable, writer filewriter.FileWriter, config decoder.CloudStackExecConfig) *Cmk

func (*Cmk) Close added in v0.8.0

func (c *Cmk) Close(ctx context.Context) error

func (*Cmk) ValidateAccountPresent added in v0.8.0

func (c *Cmk) ValidateAccountPresent(ctx context.Context, account string, domainId string) error

func (*Cmk) ValidateAffinityGroupsPresent added in v0.8.0

func (c *Cmk) ValidateAffinityGroupsPresent(ctx context.Context, domainId string, account string, affinityGroupIds []string) error

func (*Cmk) ValidateCloudStackConnection added in v0.8.0

func (c *Cmk) ValidateCloudStackConnection(ctx context.Context) error

ValidateCloudStackConnection Calls `cmk sync` to ensure that the endpoint and credentials + domain are valid

func (*Cmk) ValidateDomainPresent added in v0.8.0

func (c *Cmk) ValidateDomainPresent(ctx context.Context, domain string) (v1alpha1.CloudStackResourceIdentifier, error)

func (*Cmk) ValidateNetworkPresent added in v0.8.0

func (c *Cmk) ValidateNetworkPresent(ctx context.Context, domainId string, zone v1alpha1.CloudStackZone, zones []v1alpha1.CloudStackResourceIdentifier, account string, multipleZone bool) error

func (*Cmk) ValidateServiceOfferingPresent added in v0.8.0

func (c *Cmk) ValidateServiceOfferingPresent(ctx context.Context, zoneId string, serviceOffering v1alpha1.CloudStackResourceIdentifier) error

func (*Cmk) ValidateTemplatePresent added in v0.8.0

func (c *Cmk) ValidateTemplatePresent(ctx context.Context, domainId string, zoneId string, account string, template v1alpha1.CloudStackResourceIdentifier) error

func (*Cmk) ValidateZonesPresent added in v0.8.0

func (c *Cmk) ValidateZonesPresent(ctx context.Context, zones []v1alpha1.CloudStackZone) ([]v1alpha1.CloudStackResourceIdentifier, error)

type Command added in v0.7.0

type Command struct {
	// contains filtered or unexported fields
}

func NewCommand added in v0.7.0

func NewCommand(ctx context.Context, commandRunner commandRunner, args ...string) *Command

func (*Command) Run added in v0.7.0

func (c *Command) Run() (out bytes.Buffer, err error)

func (*Command) WithEnvVars added in v0.7.0

func (c *Command) WithEnvVars(envVars map[string]string) *Command

func (*Command) WithStdIn added in v0.7.0

func (c *Command) WithStdIn(stdIn []byte) *Command

type Docker

type Docker struct {
	Executable
}

func BuildDockerExecutable

func BuildDockerExecutable() *Docker

func NewDocker

func NewDocker(executable Executable) *Docker

func (*Docker) AllocatedMemory

func (d *Docker) AllocatedMemory(ctx context.Context) (uint64, error)

func (*Docker) CgroupVersion added in v0.8.0

func (d *Docker) CgroupVersion(ctx context.Context) (int, error)

func (*Docker) GetDockerLBPort

func (d *Docker) GetDockerLBPort(ctx context.Context, clusterName string) (port string, err error)

func (*Docker) LoadFromFile added in v0.8.0

func (d *Docker) LoadFromFile(ctx context.Context, filepath string) error

func (*Docker) Login added in v0.6.0

func (d *Docker) Login(ctx context.Context, endpoint, username, password string) error

func (*Docker) PullImage added in v0.6.0

func (d *Docker) PullImage(ctx context.Context, image string) error

func (*Docker) PushImage added in v0.6.0

func (d *Docker) PushImage(ctx context.Context, image string, endpoint string) error

func (*Docker) SaveToFile added in v0.8.0

func (d *Docker) SaveToFile(ctx context.Context, filepath string, images ...string) error

func (*Docker) SetUpCLITools

func (d *Docker) SetUpCLITools(ctx context.Context, image string) error

func (*Docker) TagImage added in v0.6.0

func (d *Docker) TagImage(ctx context.Context, image string, endpoint string) error

func (*Docker) Version

func (d *Docker) Version(ctx context.Context) (int, error)

type Executable

type Executable interface {
	Execute(ctx context.Context, args ...string) (stdout bytes.Buffer, err error)
	ExecuteWithEnv(ctx context.Context, envs map[string]string, args ...string) (stdout bytes.Buffer, err error) // TODO: remove this from interface in favor of Command
	ExecuteWithStdin(ctx context.Context, in []byte, args ...string) (stdout bytes.Buffer, err error)            // TODO: remove this from interface in favor of Command
	Command(ctx context.Context, args ...string) *Command
	Run(cmd *Command) (stdout bytes.Buffer, err error)
}

func NewDockerExecutable

func NewDockerExecutable(cli string, container *dockerContainer) Executable

This currently returns a linuxDockerExecutable, but if we support other types of docker executables we can change the name of this constructor

func NewExecutable

func NewExecutable(cli string) Executable

this should only be called through the executables.builder

type ExecutableBuilder

type ExecutableBuilder struct {
	// contains filtered or unexported fields
}

func NewLocalExecutableBuilder added in v0.6.0

func NewLocalExecutableBuilder() *ExecutableBuilder

func (*ExecutableBuilder) BuildAwsCli

func (b *ExecutableBuilder) BuildAwsCli() *AwsCli

func (*ExecutableBuilder) BuildClusterAwsAdmExecutable

func (b *ExecutableBuilder) BuildClusterAwsAdmExecutable() *Clusterawsadm

func (*ExecutableBuilder) BuildClusterCtlExecutable

func (b *ExecutableBuilder) BuildClusterCtlExecutable(writer filewriter.FileWriter) *Clusterctl

func (*ExecutableBuilder) BuildCmkExecutable added in v0.8.0

func (b *ExecutableBuilder) BuildCmkExecutable(writer filewriter.FileWriter, execConfig decoder.CloudStackExecConfig) *Cmk

func (*ExecutableBuilder) BuildFluxExecutable

func (b *ExecutableBuilder) BuildFluxExecutable() *Flux

func (*ExecutableBuilder) BuildGovcExecutable

func (b *ExecutableBuilder) BuildGovcExecutable(writer filewriter.FileWriter) *Govc

func (*ExecutableBuilder) BuildHelmExecutable added in v0.7.0

func (b *ExecutableBuilder) BuildHelmExecutable() *Helm

func (*ExecutableBuilder) BuildKindExecutable

func (b *ExecutableBuilder) BuildKindExecutable(writer filewriter.FileWriter) *Kind

func (*ExecutableBuilder) BuildKubectlExecutable

func (b *ExecutableBuilder) BuildKubectlExecutable() *Kubectl

func (*ExecutableBuilder) BuildTinkExecutable added in v0.8.0

func (b *ExecutableBuilder) BuildTinkExecutable(tinkerbellCertUrl, tinkerbellGrpcAuthority string) *Tink

func (*ExecutableBuilder) BuildTroubleshootExecutable added in v0.6.0

func (b *ExecutableBuilder) BuildTroubleshootExecutable() *Troubleshoot

func (*ExecutableBuilder) Close added in v0.7.0

type Flux

type Flux struct {
	Executable
}

func NewFlux

func NewFlux(executable Executable) *Flux

func (*Flux) BootstrapToolkitsComponents

func (f *Flux) BootstrapToolkitsComponents(ctx context.Context, cluster *types.Cluster, gitOpsConfig *v1alpha1.GitOpsConfig) error

BootstrapToolkitsComponents creates the GitHub repository if it doesn’t exist, and commits the toolkit components manifests to the main branch. Then it configures the target cluster to synchronize with the repository. If the toolkit components are present on the cluster, the bootstrap command will perform an upgrade if needed.

func (*Flux) PauseKustomization

func (f *Flux) PauseKustomization(ctx context.Context, cluster *types.Cluster, gitOpsConfig *v1alpha1.GitOpsConfig) error

func (*Flux) Reconcile added in v0.6.0

func (f *Flux) Reconcile(ctx context.Context, cluster *types.Cluster, gitOpsConfig *v1alpha1.GitOpsConfig) error

func (*Flux) ResumeKustomization

func (f *Flux) ResumeKustomization(ctx context.Context, cluster *types.Cluster, gitOpsConfig *v1alpha1.GitOpsConfig) error

func (*Flux) UninstallToolkitsComponents

func (f *Flux) UninstallToolkitsComponents(ctx context.Context, cluster *types.Cluster, gitOpsConfig *v1alpha1.GitOpsConfig) error

type FolderType

type FolderType string

type GitOpsConfigResponse added in v0.6.0

type GitOpsConfigResponse struct {
	Items []*v1alpha1.GitOpsConfig `json:"items,omitempty"`
}

type Govc

type Govc struct {
	Executable
	// contains filtered or unexported fields
}

func NewGovc

func NewGovc(executable Executable, writer filewriter.FileWriter) *Govc

func (*Govc) AddTag

func (g *Govc) AddTag(ctx context.Context, path, tag string) error

func (*Govc) CleanupVms

func (g *Govc) CleanupVms(ctx context.Context, clusterName string, dryRun bool) error

func (*Govc) Close added in v0.7.0

func (g *Govc) Close(ctx context.Context) error

func (*Govc) ConfigureCertThumbprint added in v0.7.0

func (g *Govc) ConfigureCertThumbprint(ctx context.Context, server, thumbprint string) error

func (*Govc) CreateCategoryForVM

func (g *Govc) CreateCategoryForVM(ctx context.Context, name string) error

func (*Govc) CreateLibrary

func (g *Govc) CreateLibrary(ctx context.Context, datastore, library string) error

func (*Govc) CreateTag

func (g *Govc) CreateTag(ctx context.Context, tag, category string) error

func (*Govc) DatacenterExists added in v0.7.0

func (g *Govc) DatacenterExists(ctx context.Context, datacenter string) (bool, error)

func (*Govc) DeleteLibraryElement added in v0.6.0

func (g *Govc) DeleteLibraryElement(ctx context.Context, element string) error

func (*Govc) DeleteTemplate

func (g *Govc) DeleteTemplate(ctx context.Context, resourcePool, templatePath string) error

func (*Govc) DeployTemplateFromLibrary

func (g *Govc) DeployTemplateFromLibrary(ctx context.Context, templateDir, templateName, library, datacenter, datastore, resourcePool string, resizeBRDisk bool) error

func (*Govc) DevicesInfo

func (g *Govc) DevicesInfo(ctx context.Context, datacenter, template string) (interface{}, error)

func (*Govc) GetCertThumbprint added in v0.7.0

func (g *Govc) GetCertThumbprint(ctx context.Context) (string, error)

func (*Govc) GetLibraryElementContentVersion added in v0.6.0

func (g *Govc) GetLibraryElementContentVersion(ctx context.Context, element string) (string, error)

func (*Govc) GetTags

func (g *Govc) GetTags(ctx context.Context, path string) ([]string, error)

func (*Govc) GetWorkloadAvailableSpace

func (g *Govc) GetWorkloadAvailableSpace(ctx context.Context, datastore string) (float64, error)

func (*Govc) ImportTemplate

func (g *Govc) ImportTemplate(ctx context.Context, library, ovaURL, name string) error

func (*Govc) IsCertSelfSigned added in v0.7.0

func (g *Govc) IsCertSelfSigned(ctx context.Context) bool

func (*Govc) LibraryElementExists

func (g *Govc) LibraryElementExists(ctx context.Context, library string) (bool, error)

func (*Govc) ListCategories

func (g *Govc) ListCategories(ctx context.Context) ([]string, error)

func (*Govc) ListTags

func (g *Govc) ListTags(ctx context.Context) ([]string, error)

func (*Govc) Logout added in v0.7.0

func (g *Govc) Logout(ctx context.Context) error

func (*Govc) NetworkExists added in v0.7.0

func (g *Govc) NetworkExists(ctx context.Context, network string) (bool, error)

func (*Govc) ResizeDisk

func (g *Govc) ResizeDisk(ctx context.Context, datacenter, template, diskName string, diskSizeInGB int) error

func (*Govc) SearchTemplate

func (g *Govc) SearchTemplate(ctx context.Context, datacenter string, machineConfig *v1alpha1.VSphereMachineConfig) (string, error)

func (*Govc) TemplateHasSnapshot

func (g *Govc) TemplateHasSnapshot(ctx context.Context, template string) (bool, error)

func (*Govc) ValidateVCenterAuthentication added in v0.7.0

func (g *Govc) ValidateVCenterAuthentication(ctx context.Context) error

func (*Govc) ValidateVCenterConnection added in v0.7.0

func (g *Govc) ValidateVCenterConnection(ctx context.Context, server string) error

func (*Govc) ValidateVCenterSetupMachineConfig

func (g *Govc) ValidateVCenterSetupMachineConfig(ctx context.Context, datacenterConfig *v1alpha1.VSphereDatacenterConfig, machineConfig *v1alpha1.VSphereMachineConfig, _ *bool) error

type Helm added in v0.7.0

type Helm struct {
	// contains filtered or unexported fields
}

func NewHelm added in v0.7.0

func NewHelm(executable Executable) *Helm

func (*Helm) PullChart added in v0.8.0

func (h *Helm) PullChart(ctx context.Context, ociURI, version string) error

func (*Helm) PushChart added in v0.8.0

func (h *Helm) PushChart(ctx context.Context, chart, registry string) error

func (*Helm) RegistryLogin added in v0.8.0

func (h *Helm) RegistryLogin(ctx context.Context, registry, username, password string) error

func (*Helm) Template added in v0.7.0

func (h *Helm) Template(ctx context.Context, ociURI, version, namespace string, values interface{}) ([]byte, error)

type IdentityProviderConfigResponse added in v0.6.0

type IdentityProviderConfigResponse struct {
	Items []*v1alpha1.Ref `json:"items,omitempty"`
}

type Kind

type Kind struct {
	Executable
	// contains filtered or unexported fields
}

func NewKind

func NewKind(executable Executable, writer filewriter.FileWriter) *Kind

func (*Kind) ClusterExists

func (k *Kind) ClusterExists(ctx context.Context, clusterName string) (bool, error)

func (*Kind) CreateBootstrapCluster

func (k *Kind) CreateBootstrapCluster(ctx context.Context, clusterSpec *cluster.Spec, opts ...bootstrapper.BootstrapClusterClientOption) (kubeconfig string, err error)

func (*Kind) DeleteBootstrapCluster

func (k *Kind) DeleteBootstrapCluster(ctx context.Context, cluster *types.Cluster) error

func (*Kind) GetKubeconfig

func (k *Kind) GetKubeconfig(ctx context.Context, clusterName string) (string, error)

func (*Kind) WithDefaultCNIDisabled

func (k *Kind) WithDefaultCNIDisabled() bootstrapper.BootstrapClusterClientOption

func (*Kind) WithEnv

func (*Kind) WithExtraDockerMounts

func (k *Kind) WithExtraDockerMounts() bootstrapper.BootstrapClusterClientOption

func (*Kind) WithRegistryMirror added in v0.6.0

func (k *Kind) WithRegistryMirror(endpoint string, caCertFile string) bootstrapper.BootstrapClusterClientOption

type Kubectl

type Kubectl struct {
	Executable
}

func NewKubectl

func NewKubectl(executable Executable) *Kubectl

func (*Kubectl) ApplyHardware added in v0.7.0

func (k *Kubectl) ApplyHardware(ctx context.Context, hardwareYaml string, kubeConfFile string) error

func (*Kubectl) ApplyKubeSpec

func (k *Kubectl) ApplyKubeSpec(ctx context.Context, cluster *types.Cluster, spec string) error

func (*Kubectl) ApplyKubeSpecFromBytes

func (k *Kubectl) ApplyKubeSpecFromBytes(ctx context.Context, cluster *types.Cluster, data []byte) error

func (*Kubectl) ApplyKubeSpecFromBytesForce

func (k *Kubectl) ApplyKubeSpecFromBytesForce(ctx context.Context, cluster *types.Cluster, data []byte) error

func (*Kubectl) ApplyKubeSpecFromBytesWithNamespace added in v0.6.0

func (k *Kubectl) ApplyKubeSpecFromBytesWithNamespace(ctx context.Context, cluster *types.Cluster, data []byte, namespace string) error

func (*Kubectl) ApplyKubeSpecWithNamespace

func (k *Kubectl) ApplyKubeSpecWithNamespace(ctx context.Context, cluster *types.Cluster, spec string, namespace string) error

func (*Kubectl) ApplyTolerationsFromTaints added in v0.6.1

func (k *Kubectl) ApplyTolerationsFromTaints(ctx context.Context, oldTaints []corev1.Taint, newTaints []corev1.Taint, resource string, name string, kubeconfigFile string, namespace string, path string) error

func (*Kubectl) ApplyTolerationsFromTaintsToDaemonSet added in v0.6.1

func (k *Kubectl) ApplyTolerationsFromTaintsToDaemonSet(ctx context.Context, oldTaints []corev1.Taint, newTaints []corev1.Taint, dsName string, kubeconfigFile string) error

func (*Kubectl) CheckProviderExists added in v0.6.0

func (k *Kubectl) CheckProviderExists(ctx context.Context, kubeconfigFile, name, namespace string) (bool, error)

func (*Kubectl) CreateNamespace

func (k *Kubectl) CreateNamespace(ctx context.Context, kubeconfig string, namespace string) error

func (*Kubectl) DeleteAWSIamConfig added in v0.6.0

func (k *Kubectl) DeleteAWSIamConfig(ctx context.Context, managementCluster *types.Cluster, awsIamConfigName, awsIamConfigNamespace string) error

func (*Kubectl) DeleteCluster

func (k *Kubectl) DeleteCluster(ctx context.Context, managementCluster, clusterToDelete *types.Cluster) error

func (*Kubectl) DeleteEKSACluster added in v0.6.0

func (k *Kubectl) DeleteEKSACluster(ctx context.Context, managementCluster *types.Cluster, eksaClusterName, eksaClusterNamespace string) error

func (*Kubectl) DeleteEksaCloudStackDatacenterConfig added in v0.8.0

func (k *Kubectl) DeleteEksaCloudStackDatacenterConfig(ctx context.Context, cloudstackDatacenterConfigName string, kubeconfigFile string, namespace string) error

func (*Kubectl) DeleteEksaCloudStackMachineConfig added in v0.8.0

func (k *Kubectl) DeleteEksaCloudStackMachineConfig(ctx context.Context, cloudstackMachineConfigName string, kubeconfigFile string, namespace string) error

func (*Kubectl) DeleteEksaDatacenterConfig added in v0.7.0

func (k *Kubectl) DeleteEksaDatacenterConfig(ctx context.Context, eksaDatacenterResourceType string, eksaDatacenterConfigName string, kubeconfigFile string, namespace string) error

func (*Kubectl) DeleteEksaMachineConfig added in v0.7.0

func (k *Kubectl) DeleteEksaMachineConfig(ctx context.Context, eksaMachineConfigResourceType string, eksaMachineConfigName string, kubeconfigFile string, namespace string) error

func (*Kubectl) DeleteGitOpsConfig added in v0.6.0

func (k *Kubectl) DeleteGitOpsConfig(ctx context.Context, managementCluster *types.Cluster, gitOpsConfigName, gitOpsConfigNamespace string) error

func (*Kubectl) DeleteKubeSpecFromBytes added in v0.6.0

func (k *Kubectl) DeleteKubeSpecFromBytes(ctx context.Context, cluster *types.Cluster, data []byte) error

func (*Kubectl) DeleteNamespace added in v0.6.0

func (k *Kubectl) DeleteNamespace(ctx context.Context, kubeconfig string, namespace string) error

func (*Kubectl) DeleteOIDCConfig added in v0.6.0

func (k *Kubectl) DeleteOIDCConfig(ctx context.Context, managementCluster *types.Cluster, oidcConfigName, oidcConfigNamespace string) error

func (*Kubectl) DeleteOldWorkerNodeGroup added in v0.7.1

func (k *Kubectl) DeleteOldWorkerNodeGroup(ctx context.Context, md *clusterv1.MachineDeployment, kubeconfig string) error

func (*Kubectl) DeleteSecret added in v0.6.1

func (k *Kubectl) DeleteSecret(ctx context.Context, managementCluster *types.Cluster, secretName, namespace string) error

func (*Kubectl) GetApiServerUrl

func (k *Kubectl) GetApiServerUrl(ctx context.Context, cluster *types.Cluster) (string, error)

func (*Kubectl) GetBundles added in v0.6.0

func (k *Kubectl) GetBundles(ctx context.Context, kubeconfigFile, name, namespace string) (*releasev1alpha1.Bundles, error)

func (*Kubectl) GetClusterCATlsCert added in v0.6.0

func (k *Kubectl) GetClusterCATlsCert(ctx context.Context, clusterName string, cluster *types.Cluster, namespace string) ([]byte, error)

func (*Kubectl) GetClusterResourceSet added in v0.6.0

func (k *Kubectl) GetClusterResourceSet(ctx context.Context, kubeconfigFile, name, namespace string) (*addons.ClusterResourceSet, error)

func (*Kubectl) GetClusters

func (k *Kubectl) GetClusters(ctx context.Context, cluster *types.Cluster) ([]types.CAPICluster, error)

func (*Kubectl) GetConfigMap added in v0.6.0

func (k *Kubectl) GetConfigMap(ctx context.Context, kubeconfigFile, name, namespace string) (*corev1.ConfigMap, error)

func (*Kubectl) GetControlPlaneNodes added in v0.7.1

func (k *Kubectl) GetControlPlaneNodes(ctx context.Context, kubeconfig string) ([]corev1.Node, error)

func (*Kubectl) GetCurrentClusterContext

func (k *Kubectl) GetCurrentClusterContext(ctx context.Context, cluster *types.Cluster) (string, error)

func (*Kubectl) GetDaemonSet added in v0.7.0

func (k *Kubectl) GetDaemonSet(ctx context.Context, name, namespace, kubeconfig string) (*appsv1.DaemonSet, error)

func (*Kubectl) GetDeployment added in v0.7.0

func (k *Kubectl) GetDeployment(ctx context.Context, name, namespace, kubeconfig string) (*appsv1.Deployment, error)

func (*Kubectl) GetDeployments

func (k *Kubectl) GetDeployments(ctx context.Context, opts ...KubectlOpt) ([]appsv1.Deployment, error)

func (*Kubectl) GetEksaAWSDatacenterConfig

func (k *Kubectl) GetEksaAWSDatacenterConfig(ctx context.Context, awsDatacenterConfigName string, kubeconfigFile string, namespace string) (*v1alpha1.AWSDatacenterConfig, error)

func (*Kubectl) GetEksaAWSIamConfig added in v0.6.0

func (k *Kubectl) GetEksaAWSIamConfig(ctx context.Context, awsIamConfigName string, kubeconfigFile string, namespace string) (*v1alpha1.AWSIamConfig, error)

func (*Kubectl) GetEksaCloudStackDatacenterConfig added in v0.8.0

func (k *Kubectl) GetEksaCloudStackDatacenterConfig(ctx context.Context, cloudstackDatacenterConfigName string, kubeconfigFile string, namespace string) (*v1alpha1.CloudStackDatacenterConfig, error)

func (*Kubectl) GetEksaCloudStackMachineConfig added in v0.8.0

func (k *Kubectl) GetEksaCloudStackMachineConfig(ctx context.Context, cloudstackMachineConfigName string, kubeconfigFile string, namespace string) (*v1alpha1.CloudStackMachineConfig, error)

func (*Kubectl) GetEksaCluster

func (k *Kubectl) GetEksaCluster(ctx context.Context, cluster *types.Cluster, clusterName string) (*v1alpha1.Cluster, error)

func (*Kubectl) GetEksaGitOpsConfig

func (k *Kubectl) GetEksaGitOpsConfig(ctx context.Context, gitOpsConfigName string, kubeconfigFile string, namespace string) (*v1alpha1.GitOpsConfig, error)

func (*Kubectl) GetEksaOIDCConfig

func (k *Kubectl) GetEksaOIDCConfig(ctx context.Context, oidcConfigName string, kubeconfigFile string, namespace string) (*v1alpha1.OIDCConfig, error)

func (*Kubectl) GetEksaVSphereDatacenterConfig

func (k *Kubectl) GetEksaVSphereDatacenterConfig(ctx context.Context, vsphereDatacenterConfigName string, kubeconfigFile string, namespace string) (*v1alpha1.VSphereDatacenterConfig, error)

func (*Kubectl) GetEksaVSphereMachineConfig

func (k *Kubectl) GetEksaVSphereMachineConfig(ctx context.Context, vsphereMachineConfigName string, kubeconfigFile string, namespace string) (*v1alpha1.VSphereMachineConfig, error)

func (*Kubectl) GetEksdRelease added in v0.8.0

func (k *Kubectl) GetEksdRelease(ctx context.Context, name, namespace, kubeconfigFile string) (*eksdv1alpha1.Release, error)

func (*Kubectl) GetEtcdadmCluster

func (k *Kubectl) GetEtcdadmCluster(ctx context.Context, cluster *types.Cluster, clusterName string, opts ...KubectlOpt) (*etcdv1.EtcdadmCluster, error)

func (*Kubectl) GetKubeadmControlPlane

func (k *Kubectl) GetKubeadmControlPlane(ctx context.Context, cluster *types.Cluster, clusterName string, opts ...KubectlOpt) (*controlplanev1.KubeadmControlPlane, error)

func (*Kubectl) GetKubeadmControlPlanes

func (k *Kubectl) GetKubeadmControlPlanes(ctx context.Context, opts ...KubectlOpt) ([]controlplanev1.KubeadmControlPlane, error)

func (*Kubectl) GetMachineDeployment

func (k *Kubectl) GetMachineDeployment(ctx context.Context, workerNodeGroupName string, opts ...KubectlOpt) (*clusterv1.MachineDeployment, error)

func (*Kubectl) GetMachineDeployments

func (k *Kubectl) GetMachineDeployments(ctx context.Context, opts ...KubectlOpt) ([]clusterv1.MachineDeployment, error)

func (*Kubectl) GetMachineSets added in v0.7.1

func (k *Kubectl) GetMachineSets(ctx context.Context, machineDeploymentName string, cluster *types.Cluster) ([]clusterv1.MachineSet, error)

func (*Kubectl) GetMachines

func (k *Kubectl) GetMachines(ctx context.Context, cluster *types.Cluster, clusterName string) ([]types.Machine, error)

func (*Kubectl) GetNamespace added in v0.6.0

func (k *Kubectl) GetNamespace(ctx context.Context, kubeconfig string, namespace string) error

func (*Kubectl) GetNodes added in v0.7.1

func (k *Kubectl) GetNodes(ctx context.Context, kubeconfig string) ([]corev1.Node, error)

func (*Kubectl) GetPods

func (k *Kubectl) GetPods(ctx context.Context, opts ...KubectlOpt) ([]corev1.Pod, error)

func (*Kubectl) GetResource added in v0.6.1

func (k *Kubectl) GetResource(ctx context.Context, resourceType string, name string, kubeconfig string, namespace string) (bool, error)

func (*Kubectl) GetResources added in v0.8.0

func (k *Kubectl) GetResources(ctx context.Context, resourceType string, opts ...KubectlOpt) (string, error)

func (*Kubectl) GetSecret

func (k *Kubectl) GetSecret(ctx context.Context, secretObjectName string, opts ...KubectlOpt) (*corev1.Secret, error)

func (*Kubectl) GetSecretFromNamespace added in v0.6.0

func (k *Kubectl) GetSecretFromNamespace(ctx context.Context, kubeconfigFile, name, namespace string) (*corev1.Secret, error)

func (*Kubectl) KubeconfigSecretAvailable added in v0.6.1

func (k *Kubectl) KubeconfigSecretAvailable(ctx context.Context, kubeconfig string, clusterName string, namespace string) (bool, error)

func (*Kubectl) ListCluster

func (k *Kubectl) ListCluster(ctx context.Context) error

func (*Kubectl) LoadSecret

func (k *Kubectl) LoadSecret(ctx context.Context, secretObject string, secretObjectType string, secretObjectName string, kubeConfFile string) error

func (*Kubectl) MachineTemplateName

func (k *Kubectl) MachineTemplateName(ctx context.Context, clusterName string, kubeconfig string, opts ...KubectlOpt) (string, error)

func (*Kubectl) RemoveAnnotation

func (k *Kubectl) RemoveAnnotation(ctx context.Context, resourceType, objectName string, key string, opts ...KubectlOpt) error

func (*Kubectl) RemoveAnnotationInNamespace

func (k *Kubectl) RemoveAnnotationInNamespace(ctx context.Context, resourceType, objectName, key string, cluster *types.Cluster, namespace string) error

func (*Kubectl) SaveLog

func (k *Kubectl) SaveLog(ctx context.Context, cluster *types.Cluster, deployment *types.Deployment, fileName string, writer filewriter.FileWriter) error

func (*Kubectl) SearchCloudStackDatacenterConfig added in v0.8.0

func (k *Kubectl) SearchCloudStackDatacenterConfig(ctx context.Context, name string, kubeconfigFile string, namespace string) ([]*v1alpha1.CloudStackDatacenterConfig, error)

func (*Kubectl) SearchCloudStackMachineConfig added in v0.8.0

func (k *Kubectl) SearchCloudStackMachineConfig(ctx context.Context, name string, kubeconfigFile string, namespace string) ([]*v1alpha1.CloudStackMachineConfig, error)

func (*Kubectl) SearchEksaGitOpsConfig added in v0.6.0

func (k *Kubectl) SearchEksaGitOpsConfig(ctx context.Context, gitOpsConfigName string, kubeconfigFile string, namespace string) ([]*v1alpha1.GitOpsConfig, error)

func (*Kubectl) SearchIdentityProviderConfig added in v0.6.0

func (k *Kubectl) SearchIdentityProviderConfig(ctx context.Context, ipName string, kind string, kubeconfigFile string, namespace string) ([]*v1alpha1.VSphereDatacenterConfig, error)

func (*Kubectl) SearchVsphereDatacenterConfig added in v0.6.0

func (k *Kubectl) SearchVsphereDatacenterConfig(ctx context.Context, datacenterName string, kubeconfigFile string, namespace string) ([]*v1alpha1.VSphereDatacenterConfig, error)

func (*Kubectl) SearchVsphereMachineConfig added in v0.6.0

func (k *Kubectl) SearchVsphereMachineConfig(ctx context.Context, name string, kubeconfigFile string, namespace string) ([]*v1alpha1.VSphereMachineConfig, error)

func (*Kubectl) SetDaemonSetImage added in v0.6.0

func (k *Kubectl) SetDaemonSetImage(ctx context.Context, kubeconfigFile, name, namespace, container, image string) error

func (*Kubectl) UpdateAnnotation

func (k *Kubectl) UpdateAnnotation(ctx context.Context, resourceType, objectName string, annotations map[string]string, opts ...KubectlOpt) error

func (*Kubectl) UpdateAnnotationInNamespace

func (k *Kubectl) UpdateAnnotationInNamespace(ctx context.Context, resourceType, objectName string, annotations map[string]string, cluster *types.Cluster, namespace string) error

func (*Kubectl) UpdateEnvironmentVariables added in v0.6.0

func (k *Kubectl) UpdateEnvironmentVariables(ctx context.Context, resourceType, resourceName string, envMap map[string]string, opts ...KubectlOpt) error

func (*Kubectl) UpdateEnvironmentVariablesInNamespace added in v0.6.0

func (k *Kubectl) UpdateEnvironmentVariablesInNamespace(ctx context.Context, resourceType, resourceName string, envMap map[string]string, cluster *types.Cluster, namespace string) error

func (*Kubectl) ValidateClustersCRD

func (k *Kubectl) ValidateClustersCRD(ctx context.Context, cluster *types.Cluster) error

func (*Kubectl) ValidateControlPlaneNodes

func (k *Kubectl) ValidateControlPlaneNodes(ctx context.Context, cluster *types.Cluster, clusterName string) error

func (*Kubectl) ValidateEKSAClustersCRD added in v0.6.0

func (k *Kubectl) ValidateEKSAClustersCRD(ctx context.Context, cluster *types.Cluster) error

func (*Kubectl) ValidateNodes

func (k *Kubectl) ValidateNodes(ctx context.Context, kubeconfig string) error

func (*Kubectl) ValidateNodesVersion

func (k *Kubectl) ValidateNodesVersion(ctx context.Context, kubeconfig string, kubeVersion v1alpha1.KubernetesVersion) error

func (*Kubectl) ValidatePods

func (k *Kubectl) ValidatePods(ctx context.Context, kubeconfig string) error

func (*Kubectl) ValidateWorkerNodes

func (k *Kubectl) ValidateWorkerNodes(ctx context.Context, clusterName string, kubeconfig string) error

func (*Kubectl) Version

func (k *Kubectl) Version(ctx context.Context, cluster *types.Cluster) (*VersionResponse, error)

func (*Kubectl) VsphereWorkerNodesMachineTemplate

func (k *Kubectl) VsphereWorkerNodesMachineTemplate(ctx context.Context, clusterName string, kubeconfig string, namespace string) (*vspherev1.VSphereMachineTemplate, error)

func (*Kubectl) Wait

func (k *Kubectl) Wait(ctx context.Context, kubeconfig string, timeout string, forCondition string, property string, namespace string) error

func (*Kubectl) WaitForControlPlaneReady

func (k *Kubectl) WaitForControlPlaneReady(ctx context.Context, cluster *types.Cluster, timeout string, newClusterName string) error

func (*Kubectl) WaitForDeployment

func (k *Kubectl) WaitForDeployment(ctx context.Context, cluster *types.Cluster, timeout string, condition string, target string, namespace string) error

func (*Kubectl) WaitForManagedExternalEtcdReady

func (k *Kubectl) WaitForManagedExternalEtcdReady(ctx context.Context, cluster *types.Cluster, timeout string, newClusterName string) error

type KubectlOpt

type KubectlOpt func(*[]string)

func WithAllNamespaces

func WithAllNamespaces() KubectlOpt

func WithArgs added in v0.8.0

func WithArgs(args []string) KubectlOpt

func WithCluster

func WithCluster(c *types.Cluster) KubectlOpt

func WithKubeconfig added in v0.6.0

func WithKubeconfig(kubeconfigFile string) KubectlOpt

func WithNamespace

func WithNamespace(n string) KubectlOpt

func WithOutput added in v0.8.0

func WithOutput(output string) KubectlOpt

func WithOverwrite

func WithOverwrite() KubectlOpt

func WithServer

func WithServer(s string) KubectlOpt

func WithSkipTLSVerify

func WithSkipTLSVerify() KubectlOpt

func WithToken

func WithToken(t string) KubectlOpt

type Sonobuoy

type Sonobuoy struct {
	Executable
}

func BuildSonobuoyExecutable

func BuildSonobuoyExecutable() *Sonobuoy

func NewSonobuoy

func NewSonobuoy(executable Executable) *Sonobuoy

func (*Sonobuoy) GetResults added in v0.6.0

func (k *Sonobuoy) GetResults(ctx context.Context, contextName string, args ...string) (string, error)

func (*Sonobuoy) Run

func (k *Sonobuoy) Run(ctx context.Context, contextName string, args ...string) (string, error)

type SupportBundleAnalysis added in v0.6.0

type SupportBundleAnalysis struct {
	Title   string `json:"title"`
	IsPass  bool   `json:"isPass"`
	IsFail  bool   `json:"isFail"`
	IsWarn  bool   `json:"isWarn"`
	Message string `json:"message"`
	Uri     string `json:"URI"`
}

type Tink added in v0.8.0

type Tink struct {
	Executable
	// contains filtered or unexported fields
}

func NewTink added in v0.8.0

func NewTink(executable Executable, tinkerbellCertUrl, tinkerbellGrpcAuthority string) *Tink

func (*Tink) GetHardware added in v0.8.0

func (t *Tink) GetHardware(ctx context.Context) ([]*hardware.Hardware, error)

func (*Tink) GetWorkflow added in v0.8.0

func (t *Tink) GetWorkflow(ctx context.Context) ([]*workflow.Workflow, error)

func (*Tink) PushHardware added in v0.8.0

func (t *Tink) PushHardware(ctx context.Context, hardware []byte) error

type Toleration added in v0.6.1

type Toleration struct {
	Effect            string      `json:"effect,omitempty"`
	Key               string      `json:"key,omitempty"`
	Operator          string      `json:"operator,omitempty"`
	Value             string      `json:"value,omitempty"`
	TolerationSeconds json.Number `json:"tolerationSeconds,omitempty"`
}

type Troubleshoot added in v0.6.0

type Troubleshoot struct {
	Executable
}

func NewTroubleshoot added in v0.6.0

func NewTroubleshoot(executable Executable) *Troubleshoot

func (*Troubleshoot) Analyze added in v0.6.0

func (t *Troubleshoot) Analyze(ctx context.Context, bundleSpecPath string, archivePath string) ([]*SupportBundleAnalysis, error)

func (*Troubleshoot) Collect added in v0.6.0

func (t *Troubleshoot) Collect(ctx context.Context, bundlePath string, sinceTime *time.Time, kubeconfig string) (archivePath string, err error)

type VSphereDatacenterConfigResponse added in v0.6.0

type VSphereDatacenterConfigResponse struct {
	Items []*v1alpha1.VSphereDatacenterConfig `json:"items,omitempty"`
}

type VSphereMachineConfigResponse added in v0.6.0

type VSphereMachineConfigResponse struct {
	Items []*v1alpha1.VSphereMachineConfig `json:"items,omitempty"`
}

type VersionResponse

type VersionResponse struct {
	ClientVersion version.Info `json:"clientVersion"`
	ServerVersion version.Info `json:"serverVersion"`
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL