From b46dfa88d79ff08a61a84d3bc1d108719441a8d4 Mon Sep 17 00:00:00 2001 From: tunahanertekin Date: Tue, 2 Jan 2024 16:57:29 +0300 Subject: [PATCH] build(manifests): :whale: update manifests and chart for v0.2.6-alpha.14.8 --- CHANGELOG.md | 12 +- config/manager/kustomization.yaml | 2 +- hack/deploy/chart/robot-operator/Chart.yaml | 4 +- .../templates/manager-rbac.yaml | 26 + .../mutating-webhook-configuration.yaml | 20 + .../templates/notebook-crd.yaml | 474 ++++++++++++ .../robot-operator/templates/robot-crd.yaml | 183 +++++ .../templates/robotartifact-crd.yaml | 53 ++ .../templates/robotdevsuite-crd.yaml | 112 +++ .../validating-webhook-configuration.yaml | 20 + hack/deploy/chart/robot-operator/values.yaml | 2 +- hack/deploy/manifests/robot_operator.yaml | 707 +++++++++++++++++- 12 files changed, 1609 insertions(+), 6 deletions(-) create mode 100644 hack/deploy/chart/robot-operator/templates/notebook-crd.yaml diff --git a/CHANGELOG.md b/CHANGELOG.md index 403d10ba..3738be1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,15 @@ ## [Unreleased] +### Feat +- **notebook:** integrate jupyter notebook + +### Fix +- **service:** update service path + + + +## [v0.2.6-alpha.14.7] - 2023-12-25 ## [v0.2.6-alpha.14.6] - 2023-12-13 @@ -374,7 +383,8 @@ - Merge pull request [#24](https://github.com/robolaunch/robot-operator/issues/24) from robolaunch/23-allow-multiple-launches -[Unreleased]: https://github.com/robolaunch/robot-operator/compare/v0.2.6-alpha.14.6...HEAD +[Unreleased]: https://github.com/robolaunch/robot-operator/compare/v0.2.6-alpha.14.7...HEAD +[v0.2.6-alpha.14.7]: https://github.com/robolaunch/robot-operator/compare/v0.2.6-alpha.14.6...v0.2.6-alpha.14.7 [v0.2.6-alpha.14.6]: https://github.com/robolaunch/robot-operator/compare/v0.2.6-alpha.14.5...v0.2.6-alpha.14.6 [v0.2.6-alpha.14.5]: https://github.com/robolaunch/robot-operator/compare/v0.2.6-alpha.14.4...v0.2.6-alpha.14.5 [v0.2.6-alpha.14.4]: https://github.com/robolaunch/robot-operator/compare/v0.2.6-alpha.14.3...v0.2.6-alpha.14.4 diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index da644148..2d3de08e 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -5,4 +5,4 @@ kind: Kustomization images: - name: controller newName: robolaunchio/robot-controller-manager - newTag: v0.2.6-alpha.14.7 + newTag: v0.2.6-alpha.14.8 diff --git a/hack/deploy/chart/robot-operator/Chart.yaml b/hack/deploy/chart/robot-operator/Chart.yaml index 0b5ca436..01e33e42 100644 --- a/hack/deploy/chart/robot-operator/Chart.yaml +++ b/hack/deploy/chart/robot-operator/Chart.yaml @@ -13,9 +13,9 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.2.6-alpha.14.7 +version: 0.2.6-alpha.14.8 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "v0.2.6-alpha.14.7" +appVersion: "v0.2.6-alpha.14.8" diff --git a/hack/deploy/chart/robot-operator/templates/manager-rbac.yaml b/hack/deploy/chart/robot-operator/templates/manager-rbac.yaml index a9e02e0d..8ab1cf5b 100644 --- a/hack/deploy/chart/robot-operator/templates/manager-rbac.yaml +++ b/hack/deploy/chart/robot-operator/templates/manager-rbac.yaml @@ -253,6 +253,32 @@ rules: - get - patch - update +- apiGroups: + - robot.roboscale.io + resources: + - notebooks + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - robot.roboscale.io + resources: + - notebooks/finalizers + verbs: + - update +- apiGroups: + - robot.roboscale.io + resources: + - notebooks/status + verbs: + - get + - patch + - update - apiGroups: - robot.roboscale.io resources: diff --git a/hack/deploy/chart/robot-operator/templates/mutating-webhook-configuration.yaml b/hack/deploy/chart/robot-operator/templates/mutating-webhook-configuration.yaml index c2be5838..0f5a11d1 100644 --- a/hack/deploy/chart/robot-operator/templates/mutating-webhook-configuration.yaml +++ b/hack/deploy/chart/robot-operator/templates/mutating-webhook-configuration.yaml @@ -7,6 +7,26 @@ metadata: labels: {{- include "robot-operator.labels" . | nindent 4 }} webhooks: +- admissionReviewVersions: + - v1 + clientConfig: + service: + name: '{{ include "robot-operator.fullname" . }}-webhook-service' + namespace: '{{ .Release.Namespace }}' + path: /mutate-robot-roboscale-io-v1alpha1-notebook + failurePolicy: Fail + name: mnotebook.kb.io + rules: + - apiGroups: + - robot.roboscale.io + apiVersions: + - v1alpha1 + operations: + - CREATE + - UPDATE + resources: + - notebooks + sideEffects: None - admissionReviewVersions: - v1 clientConfig: diff --git a/hack/deploy/chart/robot-operator/templates/notebook-crd.yaml b/hack/deploy/chart/robot-operator/templates/notebook-crd.yaml new file mode 100644 index 00000000..ed189a59 --- /dev/null +++ b/hack/deploy/chart/robot-operator/templates/notebook-crd.yaml @@ -0,0 +1,474 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: notebooks.robot.roboscale.io + annotations: + controller-gen.kubebuilder.io/version: v0.9.2 + labels: + {{- include "robot-operator.labels" . | nindent 4 }} +spec: + group: robot.roboscale.io + names: + kind: Notebook + listKind: NotebookList + plural: notebooks + singular: notebook + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: Notebook is the Schema for the notebooks 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' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: NotebookSpec defines the desired state of Notebook. + properties: + display: + description: Notebook connects an X11 socket if it's set to `true` and + a target Notebook resource is set in labels with key `robolaunch.io/target-vdi`. + Applications that requires GUI can be executed such as VLC. + type: boolean + ingress: + description: '[*alpha*] Notebook will create an Ingress resource if + `true`.' + type: boolean + privileged: + description: If `true`, containers of Notebook will be privileged containers. + It can be used in physical instances where it's necessary to access + I/O devices on the host machine. Not recommended to activate this + field on cloud instances. + type: boolean + resources: + description: Resource limitations of Notebook. + properties: + cpu: + description: CPU resource limit. + pattern: ^([0-9])+(m)$ + type: string + gpuCore: + description: GPU core number that will be allocated. + type: integer + gpuInstance: + default: nvidia.com/gpu + description: GPU instance that will be allocated. eg. nvidia.com/mig-1g.5gb. + Defaults to "nvidia.com/gpu". + type: string + memory: + description: Memory resource limit. + pattern: ^([0-9])+(Mi|Gi)$ + type: string + type: object + serviceType: + default: NodePort + description: Service type of Notebook. `ClusterIP` and `NodePort` is + supported. + enum: + - ClusterIP + - NodePort + type: string + type: object + status: + description: NotebookStatus defines the observed state of Notebook. + properties: + configMapStatus: + description: Config map status. It's used to add background apps. + properties: + created: + description: Shows if the owned resource is created. + type: boolean + phase: + description: Phase of the owned resource. + type: string + reference: + description: Reference to the owned resource. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of + an entire object, this string should contain a valid JSON/Go + field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within + a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" + (container with index 2 in this pod). This syntax is chosen + only to have some well-defined way of referencing a part of + an object. TODO: this design is not final and this field is + subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + required: + - created + type: object + customPortIngressStatus: + description: Status of Notebook ingress for custom ports service. Created + only if the robot has an additional config with key `IDE_CUSTOM_PORT_RANGE` + and `.spec.ingress` is `true`. + properties: + created: + description: Shows if the owned resource is created. + type: boolean + phase: + description: Phase of the owned resource. + type: string + reference: + description: Reference to the owned resource. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of + an entire object, this string should contain a valid JSON/Go + field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within + a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" + (container with index 2 in this pod). This syntax is chosen + only to have some well-defined way of referencing a part of + an object. TODO: this design is not final and this field is + subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + required: + - created + type: object + customPortServiceStatus: + description: Status of Notebook service for custom ports. Created only + if the robot has an additional config with key `IDE_CUSTOM_PORT_RANGE`. + properties: + resource: + description: Generic status for any owned resource. + properties: + created: + description: Shows if the owned resource is created. + type: boolean + phase: + description: Phase of the owned resource. + type: string + reference: + description: Reference to the owned resource. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead + of an entire object, this string should contain a valid + JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container + within a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that + triggered the event) or if no container name is specified + "spec.containers[2]" (container with index 2 in this pod). + This syntax is chosen only to have some well-defined way + of referencing a part of an object. TODO: this design + is not final and this field is subject to change in the + future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + required: + - created + type: object + urls: + additionalProperties: + type: string + description: Connection URL. + type: object + type: object + ingressStatus: + description: Status of Notebook Ingress. + properties: + created: + description: Shows if the owned resource is created. + type: boolean + phase: + description: Phase of the owned resource. + type: string + reference: + description: Reference to the owned resource. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of + an entire object, this string should contain a valid JSON/Go + field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within + a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" + (container with index 2 in this pod). This syntax is chosen + only to have some well-defined way of referencing a part of + an object. TODO: this design is not final and this field is + subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + required: + - created + type: object + phase: + description: Phase of Notebook. + type: string + podStatus: + description: Status of Notebook pod. + properties: + ip: + description: IP of the pod. + type: string + resource: + description: Generic status for any owned resource. + properties: + created: + description: Shows if the owned resource is created. + type: boolean + phase: + description: Phase of the owned resource. + type: string + reference: + description: Reference to the owned resource. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead + of an entire object, this string should contain a valid + JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container + within a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that + triggered the event) or if no container name is specified + "spec.containers[2]" (container with index 2 in this pod). + This syntax is chosen only to have some well-defined way + of referencing a part of an object. TODO: this design + is not final and this field is subject to change in the + future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + required: + - created + type: object + type: object + serviceExportStatus: + description: Status of Notebook ServiceExport. Created only if the instance + type is Physical Instance. + properties: + created: + description: Shows if the owned resource is created. + type: boolean + phase: + description: Phase of the owned resource. + type: string + reference: + description: Reference to the owned resource. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of + an entire object, this string should contain a valid JSON/Go + field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within + a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" + (container with index 2 in this pod). This syntax is chosen + only to have some well-defined way of referencing a part of + an object. TODO: this design is not final and this field is + subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + required: + - created + type: object + serviceStatus: + description: Status of Notebook service. + properties: + resource: + description: Generic status for any owned resource. + properties: + created: + description: Shows if the owned resource is created. + type: boolean + phase: + description: Phase of the owned resource. + type: string + reference: + description: Reference to the owned resource. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead + of an entire object, this string should contain a valid + JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container + within a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that + triggered the event) or if no container name is specified + "spec.containers[2]" (container with index 2 in this pod). + This syntax is chosen only to have some well-defined way + of referencing a part of an object. TODO: this design + is not final and this field is subject to change in the + future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + required: + - created + type: object + urls: + additionalProperties: + type: string + description: Connection URL. + type: object + type: object + type: object + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] \ No newline at end of file diff --git a/hack/deploy/chart/robot-operator/templates/robot-crd.yaml b/hack/deploy/chart/robot-operator/templates/robot-crd.yaml index ccdb35ce..182594e3 100644 --- a/hack/deploy/chart/robot-operator/templates/robot-crd.yaml +++ b/hack/deploy/chart/robot-operator/templates/robot-crd.yaml @@ -288,6 +288,59 @@ spec: description: If `true`, a Cloud IDE will be provisioned inside development suite. type: boolean + notebookEnabled: + description: If `true`, a Notebook will be provisioned inside development + suite. + type: boolean + notebookTemplate: + description: Configurational parameters of Notebook. Applied if + `.spec.notebookEnabled` is set to `true`. + properties: + display: + description: Notebook connects an X11 socket if it's set to + `true` and a target Notebook resource is set in labels with + key `robolaunch.io/target-vdi`. Applications that requires + GUI can be executed such as VLC. + type: boolean + ingress: + description: '[*alpha*] Notebook will create an Ingress resource + if `true`.' + type: boolean + privileged: + description: If `true`, containers of Notebook will be privileged + containers. It can be used in physical instances where it's + necessary to access I/O devices on the host machine. Not recommended + to activate this field on cloud instances. + type: boolean + resources: + description: Resource limitations of Notebook. + properties: + cpu: + description: CPU resource limit. + pattern: ^([0-9])+(m)$ + type: string + gpuCore: + description: GPU core number that will be allocated. + type: integer + gpuInstance: + default: nvidia.com/gpu + description: GPU instance that will be allocated. eg. nvidia.com/mig-1g.5gb. + Defaults to "nvidia.com/gpu". + type: string + memory: + description: Memory resource limit. + pattern: ^([0-9])+(Mi|Gi)$ + type: string + type: object + serviceType: + default: NodePort + description: Service type of Notebook. `ClusterIP` and `NodePort` + is supported. + enum: + - ClusterIP + - NodePort + type: string + type: object remoteIDEEnabled: description: If `true`, a relay server for remote Cloud IDE will be provisioned inside development suite. @@ -949,6 +1002,73 @@ spec: description: '[*alpha*] Indicates if RobotDevSuite is attached to a Robot and actively provisioned it''s resources.' type: boolean + notebookStatus: + description: Status of Notebook. + properties: + connections: + additionalProperties: + type: string + description: Address of the robot service that can be + reached from outside. + type: object + resource: + description: Generic status for any owned resource. + properties: + created: + description: Shows if the owned resource is created. + type: boolean + phase: + description: Phase of the owned resource. + type: string + reference: + description: Reference to the owned resource. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object + instead of an entire object, this string should + contain a valid JSON/Go field access statement, + such as desiredState.manifest.containers[2]. + For example, if the object reference is to a + container within a pod, this would take on a + value like: "spec.containers{name}" (where "name" + refers to the name of the container that triggered + the event) or if no container name is specified + "spec.containers[2]" (container with index 2 + in this pod). This syntax is chosen only to + have some well-defined way of referencing a + part of an object. TODO: this design is not + final and this field is subject to change in + the future.' + type: string + kind: + description: 'Kind of the referent. More info: + https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which + this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + required: + - created + type: object + type: object phase: description: Phase of RobotDevSuite. type: string @@ -1952,6 +2072,69 @@ spec: description: '[*alpha*] Indicates if RobotDevSuite is attached to a Robot and actively provisioned it''s resources.' type: boolean + notebookStatus: + description: Status of Notebook. + properties: + connections: + additionalProperties: + type: string + description: Address of the robot service that can be reached + from outside. + type: object + resource: + description: Generic status for any owned resource. + properties: + created: + description: Shows if the owned resource is created. + type: boolean + phase: + description: Phase of the owned resource. + type: string + reference: + description: Reference to the owned resource. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object + instead of an entire object, this string should + contain a valid JSON/Go field access statement, + such as desiredState.manifest.containers[2]. For + example, if the object reference is to a container + within a pod, this would take on a value like: + "spec.containers{name}" (where "name" refers to + the name of the container that triggered the event) + or if no container name is specified "spec.containers[2]" + (container with index 2 in this pod). This syntax + is chosen only to have some well-defined way of + referencing a part of an object. TODO: this design + is not final and this field is subject to change + in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which + this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + required: + - created + type: object + type: object phase: description: Phase of RobotDevSuite. type: string diff --git a/hack/deploy/chart/robot-operator/templates/robotartifact-crd.yaml b/hack/deploy/chart/robot-operator/templates/robotartifact-crd.yaml index 887ad7ab..cb7e65ca 100644 --- a/hack/deploy/chart/robot-operator/templates/robotartifact-crd.yaml +++ b/hack/deploy/chart/robot-operator/templates/robotartifact-crd.yaml @@ -255,6 +255,59 @@ spec: description: If `true`, a Cloud IDE will be provisioned inside development suite. type: boolean + notebookEnabled: + description: If `true`, a Notebook will be provisioned inside development + suite. + type: boolean + notebookTemplate: + description: Configurational parameters of Notebook. Applied if + `.spec.notebookEnabled` is set to `true`. + properties: + display: + description: Notebook connects an X11 socket if it's set to + `true` and a target Notebook resource is set in labels with + key `robolaunch.io/target-vdi`. Applications that requires + GUI can be executed such as VLC. + type: boolean + ingress: + description: '[*alpha*] Notebook will create an Ingress resource + if `true`.' + type: boolean + privileged: + description: If `true`, containers of Notebook will be privileged + containers. It can be used in physical instances where it's + necessary to access I/O devices on the host machine. Not recommended + to activate this field on cloud instances. + type: boolean + resources: + description: Resource limitations of Notebook. + properties: + cpu: + description: CPU resource limit. + pattern: ^([0-9])+(m)$ + type: string + gpuCore: + description: GPU core number that will be allocated. + type: integer + gpuInstance: + default: nvidia.com/gpu + description: GPU instance that will be allocated. eg. nvidia.com/mig-1g.5gb. + Defaults to "nvidia.com/gpu". + type: string + memory: + description: Memory resource limit. + pattern: ^([0-9])+(Mi|Gi)$ + type: string + type: object + serviceType: + default: NodePort + description: Service type of Notebook. `ClusterIP` and `NodePort` + is supported. + enum: + - ClusterIP + - NodePort + type: string + type: object remoteIDEEnabled: description: If `true`, a relay server for remote Cloud IDE will be provisioned inside development suite. diff --git a/hack/deploy/chart/robot-operator/templates/robotdevsuite-crd.yaml b/hack/deploy/chart/robot-operator/templates/robotdevsuite-crd.yaml index 9a956fdd..fe2a4d3b 100644 --- a/hack/deploy/chart/robot-operator/templates/robotdevsuite-crd.yaml +++ b/hack/deploy/chart/robot-operator/templates/robotdevsuite-crd.yaml @@ -65,6 +65,58 @@ spec: description: If `true`, a Cloud IDE will be provisioned inside development suite. type: boolean + notebookEnabled: + description: If `true`, a Notebook will be provisioned inside development + suite. + type: boolean + notebookTemplate: + description: Configurational parameters of Notebook. Applied if `.spec.notebookEnabled` + is set to `true`. + properties: + display: + description: Notebook connects an X11 socket if it's set to `true` + and a target Notebook resource is set in labels with key `robolaunch.io/target-vdi`. + Applications that requires GUI can be executed such as VLC. + type: boolean + ingress: + description: '[*alpha*] Notebook will create an Ingress resource + if `true`.' + type: boolean + privileged: + description: If `true`, containers of Notebook will be privileged + containers. It can be used in physical instances where it's necessary + to access I/O devices on the host machine. Not recommended to + activate this field on cloud instances. + type: boolean + resources: + description: Resource limitations of Notebook. + properties: + cpu: + description: CPU resource limit. + pattern: ^([0-9])+(m)$ + type: string + gpuCore: + description: GPU core number that will be allocated. + type: integer + gpuInstance: + default: nvidia.com/gpu + description: GPU instance that will be allocated. eg. nvidia.com/mig-1g.5gb. + Defaults to "nvidia.com/gpu". + type: string + memory: + description: Memory resource limit. + pattern: ^([0-9])+(Mi|Gi)$ + type: string + type: object + serviceType: + default: NodePort + description: Service type of Notebook. `ClusterIP` and `NodePort` + is supported. + enum: + - ClusterIP + - NodePort + type: string + type: object remoteIDEEnabled: description: If `true`, a relay server for remote Cloud IDE will be provisioned inside development suite. @@ -233,6 +285,66 @@ spec: description: '[*alpha*] Indicates if RobotDevSuite is attached to a Robot and actively provisioned it''s resources.' type: boolean + notebookStatus: + description: Status of Notebook. + properties: + connections: + additionalProperties: + type: string + description: Address of the robot service that can be reached from + outside. + type: object + resource: + description: Generic status for any owned resource. + properties: + created: + description: Shows if the owned resource is created. + type: boolean + phase: + description: Phase of the owned resource. + type: string + reference: + description: Reference to the owned resource. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead + of an entire object, this string should contain a valid + JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container + within a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that + triggered the event) or if no container name is specified + "spec.containers[2]" (container with index 2 in this pod). + This syntax is chosen only to have some well-defined way + of referencing a part of an object. TODO: this design + is not final and this field is subject to change in the + future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + required: + - created + type: object + type: object phase: description: Phase of RobotDevSuite. type: string diff --git a/hack/deploy/chart/robot-operator/templates/validating-webhook-configuration.yaml b/hack/deploy/chart/robot-operator/templates/validating-webhook-configuration.yaml index 4571e26f..59b71dbe 100644 --- a/hack/deploy/chart/robot-operator/templates/validating-webhook-configuration.yaml +++ b/hack/deploy/chart/robot-operator/templates/validating-webhook-configuration.yaml @@ -7,6 +7,26 @@ metadata: labels: {{- include "robot-operator.labels" . | nindent 4 }} webhooks: +- admissionReviewVersions: + - v1 + clientConfig: + service: + name: '{{ include "robot-operator.fullname" . }}-webhook-service' + namespace: '{{ .Release.Namespace }}' + path: /validate-robot-roboscale-io-v1alpha1-notebook + failurePolicy: Fail + name: vnotebook.kb.io + rules: + - apiGroups: + - robot.roboscale.io + apiVersions: + - v1alpha1 + operations: + - CREATE + - UPDATE + resources: + - notebooks + sideEffects: None - admissionReviewVersions: - v1 clientConfig: diff --git a/hack/deploy/chart/robot-operator/values.yaml b/hack/deploy/chart/robot-operator/values.yaml index 59aa01e5..e26316f0 100644 --- a/hack/deploy/chart/robot-operator/values.yaml +++ b/hack/deploy/chart/robot-operator/values.yaml @@ -32,7 +32,7 @@ controllerManager: - ALL image: repository: robolaunchio/robot-controller-manager - tag: v0.2.6-alpha.14.7 + tag: v0.2.6-alpha.14.8 resources: limits: cpu: 500m diff --git a/hack/deploy/manifests/robot_operator.yaml b/hack/deploy/manifests/robot_operator.yaml index 16fdc4f4..d78d987f 100644 --- a/hack/deploy/manifests/robot_operator.yaml +++ b/hack/deploy/manifests/robot_operator.yaml @@ -1645,6 +1645,378 @@ spec: --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.9.2 + creationTimestamp: null + name: notebooks.robot.roboscale.io +spec: + group: robot.roboscale.io + names: + kind: Notebook + listKind: NotebookList + plural: notebooks + singular: notebook + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: Notebook is the Schema for the notebooks 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' + type: string + kind: + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: NotebookSpec defines the desired state of Notebook. + properties: + display: + description: Notebook connects an X11 socket if it's set to `true` and a target Notebook resource is set in labels with key `robolaunch.io/target-vdi`. Applications that requires GUI can be executed such as VLC. + type: boolean + ingress: + description: '[*alpha*] Notebook will create an Ingress resource if `true`.' + type: boolean + privileged: + description: If `true`, containers of Notebook will be privileged containers. It can be used in physical instances where it's necessary to access I/O devices on the host machine. Not recommended to activate this field on cloud instances. + type: boolean + resources: + description: Resource limitations of Notebook. + properties: + cpu: + description: CPU resource limit. + pattern: ^([0-9])+(m)$ + type: string + gpuCore: + description: GPU core number that will be allocated. + type: integer + gpuInstance: + default: nvidia.com/gpu + description: GPU instance that will be allocated. eg. nvidia.com/mig-1g.5gb. Defaults to "nvidia.com/gpu". + type: string + memory: + description: Memory resource limit. + pattern: ^([0-9])+(Mi|Gi)$ + type: string + type: object + serviceType: + default: NodePort + description: Service type of Notebook. `ClusterIP` and `NodePort` is supported. + enum: + - ClusterIP + - NodePort + type: string + type: object + status: + description: NotebookStatus defines the observed state of Notebook. + properties: + configMapStatus: + description: Config map status. It's used to add background apps. + properties: + created: + description: Shows if the owned resource is created. + type: boolean + phase: + description: Phase of the owned resource. + type: string + reference: + description: Reference to the owned resource. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + required: + - created + type: object + customPortIngressStatus: + description: Status of Notebook ingress for custom ports service. Created only if the robot has an additional config with key `IDE_CUSTOM_PORT_RANGE` and `.spec.ingress` is `true`. + properties: + created: + description: Shows if the owned resource is created. + type: boolean + phase: + description: Phase of the owned resource. + type: string + reference: + description: Reference to the owned resource. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + required: + - created + type: object + customPortServiceStatus: + description: Status of Notebook service for custom ports. Created only if the robot has an additional config with key `IDE_CUSTOM_PORT_RANGE`. + properties: + resource: + description: Generic status for any owned resource. + properties: + created: + description: Shows if the owned resource is created. + type: boolean + phase: + description: Phase of the owned resource. + type: string + reference: + description: Reference to the owned resource. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + required: + - created + type: object + urls: + additionalProperties: + type: string + description: Connection URL. + type: object + type: object + ingressStatus: + description: Status of Notebook Ingress. + properties: + created: + description: Shows if the owned resource is created. + type: boolean + phase: + description: Phase of the owned resource. + type: string + reference: + description: Reference to the owned resource. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + required: + - created + type: object + phase: + description: Phase of Notebook. + type: string + podStatus: + description: Status of Notebook pod. + properties: + ip: + description: IP of the pod. + type: string + resource: + description: Generic status for any owned resource. + properties: + created: + description: Shows if the owned resource is created. + type: boolean + phase: + description: Phase of the owned resource. + type: string + reference: + description: Reference to the owned resource. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + required: + - created + type: object + type: object + serviceExportStatus: + description: Status of Notebook ServiceExport. Created only if the instance type is Physical Instance. + properties: + created: + description: Shows if the owned resource is created. + type: boolean + phase: + description: Phase of the owned resource. + type: string + reference: + description: Reference to the owned resource. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + required: + - created + type: object + serviceStatus: + description: Status of Notebook service. + properties: + resource: + description: Generic status for any owned resource. + properties: + created: + description: Shows if the owned resource is created. + type: boolean + phase: + description: Phase of the owned resource. + type: string + reference: + description: Reference to the owned resource. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + required: + - created + type: object + urls: + additionalProperties: + type: string + description: Connection URL. + type: object + type: object + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.9.2 @@ -2078,6 +2450,48 @@ spec: ideEnabled: description: If `true`, a Cloud IDE will be provisioned inside development suite. type: boolean + notebookEnabled: + description: If `true`, a Notebook will be provisioned inside development suite. + type: boolean + notebookTemplate: + description: Configurational parameters of Notebook. Applied if `.spec.notebookEnabled` is set to `true`. + properties: + display: + description: Notebook connects an X11 socket if it's set to `true` and a target Notebook resource is set in labels with key `robolaunch.io/target-vdi`. Applications that requires GUI can be executed such as VLC. + type: boolean + ingress: + description: '[*alpha*] Notebook will create an Ingress resource if `true`.' + type: boolean + privileged: + description: If `true`, containers of Notebook will be privileged containers. It can be used in physical instances where it's necessary to access I/O devices on the host machine. Not recommended to activate this field on cloud instances. + type: boolean + resources: + description: Resource limitations of Notebook. + properties: + cpu: + description: CPU resource limit. + pattern: ^([0-9])+(m)$ + type: string + gpuCore: + description: GPU core number that will be allocated. + type: integer + gpuInstance: + default: nvidia.com/gpu + description: GPU instance that will be allocated. eg. nvidia.com/mig-1g.5gb. Defaults to "nvidia.com/gpu". + type: string + memory: + description: Memory resource limit. + pattern: ^([0-9])+(Mi|Gi)$ + type: string + type: object + serviceType: + default: NodePort + description: Service type of Notebook. `ClusterIP` and `NodePort` is supported. + enum: + - ClusterIP + - NodePort + type: string + type: object remoteIDEEnabled: description: If `true`, a relay server for remote Cloud IDE will be provisioned inside development suite. type: boolean @@ -2387,6 +2801,48 @@ spec: ideEnabled: description: If `true`, a Cloud IDE will be provisioned inside development suite. type: boolean + notebookEnabled: + description: If `true`, a Notebook will be provisioned inside development suite. + type: boolean + notebookTemplate: + description: Configurational parameters of Notebook. Applied if `.spec.notebookEnabled` is set to `true`. + properties: + display: + description: Notebook connects an X11 socket if it's set to `true` and a target Notebook resource is set in labels with key `robolaunch.io/target-vdi`. Applications that requires GUI can be executed such as VLC. + type: boolean + ingress: + description: '[*alpha*] Notebook will create an Ingress resource if `true`.' + type: boolean + privileged: + description: If `true`, containers of Notebook will be privileged containers. It can be used in physical instances where it's necessary to access I/O devices on the host machine. Not recommended to activate this field on cloud instances. + type: boolean + resources: + description: Resource limitations of Notebook. + properties: + cpu: + description: CPU resource limit. + pattern: ^([0-9])+(m)$ + type: string + gpuCore: + description: GPU core number that will be allocated. + type: integer + gpuInstance: + default: nvidia.com/gpu + description: GPU instance that will be allocated. eg. nvidia.com/mig-1g.5gb. Defaults to "nvidia.com/gpu". + type: string + memory: + description: Memory resource limit. + pattern: ^([0-9])+(Mi|Gi)$ + type: string + type: object + serviceType: + default: NodePort + description: Service type of Notebook. `ClusterIP` and `NodePort` is supported. + enum: + - ClusterIP + - NodePort + type: string + type: object remoteIDEEnabled: description: If `true`, a relay server for remote Cloud IDE will be provisioned inside development suite. type: boolean @@ -2534,6 +2990,53 @@ spec: active: description: '[*alpha*] Indicates if RobotDevSuite is attached to a Robot and actively provisioned it''s resources.' type: boolean + notebookStatus: + description: Status of Notebook. + properties: + connections: + additionalProperties: + type: string + description: Address of the robot service that can be reached from outside. + type: object + resource: + description: Generic status for any owned resource. + properties: + created: + description: Shows if the owned resource is created. + type: boolean + phase: + description: Phase of the owned resource. + type: string + reference: + description: Reference to the owned resource. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + required: + - created + type: object + type: object phase: description: Phase of RobotDevSuite. type: string @@ -3309,6 +3812,48 @@ spec: ideEnabled: description: If `true`, a Cloud IDE will be provisioned inside development suite. type: boolean + notebookEnabled: + description: If `true`, a Notebook will be provisioned inside development suite. + type: boolean + notebookTemplate: + description: Configurational parameters of Notebook. Applied if `.spec.notebookEnabled` is set to `true`. + properties: + display: + description: Notebook connects an X11 socket if it's set to `true` and a target Notebook resource is set in labels with key `robolaunch.io/target-vdi`. Applications that requires GUI can be executed such as VLC. + type: boolean + ingress: + description: '[*alpha*] Notebook will create an Ingress resource if `true`.' + type: boolean + privileged: + description: If `true`, containers of Notebook will be privileged containers. It can be used in physical instances where it's necessary to access I/O devices on the host machine. Not recommended to activate this field on cloud instances. + type: boolean + resources: + description: Resource limitations of Notebook. + properties: + cpu: + description: CPU resource limit. + pattern: ^([0-9])+(m)$ + type: string + gpuCore: + description: GPU core number that will be allocated. + type: integer + gpuInstance: + default: nvidia.com/gpu + description: GPU instance that will be allocated. eg. nvidia.com/mig-1g.5gb. Defaults to "nvidia.com/gpu". + type: string + memory: + description: Memory resource limit. + pattern: ^([0-9])+(Mi|Gi)$ + type: string + type: object + serviceType: + default: NodePort + description: Service type of Notebook. `ClusterIP` and `NodePort` is supported. + enum: + - ClusterIP + - NodePort + type: string + type: object remoteIDEEnabled: description: If `true`, a relay server for remote Cloud IDE will be provisioned inside development suite. type: boolean @@ -3823,6 +4368,53 @@ spec: active: description: '[*alpha*] Indicates if RobotDevSuite is attached to a Robot and actively provisioned it''s resources.' type: boolean + notebookStatus: + description: Status of Notebook. + properties: + connections: + additionalProperties: + type: string + description: Address of the robot service that can be reached from outside. + type: object + resource: + description: Generic status for any owned resource. + properties: + created: + description: Shows if the owned resource is created. + type: boolean + phase: + description: Phase of the owned resource. + type: string + reference: + description: Reference to the owned resource. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + required: + - created + type: object + type: object phase: description: Phase of RobotDevSuite. type: string @@ -4581,6 +5173,53 @@ spec: active: description: '[*alpha*] Indicates if RobotDevSuite is attached to a Robot and actively provisioned it''s resources.' type: boolean + notebookStatus: + description: Status of Notebook. + properties: + connections: + additionalProperties: + type: string + description: Address of the robot service that can be reached from outside. + type: object + resource: + description: Generic status for any owned resource. + properties: + created: + description: Shows if the owned resource is created. + type: boolean + phase: + description: Phase of the owned resource. + type: string + reference: + description: Reference to the owned resource. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + required: + - created + type: object + type: object phase: description: Phase of RobotDevSuite. type: string @@ -6369,6 +7008,32 @@ rules: - get - patch - update + - apiGroups: + - robot.roboscale.io + resources: + - notebooks + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - robot.roboscale.io + resources: + - notebooks/finalizers + verbs: + - update + - apiGroups: + - robot.roboscale.io + resources: + - notebooks/status + verbs: + - get + - patch + - update - apiGroups: - robot.roboscale.io resources: @@ -6768,7 +7433,7 @@ spec: - --leader-elect command: - /manager - image: robolaunchio/robot-controller-manager:v0.2.6-alpha.14.7 + image: robolaunchio/robot-controller-manager:v0.2.6-alpha.14.8 livenessProbe: httpGet: path: /healthz @@ -6868,6 +7533,26 @@ metadata: app.kubernetes.io/part-of: robot-operator name: robot-mutating-webhook-configuration webhooks: + - admissionReviewVersions: + - v1 + clientConfig: + service: + name: robot-webhook-service + namespace: robot-system + path: /mutate-robot-roboscale-io-v1alpha1-notebook + failurePolicy: Fail + name: mnotebook.kb.io + rules: + - apiGroups: + - robot.roboscale.io + apiVersions: + - v1alpha1 + operations: + - CREATE + - UPDATE + resources: + - notebooks + sideEffects: None - admissionReviewVersions: - v1 clientConfig: @@ -7043,6 +7728,26 @@ metadata: app.kubernetes.io/part-of: robot-operator name: robot-validating-webhook-configuration webhooks: + - admissionReviewVersions: + - v1 + clientConfig: + service: + name: robot-webhook-service + namespace: robot-system + path: /validate-robot-roboscale-io-v1alpha1-notebook + failurePolicy: Fail + name: vnotebook.kb.io + rules: + - apiGroups: + - robot.roboscale.io + apiVersions: + - v1alpha1 + operations: + - CREATE + - UPDATE + resources: + - notebooks + sideEffects: None - admissionReviewVersions: - v1 clientConfig: