mod

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ModifyContainerV1

func ModifyContainerV1(container corev1.Container, modSpec *ResourceModSpec) corev1.Container

ModifyContainerV1 modifies a container with given changes

func ModifyPodTemplateV1

func ModifyPodTemplateV1(template corev1.PodTemplateSpec, modSpec *ResourceModSpec) corev1.PodTemplateSpec

ModifyPodTemplateV1 modifies a pod template with given changes

Types

type DeploymentV1beta1Modifier

type DeploymentV1beta1Modifier struct{}

func (*DeploymentV1beta1Modifier) ModifyResource

type JobV1Modifier

type JobV1Modifier struct{}

func (*JobV1Modifier) ModifyResource

func (m *JobV1Modifier) ModifyResource(
	res *unstructured.Unstructured,
	modSpec *ResourceModSpec) (*unstructured.Unstructured, error)

type MPIJobV1alpha1Modifier

type MPIJobV1alpha1Modifier struct{}

func (*MPIJobV1alpha1Modifier) ModifyResource

type MetaV1Modifier

type MetaV1Modifier struct{}

func NewMetaV1Modifier

func NewMetaV1Modifier() *MetaV1Modifier

func (*MetaV1Modifier) ModifyResource

type ResourceModSpec

type ResourceModSpec struct {
	Namespace       string                  `json:"namespace"`
	OwnerReferences []metav1.OwnerReference `json:"ownerReferences"`
	Labels          map[string]string       `json:"labels,omitempty"`
	Volumes         []corev1.Volume         `json:"volumes,omitempty"`
	VolumeMounts    []corev1.VolumeMount    `json:"volumeMounts,omitempty"`
	Env             []corev1.EnvVar         `json:"envVars,omitempty"`
}

ResourceModSpec is the spec of a resource modification

type ResourceModifier

type ResourceModifier struct{}

func (*ResourceModifier) ModifyResource

type ResourceModifierInterface

type ResourceModifierInterface interface {
	ModifyResource(res *unstructured.Unstructured, modSpec *ResourceModSpec) (*unstructured.Unstructured, error)
}

func NewDeploymentV1beta1Modifier

func NewDeploymentV1beta1Modifier() ResourceModifierInterface

func NewJobV1Modifier

func NewJobV1Modifier() ResourceModifierInterface

func NewMPIJobV1alpha1Modifier

func NewMPIJobV1alpha1Modifier() ResourceModifierInterface

func NewResourceModifier

func NewResourceModifier() ResourceModifierInterface

Jump to

Keyboard shortcuts

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