k8s

package
v0.0.0-...-9135743 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: BSD-2-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func YamlToStruct

func YamlToStruct(reader io.Reader, writer io.Writer) error

Types

type AccessMode

type AccessMode string

func (AccessMode) String

func (a AccessMode) String() string

func (AccessMode) Validate

func (a AccessMode) Validate(ctx context.Context) error

type Affinity

type Affinity struct {
	NodeAffinity    NodeAffinity    `yaml:"nodeAffinity,omitempty"`
	PodAffinity     PodAffinity     `yaml:"podAffinity,omitempty"`
	PodAntiAffinity PodAntiAffinity `yaml:"podAntiAffinity,omitempty"`
}

type Annotations

type Annotations map[string]string

type ApiVersion

type ApiVersion string

func (ApiVersion) Validate

func (a ApiVersion) Validate(ctx context.Context) error

type Arg

type Arg string

type ClusterIP

type ClusterIP string

func (ClusterIP) String

func (s ClusterIP) String() string

func (ClusterIP) Validate

func (s ClusterIP) Validate(ctx context.Context) error

type ClusterName

type ClusterName string

func (ClusterName) Validate

func (s ClusterName) Validate(ctx context.Context) error

type ClusterRole

type ClusterRole struct {
	ApiVersion ApiVersion   `yaml:"apiVersion,omitempty"`
	Kind       Kind         `yaml:"kind,omitempty"`
	Metadata   Metadata     `yaml:"metadata,omitempty"`
	Rules      []PolicyRule `yaml:"rules,omitempty"`
}

func (ClusterRole) String

func (c ClusterRole) String() string

func (ClusterRole) Validate

func (c ClusterRole) Validate(ctx context.Context) error

type ClusterRoleApplier

type ClusterRoleApplier struct {
	Context     Context
	ClusterRole ClusterRole
}

func (*ClusterRoleApplier) Apply

func (c *ClusterRoleApplier) Apply(ctx context.Context) error

func (*ClusterRoleApplier) Satisfied

func (c *ClusterRoleApplier) Satisfied(ctx context.Context) (bool, error)

func (*ClusterRoleApplier) Validate

func (c *ClusterRoleApplier) Validate(ctx context.Context) error

type ClusterRoleBinding

type ClusterRoleBinding struct {
	ApiVersion ApiVersion `yaml:"apiVersion"`
	Kind       Kind       `yaml:"kind"`
	Metadata   Metadata   `yaml:"metadata"`
	Subjects   []Subject  `yaml:"subjects"`
	RoleRef    RoleRef    `yaml:"roleRef"`
}

func (ClusterRoleBinding) String

func (n ClusterRoleBinding) String() string

func (ClusterRoleBinding) Validate

func (s ClusterRoleBinding) Validate(ctx context.Context) error

type ClusterRoleBindingApplier

type ClusterRoleBindingApplier struct {
	Context            Context
	ClusterRoleBinding ClusterRoleBinding
}

func (*ClusterRoleBindingApplier) Apply

func (*ClusterRoleBindingApplier) Satisfied

func (s *ClusterRoleBindingApplier) Satisfied(ctx context.Context) (bool, error)

func (*ClusterRoleBindingApplier) Validate

type ClusterRoleBindingConfiguration

type ClusterRoleBindingConfiguration struct {
	Context            Context
	ClusterRoleBinding ClusterRoleBinding
	Requirements       []world.Configuration
}

func (*ClusterRoleBindingConfiguration) Applier

func (*ClusterRoleBindingConfiguration) Children

func (*ClusterRoleBindingConfiguration) Validate

type ClusterRoleBindingName

type ClusterRoleBindingName string

func (ClusterRoleBindingName) String

func (n ClusterRoleBindingName) String() string

func (ClusterRoleBindingName) Validate

func (a ClusterRoleBindingName) Validate(ctx context.Context) error

type ClusterRoleConfiguration

type ClusterRoleConfiguration struct {
	Context      Context
	ClusterRole  ClusterRole
	Requirements []world.Configuration
}

func (*ClusterRoleConfiguration) Applier

func (c *ClusterRoleConfiguration) Applier() (world.Applier, error)

func (*ClusterRoleConfiguration) Children

func (*ClusterRoleConfiguration) Validate

func (c *ClusterRoleConfiguration) Validate(ctx context.Context) error

type ClusterRoleName

type ClusterRoleName string

func (ClusterRoleName) String

func (c ClusterRoleName) String() string

func (ClusterRoleName) Validate

func (c ClusterRoleName) Validate(ctx context.Context) error

type Command

type Command string

type ConfigMap

type ConfigMap struct {
	ApiVersion ApiVersion    `yaml:"apiVersion"`
	Kind       Kind          `yaml:"kind"`
	Metadata   Metadata      `yaml:"metadata"`
	Data       ConfigMapData `yaml:"data"`
}

func (ConfigMap) String

func (c ConfigMap) String() string

func (ConfigMap) Validate

func (c ConfigMap) Validate(ctx context.Context) error

type ConfigMapApplier

type ConfigMapApplier struct {
	Context   Context
	ConfigMap ConfigMap
}

func (*ConfigMapApplier) Apply

func (s *ConfigMapApplier) Apply(ctx context.Context) error

func (*ConfigMapApplier) Satisfied

func (s *ConfigMapApplier) Satisfied(ctx context.Context) (bool, error)

func (*ConfigMapApplier) Validate

func (s *ConfigMapApplier) Validate(ctx context.Context) error

type ConfigMapConfiguration

type ConfigMapConfiguration struct {
	Context      Context
	ConfigMap    ConfigMap
	Requirements []world.Configuration
}

func (*ConfigMapConfiguration) Applier

func (d *ConfigMapConfiguration) Applier() (world.Applier, error)

func (*ConfigMapConfiguration) Children

func (*ConfigMapConfiguration) Validate

func (d *ConfigMapConfiguration) Validate(ctx context.Context) error

type ConfigMapData

type ConfigMapData map[string]string

func (ConfigMapData) Validate

func (d ConfigMapData) Validate(ctx context.Context) error

type ConfigMapKeyRef

type ConfigMapKeyRef struct {
	Key  string `yaml:"key"`
	Name string `yaml:"name"`
}

type ConfigMapType

type ConfigMapType string

type Container

type Container struct {
	Name            ContainerName    `yaml:"name"`
	Image           Image            `yaml:"image"`
	Command         []Command        `yaml:"command,omitempty"`
	Args            []Arg            `yaml:"args,omitempty"`
	Env             []Env            `yaml:"env,omitempty"`
	Ports           ContainerPorts   `yaml:"ports,omitempty"`
	Resources       Resources        `yaml:"resources,omitempty"`
	VolumeMounts    []ContainerMount `yaml:"volumeMounts,omitempty"`
	ReadinessProbe  Probe            `yaml:"readinessProbe,omitempty"`
	LivenessProbe   Probe            `yaml:"livenessProbe,omitempty"`
	SecurityContext SecurityContext  `yaml:"securityContext,omitempty"`
	ImagePullPolicy ImagePullPolicy  `yaml:"imagePullPolicy,omitempty"`
}

func (Container) Validate

func (c Container) Validate(ctx context.Context) error

type ContainerMount

type ContainerMount struct {
	Path     ContainerMountPath     `yaml:"mountPath"`
	Name     MountName              `yaml:"name"`
	ReadOnly ContainerMountReadOnly `yaml:"readOnly"`
}

type ContainerMountPath

type ContainerMountPath string

type ContainerMountReadOnly

type ContainerMountReadOnly bool

type ContainerName

type ContainerName string

type ContainerPort

type ContainerPort struct {
	ContainerPort PortNumber   `yaml:"containerPort,omitempty"`
	HostPort      PortNumber   `yaml:"hostPort,omitempty"`
	Name          PortName     `yaml:"name,omitempty"`
	Protocol      PortProtocol `yaml:"protocol,omitempty"`
}

type ContainerPorts

type ContainerPorts []ContainerPort

func (ContainerPorts) Validate

func (c ContainerPorts) Validate(ctx context.Context) error

type ContainerResource

type ContainerResource struct {
	Cpu    CpuLimit    `yaml:"cpu"`
	Memory MemoryLimit `yaml:"memory"`
}

func (ContainerResource) Validate

func (c ContainerResource) Validate(ctx context.Context) error

type Context

type Context string

func (Context) String

func (c Context) String() string

func (Context) Validate

func (c Context) Validate(ctx context.Context) error

type CpuLimit

type CpuLimit string

func (CpuLimit) Validate

func (c CpuLimit) Validate(ctx context.Context) error

type DaemonSet

type DaemonSet struct {
	ApiVersion ApiVersion    `yaml:"apiVersion"`
	Kind       Kind          `yaml:"kind"`
	Metadata   Metadata      `yaml:"metadata"`
	Spec       DaemonSetSpec `yaml:"spec"`
}

func (DaemonSet) String

func (s DaemonSet) String() string

func (DaemonSet) Validate

func (d DaemonSet) Validate(ctx context.Context) error

type DaemonSetApplier

type DaemonSetApplier struct {
	Context   Context
	DaemonSet DaemonSet
}

func (*DaemonSetApplier) Apply

func (s *DaemonSetApplier) Apply(ctx context.Context) error

func (*DaemonSetApplier) Satisfied

func (s *DaemonSetApplier) Satisfied(ctx context.Context) (bool, error)

func (*DaemonSetApplier) Validate

func (s *DaemonSetApplier) Validate(ctx context.Context) error

type DaemonSetConfiguration

type DaemonSetConfiguration struct {
	Context      Context
	DaemonSet    DaemonSet
	Requirements []world.Configuration
}

func (*DaemonSetConfiguration) Applier

func (d *DaemonSetConfiguration) Applier() (world.Applier, error)

func (*DaemonSetConfiguration) Children

func (*DaemonSetConfiguration) Validate

func (d *DaemonSetConfiguration) Validate(ctx context.Context) error

type DaemonSetSpec

type DaemonSetSpec struct {
	Selector LabelSelector `yaml:"selector,omitempty"`
	Template PodTemplate   `yaml:"template"`
}

func (DaemonSetSpec) Validate

func (d DaemonSetSpec) Validate(ctx context.Context) error

type Deployer

type Deployer struct {
	Context Context
	Data    interface {
		String() string
	}
}

func (*Deployer) Apply

func (d *Deployer) Apply(ctx context.Context) error

type Deployment

type Deployment struct {
	ApiVersion ApiVersion     `yaml:"apiVersion"`
	Kind       Kind           `yaml:"kind"`
	Metadata   Metadata       `yaml:"metadata"`
	Spec       DeploymentSpec `yaml:"spec"`
}

func (Deployment) String

func (s Deployment) String() string

func (Deployment) Validate

func (s Deployment) Validate(ctx context.Context) error

type DeploymentApplier

type DeploymentApplier struct {
	Context    Context
	Deployment Deployment
}

func (*DeploymentApplier) Apply

func (s *DeploymentApplier) Apply(ctx context.Context) error

func (*DeploymentApplier) Satisfied

func (s *DeploymentApplier) Satisfied(ctx context.Context) (bool, error)

func (*DeploymentApplier) Validate

func (s *DeploymentApplier) Validate(ctx context.Context) error

type DeploymentConfiguration

type DeploymentConfiguration struct {
	Context      Context
	Deployment   Deployment
	Requirements []world.Configuration
}

func (*DeploymentConfiguration) Applier

func (d *DeploymentConfiguration) Applier() (world.Applier, error)

func (*DeploymentConfiguration) Children

func (*DeploymentConfiguration) Validate

func (d *DeploymentConfiguration) Validate(ctx context.Context) error

type DeploymentMaxSurge

type DeploymentMaxSurge int

type DeploymentMaxUnavailable

type DeploymentMaxUnavailable int

type DeploymentRevisionHistoryLimit

type DeploymentRevisionHistoryLimit int

type DeploymentSpec

type DeploymentSpec struct {
	Replicas             Replicas                       `yaml:"replicas"`
	RevisionHistoryLimit DeploymentRevisionHistoryLimit `yaml:"revisionHistoryLimit"`
	Selector             LabelSelector                  `yaml:"selector,omitempty"`
	Strategy             DeploymentStrategy             `yaml:"strategy"`
	Template             PodTemplate                    `yaml:"template"`
}

func (DeploymentSpec) Validate

func (d DeploymentSpec) Validate(ctx context.Context) error

type DeploymentStrategy

type DeploymentStrategy struct {
	Type          DeploymentStrategyType          `yaml:"type"`
	RollingUpdate DeploymentStrategyRollingUpdate `yaml:"rollingUpdate,omitempty"`
}

type DeploymentStrategyRollingUpdate

type DeploymentStrategyRollingUpdate struct {
	MaxSurge       DeploymentMaxSurge       `yaml:"maxSurge,omitempty"`
	MaxUnavailable DeploymentMaxUnavailable `yaml:"maxUnavailable,omitempty"`
}

type DeploymentStrategyType

type DeploymentStrategyType string

type Env

type Env struct {
	Name      string    `yaml:"name"`
	Value     string    `yaml:"value,omitempty"`
	ValueFrom ValueFrom `yaml:"valueFrom,omitempty"`
}

type Exec

type Exec struct {
	Command []Command `yaml:"command,omitempty"`
}

type FieldRef

type FieldRef struct {
	FieldPath string `yaml:"fieldPath"`
}

type HttpGet

type HttpGet struct {
	Host   string     `yaml:"host,omitempty"`
	Path   string     `yaml:"path,omitempty"`
	Port   PortNumber `yaml:"port,omitempty"`
	Scheme string     `yaml:"scheme,omitempty"`
}

type Image

type Image string

type ImagePullPolicy

type ImagePullPolicy string

type Ingress

type Ingress struct {
	ApiVersion ApiVersion  `yaml:"apiVersion"`
	Kind       Kind        `yaml:"kind"`
	Metadata   Metadata    `yaml:"metadata"`
	Spec       IngressSpec `yaml:"spec"`
}

func (Ingress) String

func (s Ingress) String() string

func (Ingress) Validate

func (s Ingress) Validate(ctx context.Context) error

type IngressApplier

type IngressApplier struct {
	Context Context
	Ingress Ingress
}

func (*IngressApplier) Apply

func (i *IngressApplier) Apply(ctx context.Context) error

func (*IngressApplier) Satisfied

func (i *IngressApplier) Satisfied(ctx context.Context) (bool, error)

func (*IngressApplier) Validate

func (i *IngressApplier) Validate(ctx context.Context) error

type IngressBackend

type IngressBackend struct {
	ServiceName IngressBackendServiceName `yaml:"serviceName"`
	ServicePort IngressBackendServicePort `yaml:"servicePort"`
}

type IngressBackendServiceName

type IngressBackendServiceName string

type IngressBackendServicePort

type IngressBackendServicePort string

type IngressHost

type IngressHost string

func (IngressHost) String

func (i IngressHost) String() string

func (IngressHost) Validate

func (i IngressHost) Validate(ctx context.Context) error

type IngressHosts

type IngressHosts []IngressHost

func (IngressHosts) Validate

func (i IngressHosts) Validate(ctx context.Context) error

type IngressHttp

type IngressHttp struct {
	Paths []IngressPath `yaml:"paths"`
}

type IngressPath

type IngressPath struct {
	Backends IngressBackend  `yaml:"backend"`
	Path     IngressPathPath `yaml:"path"`
}

type IngressPathPath

type IngressPathPath string

type IngressRule

type IngressRule struct {
	Host IngressHost `yaml:"host"`
	Http IngressHttp `yaml:"http"`
}

type IngressSpec

type IngressSpec struct {
	Rules []IngressRule `yaml:"rules"`
	TLS   []IngressTLS  `yaml:"tls,omitempty"`
}

func (IngressSpec) Validate

func (i IngressSpec) Validate(ctx context.Context) error

type IngressTLS

type IngressTLS struct {
	Hosts      []string `yaml:"hosts,omitempty"`
	SecretName string   `yaml:"secretName,omitempty"`
}

func (IngressTLS) Validate

func (i IngressTLS) Validate(ctx context.Context) error

type IngresseConfiguration

type IngresseConfiguration struct {
	Context      Context
	Ingress      Ingress
	Requirements []world.Configuration
}

func BuildIngressConfigurationWithCertManager

func BuildIngressConfigurationWithCertManager(
	context Context,
	namespace NamespaceName,
	name MetadataName,
	serviceName IngressBackendServiceName,
	servicePort IngressBackendServicePort,
	path IngressPathPath,
	hosts ...IngressHost,
) *IngresseConfiguration

func (*IngresseConfiguration) Applier

func (i *IngresseConfiguration) Applier() (world.Applier, error)

func (*IngresseConfiguration) Children

func (*IngresseConfiguration) Validate

func (i *IngresseConfiguration) Validate(ctx context.Context) error

type Kind

type Kind string

func (Kind) Validate

func (k Kind) Validate(ctx context.Context) error

type LabelSelector

type LabelSelector struct {
	MatchLabels Labels `yaml:"matchLabels,omitempty"`
}

func (LabelSelector) Validate

func (d LabelSelector) Validate(ctx context.Context) error

type Labels

type Labels map[string]string

type MemoryLimit

type MemoryLimit string

func (MemoryLimit) Validate

func (m MemoryLimit) Validate(ctx context.Context) error

type Metadata

type Metadata struct {
	Namespace   NamespaceName `yaml:"namespace,omitempty"`
	Name        MetadataName  `yaml:"name,omitempty"`
	Labels      Labels        `yaml:"labels,omitempty"`
	Annotations Annotations   `yaml:"annotations,omitempty"`
}

func (Metadata) String

func (m Metadata) String() string

func (Metadata) Validate

func (m Metadata) Validate(ctx context.Context) error

type MetadataName

type MetadataName string

func (MetadataName) String

func (m MetadataName) String() string

func (MetadataName) Validate

func (m MetadataName) Validate(ctx context.Context) error

type MountName

type MountName string

func (MountName) Validate

func (m MountName) Validate(ctx context.Context) error

type Namespace

type Namespace struct {
	ApiVersion ApiVersion `yaml:"apiVersion"`
	Kind       Kind       `yaml:"kind"`
	Metadata   Metadata   `yaml:"metadata"`
}

func (Namespace) String

func (n Namespace) String() string

func (Namespace) Validate

func (s Namespace) Validate(ctx context.Context) error

type NamespaceApplier

type NamespaceApplier struct {
	Context   Context
	Namespace Namespace
}

func (*NamespaceApplier) Apply

func (s *NamespaceApplier) Apply(ctx context.Context) error

func (*NamespaceApplier) Satisfied

func (s *NamespaceApplier) Satisfied(ctx context.Context) (bool, error)

func (*NamespaceApplier) Validate

func (s *NamespaceApplier) Validate(ctx context.Context) error

type NamespaceConfiguration

type NamespaceConfiguration struct {
	Context      Context
	Namespace    Namespace
	Requirements []world.Configuration
}

func (*NamespaceConfiguration) Applier

func (d *NamespaceConfiguration) Applier() (world.Applier, error)

func (*NamespaceConfiguration) Children

func (*NamespaceConfiguration) Validate

func (d *NamespaceConfiguration) Validate(ctx context.Context) error

type NamespaceName

type NamespaceName string

func (NamespaceName) String

func (n NamespaceName) String() string

func (NamespaceName) Validate

func (a NamespaceName) Validate(ctx context.Context) error

type NodeAffinity

type NodeAffinity struct {
	PreferredDuringSchedulingIgnoredDuringExecution []PreferredSchedulingTerm `yaml:"preferredDuringSchedulingIgnoredDuringExecution,omitempty"`
	RequiredDuringSchedulingIgnoredDuringExecution  NodeSelector              `yaml:"requiredDuringSchedulingIgnoredDuringExecution,omitempty"`
}

type NodeSelector

type NodeSelector struct {
	NodeSelectorTerms []NodeSelectorTerm `yaml:"nodeSelectorTerms,omitempty"`
}

type NodeSelectorRequirement

type NodeSelectorRequirement struct {
	Key      string   `yaml:"key,omitempty"`
	Operator string   `yaml:"operator,omitempty"`
	Values   []string `yaml:"values,omitempty"`
}

type NodeSelectorTerm

type NodeSelectorTerm struct {
	MatchExpressions []NodeSelectorRequirement `yaml:"matchExpressions,omitempty"`
	MatchFields      []NodeSelectorRequirement `yaml:"matchFields,omitempty"`
}

type PodAffinity

type PodAffinity struct {
	PreferredDuringSchedulingIgnoredDuringExecution WeightedPodAffinityTerm `yaml:"preferredDuringSchedulingIgnoredDuringExecution,omitempty"`
	RequiredDuringSchedulingIgnoredDuringExecution  PodAffinityTerm         `yaml:"requiredDuringSchedulingIgnoredDuringExecution,omitempty"`
}

type PodAffinityTerm

type PodAffinityTerm struct {
	LabelSelector LabelSelector `yaml:"labelSelector,omitempty"`
	Namespaces    string        `yaml:"namespaces,omitempty"`
	TopologyKey   string        `yaml:"topologyKey,omitempty"`
}

type PodAntiAffinity

type PodAntiAffinity struct {
	PreferredDuringSchedulingIgnoredDuringExecution WeightedPodAffinityTerm `yaml:"preferredDuringSchedulingIgnoredDuringExecution,omitempty"`
	RequiredDuringSchedulingIgnoredDuringExecution  PodAffinityTerm         `yaml:"requiredDuringSchedulingIgnoredDuringExecution,omitempty"`
}

type PodConfigMapItem

type PodConfigMapItem struct {
	Key  PodConfigMapItemKey  `yaml:"key"`
	Path PodConfigMapItemPath `yaml:"path"`
}

type PodConfigMapItemKey

type PodConfigMapItemKey string

type PodConfigMapItemPath

type PodConfigMapItemPath string

type PodConfigMapName

type PodConfigMapName string

type PodDisruptionBudget

type PodDisruptionBudget struct {
	ApiVersion ApiVersion              `yaml:"apiVersion"`
	Kind       Kind                    `yaml:"kind"`
	Metadata   Metadata                `yaml:"metadata"`
	Spec       PodDisruptionBudgetSpec `yaml:"spec"`
}

func (PodDisruptionBudget) String

func (s PodDisruptionBudget) String() string

func (PodDisruptionBudget) Validate

func (s PodDisruptionBudget) Validate(ctx context.Context) error

type PodDisruptionBudgetApplier

type PodDisruptionBudgetApplier struct {
	Context             Context
	PodDisruptionBudget PodDisruptionBudget
}

func (*PodDisruptionBudgetApplier) Apply

func (*PodDisruptionBudgetApplier) Satisfied

func (s *PodDisruptionBudgetApplier) Satisfied(ctx context.Context) (bool, error)

func (*PodDisruptionBudgetApplier) Validate

type PodDisruptionBudgetConfiguration

type PodDisruptionBudgetConfiguration struct {
	Context             Context
	PodDisruptionBudget PodDisruptionBudget
	Requirements        []world.Configuration
}

func (*PodDisruptionBudgetConfiguration) Applier

func (*PodDisruptionBudgetConfiguration) Children

func (*PodDisruptionBudgetConfiguration) Validate

type PodDisruptionBudgetSpec

type PodDisruptionBudgetSpec struct {
	MaxUnavailable int           `yaml:"maxUnavailable,omitempty"`
	MinAvailable   int           `yaml:"minAvailable,omitempty"`
	Selector       LabelSelector `yaml:"selector"`
}

type PodDnsPolicy

type PodDnsPolicy string

type PodHostNetwork

type PodHostNetwork bool

type PodHostPID

type PodHostPID bool

type PodHostPath

type PodHostPath string

func (PodHostPath) String

func (p PodHostPath) String() string

func (PodHostPath) Validate

func (p PodHostPath) Validate(ctx context.Context) error

type PodNfsPath

type PodNfsPath string

func (PodNfsPath) Validate

func (d PodNfsPath) Validate(ctx context.Context) error

type PodNfsServer

type PodNfsServer string

func (PodNfsServer) Validate

func (d PodNfsServer) Validate(ctx context.Context) error

type PodSecretItem

type PodSecretItem struct {
	Key  PodSecretItemKey  `yaml:"key,omitempty"`
	Mode PodSecretItemMode `yaml:"mode,omitempty"`
	Path PodSecretItemPath `yaml:"path,omitempty"`
}

type PodSecretItemKey

type PodSecretItemKey string

type PodSecretItemMode

type PodSecretItemMode int

type PodSecretItemPath

type PodSecretItemPath string

type PodSecretName

type PodSecretName string

type PodSpec

type PodSpec struct {
	Tolerations                   []Toleration    `yaml:"tolerations,omitempty"`
	Containers                    []Container     `yaml:"containers,omitempty"`
	Volumes                       []PodVolume     `yaml:"volumes,omitempty"`
	HostNetwork                   PodHostNetwork  `yaml:"hostNetwork,omitempty"`
	HostPid                       PodHostPID      `yaml:"hostPID,omitempty"`
	DnsPolicy                     PodDnsPolicy    `yaml:"dnsPolicy,omitempty"`
	SecurityContext               SecurityContext `yaml:"securityContext,omitempty"`
	ServiceAccountName            string          `yaml:"serviceAccountName,omitempty"`
	TerminationGracePeriodSeconds int             `yaml:"terminationGracePeriodSeconds,omitempty"`
	Affinity                      Affinity        `yaml:"affinity,omitempty"`
}

func (PodSpec) Validate

func (c PodSpec) Validate(ctx context.Context) error

type PodTemplate

type PodTemplate struct {
	Metadata Metadata `yaml:"metadata"`
	Spec     PodSpec  `yaml:"spec"`
}

func (PodTemplate) Validate

func (p PodTemplate) Validate(ctx context.Context) error

type PodVolume

type PodVolume struct {
	Name      MountName          `yaml:"name"`
	Nfs       PodVolumeNfs       `yaml:"nfs,omitempty"`
	Host      PodVolumeHost      `yaml:"hostPath,omitempty"`
	ConfigMap PodVolumeConfigMap `yaml:"configMap,omitempty"`
	Secret    PodVolumeSecret    `yaml:"secret,omitempty"`
	EmptyDir  *PodVolumeEmptyDir `yaml:"emptyDir,omitempty"`
}

type PodVolumeConfigMap

type PodVolumeConfigMap struct {
	Name  PodConfigMapName   `yaml:"name"`
	Items []PodConfigMapItem `yaml:"items"`
}

type PodVolumeEmptyDir

type PodVolumeEmptyDir struct{}

type PodVolumeHost

type PodVolumeHost struct {
	Path PodHostPath `yaml:"path"`
}

type PodVolumeNfs

type PodVolumeNfs struct {
	Path   PodNfsPath   `yaml:"path"`
	Server PodNfsServer `yaml:"server"`
}

type PodVolumeSecret

type PodVolumeSecret struct {
	Name  PodSecretName   `yaml:"secretName"`
	Items []PodSecretItem `yaml:"items"`
}

type PolicyRule

type PolicyRule struct {
	ApiGroups       []string `yaml:"apiGroups,omitempty"`
	NonResourceURLs []string `yaml:"nonResourceURLs,omitempty"`
	ResourceNames   []string `yaml:"resourceNames,omitempty"`
	Resources       []string `yaml:"resources,omitempty"`
	Verbs           []string `yaml:"verbs,omitempty"`
}

type PortName

type PortName string

func (PortName) String

func (p PortName) String() string

func (PortName) Validate

func (p PortName) Validate(ctx context.Context) error

type PortNumber

type PortNumber int

func (PortNumber) Int

func (p PortNumber) Int() int

func (PortNumber) String

func (p PortNumber) String() string

func (PortNumber) Validate

func (p PortNumber) Validate(ctx context.Context) error

type PortProtocol

type PortProtocol string

func (PortProtocol) String

func (p PortProtocol) String() string

func (PortProtocol) Validate

func (p PortProtocol) Validate(ctx context.Context) error

type PortTarget

type PortTarget string

type PreferredSchedulingTerm

type PreferredSchedulingTerm struct {
	Preference NodeSelectorTerm `yaml:"preference,omitempty"`
	Weight     int              `yaml:"weight,omitempty"`
}

type Probe

type Probe struct {
	Exec                Exec      `yaml:"exec,omitempty"`
	HttpGet             HttpGet   `yaml:"httpGet,omitempty"`
	TcpSocket           TcpSocket `yaml:"tcpSocket,omitempty"`
	InitialDelaySeconds int       `yaml:"initialDelaySeconds,omitempty"`
	SuccessThreshold    int       `yaml:"successThreshold,omitempty"`
	FailureThreshold    int       `yaml:"failureThreshold,omitempty"`
	TimeoutSeconds      int       `yaml:"timeoutSeconds,omitempty"`
	PeriodSeconds       int       `yaml:"periodSeconds,omitempty"`
}

type Replicas

type Replicas int

func (Replicas) Int

func (r Replicas) Int() int

func (Replicas) String

func (r Replicas) String() string

func (Replicas) Validate

func (s Replicas) Validate(ctx context.Context) error

type Resources

type Resources struct {
	Limits   ContainerResource `yaml:"limits"`
	Requests ContainerResource `yaml:"requests"`
}

func (Resources) Validate

func (r Resources) Validate(ctx context.Context) error

type Role

type Role struct {
	ApiVersion ApiVersion   `yaml:"apiVersion,omitempty"`
	Kind       Kind         `yaml:"kind,omitempty"`
	Metadata   Metadata     `yaml:"metadata,omitempty"`
	Rules      []PolicyRule `yaml:"rules,omitempty"`
}

func (Role) String

func (c Role) String() string

func (Role) Validate

func (c Role) Validate(ctx context.Context) error

type RoleApplier

type RoleApplier struct {
	Context Context
	Role    Role
}

func (*RoleApplier) Apply

func (s *RoleApplier) Apply(ctx context.Context) error

func (*RoleApplier) Satisfied

func (s *RoleApplier) Satisfied(ctx context.Context) (bool, error)

func (*RoleApplier) Validate

func (s *RoleApplier) Validate(ctx context.Context) error

type RoleBinding

type RoleBinding struct {
	ApiVersion ApiVersion `yaml:"apiVersion"`
	Kind       Kind       `yaml:"kind"`
	Metadata   Metadata   `yaml:"metadata"`
	Subjects   []Subject  `yaml:"subjects"`
	RoleRef    RoleRef    `yaml:"roleRef"`
}

func (RoleBinding) String

func (r RoleBinding) String() string

func (RoleBinding) Validate

func (r RoleBinding) Validate(ctx context.Context) error

type RoleBindingApplier

type RoleBindingApplier struct {
	Context     Context
	RoleBinding RoleBinding
}

func (*RoleBindingApplier) Apply

func (s *RoleBindingApplier) Apply(ctx context.Context) error

func (*RoleBindingApplier) Satisfied

func (s *RoleBindingApplier) Satisfied(ctx context.Context) (bool, error)

func (*RoleBindingApplier) Validate

func (s *RoleBindingApplier) Validate(ctx context.Context) error

type RoleBindingConfiguration

type RoleBindingConfiguration struct {
	Context      Context
	RoleBinding  RoleBinding
	Requirements []world.Configuration
}

func (*RoleBindingConfiguration) Applier

func (r *RoleBindingConfiguration) Applier() (world.Applier, error)

func (*RoleBindingConfiguration) Children

func (*RoleBindingConfiguration) Validate

func (r *RoleBindingConfiguration) Validate(ctx context.Context) error

type RoleBindingName

type RoleBindingName string

func (RoleBindingName) String

func (n RoleBindingName) String() string

func (RoleBindingName) Validate

func (a RoleBindingName) Validate(ctx context.Context) error

type RoleConfiguration

type RoleConfiguration struct {
	Context      Context
	Role         Role
	Requirements []world.Configuration
}

func (*RoleConfiguration) Applier

func (r *RoleConfiguration) Applier() (world.Applier, error)

func (*RoleConfiguration) Children

func (*RoleConfiguration) Validate

func (r *RoleConfiguration) Validate(ctx context.Context) error

type RoleName

type RoleName string

func (RoleName) String

func (r RoleName) String() string

func (RoleName) Validate

func (r RoleName) Validate(ctx context.Context) error

type RoleRef

type RoleRef struct {
	Kind     Kind   `yaml:"kind,omitempty"`
	Name     string `yaml:"name,omitempty"`
	ApiGroup string `yaml:"apiGroup,omitempty"`
}

type Secret

type Secret struct {
	ApiVersion ApiVersion `yaml:"apiVersion"`
	Kind       Kind       `yaml:"kind"`
	Metadata   Metadata   `yaml:"metadata"`
	Type       SecretType `yaml:"type"`
	Data       SecretData `yaml:"data"`
}

func (Secret) String

func (s Secret) String() string

func (*Secret) Validate

func (s *Secret) Validate(ctx context.Context) error

type SecretApplier

type SecretApplier struct {
	Context Context
	Secret  Secret
}

func (*SecretApplier) Apply

func (s *SecretApplier) Apply(ctx context.Context) error

func (*SecretApplier) Satisfied

func (s *SecretApplier) Satisfied(ctx context.Context) (bool, error)

func (*SecretApplier) Validate

func (s *SecretApplier) Validate(ctx context.Context) error

type SecretData

type SecretData map[string]string

type SecretKeyRef

type SecretKeyRef struct {
	Key  string `yaml:"key"`
	Name string `yaml:"name"`
}

type SecretType

type SecretType string

type SecurityContext

type SecurityContext struct {
	AllowPrivilegeEscalation bool                        `yaml:"allowPrivilegeEscalation,omitempty"`
	ReadOnlyRootFilesystem   bool                        `yaml:"readOnlyRootFilesystem,omitempty"`
	Privileged               bool                        `yaml:"privileged,omitempty"`
	RunAsUser                int                         `yaml:"runAsUser,omitempty"`
	FsGroup                  int                         `yaml:"fsGroup,omitempty"`
	Capabilities             SecurityContextCapabilities `yaml:"capabilities,omitempty"`
}

type SecurityContextCapabilities

type SecurityContextCapabilities map[string][]string

type Service

type Service struct {
	ApiVersion ApiVersion  `yaml:"apiVersion"`
	Kind       Kind        `yaml:"kind"`
	Metadata   Metadata    `yaml:"metadata"`
	Spec       ServiceSpec `yaml:"spec"`
}

func (Service) String

func (s Service) String() string

func (Service) Validate

func (c Service) Validate(ctx context.Context) error

type ServiceAccount

type ServiceAccount struct {
	ApiVersion ApiVersion `yaml:"apiVersion"`
	Kind       Kind       `yaml:"kind"`
	Metadata   Metadata   `yaml:"metadata"`
}

func (ServiceAccount) String

func (n ServiceAccount) String() string

func (ServiceAccount) Validate

func (s ServiceAccount) Validate(ctx context.Context) error

type ServiceApplier

type ServiceApplier struct {
	Context Context
	Service Service
}

func (*ServiceApplier) Apply

func (s *ServiceApplier) Apply(ctx context.Context) error

func (*ServiceApplier) Satisfied

func (s *ServiceApplier) Satisfied(ctx context.Context) (bool, error)

func (*ServiceApplier) Validate

func (s *ServiceApplier) Validate(ctx context.Context) error

type ServiceConfiguration

type ServiceConfiguration struct {
	Context      Context
	Service      Service
	Requirements []world.Configuration
}

func (*ServiceConfiguration) Applier

func (d *ServiceConfiguration) Applier() (world.Applier, error)

func (*ServiceConfiguration) Children

func (*ServiceConfiguration) Validate

func (d *ServiceConfiguration) Validate(ctx context.Context) error

type ServicePort

type ServicePort struct {
	Name       PortName     `yaml:"name,omitempty"`
	Port       PortNumber   `yaml:"port"`
	Protocol   PortProtocol `yaml:"protocol,omitempty"`
	TargetPort PortTarget   `yaml:"targetPort,omitempty"`
}

type ServiceSelector

type ServiceSelector map[string]string

type ServiceSpec

type ServiceSpec struct {
	Ports     []ServicePort   `yaml:"ports"`
	Selector  ServiceSelector `yaml:"selector"`
	ClusterIP ClusterIP       `yaml:"clusterIP,omitempty"`
}

type ServiceaccountApplier

type ServiceaccountApplier struct {
	Context        Context
	Serviceaccount ServiceAccount
}

func (*ServiceaccountApplier) Apply

func (*ServiceaccountApplier) Satisfied

func (s *ServiceaccountApplier) Satisfied(ctx context.Context) (bool, error)

func (*ServiceaccountApplier) Validate

func (s *ServiceaccountApplier) Validate(ctx context.Context) error

type ServiceaccountConfiguration

type ServiceaccountConfiguration struct {
	Context        Context
	Serviceaccount ServiceAccount
	Requirements   []world.Configuration
}

func (*ServiceaccountConfiguration) Applier

func (*ServiceaccountConfiguration) Children

func (*ServiceaccountConfiguration) Validate

type StatefulSet

type StatefulSet struct {
	ApiVersion ApiVersion      `yaml:"apiVersion"`
	Kind       Kind            `yaml:"kind"`
	Metadata   Metadata        `yaml:"metadata"`
	Spec       StatefulSetSpec `yaml:"spec"`
}

func (StatefulSet) String

func (s StatefulSet) String() string

func (StatefulSet) Validate

func (s StatefulSet) Validate(ctx context.Context) error

type StatefulSetApplier

type StatefulSetApplier struct {
	Context     Context
	StatefulSet StatefulSet
}

func (*StatefulSetApplier) Apply

func (s *StatefulSetApplier) Apply(ctx context.Context) error

func (*StatefulSetApplier) Satisfied

func (s *StatefulSetApplier) Satisfied(ctx context.Context) (bool, error)

func (*StatefulSetApplier) Validate

func (s *StatefulSetApplier) Validate(ctx context.Context) error

type StatefulSetConfiguration

type StatefulSetConfiguration struct {
	Context      Context
	Requirements []world.Configuration
	StatefulSet  StatefulSet
}

func (*StatefulSetConfiguration) Applier

func (n *StatefulSetConfiguration) Applier() (world.Applier, error)

func (*StatefulSetConfiguration) Children

func (*StatefulSetConfiguration) Validate

func (w *StatefulSetConfiguration) Validate(ctx context.Context) error

type StatefulSetSpec

type StatefulSetSpec struct {
	ServiceName          MetadataName          `yaml:"serviceName"`
	Replicas             Replicas              `yaml:"replicas"`
	Selector             LabelSelector         `yaml:"selector,omitempty"`
	Template             PodTemplate           `yaml:"template"`
	VolumeClaimTemplates []VolumeClaimTemplate `yaml:"volumeClaimTemplates,omitempty"`
	UpdateStrategy       UpdateStrategy        `yaml:"updateStrategy,omitempty"`
}

func (StatefulSetSpec) Validate

func (s StatefulSetSpec) Validate(ctx context.Context) error

type Storage

type Storage string

func (Storage) Validate

func (s Storage) Validate(ctx context.Context) error

type StorageClass

type StorageClass struct {
	ApiVersion  ApiVersion              `yaml:"apiVersion"`
	Kind        Kind                    `yaml:"kind"`
	Metadata    Metadata                `yaml:"metadata"`
	Provisioner StorageClassProvisioner `yaml:"provisioner"`
	Parameters  StorageClassParameters  `yaml:"parameters,omitempty"`
}

func (StorageClass) String

func (n StorageClass) String() string

func (StorageClass) Validate

func (s StorageClass) Validate(ctx context.Context) error

type StorageClassApplier

type StorageClassApplier struct {
	Context      Context
	StorageClass StorageClass
}

func (*StorageClassApplier) Apply

func (s *StorageClassApplier) Apply(ctx context.Context) error

func (*StorageClassApplier) Satisfied

func (s *StorageClassApplier) Satisfied(ctx context.Context) (bool, error)

func (*StorageClassApplier) Validate

func (s *StorageClassApplier) Validate(ctx context.Context) error

type StorageClassConfiguration

type StorageClassConfiguration struct {
	Context      Context
	StorageClass StorageClass
	Requirements []world.Configuration
}

func (*StorageClassConfiguration) Applier

func (d *StorageClassConfiguration) Applier() (world.Applier, error)

func (*StorageClassConfiguration) Children

func (*StorageClassConfiguration) Validate

type StorageClassName

type StorageClassName string

func (StorageClassName) String

func (s StorageClassName) String() string

func (StorageClassName) Validate

func (s StorageClassName) Validate(ctx context.Context) error

type StorageClassParameters

type StorageClassParameters map[string]string

type StorageClassProvisioner

type StorageClassProvisioner string

type Subject

type Subject struct {
	Kind      Kind   `yaml:"kind,omitempty"`
	Name      string `yaml:"name,omitempty"`
	ApiGroup  string `yaml:"apiGroup,omitempty"`
	Namespace string `yaml:"namespace,omitempty"`
}

type TcpSocket

type TcpSocket struct {
	Port PortNumber `yaml:"port,omitempty"`
}

type Toleration

type Toleration struct {
	Key      string `yaml:"key,omitempty"`
	Effect   string `yaml:"effect,omitempty"`
	Operator string `yaml:"operator,omitempty"`
}

type UpdateStrategy

type UpdateStrategy struct {
	Type string `yaml:"type,omitempty"`
}

type ValueFrom

type ValueFrom struct {
	SecretKeyRef    SecretKeyRef    `yaml:"secretKeyRef,omitempty"`
	FieldRef        FieldRef        `yaml:"fieldRef,omitempty"`
	ConfigMapKeyRef ConfigMapKeyRef `yaml:"configMapKeyRef,omitempty"`
}

type VolumeClaimTemplate

type VolumeClaimTemplate struct {
	Metadata Metadata                 `yaml:"metadata,omitempty"`
	Spec     VolumeClaimTemplatesSpec `yaml:"spec,omitempty"`
}

type VolumeClaimTemplatesSpec

type VolumeClaimTemplatesSpec struct {
	AccessModes []AccessMode                      `yaml:"accessModes,omitempty"`
	Resources   VolumeClaimTemplatesSpecResources `yaml:"resources,omitempty"`
}

type VolumeClaimTemplatesSpecResources

type VolumeClaimTemplatesSpecResources struct {
	Requests VolumeClaimTemplatesSpecResourcesRequests `yaml:"requests,omitempty"`
}

type VolumeClaimTemplatesSpecResourcesRequests

type VolumeClaimTemplatesSpecResourcesRequests struct {
	Storage Storage `yaml:"storage,omitempty"`
}

type WeightedPodAffinityTerm

type WeightedPodAffinityTerm struct {
	PodAffinityTerm PodAffinityTerm `yaml:"podAffinityTerm,omitempty"`
	Weight          int             `yaml:"weight,omitempty"`
}

Jump to

Keyboard shortcuts

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