From 34acb21f7b1758f7c473a3c693f67f3521ddc122 Mon Sep 17 00:00:00 2001 From: Adam Janikowski <12255597+ajanikow@users.noreply.github.com> Date: Fri, 10 May 2024 11:04:58 +0200 Subject: [PATCH] [Feature] [ML] Unify Integration Sidecar (#1663) --- CHANGELOG.md | 1 + docs/api/ArangoMLExtension.V1Beta1.md | 192 +++++++ docs/api/ArangoMLStorage.V1Beta1.md | 192 ------- docs/api/GraphAnalyticsEngine.V1Alpha1.md | 194 ++++++- internal/docs_test.go | 5 + pkg/apis/analytics/v1alpha1/gae_spec.go | 12 + .../v1alpha1/zz_generated.deepcopy.go | 6 + pkg/apis/ml/v1beta1/extension_spec.go | 12 + pkg/apis/ml/v1beta1/storage_spec_mode.go | 21 +- .../ml/v1beta1/storage_spec_mode_sidecar.go | 58 --- pkg/apis/ml/v1beta1/storage_spec_test.go | 38 -- pkg/apis/ml/v1beta1/zz_generated.deepcopy.go | 23 +- pkg/apis/scheduler/v1beta1/integration.go | 82 +++ .../v1beta1/zz_generated.deepcopy.go | 31 ++ ...graphanalyticsengine.schema.generated.yaml | 490 ++++++++++++++++++ .../crds/ml-extension.schema.generated.yaml | 489 +++++++++++++++++ pkg/crd/crds/ml-storage.schema.generated.yaml | 487 ----------------- pkg/util/refs.go | 4 +- 18 files changed, 1541 insertions(+), 796 deletions(-) create mode 100644 pkg/apis/scheduler/v1beta1/integration.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b9860f11..7c2807876 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - (Maintenance) Update Go to 1.22.3 - (Feature) (Analytics) GAE Integration - (Feature) (Analytics) Enable TLS and Service +- (Feature) (ML) Unify Integration Sidecar ## [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.V1Beta1.md b/docs/api/ArangoMLExtension.V1Beta1.md index 644045321..472bcb6bb 100644 --- a/docs/api/ArangoMLExtension.V1Beta1.md +++ b/docs/api/ArangoMLExtension.V1Beta1.md @@ -762,6 +762,198 @@ might be configured in the container image. *** +### .spec.integrationSidecar.args + +Type: `array` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/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.integrationSidecar.command + +Type: `array` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/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.integrationSidecar.controllerListenPort + +Type: `integer` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/integration.go#L36) + +ControllerListenPort defines on which port the sidecar container will be listening for controller requests + +Default Value: `9202` + +*** + +### .spec.integrationSidecar.env + +Type: `core.EnvVar` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/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.integrationSidecar.envFrom + +Type: `core.EnvFromSource` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/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.integrationSidecar.image + +Type: `string` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/container/resources/image.go#L35) + +Image define image details + +*** + +### .spec.integrationSidecar.imagePullPolicy + +Type: `string` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/container/resources/image.go#L39) + +ImagePullPolicy define Image pull policy + +Default Value: `IfNotPresent` + +*** + +### .spec.integrationSidecar.lifecycle + +Type: `core.Lifecycle` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/container/resources/lifecycle.go#L35) + +Lifecycle keeps actions that the management system should take in response to container lifecycle events. + +*** + +### .spec.integrationSidecar.listenPort + +Type: `integer` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/integration.go#L32) + +ListenPort defines on which port the sidecar container will be listening for connections + +Default Value: `9201` + +*** + +### .spec.integrationSidecar.livenessProbe + +Type: `core.Probe` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/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.integrationSidecar.ports + +Type: `[]core.ContainerPort` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/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.integrationSidecar.readinessProbe + +Type: `core.Probe` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/container/resources/probes.go#L42) + +ReadinessProbe keeps configuration of periodic probe of container service readiness. +Container will be removed from service endpoints if the probe fails. + +Links: +* [Kubernetes docs](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes) + +*** + +### .spec.integrationSidecar.resources + +Type: `core.ResourceRequirements` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/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.integrationSidecar.securityContext + +Type: `core.SecurityContext` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/container/resources/security.go#L35) + +SecurityContext holds container-level security attributes and common container settings. + +Links: +* [Kubernetes docs](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) + +*** + +### .spec.integrationSidecar.startupProbe + +Type: `core.Probe` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/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.integrationSidecar.volumeMounts + +Type: `[]core.VolumeMount` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/container/resources/volume_mounts.go#L35) + +VolumeMounts keeps list of pod volumes to mount into the container's filesystem. + +*** + +### .spec.integrationSidecar.workingDir + +Type: `string` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/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. + +*** + ### .spec.jobsTemplates.featurization.cpu.affinity Type: `core.Affinity` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/pod/resources/scheduling.go#L44) diff --git a/docs/api/ArangoMLStorage.V1Beta1.md b/docs/api/ArangoMLStorage.V1Beta1.md index 01e4fd2c7..59fd57e85 100644 --- a/docs/api/ArangoMLStorage.V1Beta1.md +++ b/docs/api/ArangoMLStorage.V1Beta1.md @@ -118,198 +118,6 @@ BucketPath specifies the path within the bucket Default Value: `/` -*** - -### .spec.mode.sidecar.args - -Type: `array` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/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.mode.sidecar.command - -Type: `array` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/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.mode.sidecar.controllerListenPort - -Type: `integer` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1beta1/storage_spec_mode_sidecar.go#L36) - -ControllerListenPort defines on which port the sidecar container will be listening for controller requests - -Default Value: `9202` - -*** - -### .spec.mode.sidecar.env - -Type: `core.EnvVar` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/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.mode.sidecar.envFrom - -Type: `core.EnvFromSource` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/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.mode.sidecar.image - -Type: `string` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/container/resources/image.go#L35) - -Image define image details - -*** - -### .spec.mode.sidecar.imagePullPolicy - -Type: `string` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/container/resources/image.go#L39) - -ImagePullPolicy define Image pull policy - -Default Value: `IfNotPresent` - -*** - -### .spec.mode.sidecar.lifecycle - -Type: `core.Lifecycle` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/container/resources/lifecycle.go#L35) - -Lifecycle keeps actions that the management system should take in response to container lifecycle events. - -*** - -### .spec.mode.sidecar.listenPort - -Type: `integer` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1beta1/storage_spec_mode_sidecar.go#L32) - -ListenPort defines on which port the sidecar container will be listening for connections - -Default Value: `9201` - -*** - -### .spec.mode.sidecar.livenessProbe - -Type: `core.Probe` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/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.mode.sidecar.ports - -Type: `[]core.ContainerPort` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/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.mode.sidecar.readinessProbe - -Type: `core.Probe` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/container/resources/probes.go#L42) - -ReadinessProbe keeps configuration of periodic probe of container service readiness. -Container will be removed from service endpoints if the probe fails. - -Links: -* [Kubernetes docs](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes) - -*** - -### .spec.mode.sidecar.resources - -Type: `core.ResourceRequirements` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/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.mode.sidecar.securityContext - -Type: `core.SecurityContext` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/container/resources/security.go#L35) - -SecurityContext holds container-level security attributes and common container settings. - -Links: -* [Kubernetes docs](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) - -*** - -### .spec.mode.sidecar.startupProbe - -Type: `core.Probe` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/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.mode.sidecar.volumeMounts - -Type: `[]core.VolumeMount` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/container/resources/volume_mounts.go#L35) - -VolumeMounts keeps list of pod volumes to mount into the container's filesystem. - -*** - -### .spec.mode.sidecar.workingDir - -Type: `string` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/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. - ## Status ### .status.conditions diff --git a/docs/api/GraphAnalyticsEngine.V1Alpha1.md b/docs/api/GraphAnalyticsEngine.V1Alpha1.md index 85c82c8c8..52ac4a105 100644 --- a/docs/api/GraphAnalyticsEngine.V1Alpha1.md +++ b/docs/api/GraphAnalyticsEngine.V1Alpha1.md @@ -52,10 +52,202 @@ Enabled define if TLS Should be enabled. If is not set then default is taken fro ### .spec.deploymentName -Type: `string` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/analytics/v1alpha1/gae_spec.go#L30) +Type: `string` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/analytics/v1alpha1/gae_spec.go#L31) DeploymentName define deployment name used in the object. Immutable +*** + +### .spec.integrationSidecar.args + +Type: `array` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/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.integrationSidecar.command + +Type: `array` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/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.integrationSidecar.controllerListenPort + +Type: `integer` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/integration.go#L36) + +ControllerListenPort defines on which port the sidecar container will be listening for controller requests + +Default Value: `9202` + +*** + +### .spec.integrationSidecar.env + +Type: `core.EnvVar` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/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.integrationSidecar.envFrom + +Type: `core.EnvFromSource` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/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.integrationSidecar.image + +Type: `string` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/container/resources/image.go#L35) + +Image define image details + +*** + +### .spec.integrationSidecar.imagePullPolicy + +Type: `string` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/container/resources/image.go#L39) + +ImagePullPolicy define Image pull policy + +Default Value: `IfNotPresent` + +*** + +### .spec.integrationSidecar.lifecycle + +Type: `core.Lifecycle` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/container/resources/lifecycle.go#L35) + +Lifecycle keeps actions that the management system should take in response to container lifecycle events. + +*** + +### .spec.integrationSidecar.listenPort + +Type: `integer` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/integration.go#L32) + +ListenPort defines on which port the sidecar container will be listening for connections + +Default Value: `9201` + +*** + +### .spec.integrationSidecar.livenessProbe + +Type: `core.Probe` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/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.integrationSidecar.ports + +Type: `[]core.ContainerPort` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/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.integrationSidecar.readinessProbe + +Type: `core.Probe` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/container/resources/probes.go#L42) + +ReadinessProbe keeps configuration of periodic probe of container service readiness. +Container will be removed from service endpoints if the probe fails. + +Links: +* [Kubernetes docs](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes) + +*** + +### .spec.integrationSidecar.resources + +Type: `core.ResourceRequirements` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/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.integrationSidecar.securityContext + +Type: `core.SecurityContext` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/container/resources/security.go#L35) + +SecurityContext holds container-level security attributes and common container settings. + +Links: +* [Kubernetes docs](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) + +*** + +### .spec.integrationSidecar.startupProbe + +Type: `core.Probe` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/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.integrationSidecar.volumeMounts + +Type: `[]core.VolumeMount` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/container/resources/volume_mounts.go#L35) + +VolumeMounts keeps list of pod volumes to mount into the container's filesystem. + +*** + +### .spec.integrationSidecar.workingDir + +Type: `string` [\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/scheduler/v1beta1/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. + ## Status ### .status.arangoDB.deployment.checksum diff --git a/internal/docs_test.go b/internal/docs_test.go index bcb911be0..cdfd79d2a 100644 --- a/internal/docs_test.go +++ b/internal/docs_test.go @@ -259,6 +259,11 @@ func Test_GenerateAPIDocs(t *testing.T) { }, Shared: []string{ "shared/v1", + "scheduler/v1beta1", + "scheduler/v1beta1/container", + "scheduler/v1beta1/container/resources", + "scheduler/v1beta1/pod", + "scheduler/v1beta1/pod/resources", }, }, }, diff --git a/pkg/apis/analytics/v1alpha1/gae_spec.go b/pkg/apis/analytics/v1alpha1/gae_spec.go index 2fd94bc60..976fbdf9f 100644 --- a/pkg/apis/analytics/v1alpha1/gae_spec.go +++ b/pkg/apis/analytics/v1alpha1/gae_spec.go @@ -21,6 +21,7 @@ package v1alpha1 import ( + schedulerApi "github.com/arangodb/kube-arangodb/pkg/apis/scheduler/v1beta1" shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util/errors" ) @@ -31,6 +32,9 @@ type GraphAnalyticsEngineSpec struct { // Deployment specifies how the GAE will be deployed into cluster Deployment *GraphAnalyticsEngineSpecDeployment `json:"deployment,omitempty"` + + // IntegrationSidecar define the integration sidecar spec + IntegrationSidecar *schedulerApi.IntegrationSidecar `json:"integrationSidecar,omitempty"` } func (a *GraphAnalyticsEngineSpec) GetDeployment() *GraphAnalyticsEngineSpecDeployment { @@ -40,6 +44,13 @@ func (a *GraphAnalyticsEngineSpec) GetDeployment() *GraphAnalyticsEngineSpecDepl return a.Deployment } +func (a *GraphAnalyticsEngineSpec) GetIntegrationSidecar() *schedulerApi.IntegrationSidecar { + if a == nil || a.IntegrationSidecar == nil { + return nil + } + return a.IntegrationSidecar +} + func (g *GraphAnalyticsEngineSpec) Validate() error { if g == nil { g = &GraphAnalyticsEngineSpec{} @@ -53,5 +64,6 @@ func (g *GraphAnalyticsEngineSpec) Validate() error { return nil })), + shared.PrefixResourceErrors("integrationSidecar", g.GetIntegrationSidecar().Validate()), )) } diff --git a/pkg/apis/analytics/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/analytics/v1alpha1/zz_generated.deepcopy.go index f4134de44..217813884 100644 --- a/pkg/apis/analytics/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/analytics/v1alpha1/zz_generated.deepcopy.go @@ -27,6 +27,7 @@ package v1alpha1 import ( deploymentv1 "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" + v1beta1 "github.com/arangodb/kube-arangodb/pkg/apis/scheduler/v1beta1" v1 "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" corev1 "k8s.io/api/core/v1" runtime "k8s.io/apimachinery/pkg/runtime" @@ -106,6 +107,11 @@ func (in *GraphAnalyticsEngineSpec) DeepCopyInto(out *GraphAnalyticsEngineSpec) *out = new(GraphAnalyticsEngineSpecDeployment) (*in).DeepCopyInto(*out) } + if in.IntegrationSidecar != nil { + in, out := &in.IntegrationSidecar, &out.IntegrationSidecar + *out = new(v1beta1.IntegrationSidecar) + (*in).DeepCopyInto(*out) + } return } diff --git a/pkg/apis/ml/v1beta1/extension_spec.go b/pkg/apis/ml/v1beta1/extension_spec.go index 042f92634..55604fd5a 100644 --- a/pkg/apis/ml/v1beta1/extension_spec.go +++ b/pkg/apis/ml/v1beta1/extension_spec.go @@ -21,6 +21,7 @@ package v1beta1 import ( + schedulerApi "github.com/arangodb/kube-arangodb/pkg/apis/scheduler/v1beta1" shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" sharedApi "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" ) @@ -41,6 +42,9 @@ type ArangoMLExtensionSpec struct { // JobsTemplates defines templates for jobs JobsTemplates *ArangoMLJobsTemplates `json:"jobsTemplates,omitempty"` + + // IntegrationSidecar define the integration sidecar spec + IntegrationSidecar *schedulerApi.IntegrationSidecar `json:"integrationSidecar,omitempty"` } func (a *ArangoMLExtensionSpec) GetMetadataService() *ArangoMLExtensionSpecMetadataService { @@ -81,6 +85,13 @@ func (a *ArangoMLExtensionSpec) GetJobsTemplates() *ArangoMLJobsTemplates { return a.JobsTemplates } +func (a *ArangoMLExtensionSpec) GetIntegrationSidecar() *schedulerApi.IntegrationSidecar { + if a == nil || a.IntegrationSidecar == nil { + return nil + } + return a.IntegrationSidecar +} + func (a *ArangoMLExtensionSpec) Validate() error { if a == nil { a = &ArangoMLExtensionSpec{} @@ -92,5 +103,6 @@ func (a *ArangoMLExtensionSpec) Validate() error { shared.PrefixResourceErrors("init", a.GetInit().Validate()), shared.PrefixResourceErrors("deployment", a.GetDeployment().Validate()), shared.PrefixResourceErrors("jobsTemplates", a.GetJobsTemplates().Validate()), + shared.PrefixResourceErrors("integrationSidecar", a.GetIntegrationSidecar().Validate()), )) } diff --git a/pkg/apis/ml/v1beta1/storage_spec_mode.go b/pkg/apis/ml/v1beta1/storage_spec_mode.go index ea000b2cb..2af4d0916 100644 --- a/pkg/apis/ml/v1beta1/storage_spec_mode.go +++ b/pkg/apis/ml/v1beta1/storage_spec_mode.go @@ -21,10 +21,16 @@ package v1beta1 import ( - shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" "github.com/arangodb/kube-arangodb/pkg/util/errors" ) +type ArangoMLStorageSpecModeType int + +const ( + ArangoMLStorageSpecModeTypeUnknown ArangoMLStorageSpecModeType = iota + ArangoMLStorageSpecModeTypeSidecar +) + type ArangoMLStorageSpecMode struct { // Sidecar mode runs the storage implementation as a sidecar Sidecar *ArangoMLStorageSpecModeSidecar `json:"sidecar,omitempty"` @@ -37,9 +43,18 @@ func (s *ArangoMLStorageSpecMode) GetSidecar() *ArangoMLStorageSpecModeSidecar { return s.Sidecar } +func (s *ArangoMLStorageSpecMode) GetType() ArangoMLStorageSpecModeType { + return ArangoMLStorageSpecModeTypeSidecar +} + func (s *ArangoMLStorageSpecMode) Validate() error { if s == nil { - return errors.Errorf("Mode is not defined") + s = &ArangoMLStorageSpecMode{} } - return shared.WithErrors(shared.PrefixResourceError("sidecar", s.Sidecar.Validate())) + + if s.GetType() == ArangoMLStorageSpecModeTypeUnknown { + return errors.Errorf("Unknown mode type") + } + + return nil } diff --git a/pkg/apis/ml/v1beta1/storage_spec_mode_sidecar.go b/pkg/apis/ml/v1beta1/storage_spec_mode_sidecar.go index 4288d23b9..3d9d4c597 100644 --- a/pkg/apis/ml/v1beta1/storage_spec_mode_sidecar.go +++ b/pkg/apis/ml/v1beta1/storage_spec_mode_sidecar.go @@ -20,63 +20,5 @@ package v1beta1 -import ( - schedulerContainerApi "github.com/arangodb/kube-arangodb/pkg/apis/scheduler/v1beta1/container" - shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" - "github.com/arangodb/kube-arangodb/pkg/util/errors" -) - type ArangoMLStorageSpecModeSidecar struct { - // ListenPort defines on which port the sidecar container will be listening for connections - // +doc/default: 9201 - ListenPort *uint16 `json:"listenPort,omitempty"` - - // ControllerListenPort defines on which port the sidecar container will be listening for controller requests - // +doc/default: 9202 - ControllerListenPort *uint16 `json:"controllerListenPort,omitempty"` - - // Container Keeps the information about Container configuration - *schedulerContainerApi.Container `json:",inline"` -} - -func (s *ArangoMLStorageSpecModeSidecar) GetContainer() *schedulerContainerApi.Container { - if s == nil || s.Container == nil { - return nil - } - - return s.Container -} - -func (s *ArangoMLStorageSpecModeSidecar) Validate() error { - if s == nil { - s = &ArangoMLStorageSpecModeSidecar{} - } - - var err []error - - if s.GetListenPort() < 1 { - err = append(err, shared.PrefixResourceErrors("listenPort", errors.Errorf("must be positive"))) - } - - if s.GetControllerListenPort() < 1 { - err = append(err, shared.PrefixResourceErrors("controllerListenPort", errors.Errorf("must be positive"))) - } - - err = append(err, s.GetContainer().Validate()) - - return shared.WithErrors(err...) -} - -func (s *ArangoMLStorageSpecModeSidecar) GetListenPort() uint16 { - if s == nil || s.ListenPort == nil { - return 9201 - } - return *s.ListenPort -} - -func (s *ArangoMLStorageSpecModeSidecar) GetControllerListenPort() uint16 { - if s == nil || s.ControllerListenPort == nil { - return 9202 - } - return *s.ControllerListenPort } diff --git a/pkg/apis/ml/v1beta1/storage_spec_test.go b/pkg/apis/ml/v1beta1/storage_spec_test.go index 3092ecaef..79d056aaf 100644 --- a/pkg/apis/ml/v1beta1/storage_spec_test.go +++ b/pkg/apis/ml/v1beta1/storage_spec_test.go @@ -24,11 +24,7 @@ import ( "testing" "github.com/stretchr/testify/require" - core "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/resource" - schedulerContainerApi "github.com/arangodb/kube-arangodb/pkg/apis/scheduler/v1beta1/container" - schedulerContainerResourcesApi "github.com/arangodb/kube-arangodb/pkg/apis/scheduler/v1beta1/container/resources" sharedApi "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" "github.com/arangodb/kube-arangodb/pkg/util" ) @@ -47,8 +43,6 @@ func Test_ArangoMLStorageSpec(t *testing.T) { require.Error(t, s.Validate()) s.Mode.Sidecar = &ArangoMLStorageSpecModeSidecar{} - require.Nil(t, s.Mode.Sidecar.GetResources()) - require.NotNil(t, s.Mode.Sidecar.GetListenPort()) require.Error(t, s.Backend.S3.Validate()) s.Backend.S3 = &ArangoMLStorageSpecBackendS3{ @@ -60,36 +54,4 @@ func Test_ArangoMLStorageSpec(t *testing.T) { } s.BucketName = util.NewType("bucket") require.NoError(t, s.Validate()) - - t.Run("default requests and limits assigned", func(t *testing.T) { - assignedRequirements := core.ResourceRequirements{ - Requests: core.ResourceList{ - core.ResourceCPU: resource.MustParse("100m"), - core.ResourceMemory: resource.MustParse("128Mi"), - }, - } - s.Mode.Sidecar.Container = &schedulerContainerApi.Container{} - s.Mode.Sidecar.Resources = &schedulerContainerResourcesApi.Resources{Resources: &assignedRequirements} - - expectedRequirements := core.ResourceRequirements{ - Requests: assignedRequirements.Requests, - Limits: core.ResourceList{ - core.ResourceCPU: resource.MustParse("200m"), - core.ResourceMemory: resource.MustParse("256Mi"), - }, - } - - actualRequirements := s.Mode.Sidecar.GetResources().With(&schedulerContainerResourcesApi.Resources{Resources: &core.ResourceRequirements{ - Limits: core.ResourceList{ - core.ResourceCPU: resource.MustParse("200m"), - core.ResourceMemory: resource.MustParse("256Mi"), - }, - Requests: core.ResourceList{ - core.ResourceCPU: resource.MustParse("100m"), - core.ResourceMemory: resource.MustParse("128Mi"), - }, - }}) - - require.Equal(t, expectedRequirements, actualRequirements.GetResources()) - }) } diff --git a/pkg/apis/ml/v1beta1/zz_generated.deepcopy.go b/pkg/apis/ml/v1beta1/zz_generated.deepcopy.go index 2c3b33937..2dd4d65a7 100644 --- a/pkg/apis/ml/v1beta1/zz_generated.deepcopy.go +++ b/pkg/apis/ml/v1beta1/zz_generated.deepcopy.go @@ -27,6 +27,7 @@ package v1beta1 import ( deploymentv1 "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1" + schedulerv1beta1 "github.com/arangodb/kube-arangodb/pkg/apis/scheduler/v1beta1" container "github.com/arangodb/kube-arangodb/pkg/apis/scheduler/v1beta1/container" pod "github.com/arangodb/kube-arangodb/pkg/apis/scheduler/v1beta1/pod" v1 "github.com/arangodb/kube-arangodb/pkg/apis/shared/v1" @@ -123,6 +124,11 @@ func (in *ArangoMLExtensionSpec) DeepCopyInto(out *ArangoMLExtensionSpec) { *out = new(ArangoMLJobsTemplates) (*in).DeepCopyInto(*out) } + if in.IntegrationSidecar != nil { + in, out := &in.IntegrationSidecar, &out.IntegrationSidecar + *out = new(schedulerv1beta1.IntegrationSidecar) + (*in).DeepCopyInto(*out) + } return } @@ -640,7 +646,7 @@ func (in *ArangoMLStorageSpecMode) DeepCopyInto(out *ArangoMLStorageSpecMode) { if in.Sidecar != nil { in, out := &in.Sidecar, &out.Sidecar *out = new(ArangoMLStorageSpecModeSidecar) - (*in).DeepCopyInto(*out) + **out = **in } return } @@ -658,21 +664,6 @@ func (in *ArangoMLStorageSpecMode) DeepCopy() *ArangoMLStorageSpecMode { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ArangoMLStorageSpecModeSidecar) DeepCopyInto(out *ArangoMLStorageSpecModeSidecar) { *out = *in - if in.ListenPort != nil { - in, out := &in.ListenPort, &out.ListenPort - *out = new(uint16) - **out = **in - } - if in.ControllerListenPort != nil { - in, out := &in.ControllerListenPort, &out.ControllerListenPort - *out = new(uint16) - **out = **in - } - if in.Container != nil { - in, out := &in.Container, &out.Container - *out = new(container.Container) - (*in).DeepCopyInto(*out) - } return } diff --git a/pkg/apis/scheduler/v1beta1/integration.go b/pkg/apis/scheduler/v1beta1/integration.go new file mode 100644 index 000000000..88787d667 --- /dev/null +++ b/pkg/apis/scheduler/v1beta1/integration.go @@ -0,0 +1,82 @@ +// +// DISCLAIMER +// +// Copyright 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 v1beta1 + +import ( + schedulerContainerApi "github.com/arangodb/kube-arangodb/pkg/apis/scheduler/v1beta1/container" + shared "github.com/arangodb/kube-arangodb/pkg/apis/shared" + "github.com/arangodb/kube-arangodb/pkg/util/errors" +) + +type IntegrationSidecar struct { + // ListenPort defines on which port the sidecar container will be listening for connections + // +doc/default: 9201 + ListenPort *uint16 `json:"listenPort,omitempty"` + + // ControllerListenPort defines on which port the sidecar container will be listening for controller requests + // +doc/default: 9202 + ControllerListenPort *uint16 `json:"controllerListenPort,omitempty"` + + // Container Keeps the information about Container configuration + *schedulerContainerApi.Container `json:",inline"` +} + +func (s *IntegrationSidecar) GetContainer() *schedulerContainerApi.Container { + if s == nil || s.Container == nil { + return nil + } + + return s.Container +} + +func (s *IntegrationSidecar) Validate() error { + if s == nil { + s = &IntegrationSidecar{} + } + + var err []error + + if s.GetListenPort() < 1 { + err = append(err, shared.PrefixResourceErrors("listenPort", errors.Errorf("must be positive"))) + } + + if s.GetControllerListenPort() < 1 { + err = append(err, shared.PrefixResourceErrors("controllerListenPort", errors.Errorf("must be positive"))) + } + + err = append(err, s.GetContainer().Validate()) + + return shared.WithErrors(err...) +} + +func (s *IntegrationSidecar) GetListenPort() uint16 { + if s == nil || s.ListenPort == nil { + return 9201 + } + return *s.ListenPort +} + +func (s *IntegrationSidecar) GetControllerListenPort() uint16 { + if s == nil || s.ControllerListenPort == nil { + return 9202 + } + return *s.ControllerListenPort +} diff --git a/pkg/apis/scheduler/v1beta1/zz_generated.deepcopy.go b/pkg/apis/scheduler/v1beta1/zz_generated.deepcopy.go index 2c0006389..7e86213f0 100644 --- a/pkg/apis/scheduler/v1beta1/zz_generated.deepcopy.go +++ b/pkg/apis/scheduler/v1beta1/zz_generated.deepcopy.go @@ -93,6 +93,37 @@ func (in *ArangoProfileList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IntegrationSidecar) DeepCopyInto(out *IntegrationSidecar) { + *out = *in + if in.ListenPort != nil { + in, out := &in.ListenPort, &out.ListenPort + *out = new(uint16) + **out = **in + } + if in.ControllerListenPort != nil { + in, out := &in.ControllerListenPort, &out.ControllerListenPort + *out = new(uint16) + **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 IntegrationSidecar. +func (in *IntegrationSidecar) DeepCopy() *IntegrationSidecar { + if in == nil { + return nil + } + out := new(IntegrationSidecar) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ProfileContainerTemplate) DeepCopyInto(out *ProfileContainerTemplate) { *out = *in diff --git a/pkg/crd/crds/analytics-graphanalyticsengine.schema.generated.yaml b/pkg/crd/crds/analytics-graphanalyticsengine.schema.generated.yaml index 74610de7f..8c052aeed 100644 --- a/pkg/crd/crds/analytics-graphanalyticsengine.schema.generated.yaml +++ b/pkg/crd/crds/analytics-graphanalyticsengine.schema.generated.yaml @@ -39,6 +39,496 @@ v1alpha1: deploymentName: description: DeploymentName define deployment name used in the object. Immutable type: string + integrationSidecar: + description: IntegrationSidecar define the integration sidecar spec + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + controllerListenPort: + format: int32 + type: integer + 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 + 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 + listenPort: + format: int32 + type: integer + 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 + 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 type: object type: object x-kubernetes-preserve-unknown-fields: true diff --git a/pkg/crd/crds/ml-extension.schema.generated.yaml b/pkg/crd/crds/ml-extension.schema.generated.yaml index 781802d1f..6f28d97c1 100644 --- a/pkg/crd/crds/ml-extension.schema.generated.yaml +++ b/pkg/crd/crds/ml-extension.schema.generated.yaml @@ -16285,6 +16285,495 @@ v1beta1: workingDir: type: string type: object + integrationSidecar: + properties: + args: + items: + type: string + type: array + command: + items: + type: string + type: array + controllerListenPort: + format: int32 + type: integer + 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 + 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 + listenPort: + format: int32 + type: integer + 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 + 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 jobsTemplates: properties: featurization: diff --git a/pkg/crd/crds/ml-storage.schema.generated.yaml b/pkg/crd/crds/ml-storage.schema.generated.yaml index 9ac7a31e4..0b5d8c349 100644 --- a/pkg/crd/crds/ml-storage.schema.generated.yaml +++ b/pkg/crd/crds/ml-storage.schema.generated.yaml @@ -621,493 +621,6 @@ v1beta1: mode: properties: sidecar: - properties: - args: - items: - type: string - type: array - command: - items: - type: string - type: array - controllerListenPort: - format: int32 - type: integer - 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 - 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 - listenPort: - format: int32 - type: integer - 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 - 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 type: object type: object diff --git a/pkg/util/refs.go b/pkg/util/refs.go index c3234a8ab..dd1f3d1a3 100644 --- a/pkg/util/refs.go +++ b/pkg/util/refs.go @@ -20,7 +20,9 @@ package util -import "reflect" +import ( + "reflect" +) // NewType returns a reference to a simple type with given value. func NewType[T interface{}](input T) *T {