Skip to content

Commit

Permalink
fixup, regenerate WOrkspaceKind to be cluster scope
Browse files Browse the repository at this point in the history
Signed-off-by: Jiri Daněk <[email protected]>
  • Loading branch information
jiridanek committed Jun 17, 2024
1 parent 9cdb82e commit cd45942
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 11 deletions.
1 change: 0 additions & 1 deletion workspaces/controller/PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ resources:
version: v1beta1
- api:
crdVersion: v1
namespaced: true
controller: true
domain: kubeflow.org
kind: WorkspaceKind
Expand Down
8 changes: 1 addition & 7 deletions workspaces/controller/api/v1beta1/workspacekind_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

// todo test that examples of crs do validate using these structs

package v1beta1

import (
Expand Down Expand Up @@ -47,11 +45,9 @@ type WorkspaceKindStatus struct {
// Important: Run "make" to regenerate code after modifying this file
}

//+genclient
//+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:resource:scope=Cluster

// WorkspaceKind is the Schema for the workspacekinds API
type WorkspaceKind struct {
Expand All @@ -62,8 +58,6 @@ type WorkspaceKind struct {
Status WorkspaceKindStatus `json:"status,omitempty"`
}

//+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

//+kubebuilder:object:root=true

// WorkspaceKindList contains a list of WorkspaceKind
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
listKind: WorkspaceKindList
plural: workspacekinds
singular: workspacekind
scope: Namespaced
scope: Cluster
versions:
- name: v1beta1
schema:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ var _ = Describe("WorkspaceKind Controller", func() {
if err != nil && errors.IsNotFound(err) {
resource := &kubefloworgv1beta1.WorkspaceKind{
ObjectMeta: metav1.ObjectMeta{
Name: resourceName,
Namespace: "default",
Name: resourceName,
},
Spec: kubefloworgv1beta1.WorkspaceKindSpec{
Spawner: kubefloworgv1beta1.Spawner{
Expand Down

0 comments on commit cd45942

Please sign in to comment.