kubeutil

package module
v0.0.0-...-32ef740 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KubeConfig

type KubeConfig struct {
	ApiVersion string `json:"apiVersion"`

	Kind string `json:"kind"`

	Kubectx string `json:"kubectx"`

	Namespace string `json:"namespace"`

	Environment string `json:"environment"`

	Name string `json:"name"`

	ManifestDirectory string `json:"manifestDirectory"`
}

func (*KubeConfig) GetEnvironment

func (k *KubeConfig) GetEnvironment() string

func (*KubeConfig) GetKubectx

func (k *KubeConfig) GetKubectx() string

func (*KubeConfig) GetManifestDirectory

func (k *KubeConfig) GetManifestDirectory() string

func (*KubeConfig) GetName

func (k *KubeConfig) GetName() string

func (*KubeConfig) GetNamespace

func (k *KubeConfig) GetNamespace() string

func (*KubeConfig) New

func (k *KubeConfig) New(conf KubeConfig) error

func (*KubeConfig) SupportedCommand

func (k *KubeConfig) SupportedCommand(cmd string) bool

func (*KubeConfig) SupportedKind

func (k *KubeConfig) SupportedKind(kind string) bool

func (*KubeConfig) SupportedResource

func (k *KubeConfig) SupportedResource(resource string) bool

func (*KubeConfig) SupportedVersion

func (k *KubeConfig) SupportedVersion(version string) bool

func (*KubeConfig) ValidContext

func (k *KubeConfig) ValidContext(ctx string) bool

func (*KubeConfig) ValidManifestDirectory

func (k *KubeConfig) ValidManifestDirectory(dir string) error

type KubeUser

type KubeUser struct {
	// CustomerID - required
	CustomerID int

	// UserID requesting sync
	UserID string

	// Kind being synced
	Kind string

	// AuthorizationToken - Optional
	AuthorizationToken string

	// ReferenceID - user assigned ID for debugging
	ReferenceID string
}

KubeUser

Is used to label manifests and authenticate requests

func (*KubeUser) GenerateLables

func (ku *KubeUser) GenerateLables() []Label

func (*KubeUser) IsValid

func (ku *KubeUser) IsValid() bool

func (*KubeUser) New

func (ku *KubeUser) New(customer int, user, id string) bool

type KubeUtil

type KubeUtil struct {
	// contains filtered or unexported fields
}

func (*KubeUtil) ExecWithContext

func (k *KubeUtil) ExecWithContext(
	ctx context.Context,
	conf *KubeConfig,
	user KubeUser,
	cmd string,
	manifest []byte,
	filename string) error

func (*KubeUtil) LabelManifest

func (k *KubeUtil) LabelManifest()

type Label

type Label struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

Jump to

Keyboard shortcuts

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