Documentation ¶
Overview ¶
Copyright 2022 The KubeSphere Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- func ExtractApplicationLabels(meta *v1.ObjectMeta) map[string]string
- func FillDestinationPort(vs *v1alpha3.VirtualService, service *corev1.Service)
- func GetApplictionName(lbs map[string]string) string
- func GetComponentName(meta *v1.ObjectMeta) string
- func GetComponentVersion(meta *v1.ObjectMeta) string
- func IsAppComponent(lbs map[string]string) bool
- func IsApplicationComponent(lbs map[string]string) bool
- func IsServicemeshEnabled(annotations map[string]string) bool
- func NormalizeVersionName(version string) string
- func SupportHttpProtocol(protocol string) bool
Constants ¶
const ( AppLabel = "app" VersionLabel = "version" ApplicationNameLabel = "app.kubernetes.io/name" ApplicationVersionLabel = "app.kubernetes.io/version" ServiceMeshEnabledAnnotation = "servicemesh.kubesphere.io/enabled" )
Variables ¶
var AppLabels = [...]string{ ApplicationNameLabel, ApplicationVersionLabel, }
resource with these following labels considered as part of kubernetes-sigs/application
var ApplicationLabels = [...]string{ ApplicationNameLabel, ApplicationVersionLabel, AppLabel, }
resource with these following labels considered as part of servicemesh
var TrimChars = [...]string{".", "_", "-"}
Functions ¶
func ExtractApplicationLabels ¶
func ExtractApplicationLabels(meta *v1.ObjectMeta) map[string]string
func FillDestinationPort ¶
func FillDestinationPort(vs *v1alpha3.VirtualService, service *corev1.Service)
if virtualservice not specified with port number, then fill with service first port
func GetApplictionName ¶
func GetComponentName ¶
func GetComponentName(meta *v1.ObjectMeta) string
func GetComponentVersion ¶
func GetComponentVersion(meta *v1.ObjectMeta) string
func IsAppComponent ¶
Whether it belongs to kubernetes-sigs/application or not
func IsApplicationComponent ¶
func IsServicemeshEnabled ¶
func NormalizeVersionName ¶
normalize version names strip [_.-]
func SupportHttpProtocol ¶
Types ¶
This section is empty.