Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] [Analytics] Enable TLS and Service #1662

Merged
merged 2 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ linters-settings:
alias: schedulerPodResourcesApiv1alpha1
- pkg: github.com/arangodb/kube-arangodb/pkg/apis/shared
alias: shared
- pkg: github.com/arangodb/kube-arangodb/pkg/handlers/enterprise/analytics/shared
alias: analyticsShared
- pkg: github.com/arangodb/kube-arangodb/pkg/handlers/enterprise/ml/shared
alias: mlShared
- pkg: github.com/arangodb/kube-arangodb/pkg/handlers/enterprise/ml/shared/test
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- (Feature) (ML) Release V1Beta1 API
- (Maintenance) Update Go to 1.22.3
- (Feature) (Analytics) GAE Integration
- (Feature) (Analytics) Enable TLS and Service

## [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
Expand Down
5 changes: 5 additions & 0 deletions chart/kube-arangodb/templates/analytics-operator/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,14 @@ rules:
- "get"
- "list"
- "watch"
- apiGroups: ["apps"]
resources:
- "statefulsets"
verbs: ["*"]
- apiGroups: [ "" ]
resources:
- "secrets"
- "services"
verbs: [ "*" ]
{{- end }}
{{- end }}
13 changes: 7 additions & 6 deletions docs/api/ArangoMLExtension.V1Alpha1.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Links:

### .spec.deployment.gpu

Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1alpha1/extension_spec_deployment.go#L55)</sup>
Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1alpha1/extension_spec_deployment.go#L56)</sup>

GPU defined if GPU Jobs are enabled.

Expand Down Expand Up @@ -231,7 +231,7 @@ Links:

### .spec.deployment.port

Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1alpha1/extension_spec_deployment.go#L58)</sup>
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1alpha1/extension_spec_deployment.go#L59)</sup>

Port defines on which port the container will be listening for connections

Expand Down Expand Up @@ -262,7 +262,7 @@ Links:

### .spec.deployment.replicas

Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1alpha1/extension_spec_deployment.go#L39)</sup>
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1alpha1/extension_spec_deployment.go#L40)</sup>

Replicas defines the number of replicas running specified components. No replicas created if no components are defined.

Expand Down Expand Up @@ -305,7 +305,7 @@ Links:

### .spec.deployment.service.type

Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1alpha1/extension_spec_deployment_service.go#L37)</sup>
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1alpha1/extension_spec_deployment_service.go#L38)</sup>

Type determines how the Service is exposed

Expand All @@ -317,6 +317,7 @@ Possible Values:
* `"NodePort"` - service will be exposed on one port of every node, in addition to 'ClusterIP' type
* `"LoadBalancer"` - service will be exposed via an external load balancer (if the cloud provider supports it), in addition to 'NodePort' type
* `"ExternalName"` - service consists of only a reference to an external name that kubedns or equivalent will return as a CNAME record, with no exposing or proxying of any pods involved
* `"None"` - service is not created

***

Expand Down Expand Up @@ -361,15 +362,15 @@ Links:

### .spec.deployment.tls.altNames

Type: `array` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1alpha1/extension_spec_deployment_tls.go#L28)</sup>
Type: `array` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/tls.go#L28)</sup>

AltNames define TLS AltNames used when TLS on the ArangoDB is enabled

***

### .spec.deployment.tls.enabled

Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1alpha1/extension_spec_deployment_tls.go#L25)</sup>
Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/tls.go#L25)</sup>

Enabled define if TLS Should be enabled. If is not set then default is taken from ArangoDeployment settings

Expand Down
13 changes: 7 additions & 6 deletions docs/api/ArangoMLExtension.V1Beta1.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Links:

### .spec.deployment.gpu

Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1beta1/extension_spec_deployment.go#L55)</sup>
Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1beta1/extension_spec_deployment.go#L56)</sup>

GPU defined if GPU Jobs are enabled.

Expand Down Expand Up @@ -231,7 +231,7 @@ Links:

### .spec.deployment.port

Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1beta1/extension_spec_deployment.go#L58)</sup>
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1beta1/extension_spec_deployment.go#L59)</sup>

Port defines on which port the container will be listening for connections

Expand Down Expand Up @@ -262,7 +262,7 @@ Links:

### .spec.deployment.replicas

Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1beta1/extension_spec_deployment.go#L39)</sup>
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1beta1/extension_spec_deployment.go#L40)</sup>

Replicas defines the number of replicas running specified components. No replicas created if no components are defined.

Expand Down Expand Up @@ -305,7 +305,7 @@ Links:

### .spec.deployment.service.type

Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1beta1/extension_spec_deployment_service.go#L37)</sup>
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1beta1/extension_spec_deployment_service.go#L38)</sup>

Type determines how the Service is exposed

Expand All @@ -317,6 +317,7 @@ Possible Values:
* `"NodePort"` - service will be exposed on one port of every node, in addition to 'ClusterIP' type
* `"LoadBalancer"` - service will be exposed via an external load balancer (if the cloud provider supports it), in addition to 'NodePort' type
* `"ExternalName"` - service consists of only a reference to an external name that kubedns or equivalent will return as a CNAME record, with no exposing or proxying of any pods involved
* `"None"` - service is not created

***

Expand Down Expand Up @@ -361,15 +362,15 @@ Links:

### .spec.deployment.tls.altNames

Type: `array` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1beta1/extension_spec_deployment_tls.go#L28)</sup>
Type: `array` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/tls.go#L28)</sup>

AltNames define TLS AltNames used when TLS on the ArangoDB is enabled

***

### .spec.deployment.tls.enabled

Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/ml/v1beta1/extension_spec_deployment_tls.go#L25)</sup>
Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/tls.go#L25)</sup>

Enabled define if TLS Should be enabled. If is not set then default is taken from ArangoDeployment settings

Expand Down
180 changes: 175 additions & 5 deletions docs/api/GraphAnalyticsEngine.V1Alpha1.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,48 @@ title: GraphAnalyticsEngine V1Alpha1

## Spec

### .spec.deployment.port

Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/analytics/v1alpha1/gae_spec_deployment.go#L42)</sup>

Port defines on which port the container will be listening for connections

***

### .spec.deployment.service.type

Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/analytics/v1alpha1/gae_spec_deployment_service.go#L38)</sup>

Type determines how the Service is exposed

Links:
* [Kubernetes Documentation](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types)

Possible Values:
* `"ClusterIP"` (default) - service will only be accessible inside the cluster, via the cluster IP
* `"NodePort"` - service will be exposed on one port of every node, in addition to 'ClusterIP' type
* `"LoadBalancer"` - service will be exposed via an external load balancer (if the cloud provider supports it), in addition to 'NodePort' type
* `"ExternalName"` - service consists of only a reference to an external name that kubedns or equivalent will return as a CNAME record, with no exposing or proxying of any pods involved
* `"None"` - service is not created

***

### .spec.deployment.tls.altNames

Type: `array` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/tls.go#L28)</sup>

AltNames define TLS AltNames used when TLS on the ArangoDB is enabled

***

### .spec.deployment.tls.enabled

Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/tls.go#L25)</sup>

Enabled define if TLS Should be enabled. If is not set then default is taken from ArangoDeployment settings

***

### .spec.deploymentName

Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/analytics/v1alpha1/gae_spec.go#L30)</sup>
Expand All @@ -16,39 +58,167 @@ DeploymentName define deployment name used in the object. Immutable

## Status

### .status.arangoDB.deployment.checksum

Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L61)</sup>

UID keeps the information about object Checksum

***

### .status.arangoDB.deployment.name

Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L52)</sup>

Name of the object

***

### .status.arangoDB.deployment.namespace

Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L55)</sup>

Namespace of the object. Should default to the namespace of the parent object

***

### .status.arangoDB.deployment.uid

Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L58)</sup>

UID keeps the information about object UID

***

### .status.arangoDB.secret.checksum

Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L61)</sup>

UID keeps the information about object Checksum

***

### .status.arangoDB.secret.name

Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L52)</sup>

Name of the object

***

### .status.arangoDB.secret.namespace

Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L55)</sup>

Namespace of the object. Should default to the namespace of the parent object

***

### .status.arangoDB.secret.uid

Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L58)</sup>

UID keeps the information about object UID

***

### .status.arangoDB.tls.checksum

Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L61)</sup>

UID keeps the information about object Checksum

***

### .status.arangoDB.tls.name

Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L52)</sup>

Name of the object

***

### .status.arangoDB.tls.namespace

Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L55)</sup>

Namespace of the object. Should default to the namespace of the parent object

***

### .status.arangoDB.tls.uid

Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L58)</sup>

UID keeps the information about object UID

***

### .status.conditions

Type: `api.Conditions` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/analytics/v1alpha1/gae_status.go#L31)</sup>
Type: `api.Conditions` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/analytics/v1alpha1/gae_status.go#L30)</sup>

Conditions specific to the entire extension

***

### .status.deployment.checksum
### .status.reconciliation.service.checksum

Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L61)</sup>

UID keeps the information about object Checksum

***

### .status.reconciliation.service.name

Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L52)</sup>

Name of the object

***

### .status.reconciliation.service.namespace

Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L55)</sup>

Namespace of the object. Should default to the namespace of the parent object

***

### .status.reconciliation.service.uid

Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L58)</sup>

UID keeps the information about object UID

***

### .status.reconciliation.statefulSet.checksum

Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L61)</sup>

UID keeps the information about object Checksum

***

### .status.deployment.name
### .status.reconciliation.statefulSet.name

Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L52)</sup>

Name of the object

***

### .status.deployment.namespace
### .status.reconciliation.statefulSet.namespace

Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L55)</sup>

Namespace of the object. Should default to the namespace of the parent object

***

### .status.deployment.uid
### .status.reconciliation.statefulSet.uid

Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L58)</sup>

Expand Down
10 changes: 6 additions & 4 deletions pkg/apis/analytics/v1alpha1/conditions.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ package v1alpha1
import api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1"

const (
LicenseValidCondition api.ConditionType = "LicenseValid"
DeploymentFoundCondition api.ConditionType = "DeploymentFound"
ReadyCondition api.ConditionType = "Ready"
SpecValidCondition api.ConditionType = "SpecValid"
LicenseValidCondition api.ConditionType = "LicenseValid"
DeploymentFoundCondition api.ConditionType = "DeploymentFound"
ReadyCondition api.ConditionType = "Ready"
SpecValidCondition api.ConditionType = "SpecValid"
StatefulSetReadyCondition api.ConditionType = "StatefulSetReady"
TLSEnabledCondition api.ConditionType = "TLSEnabled"
)
Loading