Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultKubecfgAdminLifetime = 18 * time.Hour
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateKubecfgOptions ¶ added in v1.31.0
type CreateKubecfgOptions struct { CreateKubecfg bool // Admin is the lifetime of the admin certificate Admin time.Duration // User is the user to use in the kubeconfig User string // Internal is whether to use the internal API endpoint Internal bool // UseKopsAuthenticationPlugin controls whether we should use the kOps auth helper instead of a static credential UseKopsAuthenticationPlugin bool }
type KubeconfigBuilder ¶
type KubeconfigBuilder struct { Server string TLSServerName string Context string Namespace string User string KubeUser string KubePassword string CACerts []byte ClientCert []byte ClientKey []byte AuthenticationExec []string }
KubeconfigBuilder builds a kubecfg file This logic previously lives in the bash scripts (create-kubeconfig in cluster/common.sh)
func BuildKubecfg ¶
func BuildKubecfg(ctx context.Context, cluster *kops.Cluster, keyStore fi.KeystoreReader, secretStore fi.SecretStore, cloud fi.Cloud, options CreateKubecfgOptions, kopsStateStore string) (*KubeconfigBuilder, error)
func NewKubeconfigBuilder ¶
func NewKubeconfigBuilder() *KubeconfigBuilder
Create new KubeconfigBuilder
func (*KubeconfigBuilder) DeleteKubeConfig ¶
func (b *KubeconfigBuilder) DeleteKubeConfig(configAccess clientcmd.ConfigAccess) error
func (*KubeconfigBuilder) ToRESTConfig ¶ added in v1.31.0
func (b *KubeconfigBuilder) ToRESTConfig() (*rest.Config, error)
func (*KubeconfigBuilder) WriteKubecfg ¶
func (b *KubeconfigBuilder) WriteKubecfg(configAccess clientcmd.ConfigAccess) error
Write out a new kubeconfig
type KubectlCluster ¶
type KubectlClusterWithName ¶
type KubectlClusterWithName struct { Name string `json:"name"` Cluster KubectlCluster `json:"cluster"` }
type KubectlConfig ¶
type KubectlConfig struct { Kind string `json:"kind"` ApiVersion string `json:"apiVersion"` CurrentContext string `json:"current-context"` Clusters []*KubectlClusterWithName `json:"clusters"` Contexts []*KubectlContextWithName `json:"contexts"` Users []*KubectlUserWithName `json:"users"` }
type KubectlContext ¶
type KubectlContextWithName ¶
type KubectlContextWithName struct { Name string `json:"name"` Context KubectlContext `json:"context"` }
type KubectlUser ¶
type KubectlUserWithName ¶
type KubectlUserWithName struct { Name string `json:"name"` User KubectlUser `json:"user"` }
Click to show internal directories.
Click to hide internal directories.