Skip to content

Commit

Permalink
Prepare for release v0.7.0 (#29)
Browse files Browse the repository at this point in the history
ProductLine: KubeStash

Release: v2024.4.27

Release-tracker: kubestash/CHANGELOG#13

Signed-off-by: 1gtm <1gtm@appscode.com>
  • Loading branch information
1gtm committed Apr 27, 2024
1 parent 21112b8 commit 4a9d80a
Show file tree
Hide file tree
Showing 36 changed files with 433 additions and 609 deletions.
11 changes: 2 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,11 @@ require (
k8s.io/kubectl v0.29.0
k8s.io/utils v0.0.0-20240102154912-e7106e64919e
kmodules.xyz/client-go v0.29.13
kmodules.xyz/offshoot-api v0.29.0
kubestash.dev/apimachinery v0.7.0
kmodules.xyz/offshoot-api v0.29.2
kubestash.dev/apimachinery v0.8.0
sigs.k8s.io/controller-runtime v0.17.2
)

require (
github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
)

require (
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/MakeNowJust/heredoc v1.0.0 // indirect
Expand Down Expand Up @@ -86,7 +80,6 @@ require (
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
github.com/nxadm/tail v1.4.11 // indirect
github.com/onsi/gomega v1.31.1 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
Expand Down
10 changes: 4 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv
github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo=
github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
Expand Down Expand Up @@ -478,7 +477,6 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
Expand Down Expand Up @@ -643,12 +641,12 @@ kmodules.xyz/client-go v0.29.13 h1:BnSVgcTQgiuTCASgL7Hr8i6mrelAy0PhhtaTUYEyUdc=
kmodules.xyz/client-go v0.29.13/go.mod h1:yfJSSwYYBX/60165BsRx8RiQsYu2NzvBC+zRwviAICQ=
kmodules.xyz/objectstore-api v0.29.1 h1:uUsjf8KU0w4LYowSEOnl0AbHT3hsHIu1wNLHqGe1o6s=
kmodules.xyz/objectstore-api v0.29.1/go.mod h1:xG+5awH1SXYKxwN/+k1FEQvzixd5tgNqEN/1LEiB2FE=
kmodules.xyz/offshoot-api v0.29.0 h1:GHLhxxT9jU1N8+FvOCCeJNyU5g0duYS46UGrs6AHNLY=
kmodules.xyz/offshoot-api v0.29.0/go.mod h1:5NxhBblXoDHWStx9HCDJR2KFTwYjEZ7i1Id3jelIunw=
kmodules.xyz/offshoot-api v0.29.2 h1:akXmvkNqFz1n9p1STVs9iP7ODYET0S7BhcYCMXEjK4A=
kmodules.xyz/offshoot-api v0.29.2/go.mod h1:Wv7Xo8wbvznI+8bhaylRFHFjkt30xRDOUOnqV8kOAxM=
kmodules.xyz/prober v0.29.0 h1:Ex7m4F9rH7uWNNJlLgP63ROOM+nUATJkC2L5OQ7nwMg=
kmodules.xyz/prober v0.29.0/go.mod h1:UtK+HKyI1lFLEKX+HFLyOCVju6TO93zv3kwGpzqmKOo=
kubestash.dev/apimachinery v0.7.0 h1:j0SbDAIAUmxDHEuEt81sPqVf6mbTnozhkvYCvP7VjIs=
kubestash.dev/apimachinery v0.7.0/go.mod h1:ydCufCUC0IRLNKnnQZyvB7/afo3mwaHXL3Hbt4Plw9k=
kubestash.dev/apimachinery v0.8.0 h1:2W1TlX8hXiWD93DQGvJjirq2QYSKED9uYjquzsuhMJ4=
kubestash.dev/apimachinery v0.8.0/go.mod h1:lZ6Y//9BY4rmx+Qwvawxo1NjKgaiAG/v9RfPXHWgIa4=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo=
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0=
Expand Down
44 changes: 44 additions & 0 deletions vendor/kmodules.xyz/offshoot-api/api/v1/openapi_generated.go

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

19 changes: 19 additions & 0 deletions vendor/kmodules.xyz/offshoot-api/api/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,25 @@ type ServicePort struct {
NodePort int32 `json:"nodePort,omitempty"`
}

// GatewayPort contains information on Gateway service's port.
type GatewayPort struct {
// The name of this port within the gateway service.
// +optional
Name string `json:"name,omitempty"`

// The port that will be exposed by the gateway service.
Port int32 `json:"port"`

// Number of the port to access the backend service.
// +optional
BackendServicePort int32 `json:"backendServicePort,omitempty"`

// The port on each node on which this gateway service is exposed when type is
// NodePort or LoadBalancer.
// +optional
NodePort int32 `json:"nodePort,omitempty"`
}

// Beware of MergeServicePorts
// ref: https://github.com/kmodules/client-go/blob/03dac1aea5084354127990a10d0b0e7529460dd5/core/v1/service.go#L103-L136
func PatchServicePorts(cur []core.ServicePort, desired []ServicePort) []core.ServicePort {
Expand Down
16 changes: 16 additions & 0 deletions vendor/kmodules.xyz/offshoot-api/api/v1/zz_generated.deepcopy.go

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

Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ const (
// +kubebuilder:resource:path=addons,singular=addon,scope=Cluster,categories={kubestash,appscode,all}
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"

// Addon specifies the backup and restore capabilities for a particular resource.
// Addon specifies the backup and restore capabilities for a specific type of target.
// For example, MySQL addon specifies the backup and restore capabilities of MySQL database where
// Postgres addon specifies backup and restore capabilities for PostgreSQL database.
// An Addon CR defines the backup and restore tasks that can be performed by this addon.
// An Addon CR defines these capabilities as tasks for backup and restore.
type Addon struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand Down Expand Up @@ -76,10 +76,10 @@ type Task struct {
// a sidecar container, an ephemeral container, or a Job that creates additional Jobs/Pods
// for executing the backup/restore logic.
// Valid values are:
// - "Job": Stash will create a Job to execute the backup/restore task.
// - "Sidecar": Stash will inject a sidecar container into the application to execute the backup/restore task.
// - "EphemeralContainer": Stash will attach an ephemeral container to the respective Pods to execute the backup/restore task.
// - "MultiLevelJob": Stash will create a Job that will create additional Jobs/Pods to execute the backup/restore task.
// - "Job": KubeStash will create a Job to execute the backup/restore task.
// - "Sidecar": KubeStash will inject a sidecar container into the application to execute the backup/restore task.
// - "EphemeralContainer": KubeStash will attach an ephemeral container to the respective Pods to execute the backup/restore task.
// - "MultiLevelJob": KubeStash will create a Job that will create additional Jobs/Pods to execute the backup/restore task.
Executor TaskExecutor `json:"executor,omitempty"`

// Singleton specifies whether this task will be executed on a single job or across multiple jobs.
Expand All @@ -96,8 +96,8 @@ type Task struct {
VolumeTemplate []VolumeTemplate `json:"volumeTemplate,omitempty"`

// VolumeMounts specifies the mount path of the volumes specified in the VolumeTemplate section.
// These volumes will be mounted directly on the Job/Container created/injected by Stash operator.
// If the volume type is VolumeClaimTemplate, then Stash operator is responsible for creating the volume.
// These volumes will be mounted directly on the Job/Container created/injected by KubeStash operator.
// If the volume type is VolumeClaimTemplate, then KubeStash operator is responsible for creating the volume.
// +optional
VolumeMounts []core.VolumeMount `json:"volumeMounts,omitempty"`

Expand All @@ -107,7 +107,7 @@ type Task struct {
// mount in both VolumeMounts and PassThroughMounts section.
// If the volume type is VolumeClaimTemplate, then the first level job is responsible for creating the volume.
// +optional
PassThroughMounts []core.VolumeMount `json:"passThroughMounts,omitempty"`
// PassThroughMounts []core.VolumeMount `json:"passThroughMounts,omitempty"`
}

// TaskExecutor defines the type of the executor that will execute the backup/restore task.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ type FunctionSpec struct {
// RuntimeSettings allow to specify Resources, LivenessProbe, ReadinessProbe, Lifecycle, SecurityContext etc.
// +optional
RuntimeSettings *ofst.ContainerRuntimeSettings `json:"runtimeSettings,omitempty"`

// AvailableVersions is the list of available addon versions
// This is needed for the KubeStash resolver, if Image has some variables in it.
// For example, `image: ghcr.io/kubedb/mongodb-restic-plugin:v0.7.0_${DB_VERSION}`
// +optional
AvailableVersions []string `json:"availableVersions,omitempty"`
}

//+kubebuilder:object:root=true
Expand Down

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

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

2 changes: 1 addition & 1 deletion vendor/kubestash.dev/apimachinery/apis/constant.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const (

KeyBlueprintName = BackupBlueprintKey + "/name"
KeyBlueprintNamespace = BackupBlueprintKey + "/namespace"
KeyBlueprintSessions = BackupBlueprintKey + "/sessions"
KeyBlueprintSessions = BackupBlueprintKey + "/session-names"
)

// RBAC related
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ type BackupBatchSpec struct {
// The respective BackupStorages can be in a different namespace than the BackupBatch.
// However, it must be allowed by the `usagePolicy` of the BackupStorage to refer from this namespace.
//
// This field is optional, if you don't provide any backend here, Stash will use the default BackupStorage for the namespace.
// If a default BackupStorage does not exist in the same namespace, then Stash will look for a default BackupStorage
// This field is optional, if you don't provide any backend here, KubeStash will use the default BackupStorage for the namespace.
// If a default BackupStorage does not exist in the same namespace, then KubeStash will look for a default BackupStorage
// in other namespaces that allows using it from the BackupBatch namespace.
// +optional
Backends []BackendReference `json:"backends,omitempty"`
Expand All @@ -62,7 +62,7 @@ type BackupBatchSpec struct {
Sessions []BatchSession `json:"sessions,omitempty"`

// Paused indicates that the BackupBatch has been paused from taking backup. Default value is 'false'.
// If you set `paused` field to `true`, Stash will suspend the respective backup triggering CronJob and
// If you set `paused` field to `true`, KubeStash will suspend the respective backup triggering CronJob and
// skip processing any further events for this BackupBatch.
// +optional
Paused bool `json:"paused,omitempty"`
Expand Down Expand Up @@ -95,7 +95,7 @@ type TargetBackupSpec struct {
Addon *AddonInfo `json:"addon,omitempty"`

// Repositories specifies a list of repository information where the backed up data will be stored.
// Stash will create the respective Repository CRs using this information.
// KubeStash will create the respective Repository CRs using this information.
Repositories []RepositoryInfo `json:"repositories,omitempty"`
}

Expand Down
Loading

0 comments on commit 4a9d80a

Please sign in to comment.