From 5ff265432d9cb8f208856bcbde5029a21d50b1ec Mon Sep 17 00:00:00 2001 From: ajanikow <12255597+ajanikow@users.noreply.github.com> Date: Wed, 24 Apr 2024 15:53:13 +0000 Subject: [PATCH 1/5] [Feature] [ML] Unify API --- CHANGELOG.md | 1 + docs/api/ArangoMLExtension.V1Alpha1.md | 594 +---- .../ml/v1alpha1/extension_spec_deployment.go | 110 +- .../extension_spec_deployment_component.go | 74 - pkg/apis/ml/v1alpha1/zz_generated.deepcopy.go | 43 +- .../crds/ml-extension.schema.generated.yaml | 1924 ++++------------- 6 files changed, 607 insertions(+), 2139 deletions(-) delete mode 100644 pkg/apis/ml/v1alpha1/extension_spec_deployment_component.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b89f6737..67dfbf4fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - (Bugfix) Ensure PDB is created - (Bugfix) Fix Schema Apply Checksum - (Bugfix) Use MD5 instead of SHA256 for CRD Checksums +- (Feature) (ML) Unify API ## [1.2.40](https://github.com/arangodb/kube-arangodb/tree/1.2.40) (2024-04-10) - (Feature) Add Core fields to the Scheduler Container Spec diff --git a/docs/api/ArangoMLExtension.V1Alpha1.md b/docs/api/ArangoMLExtension.V1Alpha1.md index 0de026b0f..634d6b3e4 100644 --- a/docs/api/ArangoMLExtension.V1Alpha1.md +++ b/docs/api/ArangoMLExtension.V1Alpha1.md @@ -32,100 +32,7 @@ Links: *** -### .spec.deployment.automountServiceAccountToken - -Type: `boolean` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/pod/resources/service_account.go#L38) - -AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - -*** - -### .spec.deployment.hostIPC - -Type: `boolean` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/pod/resources/namespace.go#L42) - -HostIPC defines to use the host's ipc namespace. - -Default Value: `false` - -*** - -### .spec.deployment.hostNetwork - -Type: `boolean` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/pod/resources/namespace.go#L36) - -HostNetwork requests Host network for this pod. Use the host's network namespace. -If this option is set, the ports that will be used must be specified. - -Default Value: `false` - -*** - -### .spec.deployment.hostPID - -Type: `boolean` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/pod/resources/namespace.go#L39) - -HostPID define to use the host's pid namespace. - -Default Value: `false` - -*** - -### .spec.deployment.imagePullSecrets - -Type: `array` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/pod/resources/image.go#L36) - -ImagePullSecrets define Secrets used to pull Image from registry - -*** - -### .spec.deployment.labels - -Type: `object` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/pod/resources/metadata.go#L39) - -Map of string keys and values that can be used to organize and categorize -(scope and select) objects. May match selectors of replication controllers -and services. - -Links: -* [Kubernetes docs](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels) - -*** - -### .spec.deployment.nodeSelector - -Type: `object` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/pod/resources/scheduling.go#L39) - -NodeSelector is a selector that must be true for the workload to fit on a node. - -Links: -* [Kubernetes docs](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector) - -*** - -### .spec.deployment.ownerReferences - -Type: `meta.OwnerReference` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/pod/resources/metadata.go#L52) - -List of objects depended by this object. If ALL objects in the list have -been deleted, this object will be garbage collected. If this object is managed by a controller, -then an entry in this list will point to this controller, with the controller field set to true. -There cannot be more than one managing controller. - -*** - -### .spec.deployment.podSecurityContext - -Type: `core.PodSecurityContext` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/pod/resources/security.go#L35) - -PodSecurityContext holds pod-level security attributes and common container settings. - -Links: -* [Kubernetes docs](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) - -*** - -### .spec.deployment.prediction.args +### .spec.deployment.args Type: `array` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/core.go#L50) @@ -142,7 +49,15 @@ Links: *** -### .spec.deployment.prediction.command +### .spec.deployment.automountServiceAccountToken + +Type: `boolean` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/pod/resources/service_account.go#L38) + +AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. + +*** + +### .spec.deployment.command Type: `array` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/core.go#L40) @@ -159,7 +74,7 @@ Links: *** -### .spec.deployment.prediction.env +### .spec.deployment.env Type: `core.EnvVar` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/environments.go#L36) @@ -170,7 +85,7 @@ Links: *** -### .spec.deployment.prediction.envFrom +### .spec.deployment.envFrom Type: `core.EnvFromSource` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/environments.go#L41) @@ -181,253 +96,148 @@ Links: *** -### .spec.deployment.prediction.gpu +### .spec.deployment.gpu -Type: `boolean` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1alpha1/extension_spec_deployment_component.go#L31) +Type: `boolean` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1alpha1/extension_spec_deployment.go#L52) -GPU defined if GPU Jobs are enabled for component. In use only for ArangoMLExtensionSpecDeploymentComponentPrediction and ArangoMLExtensionSpecDeploymentComponentTraining +GPU defined if GPU Jobs are enabledt. Default Value: `false` *** -### .spec.deployment.prediction.image - -Type: `string` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L35) - -Image define image details - -*** - -### .spec.deployment.prediction.imagePullPolicy - -Type: `string` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L39) - -ImagePullPolicy define Image pull policy - -Default Value: `IfNotPresent` - -*** - -### .spec.deployment.prediction.lifecycle - -Type: `core.Lifecycle` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/lifecycle.go#L35) - -Lifecycle keeps actions that the management system should take in response to container lifecycle events. - -*** - -### .spec.deployment.prediction.livenessProbe - -Type: `core.Probe` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/probes.go#L37) - -LivenessProbe keeps configuration of periodic probe of container liveness. -Container will be restarted if the probe fails. - -Links: -* [Kubernetes docs](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes) - -*** - -### .spec.deployment.prediction.port - -Type: `integer` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1alpha1/extension_spec_deployment_component.go#L34) - -Port defines on which port the container will be listening for connections - -*** +### .spec.deployment.hostIPC -### .spec.deployment.prediction.ports +Type: `boolean` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/pod/resources/namespace.go#L42) -Type: `[]core.ContainerPort` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/networking.go#L39) +HostIPC defines to use the host's ipc namespace. -Ports contains list of ports to expose from the container. Not specifying a port here -DOES NOT prevent that port from being exposed. Any port which is -listening on the default "0.0.0.0" address inside a container will be -accessible from the network. +Default Value: `false` *** -### .spec.deployment.prediction.readinessProbe +### .spec.deployment.hostNetwork -Type: `core.Probe` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/probes.go#L42) +Type: `boolean` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/pod/resources/namespace.go#L36) -ReadinessProbe keeps configuration of periodic probe of container service readiness. -Container will be removed from service endpoints if the probe fails. +HostNetwork requests Host network for this pod. Use the host's network namespace. +If this option is set, the ports that will be used must be specified. -Links: -* [Kubernetes docs](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes) +Default Value: `false` *** -### .spec.deployment.prediction.resources +### .spec.deployment.hostPID -Type: `core.ResourceRequirements` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/resources.go#L37) +Type: `boolean` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/pod/resources/namespace.go#L39) -Resources holds resource requests & limits for container +HostPID define to use the host's pid namespace. -Links: -* [Documentation of core.ResourceRequirements](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#resourcerequirements-v1-core) +Default Value: `false` *** -### .spec.deployment.prediction.securityContext - -Type: `core.SecurityContext` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/security.go#L35) +### .spec.deployment.image -SecurityContext holds container-level security attributes and common container settings. +Type: `string` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L35) -Links: -* [Kubernetes docs](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) +Image define image details *** -### .spec.deployment.prediction.startupProbe - -Type: `core.Probe` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/probes.go#L50) - -StartupProbe indicates that the Pod has successfully initialized. -If specified, no other probes are executed until this completes successfully. -If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. -This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, -when it might take a long time to load data or warm a cache, than during steady-state operation. - -Links: -* [Kubernetes docs](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes) - -*** +### .spec.deployment.imagePullPolicy -### .spec.deployment.prediction.volumeMounts +Type: `string` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L39) -Type: `[]core.VolumeMount` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/volume_mounts.go#L35) +ImagePullPolicy define Image pull policy -VolumeMounts keeps list of pod volumes to mount into the container's filesystem. +Default Value: `IfNotPresent` *** -### .spec.deployment.prediction.workingDir +### .spec.deployment.imagePullSecrets -Type: `string` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/core.go#L55) +Type: `array` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/pod/resources/image.go#L36) -Container's working directory. -If not specified, the container runtime's default will be used, which -might be configured in the container image. +ImagePullSecrets define Secrets used to pull Image from registry *** -### .spec.deployment.project.args +### .spec.deployment.labels -Type: `array` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/core.go#L50) +Type: `object` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/pod/resources/metadata.go#L39) -Arguments to the entrypoint. -The container image's CMD is used if this is not provided. -Variable references $(VAR_NAME) are expanded using the container's environment. If a variable -cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced -to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will -produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless -of whether the variable exists or not. Cannot be updated. +Map of string keys and values that can be used to organize and categorize +(scope and select) objects. May match selectors of replication controllers +and services. Links: -* [Kubernetes Docs](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell) +* [Kubernetes docs](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels) *** -### .spec.deployment.project.command - -Type: `array` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/core.go#L40) +### .spec.deployment.lifecycle -Entrypoint array. Not executed within a shell. -The container image's ENTRYPOINT is used if this is not provided. -Variable references $(VAR_NAME) are expanded using the container's environment. If a variable -cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced -to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will -produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless -of whether the variable exists or not. Cannot be updated. +Type: `core.Lifecycle` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/lifecycle.go#L35) -Links: -* [Kubernetes Docs](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell) +Lifecycle keeps actions that the management system should take in response to container lifecycle events. *** -### .spec.deployment.project.env +### .spec.deployment.livenessProbe -Type: `core.EnvVar` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/environments.go#L36) +Type: `core.Probe` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/probes.go#L37) -Env keeps the information about environment variables provided to the container +LivenessProbe keeps configuration of periodic probe of container liveness. +Container will be restarted if the probe fails. Links: -* [Kubernetes Docs](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#envvar-v1-core) +* [Kubernetes docs](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes) *** -### .spec.deployment.project.envFrom +### .spec.deployment.nodeSelector -Type: `core.EnvFromSource` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/environments.go#L41) +Type: `object` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/pod/resources/scheduling.go#L39) -EnvFrom keeps the information about environment variable sources provided to the container +NodeSelector is a selector that must be true for the workload to fit on a node. Links: -* [Kubernetes Docs](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#envfromsource-v1-core) - -*** - -### .spec.deployment.project.gpu - -Type: `boolean` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1alpha1/extension_spec_deployment_component.go#L31) - -GPU defined if GPU Jobs are enabled for component. In use only for ArangoMLExtensionSpecDeploymentComponentPrediction and ArangoMLExtensionSpecDeploymentComponentTraining - -Default Value: `false` - -*** - -### .spec.deployment.project.image - -Type: `string` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L35) - -Image define image details - -*** - -### .spec.deployment.project.imagePullPolicy - -Type: `string` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L39) - -ImagePullPolicy define Image pull policy - -Default Value: `IfNotPresent` +* [Kubernetes docs](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector) *** -### .spec.deployment.project.lifecycle +### .spec.deployment.ownerReferences -Type: `core.Lifecycle` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/lifecycle.go#L35) +Type: `meta.OwnerReference` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/pod/resources/metadata.go#L52) -Lifecycle keeps actions that the management system should take in response to container lifecycle events. +List of objects depended by this object. If ALL objects in the list have +been deleted, this object will be garbage collected. If this object is managed by a controller, +then an entry in this list will point to this controller, with the controller field set to true. +There cannot be more than one managing controller. *** -### .spec.deployment.project.livenessProbe +### .spec.deployment.podSecurityContext -Type: `core.Probe` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/probes.go#L37) +Type: `core.PodSecurityContext` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/pod/resources/security.go#L35) -LivenessProbe keeps configuration of periodic probe of container liveness. -Container will be restarted if the probe fails. +PodSecurityContext holds pod-level security attributes and common container settings. Links: -* [Kubernetes docs](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes) +* [Kubernetes docs](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) *** -### .spec.deployment.project.port +### .spec.deployment.port -Type: `integer` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1alpha1/extension_spec_deployment_component.go#L34) +Type: `integer` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1alpha1/extension_spec_deployment.go#L55) Port defines on which port the container will be listening for connections *** -### .spec.deployment.project.ports +### .spec.deployment.ports Type: `[]core.ContainerPort` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/networking.go#L39) @@ -438,7 +248,7 @@ accessible from the network. *** -### .spec.deployment.project.readinessProbe +### .spec.deployment.readinessProbe Type: `core.Probe` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/probes.go#L42) @@ -450,79 +260,46 @@ Links: *** -### .spec.deployment.project.resources - -Type: `core.ResourceRequirements` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/resources.go#L37) - -Resources holds resource requests & limits for container - -Links: -* [Documentation of core.ResourceRequirements](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#resourcerequirements-v1-core) - -*** - -### .spec.deployment.project.securityContext +### .spec.deployment.replicas -Type: `core.SecurityContext` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/security.go#L35) +Type: `integer` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1alpha1/extension_spec_deployment.go#L39) -SecurityContext holds container-level security attributes and common container settings. +Replicas defines the number of replicas running specified components. No replicas created if no components are defined. -Links: -* [Kubernetes docs](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) +Default Value: `1` *** -### .spec.deployment.project.startupProbe +### .spec.deployment.resources -Type: `core.Probe` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/probes.go#L50) +Type: `core.ResourceRequirements` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/resources.go#L37) -StartupProbe indicates that the Pod has successfully initialized. -If specified, no other probes are executed until this completes successfully. -If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. -This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, -when it might take a long time to load data or warm a cache, than during steady-state operation. +Resources holds resource requests & limits for container Links: -* [Kubernetes docs](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes) - -*** - -### .spec.deployment.project.volumeMounts - -Type: `[]core.VolumeMount` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/volume_mounts.go#L35) - -VolumeMounts keeps list of pod volumes to mount into the container's filesystem. - -*** - -### .spec.deployment.project.workingDir - -Type: `string` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/core.go#L55) - -Container's working directory. -If not specified, the container runtime's default will be used, which -might be configured in the container image. +* [Documentation of core.ResourceRequirements](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#resourcerequirements-v1-core) *** -### .spec.deployment.replicas +### .spec.deployment.schedulerName -Type: `integer` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1alpha1/extension_spec_deployment.go#L56) +Type: `string` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/pod/resources/scheduling.go#L54) -Replicas defines the number of replicas running specified components. No replicas created if no components are defined. +SchedulerName specifies, the pod will be dispatched by specified scheduler. +If not specified, the pod will be dispatched by default scheduler. -Default Value: `1` +Default Value: `""` *** -### .spec.deployment.schedulerName +### .spec.deployment.securityContext -Type: `string` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/pod/resources/scheduling.go#L54) +Type: `core.SecurityContext` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/security.go#L35) -SchedulerName specifies, the pod will be dispatched by specified scheduler. -If not specified, the pod will be dispatched by default scheduler. +SecurityContext holds container-level security attributes and common container settings. -Default Value: `""` +Links: +* [Kubernetes docs](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) *** @@ -567,198 +344,52 @@ Default Value: `false` *** -### .spec.deployment.tolerations - -Type: `[]core.Toleration` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/pod/resources/scheduling.go#L49) - -Tolerations defines tolerations - -Links: -* [Kubernetes docs](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) - -*** - -### .spec.deployment.training.args - -Type: `array` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/core.go#L50) - -Arguments to the entrypoint. -The container image's CMD is used if this is not provided. -Variable references $(VAR_NAME) are expanded using the container's environment. If a variable -cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced -to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will -produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless -of whether the variable exists or not. Cannot be updated. - -Links: -* [Kubernetes Docs](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell) - -*** - -### .spec.deployment.training.command - -Type: `array` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/core.go#L40) - -Entrypoint array. Not executed within a shell. -The container image's ENTRYPOINT is used if this is not provided. -Variable references $(VAR_NAME) are expanded using the container's environment. If a variable -cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced -to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will -produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless -of whether the variable exists or not. Cannot be updated. - -Links: -* [Kubernetes Docs](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell) - -*** - -### .spec.deployment.training.env - -Type: `core.EnvVar` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/environments.go#L36) - -Env keeps the information about environment variables provided to the container - -Links: -* [Kubernetes Docs](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#envvar-v1-core) - -*** - -### .spec.deployment.training.envFrom - -Type: `core.EnvFromSource` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/environments.go#L41) - -EnvFrom keeps the information about environment variable sources provided to the container - -Links: -* [Kubernetes Docs](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#envfromsource-v1-core) - -*** - -### .spec.deployment.training.gpu - -Type: `boolean` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1alpha1/extension_spec_deployment_component.go#L31) - -GPU defined if GPU Jobs are enabled for component. In use only for ArangoMLExtensionSpecDeploymentComponentPrediction and ArangoMLExtensionSpecDeploymentComponentTraining - -Default Value: `false` - -*** - -### .spec.deployment.training.image - -Type: `string` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L35) - -Image define image details - -*** - -### .spec.deployment.training.imagePullPolicy - -Type: `string` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/image.go#L39) - -ImagePullPolicy define Image pull policy - -Default Value: `IfNotPresent` - -*** - -### .spec.deployment.training.lifecycle - -Type: `core.Lifecycle` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/lifecycle.go#L35) - -Lifecycle keeps actions that the management system should take in response to container lifecycle events. - -*** - -### .spec.deployment.training.livenessProbe - -Type: `core.Probe` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/probes.go#L37) - -LivenessProbe keeps configuration of periodic probe of container liveness. -Container will be restarted if the probe fails. - -Links: -* [Kubernetes docs](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes) - -*** - -### .spec.deployment.training.port - -Type: `integer` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1alpha1/extension_spec_deployment_component.go#L34) - -Port defines on which port the container will be listening for connections - -*** - -### .spec.deployment.training.ports - -Type: `[]core.ContainerPort` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/networking.go#L39) - -Ports contains list of ports to expose from the container. Not specifying a port here -DOES NOT prevent that port from being exposed. Any port which is -listening on the default "0.0.0.0" address inside a container will be -accessible from the network. - -*** - -### .spec.deployment.training.readinessProbe +### .spec.deployment.startupProbe -Type: `core.Probe` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/probes.go#L42) +Type: `core.Probe` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/probes.go#L50) -ReadinessProbe keeps configuration of periodic probe of container service readiness. -Container will be removed from service endpoints if the probe fails. +StartupProbe indicates that the Pod has successfully initialized. +If specified, no other probes are executed until this completes successfully. +If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. +This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, +when it might take a long time to load data or warm a cache, than during steady-state operation. Links: * [Kubernetes docs](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes) *** -### .spec.deployment.training.resources +### .spec.deployment.tolerations -Type: `core.ResourceRequirements` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/resources.go#L37) +Type: `[]core.Toleration` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/pod/resources/scheduling.go#L49) -Resources holds resource requests & limits for container +Tolerations defines tolerations Links: -* [Documentation of core.ResourceRequirements](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#resourcerequirements-v1-core) +* [Kubernetes docs](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) *** -### .spec.deployment.training.securityContext +### .spec.deployment.volumeMounts -Type: `core.SecurityContext` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/security.go#L35) - -SecurityContext holds container-level security attributes and common container settings. +Type: `[]core.VolumeMount` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/volume_mounts.go#L35) -Links: -* [Kubernetes docs](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) +VolumeMounts keeps list of pod volumes to mount into the container's filesystem. *** -### .spec.deployment.training.startupProbe +### .spec.deployment.volumes -Type: `core.Probe` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/probes.go#L50) +Type: `[]core.Volume` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/pod/resources/volumes.go#L36) -StartupProbe indicates that the Pod has successfully initialized. -If specified, no other probes are executed until this completes successfully. -If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. -This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, -when it might take a long time to load data or warm a cache, than during steady-state operation. +Volumes keeps list of volumes that can be mounted by containers belonging to the pod. Links: -* [Kubernetes docs](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes) - -*** - -### .spec.deployment.training.volumeMounts - -Type: `[]core.VolumeMount` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/volume_mounts.go#L35) - -VolumeMounts keeps list of pod volumes to mount into the container's filesystem. +* [Kubernetes docs](https://kubernetes.io/docs/concepts/storage/volumes) *** -### .spec.deployment.training.workingDir +### .spec.deployment.workingDir Type: `string` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/container/resources/core.go#L55) @@ -768,17 +399,6 @@ might be configured in the container image. *** -### .spec.deployment.volumes - -Type: `[]core.Volume` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/pod/resources/volumes.go#L36) - -Volumes keeps list of volumes that can be mounted by containers belonging to the pod. - -Links: -* [Kubernetes docs](https://kubernetes.io/docs/concepts/storage/volumes) - -*** - ### .spec.init.affinity Type: `core.Affinity` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1alpha1/pod/resources/scheduling.go#L44) diff --git a/pkg/apis/ml/v1alpha1/extension_spec_deployment.go b/pkg/apis/ml/v1alpha1/extension_spec_deployment.go index fc6d7543f..b4d0ab018 100644 --- a/pkg/apis/ml/v1alpha1/extension_spec_deployment.go +++ b/pkg/apis/ml/v1alpha1/extension_spec_deployment.go @@ -21,35 +21,18 @@ package v1alpha1 import ( + schedulerContainerApi "github.com/arangodb/kube-arangodb/pkg/apis/scheduler/v1alpha1/container" schedulerPodApi "github.com/arangodb/kube-arangodb/pkg/apis/scheduler/v1alpha1/pod" shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" - "github.com/arangodb/kube-arangodb/pkg/util" "github.com/arangodb/kube-arangodb/pkg/util/errors" ) const ( - ArangoMLExtensionSpecDeploymentComponentPrediction = "prediction" - ArangoMLExtensionSpecDeploymentComponentTraining = "training" - ArangoMLExtensionSpecDeploymentComponentProject = "project" + ArangoMLExtensionSpecDeploymentApi = "api" - ArangoMLExtensionSpecDeploymentComponentPredictionDefaultPort = 8501 - ArangoMLExtensionSpecDeploymentComponentTrainingDefaultPort = 8502 - ArangoMLExtensionSpecDeploymentComponentProjectDefaultPort = 8503 + ArangoMLExtensionSpecDeploymentComponentDefaultPort = 8501 ) -func GetArangoMLExtensionSpecDeploymentComponentDefaultPort(component string) int32 { - switch component { - case ArangoMLExtensionSpecDeploymentComponentPrediction: - return ArangoMLExtensionSpecDeploymentComponentPredictionDefaultPort - case ArangoMLExtensionSpecDeploymentComponentTraining: - return ArangoMLExtensionSpecDeploymentComponentTrainingDefaultPort - case ArangoMLExtensionSpecDeploymentComponentProject: - return ArangoMLExtensionSpecDeploymentComponentProjectDefaultPort - } - - return 0 -} - type ArangoMLExtensionSpecDeployment struct { // Replicas defines the number of replicas running specified components. No replicas created if no components are defined. // +doc/default: 1 @@ -61,12 +44,15 @@ type ArangoMLExtensionSpecDeployment struct { // Pod defines base template for pods *schedulerPodApi.Pod - // Prediction defines how Prediction workload will be deployed - Prediction *ArangoMLExtensionSpecDeploymentComponent `json:"prediction,omitempty"` - // Training defines how Training workload will be deployed - Training *ArangoMLExtensionSpecDeploymentComponent `json:"training,omitempty"` - // Project defines how Project workload will be deployed - Project *ArangoMLExtensionSpecDeploymentComponent `json:"project,omitempty"` + // Container Keeps the information about Container configuration + *schedulerContainerApi.Container `json:",inline"` + + // GPU defined if GPU Jobs are enabledt. + // +doc/default: false + GPU *bool `json:"gpu,omitempty"` + + // Port defines on which port the container will be listening for connections + Port *int32 `json:"port,omitempty"` } func (s *ArangoMLExtensionSpecDeployment) GetReplicas() int32 { @@ -84,49 +70,26 @@ func (s *ArangoMLExtensionSpecDeployment) GetPodTemplate() *schedulerPodApi.Pod return s.Pod } -func (s *ArangoMLExtensionSpecDeployment) GetPrediction() *ArangoMLExtensionSpecDeploymentComponent { - if s == nil { - return nil - } - return s.Prediction -} - -func (s *ArangoMLExtensionSpecDeployment) GetTraining() *ArangoMLExtensionSpecDeploymentComponent { - if s == nil { - return nil +func (s *ArangoMLExtensionSpecDeployment) GetGPU() bool { + if s == nil || s.GPU == nil { + return false } - return s.Training + return *s.GPU } -func (s *ArangoMLExtensionSpecDeployment) GetProject() *ArangoMLExtensionSpecDeploymentComponent { - if s == nil { - return nil +func (s *ArangoMLExtensionSpecDeployment) GetPort(def int32) int32 { + if s == nil || s.Port == nil { + return def } - return s.Project + return *s.Port } -func (s *ArangoMLExtensionSpecDeployment) GetComponents() map[string]*ArangoMLExtensionSpecDeploymentComponent { - if s == nil { +func (s *ArangoMLExtensionSpecDeployment) GetContainer() *schedulerContainerApi.Container { + if s == nil || s.Container == nil { return nil } - return map[string]*ArangoMLExtensionSpecDeploymentComponent{ - ArangoMLExtensionSpecDeploymentComponentPrediction: s.GetPrediction(), - ArangoMLExtensionSpecDeploymentComponentTraining: s.GetTraining(), - ArangoMLExtensionSpecDeploymentComponentProject: s.GetProject(), - } -} - -func (s *ArangoMLExtensionSpecDeployment) HasComponents() bool { - if s == nil || len(s.GetComponents()) == 0 { - return false - } - for _, c := range s.GetComponents() { - if c != nil { - return true - } - } - return false + return s.Container } func (s *ArangoMLExtensionSpecDeployment) GetService() *ArangoMLExtensionSpecDeploymentService { @@ -144,36 +107,11 @@ func (s *ArangoMLExtensionSpecDeployment) Validate() error { errs := []error{ shared.PrefixResourceErrors("service", shared.ValidateOptional(s.GetService(), func(s ArangoMLExtensionSpecDeploymentService) error { return s.Validate() })), s.GetPodTemplate().Validate(), + s.GetContainer().Validate(), } if s.GetReplicas() < 0 || s.GetReplicas() > 10 { errs = append(errs, shared.PrefixResourceErrors("replicas", errors.Errorf("out of range [0, 10]"))) } - - var usedPorts util.List[int32] - for prefix, component := range s.GetComponents() { - err := component.Validate() - if err != nil { - errs = append(errs, shared.PrefixResourceErrors(prefix, err)) - continue - } - if err == nil { - port := component.GetPort(GetArangoMLExtensionSpecDeploymentComponentDefaultPort(prefix)) - - if port == 0 { - errs = append(errs, shared.PrefixResourceErrors(prefix, errors.Errorf("port not defined"))) - continue - } - - duplicateCount := usedPorts.Count(func(i int32) bool { - return i == port - }) - if duplicateCount > 0 { - errs = append(errs, shared.PrefixResourceErrors(prefix, errors.Errorf("port %d already specified for other component", port))) - } else { - usedPorts.Append(port) - } - } - } return shared.WithErrors(errs...) } diff --git a/pkg/apis/ml/v1alpha1/extension_spec_deployment_component.go b/pkg/apis/ml/v1alpha1/extension_spec_deployment_component.go deleted file mode 100644 index 3ab230967..000000000 --- a/pkg/apis/ml/v1alpha1/extension_spec_deployment_component.go +++ /dev/null @@ -1,74 +0,0 @@ -// -// DISCLAIMER -// -// Copyright 2023-2024 ArangoDB GmbH, Cologne, Germany -// -// 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 -// -// 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. -// -// Copyright holder is ArangoDB GmbH, Cologne, Germany -// - -package v1alpha1 - -import ( - schedulerContainerApi "github.com/arangodb/kube-arangodb/pkg/apis/scheduler/v1alpha1/container" - shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" -) - -type ArangoMLExtensionSpecDeploymentComponent struct { - // GPU defined if GPU Jobs are enabled for component. In use only for ArangoMLExtensionSpecDeploymentComponentPrediction and ArangoMLExtensionSpecDeploymentComponentTraining - // +doc/default: false - GPU *bool `json:"gpu,omitempty"` - - // Port defines on which port the container will be listening for connections - Port *int32 `json:"port,omitempty"` - - // Container Keeps the information about Container configuration - *schedulerContainerApi.Container `json:",inline"` -} - -func (s *ArangoMLExtensionSpecDeploymentComponent) GetGPU() bool { - if s == nil || s.GPU == nil { - return false - } - return *s.GPU -} - -func (s *ArangoMLExtensionSpecDeploymentComponent) GetPort(def int32) int32 { - if s == nil || s.Port == nil { - return def - } - return *s.Port -} - -func (s *ArangoMLExtensionSpecDeploymentComponent) GetContainer() *schedulerContainerApi.Container { - if s == nil || s.Container == nil { - return nil - } - - return s.Container -} - -func (s *ArangoMLExtensionSpecDeploymentComponent) Validate() error { - if s == nil { - return nil - } - - var err []error - - err = append(err, - s.GetContainer().Validate(), - ) - - return shared.WithErrors(err...) -} diff --git a/pkg/apis/ml/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/ml/v1alpha1/zz_generated.deepcopy.go index ef431a0ce..a81c36825 100644 --- a/pkg/apis/ml/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/ml/v1alpha1/zz_generated.deepcopy.go @@ -385,37 +385,11 @@ func (in *ArangoMLExtensionSpecDeployment) DeepCopyInto(out *ArangoMLExtensionSp *out = new(pod.Pod) (*in).DeepCopyInto(*out) } - if in.Prediction != nil { - in, out := &in.Prediction, &out.Prediction - *out = new(ArangoMLExtensionSpecDeploymentComponent) - (*in).DeepCopyInto(*out) - } - if in.Training != nil { - in, out := &in.Training, &out.Training - *out = new(ArangoMLExtensionSpecDeploymentComponent) - (*in).DeepCopyInto(*out) - } - if in.Project != nil { - in, out := &in.Project, &out.Project - *out = new(ArangoMLExtensionSpecDeploymentComponent) + if in.Container != nil { + in, out := &in.Container, &out.Container + *out = new(container.Container) (*in).DeepCopyInto(*out) } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArangoMLExtensionSpecDeployment. -func (in *ArangoMLExtensionSpecDeployment) DeepCopy() *ArangoMLExtensionSpecDeployment { - if in == nil { - return nil - } - out := new(ArangoMLExtensionSpecDeployment) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ArangoMLExtensionSpecDeploymentComponent) DeepCopyInto(out *ArangoMLExtensionSpecDeploymentComponent) { - *out = *in if in.GPU != nil { in, out := &in.GPU, &out.GPU *out = new(bool) @@ -426,20 +400,15 @@ func (in *ArangoMLExtensionSpecDeploymentComponent) DeepCopyInto(out *ArangoMLEx *out = new(int32) **out = **in } - if in.Container != nil { - in, out := &in.Container, &out.Container - *out = new(container.Container) - (*in).DeepCopyInto(*out) - } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArangoMLExtensionSpecDeploymentComponent. -func (in *ArangoMLExtensionSpecDeploymentComponent) DeepCopy() *ArangoMLExtensionSpecDeploymentComponent { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArangoMLExtensionSpecDeployment. +func (in *ArangoMLExtensionSpecDeployment) DeepCopy() *ArangoMLExtensionSpecDeployment { if in == nil { return nil } - out := new(ArangoMLExtensionSpecDeploymentComponent) + out := new(ArangoMLExtensionSpecDeployment) in.DeepCopyInto(out) return out } diff --git a/pkg/crd/crds/ml-extension.schema.generated.yaml b/pkg/crd/crds/ml-extension.schema.generated.yaml index 35ea28a4a..0522ce087 100644 --- a/pkg/crd/crds/ml-extension.schema.generated.yaml +++ b/pkg/crd/crds/ml-extension.schema.generated.yaml @@ -341,14 +341,96 @@ v1alpha1: additionalProperties: type: string type: object + args: + items: + type: string + type: array automountServiceAccountToken: type: boolean + command: + items: + type: string + type: array + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + type: object + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + type: object + resourceFieldRef: + properties: + containerName: + type: string + divisor: + type: string + resource: + type: string + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + type: object + type: object + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + type: object + type: array + gpu: + description: GPU defined if GPU Jobs are enabledt. + type: boolean hostIPC: type: boolean hostNetwork: type: boolean hostPID: type: boolean + image: + type: string + imagePullPolicy: + type: string imagePullSecrets: items: type: string @@ -357,6 +439,164 @@ v1alpha1: additionalProperties: type: string type: object + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + path: + type: string + port: + format: int-or-string + type: string + scheme: + type: string + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + type: object + tcpSocket: + properties: + host: + type: string + port: + format: int-or-string + type: string + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + path: + type: string + port: + format: int-or-string + type: string + scheme: + type: string + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + type: object + tcpSocket: + properties: + host: + type: string + port: + format: int-or-string + type: string + type: object + type: object + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + path: + type: string + port: + format: int-or-string + type: string + scheme: + type: string + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + format: int-or-string + type: string + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object nodeSelector: additionalProperties: type: string @@ -437,1517 +677,289 @@ v1alpha1: type: string type: object type: object - prediction: - description: Prediction defines how Prediction workload will be deployed - properties: - args: - items: + port: + description: Port defines on which port the container will be listening for connections + format: int32 + type: integer + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: type: string - type: array - command: - items: + hostPort: + format: int32 + type: integer + name: type: string - type: array - env: - items: - properties: - name: - type: string - value: + protocol: + type: string + type: object + type: array + readinessProbe: + properties: + exec: + properties: + command: + items: type: string - valueFrom: - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - type: string - resource: - type: string - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - type: object - type: object - type: object - type: array - envFrom: - items: - properties: - configMapRef: + type: array + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + type: string + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: properties: name: type: string - optional: - type: boolean - type: object - prefix: - type: string - secretRef: - properties: - name: + value: type: string - optional: - type: boolean type: object - type: object - type: array - gpu: - description: GPU defined if GPU Jobs are enabled for component. In use only for ArangoMLExtensionSpecDeploymentComponentPrediction and ArangoMLExtensionSpecDeploymentComponentTraining - type: boolean - image: - type: string - imagePullPolicy: - type: string - lifecycle: - properties: - postStart: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - type: object - type: array - path: - type: string - port: - format: int-or-string - type: string - scheme: - type: string - type: object - sleep: - properties: - seconds: - format: int64 - type: integer - type: object - tcpSocket: - properties: - host: - type: string - port: - format: int-or-string - type: string - type: object - type: object - preStop: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - type: object - type: array - path: - type: string - port: - format: int-or-string - type: string - scheme: - type: string - type: object - sleep: - properties: - seconds: - format: int64 - type: integer - type: object - tcpSocket: - properties: - host: - type: string - port: - format: int-or-string - type: string - type: object - type: object + type: array + path: + type: string + port: + format: int-or-string + type: string + scheme: + type: string type: object - livenessProbe: + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - type: object - type: array - path: - type: string - port: - format: int-or-string - type: string - scheme: - type: string - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - format: int-or-string - type: string - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer + host: + type: string + port: + format: int-or-string + type: string type: object - port: - description: Port defines on which port the container will be listening for connections + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: format: int32 type: integer - ports: + type: object + replicas: + description: Replicas defines the number of replicas running specified components. No replicas created if no components are defined. + format: int32 + type: integer + resources: + properties: + claims: items: properties: - containerPort: - format: int32 - type: integer - hostIP: - type: string - hostPort: - format: int32 - type: integer name: type: string - protocol: - type: string type: object type: array - readinessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - type: object - type: array - path: - type: string - port: - format: int-or-string - type: string - scheme: - type: string - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - format: int-or-string - type: string - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer + limits: + additionalProperties: + type: string + type: object + requests: + additionalProperties: + type: string type: object - resources: + type: object + schedulerName: + type: string + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: properties: - claims: + add: items: - properties: - name: - type: string - type: object - type: array - limits: - additionalProperties: type: string - type: object - requests: - additionalProperties: + type: array + drop: + items: type: string - type: object + type: array type: object - securityContext: + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: + level: + type: string + role: + type: string + type: + type: string + user: type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object type: object - startupProbe: + seccompProfile: properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - type: object - type: array - path: - type: string - port: - format: int-or-string - type: string - scheme: - type: string - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - format: int-or-string - type: string - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer + localhostProfile: + type: string + type: + type: string + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string type: object - volumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - type: object - type: array - workingDir: - type: string type: object - project: - description: Project defines how Project workload will be deployed - properties: - args: - items: - type: string - type: array - command: - items: - type: string - type: array - env: - items: - properties: - name: - type: string - value: - type: string - valueFrom: - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - type: string - resource: - type: string - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - type: object - type: object - type: object - type: array - envFrom: - items: - properties: - configMapRef: - properties: - name: - type: string - optional: - type: boolean - type: object - prefix: - type: string - secretRef: - properties: - name: - type: string - optional: - type: boolean - type: object - type: object - type: array - gpu: - description: GPU defined if GPU Jobs are enabled for component. In use only for ArangoMLExtensionSpecDeploymentComponentPrediction and ArangoMLExtensionSpecDeploymentComponentTraining - type: boolean - image: - type: string - imagePullPolicy: - type: string - lifecycle: - properties: - postStart: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - type: object - type: array - path: - type: string - port: - format: int-or-string - type: string - scheme: - type: string - type: object - sleep: - properties: - seconds: - format: int64 - type: integer - type: object - tcpSocket: - properties: - host: - type: string - port: - format: int-or-string - type: string - type: object - type: object - preStop: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - type: object - type: array - path: - type: string - port: - format: int-or-string - type: string - scheme: - type: string - type: object - sleep: - properties: - seconds: - format: int64 - type: integer - type: object - tcpSocket: - properties: - host: - type: string - port: - format: int-or-string - type: string - type: object - type: object - type: object - livenessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - type: object - type: array - path: - type: string - port: - format: int-or-string - type: string - scheme: - type: string - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - format: int-or-string - type: string - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - port: - description: Port defines on which port the container will be listening for connections - format: int32 - type: integer - ports: - items: - properties: - containerPort: - format: int32 - type: integer - hostIP: - type: string - hostPort: - format: int32 - type: integer - name: - type: string - protocol: - type: string - type: object - type: array - readinessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - type: object - type: array - path: - type: string - port: - format: int-or-string - type: string - scheme: - type: string - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - format: int-or-string - type: string - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - resources: - properties: - claims: - items: - properties: - name: - type: string - type: object - type: array - limits: - additionalProperties: - type: string - type: object - requests: - additionalProperties: - type: string - type: object - type: object - securityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: - type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object - type: object - startupProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - type: object - type: array - path: - type: string - port: - format: int-or-string - type: string - scheme: - type: string - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - format: int-or-string - type: string - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer - type: object - volumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - type: object - type: array - workingDir: - type: string - type: object - replicas: - description: Replicas defines the number of replicas running specified components. No replicas created if no components are defined. - format: int32 - type: integer - schedulerName: - type: string - service: - description: Service defines how components will be exposed + service: + description: Service defines how components will be exposed properties: type: description: Type determines how the Service is exposed enum: - ClusterIP - NodePort - - LoadBalancer - - ExternalName - type: string - type: object - serviceAccountName: - type: string - shareProcessNamespace: - type: boolean - tolerations: - items: - properties: - effect: - type: string - key: - type: string - operator: - type: string - tolerationSeconds: - format: int64 - type: integer - value: - type: string - type: object - type: array - training: - description: Training defines how Training workload will be deployed - properties: - args: - items: - type: string - type: array - command: - items: - type: string - type: array - env: - items: - properties: - name: - type: string - value: - type: string - valueFrom: - properties: - configMapKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - type: object - fieldRef: - properties: - apiVersion: - type: string - fieldPath: - type: string - type: object - resourceFieldRef: - properties: - containerName: - type: string - divisor: - type: string - resource: - type: string - type: object - secretKeyRef: - properties: - key: - type: string - name: - type: string - optional: - type: boolean - type: object - type: object - type: object - type: array - envFrom: - items: - properties: - configMapRef: - properties: - name: - type: string - optional: - type: boolean - type: object - prefix: - type: string - secretRef: - properties: - name: - type: string - optional: - type: boolean - type: object - type: object - type: array - gpu: - description: GPU defined if GPU Jobs are enabled for component. In use only for ArangoMLExtensionSpecDeploymentComponentPrediction and ArangoMLExtensionSpecDeploymentComponentTraining - type: boolean - image: - type: string - imagePullPolicy: - type: string - lifecycle: - properties: - postStart: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - type: object - type: array - path: - type: string - port: - format: int-or-string - type: string - scheme: - type: string - type: object - sleep: - properties: - seconds: - format: int64 - type: integer - type: object - tcpSocket: - properties: - host: - type: string - port: - format: int-or-string - type: string - type: object - type: object - preStop: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - type: object - type: array - path: - type: string - port: - format: int-or-string - type: string - scheme: - type: string - type: object - sleep: - properties: - seconds: - format: int64 - type: integer - type: object - tcpSocket: - properties: - host: - type: string - port: - format: int-or-string - type: string - type: object - type: object - type: object - livenessProbe: - properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - type: object - type: array - path: - type: string - port: - format: int-or-string - type: string - scheme: - type: string - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - format: int-or-string - type: string - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer + - LoadBalancer + - ExternalName + type: string + type: object + serviceAccountName: + type: string + shareProcessNamespace: + type: boolean + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array type: object - port: - description: Port defines on which port the container will be listening for connections + failureThreshold: format: int32 type: integer - ports: - items: - properties: - containerPort: - format: int32 - type: integer - hostIP: - type: string - hostPort: - format: int32 - type: integer - name: - type: string - protocol: - type: string - type: object - type: array - readinessProbe: + grpc: properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - type: object - type: array - path: - type: string - port: - format: int-or-string - type: string - scheme: - type: string - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - format: int-or-string - type: string - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: + port: format: int32 type: integer + service: + type: string type: object - resources: + httpGet: properties: - claims: + host: + type: string + httpHeaders: items: properties: name: type: string + value: + type: string type: object type: array - limits: - additionalProperties: - type: string - type: object - requests: - additionalProperties: - type: string - type: object - type: object - securityContext: - properties: - allowPrivilegeEscalation: - type: boolean - capabilities: - properties: - add: - items: - type: string - type: array - drop: - items: - type: string - type: array - type: object - privileged: - type: boolean - procMount: + path: + type: string + port: + format: int-or-string + type: string + scheme: type: string - readOnlyRootFilesystem: - type: boolean - runAsGroup: - format: int64 - type: integer - runAsNonRoot: - type: boolean - runAsUser: - format: int64 - type: integer - seLinuxOptions: - properties: - level: - type: string - role: - type: string - type: - type: string - user: - type: string - type: object - seccompProfile: - properties: - localhostProfile: - type: string - type: - type: string - type: object - windowsOptions: - properties: - gmsaCredentialSpec: - type: string - gmsaCredentialSpecName: - type: string - hostProcess: - type: boolean - runAsUserName: - type: string - type: object type: object - startupProbe: + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: properties: - exec: - properties: - command: - items: - type: string - type: array - type: object - failureThreshold: - format: int32 - type: integer - grpc: - properties: - port: - format: int32 - type: integer - service: - type: string - type: object - httpGet: - properties: - host: - type: string - httpHeaders: - items: - properties: - name: - type: string - value: - type: string - type: object - type: array - path: - type: string - port: - format: int-or-string - type: string - scheme: - type: string - type: object - initialDelaySeconds: - format: int32 - type: integer - periodSeconds: - format: int32 - type: integer - successThreshold: - format: int32 - type: integer - tcpSocket: - properties: - host: - type: string - port: - format: int-or-string - type: string - type: object - terminationGracePeriodSeconds: - format: int64 - type: integer - timeoutSeconds: - format: int32 - type: integer + host: + type: string + port: + format: int-or-string + type: string type: object - volumeMounts: - items: - properties: - mountPath: - type: string - mountPropagation: - type: string - name: - type: string - readOnly: - type: boolean - subPath: - type: string - subPathExpr: - type: string - type: object - type: array - workingDir: - type: string + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer type: object + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + subPath: + type: string + subPathExpr: + type: string + type: object + type: array volumes: items: properties: @@ -2628,6 +1640,8 @@ v1alpha1: type: object type: object type: array + workingDir: + type: string type: object init: description: ArangoMLExtensionTemplate define Init job specification From 310eb7073ea556a6902b884c709f153cf2c72595 Mon Sep 17 00:00:00 2001 From: ajanikow <12255597+ajanikow@users.noreply.github.com> Date: Thu, 25 Apr 2024 10:28:02 +0000 Subject: [PATCH 2/5] Change Default Port --- pkg/apis/ml/v1alpha1/extension_spec_deployment.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/apis/ml/v1alpha1/extension_spec_deployment.go b/pkg/apis/ml/v1alpha1/extension_spec_deployment.go index b4d0ab018..53aaee7d8 100644 --- a/pkg/apis/ml/v1alpha1/extension_spec_deployment.go +++ b/pkg/apis/ml/v1alpha1/extension_spec_deployment.go @@ -30,7 +30,7 @@ import ( const ( ArangoMLExtensionSpecDeploymentApi = "api" - ArangoMLExtensionSpecDeploymentComponentDefaultPort = 8501 + ArangoMLExtensionSpecDeploymentComponentDefaultPort = 8502 ) type ArangoMLExtensionSpecDeployment struct { From 8d71cf4a371cbe81a7fb9ef67412ec9025aa0f66 Mon Sep 17 00:00:00 2001 From: ajanikow <12255597+ajanikow@users.noreply.github.com> Date: Thu, 25 Apr 2024 16:42:35 +0000 Subject: [PATCH 3/5] Add GPU Enabled flags --- docs/api/ArangoMLExtension.V1Alpha1.md | 2 +- pkg/apis/ml/v1alpha1/extension_spec_deployment.go | 2 +- pkg/apis/ml/v1alpha1/extension_spec_job.go | 8 ++++++++ pkg/crd/crds/ml-extension.schema.generated.yaml | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/api/ArangoMLExtension.V1Alpha1.md b/docs/api/ArangoMLExtension.V1Alpha1.md index 634d6b3e4..30f03fe90 100644 --- a/docs/api/ArangoMLExtension.V1Alpha1.md +++ b/docs/api/ArangoMLExtension.V1Alpha1.md @@ -100,7 +100,7 @@ Links: Type: `boolean` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1alpha1/extension_spec_deployment.go#L52) -GPU defined if GPU Jobs are enabledt. +GPU defined if GPU Jobs are enabled. Default Value: `false` diff --git a/pkg/apis/ml/v1alpha1/extension_spec_deployment.go b/pkg/apis/ml/v1alpha1/extension_spec_deployment.go index 53aaee7d8..bf632ec68 100644 --- a/pkg/apis/ml/v1alpha1/extension_spec_deployment.go +++ b/pkg/apis/ml/v1alpha1/extension_spec_deployment.go @@ -47,7 +47,7 @@ type ArangoMLExtensionSpecDeployment struct { // Container Keeps the information about Container configuration *schedulerContainerApi.Container `json:",inline"` - // GPU defined if GPU Jobs are enabledt. + // GPU defined if GPU Jobs are enabled. // +doc/default: false GPU *bool `json:"gpu,omitempty"` diff --git a/pkg/apis/ml/v1alpha1/extension_spec_job.go b/pkg/apis/ml/v1alpha1/extension_spec_job.go index b281e4a4b..8f13c3eae 100644 --- a/pkg/apis/ml/v1alpha1/extension_spec_job.go +++ b/pkg/apis/ml/v1alpha1/extension_spec_job.go @@ -36,6 +36,14 @@ const ( MLJobFeaturizationType JobType = "featurization" ) +func MLJobTypes() []JobType { + return []JobType{ + MLJobTrainingType, + MLJobPredictionType, + MLJobFeaturizationType, + } +} + type ArangoMLJobsTemplates struct { // Prediction defines template for the prediction job Prediction *ArangoMLJobTemplates `json:"prediction,omitempty"` diff --git a/pkg/crd/crds/ml-extension.schema.generated.yaml b/pkg/crd/crds/ml-extension.schema.generated.yaml index 0522ce087..2d34e220b 100644 --- a/pkg/crd/crds/ml-extension.schema.generated.yaml +++ b/pkg/crd/crds/ml-extension.schema.generated.yaml @@ -419,7 +419,7 @@ v1alpha1: type: object type: array gpu: - description: GPU defined if GPU Jobs are enabledt. + description: GPU defined if GPU Jobs are enabled. type: boolean hostIPC: type: boolean From 1f98069cf42cc75d3cfc44520689a6729d9d8ecf Mon Sep 17 00:00:00 2001 From: ajanikow <12255597+ajanikow@users.noreply.github.com> Date: Mon, 29 Apr 2024 14:40:12 +0000 Subject: [PATCH 4/5] Remove secret refs --- docs/api/ArangoMLExtension.V1Alpha1.md | 68 +------------------ .../v1alpha1/extension_status_arangodb_ref.go | 2 - .../extension_status_metadata_service.go | 3 - pkg/apis/ml/v1alpha1/zz_generated.deepcopy.go | 10 --- 4 files changed, 2 insertions(+), 81 deletions(-) diff --git a/docs/api/ArangoMLExtension.V1Alpha1.md b/docs/api/ArangoMLExtension.V1Alpha1.md index 30f03fe90..2cd5071d4 100644 --- a/docs/api/ArangoMLExtension.V1Alpha1.md +++ b/docs/api/ArangoMLExtension.V1Alpha1.md @@ -2873,38 +2873,6 @@ UID keeps the information about object UID ## Status -### .status.arangoDB.jwtTokenSecret.checksum - -Type: `string` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L61) - -UID keeps the information about object Checksum - -*** - -### .status.arangoDB.jwtTokenSecret.name - -Type: `string` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L52) - -Name of the object - -*** - -### .status.arangoDB.jwtTokenSecret.namespace - -Type: `string` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L55) - -Namespace of the object. Should default to the namespace of the parent object - -*** - -### .status.arangoDB.jwtTokenSecret.uid - -Type: `string` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L58) - -UID keeps the information about object UID - -*** - ### .status.arangoDB.secret.checksum Type: `string` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L61) @@ -2945,41 +2913,9 @@ Conditions specific to the entire extension *** -### .status.metadataService.jwtTokenSecret.checksum - -Type: `string` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L61) - -UID keeps the information about object Checksum - -*** - -### .status.metadataService.jwtTokenSecret.name - -Type: `string` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L52) - -Name of the object - -*** - -### .status.metadataService.jwtTokenSecret.namespace - -Type: `string` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L55) - -Namespace of the object. Should default to the namespace of the parent object - -*** - -### .status.metadataService.jwtTokenSecret.uid - -Type: `string` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L58) - -UID keeps the information about object UID - -*** - ### .status.metadataService.local.arangoMLFeatureStore -Type: `string` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1alpha1/extension_status_metadata_service.go#L41) +Type: `string` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1alpha1/extension_status_metadata_service.go#L38) ArangoMLFeatureStoreDatabase define Database name to be used as MetadataService Backend @@ -2987,7 +2923,7 @@ ArangoMLFeatureStoreDatabase define Database name to be used as MetadataService ### .status.metadataService.local.arangoPipe -Type: `string` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1alpha1/extension_status_metadata_service.go#L38) +Type: `string` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1alpha1/extension_status_metadata_service.go#L35) ArangoPipeDatabase define Database name to be used as MetadataService Backend diff --git a/pkg/apis/ml/v1alpha1/extension_status_arangodb_ref.go b/pkg/apis/ml/v1alpha1/extension_status_arangodb_ref.go index 9ce7b78b9..f7f4f5e09 100644 --- a/pkg/apis/ml/v1alpha1/extension_status_arangodb_ref.go +++ b/pkg/apis/ml/v1alpha1/extension_status_arangodb_ref.go @@ -25,6 +25,4 @@ import sharedApi "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" type ArangoMLExtensionStatusArangoDBRef struct { // Secret keeps the information about ArangoDB deployment Secret *sharedApi.Object `json:"secret,omitempty"` - // JWTTokenSecret keeps the JWT for ArangoDB authentication (only when ArangoDeployment has JWT enabled) - JWTTokenSecret *sharedApi.Object `json:"jwtTokenSecret,omitempty"` } diff --git a/pkg/apis/ml/v1alpha1/extension_status_metadata_service.go b/pkg/apis/ml/v1alpha1/extension_status_metadata_service.go index f75116c85..89c664cb6 100644 --- a/pkg/apis/ml/v1alpha1/extension_status_metadata_service.go +++ b/pkg/apis/ml/v1alpha1/extension_status_metadata_service.go @@ -28,9 +28,6 @@ type ArangoMLExtensionStatusMetadataService struct { // Secret define the Secret specification to store all the details Secret *sharedApi.Object `json:"secret,omitempty"` - - // JWTTokenSecret keeps the JWT for ArangoDB authentication (only when ArangoDeployment has JWT enabled) - JWTTokenSecret *sharedApi.Object `json:"jwtTokenSecret,omitempty"` } type ArangoMLExtensionStatusMetadataServiceLocal struct { diff --git a/pkg/apis/ml/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/ml/v1alpha1/zz_generated.deepcopy.go index a81c36825..62206655c 100644 --- a/pkg/apis/ml/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/ml/v1alpha1/zz_generated.deepcopy.go @@ -532,11 +532,6 @@ func (in *ArangoMLExtensionStatusArangoDBRef) DeepCopyInto(out *ArangoMLExtensio *out = new(sharedv1.Object) (*in).DeepCopyInto(*out) } - if in.JWTTokenSecret != nil { - in, out := &in.JWTTokenSecret, &out.JWTTokenSecret - *out = new(sharedv1.Object) - (*in).DeepCopyInto(*out) - } return } @@ -563,11 +558,6 @@ func (in *ArangoMLExtensionStatusMetadataService) DeepCopyInto(out *ArangoMLExte *out = new(sharedv1.Object) (*in).DeepCopyInto(*out) } - if in.JWTTokenSecret != nil { - in, out := &in.JWTTokenSecret, &out.JWTTokenSecret - *out = new(sharedv1.Object) - (*in).DeepCopyInto(*out) - } return } From 13939148a33c732c3f1ae2e65d8c4af9479a02b1 Mon Sep 17 00:00:00 2001 From: ajanikow <12255597+ajanikow@users.noreply.github.com> Date: Tue, 30 Apr 2024 07:18:05 +0000 Subject: [PATCH 5/5] Linter --- pkg/apis/ml/v1alpha1/extension_status_arangodb_ref.go | 2 +- pkg/apis/ml/v1alpha1/extension_status_metadata_service.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/apis/ml/v1alpha1/extension_status_arangodb_ref.go b/pkg/apis/ml/v1alpha1/extension_status_arangodb_ref.go index f7f4f5e09..7e6c5ab95 100644 --- a/pkg/apis/ml/v1alpha1/extension_status_arangodb_ref.go +++ b/pkg/apis/ml/v1alpha1/extension_status_arangodb_ref.go @@ -1,7 +1,7 @@ // // DISCLAIMER // -// Copyright 2023 ArangoDB GmbH, Cologne, Germany +// Copyright 2023-2024 ArangoDB GmbH, Cologne, Germany // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/apis/ml/v1alpha1/extension_status_metadata_service.go b/pkg/apis/ml/v1alpha1/extension_status_metadata_service.go index 89c664cb6..fa28ce404 100644 --- a/pkg/apis/ml/v1alpha1/extension_status_metadata_service.go +++ b/pkg/apis/ml/v1alpha1/extension_status_metadata_service.go @@ -1,7 +1,7 @@ // // DISCLAIMER // -// Copyright 2023 ArangoDB GmbH, Cologne, Germany +// Copyright 2023-2024 ArangoDB GmbH, Cologne, Germany // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License.