k8sdoc

package
v1.108.13 Latest Latest
Warning

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

Go to latest
Published: May 5, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	Image string `yaml:"image"`
}

type Doc

type Doc struct {
	APIVersion string   `yaml:"apiVersion"`
	Kind       string   `yaml:"kind"`
	Metadata   Metadata `yaml:"metadata"`
	Spec       Spec     `yaml:"spec"`
}

func (*Doc) ListImages

func (d *Doc) ListImages() []string

func (*Doc) PatchWithPullSecret

func (d *Doc) PatchWithPullSecret(secret *corev1.Secret) K8sDoc

type ImagePullSecret

type ImagePullSecret map[string]string

type JobSpec

type JobSpec struct {
	Template Template `yaml:"template"`
}

type JobTemplate

type JobTemplate struct {
	Spec JobSpec `yaml:"spec"`
}

type K8sDoc

type K8sDoc interface {
	PatchWithPullSecret(secret *corev1.Secret) K8sDoc
	ListImages() []string
}

func ParseYAML

func ParseYAML(yamlDoc []byte) (K8sDoc, error)

type Metadata

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

type PodDoc

type PodDoc struct {
	APIVersion string   `yaml:"apiVersion"`
	Kind       string   `yaml:"kind"`
	Metadata   Metadata `yaml:"metadata"`
	Spec       PodSpec  `yaml:"spec"`
}

func (*PodDoc) ListImages

func (d *PodDoc) ListImages() []string

func (*PodDoc) PatchWithPullSecret

func (d *PodDoc) PatchWithPullSecret(secret *corev1.Secret) K8sDoc

type PodSpec

type PodSpec struct {
	Containers       []Container       `yaml:"containers,omitempty"`     // don't write empty array into patches
	InitContainers   []Container       `yaml:"initContainers,omitempty"` // don't write empty array into patches
	ImagePullSecrets []ImagePullSecret `yaml:"imagePullSecrets"`
}

type Spec

type Spec struct {
	Template    Template    `yaml:"template,omitempty"`
	JobTemplate JobTemplate `yaml:"jobTemplate,omitempty"`
}

type Template

type Template struct {
	Spec PodSpec `yaml:"spec"`
}

Jump to

Keyboard shortcuts

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