-
Notifications
You must be signed in to change notification settings - Fork 47
/
joiningnodes_types.go
52 lines (41 loc) · 1.52 KB
/
joiningnodes_types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*
Copyright (c) Edgeless Systems GmbH
SPDX-License-Identifier: AGPL-3.0-only
*/
package v1alpha1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// JoiningNodeSpec defines the components hash which the node should be annotated with.
type JoiningNodeSpec struct {
// Name of the node expected to join.
Name string `json:"name,omitempty"`
// ComponentsReference is the reference to the ConfigMap containing the components.
ComponentsReference string `json:"componentsreference,omitempty"`
// IsControlPlane is true if the node is a control plane node.
IsControlPlane bool `json:"iscontrolplane,omitempty"`
// Deadline is the time after which the joining node is considered to have failed.
Deadline *metav1.Time `json:"deadline,omitempty"`
}
// JoiningNodeStatus defines the observed state of JoiningNode.
type JoiningNodeStatus struct{}
//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:resource:scope=Cluster
// JoiningNode is the Schema for the joiningnodes API.
type JoiningNode struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec JoiningNodeSpec `json:"spec,omitempty"`
Status JoiningNodeStatus `json:"status,omitempty"`
}
//+kubebuilder:object:root=true
// JoiningNodeList contains a list of JoiningNodes.
type JoiningNodeList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []JoiningNode `json:"items"`
}
func init() {
SchemeBuilder.Register(&JoiningNode{}, &JoiningNodeList{})
}