client

package
v0.0.0-...-477358a Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2021 License: Apache-2.0 Imports: 50 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsCRD

func IsCRD(content []byte) bool

func IsNamespace

func IsNamespace(content []byte) bool

Types

type ApplicationManifests

type ApplicationManifests struct {
	AppID                string                `json:"app_id"`
	AppSlug              string                `json:"app_slug"`
	KubectlVersion       string                `json:"kubectl_version"`
	AdditionalNamespaces []string              `json:"additional_namespaces"`
	ImagePullSecret      string                `json:"image_pull_secret"`
	Namespace            string                `json:"namespace"`
	PreviousManifests    string                `json:"previous_manifests"`
	Manifests            string                `json:"manifests"`
	PreviousCharts       []byte                `json:"previous_charts"`
	Charts               []byte                `json:"charts"`
	Wait                 bool                  `json:"wait"`
	ResultCallback       string                `json:"result_callback"`
	ClearNamespaces      []string              `json:"clear_namespaces"`
	ClearPVCs            bool                  `json:"clear_pvcs"`
	AnnotateSlug         bool                  `json:"annotate_slug"`
	IsRestore            bool                  `json:"is_restore"`
	RestoreLabelSelector *metav1.LabelSelector `json:"restore_label_selector"`
}

type Client

type Client struct {
	APIEndpoint     string
	Token           string
	TargetNamespace string

	HookStopChans []chan struct{}

	ExistingInformers map[string]bool // namespaces map to invoke the Informer once during deploy
	// contains filtered or unexported fields
}

func (*Client) Run

func (c *Client) Run() error

Run is the main entrypoint of the operator when running in standard, normal operations

type DesiredState

type DesiredState struct {
	Present []ApplicationManifests `json:"present"`
	Missing map[string][]string    `json:"missing"`
}

DesiredState is what we receive from the kotsadm-api server

type InformRequest

type InformRequest struct {
	AppID     string                       `json:"app_id"`
	Sequence  int64                        `json:"sequence"`
	Informers []types.StatusInformerString `json:"informers"`
}

type OverlySimpleGVKWithName

type OverlySimpleGVKWithName struct {
	APIVersion string               `yaml:"apiVersion"`
	Kind       string               `yaml:"kind"`
	Metadata   OverlySimpleMetadata `yaml:"metadata"`
}

func GetGVKWithNameAndNs

func GetGVKWithNameAndNs(content []byte, baseNS string) (string, OverlySimpleGVKWithName)

type OverlySimpleMetadata

type OverlySimpleMetadata struct {
	Name      string            `yaml:"name"`
	Namespace string            `yaml:"namespace"`
	Labels    map[string]string `yaml:"labels,omitempty"`
}

Jump to

Keyboard shortcuts

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