Documentation ¶
Index ¶
- func ModifyContainerV1(container corev1.Container, modSpec *ResourceModSpec) corev1.Container
- func ModifyPodTemplateV1(template corev1.PodTemplateSpec, modSpec *ResourceModSpec) corev1.PodTemplateSpec
- type DeploymentV1beta1Modifier
- type JobV1Modifier
- type MPIJobV1alpha1Modifier
- type MetaV1Modifier
- type ResourceModSpec
- type ResourceModifier
- type ResourceModifierInterface
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 ¶
func (m *DeploymentV1beta1Modifier) ModifyResource( res *unstructured.Unstructured, modSpec *ResourceModSpec) (*unstructured.Unstructured, error)
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 ¶
func (m *MPIJobV1alpha1Modifier) ModifyResource( res *unstructured.Unstructured, modSpec *ResourceModSpec) (*unstructured.Unstructured, error)
type MetaV1Modifier ¶
type MetaV1Modifier struct{}
func NewMetaV1Modifier ¶
func NewMetaV1Modifier() *MetaV1Modifier
func (*MetaV1Modifier) ModifyResource ¶
func (m *MetaV1Modifier) ModifyResource( res *unstructured.Unstructured, modSpec *ResourceModSpec) (*unstructured.Unstructured, error)
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 ¶
func (m *ResourceModifier) ModifyResource( res *unstructured.Unstructured, modSpec *ResourceModSpec) (*unstructured.Unstructured, error)
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
Click to show internal directories.
Click to hide internal directories.