Skip to content

Commit

Permalink
fixing lint error. next will fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vimystic committed Dec 16, 2024
1 parent 43e5965 commit f8c9444
Show file tree
Hide file tree
Showing 7 changed files with 784 additions and 349 deletions.
2 changes: 1 addition & 1 deletion api/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

427 changes: 319 additions & 108 deletions config/crd/bases/cosmos.strange.love_cosmosfullnodes.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
controller-gen.kubebuilder.io/version: v0.16.5
name: scheduledvolumesnapshots.cosmos.strange.love
spec:
group: cosmos.strange.love
Expand Down Expand Up @@ -242,6 +242,11 @@ spec:
If not specified, it indicates that the size is unknown.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
volumeGroupSnapshotName:
description: |-
VolumeGroupSnapshotName is the name of the VolumeGroupSnapshot of which this
VolumeSnapshot is a part of.
type: string
type: object
required:
- name
Expand Down
615 changes: 449 additions & 166 deletions config/crd/bases/cosmos.strange.love_statefuljobs.yaml

Large diffs are not rendered by default.

72 changes: 4 additions & 68 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,6 @@ rules:
- create
- patch
- update
- apiGroups:
- ""
resources:
- persistentvolumeclaims
verbs:
- create
- delete
- get
- list
- watch
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
Expand All @@ -70,57 +52,7 @@ rules:
- cosmos.strange.love
resources:
- cosmosfullnodes
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- cosmos.strange.love
resources:
- cosmosfullnodes/finalizers
verbs:
- update
- apiGroups:
- cosmos.strange.love
resources:
- cosmosfullnodes/status
verbs:
- get
- patch
- update
- apiGroups:
- cosmos.strange.love
resources:
- scheduledvolumesnapshots
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- cosmos.strange.love
resources:
- scheduledvolumesnapshots/finalizers
verbs:
- update
- apiGroups:
- cosmos.strange.love
resources:
- scheduledvolumesnapshots/status
verbs:
- get
- patch
- update
- apiGroups:
- cosmos.strange.love
resources:
- statefuljobs
verbs:
- create
Expand All @@ -133,12 +65,16 @@ rules:
- apiGroups:
- cosmos.strange.love
resources:
- cosmosfullnodes/finalizers
- scheduledvolumesnapshots/finalizers
- statefuljobs/finalizers
verbs:
- update
- apiGroups:
- cosmos.strange.love
resources:
- cosmosfullnodes/status
- scheduledvolumesnapshots/status
- statefuljobs/status
verbs:
- get
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -680,8 +680,8 @@ golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4f
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 h1:Vve/L0v7CXXuxUmaMGIEK/dEeq7uiqb5qBgQrZzIE7E=
golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM=
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg=
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
Expand Down
6 changes: 3 additions & 3 deletions internal/fullnode/status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ func TestSyncInfoStatus(t *testing.T) {

return cosmos.StatusCollection{
// Purposefully out of order to test sorting.
{Pod: &corev1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "pod-0"}}, Status: notInSync, TS: ts},
{Pod: &corev1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "pod-1"}}, Status: inSync, TS: ts},
{Pod: &corev1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "pod-2"}}, Err: errors.New("some error"), TS: ts},
cosmos.StatusItem{Pod: &corev1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "pod-0"}}, Status: notInSync, TS: ts},
cosmos.StatusItem{Pod: &corev1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "pod-1"}}, Status: inSync, TS: ts},
cosmos.StatusItem{Pod: &corev1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "pod-2"}}, Err: errors.New("some error"), TS: ts},
}
}

Expand Down

0 comments on commit f8c9444

Please sign in to comment.