kubesphere.io/api@v0.0.0-20231107125330-c9a03957060c/devops/v1alpha3/devopsproject_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 v1alpha3
    18  
    19  import (
    20  	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    21  )
    22  
    23  // EDIT THIS FILE!  THIS IS SCAFFOLDING FOR YOU TO OWN!
    24  // NOTE: json tags are required.  Any new fields you add must have json tags for the fields to be serialized.
    25  
    26  const DevOpsProjectFinalizerName = "devopsproject.finalizers.kubesphere.io"
    27  
    28  const (
    29  	ResourceKindDevOpsProject      = "DevOpsProject"
    30  	ResourceSingularDevOpsProject  = "devopsproject"
    31  	ResourcePluralDevOpsProject    = "devopsprojects"
    32  	DevOpsProjectPrefix            = "devopsproject.devops.kubesphere.io/"
    33  	DevOpeProjectSyncStatusAnnoKey = DevOpsProjectPrefix + "syncstatus"
    34  	DevOpeProjectSyncTimeAnnoKey   = DevOpsProjectPrefix + "synctime"
    35  	DevOpeProjectSyncMsgAnnoKey    = DevOpsProjectPrefix + "syncmsg"
    36  )
    37  
    38  // DevOpsProjectSpec defines the desired state of DevOpsProject
    39  type DevOpsProjectSpec struct {
    40  	// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
    41  	// Important: Run "make" to regenerate code after modifying this file
    42  
    43  }
    44  
    45  // DevOpsProjectStatus defines the observed state of DevOpsProject
    46  type DevOpsProjectStatus struct {
    47  	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
    48  	// Important: Run "make" to regenerate code after modifying this file
    49  	AdminNamespace string `json:"adminNamespace,omitempty"`
    50  }
    51  
    52  // +genclient
    53  // +genclient:nonNamespaced
    54  // +kubebuilder:object:root=true
    55  
    56  // DevOpsProject is the Schema for the devopsprojects API
    57  // +kubebuilder:resource:categories="devops",scope="Cluster"
    58  // +k8s:openapi-gen=true
    59  type DevOpsProject struct {
    60  	metav1.TypeMeta   `json:",inline"`
    61  	metav1.ObjectMeta `json:"metadata,omitempty"`
    62  
    63  	Spec   DevOpsProjectSpec   `json:"spec,omitempty"`
    64  	Status DevOpsProjectStatus `json:"status,omitempty"`
    65  }
    66  
    67  // +kubebuilder:object:root=true
    68  
    69  // DevOpsProjectList contains a list of DevOpsProject
    70  type DevOpsProjectList struct {
    71  	metav1.TypeMeta `json:",inline"`
    72  	metav1.ListMeta `json:"metadata,omitempty"`
    73  	Items           []DevOpsProject `json:"items"`
    74  }
    75  
    76  func init() {
    77  	SchemeBuilder.Register(&DevOpsProject{}, &DevOpsProjectList{})
    78  }