Documentation ¶
Overview ¶
Package v1 is the initial version of types which integrate with the Kubernetes API.
Contains the Stack Definition Language(pkg: github.com/ovrclk/akash/sdl) Manifest declarations which are written to Kubernetes CRDs for storage.
Manifest { ManifestSpec { k8s.TypeMeta LeaseID ManifestGroup k8s.TypeMeta Name []*ManifestService ManifestService analogous to a running container. ManifestStatus State Message }
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // AddToScheme applies all the stored functions to the scheme AddToScheme = schemeBuilder.AddToScheme // SchemeGroupVersion creates a Rest client with the new CRD Schema SchemeGroupVersion = schema.GroupVersion{Group: crdGroup, Version: crdVersion} )
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type LeaseID ¶
type LeaseID struct { Owner string `json:"owner"` DSeq string `json:"dseq"` GSeq uint32 `json:"gseq"` OSeq uint32 `json:"oseq"` Provider string `json:"provider"` }
LeaseID stores deployment, group sequence, order, provider and metadata
func (*LeaseID) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LeaseID.
func (*LeaseID) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Manifest ¶
type Manifest struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` Spec ManifestSpec `json:"spec,omitempty"` Status ManifestStatus `json:"status,omitempty"` }
Manifest store metadata, specifications and status of the Lease
func NewManifest ¶
NewManifest creates new manifest with provided details. Returns error incase of failure.
func (*Manifest) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Manifest.
func (*Manifest) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Manifest) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (Manifest) Deployment ¶ added in v0.7.3
func (m Manifest) Deployment() (cluster.Deployment, error)
Deployment returns the cluster.Deployment that the saved manifest represents.
type ManifestGroup ¶
type ManifestGroup struct { // Placement profile name Name string `json:"name,omitempty"` // Service definitions Services []ManifestService `json:"services,omitempty"` }
ManifestGroup stores metadata, name and list of SDL manifest services
func (*ManifestGroup) DeepCopy ¶
func (in *ManifestGroup) DeepCopy() *ManifestGroup
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManifestGroup.
func (*ManifestGroup) DeepCopyInto ¶
func (in *ManifestGroup) DeepCopyInto(out *ManifestGroup)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ManifestList ¶
type ManifestList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:",inline"` Items []Manifest `json:"items"` }
ManifestList stores metadata and items list of manifest
func (*ManifestList) DeepCopy ¶
func (in *ManifestList) DeepCopy() *ManifestList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManifestList.
func (*ManifestList) DeepCopyInto ¶
func (in *ManifestList) DeepCopyInto(out *ManifestList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ManifestList) DeepCopyObject ¶
func (in *ManifestList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ManifestService ¶
type ManifestService struct { // Service name Name string `json:"name,omitempty"` // Docker image Image string `json:"image,omitempty"` Args []string `json:"args,omitempty"` Env []string `json:"env,omitempty"` // Resource requirements // in current version of CRD it is named as unit Resources ResourceUnits `json:"unit"` // Number of instances Count uint32 `json:"count,omitempty"` // Overlay Network Links Expose []ManifestServiceExpose `json:"expose,omitempty"` }
ManifestService stores name, image, args, env, unit, count and expose list of service
func (*ManifestService) DeepCopy ¶
func (in *ManifestService) DeepCopy() *ManifestService
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManifestService.
func (*ManifestService) DeepCopyInto ¶
func (in *ManifestService) DeepCopyInto(out *ManifestService)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ManifestServiceExpose ¶
type ManifestServiceExpose struct { Port uint16 `json:"port,omitempty"` ExternalPort uint16 `json:"external-port,omitempty"` Proto string `json:"proto,omitempty"` Service string `json:"service,omitempty"` Global bool `json:"global,omitempty"` // accepted hostnames Hosts []string `json:"hosts,omitempty"` }
ManifestServiceExpose stores exposed ports and accepted hosts details
func (*ManifestServiceExpose) DeepCopy ¶
func (in *ManifestServiceExpose) DeepCopy() *ManifestServiceExpose
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManifestServiceExpose.
func (*ManifestServiceExpose) DeepCopyInto ¶
func (in *ManifestServiceExpose) DeepCopyInto(out *ManifestServiceExpose)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ManifestSpec ¶
type ManifestSpec struct { LeaseID LeaseID `json:"lease-id"` Group ManifestGroup `json:"group"` }
ManifestSpec stores LeaseID, Group and metadata details
func (*ManifestSpec) DeepCopy ¶
func (in *ManifestSpec) DeepCopy() *ManifestSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManifestSpec.
func (*ManifestSpec) DeepCopyInto ¶
func (in *ManifestSpec) DeepCopyInto(out *ManifestSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ManifestStatus ¶
type ManifestStatus struct { State string `json:"state,omitempty"` Message string `json:"message,omitempty"` }
ManifestStatus stores state and message of manifest
func (*ManifestStatus) DeepCopy ¶
func (in *ManifestStatus) DeepCopy() *ManifestStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManifestStatus.
func (*ManifestStatus) DeepCopyInto ¶
func (in *ManifestStatus) DeepCopyInto(out *ManifestStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceUnits ¶ added in v0.9.1
type ResourceUnits struct { CPU uint32 `json:"cpu,omitempty"` Memory string `json:"memory,omitempty"` Storage string `json:"storage,omitempty"` }
ResourceUnits stores cpu, memory and storage details
func (*ResourceUnits) DeepCopy ¶ added in v0.9.1
func (in *ResourceUnits) DeepCopy() *ResourceUnits
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceUnits.
func (*ResourceUnits) DeepCopyInto ¶ added in v0.9.1
func (in *ResourceUnits) DeepCopyInto(out *ResourceUnits)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.