k8s/io/kubernetes/pkg/api.IsServiceIPSet 示例代码

2022-03-03

以下示例是关于golang中包含api.IsServiceIPSet用法的示例代码,想了解api.IsServiceIPSet的具体用法?api.IsServiceIPSet怎么用?api.IsServiceIPSet使用的例子?那么可以参考以下10个相关示例代码来学习它的具体使用方法。

示例1:
rest.go开发语言: Go项目名称: amygdala代码行数: 395
83		if releaseServiceIP {
84			if api.IsServiceIPSet(service) {
85				rs.serviceIPs.Release(net.ParseIP(service.Spec.ClusterIP))
103		releaseServiceIP = true
104	} else if api.IsServiceIPSet(service) {
105		// Try to respect the requested IP.
171
172	if api.IsServiceIPSet(service) {
173		rs.serviceIPs.Release(net.ParseIP(service.Spec.ClusterIP))
示例2:
rest.go开发语言: Go项目名称: cjcullen代码行数: 582
86		if releaseServiceIP {
87			if api.IsServiceIPSet(service) {
88				rs.serviceIPs.Release(net.ParseIP(service.Spec.ClusterIP))
106		releaseServiceIP = true
107	} else if api.IsServiceIPSet(service) {
108		// Try to respect the requested IP.
225
226	if api.IsServiceIPSet(service) {
227		rs.serviceIPs.Release(net.ParseIP(service.Spec.ClusterIP))
示例3:
rest.go开发语言: Go项目名称: cloud-zuiwanyuan代码行数: 400
83		if releaseServiceIP {
84			if api.IsServiceIPSet(service) {
85				rs.serviceIPs.Release(net.ParseIP(service.Spec.ClusterIP))
103		releaseServiceIP = true
104	} else if api.IsServiceIPSet(service) {
105		// Try to respect the requested IP.
171
172	if api.IsServiceIPSet(service) {
173		rs.serviceIPs.Release(net.ParseIP(service.Spec.ClusterIP))
示例4:
kubelet.go开发语言: Go项目名称: amygdala代码行数: 3627
1433		// ignore services where ClusterIP is "None" or empty
1434		if !api.IsServiceIPSet(&service) {
1435			continue
示例5:
proxier.go开发语言: Go项目名称: amygdala代码行数: 1050
380		// if ClusterIP is "None" or empty, skip proxying
381		if !api.IsServiceIPSet(service) {
382			glog.V(3).Infof("Skipping service %s due to clusterIP = %q", types.NamespacedName{Namespace: service.Namespace, Name: service.Name}, service.Spec.ClusterIP)
示例6:
envvars.go开发语言: Go项目名称: amygdala代码行数: 108
37		// only services that have the cluster IP set should be included here
38		if !api.IsServiceIPSet(service) {
39			continue
示例7:
proxier.go开发语言: Go项目名称: amygdala代码行数: 1116
396		// if ClusterIP is "None" or empty, skip proxying
397		if !api.IsServiceIPSet(service) {
398			glog.V(3).Infof("Skipping service %s due to clusterIP = %q", svcName, service.Spec.ClusterIP)
示例8:
repair.go开发语言: Go项目名称: amygdala代码行数: 152
113	for _, svc := range list.Items {
114		if !api.IsServiceIPSet(&svc) {
115			continue
示例9:
kubelet_pods.go开发语言: Go项目名称: cjcullen代码行数: 1399
345		// ignore services where ClusterIP is "None" or empty
346		if !api.IsServiceIPSet(service) {
347			continue
示例10:
kubelet.go开发语言: Go项目名称: cloud-zuiwanyuan代码行数: 3053
1337		// ignore services where ClusterIP is "None" or empty
1338		if !api.IsServiceIPSet(&service) {
1339			continue

本文地址:https://www.itbaoku.cn/snippets/415607.html