Documentation ¶
Overview ¶
+k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=sigs.k8s.io/apiserver-builder-alpha/example/basic/pkg/apis/miskatonic +k8s:defaulter-gen=TypeMeta +groupName=miskatonic.k8s.io
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetDefaults_University ¶
func SetDefaults_University(obj *University)
Types ¶
type AutomaticCreateUnversionedType ¶
Automatically create an unversioned copy of this struct by copying its definition This is the default behavior for structs appearing as fields in a resource and that are defined in the same package as that resource.
type ManualCreateUnversionedType ¶
Require that the unversioned struct is manually created. This is *NOT* the default behavior for structs appearing as fields in a resource that are defined in the same package as that resource, but is explicitly configured through the +genregister comment. +genregister:unversioned=false
type Student ¶
type Student struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec StudentSpec `json:"spec,omitempty"` Status StudentStatus `json:"status,omitempty"` }
+k8s:openapi-gen=true +resource:path=students,rest=StudentREST +subresource:request=StudentComputer,path=computer,kind=StudentComputer,rest=StudentComputerREST
type StudentComputer ¶
type StudentComputer struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` }
+subresource-request
type StudentSpec ¶
type StudentSpec struct {
ID int `json:"id,omitempty"`
}
StudentSpec defines the desired state of Student
type StudentStatus ¶
type StudentStatus struct { // GPA is the GPA of the student. GPA float64 `json:"GPA,omitempty"` }
StudentStatus defines the observed state of Student
type University ¶
type University struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec UniversitySpec `json:"spec,omitempty"` Status UniversityStatus `json:"status,omitempty"` }
+k8s:openapi-gen=true +resource:path=universities,strategy=UniversityStrategy +subresource:request=UniversityCampus,path=campus,kind=UniversityCampus
type UniversityCampus ¶
type UniversityCampus struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Faculty int `json:"faculty,omitempty"` }
+subresource-request
type UniversitySpec ¶
type UniversitySpec struct { // faculty_size defines the desired faculty size of the university. Defaults to 15. FacultySize int `json:"faculty_size,omitempty"` // max_students defines the maximum number of enrolled students. Defaults to 300. // +optional MaxStudents *int `json:"max_students,omitempty"` // The unversioned struct definition for this field must be manually defined in the group package Manual ManualCreateUnversionedType // The unversioned struct definition for this field is automatically generated in the group package Automatic AutomaticCreateUnversionedType Template *corev1.PodSpec `json:"template,omitempty"` ServiceSpec corev1.ServiceSpec `json:"service_spec,omitempty"` Rollout []extensionsv1beta1.Deployment `json:"rollout,omitempty"` }
UniversitySpec defines the desired state of University
type UniversityStatus ¶
type UniversityStatus struct { // enrolled_students is the number of currently enrolled students EnrolledStudents []string `json:"enrolled_students,omitempty"` // statusfield provides status information about University FacultyEmployed []string `json:"faculty_employed,omitempty"` }
UniversityStatus defines the observed state of University