Skip to content

Commit

Permalink
cleanup and client
Browse files Browse the repository at this point in the history
  • Loading branch information
yalosev committed Oct 13, 2023
1 parent 51f71d7 commit 416e607
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 28 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/flant/shell-operator
go 1.19

require (
github.com/flant/kube-client v0.26.2-0.20231011163110-aabf62d4e4fe
github.com/flant/kube-client v1.0.0
github.com/flant/libjq-go v1.6.3-0.20201126171326-c46a40ff22ee // branch: master
github.com/go-chi/chi/v5 v5.0.10
github.com/go-openapi/spec v0.19.8
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCv
github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/flant/go-openapi-validate v0.19.12-flant.0 h1:xk6kvc9fHKMgUdB6J7kbpbLR5vJOUzKAK8p3nrD7mDk=
github.com/flant/go-openapi-validate v0.19.12-flant.0/go.mod h1:Rzou8hA/CBw8donlS6WNEUQupNvUZ0waH08tGe6kAQ4=
github.com/flant/kube-client v0.26.2-0.20231011163110-aabf62d4e4fe h1:obusY1s0gCLGNNUgqQUsJAXK6XRj3Ha2bh1b+k2lYEo=
github.com/flant/kube-client v0.26.2-0.20231011163110-aabf62d4e4fe/go.mod h1:YVcJ8PxomM0iYsK7nj2I3lmog2D0j/GloJfLYnhjlls=
github.com/flant/kube-client v1.0.0 h1:hoP0qB75cb3qQZw5N29rgPNhX3KC2MuxT/By3IkXxxc=
github.com/flant/kube-client v1.0.0/go.mod h1:YVcJ8PxomM0iYsK7nj2I3lmog2D0j/GloJfLYnhjlls=
github.com/flant/libjq-go v1.6.3-0.20201126171326-c46a40ff22ee h1:evii83J+/6QGNvyf6tjQ/p27DPY9iftxIBb37ALJRTg=
github.com/flant/libjq-go v1.6.3-0.20201126171326-c46a40ff22ee/go.mod h1:f+REaGl/+pZR97rbTcwHEka/MAipoQQ2Mc0iQUj4ak0=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
Expand Down
25 changes: 0 additions & 25 deletions pkg/kube_events_manager/monitor_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,25 +81,6 @@ func (c *MonitorConfig) WithFieldSelector(fieldSel *FieldSelector) {
}
}

// func (c *MonitorConfig) AddFieldSelectorRequirement(field string, op string, value string) {
// if c.FieldSelector == nil {
// c.FieldSelector = &FieldSelector{
// MatchExpressions: []FieldSelectorRequirement{},
// }
// }
// if c.FieldSelector.MatchExpressions == nil {
// c.FieldSelector.MatchExpressions = make([]FieldSelectorRequirement, 0)
// }
//
// req := FieldSelectorRequirement{
// Field: field,
// Operator: op,
// Value: value,
// }
//
// c.FieldSelector.MatchExpressions = append(c.FieldSelector.MatchExpressions, req)
//}

// WithLabelSelector copies input LabelSelector into monitor.LabelSelector
func (c *MonitorConfig) WithLabelSelector(labelSel *metav1.LabelSelector) {
if labelSel != nil {
Expand All @@ -110,12 +91,6 @@ func (c *MonitorConfig) WithLabelSelector(labelSel *metav1.LabelSelector) {
}
}

// func (c *MonitorConfig) IsAnyNamespace() bool {
// return c.NamespaceSelector == nil ||
// (c.NamespaceSelector.NameSelector == nil && c.NamespaceSelector.LabelSelector == nil) ||
// (c.NamespaceSelector.NameSelector != nil && len(c.NamespaceSelector.NameSelector.MatchNames) == 0)
//}

// names returns names of monitored objects if nameSelector.matchNames is defined in config.
func (c *MonitorConfig) names() []string {
res := make([]string, 0)
Expand Down

0 comments on commit 416e607

Please sign in to comment.