impl

package
v0.0.0-...-eb75853 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CalicoIPAddr                      = "cni.projectcalico.org~1ipAddrs" // cni.projectcalico.org/ipAddrs /为特殊字符在jsonPatch中要修改为~1
	RequiredPodAnnotations            = "fix.pod.ip"
	EndpointExternalIPEnableLabels    = "endpoint-external-ip"
	RequiredServiceExternalIPLabels   = "externalIP"
	RequiredServiceExternalPortLabels = "externalPort"

	EndpointBackupIPEnableLabels  = "endpoint-backup-ip"
	RequiredServiceBackupIPLabels = "backupIP"

	Enabled                                = "enabled"
	Disabled                               = "disabled"
	EndpointExtend                         = "endpoint-extend"
	InjectLogSidecarRequiredPodAnnotations = "log-injection"
	MetricInterval                         = "metric-interval"
	MetricIntervalEnv                      = "metricInterval"
	LogMetricsShell                        = "log_metrics.sh"

	LogFileDirectory   = "log-file-directory"
	LogScriptDirectory = "log-script-directory"

	PrometheusAPPInfoName    = "prometheus.io~1appinfoname"
	PrometheusAPPMetrics     = "prometheus.io~1appmetrics"
	PrometheusAPPMetricsPath = "prometheus.io~1appmetricspath"
	PrometheusAPPMetricsPort = "prometheus.io~1appmetricsport"
	PrometheusScrape         = "prometheus.io~1scrape"
)

Variables

This section is empty.

Functions

func CheckIp

func CheckIp(ip string) bool

检查IP地址是否合法

func CheckNotDuplicate

func CheckNotDuplicate(list []string) bool

slice item 重复检查

func CheckPort

func CheckPort(port string) bool

检查Port是否合法

func CreateConfigMap

func CreateConfigMap(name, namespace string, data map[string]string) error

func DeleteConfigMap

func DeleteConfigMap(name, namespace string) error

func EqualSlice

func EqualSlice(a, b []string) bool

比较slice是否相等

func GetConfigMap

func GetConfigMap(name, namespace string) error

func GetDeploymentNameByPod

func GetDeploymentNameByPod(name string) string

通过Pod获取Deployment Name

func K8SClient

func K8SClient() (*kubernetes.Clientset, error)

func MutateEndpointExtendIp

func MutateEndpointExtendIp(c *gin.Context)

func MutateFixPodIP

func MutateFixPodIP(c *gin.Context)

func MutateInjectLogSidecar

func MutateInjectLogSidecar(c *gin.Context)

func ValidateEndpointExtendIp

func ValidateEndpointExtendIp(c *gin.Context)

func ValidateFixPodIP

func ValidateFixPodIP(c *gin.Context)

func ValidateInjectLogSidecar

func ValidateInjectLogSidecar(c *gin.Context)

Types

This section is empty.

Jump to

Keyboard shortcuts

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