Skip to content

Commit 21dde23

Browse files
authored
[Feature] [Analytics] Enable TLS and Service (#1662)
1 parent 67f6199 commit 21dde23

29 files changed

+623
-125
lines changed

.golangci.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ linters-settings:
6767
alias: schedulerPodResourcesApiv1alpha1
6868
- pkg: github.com/arangodb/kube-arangodb/pkg/apis/shared
6969
alias: shared
70+
- pkg: github.com/arangodb/kube-arangodb/pkg/handlers/enterprise/analytics/shared
71+
alias: analyticsShared
7072
- pkg: github.com/arangodb/kube-arangodb/pkg/handlers/enterprise/ml/shared
7173
alias: mlShared
7274
- pkg: github.com/arangodb/kube-arangodb/pkg/handlers/enterprise/ml/shared/test

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- (Feature) (ML) Release V1Beta1 API
1414
- (Maintenance) Update Go to 1.22.3
1515
- (Feature) (Analytics) GAE Integration
16+
- (Feature) (Analytics) Enable TLS and Service
1617

1718
## [1.2.40](https://github.com/arangodb/kube-arangodb/tree/1.2.40) (2024-04-10)
1819
- (Feature) Add Core fields to the Scheduler Container Spec

chart/kube-arangodb/templates/analytics-operator/role.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,14 @@ rules:
2828
- "get"
2929
- "list"
3030
- "watch"
31+
- apiGroups: ["apps"]
32+
resources:
33+
- "statefulsets"
34+
verbs: ["*"]
3135
- apiGroups: [ "" ]
3236
resources:
3337
- "secrets"
38+
- "services"
3439
verbs: [ "*" ]
3540
{{- end }}
3641
{{- end }}

docs/api/ArangoMLExtension.V1Alpha1.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Links:
9898

9999
### .spec.deployment.gpu
100100

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

103103
GPU defined if GPU Jobs are enabled.
104104

@@ -231,7 +231,7 @@ Links:
231231

232232
### .spec.deployment.port
233233

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

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

@@ -262,7 +262,7 @@ Links:
262262

263263
### .spec.deployment.replicas
264264

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

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

@@ -305,7 +305,7 @@ Links:
305305

306306
### .spec.deployment.service.type
307307

308-
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>
308+
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>
309309

310310
Type determines how the Service is exposed
311311

@@ -317,6 +317,7 @@ Possible Values:
317317
* `"NodePort"` - service will be exposed on one port of every node, in addition to 'ClusterIP' type
318318
* `"LoadBalancer"` - service will be exposed via an external load balancer (if the cloud provider supports it), in addition to 'NodePort' type
319319
* `"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
320+
* `"None"` - service is not created
320321

321322
***
322323

@@ -361,15 +362,15 @@ Links:
361362

362363
### .spec.deployment.tls.altNames
363364

364-
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>
365+
Type: `array` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/tls.go#L28)</sup>
365366

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

368369
***
369370

370371
### .spec.deployment.tls.enabled
371372

372-
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>
373+
Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/tls.go#L25)</sup>
373374

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

docs/api/ArangoMLExtension.V1Beta1.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Links:
9898

9999
### .spec.deployment.gpu
100100

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

103103
GPU defined if GPU Jobs are enabled.
104104

@@ -231,7 +231,7 @@ Links:
231231

232232
### .spec.deployment.port
233233

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

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

@@ -262,7 +262,7 @@ Links:
262262

263263
### .spec.deployment.replicas
264264

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

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

@@ -305,7 +305,7 @@ Links:
305305

306306
### .spec.deployment.service.type
307307

308-
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>
308+
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>
309309

310310
Type determines how the Service is exposed
311311

@@ -317,6 +317,7 @@ Possible Values:
317317
* `"NodePort"` - service will be exposed on one port of every node, in addition to 'ClusterIP' type
318318
* `"LoadBalancer"` - service will be exposed via an external load balancer (if the cloud provider supports it), in addition to 'NodePort' type
319319
* `"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
320+
* `"None"` - service is not created
320321

321322
***
322323

@@ -361,15 +362,15 @@ Links:
361362

362363
### .spec.deployment.tls.altNames
363364

364-
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>
365+
Type: `array` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/tls.go#L28)</sup>
365366

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

368369
***
369370

370371
### .spec.deployment.tls.enabled
371372

372-
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>
373+
Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/tls.go#L25)</sup>
373374

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

docs/api/GraphAnalyticsEngine.V1Alpha1.md

Lines changed: 175 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,48 @@ title: GraphAnalyticsEngine V1Alpha1
88

99
## Spec
1010

11+
### .spec.deployment.port
12+
13+
Type: `integer` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/analytics/v1alpha1/gae_spec_deployment.go#L42)</sup>
14+
15+
Port defines on which port the container will be listening for connections
16+
17+
***
18+
19+
### .spec.deployment.service.type
20+
21+
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>
22+
23+
Type determines how the Service is exposed
24+
25+
Links:
26+
* [Kubernetes Documentation](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types)
27+
28+
Possible Values:
29+
* `"ClusterIP"` (default) - service will only be accessible inside the cluster, via the cluster IP
30+
* `"NodePort"` - service will be exposed on one port of every node, in addition to 'ClusterIP' type
31+
* `"LoadBalancer"` - service will be exposed via an external load balancer (if the cloud provider supports it), in addition to 'NodePort' type
32+
* `"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
33+
* `"None"` - service is not created
34+
35+
***
36+
37+
### .spec.deployment.tls.altNames
38+
39+
Type: `array` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/tls.go#L28)</sup>
40+
41+
AltNames define TLS AltNames used when TLS on the ArangoDB is enabled
42+
43+
***
44+
45+
### .spec.deployment.tls.enabled
46+
47+
Type: `boolean` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/tls.go#L25)</sup>
48+
49+
Enabled define if TLS Should be enabled. If is not set then default is taken from ArangoDeployment settings
50+
51+
***
52+
1153
### .spec.deploymentName
1254

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

1759
## Status
1860

61+
### .status.arangoDB.deployment.checksum
62+
63+
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L61)</sup>
64+
65+
UID keeps the information about object Checksum
66+
67+
***
68+
69+
### .status.arangoDB.deployment.name
70+
71+
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L52)</sup>
72+
73+
Name of the object
74+
75+
***
76+
77+
### .status.arangoDB.deployment.namespace
78+
79+
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L55)</sup>
80+
81+
Namespace of the object. Should default to the namespace of the parent object
82+
83+
***
84+
85+
### .status.arangoDB.deployment.uid
86+
87+
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L58)</sup>
88+
89+
UID keeps the information about object UID
90+
91+
***
92+
93+
### .status.arangoDB.secret.checksum
94+
95+
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L61)</sup>
96+
97+
UID keeps the information about object Checksum
98+
99+
***
100+
101+
### .status.arangoDB.secret.name
102+
103+
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L52)</sup>
104+
105+
Name of the object
106+
107+
***
108+
109+
### .status.arangoDB.secret.namespace
110+
111+
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L55)</sup>
112+
113+
Namespace of the object. Should default to the namespace of the parent object
114+
115+
***
116+
117+
### .status.arangoDB.secret.uid
118+
119+
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L58)</sup>
120+
121+
UID keeps the information about object UID
122+
123+
***
124+
125+
### .status.arangoDB.tls.checksum
126+
127+
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L61)</sup>
128+
129+
UID keeps the information about object Checksum
130+
131+
***
132+
133+
### .status.arangoDB.tls.name
134+
135+
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L52)</sup>
136+
137+
Name of the object
138+
139+
***
140+
141+
### .status.arangoDB.tls.namespace
142+
143+
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L55)</sup>
144+
145+
Namespace of the object. Should default to the namespace of the parent object
146+
147+
***
148+
149+
### .status.arangoDB.tls.uid
150+
151+
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L58)</sup>
152+
153+
UID keeps the information about object UID
154+
155+
***
156+
19157
### .status.conditions
20158

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

23161
Conditions specific to the entire extension
24162

25163
***
26164

27-
### .status.deployment.checksum
165+
### .status.reconciliation.service.checksum
166+
167+
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L61)</sup>
168+
169+
UID keeps the information about object Checksum
170+
171+
***
172+
173+
### .status.reconciliation.service.name
174+
175+
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L52)</sup>
176+
177+
Name of the object
178+
179+
***
180+
181+
### .status.reconciliation.service.namespace
182+
183+
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L55)</sup>
184+
185+
Namespace of the object. Should default to the namespace of the parent object
186+
187+
***
188+
189+
### .status.reconciliation.service.uid
190+
191+
Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.40/pkg/apis/shared/v1/object.go#L58)</sup>
192+
193+
UID keeps the information about object UID
194+
195+
***
196+
197+
### .status.reconciliation.statefulSet.checksum
28198

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

31201
UID keeps the information about object Checksum
32202

33203
***
34204

35-
### .status.deployment.name
205+
### .status.reconciliation.statefulSet.name
36206

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

39209
Name of the object
40210

41211
***
42212

43-
### .status.deployment.namespace
213+
### .status.reconciliation.statefulSet.namespace
44214

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

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

49219
***
50220

51-
### .status.deployment.uid
221+
### .status.reconciliation.statefulSet.uid
52222

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

pkg/apis/analytics/v1alpha1/conditions.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ package v1alpha1
2323
import api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1"
2424

2525
const (
26-
LicenseValidCondition api.ConditionType = "LicenseValid"
27-
DeploymentFoundCondition api.ConditionType = "DeploymentFound"
28-
ReadyCondition api.ConditionType = "Ready"
29-
SpecValidCondition api.ConditionType = "SpecValid"
26+
LicenseValidCondition api.ConditionType = "LicenseValid"
27+
DeploymentFoundCondition api.ConditionType = "DeploymentFound"
28+
ReadyCondition api.ConditionType = "Ready"
29+
SpecValidCondition api.ConditionType = "SpecValid"
30+
StatefulSetReadyCondition api.ConditionType = "StatefulSetReady"
31+
TLSEnabledCondition api.ConditionType = "TLSEnabled"
3032
)

0 commit comments

Comments
 (0)