/
types.go
67 lines (55 loc) · 1.89 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
package project
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/kubernetes/pkg/apis/core"
)
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ProjectList is a list of Project objects.
type ProjectList struct {
metav1.TypeMeta
metav1.ListMeta
Items []Project
}
const (
// These are internal finalizer values to Origin
FinalizerOrigin core.FinalizerName = "openshift.io/origin"
)
// ProjectSpec describes the attributes on a Project
type ProjectSpec struct {
// Finalizers is an opaque list of values that must be empty to permanently remove object from storage
Finalizers []core.FinalizerName
}
// ProjectStatus is information about the current status of a Project
type ProjectStatus struct {
Phase core.NamespacePhase
}
// +genclient
// +genclient:nonNamespaced
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// Project is a logical top-level container for a set of origin resources
type Project struct {
metav1.TypeMeta
metav1.ObjectMeta
Spec ProjectSpec
Status ProjectStatus
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +genclient
// +genclient:nonNamespaced
// +genclient:skipVerbs=get,list,create,update,patch,delete,deleteCollection,watch
// +genclient:method=Create,verb=create,result=Project
type ProjectRequest struct {
metav1.TypeMeta
metav1.ObjectMeta
DisplayName string
Description string
}
// These constants represent annotations keys affixed to projects
const (
// ProjectNodeSelector is an annotation that holds the node selector;
// the node selector annotation determines which nodes will have pods from this project scheduled to them
ProjectNodeSelector = "openshift.io/node-selector"
// ProjectRequester is the username that requested a given project. Its not guaranteed to be present,
// but it is set by the default project template.
ProjectRequester = "openshift.io/requester"
)