@@ -17,6 +17,7 @@ limitations under the License.
1717package v1alpha1
1818
1919import (
20+ corev1 "k8s.io/api/core/v1"
2021 "k8s.io/apimachinery/pkg/api/resource"
2122 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2223)
@@ -59,20 +60,34 @@ type followParams struct {
5960 Template string `json:"template"`
6061}
6162
63+ // networkConfig defines the configuration structure used for networking.
6264type networkConfig struct {
6365 CircuitRelays int32 `json:"circuitRelays"`
6466}
6567
68+ // IpfsClusterSpec defines the desired state of the IpfsCluster.
6669type IpfsClusterSpec struct {
70+ // url defines the URL to be using as an ingress controller.
6771 // +kubebuilder:validation:Optional
68- URL string `json:"url"`
69- Public bool `json:"public"`
70- IpfsStorage resource.Quantity `json:"ipfsStorage"`
71- ClusterStorage string `json:"clusterStorage"`
72- Replicas int32 `json:"replicas"`
73- Networking networkConfig `json:"networking"`
74- Follows []followParams `json:"follows"`
75- // Reprovider Describes the settings that each IPFS node
72+ URL string `json:"url"`
73+ // public determines whether or not we should be exposing this IPFS Cluster to the public.
74+ Public bool `json:"public"`
75+ // ipfsStorage defines the total storage to be allocated by this resource.
76+ IpfsStorage resource.Quantity `json:"ipfsStorage"`
77+ // clusterStorage defines the amount of storage to be used by IPFS Cluster.
78+ ClusterStorage resource.Quantity `json:"clusterStorage"`
79+ // replicas sets the number of replicas of IPFS Cluster nodes we should be running.
80+ Replicas int32 `json:"replicas"`
81+ // networking defines network configuration settings.
82+ Networking networkConfig `json:"networking"`
83+ // follows defines the list of other IPFS Clusters this one should follow.
84+ Follows []followParams `json:"follows"`
85+ // ipfsResources specifies the resource requirements for each IPFS container. If this
86+ // value is omitted, then the operator will automatically determine these settings
87+ // based on the storage sizes used.
88+ // +optional
89+ IPFSResources * corev1.ResourceRequirements `json:"ipfsResources,omitempty"`
90+ // reprovider Describes the settings that each IPFS node
7691 // should use when reproviding content.
7792 // +optional
7893 Reprovider ReprovideSettings `json:"reprovider,omitempty"`
0 commit comments