Documentation ¶
Index ¶
- Constants
- func BuildCloudControlPlaneKubeconfig(proxy *url.URL, id string, token string, includePrefix bool) *api.Config
- func DynamicWatch(ctx context.Context, r dynamic.NamespaceableResourceInterface, timeout *int64, ...) (chan error, error)
- func GetKubeConfig(path string) (*rest.Config, error)
- func MergeIntoKubeConfig(mcpConf *api.Config, existingFilePath string, setDefaultContext bool, ...) error
- func VerifyKubeConfig(wrapTransport transport.WrapperFunc) func(cfg *api.Config) error
- type ImagePullApplicator
- type SecretApplicator
Constants ¶
const ( // UpboundKubeconfigKeyFmt is the format for Upbound control plane entries // in a kubeconfig file. UpboundKubeconfigKeyFmt = "upbound-%s" // UpboundK8sResource is appended to the end of the kubeconfig server path. UpboundK8sResource = "k8s" )
Variables ¶
This section is empty.
Functions ¶
func BuildCloudControlPlaneKubeconfig ¶ added in v0.25.0
func BuildCloudControlPlaneKubeconfig(proxy *url.URL, id string, token string, includePrefix bool) *api.Config
BuildCloudControlPlaneKubeconfig builds a kubeconfig entry for a control plane.
func DynamicWatch ¶ added in v0.25.0
func DynamicWatch(ctx context.Context, r dynamic.NamespaceableResourceInterface, timeout *int64, done func(u *unstructured.Unstructured) (bool, error)) (chan error, error)
DynamicWatch starts a watch on the given resource type. The done callback is called on every received event until either timeout or context cancellation.
func GetKubeConfig ¶
GetKubeConfig constructs a Kubernetes REST config from the specified kubeconfig, or falls back to same defaults as kubectl.
func MergeIntoKubeConfig ¶ added in v0.25.0
func MergeIntoKubeConfig(mcpConf *api.Config, existingFilePath string, setDefaultContext bool, preCheck ...func(cfg *api.Config) error) error
MergeIntoKubeConfig applies a control plane kubeconfig to an existing kubeconfig file and sets it as the current context.
func VerifyKubeConfig ¶ added in v0.25.0
func VerifyKubeConfig(wrapTransport transport.WrapperFunc) func(cfg *api.Config) error
Types ¶
type ImagePullApplicator ¶ added in v0.25.0
type ImagePullApplicator struct {
// contains filtered or unexported fields
}
ImagePullApplicator constructs and creates or updates an image pull Secret.
func NewImagePullApplicator ¶ added in v0.25.0
func NewImagePullApplicator(secret *SecretApplicator) *ImagePullApplicator
NewImagePullApplicator constructs a new ImagePullApplicator with the passed SecretApplicator. TODO(hasheddan): consider moving applicators to a common interface.
type SecretApplicator ¶ added in v0.5.0
type SecretApplicator struct {
// contains filtered or unexported fields
}
SecretApplicator creates or updates Secrets. In the event that the Secret exists and must be updated, it is completely replaced, not patched.
func NewSecretApplicator ¶ added in v0.5.0
func NewSecretApplicator(client kubernetes.Interface) *SecretApplicator
NewSecretApplicator constructs a SecretApplicator with the passed Kubernetes client.