Skip to content
This repository was archived by the owner on Feb 18, 2025. It is now read-only.

Commit 59fb047

Browse files
committed
Rename cluster capacity to cluster info
1 parent 41bfcd9 commit 59fb047

16 files changed

+86
-86
lines changed

PROJECT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ resources:
2323
controller: true
2424
domain: codeflare.dev
2525
group: mcad
26-
kind: ClusterCapacity
26+
kind: ClusterInfo
2727
path: github.com/tardieu/mcad/api/v1beta1
2828
version: v1beta1
2929
version: "3"
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,37 +21,37 @@ import (
2121
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2222
)
2323

24-
// ClusterCapacitySpec defines the desired state of ClusterCapacity
25-
type ClusterCapacitySpec struct {
24+
// ClusterInfoSpec defines the desired state of ClusterInfo
25+
type ClusterInfoSpec struct {
2626
}
2727

28-
// ClusterCapacityStatus defines the observed state of ClusterCapacity
29-
type ClusterCapacityStatus struct {
28+
// ClusterInfoStatus defines the observed state of ClusterInfo
29+
type ClusterInfoStatus struct {
3030
// Capacity available on the cluster
3131
Capacity v1.ResourceList `json:"capacity"`
3232
}
3333

3434
//+kubebuilder:object:root=true
3535
//+kubebuilder:subresource:status
3636

37-
// ClusterCapacity is the Schema for the clustercapacities API
38-
type ClusterCapacity struct {
37+
// ClusterInfo is the Schema for the clusterinfoes API
38+
type ClusterInfo struct {
3939
metav1.TypeMeta `json:",inline"`
4040
metav1.ObjectMeta `json:"metadata,omitempty"`
4141

42-
Spec ClusterCapacitySpec `json:"spec,omitempty"`
43-
Status ClusterCapacityStatus `json:"status,omitempty"`
42+
Spec ClusterInfoSpec `json:"spec,omitempty"`
43+
Status ClusterInfoStatus `json:"status,omitempty"`
4444
}
4545

4646
//+kubebuilder:object:root=true
4747

48-
// ClusterCapacityList contains a list of ClusterCapacity
49-
type ClusterCapacityList struct {
48+
// ClusterInfoList contains a list of ClusterInfo
49+
type ClusterInfoList struct {
5050
metav1.TypeMeta `json:",inline"`
5151
metav1.ListMeta `json:"metadata,omitempty"`
52-
Items []ClusterCapacity `json:"items"`
52+
Items []ClusterInfo `json:"items"`
5353
}
5454

5555
func init() {
56-
SchemeBuilder.Register(&ClusterCapacity{}, &ClusterCapacityList{})
56+
SchemeBuilder.Register(&ClusterInfo{}, &ClusterInfoList{})
5757
}

api/v1beta1/zz_generated.deepcopy.go

Lines changed: 19 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: mcad.codeflare.dev/v1beta1
2-
kind: ClusterCapacity
2+
kind: ClusterInfo
33
metadata:
44
namespace: default
55
name: kind

cmd/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,12 @@ func main() {
112112
setupLog.Error(err, "unable to create controller", "controller", "AppWrapper")
113113
os.Exit(1)
114114
}
115-
if err = (&controller.ClusterCapacityReconciler{
115+
if err = (&controller.ClusterInfoReconciler{
116116
Client: mgr.GetClient(),
117117
Scheme: mgr.GetScheme(),
118118
Mode: mode, // default, dispatcher, runner
119119
}).SetupWithManager(mgr); err != nil {
120-
setupLog.Error(err, "unable to create controller", "controller", "ClusterCapacity")
120+
setupLog.Error(err, "unable to create controller", "controller", "ClusterInfo")
121121
os.Exit(1)
122122
}
123123
//+kubebuilder:scaffold:builder

config/crd/bases/mcad.codeflare.dev_clustercapacities.yaml renamed to config/crd/bases/mcad.codeflare.dev_clusterinfoes.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ kind: CustomResourceDefinition
44
metadata:
55
annotations:
66
controller-gen.kubebuilder.io/version: v0.12.0
7-
name: clustercapacities.mcad.codeflare.dev
7+
name: clusterinfoes.mcad.codeflare.dev
88
spec:
99
group: mcad.codeflare.dev
1010
names:
11-
kind: ClusterCapacity
12-
listKind: ClusterCapacityList
13-
plural: clustercapacities
14-
singular: clustercapacity
11+
kind: ClusterInfo
12+
listKind: ClusterInfoList
13+
plural: clusterinfoes
14+
singular: clusterinfo
1515
scope: Namespaced
1616
versions:
1717
- name: v1beta1
1818
schema:
1919
openAPIV3Schema:
20-
description: ClusterCapacity is the Schema for the clustercapacities API
20+
description: ClusterInfo is the Schema for the clusterinfoes API
2121
properties:
2222
apiVersion:
2323
description: 'APIVersion defines the versioned schema of this representation
@@ -32,10 +32,10 @@ spec:
3232
metadata:
3333
type: object
3434
spec:
35-
description: ClusterCapacitySpec defines the desired state of ClusterCapacity
35+
description: ClusterInfoSpec defines the desired state of ClusterInfo
3636
type: object
3737
status:
38-
description: ClusterCapacityStatus defines the observed state of ClusterCapacity
38+
description: ClusterInfoStatus defines the observed state of ClusterInfo
3939
properties:
4040
capacity:
4141
additionalProperties:

config/crd/kustomization.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33
# It should be run by config/default
44
resources:
55
- bases/mcad.codeflare.dev_appwrappers.yaml
6-
- bases/mcad.codeflare.dev_clustercapacities.yaml
6+
- bases/mcad.codeflare.dev_clusterinfoes.yaml
77
#+kubebuilder:scaffold:crdkustomizeresource
88

99
patches:
1010
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix.
1111
# patches here are for enabling the conversion webhook for each CRD
1212
#- path: patches/webhook_in_appwrappers.yaml
13-
#- path: patches/webhook_in_clustercapacities.yaml
13+
#- path: patches/webhook_in_clusterinfoes.yaml
1414
#+kubebuilder:scaffold:crdkustomizewebhookpatch
1515

1616
# [CERTMANAGER] To enable cert-manager, uncomment all the sections with [CERTMANAGER] prefix.
1717
# patches here are for enabling the CA injection for each CRD
1818
#- path: patches/cainjection_in_appwrappers.yaml
19-
#- path: patches/cainjection_in_clustercapacities.yaml
19+
#- path: patches/cainjection_in_clusterinfoes.yaml
2020
#+kubebuilder:scaffold:crdkustomizecainjectionpatch
2121

2222
# the following config is for teaching kustomize how to do kustomization for CRDs.

config/crd/patches/webhook_in_clustercapacities.yaml renamed to config/crd/patches/webhook_in_clusterinfoes.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
5-
name: clustercapacities.mcad.codeflare.dev
5+
name: clusterinfoes.mcad.codeflare.dev
66
spec:
77
conversion:
88
strategy: Webhook

config/rbac/role.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ rules:
1313
- apiGroups:
1414
- mcad.codeflare.dev
1515
resources:
16-
- clustercapacities
16+
- clusterinfoes
1717
verbs:
1818
- create
1919
- delete
@@ -25,13 +25,13 @@ rules:
2525
- apiGroups:
2626
- mcad.codeflare.dev
2727
resources:
28-
- clustercapacities/finalizers
28+
- clusterinfoes/finalizers
2929
verbs:
3030
- update
3131
- apiGroups:
3232
- mcad.codeflare.dev
3333
resources:
34-
- clustercapacities/status
34+
- clusterinfoes/status
3535
verbs:
3636
- get
3737
- patch

config/samples/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## Append samples of your project ##
22
resources:
33
- mcad_v1beta1_appwrapper.yaml
4-
- mcad_v1beta1_clustercapacity.yaml
4+
- mcad_v1beta1_clusterinfo.yaml
55
#+kubebuilder:scaffold:manifestskustomizesamples

0 commit comments

Comments
 (0)