Skip to content
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

Spsh 1195 #772

Open
wants to merge 42 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
aa9e2b7
fix service monitor settings
AlexanderUngefug Nov 12, 2024
65c6a78
install prom-client, npm audit fix, creating metrics module
AlexanderUngefug Nov 12, 2024
1487387
implementing metrics endpoint
AlexanderUngefug Nov 12, 2024
2dc470a
implementing dummy gauge values
AlexanderUngefug Nov 14, 2024
a08022c
configure scraping with serviceMonitor
AlexanderUngefug Nov 14, 2024
5cedf4b
fix linting
AlexanderUngefug Nov 14, 2024
9d29873
Merge branch 'main' into SPSH-1195
AlexanderUngefug Nov 14, 2024
b94d93a
fix serviceMonitor config
AlexanderUngefug Nov 14, 2024
9c06e14
get metrics
tikle-cap Nov 19, 2024
27c909b
add metrics controller tests
tikle-cap Nov 19, 2024
ff830f0
simple tests
tikle-cap Nov 19, 2024
56c52ef
add tests for findByRollen
tikle-cap Nov 19, 2024
688dfd3
fixing service monitor setting
AlexanderUngefug Nov 20, 2024
433cea1
add test
tikle-cap Nov 20, 2024
5993e5e
remove comments
tikle-cap Nov 20, 2024
22ae4c5
rewrite metrics service test
tikle-cap Nov 20, 2024
077d9ed
Merge branch 'main' into SPSH-1195
AlexanderUngefug Nov 20, 2024
66636ea
Merge branch 'main' into SPSH-1195
AlexanderUngefug Nov 21, 2024
5d9c283
implementing MetricsGuard
AlexanderUngefug Nov 21, 2024
ffdeccd
fixing type error
AlexanderUngefug Nov 21, 2024
0a006ab
Create metrics.guard.spec.ts
AlexanderUngefug Nov 21, 2024
1587045
implementing metrics config
AlexanderUngefug Nov 21, 2024
ac786b8
adding configService to test
AlexanderUngefug Nov 21, 2024
c882517
Update config.loader.spec.ts
AlexanderUngefug Nov 21, 2024
f0793e8
set test timeout to 20 minutes
AlexanderUngefug Nov 21, 2024
75f2ebf
add coverage mock metrics guard
AlexanderUngefug Nov 21, 2024
c1121b9
fixing metrics controller test
AlexanderUngefug Nov 21, 2024
509832f
Merge branch 'main' into SPSH-1195
AlexanderUngefug Nov 21, 2024
5a348d0
fixing values yaml
AlexanderUngefug Nov 21, 2024
db96f92
removing metrics from api
AlexanderUngefug Nov 21, 2024
517cb2b
remove basic auth
AlexanderUngefug Nov 21, 2024
c4a11d3
fix route
AlexanderUngefug Nov 21, 2024
288b4cc
remove metrics secret config
AlexanderUngefug Nov 22, 2024
662df91
fixing
AlexanderUngefug Nov 22, 2024
7d5268d
Merge branch 'main' into SPSH-1195
AlexanderUngefug Nov 22, 2024
f16faf0
Merge branch 'main' into SPSH-1195
AlexanderUngefug Nov 25, 2024
db38470
remove system variables from secrets to configmap
AlexanderUngefug Nov 25, 2024
59d8576
refactor reporter to injectable, refactor scope to repo
AlexanderUngefug Nov 25, 2024
d1d739d
ADD INTEGRATION TEST
AlexanderUngefug Nov 25, 2024
b24b12a
refactor folder structure
AlexanderUngefug Nov 25, 2024
4ad6cb5
fixing tests
AlexanderUngefug Nov 26, 2024
9ac84d7
Merge branch 'main' into SPSH-1195
AlexanderUngefug Nov 26, 2024
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
12 changes: 6 additions & 6 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ jobs:
uses: dBildungsplattform/dbp-github-workflows/.github/workflows/check-nest-test-sonarcloud.yaml@5
with:
node_version: '18'
timeout_minutes: 15
timeout_minutes: 20
permissions:
contents: read
secrets: inherit

release_image:
name: "Publish image and scan with trivy"
needs:
needs:
- codeql_analyze
- nest_lint
- tests_and_sonarcloud
Expand All @@ -57,7 +57,7 @@ jobs:
container_registry: "ghcr.io"
fail_on_vulnerabilites: false
report_location: "Dockerfile"

# Helm Chart
scan_helm:
uses: dBildungsplattform/dbp-github-workflows/.github/workflows/check-helm-kics.yaml@5
Expand All @@ -70,8 +70,8 @@ jobs:
secrets: inherit
with:
chart_name: "dbildungs-iam-server"
helm_chart_version_generation: specified
image_tag_generation: specified
helm_chart_version_generation: specified
image_tag_generation: specified
helm_chart_version: "${{ github.ref_name }}"
image_tag: "${{ github.ref_name }}"
helm_repo_list: "bitnami,https://charts.bitnami.com/bitnami"
helm_repo_list: "bitnami,https://charts.bitnami.com/bitnami"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,4 @@ dist
.vscode/settings.json

mariadb/
test/secrets.test.json
2 changes: 1 addition & 1 deletion charts/dbildungs-iam-server/config/secrets.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
"REDIS": {
"PASSWORD": "password"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,21 +86,6 @@
secretKeyRef:
name: {{ default .Values.auth.existingSecret .Values.auth.secretName }}
key: pi-user-realm
- name: SYSTEM_RENAME_WAITING_TIME_IN_SECONDS
valueFrom:
secretKeyRef:
name: {{ default .Values.auth.existingSecret .Values.auth.secretName }}
key: system-rename-waiting-time-in-seconds
- name: SYSTEM_STEP_UP_TIMEOUT_IN_SECONDS
valueFrom:
secretKeyRef:
name: {{ default .Values.auth.existingSecret .Values.auth.secretName }}
key: system-step-up-timeout-in-seconds
- name: SYSTEM_STEP_UP_TIMEOUT_ENABLED
valueFrom:
secretKeyRef:
name: {{ default .Values.auth.existingSecret .Values.auth.secretName }}
key: system-step-up-timeout-enabled
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{{if .Values.backend.serviceMonitor.enabled }}
{{ if .Values.backend.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "common.names.name" . }}-backend
name: {{ template "common.names.name" . }}
namespace: {{ template "common.names.namespace" . }}
labels:
{{- include "common.labels" . | nindent 4 }}
Expand All @@ -13,9 +13,11 @@ spec:
- {{ include "common.names.namespace" . | quote }}
selector:
matchLabels:
app.kubernetes.io/name: {{ template "common.names.name" . }}-backend
app.kubernetes.io/name: {{ template "common.names.name" . }}
app.kubernetes.io/component: server-backend
endpoints:
- port: {{ (index .Values.backend.serviceMonitor.endpoints 0).port }}
path: {{ .Values.backend.serviceMonitor.path }}
interval: {{ .Values.backend.serviceMonitor.interval }}
{{ end }}

3 changes: 3 additions & 0 deletions charts/dbildungs-iam-server/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ data:
LDAP_OEFFENTLICHE_SCHULEN_DOMAIN: "{{ .Values.ldap.oeffentlicheSchulenDomain }}"
LDAP_ERSATZSCHULEN_DOMAIN: "{{ .Values.ldap.ersatzschulenDomain }}"
STATUS_REDIRECT_URL: "{{ .Values.status.url }}"
SYSTEM_RENAME_WAITING_TIME_IN_SECONDS: "{{ .Values.backend.env.renameWaitingTimeInSeconds }}"
SYSTEM_STEP_UP_TIMEOUT_ENABLED: "{{ .Values.backend.env.stepUpTimeoutEnabled }}"
SYSTEM_STEP_UP_TIMEOUT_IN_SECONDS: "{{ .Values.backend.env.stepUpTimeoutInSeconds }}"
3 changes: 0 additions & 3 deletions charts/dbildungs-iam-server/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ data:
pi-admin-password: {{ .Values.auth.pi_admin_password }}
pi-user-resolver: {{ .Values.auth.pi_user_resolver }}
pi-user-realm: {{ .Values.auth.pi_user_realm }}
system-rename-waiting-time-in-seconds: {{ .Values.auth.system_rename_waiting_time_in_seconds }}
system-step-up-timeout-in-seconds: {{ .Values.auth.system_step_up_timeout_in_seconds }}
system-step-up-enabled: {{ .Values.auth.system_step_up_enabled }}
secrets-json: {{ .Values.auth.secrets_json }}
redis-password: {{ .Values.auth.redis_password }}
{{- end }}
9 changes: 6 additions & 3 deletions charts/dbildungs-iam-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ auth:
pi_admin_password: ''
pi_user_resolver: ''
pi_user_realm: ''
system_rename_waiting_time_in_seconds: ''
system_step_up_timeout_in_seconds: ''
system_step_up_timeout_enabled: ''
redis_password: ''

backend:
Expand Down Expand Up @@ -114,6 +111,8 @@ backend:
http: 80
serviceMonitor:
enabled: true
path: "/metrics"
interval: 30s
endpoints:
- port: 'web'
extraEnvVars: []
Expand All @@ -127,6 +126,10 @@ backend:
subPath: secrets-json
name: secret-volume
extraVolumeMounts: []
env:
renameWaitingTimeInSeconds: 3
stepUpTimeoutInSeconds: 900
stepUpTimeoutEnabled: 'false'

redis:
enabled: true
Expand Down
Loading
Loading