Skip to content

[Documentation] Profile Label #1808

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

Merged
merged 4 commits into from
Jan 30, 2025
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
32 changes: 28 additions & 4 deletions docs/api/ArangoDeployment.V1.md
Original file line number Diff line number Diff line change
Expand Up @@ -5886,9 +5886,21 @@ Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2

***

### .spec.sync.tls.sni.mapping.\<string\>
### .spec.sync.tls.sni.mapping

Type: `array` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.43/pkg/apis/deployment/v1/tls_sni_spec.go#L30)</sup>
Type: `map[string][]string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.43/pkg/apis/deployment/v1/tls_sni_spec.go#L36)</sup>

The mapping of the Server Name Indication options.

Links:
* [Server Name Indication](https://docs.arangodb.com/stable/components/arangodb-server/options/#--sslserver-name-indication)

Example:
```yaml
mapping:
secret:
- domain.example.com
```

***

Expand Down Expand Up @@ -7834,9 +7846,21 @@ Type: `string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2

***

### .spec.tls.sni.mapping.\<string\>
### .spec.tls.sni.mapping

Type: `array` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.43/pkg/apis/deployment/v1/tls_sni_spec.go#L30)</sup>
Type: `map[string][]string` <sup>[\[ref\]](https://github.com/arangodb/kube-arangodb/blob/1.2.43/pkg/apis/deployment/v1/tls_sni_spec.go#L36)</sup>

The mapping of the Server Name Indication options.

Links:
* [Server Name Indication](https://docs.arangodb.com/stable/components/arangodb-server/options/#--sslserver-name-indication)

Example:
```yaml
mapping:
secret:
- domain.example.com
```

***

Expand Down
66 changes: 66 additions & 0 deletions docs/integration-sidecar.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,72 @@ has_toc: false

## Profile

### Injection

#### Selector

Using [Selector](./api/ArangoProfile.V1Beta1.md) `.spec.selectors.label` you can select which profiles are going to be applied on the Pod.

To not match any pod:
```yaml
apiVersion: scheduler.arangodb.com/v1beta1
kind: ArangoProfile
metadata:
name: example
spec:
selectors:
label:
matchLabels: {}
template: ...
```

To match all pods:
```yaml
apiVersion: scheduler.arangodb.com/v1beta1
kind: ArangoProfile
metadata:
name: example
spec:
selectors:
label:
matchLabels: {}
template: ...
```

To match specific pods (with label key=value):
```yaml
apiVersion: scheduler.arangodb.com/v1beta1
kind: ArangoProfile
metadata:
name: example
spec:
selectors:
label:
matchLabels:
key: value
template: ...
```

#### Selection

Profiles can be injected using name (not only selectors).

In order to inject specific profiles to the pod use label (split by `,`):

```yaml
metadata:
labels:
profiles.arangodb.com/profiles: "gpu"
```

or

```yaml
metadata:
labels:
profiles.arangodb.com/profiles: "gpu,internal"
```

## Sidecar

### Resource Types
Expand Down
8 changes: 7 additions & 1 deletion pkg/apis/deployment/v1/tls_sni_spec.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// DISCLAIMER
//
// Copyright 2016-2024 ArangoDB GmbH, Cologne, Germany
// Copyright 2016-2025 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.
Expand All @@ -27,6 +27,12 @@ import (

// TLSSNISpec holds TLS SNI additional certificates
type TLSSNISpec struct {
// The mapping of the Server Name Indication options.
// +doc/type: map[string][]string
// +doc/example: mapping:
// +doc/example: secret:
// +doc/example: - domain.example.com
// +doc/link: Server Name Indication|https://docs.arangodb.com/stable/components/arangodb-server/options/#--sslserver-name-indication
Mapping map[string][]string `json:"mapping,omitempty"`
}

Expand Down
8 changes: 7 additions & 1 deletion pkg/apis/deployment/v2alpha1/tls_sni_spec.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// DISCLAIMER
//
// Copyright 2016-2024 ArangoDB GmbH, Cologne, Germany
// Copyright 2016-2025 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.
Expand All @@ -27,6 +27,12 @@ import (

// TLSSNISpec holds TLS SNI additional certificates
type TLSSNISpec struct {
// The mapping of the Server Name Indication options.
// +doc/type: map[string][]string
// +doc/example: mapping:
// +doc/example: secret:
// +doc/example: - domain.example.com
// +doc/link: Server Name Indication|https://docs.arangodb.com/stable/components/arangodb-server/options/#--sslserver-name-indication
Mapping map[string][]string `json:"mapping,omitempty"`
}

Expand Down
4 changes: 4 additions & 0 deletions pkg/crd/crds/database-deployment.schema.generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12510,6 +12510,7 @@ v1:
items:
type: string
type: array
description: The mapping of the Server Name Indication options.
type: object
type: object
ttl:
Expand Down Expand Up @@ -16960,6 +16961,7 @@ v1:
items:
type: string
type: array
description: The mapping of the Server Name Indication options.
type: object
type: object
ttl:
Expand Down Expand Up @@ -29512,6 +29514,7 @@ v2alpha1:
items:
type: string
type: array
description: The mapping of the Server Name Indication options.
type: object
type: object
ttl:
Expand Down Expand Up @@ -33962,6 +33965,7 @@ v2alpha1:
items:
type: string
type: array
description: The mapping of the Server Name Indication options.
type: object
type: object
ttl:
Expand Down