Documentation
¶
Overview ¶
Index ¶
- func BindDeveloperOptions(opts *RawCreateOptions, flags *pflag.FlagSet)
- func BindOptions(opts *RawCreateOptions, flags *pflag.FlagSet)
- func CreateArchive(ctx context.Context, opts *DumpOptions) error
- func CreateCluster(ctx context.Context, rawOpts *RawCreateOptions, rawPlatform PlatformValidator) error
- func DestroyCluster(ctx context.Context, hostedCluster *hyperv1.HostedCluster, o *DestroyOptions, ...) error
- func DumpCluster(ctx context.Context, opts *DumpOptions) error
- func DumpGuestCluster(ctx context.Context, log logr.Logger, kubeconfig string, destDir string) error
- func GetAPIServerAddressByNode(ctx context.Context, l logr.Logger) (string, error)
- func GetCluster(ctx context.Context, o *DestroyOptions) (*hyperv1.HostedCluster, error)
- func GetIngressServicePublishingStrategyMapping(netType hyperv1.NetworkType, usesExternalDNS bool) []hyperv1.ServicePublishingStrategyMapping
- func GetServicePublishingStrategyMappingByAPIServerAddress(APIServerAddress string, netType hyperv1.NetworkType) []hyperv1.ServicePublishingStrategyMapping
- func NewDumpCommand() *cobra.Command
- type AWSPlatformDestroyOptions
- type AzurePlatformDestroyOptions
- type CreateOptions
- type DefaultNodePoolConstructor
- type DestroyOptions
- type DestroyPlatformSpecifics
- type DumpOptions
- type LogChecker
- type OCAdmInspect
- type OCAdmNodeLogs
- type Platform
- type PlatformCompleter
- type PlatformValidator
- type PowerVSPlatformDestroyOptions
- type RawCreateOptions
- type ValidatedCreateOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindDeveloperOptions ¶ added in v0.1.38
func BindDeveloperOptions(opts *RawCreateOptions, flags *pflag.FlagSet)
BindDeveloperOptions binds options that should only be exposed to developers in the `hypershift` CLI
func BindOptions ¶ added in v0.1.38
func BindOptions(opts *RawCreateOptions, flags *pflag.FlagSet)
BindOptions binds options that should always be exposed to users in all CLIs
func CreateArchive ¶ added in v0.1.10
func CreateArchive(ctx context.Context, opts *DumpOptions) error
func CreateCluster ¶
func CreateCluster(ctx context.Context, rawOpts *RawCreateOptions, rawPlatform PlatformValidator) error
func DestroyCluster ¶
func DestroyCluster(ctx context.Context, hostedCluster *hyperv1.HostedCluster, o *DestroyOptions, destroyPlatformSpecifics DestroyPlatformSpecifics) error
func DumpCluster ¶
func DumpCluster(ctx context.Context, opts *DumpOptions) error
func DumpGuestCluster ¶
func DumpGuestCluster(ctx context.Context, log logr.Logger, kubeconfig string, destDir string) error
DumpGuestCluster dumps resources from a hosted cluster using its apiserver indicated by the provided kubeconfig. This function assumes that pods aren't able to be scheduled and so can only gather information directly accessible through the api server.
func GetCluster ¶
func GetCluster(ctx context.Context, o *DestroyOptions) (*hyperv1.HostedCluster, error)
func GetIngressServicePublishingStrategyMapping ¶ added in v0.1.38
func GetIngressServicePublishingStrategyMapping(netType hyperv1.NetworkType, usesExternalDNS bool) []hyperv1.ServicePublishingStrategyMapping
func GetServicePublishingStrategyMappingByAPIServerAddress ¶ added in v0.1.38
func GetServicePublishingStrategyMappingByAPIServerAddress(APIServerAddress string, netType hyperv1.NetworkType) []hyperv1.ServicePublishingStrategyMapping
func NewDumpCommand ¶
Types ¶
type AWSPlatformDestroyOptions ¶
type AWSPlatformDestroyOptions struct {
Credentials awsutil.AWSCredentialsOptions
BaseDomain string
BaseDomainPrefix string
PreserveIAM bool
Region string
PostDeleteAction func()
AwsInfraGracePeriod time.Duration
VPCOwnerCredentials awsutil.AWSCredentialsOptions
}
type CreateOptions ¶
type CreateOptions struct {
// contains filtered or unexported fields
}
type DefaultNodePoolConstructor ¶ added in v0.1.38
type DefaultNodePoolConstructor func(platformType hyperv1.PlatformType, suffix string) *hyperv1.NodePool
type DestroyOptions ¶
type DestroyOptions struct {
ClusterGracePeriod time.Duration
Name string
Namespace string
AWSPlatform AWSPlatformDestroyOptions
AzurePlatform AzurePlatformDestroyOptions
PowerVSPlatform PowerVSPlatformDestroyOptions
InfraID string
DestroyCloudResources bool
Log logr.Logger
CredentialSecretName string
}
type DestroyPlatformSpecifics ¶
type DestroyPlatformSpecifics = func(ctx context.Context, options *DestroyOptions) error
DestroyPlatformSpecifics can be used to destroy platform specific resources which are unknown to hypershift
type DumpOptions ¶
type DumpOptions struct {
Namespace string
Name string
ArtifactDir string
ArchiveDump bool
// LogCheckers is a list of functions that will
// get run over all raw logs if set.
LogCheckers []LogChecker
// AgentNamespace is the namespace where Agents
// are located, when using the agent platform.
AgentNamespace string
DumpGuestCluster bool
ImpersonateAs string
Log logr.Logger
}
type LogChecker ¶
type OCAdmInspect ¶
type OCAdmInspect struct {
// contains filtered or unexported fields
}
func (*OCAdmInspect) WithNamespace ¶
func (i *OCAdmInspect) WithNamespace(namespace string) *OCAdmInspect
type OCAdmNodeLogs ¶ added in v0.1.10
type OCAdmNodeLogs struct {
// contains filtered or unexported fields
}
type Platform ¶ added in v0.1.38
type Platform interface {
// ApplyPlatformSpecifics decorates the HostedCluster prototype created from common options with platform-
// specific values and cAonfigurations.
ApplyPlatformSpecifics(*hyperv1.HostedCluster) error
// GenerateNodePools generates the NodePools that need to exist for this guest cluster to be functional.
GenerateNodePools(DefaultNodePoolConstructor) []*hyperv1.NodePool
// GenerateResources generates the additional resources that need to exist for this guest cluster to be functional.
GenerateResources() ([]crclient.Object, error)
}
Platform closes over the work that each platform does when creating a HostedCluster and the associated resources. The Platform knows how to decorate the HostedClusterSpec itself as well as how to add new resources to the list that needs to be applied to the cluster for a functional guest cluster.
type PlatformCompleter ¶ added in v0.1.38
type PlatformCompleter interface {
// Complete allows the platform-specific logic to default values from the agnostic set.
Complete(context.Context, *CreateOptions) (Platform, error)
}
PlatformCompleter knows how to absorb configuration.
type PlatformValidator ¶ added in v0.1.38
type PlatformValidator interface {
// Validate allows the platform-specific logic to validate inputs.
Validate(context.Context, *CreateOptions) (PlatformCompleter, error)
}
PlatformValidator knows how to validate platform options.
type RawCreateOptions ¶ added in v0.1.38
type RawCreateOptions struct {
AdditionalTrustBundle string
Annotations []string
Labels []string
AutoRepair bool
ControlPlaneAvailabilityPolicy string
ControlPlaneOperatorImage string
EtcdStorageClass string
FIPS bool
GenerateSSH bool
ImageContentSources string
InfrastructureAvailabilityPolicy string
InfrastructureJSON string
InfraID string
Name string
Namespace string
BaseDomain string
BaseDomainPrefix string
NetworkType string
NodePoolReplicas int32
NodeDrainTimeout time.Duration
NodeVolumeDetachTimeout time.Duration
PullSecretFile string
ReleaseImage string
ReleaseStream string
Render bool
RenderInto string
RenderSensitive bool
SSHKeyFile string
ServiceCIDR []string
ClusterCIDR []string
DefaultDual bool
ExternalDNSDomain string
Arch string
NodeSelector map[string]string
Tolerations []string
Wait bool
Timeout time.Duration
Log logr.Logger
SkipAPIBudgetVerification bool
NodeUpgradeType hyperv1.UpgradeType
PausedUntil string
OLMCatalogPlacement hyperv1.OLMCatalogPlacement
OLMDisableDefaultSources bool
// BeforeApply is called immediately before resources are applied to the
// server, giving the user an opportunity to inspect or mutate the resources.
// This is intended primarily for e2e testing and should be used with care.
BeforeApply func(crclient.Object) `json:"-"`
// These fields are reverse-completed by the aws CLI since we support a flag that projects
// them back up here
PublicKey, PrivateKey, PullSecret []byte
}
func DefaultOptions ¶ added in v0.1.38
func DefaultOptions() *RawCreateOptions
func (*RawCreateOptions) Validate ¶ added in v0.1.38
func (opts *RawCreateOptions) Validate(ctx context.Context) (*ValidatedCreateOptions, error)
type ValidatedCreateOptions ¶ added in v0.1.38
type ValidatedCreateOptions struct {
// contains filtered or unexported fields
}
func (*ValidatedCreateOptions) Complete ¶ added in v0.1.38
func (opts *ValidatedCreateOptions) Complete() (*CreateOptions, error)