Skip to content

Commit 413670c

Browse files
committed
feat: Update dora metrics to V2 to monitor namespaces
Signed-off-by: flacatus <[email protected]>
1 parent 44fdb62 commit 413670c

File tree

11 files changed

+201
-1
lines changed

11 files changed

+201
-1
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
apiVersion: argoproj.io/v1alpha1
3+
kind: ApplicationSet
4+
metadata:
5+
name: konflux-devlake
6+
spec:
7+
generators:
8+
- clusters:
9+
values:
10+
sourceRoot: components/konflux-devlake
11+
environment: "staging"
12+
template:
13+
metadata:
14+
name: konflux-devlake
15+
spec:
16+
project: default
17+
source:
18+
repoURL: https://github.com/flacatus/infra-common-deployments.git
19+
targetRevision: devlake
20+
path: '{{values.sourceRoot}}/{{values.environment}}'
21+
destination:
22+
namespace: konflux-devlake
23+
server: '{{server}}'
24+
syncPolicy:
25+
automated:
26+
prune: true
27+
selfHeal: true
28+
syncOptions:
29+
- CreateNamespace=true
30+
retry:
31+
limit: -1
32+
backoff:
33+
duration: 10s
34+
factor: 2
35+
maxDuration: 3m
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
apiVersion: external-secrets.io/v1beta1
3+
kind: ExternalSecret
4+
metadata:
5+
name: konflux-devlake-secrets
6+
annotations:
7+
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
8+
argocd.argoproj.io/sync-wave: "-1"
9+
spec:
10+
dataFrom:
11+
- extract:
12+
conversionStrategy: Default
13+
decodingStrategy: None
14+
key: staging/group-sync/konflux-devlake-secrets
15+
refreshInterval: 1h
16+
secretStoreRef:
17+
kind: ClusterSecretStore
18+
name: appsre-stonesoup-vault
19+
target:
20+
creationPolicy: Owner
21+
deletionPolicy: Delete
22+
name: konflux-devlake-secrets
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
apiVersion: kustomize.config.k8s.io/v1beta1
3+
kind: Kustomization
4+
resources:
5+
- konflux-devlake-secrets.yaml
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
apiVersion: kustomize.config.k8s.io/v1beta1
3+
kind: Kustomization
4+
resources:
5+
- appset.yaml
6+
# - external-secrets

argo-cd-apps/base/internal/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ resources:
66
- openshift-pipelines
77
- kargo
88
- cert-manager
9+
- konflux-devlake

argo-cd-apps/overlays/internal-staging/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
apiVersion: kustomize.config.k8s.io/v1beta1
33
kind: Kustomization
4-
namespace: argocd-local
4+
namespace: openshift-gitops
55
resources:
66
- ../../base/all-clusters
77
- ../../base/internal
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
apiVersion: kustomize.config.k8s.io/v1beta1
3+
kind: Kustomization
4+
5+
namespace: konflux-devlake
6+
7+
resources:
8+
- namespace.yaml
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
apiVersion: v1
3+
kind: Namespace
4+
metadata:
5+
name: konflux-devlake
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
lake:
2+
encryptionSecret:
3+
secretName: konflux-devlake-encryption-secret
4+
autoCreateSecret: false
5+
securityContext: {}
6+
containerSecurityContext: {}
7+
envs:
8+
REMOTE_PLUGIN_DIR: ""
9+
DISABLED_REMOTE_PLUGINS: "true"
10+
API_REQUESTS_PER_HOUR: "100000"
11+
LOGGING_DIR: "/tmp"
12+
envFrom:
13+
- secretRef:
14+
name: konflux-devlake-secrets
15+
16+
mysql:
17+
useExternal: true
18+
externalServer: "kubernetes.default.svc.cluster.local" # K8s API - always available
19+
externalPort: 443 # HTTPS port - always open
20+
21+
grafana:
22+
image:
23+
repository: devlake.docker.scarf.sh/apache/devlake-dashboard
24+
tag: v1.0.2
25+
podSecurityContext: {}
26+
securityContext:
27+
fsGroup: null
28+
runAsGroup: null
29+
runAsUser: null
30+
initChownData:
31+
enabled: false
32+
envFromSecrets:
33+
- name: "konflux-devlake-secrets"
34+
env:
35+
TZ: "UTC"
36+
GF_SERVER_SERVE_FROM_SUBPATH: "true"
37+
GF_SERVER_ROOT_URL: "%(protocol)s://%(domain)s/grafana/"
38+
# Google OAuth can be configured via environment variables (add to konflux-devlake-secrets):
39+
# GF_AUTH_GOOGLE_ENABLED: "true"
40+
# GF_AUTH_GOOGLE_CLIENT_ID: "your-client-id"
41+
# GF_AUTH_GOOGLE_CLIENT_SECRET: "your-client-secret"
42+
# GF_AUTH_GOOGLE_ALLOWED_DOMAINS: "redhat.com"
43+
grafana.ini:
44+
server:
45+
serve_from_subpath: "true"
46+
root_url: "%(protocol)s://%(domain)s/grafana/"
47+
auth.google:
48+
enabled: true
49+
client_id: "${GF_AUTH_GOOGLE_CLIENT_ID}" # Set via secret
50+
client_secret: "${GF_AUTH_GOOGLE_CLIENT_SECRET}" # Set via secret
51+
scopes: "https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email openid"
52+
auth_url: "https://accounts.google.com/o/oauth2/auth"
53+
token_url: "https://accounts.google.com/o/oauth2/token"
54+
api_url: "https://www.googleapis.com/oauth2/v1/userinfo"
55+
allowed_domains: "redhat.com"
56+
allow_sign_up: true
57+
# Don't specify redirect_uri - Grafana will auto-generate it based on the actual URL
58+
59+
ui:
60+
securityContext: {}
61+
containerSecurityContext: {}
62+
basicAuth:
63+
enabled: false
64+
autoCreateSecret: true
65+
secretName: ""
66+
67+
service:
68+
type: ClusterIP
69+
70+
ingress:
71+
enabled: false
72+
73+
option:
74+
autoCreateSecret: false
75+
database: mysql
76+
connectionSecretName: "konflux-devlake-secrets"
77+
78+
extraResources:
79+
- apiVersion: route.openshift.io/v1
80+
kind: Route
81+
metadata:
82+
name: konflux-devlake-ui
83+
spec:
84+
to:
85+
kind: Service
86+
name: konflux-devlake-ui
87+
weight: 100
88+
port:
89+
targetPort: ui
90+
tls:
91+
termination: edge
92+
insecureEdgeTerminationPolicy: Redirect
93+
wildcardPolicy: None
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
apiVersion: kustomize.config.k8s.io/v1beta1
3+
kind: Kustomization
4+
5+
namespace: konflux-devlake
6+
7+
resources:
8+
- ../base
9+
10+
helmCharts:
11+
- name: devlake
12+
repo: https://apache.github.io/incubator-devlake-helm-chart
13+
version: 1.0.2
14+
releaseName: konflux-devlake
15+
namespace: konflux-devlake
16+
valuesFile: helm-values.yaml
17+
includeCRDs: true
18+
19+
commonAnnotations:
20+
argocd.argoproj.io/sync-wave: "-1"

0 commit comments

Comments
 (0)