Documentation ¶
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 ¶
View Source
const ( AppLabel = "app" VersionLabel = "version" ApplicationNameLabel = "app.kubernetes.io/name" ApplicationVersionLabel = "app.kubernetes.io/version" ServiceMeshEnabledAnnotation = "servicemesh.kubesphere.io/enabled" )
Variables ¶
View Source
var AppLabels = [...]string{ ApplicationNameLabel, ApplicationVersionLabel, }
resource with these following labels considered as part of kubernetes-sigs/application
View Source
var ApplicationLabels = [...]string{ ApplicationNameLabel, ApplicationVersionLabel, AppLabel, }
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 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.
Click to show internal directories.
Click to hide internal directories.