Skip to content

Commit

Permalink
[CN-438] Use Agent asynchronous upload API
Browse files Browse the repository at this point in the history
  • Loading branch information
dzeromski-hazelcast committed Jul 21, 2022
1 parent 75effe0 commit 1093a5b
Show file tree
Hide file tree
Showing 13 changed files with 598 additions and 328 deletions.
5 changes: 2 additions & 3 deletions api/v1alpha1/hotbackup_types.go
Expand Up @@ -11,17 +11,16 @@ const (
HotBackupInProgress HotBackupState = "InProgress"
HotBackupFailure HotBackupState = "Failure"
HotBackupSuccess HotBackupState = "Success"
HotBackupWaiting HotBackupState = "Waiting"
)

func (s HotBackupState) IsFinished() bool {
return s == HotBackupFailure || s == HotBackupSuccess || s == HotBackupWaiting
return s == HotBackupFailure || s == HotBackupSuccess
}

// IsRunning returns true if the HotBackup is scheduled to run or is running but not yet finished.
// Returns false if the HotBackup is not yet scheduled to run or finished it execution including the failure state.
func (s HotBackupState) IsRunning() bool {
return !s.IsFinished() && s != ""
return s == HotBackupInProgress || s == HotBackupPending
}

// HotBackupStatus defines the observed state of HotBackup
Expand Down
4 changes: 2 additions & 2 deletions config/samples/_v1alpha1_hotbackup_agent.yaml
Expand Up @@ -4,11 +4,11 @@ metadata:
name: hot-backup
spec:
hazelcastResourceName: hazelcast
bucketURI: "s3://operator-backup"
bucketURI: "s3://operator-e2e-external-backup"
secret: "br-secret-s3"

# bucketURI: "gs://operator-agent-backup"
# secret: "br-secret-gcp"

# bucketURI: "azblob://backup"
# secret: "br-secret-az"
# secret: "br-secret-az"
96 changes: 0 additions & 96 deletions controllers/hazelcast/br_agent_rest_client.go

This file was deleted.

0 comments on commit 1093a5b

Please sign in to comment.