1 package v1 2 3 import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 4 5 // +genclient 6 // +genclient:nonNamespaced 7 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object 8 9 // Project holds cluster-wide information about Project. The canonical name is `cluster` 10 // 11 // Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). 12 // +openshift:compatibility-gen:level=1 13 type Project struct { 14 metav1.TypeMeta `json:",inline"` 15 16 // metadata is the standard object's metadata. 17 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 18 metav1.ObjectMeta `json:"metadata,omitempty"` 19 20 // spec holds user settable values for configuration 21 // +kubebuilder:validation:Required 22 // +required 23 Spec ProjectSpec `json:"spec"` 24 // status holds observed values from the cluster. They may not be overridden. 25 // +optional 26 Status ProjectStatus `json:"status"` 27 } 28 29 // TemplateReference references a template in a specific namespace. 30 // The namespace must be specified at the point of use. 31 type TemplateReference struct { 32 // name is the metadata.name of the referenced project request template 33 Name string `json:"name"` 34 } 35 36 // ProjectSpec holds the project creation configuration. 37 type ProjectSpec struct { 38 // projectRequestMessage is the string presented to a user if they are unable to request a project via the projectrequest api endpoint 39 // +optional 40 ProjectRequestMessage string `json:"projectRequestMessage"` 41 42 // projectRequestTemplate is the template to use for creating projects in response to projectrequest. 43 // This must point to a template in 'openshift-config' namespace. It is optional. 44 // If it is not specified, a default template is used. 45 // 46 // +optional 47 ProjectRequestTemplate TemplateReference `json:"projectRequestTemplate"` 48 } 49 50 type ProjectStatus struct { 51 } 52 53 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object 54 55 // Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). 56 // +openshift:compatibility-gen:level=1 57 type ProjectList struct { 58 metav1.TypeMeta `json:",inline"` 59 60 // metadata is the standard list's metadata. 61 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 62 metav1.ListMeta `json:"metadata"` 63 64 Items []Project `json:"items"` 65 } 66