-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.go
48 lines (37 loc) · 1.18 KB
/
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
package v1alpha1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// Generic is a specification for a Generic resource
type Generic struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Selector GenericSelector `json:"selector"`
Spec GenericSpec `json:"spec"`
Status GenericStatus `json:"status"`
}
// GenericSelector - selector of pods for applying Generic resource
type GenericSelector struct {
MatchLabels map[string]string `json:"matchLabels"`
}
// GenericSpec is the spec for a Generic resource
type GenericSpec struct {
Service string `json:"service"`
Config GenericSpecConfig `json:"config"`
}
type GenericSpecConfig struct {
Parameters map[string]string `json:"parameters"`
}
// GenericStatus is the status for a Generic resource
type GenericStatus struct {
SeenBy int32 `json:"seenBy"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// GenericList is a list of Generic resources
type GenericList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Items []Generic `json:"items"`
}