Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 10 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ require (
gomodules.xyz/pointer v0.1.0
gomodules.xyz/runtime v0.3.0
gomodules.xyz/x v0.0.17
k8s.io/api v0.32.3
k8s.io/apimachinery v0.32.3
k8s.io/api v0.32.8
k8s.io/apimachinery v0.32.8
k8s.io/cli-runtime v0.32.2
k8s.io/client-go v0.32.3
k8s.io/client-go v0.32.8
k8s.io/klog/v2 v2.130.1
k8s.io/kubectl v0.30.1
k8s.io/utils v0.0.0-20241210054802-24370beab758
kmodules.xyz/client-go v0.32.10
kmodules.xyz/client-go v0.32.11
kmodules.xyz/offshoot-api v0.32.0
kmodules.xyz/prober v0.32.0
kubedb.dev/apimachinery v0.59.0
kubestash.dev/apimachinery v0.22.0-rc.0
kubestash.dev/apimachinery v0.22.0
sigs.k8s.io/controller-runtime v0.20.4
sigs.k8s.io/yaml v1.4.0
stash.appscode.dev/apimachinery v0.41.0
Expand Down Expand Up @@ -195,16 +195,16 @@ require (
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.32.3 // indirect
k8s.io/apiserver v0.32.3 // indirect
k8s.io/component-base v0.32.3 // indirect
k8s.io/apiextensions-apiserver v0.32.8 // indirect
k8s.io/apiserver v0.32.8 // indirect
k8s.io/component-base v0.32.8 // indirect
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect
kmodules.xyz/apiversion v0.2.0 // indirect
kmodules.xyz/custom-resources v0.32.2 // indirect
kmodules.xyz/monitoring-agent-api v0.32.4 // indirect
kmodules.xyz/objectstore-api v0.32.2 // indirect
kubeops.dev/petset v0.0.12 // indirect
kubeops.dev/sidekick v0.0.11 // indirect
kubeops.dev/petset v0.0.15 // indirect
kubeops.dev/sidekick v0.0.12 // indirect
open-cluster-management.io/api v1.0.0 // indirect
sigs.k8s.io/gateway-api v1.1.0 // indirect
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
Expand Down
36 changes: 18 additions & 18 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -841,18 +841,18 @@ honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWh
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
k8s.io/api v0.32.3 h1:Hw7KqxRusq+6QSplE3NYG4MBxZw1BZnq4aP4cJVINls=
k8s.io/api v0.32.3/go.mod h1:2wEDTXADtm/HA7CCMD8D8bK4yuBUptzaRhYcYEEYA3k=
k8s.io/apiextensions-apiserver v0.32.3 h1:4D8vy+9GWerlErCwVIbcQjsWunF9SUGNu7O7hiQTyPY=
k8s.io/apiextensions-apiserver v0.32.3/go.mod h1:8YwcvVRMVzw0r1Stc7XfGAzB/SIVLunqApySV5V7Dss=
k8s.io/apimachinery v0.32.3 h1:JmDuDarhDmA/Li7j3aPrwhpNBA94Nvk5zLeOge9HH1U=
k8s.io/apimachinery v0.32.3/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE=
k8s.io/api v0.32.8 h1:PhuKPnqsaXYuwmLXRLAmdDJ9EZ2R2kEbOZTq4UE3lGc=
k8s.io/api v0.32.8/go.mod h1:gdRZQ4zXGawr9YrJ5OjTl7aR3TD0mTowtFsqFtpCDXo=
k8s.io/apiextensions-apiserver v0.32.8 h1:iYIIaZmn/BMTwzGYRZnYZysaKB4t2TL3O+0yhmbXE2U=
k8s.io/apiextensions-apiserver v0.32.8/go.mod h1:GTGskWgcBo/7boX33zcS8JY6vaG4s728AdbQPxtheVk=
k8s.io/apimachinery v0.32.8 h1:95I+2jX71Tev+C+UlhNbmKfv+A/TQII42HLskiHZpBg=
k8s.io/apimachinery v0.32.8/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE=
k8s.io/cli-runtime v0.32.2 h1:aKQR4foh9qeyckKRkNXUccP9moxzffyndZAvr+IXMks=
k8s.io/cli-runtime v0.32.2/go.mod h1:a/JpeMztz3xDa7GCyyShcwe55p8pbcCVQxvqZnIwXN8=
k8s.io/client-go v0.32.3 h1:RKPVltzopkSgHS7aS98QdscAgtgah/+zmpAogooIqVU=
k8s.io/client-go v0.32.3/go.mod h1:3v0+3k4IcT9bXTc4V2rt+d2ZPPG700Xy6Oi0Gdl2PaY=
k8s.io/component-base v0.32.3 h1:98WJvvMs3QZ2LYHBzvltFSeJjEx7t5+8s71P7M74u8k=
k8s.io/component-base v0.32.3/go.mod h1:LWi9cR+yPAv7cu2X9rZanTiFKB2kHA+JjmhkKjCZRpI=
k8s.io/client-go v0.32.8 h1:BkSFWUtRz/BbE3DJF98KPg7ix6lwMnIQ9DnHw3iWiSw=
k8s.io/client-go v0.32.8/go.mod h1:vGkCzRxZ7BuRX2zdW7+kOwCdcgOkq9omDWb26wk/sE0=
k8s.io/component-base v0.32.8 h1:Ez5yxl4Apas9m0gUQfwD60GbMyhfHPbvaYzQkpBDE6k=
k8s.io/component-base v0.32.8/go.mod h1:zrTYhjPNFrItmyFEPiRIL9pgZa4jIgOUyOwrEL7xb10=
k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
Expand All @@ -864,8 +864,8 @@ k8s.io/utils v0.0.0-20241210054802-24370beab758 h1:sdbE21q2nlQtFh65saZY+rRM6x6aJ
k8s.io/utils v0.0.0-20241210054802-24370beab758/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
kmodules.xyz/apiversion v0.2.0 h1:vAQYqZFm4xu4pbB1cAdHbFEPES6EQkcR4wc06xdTOWk=
kmodules.xyz/apiversion v0.2.0/go.mod h1:oPX8g8LvlPdPX3Yc5YvCzJHQnw3YF/X4/jdW0b1am80=
kmodules.xyz/client-go v0.32.10 h1:O/UKeU6Xc4scQG80DYw1HI8DYskyp1KsCEShIx3+T54=
kmodules.xyz/client-go v0.32.10/go.mod h1:4k+da95l/Idg7k0+qc5qZCJJoAF6IQK5x0Fa+hBVD+Q=
kmodules.xyz/client-go v0.32.11 h1:AbvsutYyCfCGgreMOx5ghdZto0ltKfhS/6n98TkXTGc=
kmodules.xyz/client-go v0.32.11/go.mod h1:4k+da95l/Idg7k0+qc5qZCJJoAF6IQK5x0Fa+hBVD+Q=
kmodules.xyz/custom-resources v0.32.2 h1:NkRqL/4AWHiXdT5WKFcJlBcvRuoNdeYIrBGvQIRJRn4=
kmodules.xyz/custom-resources v0.32.2/go.mod h1:YKFNcsFQU7Z3AcPvYVCdFtgAdWiG1Wd1HQMOxCrAoWc=
kmodules.xyz/monitoring-agent-api v0.32.4 h1:JGm2bvHfAXHAf7EKjFrNDG3f7+QFpYV2Mvgj3RDVRhw=
Expand All @@ -878,12 +878,12 @@ kmodules.xyz/prober v0.32.0 h1:8Z6pFRAu8kP0wwX2BooPCRy2SE6ZkUMHQmZDH5VUEGY=
kmodules.xyz/prober v0.32.0/go.mod h1:h0fH4m9DaIwuNZq85zOlWUvBycyy4LvCPMUUhpS3iSE=
kubedb.dev/apimachinery v0.59.0 h1:6daQ4dS6xayoyaZ67N5NXxOD1wH4H7v5JKPSwjPDbAk=
kubedb.dev/apimachinery v0.59.0/go.mod h1:cdAy0z4ED/iunIQprmaB4yCSxgBkFaT5fcOT/ogxl0Q=
kubeops.dev/petset v0.0.12 h1:NSFEeuckBVm44f3cAL4HhcQWvnfOE4qgbfug7+FEyaY=
kubeops.dev/petset v0.0.12/go.mod h1:akG9QH1JaOZQcuQKEKWvkVWI8P3im/5O554aTRvB6Y0=
kubeops.dev/sidekick v0.0.11 h1:OydXdIH6cYSiWxKIWvrywk95WhhHSERkc7RNPOmTekc=
kubeops.dev/sidekick v0.0.11/go.mod h1:90KMNmJOPoMKHbrdC1cpEsMx+1KjTea/lHDAbGRDzHc=
kubestash.dev/apimachinery v0.22.0-rc.0 h1:PWDWnRhntcBk4Tv3+aBxKst3Axwm2lCV8nugZI20Hew=
kubestash.dev/apimachinery v0.22.0-rc.0/go.mod h1:AgVLaTQX/MZ8GETMf3JuyfCsKy0wc1jPWVp4hUm2ywM=
kubeops.dev/petset v0.0.15 h1:iwTRFAp0RNw0A87sw2c97UZ6WIA9H/nhJBpDhXLa7fk=
kubeops.dev/petset v0.0.15/go.mod h1:sw96WiXfzhpmKpXj4a5AdmEHs0Bx4QMhf+iW15zY4Gg=
kubeops.dev/sidekick v0.0.12 h1:pmUjQLZDKxgREiM6z0PogLR1aDbgvkE9jRjbxG6dEt0=
kubeops.dev/sidekick v0.0.12/go.mod h1:RU7QH3E8DOLw15rBYlOOJSyczuwAnVVtYyZjJb00UB8=
kubestash.dev/apimachinery v0.22.0 h1:vp3Z7ISU2WYR6LkU7WLjbiCMSZQEjfzANN/C1cZ7L+s=
kubestash.dev/apimachinery v0.22.0/go.mod h1:c6d5CNgG3ScLB/EdCZcFx8gAY/aY8KkLTfMFy0cobQM=
open-cluster-management.io/api v1.0.0 h1:54QllH9DTudCk6VrGt0q8CDsE3MghqJeTaTN4RHZpE0=
open-cluster-management.io/api v1.0.0/go.mod h1:/OeqXycNBZQoe3WG6ghuWsMgsKGuMZrK8ZpsU6gWL0Y=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
Expand Down
27 changes: 27 additions & 0 deletions vendor/kmodules.xyz/client-go/.golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
version: "2"
linters:
default: standard
enable:
- unparam

formatters:
enable:
- gofmt
- goimports
settings:
gofmt:
rewrite-rules:
- pattern: 'interface{}'
replacement: 'any'

issues:
max-same-issues: 100

exclude-files:
- generated.*\\.go

exclude-dirs:
- vendor

run:
timeout: 10m
4 changes: 1 addition & 3 deletions vendor/kmodules.xyz/client-go/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,6 @@ test: $(BUILD_DIRS)
./hack/test.sh $(SRC_PKGS) \
"

ADDTL_LINTERS := gofmt,goimports,unparam

.PHONY: lint
lint: $(BUILD_DIRS)
@echo "running linter"
Expand All @@ -261,7 +259,7 @@ lint: $(BUILD_DIRS)
--env GO111MODULE=on \
--env GOFLAGS="-mod=vendor" \
$(BUILD_IMAGE) \
golangci-lint run --enable $(ADDTL_LINTERS) --timeout=10m --exclude-files="generated.*\.go$\" --exclude-dirs-use-default
golangci-lint run

$(BUILD_DIRS):
@mkdir -p $@
Expand Down
4 changes: 2 additions & 2 deletions vendor/kmodules.xyz/client-go/api/v1/object.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ func MustParseObjectID(key OID) *ObjectID {
return oid
}

func ObjectIDMap(key OID) (map[string]interface{}, error) {
id := map[string]interface{}{
func ObjectIDMap(key OID) (map[string]any, error) {
id := map[string]any{
"group": "",
"kind": "",
"namespace": "",
Expand Down
8 changes: 4 additions & 4 deletions vendor/kmodules.xyz/client-go/api/v1/timeofday.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func (t TimeOfDay) MarshalJSON() ([]byte, error) {
}

// ToUnstructured implements the value.UnstructuredConverter interface.
func (t TimeOfDay) ToUnstructured() interface{} {
func (t TimeOfDay) ToUnstructured() any {
if t.IsZero() {
return nil
}
Expand All @@ -177,11 +177,11 @@ func (t TimeOfDay) ToUnstructured() interface{} {
// the OpenAPI spec of this type.
//
// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators
func (_ TimeOfDay) OpenAPISchemaType() []string { return []string{"string"} }
func (TimeOfDay) OpenAPISchemaType() []string { return []string{"string"} }

// OpenAPISchemaFormat is used by the kube-openapi generator when constructing
// the OpenAPI spec of this type.
func (_ TimeOfDay) OpenAPISchemaFormat() string { return "time" }
func (TimeOfDay) OpenAPISchemaFormat() string { return "time" }

// MarshalQueryParameter converts to a URL query parameter value
func (t TimeOfDay) MarshalQueryParameter() (string, error) {
Expand All @@ -201,7 +201,7 @@ func (t *TimeOfDay) Fuzz(c fuzz.Continue) {
// Allow for about 1000 years of randomness. Leave off nanoseconds
// because JSON doesn't represent them so they can't round-trip
// properly.
t.Time = time.Unix(c.Rand.Int63n(1000*365*24*60*60), 0)
t.Time = time.Unix(c.Int63n(1000*365*24*60*60), 0)
}

// ensure Time implements fuzz.Interface
Expand Down
2 changes: 1 addition & 1 deletion vendor/kmodules.xyz/client-go/conditions/getter.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ func mirror(from Getter, targetCondition kmapi.ConditionType, options ...MirrorO
case true:
condition = TrueCondition(targetCondition)
case false:
condition = FalseCondition(targetCondition, mirrorOpt.fallbackReason, mirrorOpt.fallbackSeverity, mirrorOpt.fallbackMessage) //nolint:govet
condition = FalseCondition(targetCondition, mirrorOpt.fallbackReason, mirrorOpt.fallbackSeverity, "%s", mirrorOpt.fallbackMessage)
}
}

Expand Down
14 changes: 7 additions & 7 deletions vendor/kmodules.xyz/client-go/conditions/matcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,20 @@ type matchConditions struct {
expected kmapi.Conditions
}

func (m matchConditions) Match(actual interface{}) (success bool, err error) {
elems := []interface{}{}
func (m matchConditions) Match(actual any) (success bool, err error) {
elems := []any{}
for _, condition := range m.expected {
elems = append(elems, MatchCondition(condition))
}

return gomega.ConsistOf(elems).Match(actual)
}

func (m matchConditions) FailureMessage(actual interface{}) (message string) {
func (m matchConditions) FailureMessage(actual any) (message string) {
return fmt.Sprintf("expected\n\t%#v\nto match\n\t%#v\n", actual, m.expected)
}

func (m matchConditions) NegatedFailureMessage(actual interface{}) (message string) {
func (m matchConditions) NegatedFailureMessage(actual any) (message string) {
return fmt.Sprintf("expected\n\t%#v\nto not match\n\t%#v\n", actual, m.expected)
}

Expand All @@ -64,7 +64,7 @@ type matchCondition struct {
expected kmapi.Condition
}

func (m matchCondition) Match(actual interface{}) (success bool, err error) {
func (m matchCondition) Match(actual any) (success bool, err error) {
actualCondition, ok := actual.(kmapi.Condition)
if !ok {
return false, fmt.Errorf("actual should be of type Condition")
Expand Down Expand Up @@ -94,10 +94,10 @@ func (m matchCondition) Match(actual interface{}) (success bool, err error) {
return ok, err
}

func (m matchCondition) FailureMessage(actual interface{}) (message string) {
func (m matchCondition) FailureMessage(actual any) (message string) {
return fmt.Sprintf("expected\n\t%#v\nto match\n\t%#v\n", actual, m.expected)
}

func (m matchCondition) NegatedFailureMessage(actual interface{}) (message string) {
func (m matchCondition) NegatedFailureMessage(actual any) (message string) {
return fmt.Sprintf("expected\n\t%#v\nto not match\n\t%#v\n", actual, m.expected)
}
6 changes: 3 additions & 3 deletions vendor/kmodules.xyz/client-go/conditions/matchers.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type conditionMatcher struct {
Expected *kmapi.Condition
}

func (matcher *conditionMatcher) Match(actual interface{}) (success bool, err error) {
func (matcher *conditionMatcher) Match(actual any) (success bool, err error) {
actualCondition, ok := actual.(*kmapi.Condition)
if !ok {
return false, errors.New("value should be a condition")
Expand All @@ -45,10 +45,10 @@ func (matcher *conditionMatcher) Match(actual interface{}) (success bool, err er
return hasSameState(actualCondition, matcher.Expected), nil
}

func (matcher *conditionMatcher) FailureMessage(actual interface{}) (message string) {
func (matcher *conditionMatcher) FailureMessage(actual any) (message string) {
return format.Message(actual, "to have the same state of", matcher.Expected)
}

func (matcher *conditionMatcher) NegatedFailureMessage(actual interface{}) (message string) {
func (matcher *conditionMatcher) NegatedFailureMessage(actual any) (message string) {
return format.Message(actual, "not to have the same state of", matcher.Expected)
}
9 changes: 4 additions & 5 deletions vendor/kmodules.xyz/client-go/conditions/merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ type localizedCondition struct {
}

// merge a list of condition into a single one.
// This operation is designed to ensure visibility of the most relevant util for defining the
// This operation is designed to ensure visibility of the most relevant conditions for defining the
// operational state of a component. E.g. If there is one error in the condition list, this one takes
// priority over the other util, and it should be reflected in the target condition.
// priority over the other conditions and it is should be reflected in the target condition.
//
// More specifically:
// 1. Conditions are grouped by status, severity
Expand Down Expand Up @@ -63,11 +63,10 @@ func merge(conditions []localizedCondition, targetCondition kmapi.ConditionType,

targetReason := getReason(g, options)
targetMessage := getMessage(g, options)

if g.TopGroup().status == metav1.ConditionFalse {
return FalseCondition(targetCondition, targetReason, g.TopGroup().severity, targetMessage) //nolint:govet
return FalseCondition(targetCondition, targetReason, g.TopGroup().severity, "%s", targetMessage)
}
return UnknownCondition(targetCondition, targetReason, targetMessage) //nolint:govet
return UnknownCondition(targetCondition, targetReason, "%s", targetMessage)
}

// getConditionGroups groups a list of conditions according to status, severity values.
Expand Down
8 changes: 4 additions & 4 deletions vendor/kmodules.xyz/client-go/conditions/setter.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func TrueCondition(t kmapi.ConditionType) *kmapi.Condition {
}

// FalseCondition returns a condition with Status=False and the given type.
func FalseCondition(t kmapi.ConditionType, reason string, severity kmapi.ConditionSeverity, messageFormat string, messageArgs ...interface{}) *kmapi.Condition {
func FalseCondition(t kmapi.ConditionType, reason string, severity kmapi.ConditionSeverity, messageFormat string, messageArgs ...any) *kmapi.Condition {
return &kmapi.Condition{
Type: t,
Status: metav1.ConditionFalse,
Expand All @@ -99,7 +99,7 @@ func FalseCondition(t kmapi.ConditionType, reason string, severity kmapi.Conditi
}

// UnknownCondition returns a condition with Status=Unknown and the given type.
func UnknownCondition(t kmapi.ConditionType, reason string, messageFormat string, messageArgs ...interface{}) *kmapi.Condition {
func UnknownCondition(t kmapi.ConditionType, reason string, messageFormat string, messageArgs ...any) *kmapi.Condition {
return &kmapi.Condition{
Type: t,
Status: metav1.ConditionUnknown,
Expand All @@ -114,12 +114,12 @@ func MarkTrue(to Setter, t kmapi.ConditionType) {
}

// MarkUnknown sets Status=Unknown for the condition with the given type.
func MarkUnknown(to Setter, t kmapi.ConditionType, reason, messageFormat string, messageArgs ...interface{}) {
func MarkUnknown(to Setter, t kmapi.ConditionType, reason, messageFormat string, messageArgs ...any) {
Set(to, UnknownCondition(t, reason, messageFormat, messageArgs...))
}

// MarkFalse sets Status=False for the condition with the given type.
func MarkFalse(to Setter, t kmapi.ConditionType, reason string, severity kmapi.ConditionSeverity, messageFormat string, messageArgs ...interface{}) {
func MarkFalse(to Setter, t kmapi.ConditionType, reason string, severity kmapi.ConditionSeverity, messageFormat string, messageArgs ...any) {
Set(to, FalseCondition(t, reason, severity, messageFormat, messageArgs...))
}

Expand Down
2 changes: 1 addition & 1 deletion vendor/kmodules.xyz/client-go/core/v1/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ func GetVolumeMountByName(volumeMounts []core.VolumeMount, name string) *core.Vo
func UpsertVolumeMount(mounts []core.VolumeMount, nv ...core.VolumeMount) []core.VolumeMount {
upsert := func(m core.VolumeMount) {
for i, vol := range mounts {
if vol.Name == m.Name {
if vol.MountPath == m.MountPath {
mounts[i] = m
return
}
Expand Down
Loading
Loading