servicemesh

package
v0.0.0-...-e779149 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

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

View Source
const (
	AppLabel                     = "app"
	VersionLabel                 = "version"
	ApplicationNameLabel         = "app.kubernetes.io/name"
	ApplicationVersionLabel      = "app.kubernetes.io/version"
	ServiceMeshEnabledAnnotation = "servicemesh.kubesphere.io/enabled"
)

Variables

resource with these following labels considered as part of kubernetes-sigs/application

resource with these following labels considered as part of servicemesh

View Source
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 GetApplictionName(lbs map[string]string) string

func GetComponentName

func GetComponentName(meta *v1.ObjectMeta) string

func GetComponentVersion

func GetComponentVersion(meta *v1.ObjectMeta) string

func IsAppComponent

func IsAppComponent(lbs map[string]string) bool

Whether it belongs to kubernetes-sigs/application or not

func IsApplicationComponent

func IsApplicationComponent(lbs map[string]string) bool

func IsServicemeshEnabled

func IsServicemeshEnabled(annotations map[string]string) bool

func NormalizeVersionName

func NormalizeVersionName(version string) string

normalize version names strip [_.-]

func SupportHttpProtocol

func SupportHttpProtocol(protocol string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL