v1beta1

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2018 License: Apache-2.0 Imports: 5 Imported by: 38

Documentation

Overview

+groupName=habitat.sh

Index

Constants

View Source
const (
	HabitatResourcePlural = "habitats"
	HabitatShortName      = "hab"

	// HabitatLabel labels the resources that belong to Habitat.
	// Example: 'habitat: true'
	HabitatLabel = "habitat"
	// HabitatNameLabel contains the user defined Habitat Service name.
	// Example: 'habitat-name: db'
	HabitatNameLabel = "habitat-name"

	TopologyLabel = "topology"
)
View Source
const (
	HabitatStateCreated   HabitatState = "Created"
	HabitatStateProcessed HabitatState = "Processed"

	TopologyStandalone Topology = "standalone"
	TopologyLeader     Topology = "leader"

	HabitatKind = "Habitat"
)
View Source
const (
	Version = "v1beta1"
)

Variables

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

SchemeGroupVersion is the group version used to register these objects.

Functions

func Kind added in v0.6.0

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group-qualified GroupResource.

Types

type Bind

type Bind struct {
	// Name is the name of the bind specified in the Habitat configuration files.
	Name string `json:"name"`
	// Service is the name of the service this bind refers to.
	Service string `json:"service"`
	// Group is the group of the service this bind refers to.
	Group string `json:"group"`
}

func (*Bind) DeepCopy

func (in *Bind) DeepCopy() *Bind

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

func (*Bind) DeepCopyInto

func (in *Bind) DeepCopyInto(out *Bind)

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

type Habitat

type Habitat struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Spec              HabitatSpec   `json:"spec"`
	Status            HabitatStatus `json:"status,omitempty"`
	// CustomVersion is a field that works around the lack of support for running
	// multiple versions of a CRD.  It encodes the actual version of the type, so
	// that controllers can decide whether to discard an object if the version
	// doesn't match.
	// When absent, it defaults to v1beta1.
	// +optional
	CustomVersion *string `json:"customVersion,omitempty"`
}

func (*Habitat) DeepCopy

func (in *Habitat) DeepCopy() *Habitat

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

func (*Habitat) DeepCopyInto

func (in *Habitat) DeepCopyInto(out *Habitat)

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

func (*Habitat) DeepCopyObject

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

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

type HabitatList

type HabitatList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []Habitat `json:"items"`
}

func (*HabitatList) DeepCopy

func (in *HabitatList) DeepCopy() *HabitatList

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

func (*HabitatList) DeepCopyInto

func (in *HabitatList) DeepCopyInto(out *HabitatList)

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

func (*HabitatList) DeepCopyObject

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

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

type HabitatSpec

type HabitatSpec struct {
	// Count is the amount of Services to start in this Habitat.
	Count int `json:"count"`
	// Image is the Docker image of the Habitat Service.
	Image   string  `json:"image"`
	Service Service `json:"service"`
	// Env is a list of environment variables.
	// The EnvVar type is documented at https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.9/#envvar-v1-core.
	// +optional
	Env []corev1.EnvVar `json:"env,omitempty"`
	// V1beta2 are fields for the v1beta2 type.
	// +optional
	V1beta2 *V1beta2 `json:"v1beta2"`
}

func (*HabitatSpec) DeepCopy

func (in *HabitatSpec) DeepCopy() *HabitatSpec

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

func (*HabitatSpec) DeepCopyInto

func (in *HabitatSpec) DeepCopyInto(out *HabitatSpec)

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

type HabitatState

type HabitatState string

type HabitatStatus

type HabitatStatus struct {
	State   HabitatState `json:"state,omitempty"`
	Message string       `json:"message,omitempty"`
}

func (*HabitatStatus) DeepCopy

func (in *HabitatStatus) DeepCopy() *HabitatStatus

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

func (*HabitatStatus) DeepCopyInto

func (in *HabitatStatus) DeepCopyInto(out *HabitatStatus)

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

type PersistentStorage added in v0.6.0

type PersistentStorage struct {
	// Size is the volume's size.
	// It uses the same format as Kubernetes' size fields, e.g. 10Gi
	Size string `json:"size"`
	// MountPath is the path at which the PersistentVolume will be mounted.
	MountPath string `json:"mountPath"`
	// StorageClassName is the name of the StorageClass that the StatefulSet will request.
	StorageClassName string `json:"storageClassName"`
}

PersistentStorage contains the details of the persistent storage that the cluster should provision.

func (*PersistentStorage) DeepCopy added in v0.6.0

func (in *PersistentStorage) DeepCopy() *PersistentStorage

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

func (*PersistentStorage) DeepCopyInto added in v0.6.0

func (in *PersistentStorage) DeepCopyInto(out *PersistentStorage)

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

type Service

type Service struct {
	// Group is the value of the --group flag for the hab client.
	// Optional. Defaults to `default`.
	Group string `json:"group"`
	// Topology is the value of the --topology flag for the hab client.
	Topology `json:"topology"`
	// ConfigSecretName is the name of a Secret containing a Habitat service's config in TOML format.
	// It will be mounted inside the pod as a file, and it will be used by Habitat to configure the service.
	// Optional.
	ConfigSecretName string `json:"configSecretName,omitempty"`
	// The name of the secret that contains the ring key.
	// Optional.
	RingSecretName string `json:"ringSecretName,omitempty"`
	// Bind is when one service connects to another forming a producer/consumer relationship.
	// Optional.
	Bind []Bind `json:"bind,omitempty"`
	// Name is the name of the Habitat service that this Habitat object represents.
	// This field is used to mount the user.toml file in the correct directory under /hab/user/ in the Pod.
	Name string `json:"name"`
}

func (*Service) DeepCopy

func (in *Service) DeepCopy() *Service

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

func (*Service) DeepCopyInto

func (in *Service) DeepCopyInto(out *Service)

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

type ServiceV1beta2 added in v0.6.0

type ServiceV1beta2 struct {
	// Group is the value of the --group flag for the hab client.
	// Defaults to `default`.
	// +optional
	Group *string `json:"group,omitempty"`
	// Topology is the value of the --topology flag for the hab client.
	Topology `json:"topology"`
	// ConfigSecretName is the name of a Secret containing a Habitat service's config in TOML format.
	// It will be mounted inside the pod as a file, and it will be used by Habitat to configure the service.
	// +optional
	ConfigSecretName *string `json:"configSecretName,omitempty"`
	// The name of the secret that contains the ring key.
	// +optional
	RingSecretName *string `json:"ringSecretName,omitempty"`
	// Bind is when one service connects to another forming a producer/consumer relationship.
	// +optional
	Bind []Bind `json:"bind,omitempty"`
	// Name is the name of the Habitat service that this Habitat object represents.
	// This field is used to mount the user.toml file in the correct directory under /hab/user/ in the Pod.
	Name string `json:"name"`
}

func (*ServiceV1beta2) DeepCopy added in v0.6.0

func (in *ServiceV1beta2) DeepCopy() *ServiceV1beta2

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

func (*ServiceV1beta2) DeepCopyInto added in v0.6.0

func (in *ServiceV1beta2) DeepCopyInto(out *ServiceV1beta2)

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

type Topology

type Topology string

func (Topology) String

func (t Topology) String() string

type V1beta2 added in v0.6.0

type V1beta2 struct {
	// Count is the amount of Services to start in this Habitat.
	Count int `json:"count"`
	// Image is the Docker image of the Habitat Service.
	Image   string         `json:"image"`
	Service ServiceV1beta2 `json:"service"`
	// Env is a list of environment variables.
	// The EnvVar type is documented at https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.9/#envvar-v1-core.
	// Optional.
	Env []corev1.EnvVar `json:"env,omitempty"`
	// +optional
	PersistentStorage *PersistentStorage `json:"persistentStorage,omitempty"`
}

V1beta2 are fields for the v1beta2 type.

func (*V1beta2) DeepCopy added in v0.6.0

func (in *V1beta2) DeepCopy() *V1beta2

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

func (*V1beta2) DeepCopyInto added in v0.6.0

func (in *V1beta2) DeepCopyInto(out *V1beta2)

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

Jump to

Keyboard shortcuts

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