k8s

package
v0.9.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2021 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package k8s provides resources which interface with Kubernetes.

Index

Constants

View Source
const ControlPlaneNamespaceName resource.Namespace = "controlplane"

ControlPlaneNamespaceName contains resources supporting Kubernetes control plane.

View Source
const ExtraNamespaceName resource.Namespace = "extras"

ExtraNamespaceName contains extra resources related to Kubernnetes configuration.

View Source
const ManifestStatusID = resource.ID("manifests")

ManifestStatusID is a singleton resource ID.

View Source
const ManifestStatusType = resource.Type("ManifestStatuses.kubernetes.talos.dev")

ManifestStatusType is type of ManifestStatus resource.

View Source
const ManifestType = resource.Type("Manifests.kubernetes.talos.dev")

ManifestType is type of Manifest resource.

View Source
const SecretsStatusType = resource.Type("SecretStatuses.kubernetes.talos.dev")

SecretsStatusType is type of SecretsStatus resource.

View Source
const StaticPodSecretsStaticPodID = resource.ID("static-pods")

StaticPodSecretsStaticPodID is resource ID for SecretStatus resource for static pods.

View Source
const StaticPodStatusType = resource.Type("StaticPodStatuses.kubernetes.talos.dev")

StaticPodStatusType is type of StaticPodStatus resource.

View Source
const StaticPodType = resource.Type("StaticPods.kubernetes.talos.dev")

StaticPodType is type of StaticPod resource.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manifest

type Manifest struct {
	// contains filtered or unexported fields
}

Manifest resource holds definition of kubelet static pod.

func NewManifest

func NewManifest(namespace resource.Namespace, id resource.ID) *Manifest

NewManifest initializes an empty Manifest resource.

func (*Manifest) DeepCopy

func (r *Manifest) DeepCopy() resource.Resource

DeepCopy implements resource.Resource.

func (*Manifest) Metadata

func (r *Manifest) Metadata() *resource.Metadata

Metadata implements resource.Resource.

func (*Manifest) Objects

func (r *Manifest) Objects() []*unstructured.Unstructured

Objects returns list of unstrustured object.

func (*Manifest) ResourceDefinition

func (r *Manifest) ResourceDefinition() meta.ResourceDefinitionSpec

ResourceDefinition implements meta.ResourceDefinitionProvider interface.

func (*Manifest) SetYAML

func (r *Manifest) SetYAML(yamlBytes []byte) error

SetYAML parses manifest from YAML.

func (*Manifest) Spec

func (r *Manifest) Spec() interface{}

Spec implements resource.Resource.

func (*Manifest) String

func (r *Manifest) String() string

type ManifestStatus

type ManifestStatus struct {
	// contains filtered or unexported fields
}

ManifestStatus resource holds definition of kubelet static pod.

func NewManifestStatus

func NewManifestStatus(namespace resource.Namespace) *ManifestStatus

NewManifestStatus initializes an empty ManifestStatus resource.

func (*ManifestStatus) DeepCopy

func (r *ManifestStatus) DeepCopy() resource.Resource

DeepCopy implements resource.Resource.

func (*ManifestStatus) Metadata

func (r *ManifestStatus) Metadata() *resource.Metadata

Metadata implements resource.Resource.

func (*ManifestStatus) ResourceDefinition

func (r *ManifestStatus) ResourceDefinition() meta.ResourceDefinitionSpec

ResourceDefinition implements meta.ResourceDefinitionProvider interface.

func (*ManifestStatus) Spec

func (r *ManifestStatus) Spec() interface{}

Spec implements resource.Resource.

func (*ManifestStatus) Status

func (r *ManifestStatus) Status() *ManifestStatusSpec

Status returns ManifestStatusSpec.

func (*ManifestStatus) String

func (r *ManifestStatus) String() string

type ManifestStatusSpec

type ManifestStatusSpec struct {
	ManifestsApplied []string `yaml:"manifestsApplied"`
}

ManifestStatusSpec describes manifest application status.

type SecretsStatus

type SecretsStatus struct {
	// contains filtered or unexported fields
}

SecretsStatus resource holds definition of rendered secrets.

func NewSecretsStatus

func NewSecretsStatus(namespace resource.Namespace, id resource.ID) *SecretsStatus

NewSecretsStatus initializes a SecretsStatus resource.

func (*SecretsStatus) DeepCopy

func (r *SecretsStatus) DeepCopy() resource.Resource

DeepCopy implements resource.Resource.

func (*SecretsStatus) Metadata

func (r *SecretsStatus) Metadata() *resource.Metadata

Metadata implements resource.Resource.

func (*SecretsStatus) ResourceDefinition

func (r *SecretsStatus) ResourceDefinition() meta.ResourceDefinitionSpec

ResourceDefinition implements meta.ResourceDefinitionProvider interface.

func (*SecretsStatus) Spec

func (r *SecretsStatus) Spec() interface{}

Spec implements resource.Resource.

func (*SecretsStatus) Status

func (r *SecretsStatus) Status() *SecretsStatusSpec

Status sets pod status.

func (*SecretsStatus) String

func (r *SecretsStatus) String() string

type SecretsStatusSpec

type SecretsStatusSpec struct {
	Ready   bool   `yaml:"ready"`
	Version string `yaml:"version"`
}

SecretsStatusSpec describes status of rendered secrets.

type StaticPod

type StaticPod struct {
	// contains filtered or unexported fields
}

StaticPod resource holds definition of kubelet static pod.

func NewStaticPod

func NewStaticPod(namespace resource.Namespace, id resource.ID, spec *v1.Pod) *StaticPod

NewStaticPod initializes a StaticPod resource.

func (*StaticPod) DeepCopy

func (r *StaticPod) DeepCopy() resource.Resource

DeepCopy implements resource.Resource.

func (*StaticPod) Metadata

func (r *StaticPod) Metadata() *resource.Metadata

Metadata implements resource.Resource.

func (*StaticPod) Pod

func (r *StaticPod) Pod() *v1.Pod

Pod returns pod definition.

func (*StaticPod) ResourceDefinition

func (r *StaticPod) ResourceDefinition() meta.ResourceDefinitionSpec

ResourceDefinition implements meta.ResourceDefinitionProvider interface.

func (*StaticPod) SetPod

func (r *StaticPod) SetPod(podSpec *v1.Pod)

SetPod sets pod definition.

func (*StaticPod) Spec

func (r *StaticPod) Spec() interface{}

Spec implements resource.Resource.

func (*StaticPod) String

func (r *StaticPod) String() string

type StaticPodStatus

type StaticPodStatus struct {
	// contains filtered or unexported fields
}

StaticPodStatus resource holds definition of kubelet static pod.

func NewStaticPodStatus

func NewStaticPodStatus(namespace resource.Namespace, id resource.ID) *StaticPodStatus

NewStaticPodStatus initializes a StaticPodStatus resource.

func (*StaticPodStatus) DeepCopy

func (r *StaticPodStatus) DeepCopy() resource.Resource

DeepCopy implements resource.Resource.

func (*StaticPodStatus) Metadata

func (r *StaticPodStatus) Metadata() *resource.Metadata

Metadata implements resource.Resource.

func (*StaticPodStatus) ResourceDefinition

func (r *StaticPodStatus) ResourceDefinition() meta.ResourceDefinitionSpec

ResourceDefinition implements meta.ResourceDefinitionProvider interface.

func (*StaticPodStatus) SetStatus

func (r *StaticPodStatus) SetStatus(status *v1.PodStatus)

SetStatus sets pod status.

func (*StaticPodStatus) Spec

func (r *StaticPodStatus) Spec() interface{}

Spec implements resource.Resource.

func (*StaticPodStatus) String

func (r *StaticPodStatus) String() string

Jump to

Keyboard shortcuts

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