Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,5 @@ spec:
And delete the cluster using:

```bash
$ oc delete --namespace hypershift openshiftclusters/example
$ oc delete --namespace hypershift hostedclusters/example
```
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// OpenShiftClusterSpec defines the desired state of OpenShiftCluster
type OpenShiftClusterSpec struct {
// HostedClusterSpec defines the desired state of HostedCluster
type HostedClusterSpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "make" to regenerate code after modifying this file

Expand Down Expand Up @@ -53,36 +53,36 @@ type ReleaseSpec struct {
Image string `json:"image"`
}

// OpenShiftClusterStatus defines the observed state of OpenShiftCluster
type OpenShiftClusterStatus struct {
// HostedClusterStatus defines the observed state of HostedCluster
type HostedClusterStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "make" to regenerate code after modifying this file

Ready bool `json:"ready"`
}

// +kubebuilder:object:root=true
// +kubebuilder:resource:path=openshiftclusters,shortName=oc;ocs,scope=Namespaced
// +kubebuilder:resource:path=hostedclusters,shortName=hc;hcs,scope=Namespaced
// +kubebuilder:storageversion
// +kubebuilder:subresource:status
// OpenShiftCluster is the Schema for the openshiftclusters API
type OpenShiftCluster struct {
// HostedCluster is the Schema for the hostedclusters API
type HostedCluster struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec OpenShiftClusterSpec `json:"spec,omitempty"`
Status OpenShiftClusterStatus `json:"status,omitempty"`
Spec HostedClusterSpec `json:"spec,omitempty"`
Status HostedClusterStatus `json:"status,omitempty"`
}

// +kubebuilder:object:root=true

// OpenShiftClusterList contains a list of OpenShiftCluster
type OpenShiftClusterList struct {
// HostedClusterList contains a list of HostedCluster
type HostedClusterList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []OpenShiftCluster `json:"items"`
Items []HostedCluster `json:"items"`
}

func init() {
SchemeBuilder.Register(&OpenShiftCluster{}, &OpenShiftClusterList{})
SchemeBuilder.Register(&HostedCluster{}, &HostedClusterList{})
}
186 changes: 93 additions & 93 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion config/example-cluster/cluster.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: hypershift.openshift.io/v1alpha1
kind: OpenShiftCluster
kind: HostedCluster
metadata:
name: example
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.3.0
creationTimestamp: null
name: openshiftclusters.hypershift.openshift.io
name: hostedclusters.hypershift.openshift.io
spec:
group: hypershift.openshift.io
names:
kind: OpenShiftCluster
listKind: OpenShiftClusterList
plural: openshiftclusters
kind: HostedCluster
listKind: HostedClusterList
plural: hostedclusters
shortNames:
- oc
- ocs
singular: openshiftcluster
- hc
- hcs
singular: hostedcluster
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: OpenShiftCluster is the Schema for the openshiftclusters API
description: HostedCluster is the Schema for the hostedclusters API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
Expand All @@ -33,7 +33,7 @@ spec:
metadata:
type: object
spec:
description: OpenShiftClusterSpec defines the desired state of OpenShiftCluster
description: HostedClusterSpec defines the desired state of HostedCluster
properties:
initialComputeReplicas:
type: integer
Expand Down Expand Up @@ -82,7 +82,7 @@ spec:
- sshKey
type: object
status:
description: OpenShiftClusterStatus defines the observed state of OpenShiftCluster
description: HostedClusterStatus defines the observed state of HostedCluster
properties:
ready:
type: boolean
Expand Down
2 changes: 1 addition & 1 deletion config/hypershift-operator/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- hypershift.openshift.io_openshiftclusters.yaml
- hypershift.openshift.io_hostedclusters.yaml
- hypershift.openshift.io_hostedcontrolplanes.yaml
- hypershift.openshift.io_externalinfraclusters.yaml
- hypershift.openshift.io_nodepools.yaml
Expand Down
Loading