-
Notifications
You must be signed in to change notification settings - Fork 52
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
Bootstrap drclusterconfig #1475
Bootstrap drclusterconfig #1475
Conversation
529bce3
to
7229837
Compare
Scaffolded using: operator_sdk create api Followed by, - make generate - make manifests Followed by, - corrections to generated code in main.go - additions of required CRDs and roles to the ramen dr-cluster bundle Signed-off-by: Shyamsundar Ranganathan <srangana@redhat.com>
The fields are as follows: spec.replicationSchedules: Is a list of schedule intervals that are required to be provided by the storage consumers of this resource. spec.clusterID Would carry the ManagedCluster identity from the ManagedCluster claim value for `id.k8s.io` spec.PeerClusters []clusterID is currently left as a TODO, to be picked up as the need arises. Signed-off-by: Shyamsundar Ranganathan <srangana@redhat.com>
Signed-off-by: Shyamsundar Ranganathan <srangana@redhat.com>
Also, adjust envtests to accomodate for one more manifest work creation and also as required marking the manifest work as applied. In addition to the above, reordered DRCluster processCreateOrUpdate in a manner that addresses processing fencing first and then later other checks, and maintenance mode last. This is to reflect DRCluster validation correctly, and perform certain checks early and some later. Signed-off-by: Shyamsundar Ranganathan <srangana@redhat.com>
As we need to update DRClusterConfig for the cluster if there are newer schedules added/removed. This requires reconciling DRCluster when a DRPolicy resource is created/updated/deleted. Signed-off-by: Shyamsundar Ranganathan <srangana@redhat.com>
Also, add required client arguments, such that this can be reused across various envs and tests run in those envs. Signed-off-by: Shyamsundar Ranganathan <srangana@redhat.com>
With varying ManagedCluster resource status and conditions Signed-off-by: Shyamsundar Ranganathan <srangana@redhat.com>
7229837
to
423c0b1
Compare
Added a more genric version of extracting a manifest from a ManifestWork to inspect its contents. Signed-off-by: Shyamsundar Ranganathan <srangana@redhat.com>
Signed-off-by: Shyamsundar Ranganathan <srangana@redhat.com>
423c0b1
to
8bec09e
Compare
|
||
// DRClusterConfig is the Schema for the drclusterconfigs API | ||
// | ||
//nolint:maligned |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this line required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As status is empty at present, the linter does not like the structure alignment. nolint
added till there are elements in status, at which point this can be removed.
This implements #1408
TODO: