forked from rancher/turtles
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support creating management.catte.io/v3 cluster
Signed-off-by: Carlos Salas <carlos.salas@suse.com>
- Loading branch information
1 parent
f5ada58
commit 4275316
Showing
6 changed files
with
169 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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,57 @@ | ||
/* | ||
Copyright © 2023 - 2024 SUSE LLC | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
Check failure on line 7 in internal/rancher/management/v3/cluster.go GitHub Actions / lint
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package v3 | ||
|
||
import ( | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
// Cluster is the struct representing a Rancher Cluster. | ||
// +kubebuilder:object:root=true | ||
// +kubebuilder:subresource:status | ||
type Cluster struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
|
||
Spec ClusterSpec `json:"spec"` | ||
Status ClusterStatus `json:"status,omitempty"` | ||
} | ||
|
||
// ClusterSpec is the struct representing the specification of a Rancher Cluster. | ||
type ClusterSpec struct { | ||
DisplayName string `json:"displayName,omitempty"` | ||
Description string `json:"description,omitempty"` | ||
} | ||
|
||
// ClusterStatus is the struct representing the status of a Rancher Cluster. | ||
type ClusterStatus struct { | ||
ClusterName string `json:"clusterName,omitempty"` | ||
AgentDeployed bool `json:"agentDeployed,omitempty"` | ||
Ready bool `json:"ready,omitempty"` | ||
} | ||
|
||
// ClusterList contains a list of ClusterList. | ||
// +kubebuilder:object:root=true | ||
type ClusterList struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ListMeta `json:"metadata,omitempty"` | ||
Items []Cluster `json:"items"` | ||
} | ||
|
||
func init() { | ||
SchemeBuilder.Register(&Cluster{}, &ClusterList{}) | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.