utils

package
v0.0.0-...-ff29d5a Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDeployment

func CreateDeployment(configPath string, deploymentName string, image string, replicas int32)

func DeleteDeployment

func DeleteDeployment(configPath string, deploymentName string)

func UpdateImage

func UpdateImage(configPath string, deploymentName string, image string)

func UpdateReplicas

func UpdateReplicas(configPath string, deploymentName string, replicas int32)

Types

type Cluster

type Cluster struct {
	Name          string
	ClusterConfig ClusterConfig `yaml:"cluster"`
}

Cluster configs

type ClusterConfig

type ClusterConfig struct {
	CertificateAuthority string `yaml:"certificate-authority"`
	Server               string
}

type Config

type Config struct {
	ApiVersion string `yaml:"apiVersion"`
	Kind       string `yaml:"kind"`

	Clusters []Cluster `yaml:"clusters"`
	Users    []User    `yaml:"users"`
	Contexts []Context `yaml: "contexts"`
}

func (*Config) Create

func (c *Config) Create(users []string, clusters []string, contexts []string)

func (*Config) Parse

func (c *Config) Parse() ([]byte, error)

type Context

type Context struct {
	Name          string
	ContextConfig ContextConfig `yaml:"context,omitempty"`
}

Context configs

type ContextConfig

type ContextConfig struct {
	ClusterName string `yaml:cluster`
	NameSpace   string
	User        string
}

type User

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

User configs

type UserCred

type UserCred struct {
	ClientCertificate string `yaml:"client-certificate"`
	ClientKey         string `yaml:"client-key"`
}

Jump to

Keyboard shortcuts

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