kubesphere.io/api@v0.0.0-20231107125330-c9a03957060c/iam/v1alpha2/group_types.go (about) 1 /* 2 Copyright 2020 The KubeSphere Authors. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 package v1alpha2 18 19 import ( 20 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 21 ) 22 23 const ( 24 ResourcePluralGroup = "groups" 25 GroupReferenceLabel = "iam.kubesphere.io/group-ref" 26 GroupParent = "iam.kubesphere.io/group-parent" 27 ) 28 29 // GroupSpec defines the desired state of Group 30 type GroupSpec struct { 31 } 32 33 // GroupStatus defines the observed state of Group 34 type GroupStatus struct { 35 // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster 36 // Important: Run "make" to regenerate code after modifying this file 37 } 38 39 // +genclient:nonNamespaced 40 // +genclient 41 // +kubebuilder:object:root=true 42 // +k8s:openapi-gen=true 43 // +kubebuilder:printcolumn:name="Workspace",type="string",JSONPath=".metadata.labels.kubesphere\\.io/workspace" 44 // +kubebuilder:resource:categories="group",scope="Cluster" 45 46 // Group is the Schema for the groups API 47 type Group struct { 48 metav1.TypeMeta `json:",inline"` 49 metav1.ObjectMeta `json:"metadata,omitempty"` 50 51 Spec GroupSpec `json:"spec,omitempty"` 52 Status GroupStatus `json:"status,omitempty"` 53 } 54 55 // +kubebuilder:object:root=true 56 // +genclient:nonNamespaced 57 58 // GroupList contains a list of Group 59 type GroupList struct { 60 metav1.TypeMeta `json:",inline"` 61 metav1.ListMeta `json:"metadata,omitempty"` 62 Items []Group `json:"items"` 63 }