Skip to content

Commit 1fab5e2

Browse files
committed
feat: ✨ add observatorium deployment
1 parent 3497148 commit 1fab5e2

File tree

11 files changed

+142
-0
lines changed

11 files changed

+142
-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
@@ -10,3 +10,4 @@
1010
apps:
1111
- argocd_app: keycloak
1212
- argocd_app: sonarqube
13+
- 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: true
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/common/values#domain | jsonPath {.observatorium}>
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/keycloak/values#domain | jsonPath {.keycloak}>/realms/dso
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/defaults/main.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ envs:
1212
domain:
1313
keycloak: "{{ keycloak_domain }}"
1414
console: "{{ console_domain }}"
15+
observatorium: "{{ observatorium_domain }}"
1516
sonarqube: "{{ sonar_domain }}"
1617
proxy:
1718
httpProxy: "{{ dsc.proxy.http_proxy | default('') }}"
@@ -36,6 +37,21 @@ envs:
3637
adminPassword: "{{ lookup('ansible.builtin.password', '/dev/null', length=24, chars=['ascii_letters', 'digits']) }}"
3738
initcontainers:
3839
pluginDownloadUrl: "{{ dsc.keycloak.pluginDownloadUrl }}"
40+
- argocd_app: "observatorium"
41+
vault_values:
42+
ingress:
43+
ingressClassName: "{{ dsc.ingress.className }}"
44+
api:
45+
loglevel: info
46+
config:
47+
id: "prod-infra"
48+
name: "prod-infra"
49+
logs:
50+
enabled: "{{ dsc.global.logs.enabled }}"
51+
endpoint: "{{ dsc.global.logs.endpoint }}"
52+
metrics:
53+
enabled: "{{ dsc.global.metrics.enabled }}"
54+
endpoint: "{{ dsc.global.metrics.endpoint }}"
3955
- argocd_app: "sonarqube"
4056
vault_values:
4157
auth:

roles/socle-config/files/config.yaml

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

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ spec:
2121
projectsRootDir:
2222
- forge
2323
rootDomain: .example.com
24+
logs: {}
2425
metrics: {}
2526
alerting: {}
2627
backup:
@@ -86,6 +87,8 @@ spec:
8687
mode: primary
8788
kyverno: {}
8889
nexus: {}
90+
observatorium:
91+
enabled: false
8992
prometheus:
9093
crd:
9194
type: external

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

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,13 +562,26 @@ spec:
562562
type: string
563563
default: .example.com
564564
pattern: "^\\..*$"
565+
logs:
566+
description: Configuration for logs feature.
567+
properties:
568+
enabled:
569+
default: false
570+
description: Specifies whether logs collection should be enabled.
571+
type: boolean
572+
endpoint:
573+
description: Endpoint where logs are aggregated for this environment.
574+
type: string
565575
metrics:
566576
description: Configuration for metrics feature.
567577
properties:
568578
enabled:
569579
default: false
570580
description: Specifies whether metrics should be enabled.
571581
type: boolean
582+
endpoint:
583+
description: Endpoint where metrics are aggregated for this environment.
584+
type: string
572585
additionalLabels:
573586
description: Adds additional labels if needed, when metrics are enabled.
574587
type: object
@@ -1274,6 +1287,26 @@ spec:
12741287
type: string
12751288
type: object
12761289
type: object
1290+
observatorium:
1291+
description: Configuration for Observatorium.
1292+
properties:
1293+
enabled:
1294+
default: false
1295+
description: Enable or disable Observatorium.
1296+
type: boolean
1297+
namespace:
1298+
description: The namespace for Observatorium.
1299+
type: string
1300+
subDomain:
1301+
description: The subdomain for Observatorium.
1302+
type: string
1303+
helmRepoUrl:
1304+
description: Observatorium helm repository url.
1305+
type: string
1306+
chartVersion:
1307+
description: Observatorium helm chart version (e.g., "0.25.0").
1308+
type: string
1309+
type: object
12771310
proxy:
12781311
description: Proxy configuration for tools.
12791312
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)