kubernetes

package
v0.3.0-beta1 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = module.Descriptor{
	Kind: "kubernetes",
	Actions: []module.ActionDesc{
		{
			Name: module.CreateAction,
		},
		{
			Name: module.UpdateAction,
		},
	},
	DriverFactory: func(conf json.RawMessage) (module.Driver, error) {
		kd := &kubeDriver{}
		err := json.Unmarshal(conf, &kd)
		if err != nil {
			return nil, errors.ErrInvalid.WithMsgf("failed to unmarshal module config: %v", err)
		}
		return kd, nil
	},
}

Functions

This section is empty.

Types

type NodeAffinityMatchExpressions

type NodeAffinityMatchExpressions struct {
	RequiredDuringSchedulingIgnoredDuringExecution  []Preference         `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty"`
	PreferredDuringSchedulingIgnoredDuringExecution []WeightedPreference `json:"preferredDuringSchedulingIgnoredDuringExecution,omitempty"`
}

type Output

type Output struct {
	Configs     kube.Config                             `json:"configs"`
	ServerInfo  version.Info                            `json:"server_info"`
	Tolerations map[string][]Toleration                 `json:"tolerations"`
	Affinities  map[string]NodeAffinityMatchExpressions `json:"affinities"`
}

func (Output) JSON

func (out Output) JSON() []byte

type Preference

type Preference struct {
	Key      string   `json:"key" validate:"required"`
	Operator string   `json:"operator" validate:"required"`
	Values   []string `json:"values"`
}

type Toleration

type Toleration struct {
	Key      string `json:"key"`
	Value    string `json:"value"`
	Effect   string `json:"effect"`
	Operator string `json:"operator"`
}

type WeightedPreference

type WeightedPreference struct {
	Weight     int          `json:"weight" validate:"required"`
	Preference []Preference `json:"preference" validate:"required"`
}

Jump to

Keyboard shortcuts

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