-
Notifications
You must be signed in to change notification settings - Fork 181
Support v1alpha1.ScyllaDBDatacenter registration with global ScyllaDB Manager instance #2590
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
Open
rzetelskik
wants to merge
8
commits into
scylladb:master
Choose a base branch
from
rzetelskik:manager-sdc-registration
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
c12f9cd
Add v1alpha1.ScyllaDBManagerClusterRegistration API
rzetelskik 0cf8cfc
Extend observer with EventRecorder getter
rzetelskik 1bb448a
Add GlobalScyllaDBManager and ScyllaDBManagerClusterRegistration cont…
rzetelskik 9c789e9
Add v1alpha1.ScyllaDBManagerClusterRegistration validation
rzetelskik 9b69c8e
Exclude specified annotations and labels of ScyllaDBDatacenters from …
rzetelskik 315d777
Extend E2E utils with machinery for ScyllaDBDatacenters
rzetelskik b255ee1
Add an E2E test for ScyllaDBDatacenter integration with global Scylla…
rzetelskik 64def13
Update generated
rzetelskik File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
pkg/api/scylla/v1alpha1/types_scylladbmanagerclusterregistration.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
// Copyright (C) 2025 ScyllaDB | ||
|
||
package v1alpha1 | ||
|
||
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
|
||
type LocalScyllaDBReference struct { | ||
// kind specifies the type of the resource. | ||
Kind string `json:"kind"` | ||
// name specifies the name of the resource. | ||
Name string `json:"name"` | ||
} | ||
|
||
type ScyllaDBManagerClusterRegistrationSpec struct { | ||
// scyllaDBClusterRef specifies the typed reference to the local ScyllaDB cluster. | ||
// Supported kind is ScyllaDBDatacenter in scylla.scylladb.com group. | ||
ScyllaDBClusterRef LocalScyllaDBReference `json:"scyllaDBClusterRef"` | ||
} | ||
|
||
type ScyllaDBManagerClusterRegistrationStatus struct { | ||
// observedGeneration is the most recent generation observed for this ScyllaDBManagerClusterRegistration. It corresponds to the | ||
// ScyllaDBManagerClusterRegistration's generation, which is updated on mutation by the API Server. | ||
// +optional | ||
ObservedGeneration *int64 `json:"observedGeneration,omitempty"` | ||
|
||
// conditions hold conditions describing ScyllaDBManagerClusterRegistration state. | ||
// +optional | ||
Conditions []metav1.Condition `json:"conditions,omitempty"` | ||
|
||
// clusterID reflects the internal identification number of the cluster in ScyllaDB Manager state. | ||
// +optional | ||
ClusterID *string `json:"clusterID,omitempty"` | ||
} | ||
|
||
// +kubebuilder:object:root=true | ||
// +kubebuilder:subresource:status | ||
// +kubebuilder:storageversion | ||
// +genclient | ||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | ||
// +kubebuilder:printcolumn:name="PROGRESSING",type=string,JSONPath=".status.conditions[?(@.type=='Progressing')].status" | ||
// +kubebuilder:printcolumn:name="DEGRADED",type=string,JSONPath=".status.conditions[?(@.type=='Degraded')].status" | ||
// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" | ||
|
||
type ScyllaDBManagerClusterRegistration struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
|
||
// spec defines the desired state of ScyllaDBManagerClusterRegistration. | ||
Spec ScyllaDBManagerClusterRegistrationSpec `json:"spec,omitempty"` | ||
|
||
// status reflects the observed state of ScyllaDBManagerClusterRegistration. | ||
Status ScyllaDBManagerClusterRegistrationStatus `json:"status,omitempty"` | ||
} | ||
|
||
// +kubebuilder:object:root=true | ||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | ||
|
||
type ScyllaDBManagerClusterRegistrationList struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ListMeta `json:"metadata,omitempty"` | ||
Items []ScyllaDBManagerClusterRegistration `json:"items"` | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
would be worth mentioning that the name references object in the same namespace.
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.
I thought the
Local
in the struct name is a conventional way of saying this (by similarity toLocalObjectReference
) - I could add a comment to the entire struct though, if it's not clear enough?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.
struct name isn't visible in
kubectl explain
, while comments are.