-
Notifications
You must be signed in to change notification settings - Fork 8
Add BMCSettingsSet type and controller
#471
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
davidgrun
wants to merge
14
commits into
main
Choose a base branch
from
BMCSettingsSet
base: main
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 6 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
f8cf504
feat: Implement BMCSettingsSet controller with reconciliation logic
davidgrun 4b380e8
feat: Add BMCSettingsSet CRD and associated RBAC roles; update API do…
davidgrun e9c8b1b
Update BMCSettingsSet controller to handle ServerMaintenanceRefs merg…
davidgrun 22f5cc3
refactor: Remove unnecessary equality checks and simplify ServerMaint…
davidgrun b385fd7
refactor: Enhance BMCSettings handling by merging ServerMaintenanceRe…
davidgrun 209417c
Merge remote-tracking branch 'origin' into BMCSettingsSet
davidgrun 09c44c7
refactor: Update BMCRef validation message and enforce required field…
davidgrun 36c2f98
Merge remote-tracking branch 'origin' into BMCSettingsSet
davidgrun dcf85fc
Update BMCSettingsSet tests to use corev1.LocalObjectReference and im…
davidgrun bc10066
Merge remote-tracking branch 'origin' into BMCSettingsSet
davidgrun 9ee9f11
Merge remote-tracking branch 'origin' into BMCSettingsSet
davidgrun db96d29
Enhance linting and testing: add goconst linter, clean up test code, …
davidgrun c103c88
Merge remote-tracking branch 'origin' into BMCSettingsSet
davidgrun 3e27986
Refactor BMCSettings to move ServerMaintenanceRefs to BMCSettingsSpec…
davidgrun 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| // SPDX-FileCopyrightText: 2025 SAP SE or an SAP affiliate company and IronCore contributors | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| package v1alpha1 | ||
|
|
||
| import ( | ||
| metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
| ) | ||
|
|
||
| // BMCSettingsSetSpec defines the desired state of BMCSettingsSet. | ||
| type BMCSettingsSetSpec struct { | ||
| // BMCSettingsTemplate defines the template for the BMCSettings Resource to be applied to the servers. | ||
| BMCSettingsTemplate BMCSettingsTemplate `json:"bmcSettingsTemplate,omitempty"` | ||
|
|
||
| // BMCSelector specifies a label selector to identify the servers that are to be selected. | ||
| // +required | ||
| BMCSelector metav1.LabelSelector `json:"bmcSelector"` | ||
| } | ||
|
|
||
| // BMCSettingsSetStatus defines the observed state of BMCSettingsSet. | ||
| type BMCSettingsSetStatus struct { | ||
| // FullyLabeledBMCs is the number of BMC in the set. | ||
| FullyLabeledBMCs int32 `json:"fullyLabeledBMCs,omitempty"` | ||
| // AvailableBMCSettings is the number of BMCSettings currently created by the set. | ||
| AvailableBMCSettings int32 `json:"availableBMCSettings,omitempty"` | ||
| // PendingBMCSettings is the total number of pending BMC in the set. | ||
| PendingBMCSettings int32 `json:"pendingBMCSettings,omitempty"` | ||
| // InProgressBMCSettings is the total number of BMC in the set that are currently in progress. | ||
| InProgressBMCSettings int32 `json:"inProgressBMCSettings,omitempty"` | ||
| // CompletedBMCSettings is the total number of completed BMC in the set. | ||
| CompletedBMCSettings int32 `json:"completedBMCSettings,omitempty"` | ||
| // FailedBMCSettings is the total number of failed BMC in the set. | ||
| FailedBMCSettings int32 `json:"failedBMCSettings,omitempty"` | ||
| } | ||
|
|
||
| // +kubebuilder:object:root=true | ||
| // +kubebuilder:subresource:status | ||
| // +kubebuilder:resource:scope=Cluster | ||
| // +kubebuilder:printcolumn:name="BMCVersion",type=string,JSONPath=`.spec.bmcSettingsTemplate.version` | ||
| // +kubebuilder:printcolumn:name="TotalBMCs",type="integer",JSONPath=`.status.fullyLabeledBMCs` | ||
| // +kubebuilder:printcolumn:name="AvailableBMCSettings",type="integer",JSONPath=`.status.availableBMCSettings` | ||
| // +kubebuilder:printcolumn:name="Pending",type="integer",JSONPath=`.status.pendingBMCSettings` | ||
| // +kubebuilder:printcolumn:name="InProgress",type="integer",JSONPath=`.status.inProgressBMCSettings` | ||
| // +kubebuilder:printcolumn:name="Completed",type="integer",JSONPath=`.status.completedBMCSettings` | ||
| // +kubebuilder:printcolumn:name="Failed",type="integer",JSONPath=`.status.failedBMCSettings` | ||
| // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" | ||
|
|
||
| // BMCSettingsSet is the Schema for the bmcsettingssets API. | ||
| type BMCSettingsSet struct { | ||
| metav1.TypeMeta `json:",inline"` | ||
| metav1.ObjectMeta `json:"metadata,omitempty"` | ||
|
|
||
| Spec BMCSettingsSetSpec `json:"spec,omitempty"` | ||
| Status BMCSettingsSetStatus `json:"status,omitempty"` | ||
| } | ||
|
|
||
| // +kubebuilder:object:root=true | ||
|
|
||
| // BMCSettingsSetList contains a list of BMCSettingsSet. | ||
| type BMCSettingsSetList struct { | ||
| metav1.TypeMeta `json:",inline"` | ||
| metav1.ListMeta `json:"metadata,omitempty"` | ||
| Items []BMCSettingsSet `json:"items"` | ||
| } | ||
|
|
||
| func init() { | ||
| SchemeBuilder.Register(&BMCSettingsSet{}, &BMCSettingsSetList{}) | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.