Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[controller] Add node selectors for csi components #58

Open
wants to merge 60 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
52c1f03
add selectors
AleksZimin Dec 24, 2024
c31b3d4
update deps
AleksZimin Dec 24, 2024
0643284
fix
AleksZimin Dec 24, 2024
afb59d5
fix 2
AleksZimin Dec 24, 2024
6884cbd
tests
AleksZimin Dec 24, 2024
f40ff92
fix
AleksZimin Dec 24, 2024
79aa9c7
fix
AleksZimin Dec 24, 2024
fe9d1cf
fix2
AleksZimin Dec 24, 2024
90c54ef
fix2
AleksZimin Dec 24, 2024
500f3a6
fix3
AleksZimin Dec 24, 2024
6a8b4d7
fix4
AleksZimin Dec 24, 2024
f657394
fix5
AleksZimin Dec 24, 2024
ca7fd51
change log verbosity at debug
AleksZimin Dec 24, 2024
24a3b5d
fix templates
AleksZimin Dec 24, 2024
eafee2f
fix templates 2
AleksZimin Dec 24, 2024
e6ddc17
fix rbac
AleksZimin Dec 24, 2024
90271ba
fix 2
AleksZimin Dec 24, 2024
e262b6a
fix 3
AleksZimin Dec 24, 2024
037612c
fix 4
AleksZimin Dec 24, 2024
70db5c2
fix ns
AleksZimin Dec 24, 2024
b6bff37
fix ns 2
AleksZimin Dec 24, 2024
550ede7
fix rbac
AleksZimin Dec 25, 2024
38d86d7
add rest client
AleksZimin Dec 25, 2024
79d5b3d
fix logging
AleksZimin Dec 25, 2024
88d6fdf
move to lib helm
AleksZimin Dec 25, 2024
ab16f56
fix lib helm
AleksZimin Dec 25, 2024
9fd0749
some fixes
AleksZimin Dec 25, 2024
491b247
tru alt
AleksZimin Dec 27, 2024
dbd17ad
2
AleksZimin Dec 27, 2024
a917129
fixes after review
AleksZimin Dec 31, 2024
4751e7c
add retries
AleksZimin Jan 7, 2025
2390a45
add patch
AleksZimin Jan 8, 2025
56691c6
test
AleksZimin Jan 8, 2025
de4cce8
Revert "test"
AleksZimin Jan 8, 2025
395f6c4
fix
AleksZimin Jan 8, 2025
76dfeda
linter and style (#62)
astef Jan 10, 2025
85886b3
fix reconcile module pods: add selectors for reconciled pods
AleksZimin Jan 11, 2025
0faaa0e
Merge branch 'main' into add-node-selectors
AleksZimin Jan 16, 2025
0bc0888
Improve readability (#63)
astef Jan 16, 2025
4b92826
bump go deps
AleksZimin Jan 16, 2025
b57a353
add scheduler extender
AleksZimin Jan 16, 2025
d51bf4b
fix tests
AleksZimin Jan 16, 2025
a4e24b8
bump go versions
AleksZimin Jan 16, 2025
02c35cd
add hook
AleksZimin Jan 16, 2025
1268ce8
add openapi val
AleksZimin Jan 17, 2025
daf2923
[controller] Fix textlogger initialization (#68)
astef Jan 17, 2025
0fd2680
fix
AleksZimin Jan 17, 2025
5ffa6a3
fix
AleksZimin Jan 17, 2025
6041386
fix
AleksZimin Jan 17, 2025
35db1bf
fix
AleksZimin Jan 17, 2025
77c683e
fix
AleksZimin Jan 17, 2025
b4cb281
fix
AleksZimin Jan 17, 2025
510b57f
Merge branch 'main' into add-node-selectors
AleksZimin Jan 17, 2025
a840692
fix
AleksZimin Jan 17, 2025
d2a951f
fix
AleksZimin Jan 17, 2025
4afc3db
fix
AleksZimin Jan 17, 2025
1422a1b
fix linter
AleksZimin Jan 17, 2025
2814770
fix
AleksZimin Jan 17, 2025
fa0832c
add some tsts
AleksZimin Jan 18, 2025
2cda26c
fix
AleksZimin Jan 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion images/controller/src/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,17 @@ import (
"d8-controller/pkg/kubutils"
"d8-controller/pkg/logger"
"fmt"
cn "github.com/deckhouse/csi-nfs/api/v1alpha1"
"os"
goruntime "runtime"

cn "github.com/deckhouse/csi-nfs/api/v1alpha1"

"sigs.k8s.io/controller-runtime/pkg/cache"

snapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumesnapshot/v1"
v1 "k8s.io/api/core/v1"
sv1 "k8s.io/api/storage/v1"

extv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
"k8s.io/apimachinery/pkg/runtime"
apiruntime "k8s.io/apimachinery/pkg/runtime"
Expand All @@ -46,6 +49,7 @@ var (
extv1.AddToScheme,
v1.AddToScheme,
sv1.AddToScheme,
snapshotv1.AddToScheme,
}
)

Expand Down Expand Up @@ -111,6 +115,11 @@ func main() {
os.Exit(1)
}

if _, err = controller.RunNodeSelectorReconciler(mgr, *cfgParams, *log); err != nil {
log.Error(err, fmt.Sprintf("[main] unable to run %s", controller.NodeSelectorReconcilerName))
os.Exit(1)
}

if err = mgr.AddHealthzCheck("healthz", healthz.Ping); err != nil {
log.Error(err, "[main] unable to mgr.AddHealthzCheck")
os.Exit(1)
Expand Down
97 changes: 48 additions & 49 deletions images/controller/src/go.mod
Original file line number Diff line number Diff line change
@@ -1,72 +1,71 @@
module d8-controller

go 1.22.2
go 1.23.0

toolchain go1.23.4

require (
github.com/deckhouse/csi-nfs/api v0.0.0-20240803013516-738ee1ca87bc
github.com/go-logr/logr v1.4.1
github.com/onsi/ginkgo/v2 v2.15.0
github.com/onsi/gomega v1.31.0
k8s.io/api v0.29.2
k8s.io/apiextensions-apiserver v0.29.2
k8s.io/apimachinery v0.30.2
k8s.io/client-go v0.29.2
k8s.io/klog/v2 v2.120.1
sigs.k8s.io/controller-runtime v0.17.4
github.com/deckhouse/csi-nfs/api v0.0.0-20241224122153-0e81b0fda4ad
github.com/go-logr/logr v1.4.2
github.com/kubernetes-csi/external-snapshotter/client/v8 v8.2.0
github.com/onsi/ginkgo/v2 v2.22.1
github.com/onsi/gomega v1.36.2
gopkg.in/yaml.v3 v3.0.1
k8s.io/api v0.32.0
k8s.io/apiextensions-apiserver v0.32.0
k8s.io/apimachinery v0.32.0
k8s.io/client-go v0.32.0
k8s.io/klog/v2 v2.130.1
sigs.k8s.io/controller-runtime v0.19.3
)

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.11.0 // indirect
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.8.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // 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-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect
github.com/go-openapi/jsonreference v0.21.0 // indirect
github.com/go-openapi/swag v0.23.0 // indirect
github.com/go-task/slim-sprig/v3 v3.0.0 // 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.4 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/gnostic-models v0.6.9 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/imdario/mergo v0.3.6 // indirect
github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad // indirect
github.com/google/uuid v1.6.0 // 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/v2 v2.0.0 // indirect
github.com/klauspost/compress v1.17.11 // indirect
github.com/mailru/easyjson v0.9.0 // 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.18.0 // 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/prometheus/client_golang v1.20.5 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.61.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/oauth2 v0.12.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/term v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.18.0 // indirect
github.com/x448/float16 v0.8.4 // indirect
golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 // indirect
golang.org/x/net v0.33.0 // indirect
golang.org/x/oauth2 v0.24.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/term v0.27.0 // indirect
golang.org/x/text v0.21.0 // indirect
golang.org/x/time v0.8.0 // indirect
golang.org/x/tools v0.28.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.33.0 // indirect
google.golang.org/protobuf v1.36.1 // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.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/component-base v0.29.2 // indirect
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
k8s.io/utils v0.0.0-20240102154912-e7106e64919e // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
k8s.io/kube-openapi v0.0.0-20241212222426-2c72e554b1e7 // indirect
k8s.io/utils v0.0.0-20241210054802-24370beab758 // indirect
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.5.0 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
)
Loading
Loading