v1alpha1

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: Apache-2.0 Imports: 11 Imported by: 8

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the ipfs v1alpha1 API group +kubebuilder:object:generate=true +groupName=ipfs.kotal.io

Index

Constants

View Source
const (
	// DefaultRoutingMode is the default content routing mechanism
	DefaultRoutingMode = DHTRouting
	// DefaultAPIPort is the default API port
	DefaultAPIPort uint = 5001
	// DefaultGatewayPort is the default local gateway port
	DefaultGatewayPort uint = 8080
	// DefaultLogging is the default logging verbosity level
	DefaultLogging = shared.InfoLogs
)
View Source
const (
	// DefaultGoIPFSImage is the default go ipfs client image
	DefaultGoIPFSImage = "kotalco/kubo:v0.21.0"
	// DefaultGoIPFSClusterImage is the default go ipfs cluster client image
	DefaultGoIPFSClusterImage = "kotalco/ipfs-cluster:v1.0.6"
)
View Source
const (
	// DefaultNodeCPURequest is the cpu requested by ipfs node
	DefaultNodeCPURequest = "1"
	// DefaultNodeCPULimit is the cpu limit for ipfs node
	DefaultNodeCPULimit = "2"

	// DefaultNodeMemoryRequest is the memory requested by ipfs node
	DefaultNodeMemoryRequest = "2Gi"
	// DefaultNodeMemoryLimit is the memory limit for ipfs node
	DefaultNodeMemoryLimit = "4Gi"

	// DefaultNodeStorageRequest is the Storage requested by ipfs node
	DefaultNodeStorageRequest = "10Gi"
)

Resources

View Source
const (
	// DefaultIPFSClusterConsensus is the default ipfs cluster consensus algorithm
	DefaultIPFSClusterConsensus = CRDT
)

Cluster peer

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "ipfs.kotal.io", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type ClusterPeer

type ClusterPeer struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ClusterPeerSpec   `json:"spec,omitempty"`
	Status ClusterPeerStatus `json:"status,omitempty"`
}

ClusterPeer is the Schema for the clusterpeers API +kubebuilder:printcolumn:name="Client",type=string,JSONPath=".status.client" +kubebuilder:printcolumn:name="Consensus",type=string,JSONPath=".spec.consensus"

func (*ClusterPeer) DeepCopy

func (in *ClusterPeer) DeepCopy() *ClusterPeer

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

func (*ClusterPeer) DeepCopyInto

func (in *ClusterPeer) DeepCopyInto(out *ClusterPeer)

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

func (*ClusterPeer) DeepCopyObject

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

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

func (*ClusterPeer) Default

func (r *ClusterPeer) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*ClusterPeer) DefaultResources

func (r *ClusterPeer) DefaultResources()

DefaultResources defaults cluster peer resources

func (*ClusterPeer) SetupWebhookWithManager

func (r *ClusterPeer) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*ClusterPeer) ValidateCreate

func (r *ClusterPeer) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*ClusterPeer) ValidateDelete

func (r *ClusterPeer) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*ClusterPeer) ValidateUpdate

func (r *ClusterPeer) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type ClusterPeerList

type ClusterPeerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ClusterPeer `json:"items"`
}

ClusterPeerList contains a list of ClusterPeer

func (*ClusterPeerList) DeepCopy

func (in *ClusterPeerList) DeepCopy() *ClusterPeerList

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

func (*ClusterPeerList) DeepCopyInto

func (in *ClusterPeerList) DeepCopyInto(out *ClusterPeerList)

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

func (*ClusterPeerList) DeepCopyObject

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

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

type ClusterPeerSpec

type ClusterPeerSpec struct {
	// Image is ipfs cluster peer client image
	Image string `json:"image,omitempty"`
	// ID is the the cluster peer id
	ID string `json:"id,omitempty"`
	// PrivateKeySecretName is k8s secret holding private key
	PrivateKeySecretName string `json:"privateKeySecretName,omitempty"`
	// TrustedPeers is CRDT trusted cluster peers who can manage the pinset
	// +listType=set
	TrustedPeers []string `json:"trustedPeers,omitempty"`
	// BootstrapPeers are ipfs cluster peers to connect to
	// +listType=set
	BootstrapPeers []string `json:"bootstrapPeers,omitempty"`
	// Consensus is ipfs cluster consensus algorithm
	Consensus ConsensusAlgorithm `json:"consensus,omitempty"`
	// ClusterSecretName is k8s secret holding cluster secret
	ClusterSecretName string `json:"clusterSecretName"`
	// PeerEndpoint is ipfs peer http API endpoint
	PeerEndpoint string `json:"peerEndpoint"`
	// Logging is logging verboisty level
	// +kubebuilder:validation:Enum=error;warn;info;debug
	Logging shared.VerbosityLevel `json:"logging,omitempty"`
	// Resources is node compute and storage resources
	shared.Resources `json:"resources,omitempty"`
}

ClusterPeerSpec defines the desired state of ClusterPeer

func (*ClusterPeerSpec) DeepCopy

func (in *ClusterPeerSpec) DeepCopy() *ClusterPeerSpec

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

func (*ClusterPeerSpec) DeepCopyInto

func (in *ClusterPeerSpec) DeepCopyInto(out *ClusterPeerSpec)

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

type ClusterPeerStatus

type ClusterPeerStatus struct {
	Client    string `json:"client"`
	Consensus string `json:"consensus"`
}

ClusterPeerStatus defines the observed state of ClusterPeer

func (*ClusterPeerStatus) DeepCopy

func (in *ClusterPeerStatus) DeepCopy() *ClusterPeerStatus

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

func (*ClusterPeerStatus) DeepCopyInto

func (in *ClusterPeerStatus) DeepCopyInto(out *ClusterPeerStatus)

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

type ConsensusAlgorithm

type ConsensusAlgorithm string

ConsensusAlgorithm is IPFS cluster consensus algorithm +kubebuilder:validation:Enum=crdt;raft

const (
	// CRDT consensus algorithm
	CRDT ConsensusAlgorithm = "crdt"
	// Raft consensus algorithm
	Raft ConsensusAlgorithm = "raft"
)

type Peer

type Peer struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   PeerSpec   `json:"spec,omitempty"`
	Status PeerStatus `json:"status,omitempty"`
}

Peer is the Schema for the peers API +kubebuilder:printcolumn:name="Client",type=string,JSONPath=".status.client"

func (*Peer) DeepCopy

func (in *Peer) DeepCopy() *Peer

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

func (*Peer) DeepCopyInto

func (in *Peer) DeepCopyInto(out *Peer)

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

func (*Peer) DeepCopyObject

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

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

func (*Peer) Default

func (r *Peer) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*Peer) DefaultPeerResources

func (r *Peer) DefaultPeerResources()

DefaultPeerResources defaults peer resources

func (*Peer) SetupWebhookWithManager

func (r *Peer) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*Peer) ValidateCreate

func (p *Peer) ValidateCreate() error

ValidateCreate valdates ipfs peers during their creation

func (*Peer) ValidateDelete

func (p *Peer) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*Peer) ValidateUpdate

func (p *Peer) ValidateUpdate(old runtime.Object) error

ValidateUpdate validates ipfs peers while being updated

type PeerList

type PeerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Peer `json:"items"`
}

PeerList contains a list of Peer

func (*PeerList) DeepCopy

func (in *PeerList) DeepCopy() *PeerList

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

func (*PeerList) DeepCopyInto

func (in *PeerList) DeepCopyInto(out *PeerList)

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

func (*PeerList) DeepCopyObject

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

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

type PeerSpec

type PeerSpec struct {
	// Image is ipfs peer client image
	Image string `json:"image,omitempty"`
	// InitProfiles is the intial profiles to apply during
	// +listType=set
	InitProfiles []Profile `json:"initProfiles,omitempty"`
	// Profiles is the configuration profiles to apply after peer initialization
	// +listType=set
	Profiles []Profile `json:"profiles,omitempty"`
	// API enables API server
	API bool `json:"api,omitempty"`
	// APIPort is api server port
	APIPort uint `json:"apiPort,omitempty"`
	// Gateway enables IPFS gateway server
	Gateway bool `json:"gateway,omitempty"`
	// GatewayPort is local gateway port
	GatewayPort uint `json:"gatewayPort,omitempty"`
	// Routing is the content routing mechanism
	Routing RoutingMechanism `json:"routing,omitempty"`
	// SwarmKeySecretName is the k8s secret holding swarm key
	SwarmKeySecretName string `json:"swarmKeySecretName,omitempty"`
	// Logging is logging verboisty level
	// +kubebuilder:validation:Enum=error;warn;info;debug;notice
	Logging shared.VerbosityLevel `json:"logging,omitempty"`
	// Resources is node compute and storage resources
	shared.Resources `json:"resources,omitempty"`
}

PeerSpec defines the desired state of Peer

func (*PeerSpec) DeepCopy

func (in *PeerSpec) DeepCopy() *PeerSpec

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

func (*PeerSpec) DeepCopyInto

func (in *PeerSpec) DeepCopyInto(out *PeerSpec)

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

type PeerStatus

type PeerStatus struct {
	Client string `json:"client,omitempty"`
}

PeerStatus defines the observed state of Peer

func (*PeerStatus) DeepCopy

func (in *PeerStatus) DeepCopy() *PeerStatus

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

func (*PeerStatus) DeepCopyInto

func (in *PeerStatus) DeepCopyInto(out *PeerStatus)

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

type Profile

type Profile string

Profile is ipfs configuration +kubebuilder:validation:Enum=server;randomports;default-datastore;local-discovery;test;default-networking;flatfs;badgerds;lowpower

const (
	// ServerProfile is the server profile
	ServerProfile Profile = "server"
	// RandomPortsProfile is the random ports profile
	RandomPortsProfile Profile = "randomports"
	// DefaultDatastoreProfile is the default data store profile
	DefaultDatastoreProfile Profile = "default-datastore"
	// LocalDiscoveryProfile is the local discovery profile
	LocalDiscoveryProfile Profile = "local-discovery"
	// TestProfile is the test profile
	TestProfile Profile = "test"
	// DefaultNetworkingProfile is the default networking profile
	DefaultNetworkingProfile Profile = "default-networking"
	// FlatFSProfile is the flat file system profile
	FlatFSProfile Profile = "flatfs"
	// BadgerDSProfile is badger data store profile
	BadgerDSProfile Profile = "badgerds"
	// LowPowerProfile is the low power profile
	LowPowerProfile Profile = "lowpower"
)

type RoutingMechanism

type RoutingMechanism string

RoutingMechanism is the content routing mechanism +kubebuilder:validation:Enum=none;dht;dhtclient;dhtserver

const (
	// NoneRouting is no routing mechanism
	NoneRouting RoutingMechanism = "none"
	// DHTRouting is automatic dht routing mechanism
	DHTRouting RoutingMechanism = "dht"
	// DHTClientRouting is the dht client routing mechanism
	DHTClientRouting RoutingMechanism = "dhtclient"
	// DHTServerRouting is the dht server routing mechanism
	DHTServerRouting RoutingMechanism = "dhtserver"
)

Jump to

Keyboard shortcuts

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