Documentation ¶
Index ¶
- Constants
- func GetSyncerID(logicalClusterName string, workloadClusterName string) string
- type Config
- func (c *Config) Cordon(ctx context.Context, workloadClusterName string) error
- func (c *Config) Drain(ctx context.Context, workloadClusterName string) error
- func (c *Config) Sync(ctx context.Context, workloadClusterName, kcpNamespaceName, image string, ...) error
- func (c *Config) Uncordon(ctx context.Context, workloadClusterName string) error
- type Options
Constants ¶
View Source
const ( // These resource names include a kcp- due to the intended use in pclusters. SyncerResourceName = "kcp-syncer" SyncerSecretName = "kcp-syncer-config" // The name of the key for the upstream config in the pcluster secret. SyncerSecretConfigKey = "kubeconfig" // The prefix for syncer-supporting auth resources in kcp. SyncerAuthResourcePrefix = "syncer-" // Max length of service account name (cluster role has no limit) MaxSyncerAuthResourceName = 254 // SyncerIDPrefix is the syncer id prefix is only 7 characters so that the 224 bits // of an sha hash can be suffixed and still be within kube's 63 // char resource name limit. // // TODO(marun) This prefix should be reserved to avoid user resources being misidentified as syncer resources. // TODO(marun) Would a shorter hash be sufficient? SyncerIDPrefix = "kcpsync" )
Variables ¶
This section is empty.
Functions ¶
func GetSyncerID ¶
GetSyncerID returns the resource identifier of a syncer for the given logical cluster and workload cluster. The ID is unique for unique pairs of inputs to ensure a pcluster can be configured with multiple syncers for a given kcp instance.
Types ¶
type Config ¶
type Config struct { genericclioptions.IOStreams // contains filtered or unexported fields }
func (*Config) Sync ¶
func (c *Config) Sync(ctx context.Context, workloadClusterName, kcpNamespaceName, image string, resourcesToSync []string, replicas int) error
Sync prepares a kcp workspace for use with a syncer and outputs the configuration required to deploy a syncer to the pcluster to stdout.
type Options ¶
type Options struct { KubectlOverrides *clientcmd.ConfigOverrides genericclioptions.IOStreams }
Options for the workload commands.
func NewOptions ¶
func NewOptions(streams genericclioptions.IOStreams) *Options
NewOptions provides an instance of Options with default values
Click to show internal directories.
Click to hide internal directories.