mirror of https://github.com/k3s-io/k3s
Refactor service-proxy-name label
parent
8b98e802ed
commit
6117316752
|
@ -22,6 +22,7 @@ go_library(
|
|||
"//pkg/kubelet/qos:go_default_library",
|
||||
"//pkg/master/ports:go_default_library",
|
||||
"//pkg/proxy:go_default_library",
|
||||
"//pkg/proxy/apis:go_default_library",
|
||||
"//pkg/proxy/apis/config:go_default_library",
|
||||
"//pkg/proxy/apis/config/scheme:go_default_library",
|
||||
"//pkg/proxy/apis/config/validation:go_default_library",
|
||||
|
|
|
@ -53,6 +53,7 @@ import (
|
|||
"k8s.io/kubernetes/pkg/kubelet/qos"
|
||||
"k8s.io/kubernetes/pkg/master/ports"
|
||||
"k8s.io/kubernetes/pkg/proxy"
|
||||
"k8s.io/kubernetes/pkg/proxy/apis"
|
||||
kubeproxyconfig "k8s.io/kubernetes/pkg/proxy/apis/config"
|
||||
"k8s.io/kubernetes/pkg/proxy/apis/config/scheme"
|
||||
"k8s.io/kubernetes/pkg/proxy/apis/config/validation"
|
||||
|
@ -583,7 +584,7 @@ func (s *ProxyServer) Run() error {
|
|||
|
||||
informerFactory := informers.NewSharedInformerFactoryWithOptions(s.Client, s.ConfigSyncPeriod,
|
||||
informers.WithTweakListOptions(func(options *v1meta.ListOptions) {
|
||||
options.LabelSelector = "!service.kubernetes.io/service-proxy-name"
|
||||
options.LabelSelector = "!" + apis.LabelServiceProxyName
|
||||
}))
|
||||
|
||||
// Create configs (i.e. Watches for Services and Endpoints)
|
||||
|
|
|
@ -38,7 +38,7 @@ filegroup(
|
|||
name = "all-srcs",
|
||||
srcs = [
|
||||
":package-srcs",
|
||||
"//pkg/proxy/apis/config:all-srcs",
|
||||
"//pkg/proxy/apis:all-srcs",
|
||||
"//pkg/proxy/config:all-srcs",
|
||||
"//pkg/proxy/healthcheck:all-srcs",
|
||||
"//pkg/proxy/iptables:all-srcs",
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load(
|
||||
"@io_bazel_rules_go//go:def.bzl",
|
||||
"go_library",
|
||||
)
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["well_known_labels.go"],
|
||||
importpath = "k8s.io/kubernetes/pkg/proxy/apis",
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "package-srcs",
|
||||
srcs = glob(["**"]),
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "all-srcs",
|
||||
srcs = [
|
||||
":package-srcs",
|
||||
"//pkg/proxy/apis/config:all-srcs",
|
||||
],
|
||||
tags = ["automanaged"],
|
||||
)
|
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
Copyright 2019 The Kubernetes 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.
|
||||
*/
|
||||
|
||||
package apis
|
||||
|
||||
const (
|
||||
// LabelServiceProxyName indicates that an alternative service
|
||||
// proxy will implement this Service.
|
||||
LabelServiceProxyName = "service.kubernetes.io/service-proxy-name"
|
||||
)
|
Loading…
Reference in New Issue