Skip to content

Commit

Permalink
feat: support endpointslice probe management
Browse files Browse the repository at this point in the history
Check the addresses of the endpointslice stored in the serviceImport
annotation. If it cannot be pinged, record it in the serviceImport
annotation.

Signed-off-by: zhuguihua <[email protected]>
  • Loading branch information
zhuguihua authored and Guihua Zhu committed Oct 18, 2023
1 parent 579c55b commit 69fa16e
Show file tree
Hide file tree
Showing 3,792 changed files with 1,216,827 additions and 188 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
25 changes: 25 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## Build the manager binary
#FROM golang:1.20 as builder
#
#WORKDIR /workspace
#
## Copy the Go Modules manifests
#COPY go.mod go.mod
#COPY go.sum go.sum
#RUN go mod download
#
## Copy the go source codes
#COPY cmd/ cmd/
#COPY pkg/ pkg/
#
## Build
#RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o controller cmd/epsprobe/epsprobe.go

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM alpine:3.15.0
WORKDIR /
#COPY --from=builder /workspace/controller .
COPY controller /controller

ENTRYPOINT ["/controller"]
Empty file added README.md
Empty file.
66 changes: 66 additions & 0 deletions deploy/eps-probe-plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
app: eps-probe-plugin
name: eps-probe-plugin
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: eps-probe-plugin
rules:
- apiGroups: ["multicluster.x-k8s.io"]
resources: ["*"]
verbs: ["*"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: eps-probe-plugin
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: eps-probe-plugin
subjects:
- kind: ServiceAccount
name: eps-probe-plugin
namespace: kube-system
---
piVersion: apps/v1
kind: Deployment
metadata:
labels:
app: eps-probe-plugin
name: eps-probe-plugin
namespace: kube-system
spec:
replicas: 2
selector:
matchLabels:
app: eps-probe-plugin
template:
metadata:
labels:
app: eps-probe-plugin
spec:
tolerations:
- key: node-role.kubernetes.io/master
effect: NoSchedule
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- eps-probe-plugin
topologyKey: "kubernetes.io/hostname"
serviceAccountName: eps-probe-plugin
containers:
- image: registry.paas/cmss/eps-probe-plugin:v0.1
imagePullPolicy: IfNotPresent
name: eps-probe-plugin
70 changes: 66 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,71 @@
module github.com/kosmos.io/eps-probe-plugin
module eps-probe-plugin

go 1.20
go 1.19

require (
k8s.io/klog/v2 v2.90.0
github.com/go-ping/ping v1.1.0
k8s.io/apimachinery v0.28.2
k8s.io/client-go v0.28.1
k8s.io/klog/v2 v2.100.1
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2
sigs.k8s.io/controller-runtime v0.16.2
sigs.k8s.io/mcs-api v0.1.0
)

require github.com/go-logr/logr v1.2.0 // indirect
require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-logr/zapr v1.2.4 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_golang v1.16.0 // indirect
github.com/prometheus/client_model v0.4.0 // indirect
github.com/prometheus/common v0.44.0 // indirect
github.com/prometheus/procfs v0.10.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.25.0 // indirect
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect
golang.org/x/net v0.13.0 // indirect
golang.org/x/oauth2 v0.8.0 // indirect
golang.org/x/sync v0.2.0 // indirect
golang.org/x/sys v0.11.0 // indirect
golang.org/x/term v0.10.0 // indirect
golang.org/x/text v0.11.0 // indirect
golang.org/x/time v0.3.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/api v0.28.1 // indirect
k8s.io/apiextensions-apiserver v0.28.0 // indirect
k8s.io/component-base v0.28.1 // indirect
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)
Loading

0 comments on commit 69fa16e

Please sign in to comment.