diff --git a/operators/constellation-node-operator/api/v1alpha1/autoscalingstrategy_types.go b/operators/constellation-node-operator/api/v1alpha1/autoscalingstrategy_types.go index 3897247fd..b68fe686d 100644 --- a/operators/constellation-node-operator/api/v1alpha1/autoscalingstrategy_types.go +++ b/operators/constellation-node-operator/api/v1alpha1/autoscalingstrategy_types.go @@ -10,7 +10,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -// AutoscalingStrategySpec defines the desired state of AutoscalingStrategy +// AutoscalingStrategySpec defines the desired state of AutoscalingStrategy. type AutoscalingStrategySpec struct { // Enabled defines whether cluster autoscaling should be enabled or not. Enabled bool `json:"enabled"` @@ -20,7 +20,7 @@ type AutoscalingStrategySpec struct { DeploymentNamespace string `json:"deploymentNamespace"` } -// AutoscalingStrategyStatus defines the observed state of AutoscalingStrategy +// AutoscalingStrategyStatus defines the observed state of AutoscalingStrategy. type AutoscalingStrategyStatus struct { // Enabled shows whether cluster autoscaling is currently enabled or not. // +optional @@ -34,7 +34,7 @@ type AutoscalingStrategyStatus struct { //+kubebuilder:subresource:status //+kubebuilder:resource:scope=Cluster -// AutoscalingStrategy is the Schema for the autoscalingstrategies API +// AutoscalingStrategy is the Schema for the autoscalingstrategies API. type AutoscalingStrategy struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -45,7 +45,7 @@ type AutoscalingStrategy struct { //+kubebuilder:object:root=true -// AutoscalingStrategyList contains a list of AutoscalingStrategy +// AutoscalingStrategyList contains a list of AutoscalingStrategy. type AutoscalingStrategyList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` diff --git a/operators/constellation-node-operator/api/v1alpha1/groupversion_info.go b/operators/constellation-node-operator/api/v1alpha1/groupversion_info.go index 1b0430692..a38fbef44 100644 --- a/operators/constellation-node-operator/api/v1alpha1/groupversion_info.go +++ b/operators/constellation-node-operator/api/v1alpha1/groupversion_info.go @@ -15,10 +15,10 @@ import ( ) var ( - // GroupVersion is group version used to register these objects + // GroupVersion is group version used to register these objects. GroupVersion = schema.GroupVersion{Group: "update.edgeless.systems", Version: "v1alpha1"} - // SchemeBuilder is used to add go types to the GroupVersionKind scheme + // 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. diff --git a/operators/constellation-node-operator/api/v1alpha1/nodeimage_types.go b/operators/constellation-node-operator/api/v1alpha1/nodeimage_types.go index b70d86956..211c2cac5 100644 --- a/operators/constellation-node-operator/api/v1alpha1/nodeimage_types.go +++ b/operators/constellation-node-operator/api/v1alpha1/nodeimage_types.go @@ -11,13 +11,13 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -// NodeImageSpec defines the desired state of NodeImage +// NodeImageSpec defines the desired state of NodeImage. type NodeImageSpec struct { // ImageReference is the image to use for all nodes. ImageReference string `json:"image,omitempty"` } -// NodeImageStatus defines the observed state of NodeImage +// NodeImageStatus defines the observed state of NodeImage. type NodeImageStatus struct { // Outdated is a list of nodes that are using an outdated image. Outdated []corev1.ObjectReference `json:"outdated,omitempty"` @@ -45,7 +45,7 @@ type NodeImageStatus struct { //+kubebuilder:subresource:status //+kubebuilder:resource:scope=Cluster -// NodeImage is the Schema for the nodeimages API +// NodeImage is the Schema for the nodeimages API. type NodeImage struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -56,7 +56,7 @@ type NodeImage struct { //+kubebuilder:object:root=true -// NodeImageList contains a list of NodeImage +// NodeImageList contains a list of NodeImage. type NodeImageList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` diff --git a/operators/constellation-node-operator/api/v1alpha1/pendingnode_types.go b/operators/constellation-node-operator/api/v1alpha1/pendingnode_types.go index 6180b4113..62261b984 100644 --- a/operators/constellation-node-operator/api/v1alpha1/pendingnode_types.go +++ b/operators/constellation-node-operator/api/v1alpha1/pendingnode_types.go @@ -44,7 +44,7 @@ type PendingNodeGoal string // +kubebuilder:validation:Enum=Unknown;Creating;Ready;Stopped;Terminating;Terminated;Failed type CSPNodeState string -// PendingNodeSpec defines the desired state of PendingNode +// PendingNodeSpec defines the desired state of PendingNode. type PendingNodeSpec struct { // ProviderID is the provider ID of the node. ProviderID string `json:"providerID,omitempty"` @@ -62,7 +62,7 @@ type PendingNodeSpec struct { Deadline *metav1.Time `json:"deadline,omitempty"` } -// PendingNodeStatus defines the observed state of PendingNode +// PendingNodeStatus defines the observed state of PendingNode. type PendingNodeStatus struct { // CSPNodeState is the state of the node in the cloud. CSPNodeState `json:"cspState,omitempty"` @@ -74,7 +74,7 @@ type PendingNodeStatus struct { //+kubebuilder:subresource:status //+kubebuilder:resource:scope=Cluster -// PendingNode is the Schema for the pendingnodes API +// PendingNode is the Schema for the pendingnodes API. type PendingNode struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -85,7 +85,7 @@ type PendingNode struct { //+kubebuilder:object:root=true -// PendingNodeList contains a list of PendingNode +// PendingNodeList contains a list of PendingNode. type PendingNodeList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` diff --git a/operators/constellation-node-operator/api/v1alpha1/scalinggroup_types.go b/operators/constellation-node-operator/api/v1alpha1/scalinggroup_types.go index 01f1435c0..7fa358ad6 100644 --- a/operators/constellation-node-operator/api/v1alpha1/scalinggroup_types.go +++ b/operators/constellation-node-operator/api/v1alpha1/scalinggroup_types.go @@ -15,7 +15,7 @@ const ( ConditionOutdated = "Outdated" ) -// ScalingGroupSpec defines the desired state of ScalingGroup +// ScalingGroupSpec defines the desired state of ScalingGroup. type ScalingGroupSpec struct { // NodeImage is the name of the NodeImage resource. NodeImage string `json:"nodeImage,omitempty"` @@ -25,7 +25,7 @@ type ScalingGroupSpec struct { Autoscaling bool `json:"autoscaling,omitempty"` } -// ScalingGroupStatus defines the observed state of ScalingGroup +// ScalingGroupStatus defines the observed state of ScalingGroup. type ScalingGroupStatus struct { // ImageReference is the image currently used for newly created nodes in this scaling group. ImageReference string `json:"imageReference,omitempty"` @@ -37,7 +37,7 @@ type ScalingGroupStatus struct { //+kubebuilder:subresource:status //+kubebuilder:resource:scope=Cluster -// ScalingGroup is the Schema for the scalinggroups API +// ScalingGroup is the Schema for the scalinggroups API. type ScalingGroup struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -48,7 +48,7 @@ type ScalingGroup struct { //+kubebuilder:object:root=true -// ScalingGroupList contains a list of ScalingGroup +// ScalingGroupList contains a list of ScalingGroup. type ScalingGroupList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` diff --git a/operators/constellation-node-operator/config/crd/bases/update.edgeless.systems_autoscalingstrategies.yaml b/operators/constellation-node-operator/config/crd/bases/update.edgeless.systems_autoscalingstrategies.yaml index 4330840ca..de2496f10 100644 --- a/operators/constellation-node-operator/config/crd/bases/update.edgeless.systems_autoscalingstrategies.yaml +++ b/operators/constellation-node-operator/config/crd/bases/update.edgeless.systems_autoscalingstrategies.yaml @@ -19,7 +19,7 @@ spec: schema: openAPIV3Schema: description: AutoscalingStrategy is the Schema for the autoscalingstrategies - API + API. properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation @@ -34,7 +34,7 @@ spec: metadata: type: object spec: - description: AutoscalingStrategySpec defines the desired state of AutoscalingStrategy + description: AutoscalingStrategySpec defines the desired state of AutoscalingStrategy. properties: deploymentName: description: DeploymentName defines the name of the autoscaler deployment. @@ -53,7 +53,7 @@ spec: - enabled type: object status: - description: AutoscalingStrategyStatus defines the observed state of AutoscalingStrategy + description: AutoscalingStrategyStatus defines the observed state of AutoscalingStrategy. properties: enabled: description: Enabled shows whether cluster autoscaling is currently diff --git a/operators/constellation-node-operator/config/crd/bases/update.edgeless.systems_nodeimages.yaml b/operators/constellation-node-operator/config/crd/bases/update.edgeless.systems_nodeimages.yaml index f588f167a..ebb752eac 100644 --- a/operators/constellation-node-operator/config/crd/bases/update.edgeless.systems_nodeimages.yaml +++ b/operators/constellation-node-operator/config/crd/bases/update.edgeless.systems_nodeimages.yaml @@ -18,7 +18,7 @@ spec: - name: v1alpha1 schema: openAPIV3Schema: - description: NodeImage is the Schema for the nodeimages API + description: NodeImage is the Schema for the nodeimages API. properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation @@ -33,14 +33,14 @@ spec: metadata: type: object spec: - description: NodeImageSpec defines the desired state of NodeImage + description: NodeImageSpec defines the desired state of NodeImage. properties: image: description: ImageReference is the image to use for all nodes. type: string type: object status: - description: NodeImageStatus defines the observed state of NodeImage + description: NodeImageStatus defines the observed state of NodeImage. properties: budget: description: Budget is the amount of extra nodes that can be created diff --git a/operators/constellation-node-operator/config/crd/bases/update.edgeless.systems_pendingnodes.yaml b/operators/constellation-node-operator/config/crd/bases/update.edgeless.systems_pendingnodes.yaml index 5de512f5a..7c5b5618b 100644 --- a/operators/constellation-node-operator/config/crd/bases/update.edgeless.systems_pendingnodes.yaml +++ b/operators/constellation-node-operator/config/crd/bases/update.edgeless.systems_pendingnodes.yaml @@ -18,7 +18,7 @@ spec: - name: v1alpha1 schema: openAPIV3Schema: - description: PendingNode is the Schema for the pendingnodes API + description: PendingNode is the Schema for the pendingnodes API. properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation @@ -33,7 +33,7 @@ spec: metadata: type: object spec: - description: PendingNodeSpec defines the desired state of PendingNode + description: PendingNodeSpec defines the desired state of PendingNode. properties: deadline: description: Deadline is the deadline for reaching the goal state. @@ -60,7 +60,7 @@ spec: type: string type: object status: - description: PendingNodeStatus defines the observed state of PendingNode + description: PendingNodeStatus defines the observed state of PendingNode. properties: cspState: description: CSPNodeState is the state of the node in the cloud. diff --git a/operators/constellation-node-operator/config/crd/bases/update.edgeless.systems_scalinggroups.yaml b/operators/constellation-node-operator/config/crd/bases/update.edgeless.systems_scalinggroups.yaml index 518982d91..828320226 100644 --- a/operators/constellation-node-operator/config/crd/bases/update.edgeless.systems_scalinggroups.yaml +++ b/operators/constellation-node-operator/config/crd/bases/update.edgeless.systems_scalinggroups.yaml @@ -18,7 +18,7 @@ spec: - name: v1alpha1 schema: openAPIV3Schema: - description: ScalingGroup is the Schema for the scalinggroups API + description: ScalingGroup is the Schema for the scalinggroups API. properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation @@ -33,7 +33,7 @@ spec: metadata: type: object spec: - description: ScalingGroupSpec defines the desired state of ScalingGroup + description: ScalingGroupSpec defines the desired state of ScalingGroup. properties: autoscaling: description: Autoscaling specifies wether the scaling group should @@ -48,7 +48,7 @@ spec: type: string type: object status: - description: ScalingGroupStatus defines the observed state of ScalingGroup + description: ScalingGroupStatus defines the observed state of ScalingGroup. properties: conditions: description: Conditions represent the latest available observations diff --git a/operators/constellation-node-operator/controllers/autoscalingstrategy_controller.go b/operators/constellation-node-operator/controllers/autoscalingstrategy_controller.go index d64e7a792..1d3a75be7 100644 --- a/operators/constellation-node-operator/controllers/autoscalingstrategy_controller.go +++ b/operators/constellation-node-operator/controllers/autoscalingstrategy_controller.go @@ -20,7 +20,7 @@ import ( updatev1alpha1 "github.com/edgelesssys/constellation/operators/constellation-node-operator/api/v1alpha1" ) -// AutoscalingStrategyReconciler reconciles a AutoscalingStrategy object +// AutoscalingStrategyReconciler reconciles a AutoscalingStrategy object. type AutoscalingStrategyReconciler struct { client.Client Scheme *runtime.Scheme diff --git a/operators/constellation-node-operator/controllers/nodeimage_controller.go b/operators/constellation-node-operator/controllers/nodeimage_controller.go index 65a1b67dd..e3f1ab844 100644 --- a/operators/constellation-node-operator/controllers/nodeimage_controller.go +++ b/operators/constellation-node-operator/controllers/nodeimage_controller.go @@ -719,7 +719,7 @@ type mintNode struct { } // replacementPair is a pair of a donor (outdated node that should be replaced) -// and a heir (up to date node that inherits node labels) +// and a heir (up to date node that inherits node labels). type replacementPair struct { donor corev1.Node heir corev1.Node diff --git a/operators/constellation-node-operator/controllers/pendingnode_controller.go b/operators/constellation-node-operator/controllers/pendingnode_controller.go index cef27121f..7bcb0a688 100644 --- a/operators/constellation-node-operator/controllers/pendingnode_controller.go +++ b/operators/constellation-node-operator/controllers/pendingnode_controller.go @@ -35,7 +35,7 @@ const ( defaultCheckInterval = 30 * time.Second ) -// PendingNodeReconciler reconciles a PendingNode object +// PendingNodeReconciler reconciles a PendingNode object. type PendingNodeReconciler struct { nodeStateGetter client.Client diff --git a/operators/constellation-node-operator/controllers/scalinggroup_controller.go b/operators/constellation-node-operator/controllers/scalinggroup_controller.go index 8450fd05b..bc9118478 100644 --- a/operators/constellation-node-operator/controllers/scalinggroup_controller.go +++ b/operators/constellation-node-operator/controllers/scalinggroup_controller.go @@ -35,7 +35,7 @@ const ( conditionScalingGroupOutOfDateMessage = "Scaling group will not use the latest image when creating new nodes" ) -// ScalingGroupReconciler reconciles a ScalingGroup object +// ScalingGroupReconciler reconciles a ScalingGroup object. type ScalingGroupReconciler struct { scalingGroupUpdater client.Client diff --git a/operators/constellation-node-operator/internal/etcd/etcd.go b/operators/constellation-node-operator/internal/etcd/etcd.go index b2953b99c..b7da4116e 100644 --- a/operators/constellation-node-operator/internal/etcd/etcd.go +++ b/operators/constellation-node-operator/internal/etcd/etcd.go @@ -20,15 +20,15 @@ import ( ) const ( - // etcdListenClientPort defines the port etcd listen on for client traffic + // etcdListenClientPort defines the port etcd listen on for client traffic. etcdListenClientPort = "2379" - // etcdListenPeerPort defines the port etcd listen on for peer traffic + // etcdListenPeerPort defines the port etcd listen on for peer traffic. etcdListenPeerPort = "2380" - // etcdCACertName defines etcd's CA certificate name + // etcdCACertName defines etcd's CA certificate name. etcdCACertName = "/etc/kubernetes/pki/etcd/ca.crt" - // etcdPeerCertName defines etcd's peer certificate name + // etcdPeerCertName defines etcd's peer certificate name. etcdPeerCertName = "/etc/kubernetes/pki/etcd/peer.crt" - // etcdPeerKeyName defines etcd's peer key name + // etcdPeerKeyName defines etcd's peer key name. etcdPeerKeyName = "/etc/kubernetes/pki/etcd/peer.key" )