Skip to content

Commit

Permalink
Replaced virtual-kubelet with custom version for k8s 1.29
Browse files Browse the repository at this point in the history
  • Loading branch information
fra98 committed Jan 12, 2024
1 parent 0c0459f commit adf1ecd
Show file tree
Hide file tree
Showing 33 changed files with 221 additions and 249 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ E2E_TARGETS = e2e-dir \
# Export these variables before to run the e2e tests

# export CLUSTER_NUMBER=2
# export K8S_VERSION=v1.25.0
# export K8S_VERSION=v1.27.3
# export CNI=kindnet
# export TMPDIR=$(mktemp -d)
# export BINDIR=${TMPDIR}/bin
Expand All @@ -246,10 +246,11 @@ E2E_TARGETS = e2e-dir \
# export TEMPLATE_DIR=${PWD}/test/e2e/pipeline/infra/kind
# export NAMESPACE=liqo
# export KUBECONFIGDIR=${TMPDIR}/kubeconfigs
# export LIQO_VERSION=5e08ffc6e498ba312f9b161a3993887c321dc5f5
# export LIQO_VERSION=cf55ff100e9d183d483693d63391446dce6cfdcc
# export INFRA=kind
# export LIQOCTL=${BINDIR}/liqoctl
# export POD_CIDR_OVERLAPPING=false
# export SECURITY_MODE=FullPodToPod
# export TEMPLATE_FILE=cluster-templates.yaml.tmpl

# Run e2e tests
Expand Down
10 changes: 5 additions & 5 deletions cmd/discovery/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func main() {
LeaderElectionID: "b3156c4e.liqo.io",
})
if err != nil {
klog.Errorf("Unable to create main manager: %w", err)
klog.Errorf("Unable to create main manager: %v", err)
os.Exit(1)
}

Expand All @@ -110,7 +110,7 @@ func main() {
},
})
if err != nil {
klog.Errorf("Unable to create auxiliary (namespaced) manager: %w", err)
klog.Errorf("Unable to create auxiliary (namespaced) manager: %v", err)
os.Exit(1)
}

Expand All @@ -120,16 +120,16 @@ func main() {
discoveryCtl := discovery.NewDiscoveryCtrl(mgr.GetClient(), namespacedClient, *namespace,
clusterIdentity, mdnsConfig, *dialTCPTimeout)
if err := mgr.Add(discoveryCtl); err != nil {
klog.Errorf("Unable to add the discovery controller to the manager: %w", err)
klog.Errorf("Unable to add the discovery controller to the manager: %v", err)
os.Exit(1)
}

if err := mgr.Add(auxmgr); err != nil {
klog.Errorf("Unable to add the auxiliary manager to the main one: %w", err)
klog.Errorf("Unable to add the auxiliary manager to the main one: %v", err)
os.Exit(1)
}
if err := mgr.Start(ctrl.SetupSignalHandler()); err != nil {
klog.Errorf("Unable to start manager: %w", err)
klog.Errorf("Unable to start manager: %v", err)
os.Exit(1)
}
}
12 changes: 6 additions & 6 deletions cmd/liqo-controller-manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ func main() {
})

if err != nil {
klog.Errorf("Unable to create auxiliary manager: %w", err)
klog.Errorf("Unable to create auxiliary manager: %v", err)
os.Exit(1)
}

Expand All @@ -312,17 +312,17 @@ func main() {
})

if err != nil {
klog.Errorf("Unable to create auxiliary manager: %w", err)
klog.Errorf("Unable to create auxiliary manager: %v", err)
os.Exit(1)
}

if err := mgr.Add(auxmgrLocalPods); err != nil {
klog.Errorf("Unable to add the auxiliary manager to the main one: %w", err)
klog.Errorf("Unable to add the auxiliary manager to the main one: %v", err)
os.Exit(1)
}

if err := mgr.Add(auxmgrVirtualKubeletPods); err != nil {
klog.Errorf("Unable to add the auxiliary manager to the main one: %w", err)
klog.Errorf("Unable to add the auxiliary manager to the main one: %v", err)
os.Exit(1)
}

Expand Down Expand Up @@ -534,7 +534,7 @@ func main() {
LocalPodsClient: auxmgrLocalPods.GetClient(),
}
if err = podStatusReconciler.SetupWithManager(mgr); err != nil {
klog.Errorf("Unable to start the podstatus reconciler", err)
klog.Errorf("Unable to start the podstatus reconciler: %v", err)
os.Exit(1)
}

Expand All @@ -544,7 +544,7 @@ func main() {
Scheme: mgr.GetScheme(),
}
if err = nodeFailureReconciler.SetupWithManager(mgr); err != nil {
klog.Errorf("Unable to start the nodeFailureReconciler", err)
klog.Errorf("Unable to start the nodeFailureReconciler: %v", err)
os.Exit(1)
}
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/liqonet/gateway-operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,12 @@ func runGatewayOperator(commonFlags *liqonetCommonFlags, gatewayFlags *gatewayOp
},
})
if err != nil {
klog.Errorf("Unable to create auxiliary manager: %w", err)
klog.Errorf("Unable to create auxiliary manager: %v", err)
os.Exit(1)
}

if err := main.Add(auxmgrOffloadedPods); err != nil {
klog.Errorf("Unable to add the auxiliary manager to the main one: %w", err)
klog.Errorf("Unable to add the auxiliary manager to the main one: %v", err)
os.Exit(1)
}

Expand Down
104 changes: 53 additions & 51 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,30 @@ require (
github.com/mattn/go-isatty v0.0.20
github.com/metal-stack/go-ipam v1.11.3
github.com/miekg/dns v1.1.50
github.com/mittwald/go-helm-client v0.12.6
github.com/mittwald/go-helm-client v0.12.7
github.com/onsi/ginkgo/v2 v2.13.2
github.com/onsi/gomega v1.30.0
github.com/openshift/api v0.0.0-20210521075222-e273a339932a
github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.17.0
github.com/prometheus/client_golang v1.18.0
github.com/pterm/pterm v0.12.71
github.com/spf13/cobra v1.8.0
github.com/spf13/pflag v1.0.5
github.com/virtual-kubelet/virtual-kubelet v1.10.0
github.com/vishvananda/netlink v1.2.1-beta.2
github.com/vishvananda/netns v0.0.4
go4.org/netipx v0.0.0-20220925034521-797b0c90d8ab
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa
golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc
golang.org/x/mod v0.14.0
golang.org/x/sync v0.5.0
golang.org/x/sys v0.15.0
golang.org/x/text v0.14.0
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20220504211119-3d4a969bb56b
gomodules.xyz/jsonpatch/v2 v2.4.0
google.golang.org/api v0.126.0
google.golang.org/api v0.149.0
google.golang.org/grpc v1.61.0-dev
google.golang.org/protobuf v1.31.0
google.golang.org/protobuf v1.32.0
gopkg.in/yaml.v3 v3.0.1
helm.sh/helm/v3 v3.13.3
k8s.io/api v0.29.0
Expand All @@ -56,7 +56,7 @@ require (
k8s.io/klog/v2 v2.110.1
k8s.io/kubectl v0.29.0
k8s.io/metrics v0.29.0
k8s.io/utils v0.0.0-20231127182322-b307cd553661
k8s.io/utils v0.0.0-20240102154912-e7106e64919e
sigs.k8s.io/aws-iam-authenticator v0.6.16
sigs.k8s.io/controller-runtime v0.16.3
sigs.k8s.io/sig-storage-lib-external-provisioner/v7 v7.0.1
Expand All @@ -66,11 +66,11 @@ require (
atomicgo.dev/cursor v0.2.0 // indirect
atomicgo.dev/keyboard v0.2.9 // indirect
atomicgo.dev/schedule v0.1.0 // indirect
cloud.google.com/go/compute v1.23.0 // indirect
cloud.google.com/go/compute v1.23.3 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
dario.cat/mergo v1.0.0 // indirect
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.23 // indirect
github.com/Azure/go-autorest/autorest/azure/cli v0.4.6 // indirect
Expand Down Expand Up @@ -108,32 +108,33 @@ require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/dimchansky/utfbom v1.1.1 // indirect
github.com/docker/cli v24.0.6+incompatible // indirect
github.com/docker/distribution v2.8.2+incompatible // indirect
github.com/distribution/reference v0.5.0 // indirect
github.com/docker/cli v24.0.7+incompatible // indirect
github.com/docker/distribution v2.8.3+incompatible // indirect
github.com/docker/docker v24.0.7+incompatible // indirect
github.com/docker/docker-credential-helpers v0.7.0 // indirect
github.com/docker/docker-credential-helpers v0.8.0 // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-metrics v0.0.1 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/emicklei/go-restful/v3 v3.11.1 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
github.com/evanphx/json-patch v5.7.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect
github.com/fatih/camelcase v1.0.0 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/felixge/httpsnoop v1.0.3 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/fvbommel/sortorder v1.1.0 // indirect
github.com/go-errors/errors v1.4.2 // indirect
github.com/go-errors/errors v1.5.1 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.5.0 // indirect
github.com/go-gorp/gorp/v3 v3.1.0 // indirect
github.com/go-logr/logr v1.3.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // 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/go-openapi/jsonpointer v0.20.2 // indirect
github.com/go-openapi/jsonreference v0.20.4 // indirect
github.com/go-openapi/swag v0.22.7 // indirect
github.com/go-redis/redis/v8 v8.11.5 // indirect
github.com/go-sql-driver/mysql v1.6.0 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
Expand All @@ -149,30 +150,29 @@ require (
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/pprof v0.0.0-20230323073829-e72429f035bd // indirect
github.com/google/s2a-go v0.1.4 // indirect
github.com/google/s2a-go v0.1.7 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
github.com/googleapis/gax-go/v2 v2.11.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
github.com/googleapis/gax-go/v2 v2.12.0 // indirect
github.com/gookit/color v1.5.4 // indirect
github.com/gorilla/mux v1.8.0 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/gorilla/mux v1.8.1 // indirect
github.com/gorilla/websocket v1.5.1 // indirect
github.com/gosuri/uitable v0.0.4 // indirect
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect
github.com/gruntwork-io/go-commons v0.13.3 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/huandu/xstrings v1.4.0 // indirect
github.com/imdario/mergo v0.3.15 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/jmoiron/sqlx v1.3.5 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/josharian/native v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/karrick/godirwalk v1.17.0 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/klauspost/compress v1.16.0 // indirect
github.com/klauspost/compress v1.17.4 // indirect
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
github.com/lib/pq v1.10.9 // indirect
Expand All @@ -182,7 +182,7 @@ require (
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/mattn/go-zglob v0.0.3 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
github.com/mdlayher/genetlink v1.2.0 // indirect
github.com/mdlayher/netlink v1.6.0 // indirect
github.com/mdlayher/socket v0.2.3 // indirect
Expand All @@ -208,18 +208,18 @@ require (
github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/pquerna/otp v1.3.0 // indirect
github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 // indirect
github.com/prometheus/common v0.44.0 // indirect
github.com/prometheus/procfs v0.11.1 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.45.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/rubenv/sql-migrate v1.5.2 // indirect
github.com/rubenv/sql-migrate v1.6.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/safchain/ethtool v0.3.0 // indirect
github.com/sergi/go-diff v1.2.0 // indirect
github.com/shopspring/decimal v1.3.1 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/skeema/knownhosts v1.2.1 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/stretchr/testify v1.8.4 // indirect
github.com/urfave/cli v1.22.12 // indirect
github.com/urfave/cli/v2 v2.23.7 // indirect
Expand All @@ -239,30 +239,30 @@ require (
go.etcd.io/etcd/client/v3 v3.5.10 // indirect
go.mongodb.org/mongo-driver v1.11.1 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 // indirect
go.opentelemetry.io/otel v1.19.0 // indirect
go.opentelemetry.io/otel/metric v1.19.0 // indirect
go.opentelemetry.io/otel/trace v1.19.0 // indirect
go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 // indirect
go.opentelemetry.io/otel v1.21.0 // indirect
go.opentelemetry.io/otel/metric v1.21.0 // indirect
go.opentelemetry.io/otel/trace v1.21.0 // indirect
go.starlark.net v0.0.0-20231121155337-90ade8b19d09 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.25.0 // indirect
golang.org/x/crypto v0.17.0 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/oauth2 v0.13.0 // indirect
golang.org/x/oauth2 v0.15.0 // indirect
golang.org/x/term v0.15.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.15.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.16.0 // indirect
golang.zx2c4.com/wireguard v0.0.0-20220904105730-b51010ba13f0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97 // indirect
gopkg.in/evanphx/json-patch.v5 v5.6.0 // indirect
google.golang.org/genproto v0.0.0-20231212172506-995d672761c0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20231211222908-989df2bf70f3 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917 // indirect
gopkg.in/evanphx/json-patch.v5 v5.7.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
k8s.io/component-base v0.29.0 // indirect
k8s.io/kube-openapi v0.0.0-20231214164306-ab13479f8bf8 // indirect
k8s.io/kube-openapi v0.0.0-20240103195357-a9f8850cb432 // indirect
oras.land/oras-go v1.2.4 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/kustomize/api v0.16.0 // indirect
Expand All @@ -271,7 +271,9 @@ require (
sigs.k8s.io/yaml v1.4.0 // indirect
)

replace github.com/grandcat/zeroconf => github.com/liqotech/zeroconf v1.0.1-0.20201020081245-6384f3f21ffb

// Waitin for PR https://github.com/coreos/go-iptables/pull/110 to be merged
replace github.com/coreos/go-iptables => github.com/cheina97/go-iptables v0.0.0-20230824102241-61fc692e7548
replace (
// Waitin for PR https://github.com/coreos/go-iptables/pull/110 to be merged
github.com/coreos/go-iptables => github.com/cheina97/go-iptables v0.0.0-20230824102241-61fc692e7548
github.com/grandcat/zeroconf => github.com/liqotech/zeroconf v1.0.1-0.20201020081245-6384f3f21ffb
github.com/virtual-kubelet/virtual-kubelet => github.com/liqotech/virtual-kubelet v1.5.1-0.20240112103312-cae982a2af58
)

0 comments on commit adf1ecd

Please sign in to comment.