Skip to content

Commit cf53600

Browse files
committed
feat: ✨ add observatorium deployment
1 parent d5905f1 commit cf53600

File tree

11 files changed

+141
-0
lines changed

11 files changed

+141
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ node_modules
1010
.venv/
1111
.vscode/
1212
pyvenv.cfg
13+
14+
**/Chart.lock
15+
**/charts/*

roles/gitops/rendering-apps-files/tasks/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@
99
- name: "{{ dsc_name }}"
1010
apps:
1111
- argocd_app: keycloak
12+
- argocd_app: observability
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
apiVersion: v2
3+
name: observability
4+
type: application
5+
version: 1.0.0
6+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: Application
3+
metadata:
4+
name: observatorium
5+
namespace: infra-argo
6+
spec:
7+
destination:
8+
namespace: {{ dsc.observatorium.namespace }}
9+
server: https://kubernetes.default.svc
10+
project: default
11+
sources:
12+
- helm:
13+
valueFiles:
14+
- ./values.yaml
15+
- $tenants/helm/values.yaml
16+
chart: observatorium
17+
repoURL: {{ dsc.observatorium.helmRepoUrl }}
18+
targetRevision: {{ dsc.observatorium.chartVersion }}
19+
- ref: tenants
20+
repoURL: "https://{{ gitlab_domain }}/{{ dsc.global.projectsRootDir | join('/') }}/observability/observability.git"
21+
targetRevision: main
22+
syncPolicy:
23+
automated: {}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
observatorium:
2+
ingress:
3+
enabled: <path:forge-dso/data/env/{{ dsc_name }}/apps/observatorium/values#ingress | jsonPath {.enabled}>
4+
ingressClassName: <path:forge-dso/data/env/{{ dsc_name }}/apps/observatorium/values#ingress | jsonPath {.ingressClassName}>
5+
hosts:
6+
- host: <path:forge-dso/data/env/{{ dsc_name }}/apps/observatorium/values#ingress | jsonPath {.domain}>
7+
paths:
8+
- path: /
9+
pathType: ImplementationSpecific
10+
tls:
11+
- hosts:
12+
- <path:forge-dso/data/env/{{ dsc_name }}/apps/observatorium/values#ingress | jsonPath {.domain}>
13+
secretName: <path:forge-dso/data/env/{{ dsc_name }}/apps/observatorium/values#ingress | jsonPath {.domain}>-tls
14+
15+
api:
16+
loglevel: <path:forge-dso/data/env/{{ dsc_name }}/apps/observatorium/values#api | jsonPath {.loglevel}>
17+
config:
18+
# Default tenant config
19+
id: <path:forge-dso/data/env/{{ dsc_name }}/apps/observatorium/values#api | jsonPath {.config.id}>
20+
name: <path:forge-dso/data/env/{{ dsc_name }}/apps/observatorium/values#api | jsonPath {.config.name}>
21+
groups: [/admin]
22+
# Default oidc config
23+
clientID: "account"
24+
issuerURL: <path:forge-dso/data/env/{{ dsc_name }}/apps/observatorium/values#api | jsonPath {.config.issuerURL}>
25+
usernameClaim: "preferred_username"
26+
groupClaim: "groups"
27+
logs:
28+
enabled: true
29+
read:
30+
endpoint: "<path:forge-dso/data/env/{{ dsc_name }}/apps/observatorium/values#logs | jsonPath {.endpoint}>"
31+
tail:
32+
endpoint: "<path:forge-dso/data/env/{{ dsc_name }}/apps/observatorium/values#logs | jsonPath {.endpoint}>"
33+
write:
34+
endpoint: "<path:forge-dso/data/env/{{ dsc_name }}/apps/observatorium/values#logs | jsonPath {.endpoint}>"
35+
rules:
36+
endpoint: "<path:forge-dso/data/env/{{ dsc_name }}/apps/observatorium/values#logs | jsonPath {.endpoint}>"
37+
metrics:
38+
enabled: <path:forge-dso/data/env/{{ dsc_name }}/apps/observatorium/values#metrics | jsonPath {.enabled}>
39+
tenantHeader: 'X-Scope-OrgId'
40+
read:
41+
endpoint: "<path:forge-dso/data/env/{{ dsc_name }}/apps/observatorium/values#metrics | jsonPath {.endpoint}>"
42+
alertmanager:
43+
endpoint: "<path:forge-dso/data/env/{{ dsc_name }}/apps/observatorium/values#metrics | jsonPath {.endpoint}>"
44+
write:
45+
endpoint: "<path:forge-dso/data/env/{{ dsc_name }}/apps/observatorium/values#metrics | jsonPath {.endpoint}>"
46+
rules:
47+
endpoint: "<path:forge-dso/data/env/{{ dsc_name }}/apps/observatorium/values#metrics | jsonPath {.endpoint}>"

roles/gitops/vault-secrets/vars/main.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,32 @@ envs:
3434
adminPassword: "{{ lookup('ansible.builtin.password', '/dev/null', length=24, chars=['ascii_letters', 'digits']) }}"
3535
initcontainers:
3636
pluginDownloadUrl: "{{ dsc.keycloak.pluginDownloadUrl }}"
37+
ingress:
38+
hostname: "{{ keycloak_domain }}"
39+
- argocd_app: "observatorium"
40+
vault_values:
41+
ingress:
42+
enabled: true
43+
ingressClassName: nginx
44+
domain: "{{ observatorium_domain }}"
45+
api:
46+
loglevel: debug
47+
config:
48+
id: "prod-infra"
49+
name: "prod-infra"
50+
issuerURL: "https://{{ keycloak_domain }}/realms/dso"
51+
logs:
52+
enabled: true
53+
endpoint: "https://loki.cpin.numerique-interieur.com"
54+
metrics:
55+
enabled: true
56+
endpoint: "https://mimir.cpin.numerique-interieur.com"
57+
- argocd_app: "vault"
58+
vault_values:
59+
global:
60+
image:
61+
repository: "{{ dsc.global.registry | default('docker.io') }}"
62+
server:
63+
ha:
64+
apiAddr: "https://{{ vault_domain }}"
65+

roles/socle-config/files/config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,11 @@ spec:
121121
helmRepoUrl: https://kyverno.github.io/kyverno
122122
forcedInstall: false
123123
values: {}
124+
observatorium:
125+
namespace: dso-observatorium
126+
subDomain: observatorium
127+
helmRepoUrl: https://cloud-pi-native.github.io/helm-charts
128+
values: {}
124129
nexus:
125130
namespace: dso-nexus
126131
subDomain: nexus

roles/socle-config/files/cr-conf-dso-default.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ spec:
8686
mode: primary
8787
kyverno: {}
8888
nexus: {}
89+
observatorium:
90+
enabled: false
8991
prometheus:
9092
crd:
9193
type: external

roles/socle-config/files/crd-conf-dso.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,6 +1284,26 @@ spec:
12841284
type: string
12851285
type: object
12861286
type: object
1287+
observatorium:
1288+
description: Configuration for Observatorium.
1289+
properties:
1290+
enabled:
1291+
default: false
1292+
description: Enable or disable Observatorium.
1293+
type: boolean
1294+
namespace:
1295+
description: The namespace for Observatorium.
1296+
type: string
1297+
subDomain:
1298+
description: The subdomain for Observatorium.
1299+
type: string
1300+
helmRepoUrl:
1301+
description: Observatorium helm repository url.
1302+
type: string
1303+
chartVersion:
1304+
description: Observatorium helm chart version (e.g., "0.25.0").
1305+
type: string
1306+
type: object
12871307
proxy:
12881308
description: Proxy configuration for tools.
12891309
properties:

roles/socle-config/files/releases.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ spec:
5555
nexus:
5656
# https://hub.docker.com/r/sonatype/nexus3/
5757
imageTag: 3.76.0
58+
observatorium:
59+
# https://github.com/cloud-pi-native/helm-charts/tags
60+
chartVersion: 0.5.2
5861
sonarqube:
5962
# https://artifacthub.io/packages/helm/sonarqube/sonarqube
6063
chartVersion: 10.8.1

0 commit comments

Comments
 (0)