Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic CRDs related to schedule based backup #1

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

SrinivasChilveri
Copy link
Collaborator

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:

/kind new feature
/kind bug fix
/kind cleanup
/kind revert change
/kind design
/kind documentation
/kind enhancement
kind new feature
What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Test Report Added?:

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:
/kind TESTED
/kind NOT-TESTED

Test Report:

Special notes for your reviewer: Basic CRDs an generated code, build,compile etc

@SrinivasChilveri SrinivasChilveri changed the title Basic schedule based backup Basic CRDs related to schedule based backup Feb 22, 2023
@@ -0,0 +1,84 @@
# Copyright 2022 The SODA Authors.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO, The script generates grpc boilerplate code. It can be moved out from this PR as it is not used

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep thought of doing later, any how removed it

build/Makefile Outdated
@@ -0,0 +1,181 @@
# Copyright 2022 The SODA Authors.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Copyright 2022 The SODA Authors." -> "Copyright 2023 The SODA Authors."
Also please handle in "boilerplate.go.txt"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

)

// ReclaimPolicy tells about reclamation of the backup. It can be either delete or retain
type BackupScheduleReclaimPolicyType struct {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, BackupScheduleReclaimPolicyType can be string instead of struct

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

// Valid values are:
// - "Allow": allows Backups to run concurrently;
// - "Forbid"(default): forbids concurrent runs, skipping next run if previous run hasn't finished yet.
// +optional
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add default value for ConcurrentPolicy

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed


// validates the DailyPolicy
func (d *DailyPolicy) Validate() error {
err := d.CheckTimeFormat()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can return error here

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

Dockerfile Outdated
@@ -0,0 +1,21 @@
# Copyright 2022 The SODA Authors.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Copyright 2022 The SODA Authors." -> "Copyright 2023 The SODA Authors."

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

// +genclient
// +kubebuilder:object:root=true
// +kubebuilder:resource:scope=Namespaced
// +kubebuilder:subresource:status
Copy link
Collaborator

@AmitRoushan AmitRoushan Feb 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMo, SchedulePolicy does not maintain status

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it will not have any impact, but any how changed

@@ -0,0 +1,21 @@
/*
Copyright 2022 The SODA Authors.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Copyright 2022 The SODA Authors." -> "Copyright 2023 The SODA Authors."

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

@@ -0,0 +1,17 @@
/*
Copyright 2022 The SODA Authors.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Copyright 2022 The SODA Authors." -> "Copyright 2023 The SODA Authors."

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

- apiGroups: ["kahu.io"]
resources: ["backups", "backups/status"]
verbs: ["get", "list", "watch", "patch", "update", "delete"]
- apiGroups: ["*"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, This access might not be required

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed

resourceNames: ["kahu-manager"]
resources: ["leases"]
verbs: ["get", "list", "watch", "create", "update", "delete"]
- apiGroups: [ "rbac.authorization.k8s.io" ]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, This access might not be required

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed

#!/bin/bash
#
# Copyright 2023 The SODA Authors.
# Copyright 2017 the Velero contributors.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

multiple copyright attributes?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants