client

package
v0.1.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2021 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultNamespace = "kube-image"
)

Variables

View Source
var DefaultConfig = Config{
	Namespace: DefaultNamespace,
}

Functions

func Control

func Control(ctx context.Context, k8s *Interface, fn ControlFunc) error

func GetServiceAddress

func GetServiceAddress(_ context.Context, k8s *Interface, port string) (string, error)

func Images

func Images(ctx context.Context, k8s *Interface, fn ImagesFunc) error

func LoadOrGenCA

func LoadOrGenCA(secrets corectlv1.SecretClient, namespace, name string) (*x509.Certificate, crypto.Signer, error)

func LoadOrGenClientCert

func LoadOrGenClientCert(secrets corectlv1.SecretClient, namespace, name string, issuer *x509.Certificate, signer crypto.Signer, cn string) (*x509.Certificate, crypto.Signer, error)

func LoadOrGenServerCert

func LoadOrGenServerCert(secrets corectlv1.SecretClient, namespace, name string, issuer *x509.Certificate, signer crypto.Signer, cn string, orgs, domains []string, ips []net.IP) (*x509.Certificate, crypto.Signer, error)

Types

type Config

type Config struct {
	Namespace  string `usage:"namespace" short:"n" env:"NAMESPACE" default:"kube-image"`
	Kubeconfig string `usage:"kubeconfig for authentication" short:"k" env:"KUBECONFIG"`
	Context    string `usage:"kubeconfig context for authentication" short:"x" env:"KUBECONTEXT"`
}

func (*Config) Interface

func (c *Config) Interface() (*Interface, error)

type ControlFunc

type ControlFunc func(context.Context, *buildkit.Client) error

type ImagesFunc

type ImagesFunc func(context.Context, imagesv1.ImagesClient) error

type Interface

type Interface struct {
	Core      corectlv1.Interface
	Apps      appsctlv1.Interface
	RBAC      rbacctlv1.Interface
	Apply     apply.Apply
	Namespace string
}

func NewInterface

func NewInterface(kubecfg, kubectx, kubens string) (*Interface, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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