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
- Variables
- func CreateCRD(ctx context.Context, clientset apiextcs.Interface) error
- func Kind(kind string) schema.GroupKind
- func Resource(resource string) schema.GroupResource
- type LeaseID
- type Manifest
- type ManifestGroup
- type ManifestList
- type ManifestService
- type ManifestServiceExpose
- type ManifestSpec
- type ManifestStatus
- type ResourceUnit
Constants ¶
const ( // CRDSingular the singleton name CRDSingular string = "manifest" // CRDPlural represents CRD resource Plural CRDPlural string = "manifests" // CRDGroup represents CRD resource Group CRDGroup string = "akash.network" // CRDVersion represents CRD resource Version CRDVersion string = "v1" // FullCRDName represents CRD resource fullname FullCRDName string = CRDPlural + "." + CRDGroup )
Variables ¶
var ( // SchemeBuilder represents new CRD scheme builder SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // AddToScheme applies all the stored functions to the scheme AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: CRDGroup, Version: CRDVersion}
Create a Rest client with the new CRD Schema
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 { metav1.ObjectMeta `json:"metadata"` metav1.TypeMeta `json:",inline"` // Deployment Sequence ID + Owner Account address marshalled Deployment []byte `protobuf:"bytes,1,opt,name=deployment,proto3,customtype=github.com/ovrclk/akash/types/base.Bytes" json:"deployment"` // Group sequence Group uint64 `protobuf:"varint,2,opt,name=group,proto3" json:"group,omitempty"` // Order sequence Order uint64 `protobuf:"varint,3,opt,name=order,proto3" json:"order,omitempty"` // Provider address Provider []byte `protobuf:"bytes,4,opt,name=provider,proto3,customtype=github.com/ovrclk/akash/types/base.Bytes" json:"provider"` }
LeaseID stores deployment, group sequence, order, provider and metadata
func LeaseIDFromAkash ¶ added in v0.3.0
LeaseIDFromAkash returns LeaseID instance from akash
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.
func (*LeaseID) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type Manifest ¶
type Manifest struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` Spec ManifestSpec Status ManifestStatus }
Manifest store metadata, specifications and status of the Lease ./k8s.io/code-generator/generate-groups.sh all github.com/ovrclk/akash/pkg/client github.com/ovrclk/akash/pkg/apis akash.network:v1 For more details of code-generator, please visit https://github.com/kubernetes/code-generator +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
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) ManifestGroup ¶
ManifestGroup returns Group details from manifest
type ManifestGroup ¶
type ManifestGroup struct { metav1.TypeMeta `json:",inline"` // Placement profile name Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Service definitions Services []*ManifestService `protobuf:"bytes,2,rep,name=services" json:"services,omitempty"` }
ManifestGroup stores metadata, name and list of SDL manifest services
func ManifestGroupFromAkash ¶ added in v0.3.0
func ManifestGroupFromAkash(m *manifest.Group) ManifestGroup
ManifestGroupFromAkash returns manifest group instance from akash group
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.
func (*ManifestGroup) DeepCopyObject ¶
func (in *ManifestGroup) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (ManifestGroup) ToAkash ¶ added in v0.3.0
func (m ManifestGroup) ToAkash() *manifest.Group
ToAkash returns akash group details formatted from manifest group
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 `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Docker image Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"` Args []string `protobuf:"bytes,3,rep,name=args" json:"args,omitempty"` Env []string `protobuf:"bytes,4,rep,name=env" json:"env,omitempty"` // Resource requirements Unit ResourceUnit `protobuf:"bytes,5,opt,name=unit" json:"unit"` // Number of instances Count uint32 `protobuf:"varint,6,opt,name=count,proto3" json:"count,omitempty"` // Overlay Network Links Expose []*ManifestServiceExpose `protobuf:"bytes,7,rep,name=expose" 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 uint32 `protobuf:"varint,1,opt,name=port,proto3" json:"port,omitempty"` ExternalPort uint32 `protobuf:"varint,2,opt,name=externalPort,proto3" json:"externalPort,omitempty"` Proto string `protobuf:"bytes,3,opt,name=proto,proto3" json:"proto,omitempty"` Service string `protobuf:"bytes,4,opt,name=service,proto3" json:"service,omitempty"` Global bool `protobuf:"varint,5,opt,name=global,proto3" json:"global,omitempty"` // accepted hostnames Hosts []string `protobuf:"bytes,6,rep,name=hosts" 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 { metav1.TypeMeta `json:",inline"` LeaseID LeaseID `json:"lease_id"` ManifestGroup ManifestGroup `json:"manifest_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.
func (*ManifestSpec) DeepCopyObject ¶
func (in *ManifestSpec) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
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 ResourceUnit ¶
type ResourceUnit struct { CPU uint32 `protobuf:"varint,1,opt,name=CPU,proto3" json:"CPU,omitempty"` Memory uint64 `protobuf:"varint,2,opt,name=memory,proto3" json:"memory,omitempty"` Storage uint64 `protobuf:"varint,3,opt,name=storage,proto3" json:"storage,omitempty"` }
ResourceUnit stores cpu, memory and storage details
func (*ResourceUnit) DeepCopy ¶
func (in *ResourceUnit) DeepCopy() *ResourceUnit
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceUnit.
func (*ResourceUnit) DeepCopyInto ¶
func (in *ResourceUnit) DeepCopyInto(out *ResourceUnit)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.