github.com/oam-dev/kubevela@v1.9.11/apis/types/multicluster.go (about) 1 /* 2 Copyright 2021 The KubeVela 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 types 18 19 import ( 20 "github.com/oam-dev/cluster-gateway/pkg/apis/cluster/v1alpha1" 21 "github.com/oam-dev/cluster-gateway/pkg/config" 22 ) 23 24 const ( 25 // ClusterLocalName the name for the hub cluster 26 ClusterLocalName = "local" 27 28 // CredentialTypeInternal identifies the virtual cluster from internal kubevela system 29 CredentialTypeInternal v1alpha1.CredentialType = "Internal" 30 // CredentialTypeOCMManagedCluster identifies the virtual cluster from ocm 31 CredentialTypeOCMManagedCluster v1alpha1.CredentialType = "ManagedCluster" 32 // ClusterBlankEndpoint identifies the endpoint of a cluster as blank (not available) 33 ClusterBlankEndpoint = "-" 34 35 // ClustersArg indicates the argument for specific clusters to install addon 36 ClustersArg = "clusters" 37 ) 38 39 var ( 40 // AnnotationClusterVersion the annotation key for cluster version 41 AnnotationClusterVersion = config.MetaApiGroupName + "/cluster-version" 42 ) 43 44 // ClusterVersion defines the Version info of managed clusters. 45 type ClusterVersion struct { 46 Major string `json:"major"` 47 Minor string `json:"minor"` 48 GitVersion string `json:"gitVersion,omitempty"` 49 Platform string `json:"platform,omitempty"` 50 } 51 52 // ControlPlaneClusterVersion will be the default value of cluster info if managed cluster version get error, it will have value when vela-core started. 53 var ControlPlaneClusterVersion ClusterVersion