versioned

package
v0.25.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2022 License: Apache-2.0 Imports: 11 Imported by: 25

Documentation

Index

Constants

View Source
const (
	// TODO(sig-cli): Enforce consistent naming for generators here.
	// See discussion in https://github.com/kubernetes/kubernetes/issues/46237
	// before you add any more.
	RunPodV1GeneratorName  = "run-pod/v1"
	ServiceV2GeneratorName = "service/v2"
)

Variables

GeneratorFn gives a way to easily override the function for unit testing if needed

Functions

func DefaultGenerators

func DefaultGenerators(cmdName string) map[string]generate.Generator

DefaultGenerators returns the set of default generators for use in Factory instances

func HandleResourceRequirementsV1

func HandleResourceRequirementsV1(params map[string]string) (v1.ResourceRequirements, error)

HandleResourceRequirementsV1 parses the limits and requests parameters if specified and returns ResourceRequirements.

Types

type BasicPod

type BasicPod struct{}

func (BasicPod) Generate

func (BasicPod) Generate(genericParams map[string]interface{}) (runtime.Object, error)

func (BasicPod) ParamNames

func (BasicPod) ParamNames() []generate.GeneratorParam

type ServiceGeneratorV1

type ServiceGeneratorV1 struct{}

The only difference between ServiceGeneratorV1 and V2 is that the service port is named "default" in V1, while it is left unnamed in V2.

func (ServiceGeneratorV1) Generate

func (ServiceGeneratorV1) Generate(params map[string]interface{}) (runtime.Object, error)

func (ServiceGeneratorV1) ParamNames

type ServiceGeneratorV2

type ServiceGeneratorV2 struct{}

func (ServiceGeneratorV2) Generate

func (ServiceGeneratorV2) Generate(params map[string]interface{}) (runtime.Object, error)

func (ServiceGeneratorV2) ParamNames

Jump to

Keyboard shortcuts

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