kubeconfig

package
v0.0.0-...-5169047 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2019 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Overview

Copyright Jetstack Ltd. See LICENSE for details.

Copyright Jetstack Ltd. See LICENSE for details.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clust

type Clust struct {
	Server                   string `yaml:"server"`
	ApiVersion               string `yaml:"api-version"`
	CertificateAuthorityData string `yaml:"certificate-authority-data"`
}

type Cluster

type Cluster struct {
	Name    string `yaml:"name"`
	Cluster Clust
}

type Context

type Context struct {
	Name    string `yaml:"name"`
	Context Conx
}

type Conx

type Conx struct {
	Cluster   string `yaml:"cluster"`
	Namespace string `yaml:"namespace"`
	User      string `yaml:"user"`
}

type KubeY

type KubeY struct {
	CurrentContext string `yaml:"current-context"`
	ApiVersion     string `yaml:"apiVersion"`
	Kind           string `yaml:"kind"`

	Clusters []Cluster
	Contexts []Context
	Users    []User
}

type Kubeconfig

type Kubeconfig struct {
	Log *logrus.Entry
	// contains filtered or unexported fields
}

func New

func New(logger *logrus.Entry, c *cert.Cert) *Kubeconfig

func (*Kubeconfig) BuildYaml

func (u *Kubeconfig) BuildYaml() (yml string, err error)

func (*Kubeconfig) Cert

func (u *Kubeconfig) Cert() (c *cert.Cert)

func (*Kubeconfig) Cert64

func (u *Kubeconfig) Cert64() (byt string)

func (*Kubeconfig) CertCA64

func (u *Kubeconfig) CertCA64() (byt string)

func (*Kubeconfig) CertKey64

func (u *Kubeconfig) CertKey64() (byt string)

func (*Kubeconfig) ConfigPath

func (u *Kubeconfig) ConfigPath() string

func (*Kubeconfig) EncodeCerts

func (u *Kubeconfig) EncodeCerts() error

func (*Kubeconfig) RunKube

func (u *Kubeconfig) RunKube() error

func (*Kubeconfig) SetCert

func (u *Kubeconfig) SetCert(cert *cert.Cert)

func (*Kubeconfig) SetCert64

func (u *Kubeconfig) SetCert64(byt string)

func (*Kubeconfig) SetCertCA64

func (u *Kubeconfig) SetCertCA64(byt string)

func (*Kubeconfig) SetCertKey64

func (u *Kubeconfig) SetCertKey64(byt string)

func (*Kubeconfig) SetKubeConfigPath

func (u *Kubeconfig) SetKubeConfigPath(path string)

func (*Kubeconfig) StoreYaml

func (u *Kubeconfig) StoreYaml(yml string) error

func (*Kubeconfig) WritePermissions

func (u *Kubeconfig) WritePermissions() error

type User

type User struct {
	Name string `yaml:"name"`
	User Usr
}

type Usr

type Usr struct {
	ClientCertificateData string `yaml:"client-certificate-data"`
	ClientKeyData         string `yaml:"client-key-data"`
}

Jump to

Keyboard shortcuts

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