Documentation ¶
Index ¶
- Constants
- func CheckIp(ip string) bool
- func CheckNotDuplicate(list []string) bool
- func CheckPort(port string) bool
- func CreateConfigMap(name, namespace string, data map[string]string) error
- func DeleteConfigMap(name, namespace string) error
- func EqualSlice(a, b []string) bool
- func GetConfigMap(name, namespace string) error
- func GetDeploymentNameByPod(name string) string
- func K8SClient() (*kubernetes.Clientset, error)
- func MutateEndpointExtendIp(c *gin.Context)
- func MutateFixPodIP(c *gin.Context)
- func MutateInjectLogSidecar(c *gin.Context)
- func MutateLog(ar *v1beta1.AdmissionReview) *v1beta1.AdmissionResponse
- func ValidateEndpointExtendIp(c *gin.Context)
- func ValidateFixPodIP(c *gin.Context)
- func ValidateInjectLogSidecar(c *gin.Context)
- func ValidateLog(ar *v1beta1.AdmissionReview) *v1beta1.AdmissionResponse
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 DeleteConfigMap ¶
func GetConfigMap ¶
func GetDeploymentNameByPod ¶
通过Pod获取Deployment Name
func K8SClient ¶
func K8SClient() (*kubernetes.Clientset, error)
func MutateEndpointExtendIp ¶
func MutateFixPodIP ¶
func MutateInjectLogSidecar ¶
func MutateLog ¶
func MutateLog(ar *v1beta1.AdmissionReview) *v1beta1.AdmissionResponse
func ValidateFixPodIP ¶
func ValidateLog ¶
func ValidateLog(ar *v1beta1.AdmissionReview) *v1beta1.AdmissionResponse
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.