example

package
v0.15.7 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2019 License: Apache-2.0 Imports: 3 Imported by: 198

Documentation

Overview

package example contains an example API used to demonstrate how to create api groups. Moreover, this is used within tests.

Index

Constants

View Source
const GroupName = "example.apiserver.k8s.io"

GroupName is the group name use in this package

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type ConditionStatus

type ConditionStatus string

type Pod

type Pod struct {
	metav1.TypeMeta
	// +optional
	metav1.ObjectMeta

	// Spec defines the behavior of a pod.
	// +optional
	Spec PodSpec

	// Status represents the current information about a pod. This data may not be up
	// to date.
	// +optional
	Status PodStatus
}

Pod is a collection of containers, used as either input (create, update) or as output (list, get).

func (*Pod) DeepCopy

func (in *Pod) DeepCopy() *Pod

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Pod.

func (*Pod) DeepCopyInto

func (in *Pod) DeepCopyInto(out *Pod)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Pod) DeepCopyObject

func (in *Pod) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type PodCondition

type PodCondition struct {
	Type   PodConditionType
	Status ConditionStatus
	// +optional
	LastProbeTime metav1.Time
	// +optional
	LastTransitionTime metav1.Time
	// +optional
	Reason string
	// +optional
	Message string
}

func (*PodCondition) DeepCopy

func (in *PodCondition) DeepCopy() *PodCondition

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodCondition.

func (*PodCondition) DeepCopyInto

func (in *PodCondition) DeepCopyInto(out *PodCondition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodConditionType

type PodConditionType string

type PodList

type PodList struct {
	metav1.TypeMeta
	// +optional
	metav1.ListMeta

	Items []Pod
}

PodList is a list of Pods.

func (*PodList) DeepCopy

func (in *PodList) DeepCopy() *PodList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodList.

func (*PodList) DeepCopyInto

func (in *PodList) DeepCopyInto(out *PodList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PodList) DeepCopyObject

func (in *PodList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type PodPhase

type PodPhase string

type PodSpec

type PodSpec struct {
	// +optional
	RestartPolicy RestartPolicy
	// Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request.
	// Value must be non-negative integer. The value zero indicates delete immediately.
	// If this value is nil, the default grace period will be used instead.
	// The grace period is the duration in seconds after the processes running in the pod are sent
	// a termination signal and the time when the processes are forcibly halted with a kill signal.
	// Set this value longer than the expected cleanup time for your process.
	// +optional
	TerminationGracePeriodSeconds *int64
	// Optional duration in seconds relative to the StartTime that the pod may be active on a node
	// before the system actively tries to terminate the pod; value must be positive integer
	// +optional
	ActiveDeadlineSeconds *int64
	// NodeSelector is a selector which must be true for the pod to fit on a node
	// +optional
	NodeSelector map[string]string

	// ServiceAccountName is the name of the ServiceAccount to use to run this pod
	// The pod will be allowed to use secrets referenced by the ServiceAccount
	ServiceAccountName string

	// NodeName is a request to schedule this pod onto a specific node.  If it is non-empty,
	// the scheduler simply schedules this pod onto that node, assuming that it fits resource
	// requirements.
	// +optional
	NodeName string
	// Specifies the hostname of the Pod.
	// If not specified, the pod's hostname will be set to a system-defined value.
	// +optional
	Hostname string
	// If specified, the fully qualified Pod hostname will be "<hostname>.<subdomain>.<pod namespace>.svc.<cluster domain>".
	// If not specified, the pod will not have a domainname at all.
	// +optional
	Subdomain string
	// If specified, the pod will be dispatched by specified scheduler.
	// If not specified, the pod will be dispatched by default scheduler.
	// +optional
	SchedulerName string
}

PodSpec is a description of a pod

func (*PodSpec) DeepCopy

func (in *PodSpec) DeepCopy() *PodSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSpec.

func (*PodSpec) DeepCopyInto

func (in *PodSpec) DeepCopyInto(out *PodSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodStatus

type PodStatus struct {
	// +optional
	Phase PodPhase
	// +optional
	Conditions []PodCondition
	// A human readable message indicating details about why the pod is in this state.
	// +optional
	Message string
	// A brief CamelCase message indicating details about why the pod is in this state. e.g. 'OutOfDisk'
	// +optional
	Reason string

	// +optional
	HostIP string
	// +optional
	PodIP string

	// Date and time at which the object was acknowledged by the Kubelet.
	// This is before the Kubelet pulled the container image(s) for the pod.
	// +optional
	StartTime *metav1.Time
}

PodStatus represents information about the status of a pod. Status may trail the actual state of a system.

func (*PodStatus) DeepCopy

func (in *PodStatus) DeepCopy() *PodStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodStatus.

func (*PodStatus) DeepCopyInto

func (in *PodStatus) DeepCopyInto(out *PodStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ReplicaSet

type ReplicaSet struct {
	metav1.TypeMeta
	// +optional
	metav1.ObjectMeta

	// Spec defines the desired behavior of this ReplicaSet.
	// +optional
	Spec ReplicaSetSpec

	// Status is the current status of this ReplicaSet. This data may be
	// out of date by some window of time.
	// +optional
	Status ReplicaSetStatus
}

ReplicaSet ensures that a specified number of pod replicas are running at any given time.

func (*ReplicaSet) DeepCopy

func (in *ReplicaSet) DeepCopy() *ReplicaSet

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaSet.

func (*ReplicaSet) DeepCopyInto

func (in *ReplicaSet) DeepCopyInto(out *ReplicaSet)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ReplicaSet) DeepCopyObject

func (in *ReplicaSet) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ReplicaSetSpec

type ReplicaSetSpec struct {
	// Replicas is the number of desired replicas.
	Replicas int32
}

ReplicaSetSpec is the specification of a ReplicaSet. As the internal representation of a ReplicaSet, it must have a Template set.

func (*ReplicaSetSpec) DeepCopy

func (in *ReplicaSetSpec) DeepCopy() *ReplicaSetSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaSetSpec.

func (*ReplicaSetSpec) DeepCopyInto

func (in *ReplicaSetSpec) DeepCopyInto(out *ReplicaSetSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ReplicaSetStatus

type ReplicaSetStatus struct {
	// Replicas is the number of actual replicas.
	Replicas int32
}

ReplicaSetStatus represents the current status of a ReplicaSet.

func (*ReplicaSetStatus) DeepCopy

func (in *ReplicaSetStatus) DeepCopy() *ReplicaSetStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaSetStatus.

func (*ReplicaSetStatus) DeepCopyInto

func (in *ReplicaSetStatus) DeepCopyInto(out *ReplicaSetStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RestartPolicy

type RestartPolicy string

Directories

Path Synopsis
Package install installs the example API group, making it available as an option to all of the API encoding/decoding machinery.
Package install installs the example API group, making it available as an option to all of the API encoding/decoding machinery.
Package v1 is a generated protocol buffer package.
Package v1 is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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