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 ¶
- Variables
- type Student
- func (in *Student) Categories() []string
- func (in *Student) Create(ctx context.Context, obj runtime.Object, ...) (runtime.Object, error)
- func (in *Student) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error)
- func (in *Student) GetArbitrarySubResources() []resource.ArbitrarySubResource
- func (in *Student) GetGroupVersionResource() schema.GroupVersionResource
- func (in *Student) GetObjectMeta() *metav1.ObjectMeta
- func (in *Student) IsStorageVersion() bool
- func (in *Student) NamespaceScoped() bool
- func (in *Student) New() runtime.Object
- func (in *Student) NewList() runtime.Object
- func (in *Student) ShortNames() []string
- func (in *Student) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, ...) (runtime.Object, bool, error)
- type StudentGPA
- type StudentList
- type StudentSpec
- type University
- func (in *University) Default()
- func (in *University) GetArbitrarySubResources() []resource.ArbitrarySubResource
- func (in *University) GetGroupVersionResource() schema.GroupVersionResource
- func (in *University) GetObjectMeta() *metav1.ObjectMeta
- func (in *University) GetScale() (scaleSubResource *v1.Scale)
- func (in *University) GetStatus() resource.StatusSubResource
- func (in *University) IsStorageVersion() bool
- func (in *University) NamespaceScoped() bool
- func (in *University) New() runtime.Object
- func (in *University) NewList() runtime.Object
- func (in *University) SetScale(scaleSubResource *v1.Scale)
- func (in *University) Validate(ctx context.Context) field.ErrorList
- type UniversityCampus
- func (in *UniversityCampus) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error)
- func (in *UniversityCampus) New() runtime.Object
- func (in *UniversityCampus) SubResourceName() string
- func (in *UniversityCampus) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, ...) (runtime.Object, bool, error)
- type UniversityList
- type UniversitySpec
- type UniversityStatus
Constants ¶
This section is empty.
Variables ¶
var AddToScheme = func(scheme *runtime.Scheme) error { metav1.AddToGroupVersion(scheme, schema.GroupVersion{ Group: "miskatonic.k8s.io", Version: "v1beta1", }) scheme.AddKnownTypes(schema.GroupVersion{ Group: "miskatonic.k8s.io", Version: "v1beta1", }, &Student{}, &StudentList{}) scheme.AddKnownTypes(schema.GroupVersion{ Group: "miskatonic.k8s.io", Version: "v1beta1", }, &University{}, &UniversityList{}) return nil }
Functions ¶
This section is empty.
Types ¶
type Student ¶
type Student struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec StudentSpec `json:"spec,omitempty"` GPA StudentGPA `json:"gpa,omitempty"` }
+k8s:openapi-gen=true +resource:path=students,rest=StudentREST +subresource:request=StudentComputer,path=computer,kind=StudentComputer,rest=StudentComputerREST
func (*Student) Categories ¶
func (*Student) Get ¶
func (in *Student) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error)
Get retrieves the object from the storage. It is required to support Patch.
func (*Student) GetArbitrarySubResources ¶
func (in *Student) GetArbitrarySubResources() []resource.ArbitrarySubResource
func (*Student) GetGroupVersionResource ¶
func (in *Student) GetGroupVersionResource() schema.GroupVersionResource
func (*Student) GetObjectMeta ¶
func (in *Student) GetObjectMeta() *metav1.ObjectMeta
func (*Student) IsStorageVersion ¶
func (*Student) NamespaceScoped ¶
func (*Student) ShortNames ¶
func (*Student) Update ¶
func (in *Student) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc, forceAllowCreate bool, options *metav1.UpdateOptions) (runtime.Object, bool, error)
Update alters the status subset of an object.
type StudentGPA ¶
type StudentGPA struct { // Score is the score of the student. Score float64 `json:"score,omitempty"` }
StudentStatus defines the observed state of Student
func (*StudentGPA) New ¶
func (in *StudentGPA) New() runtime.Object
func (StudentGPA) SubResourceName ¶
func (in StudentGPA) SubResourceName() string
type StudentList ¶
type StudentList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Student `json:"items"` }
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*StudentList) GetListMeta ¶
func (in *StudentList) GetListMeta() *metav1.ListMeta
type StudentSpec ¶
type StudentSpec struct {
ID int `json:"id,omitempty"`
}
StudentSpec defines the desired 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
func (*University) Default ¶
func (in *University) Default()
func (*University) GetArbitrarySubResources ¶
func (in *University) GetArbitrarySubResources() []resource.ArbitrarySubResource
func (*University) GetGroupVersionResource ¶
func (in *University) GetGroupVersionResource() schema.GroupVersionResource
func (*University) GetObjectMeta ¶
func (in *University) GetObjectMeta() *metav1.ObjectMeta
func (*University) GetScale ¶
func (in *University) GetScale() (scaleSubResource *v1.Scale)
func (*University) GetStatus ¶
func (in *University) GetStatus() resource.StatusSubResource
func (*University) IsStorageVersion ¶
func (in *University) IsStorageVersion() bool
func (*University) NamespaceScoped ¶
func (in *University) NamespaceScoped() bool
func (*University) New ¶
func (in *University) New() runtime.Object
func (*University) NewList ¶
func (in *University) NewList() runtime.Object
func (*University) SetScale ¶
func (in *University) SetScale(scaleSubResource *v1.Scale)
type UniversityCampus ¶
type UniversityCampus struct { metav1.TypeMeta `json:",inline"` Faculty int `json:"faculty,omitempty"` }
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*UniversityCampus) Get ¶
func (in *UniversityCampus) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error)
func (*UniversityCampus) New ¶
func (in *UniversityCampus) New() runtime.Object
func (*UniversityCampus) SubResourceName ¶
func (in *UniversityCampus) SubResourceName() string
func (*UniversityCampus) Update ¶
func (in *UniversityCampus) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc, forceAllowCreate bool, options *metav1.UpdateOptions) (runtime.Object, bool, error)
type UniversityList ¶
type UniversityList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []University `json:"items"` }
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*UniversityList) GetListMeta ¶
func (in *UniversityList) GetListMeta() *metav1.ListMeta
type UniversitySpec ¶
type UniversitySpec struct { // facultySize defines the desired faculty size of the university. Defaults to 15. FacultySize int `json:"facultySize,omitempty"` // maxStudents defines the maximum number of enrolled students. Defaults to 300. // +optional MaxStudents *int `json:"maxStudents,omitempty"` Template *corev1.PodSpec `json:"template,omitempty"` ServiceSpec corev1.ServiceSpec `json:"serviceSpec,omitempty"` Rollout []appsv1.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
func (UniversityStatus) CopyTo ¶
func (in UniversityStatus) CopyTo(parent resource.ObjectWithStatusSubResource)
func (UniversityStatus) SubResourceName ¶
func (in UniversityStatus) SubResourceName() string