kubectl

package
v0.0.0-...-e73abb9 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterCluster

type ClusterCluster struct {
	CertificateAuthorityData string `json:"certificate-authority-data" yaml:"certificate-authority-data"`
	CertificateAuthority     string `json:"certificate-authority" yaml:"certificate-authority"`
	Server                   string `json:"server" yaml:"server"`
}

ClusterCluster entity

type ClusterElement

type ClusterElement struct {
	Cluster ClusterCluster `json:"cluster" yaml:"cluster"`
	Name    string         `json:"name" yaml:"name"`
}

ClusterElement entity

type ContextContext

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

ContextContext entity

type ContextElement

type ContextElement struct {
	Context ContextContext `json:"context" yaml:"context"`
	Name    string         `json:"name" yaml:"name"`
}

ContextElement entity

type KubeConfig

type KubeConfig struct {
	APIVersion     string           `json:"apiVersion" yaml:"apiVersion"`
	Kind           string           `json:"kind" yaml:"kind"`
	Preferences    Preferences      `json:"preferences" yaml:"preferences"`
	Clusters       []ClusterElement `json:"clusters" yaml:"clusters"`
	Users          []UserElement    `json:"users" yaml:"users"`
	Contexts       []ContextElement `json:"contexts" yaml:"contexts"`
	CurrentContext string           `json:"current-context" yaml:"current-context"`
}

KubeConfig entity

type Module

type Module struct {
	Exists         bool
	ClientVersion  string
	ServerVersion  string
	Version        Version
	Exec           string
	Path           string
	CurrentContext string
	KubeConfig     KubeConfig
}

Module Entity

func NewModule

func NewModule() Module

NewModule creates a new Istio Module

func (*Module) AddCluster

func (m *Module) AddCluster(cluster ClusterElement) error

AddCluster Adds a cluster to the kubectl config

func (*Module) AddContext

func (m *Module) AddContext(context ContextElement) error

AddContext Adds a context to the kubectl config

func (*Module) AddCredentials

func (m *Module) AddCredentials(user UserElement) error

AddCredentials Adds a credential to the kubectl config

func (*Module) AddKubeConfig

func (m *Module) AddKubeConfig(kubeConfig string) error

AddKubeConfig adds a kubeconfig string into the Kubectl config

func (*Module) Delete

func (m *Module) Delete(manifestPath string) error

Delete Deletes a manifest from the default context

func (*Module) DeleteNamespace

func (m *Module) DeleteNamespace(namespace string) error

DeleteNamespace Deletes a manifest from the default context

func (*Module) GetAllNamespace

func (m *Module) GetAllNamespace() error

GetAllNamespace Deletes a manifest from the default context

func (*Module) GetKubeConfig

func (m *Module) GetKubeConfig() *KubeConfig

GetKubeConfig gets Kubectl config from system

func (*Module) GetModule

func (m *Module) GetModule()

GetModule GetModule Istio into the tools folder

func (*Module) GetVersion

func (m *Module) GetVersion() error

GetVersion gets Istio latest version from github

func (*Module) SetContext

func (m *Module) SetContext(contextName string) error

SetContext Sets the default context for kubectl

func (*Module) SetExists

func (m *Module) SetExists() bool

SetExists checks if Istio module exists

type Preferences

type Preferences struct {
}

Preferences entity

type UserElement

type UserElement struct {
	Name string   `json:"name" yaml:"name"`
	User UserUser `json:"user" yaml:"user"`
}

UserElement entity

type UserUser

type UserUser struct {
	AsUserExtra       Preferences `json:"as-user-extra" yaml:"as-user-extra"`
	Token             string      `json:"token" yaml:"token"`
	ClientCertificate string      `json:"client-certificate" yaml:"client-certificate"`
	ClientKey         string      `json:"client-key" yaml:"client-key"`
	Username          string      `json:"username" yaml:"username"`
	Password          string      `json:"password" yaml:"password"`
}

UserUser entity

type Version

type Version struct {
	ClientVersion VersionInfo `json:"clientVersion"`
	ServerVersion VersionInfo `json:"serverVersion"`
}

Version entity

type VersionInfo

type VersionInfo struct {
	Major        string `json:"major"`
	Minor        string `json:"minor"`
	GitVersion   string `json:"gitVersion"`
	GitCommit    string `json:"gitCommit"`
	GitTreeState string `json:"gitTreeState"`
	BuildDate    string `json:"buildDate"`
	GoVersion    string `json:"goVersion"`
	Compiler     string `json:"compiler"`
	Platform     string `json:"platform"`
}

VersionInfo entity

Jump to

Keyboard shortcuts

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