-
Notifications
You must be signed in to change notification settings - Fork 6
/
aws_cluster_types.go
68 lines (58 loc) · 2.15 KB
/
aws_cluster_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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
package v1alpha1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// +genclient
// +genclient:noStatus
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:resource:categories=aws;giantswarm
// +kubebuilder:storageversion
// +k8s:openapi-gen=true
// AWSClusterConfig used to represent workload cluster configuration in earlier releases. Deprecated.
type AWSClusterConfig struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata"`
Spec AWSClusterConfigSpec `json:"spec"`
}
// +k8s:openapi-gen=true
type AWSClusterConfigSpec struct {
Guest AWSClusterConfigSpecGuest `json:"guest"`
VersionBundle AWSClusterConfigSpecVersionBundle `json:"versionBundle"`
}
// +k8s:openapi-gen=true
type AWSClusterConfigSpecGuest struct {
ClusterGuestConfig `json:",inline"`
CredentialSecret AWSClusterConfigSpecGuestCredentialSecret `json:"credentialSecret"`
Masters []AWSClusterConfigSpecGuestMaster `json:"masters,omitempty"`
Workers []AWSClusterConfigSpecGuestWorker `json:"workers,omitempty"`
}
// AWSClusterConfigSpecGuestCredentialSecret points to the K8s Secret
// containing credentials for an AWS account in which the workload cluster should
// be created.
// +k8s:openapi-gen=true
type AWSClusterConfigSpecGuestCredentialSecret struct {
Name string `json:"name"`
Namespace string `json:"namespace"`
}
// +k8s:openapi-gen=true
type AWSClusterConfigSpecGuestMaster struct {
AWSClusterConfigSpecGuestNode `json:",inline"`
}
type AWSClusterConfigSpecGuestWorker struct {
AWSClusterConfigSpecGuestNode `json:",inline"`
Labels map[string]string `json:"labels"`
}
type AWSClusterConfigSpecGuestNode struct {
ID string `json:"id"`
InstanceType string `json:"instanceType,omitempty"`
}
// +k8s:openapi-gen=true
type AWSClusterConfigSpecVersionBundle struct {
Version string `json:"version"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type AWSClusterConfigList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Items []AWSClusterConfig `json:"items"`
}