diff --git a/go.mod b/go.mod index 882b04ad15..473e1c7780 100644 --- a/go.mod +++ b/go.mod @@ -48,7 +48,7 @@ require ( kubeops.dev/csi-driver-cacerts v0.1.0 kubeops.dev/petset v0.0.7 kubeops.dev/sidekick v0.0.10-0.20241122131943-163e27e5ef71 - kubestash.dev/apimachinery v0.14.0 + kubestash.dev/apimachinery v0.15.0 sigs.k8s.io/controller-runtime v0.18.4 sigs.k8s.io/yaml v1.4.0 stash.appscode.dev/apimachinery v0.37.0 diff --git a/go.sum b/go.sum index 962d1cc404..7e8549a1ed 100644 --- a/go.sum +++ b/go.sum @@ -682,8 +682,8 @@ kubeops.dev/petset v0.0.7 h1:F77BTRfUqRVO7kNc8q2oFSSviDmYBqni/osXqu0kgJ4= kubeops.dev/petset v0.0.7/go.mod h1:lt0SZV4ohRy7RiwLNUnMoauG4lCbcRbSqhMg20rdUQg= kubeops.dev/sidekick v0.0.10-0.20241122131943-163e27e5ef71 h1:MIrAOBOkxkJuV1mtRTbP1elbLUUp55UmbGrAlFgLO7U= kubeops.dev/sidekick v0.0.10-0.20241122131943-163e27e5ef71/go.mod h1:KGH6DiNqAfTaVz9bVTvm7e+KPKPN/PkfKkqee89YhW0= -kubestash.dev/apimachinery v0.14.0 h1:mHOR7WFpev7Tar5t7z+fiteO8yg+Ej7sGWo4KggyDCY= -kubestash.dev/apimachinery v0.14.0/go.mod h1:k+My508NVx4V3UyiNMtcrk2QDO7Ex8089VERcfQgFJ0= +kubestash.dev/apimachinery v0.15.0 h1:2VX9WrLkJhytGA7tNC0yC4htuYJRT3ZlVMLceZ8PeBs= +kubestash.dev/apimachinery v0.15.0/go.mod h1:5N6yz/zo+0AJNhc+dUbs/R/pUf96GcTx47N1Hlhvc88= moul.io/http2curl/v2 v2.3.1-0.20221024080105-10c404f653f7 h1:NykkTlRB+X40z86cLHdEmuoTxhNKhQebLT379b1EumA= moul.io/http2curl/v2 v2.3.1-0.20221024080105-10c404f653f7/go.mod h1:RW4hyBjTWSYDOxapodpNEtX0g5Eb16sxklBqmd2RHcE= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.3 h1:2770sDpzrjjsAtVhSeUFseziht227YAWYHLGNM8QPwY= diff --git a/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/snapshot_types.go b/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/snapshot_types.go index 65ff51ac23..c4bc586475 100644 --- a/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/snapshot_types.go +++ b/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/snapshot_types.go @@ -205,8 +205,32 @@ type Component struct { // VolumeSnapshotterStats specifies the "VolumeSnapshotter" driver specific information // +optional VolumeSnapshotterStats []VolumeSnapshotterStats `json:"volumeSnapshotterStats,omitempty"` - // WalSegments specifies a list of wall segment for individual component - WalSegments []WalSegment `json:"walSegments,omitempty"` + + LogStats *LogStats `json:"logStats,omitempty"` +} + +type LogStats struct { + // Start represents the start time of the first log, that exists in the repository + // TODO: Need to update this start time, once the log-retention gets implemented + Start *string `json:"start,omitempty"` + // End represents the last end time of the log push + // Start & End together holds the full time-range. Not individual log. + End *string `json:"end,omitempty"` + // Lsn for PostgreSQL only + // +optional + Lsn *string `json:"lsn,omitempty"` + + TotalFailedCount int64 `json:"totalFailedCount,omitempty"` + LastFailedStats []Log `json:"lastFailedStats,omitempty"` + + TotalSucceededCount int64 `json:"totalSucceededCount,omitempty"` + LastSucceededStats []Log `json:"lastSucceededStats,omitempty"` +} + +type Log struct { + Start *string `json:"start,omitempty"` + End *string `json:"end,omitempty"` + Error string `json:"error,omitempty"` } // ComponentPhase represents the backup phase of the individual component. @@ -283,12 +307,6 @@ type WalGStats struct { StopTime *metav1.Time `json:"stopTime,omitempty"` } -// WalSegment specifies the "WalG" driver specific information -type WalSegment struct { - Start *metav1.Time `json:"start,omitempty"` - End *metav1.Time `json:"end,omitempty"` -} - const ( TypeSnapshotMetadataUploaded = "SnapshotMetadataUploaded" ReasonFailedToUploadSnapshotMetadata = "FailedToUploadSnapshotMetadata" diff --git a/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/zz_generated.deepcopy.go b/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/zz_generated.deepcopy.go index 66fe44da74..ff661e0adb 100644 --- a/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/zz_generated.deepcopy.go @@ -213,12 +213,10 @@ func (in *Component) DeepCopyInto(out *Component) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - if in.WalSegments != nil { - in, out := &in.WalSegments, &out.WalSegments - *out = make([]WalSegment, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } + if in.LogStats != nil { + in, out := &in.LogStats, &out.LogStats + *out = new(LogStats) + (*in).DeepCopyInto(*out) } } @@ -298,6 +296,75 @@ func (in *LocalSpec) DeepCopy() *LocalSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Log) DeepCopyInto(out *Log) { + *out = *in + if in.Start != nil { + in, out := &in.Start, &out.Start + *out = new(string) + **out = **in + } + if in.End != nil { + in, out := &in.End, &out.End + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Log. +func (in *Log) DeepCopy() *Log { + if in == nil { + return nil + } + out := new(Log) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LogStats) DeepCopyInto(out *LogStats) { + *out = *in + if in.Start != nil { + in, out := &in.Start, &out.Start + *out = new(string) + **out = **in + } + if in.End != nil { + in, out := &in.End, &out.End + *out = new(string) + **out = **in + } + if in.Lsn != nil { + in, out := &in.Lsn, &out.Lsn + *out = new(string) + **out = **in + } + if in.LastFailedStats != nil { + in, out := &in.LastFailedStats, &out.LastFailedStats + *out = make([]Log, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.LastSucceededStats != nil { + in, out := &in.LastSucceededStats, &out.LastSucceededStats + *out = make([]Log, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LogStats. +func (in *LogStats) DeepCopy() *LogStats { + if in == nil { + return nil + } + out := new(LogStats) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Repository) DeepCopyInto(out *Repository) { *out = *in @@ -805,26 +872,3 @@ func (in *WalGStats) DeepCopy() *WalGStats { in.DeepCopyInto(out) return out } - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *WalSegment) DeepCopyInto(out *WalSegment) { - *out = *in - if in.Start != nil { - in, out := &in.Start, &out.Start - *out = (*in).DeepCopy() - } - if in.End != nil { - in, out := &in.End, &out.End - *out = (*in).DeepCopy() - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WalSegment. -func (in *WalSegment) DeepCopy() *WalSegment { - if in == nil { - return nil - } - out := new(WalSegment) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/kubestash.dev/apimachinery/crds/storage.kubestash.com_snapshots.yaml b/vendor/kubestash.dev/apimachinery/crds/storage.kubestash.com_snapshots.yaml index 1658b0213e..3784913576 100644 --- a/vendor/kubestash.dev/apimachinery/crds/storage.kubestash.com_snapshots.yaml +++ b/vendor/kubestash.dev/apimachinery/crds/storage.kubestash.com_snapshots.yaml @@ -99,6 +99,43 @@ spec: type: string integrity: type: boolean + logStats: + properties: + end: + type: string + lastFailedStats: + items: + properties: + end: + type: string + error: + type: string + start: + type: string + type: object + type: array + lastSucceededStats: + items: + properties: + end: + type: string + error: + type: string + start: + type: string + type: object + type: array + lsn: + type: string + start: + type: string + totalFailedCount: + format: int64 + type: integer + totalSucceededCount: + format: int64 + type: integer + type: object path: type: string phase: @@ -158,17 +195,6 @@ spec: format: date-time type: string type: object - walSegments: - items: - properties: - end: - format: date-time - type: string - start: - format: date-time - type: string - type: object - type: array type: object type: object x-kubernetes-map-type: granular diff --git a/vendor/modules.txt b/vendor/modules.txt index 0bf33b528c..b85df90e46 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1785,7 +1785,7 @@ kubeops.dev/petset/pkg/features kubeops.dev/sidekick/apis/apps kubeops.dev/sidekick/apis/apps/v1alpha1 kubeops.dev/sidekick/crds -# kubestash.dev/apimachinery v0.14.0 +# kubestash.dev/apimachinery v0.15.0 ## explicit; go 1.22.0 kubestash.dev/apimachinery/apis kubestash.dev/apimachinery/apis/addons/v1alpha1