types

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2017 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VolumeTypeLocal = "local"
	VolumeTypeCSI   = "csi"
)
View Source
const (
	VolumeTypeHostPath     = "host_path"
	VolumeTypeEmptyDir     = "empty_dir"
	VolumeTypeGcePD        = "gce_pd"
	VolumeTypeAwsEBS       = "aws_ebs"
	VolumeTypeAzureDisk    = "azure_disk"
	VolumeTypeAzureFile    = "azure_file"
	VolumeTypeCephFS       = "cephfs"
	VolumeTypeCinder       = "cinder"
	VolumeTypeFibreChannel = "fc"
	VolumeTypeFlex         = "flex"
	VolumeTypeFlocker      = "flocker"
	VolumeTypeGlusterfs    = "glusterfs"
	VolumeTypeISCSI        = "iscsi"
	VolumeTypeNFS          = "nfs"
	VolumeTypePhotonPD     = "photon"
	VolumeTypePortworx     = "portworx"
	VolumeTypePVC          = "pvc"
	VolumeTypeQuobyte      = "quobyte"
	VolumeTypeScaleIO      = "scaleio"
	VolumeTypeVsphere      = "vsphere"
	VolumeTypeConfigMap    = "config-map"
	VolumeTypeSecret       = "secret"
	VolumeTypeDownwardAPI  = "downward_api"
	VolumeTypeProjected    = "projected"
	VolumeTypeGit          = "git"
	VolumeTypeRBD          = "rbd"
	VolumeTypeStorageOS    = "storageos"
	VolumeTypeAny          = "*"

	SelectorSegmentReadOnly = "ro"
)
View Source
const (
	AzureDataDiskCachingNone      AzureDataDiskCachingMode = "none"
	AzureDataDiskCachingReadOnly  AzureDataDiskCachingMode = "ro"
	AzureDataDiskCachingReadWrite AzureDataDiskCachingMode = "rw"

	AzureSharedBlobDisk    AzureDataDiskKind = "shared"
	AzureDedicatedBlobDisk AzureDataDiskKind = "dedicated"
	AzureManagedDisk       AzureDataDiskKind = "managed"
)

Variables

This section is empty.

Functions

func UnparseEnvVal

func UnparseEnvVal(val EnvVal) string

Types

type APIService added in v0.4.0

type APIService struct {
	Version     string            `json:"version,omitempty"`
	Cluster     string            `json:"cluster,omitempty"`
	Name        string            `json:"name,omitempty"`
	Namespace   string            `json:"namespace,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`

	Service      string `json:"service,omitempty"`
	GroupVersion string `json:"group_version,omitempty"`
	TLSVerify    bool   `json:"tls_verify,omitempty"`

	CABundle []byte `json:"ca_bundle,omitempty"`

	MinGroupPriority int32 `json:"min_group_priority,omitempty"`
	VersionPriority  int32 `json:"version_priority,omitempty"`

	Conditions []APIServiceCondition `json:"conditions,omitempty"`
}

type APIServiceCondition added in v0.4.0

type APIServiceCondition struct {
	Type               APIServiceConditionType   `json:"type,omitempty"`
	Status             APIServiceConditionStatus `json:"status,omitempty"`
	LastTransitionTime metav1.Time               `json:"last_change,omitempty"`
	Reason             string                    `json:"reason,omitempty"`
	Message            string                    `json:"msg,omitempty"`
}

type APIServiceConditionStatus added in v0.4.0

type APIServiceConditionStatus string
const (
	APIServiceConditionTrue    APIServiceConditionStatus = "True"
	APIServiceConditionFalse   APIServiceConditionStatus = "False"
	APIServiceConditionUnknown APIServiceConditionStatus = "Unknown"
)

type APIServiceConditionType added in v0.4.0

type APIServiceConditionType string
const (
	APIServiceAvailable APIServiceConditionType = "Available"
)

type APIServiceWrapper added in v0.4.0

type APIServiceWrapper struct {
	APIService APIService `json:"api_service"`
}

type AccessModes

type AccessModes struct {
	Modes []v1.PersistentVolumeAccessMode
}

comma-separated list of modes

func (*AccessModes) InitFromString

func (a *AccessModes) InitFromString(s string) error

func (AccessModes) MarshalJSON

func (a AccessModes) MarshalJSON() ([]byte, error)

func (*AccessModes) ToString

func (a *AccessModes) ToString() (string, error)

func (*AccessModes) UnmarshalJSON

func (a *AccessModes) UnmarshalJSON(data []byte) error

type Action

type Action struct {
	Command []string   `json:"command,omitempty"`
	Net     *NetAction `json:"net,omitempty"`
}

type Affinity

type Affinity struct {
	NodeAffinity    string   `json:"node,omitempty"`
	PodAffinity     string   `json:"pod,omitempty"`
	PodAntiAffinity string   `json:"anti_pod,omitempty"`
	Topology        string   `json:"topology,omitempty"`
	Namespaces      []string `json:"namespaces,omitempty"`
}

type AwsEBSVolume added in v0.2.0

type AwsEBSVolume struct {
	VolumeID  string `json:"-"`
	FSType    string `json:"fs,omitempty"`
	Partition int32  `json:"partition,omitempty"`
	ReadOnly  bool   `json:"ro,omitempty"`
}

func (AwsEBSVolume) Marshal added in v0.2.0

func (s AwsEBSVolume) Marshal() (*MarshalledVolume, error)

func (*AwsEBSVolume) Unmarshal added in v0.2.0

func (s *AwsEBSVolume) Unmarshal(obj map[string]interface{}, selector []string) error

type AzureDataDiskCachingMode added in v0.2.0

type AzureDataDiskCachingMode string

type AzureDataDiskKind added in v0.2.0

type AzureDataDiskKind string

type AzureDiskVolume added in v0.2.0

type AzureDiskVolume struct {
	DiskName    string                    `json:"disk_name"`
	DataDiskURI string                    `json:"disk_uri"`
	CachingMode *AzureDataDiskCachingMode `json:"cache,omitempty"`
	FSType      string                    `json:"fs,omitempty"`
	ReadOnly    bool                      `json:"ro,omitempty"`
	Kind        *AzureDataDiskKind        `json:"kind,omitempty"`
}

func (AzureDiskVolume) Marshal added in v0.2.0

func (s AzureDiskVolume) Marshal() (*MarshalledVolume, error)

func (*AzureDiskVolume) Unmarshal added in v0.2.0

func (s *AzureDiskVolume) Unmarshal(obj map[string]interface{}, selector []string) error

type AzureFilePersistentVolume added in v0.2.0

type AzureFilePersistentVolume struct {
	Secret    SecretReference `json:"secret"`
	ShareName string          `json:"share"`
	ReadOnly  bool            `json:"ro,omitempty"`
}

func (AzureFilePersistentVolume) Marshal added in v0.2.0

func (*AzureFilePersistentVolume) Unmarshal added in v0.2.0

func (s *AzureFilePersistentVolume) Unmarshal(obj map[string]interface{}, selector []string) error

type AzureFileVolume added in v0.2.0

type AzureFileVolume struct {
	SecretName string `json:"-"`
	ShareName  string `json:"-"`
	ReadOnly   bool   `json:"-"`
}

func (AzureFileVolume) Marshal added in v0.2.0

func (s AzureFileVolume) Marshal() (*MarshalledVolume, error)

type Binding added in v0.4.0

type Binding struct {
	Version     string            `json:"version,omitempty"`
	Cluster     string            `json:"cluster,omitempty"`
	Name        string            `json:"name,omitempty"`
	Namespace   string            `json:"namespace,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`

	Target ObjectReference `json:"target"`
}

type BindingWrapper added in v0.4.0

type BindingWrapper struct {
	Binding `json:"binding"`
}

type CIDR

type CIDR string

type CPU

type CPU struct {
	Min string `json:"min,omitempty"`
	Max string `json:"max,omitempty"`
}

type CRDCondition added in v0.4.0

type CRDCondition struct {
	Type   CRDConditionType `json:"type"`
	Status ConditionStatus  `json:"status"`
	// Last time the condition transitioned from one status to another.
	LastTransitionTime metav1.Time `json:"last_change,omitempty"`
	// Unique, one-word, CamelCase reason for the condition's last transition.
	Reason  string `json:"reason"`
	Message string `json:"msg"`
}

CRDCondition contains details for the current condition of this pod.

type CRDConditionType added in v0.4.0

type CRDConditionType string

CRDConditionType is a valid value for CRDCondition.Type

const (
	CRDEstablished   CRDConditionType = "established"
	CRDNamesAccepted CRDConditionType = "names-accepted"
	CRDTerminating   CRDConditionType = "terminating"
)

type CRDMeta added in v0.4.0

type CRDMeta struct {
	Group   string `json:"group,omitempty"`
	Version string `json:"version,omitempty"`

	CRDName `json:",inline"`
}

type CRDName added in v0.4.0

type CRDName struct {
	// Plural is the plural name of the resource to serve.  It must match the name of the CustomResourceDefinition-registration
	// too: plural.group and it must be all lowercase.
	Plural string `json:"plural,omitempty"`
	// Singular is the singular name of the resource.  It must be all lowercase  Defaults to lowercased <kind>
	Singular string `json:"singular,omitempty"`
	// ShortNames are short names for the resource.  It must be all lowercase.
	ShortNames []string `json:"short,omitempty"`
	// Kind is the serialized kind of the resource.  It is normally CamelCase and singular.
	Kind string `json:"kind,omitempty"`
	// ListKind is the serialized kind of the list for this resource.  Defaults to <kind>List.
	ListKind string `json:"list,omitempty"`
}

type CRDResourceScope added in v0.4.0

type CRDResourceScope string

ResourceScope is an enum defining the different scopes available to a custom resource

const (
	CRDClusterScoped   CRDResourceScope = "cluster"
	CRDNamespaceScoped CRDResourceScope = "ns"
)

type CRDWrapper added in v0.4.0

type CRDWrapper struct {
	CRD CustomResourceDefinition `json:"crd"`
}

type CSIPersistentVolume added in v0.3.0

type CSIPersistentVolume struct {
	Driver       string `json:"driver"`
	VolumeHandle string `json:"-"`
	ReadOnly     bool   `json:"ro,omitempty"`
}

func (CSIPersistentVolume) Marshal added in v0.3.0

func (s CSIPersistentVolume) Marshal() (*MarshalledVolume, error)

func (*CSIPersistentVolume) Unmarshal added in v0.3.0

func (s *CSIPersistentVolume) Unmarshal(obj map[string]interface{}, selector []string) error

type CephFSPersistentSecretFileOrRef added in v0.2.0

type CephFSPersistentSecretFileOrRef struct {
	File string           `json:"-"`
	Ref  *SecretReference `json:"-"`
}

func (CephFSPersistentSecretFileOrRef) MarshalJSON added in v0.2.0

func (s CephFSPersistentSecretFileOrRef) MarshalJSON() ([]byte, error)

func (*CephFSPersistentSecretFileOrRef) UnmarshalJSON added in v0.2.0

func (s *CephFSPersistentSecretFileOrRef) UnmarshalJSON(data []byte) error

type CephFSPersistentVolume added in v0.2.0

type CephFSPersistentVolume struct {
	Monitors        []string                         `json:"monitors"`
	Path            string                           `json:"path, omitempty"`
	User            string                           `json:"user,omitempty"`
	SecretFileOrRef *CephFSPersistentSecretFileOrRef `json:"secret,omitempty"`
	ReadOnly        bool                             `json:"ro,omitempty"`
}

func (CephFSPersistentVolume) Marshal added in v0.2.0

func (*CephFSPersistentVolume) Unmarshal added in v0.2.0

func (s *CephFSPersistentVolume) Unmarshal(obj map[string]interface{}, selector []string) error

type CephFSSecretFileOrRef added in v0.2.0

type CephFSSecretFileOrRef struct {
	File string `json:"-"`
	Ref  string `json:"-"`
}

func (CephFSSecretFileOrRef) MarshalJSON added in v0.2.0

func (s CephFSSecretFileOrRef) MarshalJSON() ([]byte, error)

func (*CephFSSecretFileOrRef) UnmarshalJSON added in v0.2.0

func (s *CephFSSecretFileOrRef) UnmarshalJSON(data []byte) error

type CephFSVolume added in v0.2.0

type CephFSVolume struct {
	Monitors        []string               `json:"monitors"`
	Path            string                 `json:"path, omitempty"`
	User            string                 `json:"user,omitempty"`
	SecretFileOrRef *CephFSSecretFileOrRef `json:"secret,omitempty"`
	ReadOnly        bool                   `json:"ro,omitempty"`
}

func (CephFSVolume) Marshal added in v0.2.0

func (s CephFSVolume) Marshal() (*MarshalledVolume, error)

type CinderVolume added in v0.2.0

type CinderVolume struct {
	VolumeID string `json:"-"`
	FSType   string `json:"fs,omitempty"`
	ReadOnly bool   `json:"ro,omitempty"`
}

func (CinderVolume) Marshal added in v0.2.0

func (s CinderVolume) Marshal() (*MarshalledVolume, error)

func (*CinderVolume) Unmarshal added in v0.2.0

func (s *CinderVolume) Unmarshal(obj map[string]interface{}, selector []string) error

type ClusterIP

type ClusterIP string
const (
	ClusterIPNil  ClusterIP = ""
	ClusterIPNone ClusterIP = "None"
)

func ClusterIPAddr

func ClusterIPAddr(a IPAddr) ClusterIP

type ClusterIPServiceType

type ClusterIPServiceType string
const (
	ClusterIPServiceTypeDefault      ClusterIPServiceType = "cluster-ip"
	ClusterIPServiceTypeNodePort     ClusterIPServiceType = "node-port"
	ClusterIPServiceTypeLoadBalancer ClusterIPServiceType = "load-balancer"
)

type ClusterRole added in v0.4.0

type ClusterRole struct {
	Version     string            `json:"version,omitempty"`
	Cluster     string            `json:"cluster,omitempty"`
	Name        string            `json:"name,omitempty"`
	Namespace   string            `json:"namespace,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`

	Rules []PolicyRule `json:"rules"`

	// AggregationRule.ClusterRoleSelectors :: []metav1.LabelSelector
	AggregationRule []string `json:"aggregation,omitempty"`
}

ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.

type ClusterRoleWrapper added in v0.4.0

type ClusterRoleWrapper struct {
	ClusterRole ClusterRole `json:"cluster_role"`
}

type ConcurrencyPolicy added in v0.2.0

type ConcurrencyPolicy string
const (
	AllowConcurrent   ConcurrencyPolicy = "allow"
	ForbidConcurrent  ConcurrencyPolicy = "forbid"
	ReplaceConcurrent ConcurrencyPolicy = "replace"
)

type ConditionStatus

type ConditionStatus string
const (
	ConditionTrue    ConditionStatus = "true"
	ConditionFalse   ConditionStatus = "false"
	ConditionUnknown ConditionStatus = "unknown"
)

type ConfigMap added in v0.2.0

type ConfigMap struct {
	Version     string            `json:"version,omitempty"`
	Cluster     string            `json:"cluster,omitempty"`
	Name        string            `json:"name,omitempty"`
	Namespace   string            `json:"namespace,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`
	Data        map[string]string `json:"data,omitempty"`
}

type ConfigMapProjection added in v0.2.0

type ConfigMapProjection struct {
	Name string `json:"config"`

	Items map[string]KeyAndMode `json:"items,omitempty"`

	// NOTE: opposite of Optional
	Required *bool `json:"required,omitempty"`
}

type ConfigMapVolume added in v0.2.0

type ConfigMapVolume struct {
	Name string `json:"-"`

	Items       map[string]KeyAndMode `json:"items,omitempty"`
	DefaultMode *FileMode             `json:"mode,omitempty"`

	// NOTE: opposite of Optional
	Required *bool `json:"required,omitempty"`
}

func (ConfigMapVolume) Marshal added in v0.2.0

func (s ConfigMapVolume) Marshal() (*MarshalledVolume, error)

type ConfigMapWrapper added in v0.2.0

type ConfigMapWrapper struct {
	ConfigMap ConfigMap `json:"config_map"`
}

type Container

type Container struct {
	Command              []string                 `json:"command,omitempty"`
	Args                 []floatstr.FloatOrString `json:"args,omitempty"`
	Env                  []Env                    `json:"env,omitempty"`
	Image                string                   `json:"image"`
	Pull                 PullPolicy               `json:"pull,omitempty"`
	OnStart              *Action                  `json:"on_start,omitempty"`
	PreStop              *Action                  `json:"pre_stop,omitempty"`
	CPU                  *CPU                     `json:"cpu,omitempty"`
	Mem                  *Mem                     `json:"mem,omitempty"`
	Name                 string                   `json:"name,omitempty"`
	AddCapabilities      []string                 `json:"cap_add,omitempty"`
	DelCapabilities      []string                 `json:"cap_drop,omitempty"`
	Privileged           *bool                    `json:"privileged,omitempty"`
	AllowEscalation      *bool                    `json:"allow_escalation,omitempty"`
	RW                   *bool                    `json:"rw,omitempty"`
	RO                   *bool                    `json:"ro,omitempty"`
	ForceNonRoot         *bool                    `json:"force_non_root,omitempty"`
	UID                  *int64                   `json:"uid,omitempty"`
	SELinux              *SELinux                 `json:"selinux,omitempty"`
	LivenessProbe        *Probe                   `json:"liveness_probe,omitempty"`
	ReadinessProbe       *Probe                   `json:"readiness_probe,omitempty"`
	Expose               []Port                   `json:"expose,omitempty"`
	Stdin                bool                     `json:"stdin,omitempty"`
	StdinOnce            bool                     `json:"stdin_once,omitempty"`
	TTY                  bool                     `json:"tty,omitempty"`
	WorkingDir           string                   `json:"wd,omitempty"`
	TerminationMsgPath   string                   `json:"termination_msg_path,omitempty"`
	TerminationMsgPolicy TerminationMessagePolicy `json:"termination_msg_policy,omitempty"`
	ContainerID          string                   `json:"container_id,omitempty"`
	ImageID              string                   `json:"image_id,omitempty"`
	Ready                bool                     `json:"ready,omitempty"`
	LastState            *ContainerState          `json:"last_state,omitempty"`
	CurrentState         *ContainerState          `json:"current_state,omitempty"`
	VolumeMounts         []VolumeMount            `json:"volume,omitempty"`
	Restarts             int32                    `json:"restarts,omitempty"`
}

type ContainerState

type ContainerState struct {
	Waiting    *ContainerStateWaiting    `json:"waiting,omitempty"`
	Terminated *ContainerStateTerminated `json:"terminated,omitempty"`
	Running    *ContainerStateRunning    `json:"running,omitempty"`
}

type ContainerStateRunning

type ContainerStateRunning struct {
	StartTime metav1.Time `json:"start_time,omitempty"`
}

type ContainerStateTerminated

type ContainerStateTerminated struct {
	StartTime  metav1.Time `json:"start_time,omitempty"`
	FinishTime metav1.Time `json:"finish_time,omitempty"`
	Reason     string      `json:"reason,omitempty"`
	Msg        string      `json:"msg,omitempty"`
	ExitCode   int32       `json:"exit_code,omitempty"`
	Signal     int32       `json:"signal,omitempty"`
}

type ContainerStateWaiting

type ContainerStateWaiting struct {
	Reason string `json:"reason,omitempty"`
	Msg    string `json:"msg,omitempty"`
}

type ControllerRevision added in v0.4.0

type ControllerRevision struct {
	Version     string            `json:"version,omitempty"`
	Cluster     string            `json:"cluster,omitempty"`
	Name        string            `json:"name,omitempty"`
	Namespace   string            `json:"namespace,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`

	Data runtime.RawExtension `json:"data,omitempty"`

	// Revision indicates the revision of the state represented by Data.
	Revision int64 `json:"revision"`
}

type ControllerRevisionWrapper added in v0.4.0

type ControllerRevisionWrapper struct {
	ControllerRevision ControllerRevision `json:"controller_revision"`
}

type CronJob added in v0.2.0

type CronJob struct {
	Version     string            `json:"version,omitempty"`
	Cluster     string            `json:"cluster,omitempty"`
	Name        string            `json:"name,omitempty"`
	Namespace   string            `json:"namespace,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`

	Schedule                string `json:"schedule,omitempty"`
	Suspend                 *bool  `json:"suspend,omitempty"`
	StartingDeadlineSeconds *int64 `json:"start_deadline,omitempty"`

	ConcurrencyPolicy ConcurrencyPolicy `json:"concurrency,omitempty"`

	MaxSuccessHistory *int32 `json:"max_success_history,omitempty"`
	MaxFailureHistory *int32 `json:"max_failure_history,omitempty"`

	TemplateMetadata *PodTemplateMeta `json:"job_meta,omitempty"`
	JobTemplate      `json:",inline"`

	// Status
	CronJobStatus `json:",inline"`
}

type CronJobStatus added in v0.2.0

type CronJobStatus struct {
	Active        []v1.ObjectReference `json:"active,omitempty"`
	LastScheduled *metav1.Time         `json:"last_scheduled,omitempty"`
}

type CronJobWrapper added in v0.2.0

type CronJobWrapper struct {
	CronJob CronJob `json:"cron_job"`
}

type CrossVersionObjectReference added in v0.4.0

type CrossVersionObjectReference struct {
	Kind       string
	Name       string
	APIVersion string
}

func (CrossVersionObjectReference) MarshalJSON added in v0.4.0

func (r CrossVersionObjectReference) MarshalJSON() ([]byte, error)

func (*CrossVersionObjectReference) UnmarshalJSON added in v0.4.0

func (r *CrossVersionObjectReference) UnmarshalJSON(data []byte) error

func (CrossVersionObjectReference) VersionKind added in v0.4.0

func (r CrossVersionObjectReference) VersionKind() string

type CustomResourceDefinition added in v0.4.0

type CustomResourceDefinition struct {
	Version     string            `json:"version,omitempty"`
	Cluster     string            `json:"cluster,omitempty"`
	Name        string            `json:"name,omitempty"`
	Namespace   string            `json:"namespace,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`

	// Spec::CRDSpec
	//   Group::string, Version::string, Names::CRDNames
	CRDMeta    CRDMeta                 `json:"meta,omitempty"`
	Scope      CRDResourceScope        `json:"scope,omitempty"`
	Validation *apiext.JSONSchemaProps `json:"validation"`

	// Status
	Conditions []CRDCondition `json:"conditions,omitempty"`
	Accepted   CRDName        `json:"accepted,omitempty"`
}

type DNSPolicy

type DNSPolicy string
const (
	DNSClusterFirstWithHostNet DNSPolicy = "cluster-first-with-host-net"
	DNSClusterFirst            DNSPolicy = "cluster-first"
	DNSDefault                 DNSPolicy = "default"
)

type DaemonSet added in v0.2.0

type DaemonSet struct {
	Version     string            `json:"version,omitempty"`
	Cluster     string            `json:"cluster,omitempty"`
	Name        string            `json:"name,omitempty"`
	Namespace   string            `json:"namespace,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`

	OnDelete       bool                `json:"replace_on_delete,omitempty"`
	MaxUnavailable *intstr.IntOrString `json:"max_unavailable,omitempty"`

	MinReadySeconds      int32  `json:"min_ready,omitempty"`
	RevisionHistoryLimit *int32 `json:"max_revs,omitempty"`

	// Selector in ReplicaSet can express more complex rules than just matching
	// pod labels, so it needs its own field (unlike in ReplicationController).
	// Leaving it blank has the same effect as omitting Selector in RC.
	Selector *RSSelector `json:"selector,omitempty"`

	TemplateMetadata *PodTemplateMeta `json:"pod_meta,omitempty"`
	PodTemplate      `json:",inline"`

	// Status
	DaemonSetStatus `json:",inline"`
}

type DaemonSetStatus added in v0.2.0

type DaemonSetStatus struct {
	ObservedGeneration   int64  `json:"generation_observed,omitempty"`
	NumNodesScheduled    int32  `json:"num_nodes_scheduled,omitempty"`
	NumNodesMisscheduled int32  `json:"num_nodes_misscheduled,omitempty"`
	NumNodesDesired      int32  `json:"num_nodes_desired,omitempty"`
	NumReady             int32  `json:"num_ready,omitempty"`
	NumUpdated           int32  `json:"num_updated,omitempty"`
	NumAvailable         int32  `json:"num_available,omitempty"`
	NumUnavailable       int32  `json:"num_unavailable,omitempty"`
	CollisionCount       *int32 `json:"hash_collisions,omitempty"`
}

type DaemonSetWrapper added in v0.2.0

type DaemonSetWrapper struct {
	DaemonSet DaemonSet `json:"daemon_set"`
}

type Deployment

type Deployment struct {
	Version     string            `json:"version,omitempty"`
	Cluster     string            `json:"cluster,omitempty"`
	Name        string            `json:"name,omitempty"`
	Namespace   string            `json:"namespace,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`

	Replicas       *int32              `json:"replicas,omitempty"`
	Recreate       bool                `json:"recreate,omitempty"`
	MaxUnavailable *intstr.IntOrString `json:"max_unavailable,omitempty"`
	MaxSurge       *intstr.IntOrString `json:"max_extra,omitempty"`

	MinReadySeconds         int32  `json:"min_ready,omitempty"`
	RevisionHistoryLimit    *int32 `json:"max_revs,omitempty"`
	Paused                  bool   `json:"paused,omitempty"`
	ProgressDeadlineSeconds *int32 `json:"progress_deadline,omitempty"`

	// Selector in ReplicaSet can express more complex rules than just matching
	// pod labels, so it needs its own field (unlike in ReplicationController).
	// Leaving it blank has the same effect as omitting Selector in RC.
	Selector *RSSelector `json:"selector,omitempty"`

	TemplateMetadata *PodTemplateMeta `json:"pod_meta,omitempty"`
	PodTemplate      `json:",inline"`

	// Status
	DeploymentStatus `json:",inline"`
}

type DeploymentCondition added in v0.2.0

type DeploymentCondition struct {
	Type               DeploymentConditionType `json:"type"`
	Status             ConditionStatus         `json:"status"`
	LastUpdateTime     metav1.Time             `json:"timestamp,omitempty"`
	LastTransitionTime metav1.Time             `json:"last_change,omitempty"`
	Reason             string                  `json:"reason,omitempty"`
	Message            string                  `json:"message,omitempty"`
}

type DeploymentConditionType added in v0.2.0

type DeploymentConditionType string
const (
	DeploymentAvailable      DeploymentConditionType = "available"
	DeploymentProgressing    DeploymentConditionType = "progressing"
	DeploymentReplicaFailure DeploymentConditionType = "replica-failure"
)

type DeploymentReplicasStatus added in v0.2.0

type DeploymentReplicasStatus struct {
	Total       int32 `json:"total,omitempty"`
	Updated     int32 `json:"updated,omitempty"`
	Ready       int32 `json:"ready,omitempty"`
	Available   int32 `json:"available,omitempty"`
	Unavailable int32 `json:"unavailable,omitempty"`
}

type DeploymentStatus added in v0.2.0

type DeploymentStatus struct {
	ObservedGeneration int64                    `json:"generation_observed,omitempty"`
	Replicas           DeploymentReplicasStatus `json:"replicas_status,omitempty"`
	Conditions         []DeploymentCondition    `json:"condition,omitempty"`
	CollisionCount     *int32                   `json:"hash_collisions,omitempty"`
}

type DeploymentWrapper

type DeploymentWrapper struct {
	Deployment Deployment `json:"deployment"`
}

type DownwardAPIProjection added in v0.2.0

type DownwardAPIProjection struct {
	Items map[string]DownwardAPIVolumeFile `json:"items,omitempty"`
}

type DownwardAPIVolume added in v0.2.0

type DownwardAPIVolume struct {
	Items       map[string]DownwardAPIVolumeFile `json:"items,omitempty"`
	DefaultMode *FileMode                        `json:"mode,omitempty"`
}

func (DownwardAPIVolume) Marshal added in v0.2.0

func (s DownwardAPIVolume) Marshal() (*MarshalledVolume, error)

type DownwardAPIVolumeFile added in v0.2.0

type DownwardAPIVolumeFile struct {
	FieldRef         *ObjectFieldSelector         `json:"field,omitempty"`
	ResourceFieldRef *VolumeResourceFieldSelector `json:"resource,omitempty"`
	Mode             *FileMode                    `json:"mode,omitempty"`
}

type EmptyDirVolume added in v0.2.0

type EmptyDirVolume struct {
	Medium    StorageMedium      `json:"medium,omitempty"`
	SizeLimit *resource.Quantity `json:"max_size,omitempty"`
}

func (EmptyDirVolume) Marshal added in v0.2.0

func (s EmptyDirVolume) Marshal() (*MarshalledVolume, error)

type EndpointAddress added in v0.2.0

type EndpointAddress struct {
	IP       string           `json:"ip,omitempty"`
	Hostname string           `json:"hostname,omitempty"`
	Nodename *string          `json:"node,omitempty"`
	Target   *ObjectReference `json:"target,omitempty"`
}

type EndpointSubset added in v0.2.0

type EndpointSubset struct {
	Addresses         []EndpointAddress `json:"addrs,omitempty"`
	NotReadyAddresses []EndpointAddress `json:"unready_addrs,omitempty"`
	Ports             []string          `json:"ports,omitempty"`
}

type Endpoints added in v0.3.0

type Endpoints struct {
	Version     string            `json:"version,omitempty"`
	Cluster     string            `json:"cluster,omitempty"`
	Name        string            `json:"name,omitempty"`
	Namespace   string            `json:"namespace,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`

	Subsets []EndpointSubset `json:"subsets,omitempty"`
}

type EndpointsWrapper added in v0.3.0

type EndpointsWrapper struct {
	Endpoints Endpoints `json:"endpoints,omitempty"`
}

type Env

type Env struct {
	Type EnvType
	From *EnvFrom
	Val  *EnvVal
}

func EnvWithFrom

func EnvWithFrom(from EnvFrom) Env

func EnvWithVal

func EnvWithVal(val EnvVal) Env

func (Env) MarshalJSON

func (e Env) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface.

func (*Env) SetFrom

func (e *Env) SetFrom(from EnvFrom)

func (*Env) SetVal

func (e *Env) SetVal(val EnvVal)

func (*Env) UnmarshalJSON

func (e *Env) UnmarshalJSON(value []byte) error

UnmarshalJSON implements the json.Unmarshaller interface.

type EnvFrom

type EnvFrom struct {
	Key      string `json:"key,omitempty"`
	From     string `json:"from,omitempty"`
	Required *bool  `json:"required,omitempty"`
}

func (EnvFrom) Optional

func (e EnvFrom) Optional() *bool

type EnvType

type EnvType int
const (
	EnvFromType EnvType = iota
	EnvValType
)

type EnvVal

type EnvVal struct {
	Key string
	Val string
}

func ParseEnvVal

func ParseEnvVal(s string) *EnvVal

type Event added in v0.4.0

type Event struct {
	Version     string            `json:"version,omitempty"`
	Cluster     string            `json:"cluster,omitempty"`
	Name        string            `json:"name,omitempty"`
	Namespace   string            `json:"namespace,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`

	// The object that this event is about.
	InvolvedObject ObjectReference `json:"involved"`

	Reason  string `json:"reason,omitempty"`
	Message string `json:"message,omitempty"`

	// Source::EventSource
	Component string `json:"component,omitempty"`
	Host      string `json:"host,omitempty"`

	// first recorded
	FirstTimestamp metav1.Time `json:"first_recorded,omitempty"`
	// last recorded
	LastTimestamp metav1.Time `json:"last_recorded,omitempty"`
	Count         int32       `json:"count,omitempty"`
	Type          string      `json:"type,omitempty"`
	// first observed
	EventTime metav1.MicroTime `json:"first_observed,omitempty"`

	// Series::*EventSeries
	// Number of occurrences in this series up to the last heartbeat time
	SeriesCount *int32 `json:"series_count,omitempty"`
	// Time of the last occurence observed
	LastObservedTime *metav1.MicroTime `json:"last_observed,omitempty"`
	SeriesState      *EventSeriesState `json:"series_state,omitempty"`

	Action  string           `json:"action,omitempty"`
	Related *ObjectReference `json:"related,omitempty"`
	// controller name
	ReportingController string `json:"reporter"`
	// controller instance ID
	ReportingInstance string `json:"reporter_id"`
}

type EventSeriesState added in v0.4.0

type EventSeriesState string
const (
	EventSeriesStateOngoing  EventSeriesState = "ongoing"
	EventSeriesStateFinished EventSeriesState = "finished"
	EventSeriesStateUnknown  EventSeriesState = "unknown"
)

type EventWrapper added in v0.4.0

type EventWrapper struct {
	Event `json:"event"`
}

type ExternalTrafficPolicy

type ExternalTrafficPolicy string
const (
	ExternalTrafficPolicyNil     ExternalTrafficPolicy = ""
	ExternalTrafficPolicyLocal   ExternalTrafficPolicy = "node-local"
	ExternalTrafficPolicyCluster ExternalTrafficPolicy = "cluster-wide"
)

type FibreChannelVolume added in v0.2.0

type FibreChannelVolume struct {
	TargetWWNs []string `json:"wwn,omitempty"`
	Lun        *int32   `json:"lun,omitempty"`
	FSType     string   `json:"fs,omitempty"`
	ReadOnly   bool     `json:"ro,omitempty"`
	WWIDs      []string `json:"wwid,omitempty"`
}

func (FibreChannelVolume) Marshal added in v0.2.0

func (s FibreChannelVolume) Marshal() (*MarshalledVolume, error)

func (*FibreChannelVolume) Unmarshal added in v0.2.0

func (s *FibreChannelVolume) Unmarshal(obj map[string]interface{}, selector []string) error

type FileMode added in v0.2.0

type FileMode int32

FileMode can be unmarshalled from either a number (octal is supported) or a string. The json library doesn't allow serializing numbers as octal, so FileMode always marshals to a string.

func FileModePtr added in v0.2.0

func FileModePtr(m FileMode) *FileMode

func (FileMode) MarshalJSON added in v0.2.0

func (m FileMode) MarshalJSON() ([]byte, error)

func (*FileMode) UnmarshalJSON added in v0.2.0

func (m *FileMode) UnmarshalJSON(data []byte) error

type FinalizerName added in v0.4.0

type FinalizerName string
const (
	FinalizerKubernetes FinalizerName = "kubernetes"
)

type FlexVolume added in v0.2.0

type FlexVolume struct {
	Driver    string            `json:"-"`
	FSType    string            `json:"fs,omitempty"`
	SecretRef string            `json:"secret,omitempty"`
	ReadOnly  bool              `json:"ro,omitempty"`
	Options   map[string]string `json:"options,omitempty"`
}

func (FlexVolume) Marshal added in v0.2.0

func (s FlexVolume) Marshal() (*MarshalledVolume, error)

func (*FlexVolume) Unmarshal added in v0.2.0

func (s *FlexVolume) Unmarshal(obj map[string]interface{}, selector []string) error

type FlockerVolume added in v0.2.0

type FlockerVolume struct {
	DatasetUUID string `json:"-"`
}

func (FlockerVolume) Marshal added in v0.2.0

func (s FlockerVolume) Marshal() (*MarshalledVolume, error)

func (*FlockerVolume) Unmarshal added in v0.2.0

func (s *FlockerVolume) Unmarshal(selector []string) error

type GIDPolicy added in v0.4.0

type GIDPolicy struct {
	Policy GIDPolicyType `json:"policy,omitempty"`
	Ranges []IDRange     `json:"ranges,omitempty"`
}

type GIDPolicyType added in v0.4.0

type GIDPolicyType string
const (
	GIDPolicyAny  GIDPolicyType = "*"
	GIDPolicyMust GIDPolicyType = "must_be"
)

type GcePDVolume added in v0.2.0

type GcePDVolume struct {
	PDName    string `json:"-"`
	FSType    string `json:"fs,omitempty"`
	Partition int32  `json:"partition,omitempty"`
	ReadOnly  bool   `json:"ro,omitempty"`
}

func (GcePDVolume) Marshal added in v0.2.0

func (s GcePDVolume) Marshal() (*MarshalledVolume, error)

func (*GcePDVolume) Unmarshal added in v0.2.0

func (s *GcePDVolume) Unmarshal(obj map[string]interface{}, selector []string) error

type GitVolume added in v0.2.0

type GitVolume struct {
	Repository string `json:"-"`
	Revision   string `json:"rev,omitempty"`
	Directory  string `json:"dir,omitempty"`
}

func (GitVolume) Marshal added in v0.2.0

func (s GitVolume) Marshal() (*MarshalledVolume, error)

type GlusterfsVolume added in v0.2.0

type GlusterfsVolume struct {
	EndpointsName string `json:"endpoints"`

	// Path is the Glusterfs volume name.
	Path     string `json:"path"`
	ReadOnly bool   `json:"ro,omitempty"`
}

func (GlusterfsVolume) Marshal added in v0.2.0

func (s GlusterfsVolume) Marshal() (*MarshalledVolume, error)

func (*GlusterfsVolume) Unmarshal added in v0.2.0

func (s *GlusterfsVolume) Unmarshal(obj map[string]interface{}, selector []string) error

type HTTPIngressPath added in v0.3.0

type HTTPIngressPath struct {
	Path string `json:"path,omitempty"`

	// Backend::IngressBackend
	ServiceName string             `json:"service"`
	ServicePort intstr.IntOrString `json:"port"`
}

type HorizontalPodAutoscaler added in v0.4.0

type HorizontalPodAutoscaler struct {
	Version     string            `json:"version,omitempty"`
	Cluster     string            `json:"cluster,omitempty"`
	Name        string            `json:"name,omitempty"`
	Namespace   string            `json:"namespace,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`

	HorizontalPodAutoscalerSpec `json:",inline"`

	HorizontalPodAutoscalerStatus `json:",inline"`
}

type HorizontalPodAutoscalerSpec added in v0.4.0

type HorizontalPodAutoscalerSpec struct {
	ScaleTargetRef                 CrossVersionObjectReference `json:"ref"`
	MinReplicas                    *int32                      `json:"min,omitempty"`
	MaxReplicas                    int32                       `json:"max"`
	TargetCPUUtilizationPercentage *int32                      `json:"percent_cpu,omitempty"`
}

type HorizontalPodAutoscalerStatus added in v0.4.0

type HorizontalPodAutoscalerStatus struct {
	ObservedGeneration              *int64       `json:"generation_observed,omitempty"`
	LastScaleTime                   *metav1.Time `json:"last_scaling,omitempty"`
	CurrentReplicas                 int32        `json:"current,omitempty"`
	DesiredReplicas                 int32        `json:"desired,omitempty"`
	CurrentCPUUtilizationPercentage *int32       `json:"current_percent_cpu,omitempty"`
}

current status of a horizontal pod autoscaler

type HorizontalPodAutoscalerWrapper added in v0.4.0

type HorizontalPodAutoscalerWrapper struct {
	HPA HorizontalPodAutoscaler `json:"hpa"`
}

type HostMode

type HostMode string
const (
	HostModeNet HostMode = "net"
	HostModePID HostMode = "pid"
	HostModeIPC HostMode = "ipc"
)

type HostPathType added in v0.2.0

type HostPathType string
const (
	HostPathUnset             HostPathType = ""
	HostPathDirectoryOrCreate HostPathType = "dir-or-create"
	HostPathDirectory         HostPathType = "dir"
	HostPathFileOrCreate      HostPathType = "file-or-create"
	HostPathFile              HostPathType = "file"
	HostPathSocket            HostPathType = "socket"
	HostPathCharDev           HostPathType = "char-dev"
	HostPathBlockDev          HostPathType = "block-dev"
)

type HostPathVolume added in v0.2.0

type HostPathVolume struct {
	Path string       `json:"-"`
	Type HostPathType `json:"-"`
}

func (HostPathVolume) Marshal added in v0.2.0

func (s HostPathVolume) Marshal() (*MarshalledVolume, error)

func (*HostPathVolume) Unmarshal added in v0.2.0

func (s *HostPathVolume) Unmarshal(selector []string) error

type HostPortRange added in v0.4.0

type HostPortRange struct {
	Min int32 `json:"min,omitempty"`
	Max int32 `json:"max,omitempty"`
}

type IDRange added in v0.4.0

type IDRange struct {
	Min int64 `json:"min,omitempty"`
	Max int64 `json:"max,omitempty"`
}

type IPAddr

type IPAddr string

type ISCSIPersistentVolume added in v0.3.0

type ISCSIPersistentVolume struct {
	TargetPortal   string   `json:"target_portal"`
	IQN            string   `json:"iqn"`
	Lun            int32    `json:"lun"`
	ISCSIInterface string   `json:"iscsi_interface,omitempty"`
	FSType         string   `json:"fs,omitempty"`
	ReadOnly       bool     `json:"ro,omitempty"`
	Portals        []string `json:"portals,omitempty"`
	// TODO: should this actually be "chap_auth"?
	DiscoveryCHAPAuth bool             `json:"chap_discovery,omitempty"`
	SessionCHAPAuth   bool             `json:"chap_session,omitempty"`
	SecretRef         *SecretReference `json:"secret,omitempty"`
	// NOTE: InitiatorName is a pointer in k8s
	InitiatorName string `json:"initiator,omitempty"`
}

func (ISCSIPersistentVolume) Marshal added in v0.3.0

func (*ISCSIPersistentVolume) Unmarshal added in v0.3.0

func (s *ISCSIPersistentVolume) Unmarshal(obj map[string]interface{}, selector []string) error

type ISCSIVolume added in v0.2.0

type ISCSIVolume struct {
	TargetPortal   string   `json:"target_portal"`
	IQN            string   `json:"iqn"`
	Lun            int32    `json:"lun"`
	ISCSIInterface string   `json:"iscsi_interface,omitempty"`
	FSType         string   `json:"fs,omitempty"`
	ReadOnly       bool     `json:"ro,omitempty"`
	Portals        []string `json:"portals,omitempty"`
	// TODO: should this actually be "chap_auth"?
	DiscoveryCHAPAuth bool   `json:"chap_discovery,omitempty"`
	SessionCHAPAuth   bool   `json:"chap_session,omitempty"`
	SecretRef         string `json:"secret,omitempty"`
	// NOTE: InitiatorName is a pointer in k8s
	InitiatorName string `json:"initiator,omitempty"`
}

func (ISCSIVolume) Marshal added in v0.2.0

func (s ISCSIVolume) Marshal() (*MarshalledVolume, error)

func (*ISCSIVolume) Unmarshal added in v0.2.0

func (s *ISCSIVolume) Unmarshal(obj map[string]interface{}, selector []string) error

type Ingress

type Ingress struct {
	Version     string            `json:"version,omitempty"`
	Cluster     string            `json:"cluster,omitempty"`
	Name        string            `json:"name,omitempty"`
	Namespace   string            `json:"namespace,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`

	// Backend::*IngressBackend
	ServiceName string              `json:"backend,omitempty"`
	ServicePort *intstr.IntOrString `json:"backend_port,omitempty"`

	TLS   []IngressTLS  `json:"tls,omitempty"`
	Rules []IngressRule `json:"rules,omitempty"`

	// Status::IngressStatus LoadBalancer::LoadBalancerStatus
	LoadBalancerIngress []LoadBalancerIngress `json:"endpoints,omitempty"`
}

type IngressRule added in v0.3.0

type IngressRule struct {
	Host string `json:"host,omitempty"`

	// inline::IngressRuleValue HTTP::*HTTPIngressRuleValue
	Paths []HTTPIngressPath `json:"paths"`
}

type IngressTLS added in v0.3.0

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

type IngressWrapper added in v0.3.0

type IngressWrapper struct {
	Ingress Ingress `json:"ingress"`
}

type InitializerConfig added in v0.4.0

type InitializerConfig struct {
	Version     string            `json:"version,omitempty"`
	Cluster     string            `json:"cluster,omitempty"`
	Name        string            `json:"name,omitempty"`
	Namespace   string            `json:"namespace,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`

	Rules map[string][]InitializerRule `json:"rules,omitempty"`
}

type InitializerConfigWrapper added in v0.4.0

type InitializerConfigWrapper struct {
	InitializerConfig InitializerConfig `json:"initializer_config"`
}

type InitializerRule added in v0.4.0

type InitializerRule struct {
	Groups    []string
	Versions  []string
	Resources []string
}

func (InitializerRule) MarshalJSON added in v0.4.0

func (i InitializerRule) MarshalJSON() ([]byte, error)

func (*InitializerRule) UnmarshalJSON added in v0.4.0

func (i *InitializerRule) UnmarshalJSON(data []byte) error

type Job added in v0.2.0

type Job struct {
	Version string `json:"version,omitempty"`

	PodTemplateMeta `json:",inline"`
	JobTemplate     `json:",inline"`
	JobStatus       `json:",inline"`
}

type JobCondition added in v0.2.0

type JobCondition struct {
	Type               JobConditionType `json:"type"`
	Status             ConditionStatus  `json:"status"`
	LastProbeTime      metav1.Time      `json:"timestamp,omitempty"`
	LastTransitionTime metav1.Time      `json:"last_change,omitempty"`
	Reason             string           `json:"reason,omitempty"`
	Message            string           `json:"message,omitempty"`
}

type JobConditionType added in v0.2.0

type JobConditionType string
const (
	JobComplete JobConditionType = "Complete"
	JobFailed   JobConditionType = "Failed"
)

type JobStatus added in v0.2.0

type JobStatus struct {
	Conditions []JobCondition `json:"condition,omitempty"`
	StartTime  *metav1.Time   `json:"start_time,omitempty"`
	EndTime    *metav1.Time   `json:"end_time,omitempty"`
	Running    *int32         `json:"running,omitempty"`
	Successful *int32         `json:"successful,omitempty"`
	Failed     *int32         `json:"failed,omitempty"`
}

type JobTemplate added in v0.2.0

type JobTemplate struct {
	Parallelism *int32 `json:"parallelism,omitempty"`
	Completions *int32 `json:"completions,omitempty"`
	MaxRetries  *int32 `json:"max_retries,omitempty"`

	ActiveDeadlineSeconds *int64 `json:"active_deadline,omitempty"`

	// Selector in ReplicaSet can express more complex rules than just matching
	// pod labels, so it needs its own field (unlike in ReplicationController).
	// Leaving it blank has the same effect as omitting Selector in RC.
	Selector *RSSelector `json:"selector,omitempty"`

	ManualSelector *bool `json:"select_manually,omitempty"`

	TemplateMetadata *PodTemplateMeta `json:"pod_meta,omitempty"`
	PodTemplate      `json:",inline"`
}

type JobWrapper added in v0.2.0

type JobWrapper struct {
	Job Job `json:"job"`
}

type KeyAndMode added in v0.2.0

type KeyAndMode struct {
	Key  string    `json:"-"`
	Mode *FileMode `json:"-"`
}

func (KeyAndMode) MarshalJSON added in v0.2.0

func (k KeyAndMode) MarshalJSON() ([]byte, error)

func (*KeyAndMode) UnmarshalJSON added in v0.2.0

func (k *KeyAndMode) UnmarshalJSON(data []byte) error

type Lifecycle

type Lifecycle struct {
	OnStart *Action `json:"on_start,omitempty"`
	PreStop *Action `json:"pre_stop,omitempty"`
}

type LimitRange added in v0.4.0

type LimitRange struct {
	Version     string            `json:"version,omitempty"`
	Cluster     string            `json:"cluster,omitempty"`
	Name        string            `json:"name,omitempty"`
	Namespace   string            `json:"namespace,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`

	// Spec::LimitRangeSpec
	Limits []LimitRangeItem `json:"limits"`
}

type LimitRangeItem added in v0.4.0

type LimitRangeItem struct {
	// Type of resource that this limit applies to.
	Type LimitType `json:"kind,omitempty"`
	// Max usage constraints on this kind by resource name.
	Max v1.ResourceList `json:"max,omitempty"`
	// Min usage constraints on this kind by resource name.
	Min v1.ResourceList `json:"min,omitempty"`
	// Default resource requirement limit value by resource name
	//   (if resource limit is omitted)
	Default v1.ResourceList `json:"default_max,omitempty"`
	// default resource requirement request value by resource name
	// (if resource request is omitted)
	DefaultRequest v1.ResourceList `json:"default_min,omitempty"`
	// MaxLimitRequestRatio represents the max burst for the named resource.
	MaxLimitRequestRatio v1.ResourceList `json:"max_burst_ratio,omitempty"`
}

type LimitRangeWrapper added in v0.4.0

type LimitRangeWrapper struct {
	LimitRange `json:"limit_range"`
}

type LimitType added in v0.4.0

type LimitType string
const (
	LimitTypePod                   LimitType = "pod"
	LimitTypeContainer             LimitType = "container"
	LimitTypePersistentVolumeClaim LimitType = "pvc"
)

type LoadBalancer

type LoadBalancer struct {
	IP                  IPAddr
	Allowed             []CIDR
	HealthCheckNodePort int32
	Ingress             []LoadBalancerIngress
}

LoadBalancer helper type.

type LoadBalancerIngress added in v0.3.0

type LoadBalancerIngress struct {
	IP       net.IP
	Hostname string
}

func (*LoadBalancerIngress) InitFromString added in v0.3.0

func (i *LoadBalancerIngress) InitFromString(s string)

func (LoadBalancerIngress) MarshalJSON added in v0.3.0

func (i LoadBalancerIngress) MarshalJSON() ([]byte, error)

func (LoadBalancerIngress) String added in v0.3.0

func (i LoadBalancerIngress) String() string

func (*LoadBalancerIngress) UnmarshalJSON added in v0.3.0

func (i *LoadBalancerIngress) UnmarshalJSON(data []byte) error

type LocalVolume added in v0.2.0

type LocalVolume struct {
	Path string `json:"path"`
}

func (LocalVolume) Marshal added in v0.2.0

func (s LocalVolume) Marshal() (*MarshalledVolume, error)

func (*LocalVolume) Unmarshal added in v0.2.0

func (s *LocalVolume) Unmarshal(obj map[string]interface{}, selector []string) error

type MarshalledVolume added in v0.2.0

type MarshalledVolume struct {
	Type        string
	Selector    []string
	ExtraFields map[string]interface{}
}

type Mem

type Mem struct {
	Min string `json:"min,omitempty"`
	Max string `json:"max,omitempty"`
}

type MountPropagation

type MountPropagation string
const (
	MountPropagationHostToContainer MountPropagation = "host-to-container"
	MountPropagationBidirectional   MountPropagation = "bidirectional"
)

type NFSVolume added in v0.2.0

type NFSVolume struct {
	Server   string `json:"-"`
	Path     string `json:"-"`
	ReadOnly bool   `json:"-"`
}

func (NFSVolume) Marshal added in v0.2.0

func (s NFSVolume) Marshal() (*MarshalledVolume, error)

func (*NFSVolume) Unmarshal added in v0.2.0

func (s *NFSVolume) Unmarshal(selector []string) error

type NamedServicePort

type NamedServicePort struct {
	Name     string
	Port     ServicePort
	NodePort int32
}

func (*NamedServicePort) InitFromMap

func (n *NamedServicePort) InitFromMap(obj map[string]interface{}) error

func (NamedServicePort) MarshalJSON

func (n NamedServicePort) MarshalJSON() ([]byte, error)

func (*NamedServicePort) UnmarshalJSON

func (n *NamedServicePort) UnmarshalJSON(data []byte) error

type Namespace added in v0.4.0

type Namespace struct {
	Version     string            `json:"version,omitempty"`
	Cluster     string            `json:"cluster,omitempty"`
	Name        string            `json:"name,omitempty"`
	Namespace   string            `json:"namespace,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`

	Finalizers []FinalizerName `json:"finalizers,omitempty"`

	Phase NamespacePhase `json:"phase,omitempty"`
}

type NamespacePhase added in v0.4.0

type NamespacePhase string
const (
	NamespaceActive      NamespacePhase = "Active"
	NamespaceTerminating NamespacePhase = "Terminating"
)

type NamespaceWrapper added in v0.4.0

type NamespaceWrapper struct {
	Namespace `json:"namespace"`
}

type NetAction

type NetAction struct {
	Headers []string `json:"headers,omitempty"`
	URL     string   `json:"url,omitempty"`
}

type ObjectFieldSelector added in v0.2.0

type ObjectFieldSelector struct {
	// required
	FieldPath string `json:"-"`

	// optional
	APIVersion string `json:"-"`
}

func (ObjectFieldSelector) MarshalJSON added in v0.2.0

func (s ObjectFieldSelector) MarshalJSON() ([]byte, error)

func (*ObjectFieldSelector) UnmarshalJSON added in v0.2.0

func (s *ObjectFieldSelector) UnmarshalJSON(data []byte) error

type ObjectReference added in v0.2.0

type ObjectReference struct {
	Kind            string `json:"kind,omitempty"`
	Namespace       string `json:"namespace,omitempty"`
	Name            string `json:"name,omitempty"`
	UID             string `json:"uid,omitempty"`
	Version         string `json:"version,omitempty"`
	ResourceVersion string `json:"resource_version,omitempty"`
	FieldPath       string `json:"field_path,omitempty"`
}

type PVCVolume added in v0.2.0

type PVCVolume struct {
	ClaimName string `json:"-"`
	ReadOnly  bool   `json:"-"`
}

func (PVCVolume) Marshal added in v0.2.0

func (s PVCVolume) Marshal() (*MarshalledVolume, error)

type PersistentVolume

type PersistentVolume struct {
	PersistentVolumeMeta
	PersistentVolumeSource
}

func (PersistentVolume) MarshalJSON

func (v PersistentVolume) MarshalJSON() ([]byte, error)

func (*PersistentVolume) UnmarshalJSON

func (v *PersistentVolume) UnmarshalJSON(data []byte) error

type PersistentVolumeAccessMode added in v0.2.0

type PersistentVolumeAccessMode string
const (
	ReadWriteOnce PersistentVolumeAccessMode = "rw_once"
	ReadOnlyMany  PersistentVolumeAccessMode = "ro_many"
	ReadWriteMany PersistentVolumeAccessMode = "rw_many"
)

type PersistentVolumeClaim added in v0.2.0

type PersistentVolumeClaim struct {
	Version     string            `json:"version,omitempty"`
	Cluster     string            `json:"cluster,omitempty"`
	Name        string            `json:"name,omitempty"`
	Namespace   string            `json:"namespace,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`

	StorageClass *string                      `json:"storage_class,omitempty"`
	Volume       string                       `json:"volume,omitempty"`
	AccessModes  []PersistentVolumeAccessMode `json:"access_modes,omitempty"`
	Storage      string                       `json:"storage,omitempty"`

	// Selector in ReplicaSet can express more complex rules than just matching
	// pod labels, so it needs its own field (unlike in ReplicationController).
	// Leaving it blank has the same effect as omitting Selector in RC.
	Selector *RSSelector `json:"selector,omitempty"`

	PersistentVolumeClaimStatus `json:",inline"`
}

type PersistentVolumeClaimCondition added in v0.2.0

type PersistentVolumeClaimCondition struct {
	Type               PersistentVolumeClaimConditionType `json:"type,omitempty"`
	Status             ConditionStatus                    `json:"status"`
	LastProbeTime      metav1.Time                        `json:"timestamp,omitempty"`
	LastTransitionTime metav1.Time                        `json:"last_change,omitempty"`
	Reason             string                             `json:"reason,omitempty"`
	Message            string                             `json:"message,omitempty"`
}

type PersistentVolumeClaimConditionType added in v0.2.0

type PersistentVolumeClaimConditionType string
const (
	PersistentVolumeClaimResizing PersistentVolumeClaimConditionType = "resizing"
)

type PersistentVolumeClaimPhase added in v0.2.0

type PersistentVolumeClaimPhase string
const (
	ClaimPending PersistentVolumeClaimPhase = "pending"
	ClaimBound   PersistentVolumeClaimPhase = "bound"
	ClaimLost    PersistentVolumeClaimPhase = "lost"
)

type PersistentVolumeClaimStatus added in v0.2.0

type PersistentVolumeClaimStatus struct {
	Phase       PersistentVolumeClaimPhase       `json:"phase,omitempty"`
	AccessModes []PersistentVolumeAccessMode     `json:"access_modes,omitempty"`
	Storage     string                           `json:"storage,omitempty"`
	Conditions  []PersistentVolumeClaimCondition `json:"condition,omitempty"`
}

type PersistentVolumeClaimWrapper added in v0.2.0

type PersistentVolumeClaimWrapper struct {
	PersistentVolumeClaim `json:"pvc,omitempty"`
}

type PersistentVolumeMeta

type PersistentVolumeMeta struct {
	Version     string            `json:"version,omitempty"`
	Cluster     string            `json:"cluster,omitempty"`
	Name        string            `json:"name,omitempty"`
	Namespace   string            `json:"namespace,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`

	Storage       *resource.Quantity            `json:"storage,omitempty"`
	AccessModes   *AccessModes                  `json:"modes,omitempty"`
	Claim         *v1.ObjectReference           `json:"claim,omitempty"`
	ReclaimPolicy PersistentVolumeReclaimPolicy `json:"reclaim,omitempty"`
	StorageClass  string                        `json:"storage_class,omitempty"`

	// comma-separated list of options
	MountOptions string `json:"mount_opts,omitempty"`

	PersistentVolumeStatus `json:",inline"`
}

type PersistentVolumePhase added in v0.2.0

type PersistentVolumePhase string
const (
	VolumePending   PersistentVolumePhase = "pending"
	VolumeAvailable PersistentVolumePhase = "available"
	VolumeBound     PersistentVolumePhase = "bound"
	VolumeReleased  PersistentVolumePhase = "released"
	VolumeFailed    PersistentVolumePhase = "failed"
)

type PersistentVolumeReclaimPolicy

type PersistentVolumeReclaimPolicy string
const (
	PersistentVolumeReclaimRecycle PersistentVolumeReclaimPolicy = "recycle"
	PersistentVolumeReclaimDelete  PersistentVolumeReclaimPolicy = "delete"
	PersistentVolumeReclaimRetain  PersistentVolumeReclaimPolicy = "retain"
)

type PersistentVolumeSource

type PersistentVolumeSource struct {
	GcePD        *GcePDVolume
	AwsEBS       *AwsEBSVolume
	HostPath     *HostPathVolume
	Glusterfs    *GlusterfsVolume
	NFS          *NFSVolume
	ISCSI        *ISCSIPersistentVolume
	Cinder       *CinderVolume
	FibreChannel *FibreChannelVolume
	Flocker      *FlockerVolume
	Flex         *FlexVolume
	Vsphere      *VsphereVolume
	Quobyte      *QuobyteVolume
	AzureDisk    *AzureDiskVolume
	PhotonPD     *PhotonPDVolume
	Portworx     *PortworxVolume
	RBD          *RBDPersistentVolume
	CephFS       *CephFSPersistentVolume
	AzureFile    *AzureFilePersistentVolume
	ScaleIO      *ScaleIOPersistentVolume
	Local        *LocalVolume
	StorageOS    *StorageOSPersistentVolume
	CSI          *CSIPersistentVolume
}

func (PersistentVolumeSource) MarshalJSON

func (v PersistentVolumeSource) MarshalJSON() ([]byte, error)

func (*PersistentVolumeSource) Unmarshal added in v0.2.0

func (v *PersistentVolumeSource) Unmarshal(obj map[string]interface{}, volType string, selector []string) error

func (*PersistentVolumeSource) UnmarshalJSON

func (v *PersistentVolumeSource) UnmarshalJSON(data []byte) error

type PersistentVolumeStatus added in v0.2.0

type PersistentVolumeStatus struct {
	Phase   PersistentVolumePhase `json:"status,omitempty"`
	Message string                `json:"status_message,omitempty"`
	Reason  string                `json:"status_reason,omitempty"`
}

type PersistentVolumeWrapper

type PersistentVolumeWrapper struct {
	PersistentVolume PersistentVolume `json:"persistent_volume"`
}

type PhotonPDVolume added in v0.2.0

type PhotonPDVolume struct {
	PdID   string `json:"-"`
	FSType string `json:"-"`
}

func (PhotonPDVolume) Marshal added in v0.2.0

func (s PhotonPDVolume) Marshal() (*MarshalledVolume, error)

func (*PhotonPDVolume) Unmarshal added in v0.2.0

func (s *PhotonPDVolume) Unmarshal(selector []string) error

type Pod

type Pod struct {
	Version string `json:"version,omitempty"`

	Conditions []PodCondition `json:"condition,omitempty"`
	NodeIP     string         `json:"node_ip,omitempty"`
	StartTime  *metav1.Time   `json:"start_time,omitempty"`
	Msg        string         `json:"msg,omitempty"`
	Phase      PodPhase       `json:"phase,omitempty"`
	IP         string         `json:"ip,omitempty"`
	QOS        PodQOSClass    `json:"qos,omitempty"`
	Reason     string         `json:"reason,omitempty"`

	PodTemplateMeta `json:",inline"`
	PodTemplate     `json:",inline"`
}

type PodCondition

type PodCondition struct {
	LastProbeTime      metav1.Time      `json:"last_probe_time,omitempty"`
	LastTransitionTime metav1.Time      `json:"last_change,omitempty"`
	Msg                string           `json:"msg,omitempty"`
	Reason             string           `json:"reason,omitempty"`
	Status             ConditionStatus  `json:"status,omitempty"`
	Type               PodConditionType `json:"type,omitempty"`
}

type PodConditionType

type PodConditionType string
const (
	PodScheduled           PodConditionType = "scheduled"
	PodReady               PodConditionType = "ready"
	PodInitialized         PodConditionType = "initialized"
	PodReasonUnschedulable                  = "unschedulable"
)

type PodDisruptionBudget added in v0.4.0

type PodDisruptionBudget struct {
	Version     string            `json:"version,omitempty"`
	Cluster     string            `json:"cluster,omitempty"`
	Name        string            `json:"name,omitempty"`
	Namespace   string            `json:"namespace,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`

	MaxEvictionsAllowed *floatstr.FloatOrString `json:"max_evictions,omitempty"`
	MinPodsRequired     *floatstr.FloatOrString `json:"min_pods,omitempty"`

	// Selector in ReplicaSet can express more complex rules than just matching
	// pod labels, so it needs its own field (unlike in ReplicationController).
	// Leaving it blank has the same effect as omitting Selector in RC.
	Selector *RSSelector `json:"selector,omitempty"`

	// Status
	PodDisruptionBudgetStatus `json:",inline"`
}

type PodDisruptionBudgetStatus added in v0.4.0

type PodDisruptionBudgetStatus struct {
	ObservedGeneration    int64                  `json:"generation_observed,omitempty"`
	DisruptedPods         map[string]metav1.Time `json:"disrupted_pods,omitempty"`
	PodDisruptionsAllowed int32                  `json:"allowed_disruptions,omitempty"`
	CurrentHealthy        int32                  `json:"current_healthy_pods,omitempty"`
	DesiredHealthy        int32                  `json:"desired_healthy_pods,omitempty"`
	ExpectedPods          int32                  `json:"expected_pods,omitempty"`
}

type PodDisruptionBudgetWrapper added in v0.4.0

type PodDisruptionBudgetWrapper struct {
	PodDisruptionBudget PodDisruptionBudget `json:"pdb"`
}

type PodManagementPolicyType added in v0.2.0

type PodManagementPolicyType string
const (
	OrderedReadyPodManagement PodManagementPolicyType = "ordered"
	ParallelPodManagement                             = "parallel"
)

type PodPhase

type PodPhase string
const (
	PodPending   PodPhase = "pending"
	PodRunning   PodPhase = "running"
	PodSucceeded PodPhase = "succeeded"
	PodFailed    PodPhase = "failed"
	PodUnknown   PodPhase = "unknown"
)

type PodPreset added in v0.4.0

type PodPreset struct {
	Version     string            `json:"version,omitempty"`
	Cluster     string            `json:"cluster,omitempty"`
	Name        string            `json:"name,omitempty"`
	Namespace   string            `json:"namespace,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`

	// Selector in ReplicaSet can express more complex rules than just matching
	// pod labels, so it needs its own field (unlike in ReplicationController).
	// Leaving it blank has the same effect as omitting Selector in RC.
	Selector *RSSelector `json:"selector,omitempty"`

	Env          []Env             `json:"env,omitempty"`
	Volumes      map[string]Volume `json:"volumes,omitempty"`
	VolumeMounts []VolumeMount     `json:"mounts,omitempty"`
}

type PodPresetWrapper added in v0.4.0

type PodPresetWrapper struct {
	PodPreset PodPreset `json:"pod_preset"`
}

type PodQOSClass

type PodQOSClass string
const (
	PodQOSGuaranteed PodQOSClass = "guaranteed"
	PodQOSBurstable  PodQOSClass = "burstable"
	PodQOSBestEffort PodQOSClass = "best-effort"
)

type PodSecurityPolicy added in v0.4.0

type PodSecurityPolicy struct {
	Version     string            `json:"version,omitempty"`
	Cluster     string            `json:"cluster,omitempty"`
	Name        string            `json:"name,omitempty"`
	Namespace   string            `json:"namespace,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`

	Privileged          bool     `json:"privileged,omitempty"`
	AllowCapabilities   []string `json:"cap_allow,omitempty"`
	DenyCapabilities    []string `json:"cap_deny,omitempty"`
	DefaultCapabilities []string `json:"cap_default,omitempty"`

	VolumePlugins  []string        `json:"vol_plugins,omitempty"`
	HostMode       []HostMode      `json:"host_mode,omitempty"`
	HostPortRanges []HostPortRange `json:"host_port_ranges,omitempty"`

	SELinux     SELinuxPolicy `json:"selinux_policy,omitempty"`
	UIDPolicy   UIDPolicy     `json:"uid_policy,omitempty"`
	GIDPolicy   GIDPolicy     `json:"gid_policy,omitempty"`
	FSGIDPolicy GIDPolicy     `json:"fsgid_policy,omitempty"`

	ReadOnlyRootFS         bool  `json:"rootfs_ro,omitempty"`
	AllowEscalation        *bool `json:"allow_escalation,omitempty"`
	AllowEscalationDefault *bool `json:"allow_escalation_default,omitempty"`

	AllowedHostPaths   []string `json:"host_paths_allowed,omitempty"`
	AllowedFlexVolumes []string `json:"flex_volumes_allowed,omitempty"`
}

type PodSecurityPolicyWrapper added in v0.4.0

type PodSecurityPolicyWrapper struct {
	PodSecurityPolicy PodSecurityPolicy `json:"pod_security_policy"`
}

type PodTemplate added in v0.2.0

type PodTemplate struct {
	Volumes                map[string]Volume `json:"volumes,omitempty"`
	InitContainers         []Container       `json:"init_containers,omitempty"`
	Containers             []Container       `json:"containers,omitempty"`
	RestartPolicy          RestartPolicy     `json:"restart_policy,omitempty"`
	TerminationGracePeriod *int64            `json:"termination_grace_period,omitempty"`
	ActiveDeadline         *int64            `json:"active_deadline,omitempty"`
	DNSPolicy              DNSPolicy         `json:"dns_policy,omitempty"`
	Account                string            `json:"account,omitempty"`
	Node                   string            `json:"node,omitempty"`
	HostMode               []HostMode        `json:"host_mode,omitempty"`
	FSGID                  *int64            `json:"fs_gid,omitempty"`
	GIDs                   []int64           `json:"gids,omitempty"`
	Registries             []string          `json:"registry_secrets,omitempty"`
	Hostname               string            `json:"hostname,omitempty"`
	Affinity               []Affinity        `json:"affinity,omitempty"`
	SchedulerName          string            `json:"scheduler_name,omitempty"`
	Tolerations            []Toleration      `json:"tolerations,omitempty"`
	HostAliases            []string          `json:"host_aliases,omitempty"`
	Priority               *Priority         `json:"priority,omitempty"`
}

type PodTemplateMeta added in v0.2.0

type PodTemplateMeta struct {
	Cluster     string            `json:"cluster,omitempty"`
	Name        string            `json:"name,omitempty"`
	Namespace   string            `json:"namespace,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`
}

type PodWrapper

type PodWrapper struct {
	Pod Pod `json:"pod"`
}

type PolicyRule added in v0.4.0

type PolicyRule struct {
	Verbs []string `json:"verbs"`

	APIGroups     []string `json:"groups,omitempty"`
	Resources     []string `json:"resources,omitempty"`
	ResourceNames []string `json:"resource_names,omitempty"`

	NonResourceURLs []string `json:"non_resource_urls,omitempty"`
}

type Port

type Port struct {
	Name          string
	Protocol      Protocol
	IP            string
	HostPort      string
	ContainerPort string
}

func (*Port) ContainerPortInt

func (p *Port) ContainerPortInt() (int32, error)

func (*Port) HostPortInt

func (p *Port) HostPortInt() (int32, error)

func (*Port) InitFromString

func (p *Port) InitFromString(str string) error

func (Port) MarshalJSON

func (p Port) MarshalJSON() ([]byte, error)

func (*Port) ToString

func (p *Port) ToString() (string, error)

func (*Port) UnmarshalJSON

func (p *Port) UnmarshalJSON(data []byte) error

type PortworxVolume added in v0.2.0

type PortworxVolume struct {
	VolumeID string `json:"-"`
	FSType   string `json:"fs,omitempty"`
	ReadOnly bool   `json:"ro,omitempty"`
}

func (PortworxVolume) Marshal added in v0.2.0

func (s PortworxVolume) Marshal() (*MarshalledVolume, error)

func (*PortworxVolume) Unmarshal added in v0.2.0

func (s *PortworxVolume) Unmarshal(obj map[string]interface{}, selector []string) error

type Priority

type Priority struct {
	Value *int32 `json:"value,omitempty"`
	Class string `json:"class,omitempty"`
}

type PriorityClass added in v0.4.0

type PriorityClass struct {
	Version     string            `json:"version,omitempty"`
	Cluster     string            `json:"cluster,omitempty"`
	Name        string            `json:"name,omitempty"`
	Namespace   string            `json:"namespace,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`

	Value         int32  `json:"priority,omitempty"`
	GlobalDefault bool   `json:"default",omitempty`
	Description   string `json:"description,omitempty"`
}

type PriorityClassWrapper added in v0.4.0

type PriorityClassWrapper struct {
	PriorityClass PriorityClass `json:"priority_class"`
}

type Probe

type Probe struct {
	Action          `json:",inline"`
	Delay           int32 `json:"delay,omitempty"`
	Interval        int32 `json:"interval,omitempty"`
	MinCountSuccess int32 `json:"min_count_success,omitempty"`
	MinCountFailure int32 `json:"min_count_fail,omitempty"`
	Timeout         int32 `json:"timeout,omitempty"`
}

type ProjectedVolume added in v0.2.0

type ProjectedVolume struct {
	Sources     []VolumeProjection `json:"sources"`
	DefaultMode *FileMode          `json:"mode,omitempty"`
}

func (ProjectedVolume) Marshal added in v0.2.0

func (s ProjectedVolume) Marshal() (*MarshalledVolume, error)

type Protocol

type Protocol string
const (
	ProtocolTCP Protocol = "tcp"
	ProtocolUDP Protocol = "udp"
)

type PullPolicy

type PullPolicy string
const (
	PullAlways       PullPolicy = "always"
	PullNever        PullPolicy = "never"
	PullIfNotPresent PullPolicy = "if-not-present"
)

type QuobyteVolume added in v0.2.0

type QuobyteVolume struct {
	Registry string `json:"registry"`
	Volume   string `json:"-"`
	ReadOnly bool   `json:"ro,omitempty"`
	User     string `json:"user,omitempty"`
	Group    string `json:"group,omitempty"`
}

func (QuobyteVolume) Marshal added in v0.2.0

func (s QuobyteVolume) Marshal() (*MarshalledVolume, error)

func (*QuobyteVolume) Unmarshal added in v0.2.0

func (s *QuobyteVolume) Unmarshal(obj map[string]interface{}, selector []string) error

type RBDPersistentVolume added in v0.2.0

type RBDPersistentVolume struct {
	CephMonitors []string         `json:"monitors"`
	RBDImage     string           `json:"image"`
	FSType       string           `json:"fs,omitempty"`
	RBDPool      string           `json:"pool,omitempty"`
	RadosUser    string           `json:"user,omitempty"`
	Keyring      string           `json:"keyring,omitempty"`
	SecretRef    *SecretReference `json:"secret,omitempty"`
	ReadOnly     bool             `json:"ro,omitempty"`
}

func (RBDPersistentVolume) Marshal added in v0.2.0

func (s RBDPersistentVolume) Marshal() (*MarshalledVolume, error)

func (*RBDPersistentVolume) Unmarshal added in v0.2.0

func (s *RBDPersistentVolume) Unmarshal(obj map[string]interface{}, selector []string) error

type RBDVolume added in v0.2.0

type RBDVolume struct {
	CephMonitors []string `json:"monitors"`
	RBDImage     string   `json:"image"`
	FSType       string   `json:"fs,omitempty"`
	RBDPool      string   `json:"pool,omitempty"`
	RadosUser    string   `json:"user,omitempty"`
	Keyring      string   `json:"keyring,omitempty"`
	SecretRef    string   `json:"secret,omitempty"`
	ReadOnly     bool     `json:"ro,omitempty"`
}

func (RBDVolume) Marshal added in v0.2.0

func (s RBDVolume) Marshal() (*MarshalledVolume, error)

func (*RBDVolume) Unmarshal added in v0.2.0

func (s *RBDVolume) Unmarshal(obj map[string]interface{}, selector []string) error

type RSSelector

type RSSelector struct {
	Shorthand string
	Labels    map[string]string
}

func (RSSelector) MarshalJSON

func (s RSSelector) MarshalJSON() ([]byte, error)

func (*RSSelector) UnmarshalJSON

func (s *RSSelector) UnmarshalJSON(data []byte) error

type ReplicaSet

type ReplicaSet struct {
	Version     string            `json:"version,omitempty"`
	Cluster     string            `json:"cluster,omitempty"`
	Name        string            `json:"name,omitempty"`
	Namespace   string            `json:"namespace,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`

	Replicas        *int32 `json:"replicas,omitempty"`
	MinReadySeconds int32  `json:"ready_seconds,omitempty"`

	// Selector in ReplicaSet can express more complex rules than just matching
	// pod labels, so it needs its own field (unlike in ReplicationController).
	// Leaving it blank has the same effect as omitting Selector in RC.
	Selector *RSSelector `json:"selector,omitempty"`

	TemplateMetadata *PodTemplateMeta `json:"pod_meta,omitempty"`
	PodTemplate      `json:",inline"`

	// Status
	ReplicaSetStatus `json:",inline"`
}

type ReplicaSetCondition added in v0.2.0

type ReplicaSetCondition struct {
	Type               ReplicaSetConditionType `json:"type"`
	Status             ConditionStatus         `json:"status"`
	LastTransitionTime metav1.Time             `json:"last_change,omitempty"`
	Reason             string                  `json:"reason,omitempty"`
	Message            string                  `json:"message,omitempty"`
}

ReplicaSetCondition describes the state of a replica set at a certain point.

type ReplicaSetConditionType added in v0.2.0

type ReplicaSetConditionType string
const (
	ReplicaSetReplicaFailure ReplicaSetConditionType = "replica-failure"
)

type ReplicaSetReplicasStatus added in v0.2.0

type ReplicaSetReplicasStatus struct {
	Total        int32 `json:"total,omitempty"`
	FullyLabeled int32 `json:"fully_labeled,omitempty"`
	Ready        int32 `json:"ready,omitempty"`
	Available    int32 `json:"available,omitempty"`
}

type ReplicaSetStatus added in v0.2.0

type ReplicaSetStatus struct {
	ObservedGeneration int64                    `json:"generation_observed,omitempty"`
	Replicas           ReplicaSetReplicasStatus `json:"replicas_status,omitempty"`
	Conditions         []ReplicaSetCondition    `json:"condition,omitempty"`
}

type ReplicaSetWrapper

type ReplicaSetWrapper struct {
	ReplicaSet ReplicaSet `json:"replica_set"`
}

type ReplicationController

type ReplicationController struct {
	Version     string            `json:"version,omitempty"`
	Cluster     string            `json:"cluster,omitempty"`
	Name        string            `json:"name,omitempty"`
	Namespace   string            `json:"namespace,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`

	Replicas        *int32 `json:"replicas,omitempty"`
	MinReadySeconds int32  `json:"ready_seconds,omitempty"`

	// Selector and the Template's Labels are expected to be equal
	// if both exist, so we standardize on using the Template's labels.
	Selector map[string]string `json:"selector,omitempty"`

	// Template fields
	TemplateMetadata *PodTemplateMeta `json:"pod_meta,omitempty"`
	PodTemplate      `json:",inline"`

	// Status
	ReplicationControllerStatus `json:",inline"`
}

type ReplicationControllerCondition added in v0.2.0

type ReplicationControllerCondition struct {
	Type               ReplicationControllerConditionType `json:"type"`
	Status             ConditionStatus                    `json:"status"`
	LastTransitionTime metav1.Time                        `json:"last_change,omitempty"`
	Reason             string                             `json:"reason,omitempty"`
	Message            string                             `json:"message,omitempty"`
}

ReplicationControllerCondition describes the state of a replica set at a certain point.

type ReplicationControllerConditionType added in v0.2.0

type ReplicationControllerConditionType string
const (
	ReplicationControllerReplicaFailure ReplicationControllerConditionType = "replica-failure"
)

type ReplicationControllerReplicasStatus added in v0.2.0

type ReplicationControllerReplicasStatus struct {
	Total        int32 `json:"total,omitempty"`
	FullyLabeled int32 `json:"fully_labeled,omitempty"`
	Ready        int32 `json:"ready,omitempty"`
	Available    int32 `json:"available,omitempty"`
}

type ReplicationControllerStatus added in v0.2.0

type ReplicationControllerStatus struct {
	ObservedGeneration int64                                `json:"generation_observed,omitempty"`
	Replicas           *ReplicationControllerReplicasStatus `json:"replicas_status,omitempty"`
	Conditions         []ReplicationControllerCondition     `json:"condition,omitempty"`
}

type ReplicationControllerWrapper

type ReplicationControllerWrapper struct {
	ReplicationController ReplicationController `json:"replication_controller"`
}

type RestartPolicy

type RestartPolicy string
const (
	RestartPolicyAlways    RestartPolicy = "always"
	RestartPolicyOnFailure RestartPolicy = "on-failure"
	RestartPolicyNever     RestartPolicy = "never"
)

type SELinux

type SELinux struct {
	Level string `json:"level,omitempty"`
	Role  string `json:"role,omitempty"`
	Type  string `json:"type,omitempty"`
	User  string `json:"user,omitempty"`
}

type SELinuxPolicy added in v0.4.0

type SELinuxPolicy struct {
	Policy  SELinuxPolicyType `json:"policy,omitempty"`
	SELinux `json:",inline"`
}

type SELinuxPolicyType added in v0.4.0

type SELinuxPolicyType string
const (
	SELinuxPolicyAny  SELinuxPolicyType = "*"
	SELinuxPolicyMust SELinuxPolicyType = "must_be"
)

type ScaleIOPersistentVolume added in v0.2.0

type ScaleIOPersistentVolume struct {
	Gateway          string             `json:"gateway"`
	System           string             `json:"system"`
	SecretRef        SecretReference    `json:"secret"`
	SSLEnabled       bool               `json:"ssl,omitempty"`
	ProtectionDomain string             `json:"protection_domain,omitempty"`
	StoragePool      string             `json:"storage_pool,omitempty"`
	StorageMode      ScaleIOStorageMode `json:"storage_mode,omitempty"`
	VolumeName       string             `json:"-"`
	FSType           string             `json:"fs,omitempty"`
	ReadOnly         bool               `json:"ro,omitempty"`
}

func (ScaleIOPersistentVolume) Marshal added in v0.2.0

func (*ScaleIOPersistentVolume) Unmarshal added in v0.2.0

func (s *ScaleIOPersistentVolume) Unmarshal(obj map[string]interface{}, selector []string) error

type ScaleIOStorageMode added in v0.3.0

type ScaleIOStorageMode string
const (
	ScaleIOStorageModeThick ScaleIOStorageMode = "thick"
	ScaleIOStorageModeThin  ScaleIOStorageMode = "thin"
)

type ScaleIOVolume added in v0.2.0

type ScaleIOVolume struct {
	Gateway          string             `json:"gateway"`
	System           string             `json:"system"`
	SecretRef        string             `json:"secret"`
	SSLEnabled       bool               `json:"ssl,omitempty"`
	ProtectionDomain string             `json:"protection_domain,omitempty"`
	StoragePool      string             `json:"storage_pool,omitempty"`
	StorageMode      ScaleIOStorageMode `json:"storage_mode,omitempty"`
	VolumeName       string             `json:"-"`
	FSType           string             `json:"fs,omitempty"`
	ReadOnly         bool               `json:"ro,omitempty"`
}

func (ScaleIOVolume) Marshal added in v0.2.0

func (s ScaleIOVolume) Marshal() (*MarshalledVolume, error)

type Secret added in v0.2.0

type Secret struct {
	Version     string            `json:"version,omitempty"`
	Cluster     string            `json:"cluster,omitempty"`
	Name        string            `json:"name,omitempty"`
	Namespace   string            `json:"namespace,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`
	StringData  map[string]string `json:"string_data,omitempty"`
	Data        map[string][]byte `json:"data,omitempty"`
	SecretType  SecretType        `json:"type,omitempty"`
}

type SecretProjection added in v0.2.0

type SecretProjection struct {
	Name string `json:"secret"`

	Items map[string]KeyAndMode `json:"items,omitempty"`

	// NOTE: opposite of Optional
	Required *bool `json:"required,omitempty"`
}

type SecretReference added in v0.2.0

type SecretReference struct {
	Name      string `json:"-"`
	Namespace string `json:"-"`
}

func (SecretReference) MarshalJSON added in v0.2.0

func (s SecretReference) MarshalJSON() ([]byte, error)

func (SecretReference) MarshalString added in v0.2.0

func (s SecretReference) MarshalString() string

func (*SecretReference) UnmarshalJSON added in v0.2.0

func (s *SecretReference) UnmarshalJSON(data []byte) error

func (*SecretReference) UnmarshalString added in v0.2.0

func (s *SecretReference) UnmarshalString(str string)

type SecretType added in v0.2.0

type SecretType string
const (
	SecretTypeOpaque              SecretType = "opaque"
	SecretTypeServiceAccountToken SecretType = "kubernetes.io/service-account-token"
	SecretTypeDockercfg           SecretType = "kubernetes.io/dockercfg"
	SecretTypeDockerConfigJson    SecretType = "kubernetes.io/dockerconfigjson"
	SecretTypeBasicAuth           SecretType = "kubernetes.io/basic-auth"
	SecretTypeSSHAuth             SecretType = "kubernetes.io/ssh-auth"
	SecretTypeTLS                 SecretType = "kubernetes.io/tls"
)

type SecretVolume added in v0.2.0

type SecretVolume struct {
	SecretName string `json:"-"`

	Items       map[string]KeyAndMode `json:"items,omitempty"`
	DefaultMode *FileMode             `json:"mode,omitempty"`

	// NOTE: opposite of Optional
	Required *bool `json:"required,omitempty"`
}

func (SecretVolume) Marshal added in v0.2.0

func (s SecretVolume) Marshal() (*MarshalledVolume, error)

type SecretWrapper added in v0.2.0

type SecretWrapper struct {
	Secret Secret `json:"secret,omitempty"`
}

type Selector

type Selector string

type Service

type Service struct {
	Version     string            `json:"version,omitempty"`
	Cluster     string            `json:"cluster,omitempty"`
	Name        string            `json:"name,omitempty"`
	Namespace   string            `json:"namespace,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`

	// ExternalName services only.
	ExternalName string `json:"cname,omitempty"`

	// ClusterIP services:
	Type ClusterIPServiceType `json:"type,omitempty"`

	Selector    map[string]string `json:"selector,omitempty"`
	ExternalIPs []IPAddr          `json:"external_ips,omitempty"`

	Port     *ServicePort       `json:"port,omitempty"`
	NodePort int32              `json:"node_port,omitempty"`
	Ports    []NamedServicePort `json:"ports,omitempty"`

	ClusterIP ClusterIP `json:"cluster_ip,omitempty"`

	PublishNotReadyAddresses bool                  `json:"unready_endpoints,omitempty"`
	ExternalTrafficPolicy    ExternalTrafficPolicy `json:"route_policy,omitempty"`
	ClientIPAffinity         *intbool.IntOrBool    `json:"stickiness,omitempty"`

	// LoadBalancer services:
	LoadBalancerIP      IPAddr                `json:"lb_ip,omitempty"`
	Allowed             []CIDR                `json:"lb_client_ips,omitempty"`
	HealthCheckNodePort int32                 `json:"healthcheck_port,omitempty"`
	Ingress             []LoadBalancerIngress `json:"endpoints,omitempty"`
}

func (*Service) SetLoadBalancer

func (s *Service) SetLoadBalancer(lb *LoadBalancer)

type ServicePort

type ServicePort struct {
	Expose int32

	// PodPort is a port or the name of a containerPort.
	PodPort *intstr.IntOrString

	// Protocol is optional. "" is empty.
	Protocol Protocol
}

func (*ServicePort) InitFromInt

func (p *ServicePort) InitFromInt(i int32)

func (*ServicePort) InitFromString

func (p *ServicePort) InitFromString(str string) error

func (ServicePort) MarshalJSON

func (p ServicePort) MarshalJSON() ([]byte, error)

func (*ServicePort) String

func (p *ServicePort) String() string

func (*ServicePort) ToInt

func (p *ServicePort) ToInt() (int32, error)

func (*ServicePort) UnmarshalJSON

func (p *ServicePort) UnmarshalJSON(data []byte) error

type ServiceWrapper

type ServiceWrapper struct {
	Service Service `json:"service"`
}

type StatefulSet added in v0.2.0

type StatefulSet struct {
	Version     string            `json:"version,omitempty"`
	Cluster     string            `json:"cluster,omitempty"`
	Name        string            `json:"name,omitempty"`
	Namespace   string            `json:"namespace,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`

	Replicas  *int32 `json:"replicas,omitempty"`
	OnDelete  bool   `json:"replace_on_delete,omitempty"`
	Partition *int32 `json:"partition,omitempty"`

	RevisionHistoryLimit *int32                  `json:"max_revs,omitempty"`
	PodManagementPolicy  PodManagementPolicyType `json:"pod_policy,omitempty"`
	Service              string                  `json:"service,omitempty"`
	PVCs                 []PersistentVolumeClaim `json:"pvcs,omitempty"`

	// Selector in ReplicaSet can express more complex rules than just matching
	// pod labels, so it needs its own field (unlike in ReplicationController).
	// Leaving it blank has the same effect as omitting Selector in RC.
	Selector *RSSelector `json:"selector,omitempty"`

	TemplateMetadata *PodTemplateMeta `json:"pod_meta,omitempty"`
	PodTemplate      `json:",inline"`

	// Status
	StatefulSetStatus `json:",inline"`
}

type StatefulSetStatus added in v0.2.0

type StatefulSetStatus struct {
	ObservedGeneration int64  `json:"generation_observed,omitempty"`
	Replicas           int32  `json:"replicas,omitempty"`
	ReadyReplicas      int32  `json:"ready,omitempty"`
	CurrentReplicas    int32  `json:"current,omitempty"`
	UpdatedReplicas    int32  `json:"updated,omitempty"`
	Revision           string `json:"rev,omitempty"`
	UpdateRevision     string `json:"update_rev,omitempty"`
	CollisionCount     *int32 `json:"hash_collisions,omitempty"`
}

type StatefulSetWrapper added in v0.2.0

type StatefulSetWrapper struct {
	StatefulSet StatefulSet `json:"stateful_set"`
}

type StorageClass added in v0.2.0

type StorageClass struct {
	Version     string            `json:"version,omitempty"`
	Cluster     string            `json:"cluster,omitempty"`
	Name        string            `json:"name,omitempty"`
	Namespace   string            `json:"namespace,omitempty"`
	Labels      map[string]string `json:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`

	Provisioner          string                         `json:"provisioner,omitempty"`
	Parameters           map[string]string              `json:"params, omitempty"`
	Reclaim              *PersistentVolumeReclaimPolicy `json:"reclaim,omitempty"`
	MountOptions         []string                       `json:"mount_opts,omitempty"`
	AllowVolumeExpansion *bool                          `json:"allow_expansion,omitempty"`
	VolumeBindingMode    *VolumeBindingMode             `json:"binding_mode,omitempty"`
}

type StorageClassWrapper added in v0.2.0

type StorageClassWrapper struct {
	StorageClass `json:"storage_class,omitempty"`
}

type StorageMedium added in v0.2.0

type StorageMedium string
const (
	StorageMediumDefault   StorageMedium = ""           // use whatever the default is for the node
	StorageMediumMemory    StorageMedium = "memory"     // use memory (tmpfs)
	StorageMediumHugePages StorageMedium = "huge-pages" // use hugepages
)

type StorageOSPersistentVolume added in v0.2.0

type StorageOSPersistentVolume struct {
	VolumeName      string           `json:"-"`
	VolumeNamespace string           `json:"vol_ns,omitempty"`
	FSType          string           `json:"fs,omitempty"`
	ReadOnly        bool             `json:"ro,omitempty"`
	SecretRef       *SecretReference `json:"secret,omitempty"`
}

func (StorageOSPersistentVolume) Marshal added in v0.2.0

func (*StorageOSPersistentVolume) Unmarshal added in v0.2.0

func (s *StorageOSPersistentVolume) Unmarshal(obj map[string]interface{}, selector []string) error

type StorageOSVolume added in v0.2.0

type StorageOSVolume struct {
	VolumeName      string `json:"-"`
	VolumeNamespace string `json:"vol_ns,omitempty"`
	FSType          string `json:"fs,omitempty"`
	ReadOnly        bool   `json:"ro,omitempty"`
	SecretRef       string `json:"secret,omitempty"`
}

func (StorageOSVolume) Marshal added in v0.2.0

func (s StorageOSVolume) Marshal() (*MarshalledVolume, error)

func (*StorageOSVolume) Unmarshal added in v0.2.0

func (s *StorageOSVolume) Unmarshal(obj map[string]interface{}, selector []string) error

type TerminationMessagePolicy

type TerminationMessagePolicy string
const (
	TerminationMessageReadFile              TerminationMessagePolicy = "file"
	TerminationMessageFallbackToLogsOnError TerminationMessagePolicy = "fallback-to-logs-on-error"
)

type Toleration

type Toleration struct {
	ExpiryAfter *int64 `json:"expiry_after,omitempty"`
	Selector    `json:"selector"`
}

type UIDPolicy added in v0.4.0

type UIDPolicy struct {
	Policy UIDPolicyType `json:"policy,omitempty"`
	Ranges []IDRange     `json:"ranges,omitempty"`
}

type UIDPolicyType added in v0.4.0

type UIDPolicyType string
const (
	UIDPolicyAny     UIDPolicyType = "*"
	UIDPolicyMust    UIDPolicyType = "must_be"
	UIDPolicyNonRoot UIDPolicyType = "non_root"
)

type Volume

type Volume struct {
	HostPath     *HostPathVolume
	EmptyDir     *EmptyDirVolume
	GcePD        *GcePDVolume
	AwsEBS       *AwsEBSVolume
	AzureDisk    *AzureDiskVolume
	AzureFile    *AzureFileVolume
	CephFS       *CephFSVolume
	Cinder       *CinderVolume
	FibreChannel *FibreChannelVolume
	Flex         *FlexVolume
	Flocker      *FlockerVolume
	Glusterfs    *GlusterfsVolume
	ISCSI        *ISCSIVolume
	NFS          *NFSVolume
	PhotonPD     *PhotonPDVolume
	Portworx     *PortworxVolume
	PVC          *PVCVolume
	Quobyte      *QuobyteVolume
	ScaleIO      *ScaleIOVolume
	Vsphere      *VsphereVolume
	ConfigMap    *ConfigMapVolume
	Secret       *SecretVolume
	DownwardAPI  *DownwardAPIVolume
	Projected    *ProjectedVolume
	Git          *GitVolume
	RBD          *RBDVolume
	StorageOS    *StorageOSVolume
}

func (Volume) MarshalJSON

func (v Volume) MarshalJSON() ([]byte, error)

func (*Volume) Unmarshal added in v0.2.0

func (v *Volume) Unmarshal(obj map[string]interface{}, volType string, selector []string) error

func (*Volume) UnmarshalAzureFileVolume added in v0.2.0

func (v *Volume) UnmarshalAzureFileVolume(selector []string) error

func (*Volume) UnmarshalCephFSVolume added in v0.2.0

func (v *Volume) UnmarshalCephFSVolume(obj map[string]interface{}, selector []string) error

func (*Volume) UnmarshalConfigMapVolume added in v0.2.0

func (v *Volume) UnmarshalConfigMapVolume(obj map[string]interface{}, selector []string) error

func (*Volume) UnmarshalDownwardAPIVolume added in v0.2.0

func (v *Volume) UnmarshalDownwardAPIVolume(obj map[string]interface{}, selector []string) error

func (*Volume) UnmarshalEmptyDirVolume added in v0.2.0

func (v *Volume) UnmarshalEmptyDirVolume(obj map[string]interface{}, selector []string) error

func (*Volume) UnmarshalGitVolume added in v0.2.0

func (v *Volume) UnmarshalGitVolume(obj map[string]interface{}, selector []string) error

func (*Volume) UnmarshalJSON

func (v *Volume) UnmarshalJSON(data []byte) error

func (*Volume) UnmarshalPVCVolume added in v0.2.0

func (v *Volume) UnmarshalPVCVolume(selector []string) error

func (*Volume) UnmarshalProjectedVolume added in v0.2.0

func (v *Volume) UnmarshalProjectedVolume(obj map[string]interface{}, selector []string) error

func (*Volume) UnmarshalScaleIOVolume added in v0.2.0

func (v *Volume) UnmarshalScaleIOVolume(obj map[string]interface{}, selector []string) error

func (*Volume) UnmarshalSecretVolume added in v0.2.0

func (v *Volume) UnmarshalSecretVolume(obj map[string]interface{}, selector []string) error

type VolumeBindingMode added in v0.3.0

type VolumeBindingMode string
const (
	VolumeBindingImmediate            VolumeBindingMode = "immediate"
	VolumeBindingWaitForFirstConsumer VolumeBindingMode = "wait-for-first-consumer"
)

type VolumeMount

type VolumeMount struct {
	MountPath   string           `json:"mount,omitempty"`
	Propagation MountPropagation `json:"propagation,omitempty"`
	Store       string           `json:"store,omitempty"`
}

type VolumeProjection added in v0.2.0

type VolumeProjection struct {
	Secret      *SecretProjection      `json:"-"`
	DownwardAPI *DownwardAPIProjection `json:"-"`
	ConfigMap   *ConfigMapProjection   `json:"-"`
}

func (VolumeProjection) MarshalJSON added in v0.2.0

func (p VolumeProjection) MarshalJSON() ([]byte, error)

func (*VolumeProjection) UnmarshalJSON added in v0.2.0

func (p *VolumeProjection) UnmarshalJSON(data []byte) error

type VolumeResourceFieldSelector added in v0.2.0

type VolumeResourceFieldSelector struct {
	// required
	ContainerName string `json:"-"`

	// required
	Resource string `json:"-"`

	// optional
	Divisor resource.Quantity `json:"-"`
}

func (VolumeResourceFieldSelector) MarshalJSON added in v0.2.0

func (s VolumeResourceFieldSelector) MarshalJSON() ([]byte, error)

func (*VolumeResourceFieldSelector) UnmarshalJSON added in v0.2.0

func (s *VolumeResourceFieldSelector) UnmarshalJSON(data []byte) error

type VolumeWrapper

type VolumeWrapper struct {
	Volume Volume `json:"volume"`
}

type VsphereStoragePolicy added in v0.2.0

type VsphereStoragePolicy struct {
	Name string `json:"name,omitempty"`
	ID   string `json:"id,omitempty"`
}

type VsphereVolume added in v0.2.0

type VsphereVolume struct {
	VolumePath    string                `json:"-"`
	FSType        string                `json:"fs,omitempty"`
	StoragePolicy *VsphereStoragePolicy `json:"policy,omitempty"`
}

func (VsphereVolume) Marshal added in v0.2.0

func (s VsphereVolume) Marshal() (*MarshalledVolume, error)

func (*VsphereVolume) Unmarshal added in v0.2.0

func (s *VsphereVolume) Unmarshal(obj map[string]interface{}, selector []string) error

Jump to

Keyboard shortcuts

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