Merge branch 'main' of https://git.forteapps.net/Forte/launchpad into feature/multicluster
This commit is contained in:
@@ -48,10 +48,10 @@ spec:
|
||||
resources:
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 64Mi
|
||||
memory: 128Mi
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
memory: 256Mi
|
||||
|
||||
# Service account
|
||||
serviceAccount:
|
||||
|
||||
@@ -15,9 +15,11 @@ spec:
|
||||
project: default
|
||||
|
||||
source:
|
||||
repoURL: git@github.com:fortedigital/sturdy-adventure.git
|
||||
repoURL: ssh://git@git.forteapps.net:2222/Forte/launchpad.git
|
||||
targetRevision: HEAD
|
||||
path: cluster-resources
|
||||
directory:
|
||||
exclude: 'network'
|
||||
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
|
||||
@@ -16,7 +16,7 @@ metadata:
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: git@github.com:fortedigital/sturdy-adventure.git
|
||||
repoURL: ssh://git@git.forteapps.net:2222/Forte/launchpad.git
|
||||
targetRevision: HEAD
|
||||
path: apps/overlays/eu
|
||||
destination:
|
||||
|
||||
@@ -23,7 +23,7 @@ spec:
|
||||
valueFiles:
|
||||
- $values/infra/values/base/fluent-bit-values.yaml
|
||||
|
||||
- repoURL: git@github.com:fortedigital/sturdy-adventure.git
|
||||
- repoURL: ssh://git@git.forteapps.net:2222/Forte/launchpad.git
|
||||
targetRevision: HEAD
|
||||
ref: values
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ spec:
|
||||
- $values/infra/values/base/grafana-values.yaml
|
||||
- $values/infra/values/eu/grafana-values.yaml
|
||||
|
||||
- repoURL: git@github.com:fortedigital/sturdy-adventure.git
|
||||
- repoURL: ssh://git@git.forteapps.net:2222/Forte/launchpad.git
|
||||
targetRevision: HEAD
|
||||
ref: values
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ spec:
|
||||
- $values/infra/values/base/keycloak-values.yaml
|
||||
- $values/infra/values/eu/keycloak-values.yaml
|
||||
|
||||
- repoURL: git@github.com:fortedigital/sturdy-adventure.git
|
||||
- repoURL: ssh://git@git.forteapps.net:2222/Forte/launchpad.git
|
||||
targetRevision: HEAD
|
||||
ref: values
|
||||
|
||||
@@ -41,3 +41,9 @@ spec:
|
||||
- CreateNamespace=true
|
||||
- Validate=true
|
||||
- ServerSideApply=true
|
||||
|
||||
ignoreDifferences:
|
||||
- group: batch
|
||||
kind: CronJob
|
||||
jsonPointers:
|
||||
- /spec/jobTemplate/spec/template/spec/containers/0/args
|
||||
|
||||
@@ -15,7 +15,7 @@ spec:
|
||||
project: default
|
||||
|
||||
source:
|
||||
repoURL: git@github.com:fortedigital/sturdy-adventure.git
|
||||
repoURL: ssh://git@git.forteapps.net:2222/Forte/launchpad.git
|
||||
targetRevision: HEAD
|
||||
path: cluster-resources/policies
|
||||
|
||||
|
||||
@@ -39,6 +39,10 @@ spec:
|
||||
targetRevision: v3.7.0 # Update to latest stable version
|
||||
helm:
|
||||
releaseName: kyverno
|
||||
valuesObject:
|
||||
grafana:
|
||||
enabled: true
|
||||
namespace: monitoring
|
||||
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
|
||||
@@ -23,7 +23,7 @@ spec:
|
||||
valueFiles:
|
||||
- $values/infra/values/base/loki-values.yaml
|
||||
|
||||
- repoURL: git@github.com:fortedigital/sturdy-adventure.git
|
||||
- repoURL: ssh://git@git.forteapps.net:2222/Forte/launchpad.git
|
||||
targetRevision: HEAD
|
||||
ref: values
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ spec:
|
||||
valueFiles:
|
||||
- $values/infra/values/base/prometheus-values.yaml
|
||||
|
||||
- repoURL: git@github.com:fortedigital/sturdy-adventure.git
|
||||
- repoURL: ssh://git@git.forteapps.net:2222/Forte/launchpad.git
|
||||
targetRevision: HEAD
|
||||
ref: values
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ metadata:
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: git@github.com:fortedigital/sturdy-adventure.git
|
||||
repoURL: ssh://git@git.forteapps.net:2222/Forte/launchpad.git
|
||||
path: secrets/eu
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
|
||||
148
infra/dashboards/dot-ai-logs.json
Normal file
148
infra/dashboards/dot-ai-logs.json
Normal file
@@ -0,0 +1,148 @@
|
||||
{
|
||||
"annotations": {
|
||||
"list": []
|
||||
},
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"title": "Log Volume",
|
||||
"type": "timeseries",
|
||||
"gridPos": {
|
||||
"h": 6,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"datasource": {
|
||||
"type": "loki",
|
||||
"uid": "loki"
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "sum(count_over_time({namespace=\"dot-ai\"} [1m])) by (pod)",
|
||||
"legendFormat": "{{pod}}",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
"drawStyle": "bars",
|
||||
"fillOpacity": 50,
|
||||
"stacking": {
|
||||
"mode": "normal"
|
||||
}
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"title": "Logs by Pod",
|
||||
"type": "logs",
|
||||
"gridPos": {
|
||||
"h": 16,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 6
|
||||
},
|
||||
"datasource": {
|
||||
"type": "loki",
|
||||
"uid": "loki"
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "{namespace=\"dot-ai\", pod=~\"$pod\"} | json log=\"log\", message=\"message\", msg=\"msg\", level=\"level\", stream=\"stream\" | label_format level=`{{if .level}}{{.level}}{{else if eq .stream \"stderr\"}}error{{else}}info{{end}}` | line_format `{{.pod}} |{{or .message .msg .log}}`",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"options": {
|
||||
"showTime": true,
|
||||
"showLabels": false,
|
||||
"showCommonLabels": false,
|
||||
"wrapLogMessage": true,
|
||||
"prettifyLogMessage": false,
|
||||
"enableLogDetails": true,
|
||||
"sortOrder": "Descending",
|
||||
"dedupStrategy": "none",
|
||||
"displayedFields": [
|
||||
"pod",
|
||||
"level"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"title": "Errors & Warnings",
|
||||
"type": "logs",
|
||||
"gridPos": {
|
||||
"h": 10,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 22
|
||||
},
|
||||
"datasource": {
|
||||
"type": "loki",
|
||||
"uid": "loki"
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "{namespace=\"dot-ai\", pod=~\"$pod\"} | json log=\"log\", message=\"message\", msg=\"msg\", level=\"level\", stream=\"stream\" | label_format level=`{{if .level}}{{.level}}{{else if eq .stream \"stderr\"}}error{{else}}info{{end}}` | level=~`error|warn|warning|fatal|panic` | line_format `{{.pod}} |{{or .message .msg .log}}`",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"options": {
|
||||
"showTime": true,
|
||||
"showLabels": false,
|
||||
"showCommonLabels": false,
|
||||
"wrapLogMessage": true,
|
||||
"prettifyLogMessage": false,
|
||||
"enableLogDetails": true,
|
||||
"sortOrder": "Descending",
|
||||
"dedupStrategy": "none",
|
||||
"displayedFields": [
|
||||
"pod",
|
||||
"level"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"schemaVersion": 39,
|
||||
"tags": [
|
||||
"dot-ai",
|
||||
"logs",
|
||||
"loki"
|
||||
],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
"name": "pod",
|
||||
"type": "query",
|
||||
"datasource": {
|
||||
"type": "loki",
|
||||
"uid": "loki"
|
||||
},
|
||||
"query": {
|
||||
"label": "pod",
|
||||
"stream": "{namespace=\"dot-ai\"}",
|
||||
"type": 1
|
||||
},
|
||||
"includeAll": true,
|
||||
"multi": true,
|
||||
"current": {
|
||||
"selected": true,
|
||||
"text": "All",
|
||||
"value": "$__all"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"time": {
|
||||
"from": "now-1h",
|
||||
"to": "now"
|
||||
},
|
||||
"title": "dot-ai Logs",
|
||||
"uid": "dot-ai-logs"
|
||||
}
|
||||
25
infra/dashboards/kustomization.yaml
Normal file
25
infra/dashboards/kustomization.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: monitoring
|
||||
|
||||
generatorOptions:
|
||||
disableNameSuffixHash: true
|
||||
labels:
|
||||
grafana_dashboard: "1"
|
||||
|
||||
configMapGenerator:
|
||||
- name: grafana-dashboard-trivy
|
||||
files:
|
||||
- trivy.json
|
||||
- name: grafana-dashboard-traefik-loki
|
||||
files:
|
||||
- traefik-loki.json
|
||||
- name: grafana-dashboard-dot-ai-logs
|
||||
files:
|
||||
- dot-ai-logs.json
|
||||
- name: grafana-dashboard-opencost
|
||||
files:
|
||||
- opencost.json
|
||||
- name: grafana-dashboard-pod-security
|
||||
files:
|
||||
- pod-security.json
|
||||
1510
infra/dashboards/opencost.json
Normal file
1510
infra/dashboards/opencost.json
Normal file
File diff suppressed because it is too large
Load Diff
399
infra/dashboards/pod-security.json
Normal file
399
infra/dashboards/pod-security.json
Normal file
@@ -0,0 +1,399 @@
|
||||
{
|
||||
"annotations": {
|
||||
"list": []
|
||||
},
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 1,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"title": "Enforced Denials",
|
||||
"description": "Pods rejected by Pod Security Standards (enforce mode)",
|
||||
"type": "stat",
|
||||
"datasource": { "type": "prometheus" },
|
||||
"gridPos": { "h": 5, "w": 6, "x": 0, "y": 0 },
|
||||
"targets": [
|
||||
{
|
||||
"expr": "sum(increase(pod_security_evaluations_total{decision=\"deny\", mode=\"enforce\"}[$__range])) or vector(0)",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"noValue": "0",
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{ "value": null, "color": "green" },
|
||||
{ "value": 1, "color": "red" }
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"reduceOptions": { "calcs": ["lastNotNull"] },
|
||||
"colorMode": "background",
|
||||
"textMode": "auto"
|
||||
}
|
||||
},
|
||||
{
|
||||
"title": "Audit Violations",
|
||||
"description": "Pods that violate audit-level policy (allowed but logged)",
|
||||
"type": "stat",
|
||||
"datasource": { "type": "prometheus" },
|
||||
"gridPos": { "h": 5, "w": 6, "x": 6, "y": 0 },
|
||||
"targets": [
|
||||
{
|
||||
"expr": "sum(increase(pod_security_evaluations_total{decision=\"deny\", mode=\"audit\"}[$__range])) or vector(0)",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"noValue": "0",
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{ "value": null, "color": "green" },
|
||||
{ "value": 1, "color": "orange" }
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"reduceOptions": { "calcs": ["lastNotNull"] },
|
||||
"colorMode": "background",
|
||||
"textMode": "auto"
|
||||
}
|
||||
},
|
||||
{
|
||||
"title": "Warnings",
|
||||
"description": "Pods that triggered warn-level policy (allowed with warning)",
|
||||
"type": "stat",
|
||||
"datasource": { "type": "prometheus" },
|
||||
"gridPos": { "h": 5, "w": 6, "x": 12, "y": 0 },
|
||||
"targets": [
|
||||
{
|
||||
"expr": "sum(increase(pod_security_evaluations_total{decision=\"deny\", mode=\"warn\"}[$__range])) or vector(0)",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"noValue": "0",
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{ "value": null, "color": "green" },
|
||||
{ "value": 1, "color": "yellow" }
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"reduceOptions": { "calcs": ["lastNotNull"] },
|
||||
"colorMode": "background",
|
||||
"textMode": "auto"
|
||||
}
|
||||
},
|
||||
{
|
||||
"title": "Total Evaluations",
|
||||
"description": "All pod security evaluations across all modes",
|
||||
"type": "stat",
|
||||
"datasource": { "type": "prometheus" },
|
||||
"gridPos": { "h": 5, "w": 6, "x": 18, "y": 0 },
|
||||
"targets": [
|
||||
{
|
||||
"expr": "sum(increase(pod_security_evaluations_total[$__range])) or vector(0)",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"noValue": "0",
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{ "value": null, "color": "blue" }
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"reduceOptions": { "calcs": ["lastNotNull"] },
|
||||
"colorMode": "background",
|
||||
"textMode": "auto"
|
||||
}
|
||||
},
|
||||
{
|
||||
"title": "Violation Rate by Mode",
|
||||
"description": "Rate of policy violations over time, grouped by enforcement mode",
|
||||
"type": "timeseries",
|
||||
"datasource": { "type": "prometheus" },
|
||||
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 5 },
|
||||
"targets": [
|
||||
{
|
||||
"expr": "sum(rate(pod_security_evaluations_total{decision=\"deny\", mode=\"enforce\"}[5m]))",
|
||||
"legendFormat": "enforce (denied)",
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"expr": "sum(rate(pod_security_evaluations_total{decision=\"deny\", mode=\"audit\"}[5m]))",
|
||||
"legendFormat": "audit",
|
||||
"refId": "B"
|
||||
},
|
||||
{
|
||||
"expr": "sum(rate(pod_security_evaluations_total{decision=\"deny\", mode=\"warn\"}[5m]))",
|
||||
"legendFormat": "warn",
|
||||
"refId": "C"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
"drawStyle": "line",
|
||||
"lineWidth": 2,
|
||||
"fillOpacity": 15,
|
||||
"pointSize": 5,
|
||||
"showPoints": "auto"
|
||||
},
|
||||
"unit": "ops"
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"matcher": { "id": "byName", "options": "enforce (denied)" },
|
||||
"properties": [{ "id": "color", "value": { "fixedColor": "red", "mode": "fixed" } }]
|
||||
},
|
||||
{
|
||||
"matcher": { "id": "byName", "options": "audit" },
|
||||
"properties": [{ "id": "color", "value": { "fixedColor": "orange", "mode": "fixed" } }]
|
||||
},
|
||||
{
|
||||
"matcher": { "id": "byName", "options": "warn" },
|
||||
"properties": [{ "id": "color", "value": { "fixedColor": "yellow", "mode": "fixed" } }]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"title": "Violations by Policy Level",
|
||||
"description": "Violation rate grouped by the PSS level that was violated",
|
||||
"type": "timeseries",
|
||||
"datasource": { "type": "prometheus" },
|
||||
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 5 },
|
||||
"targets": [
|
||||
{
|
||||
"expr": "sum(rate(pod_security_evaluations_total{decision=\"deny\"}[5m])) by (policy_level)",
|
||||
"legendFormat": "{{ policy_level }}",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
"drawStyle": "line",
|
||||
"lineWidth": 2,
|
||||
"fillOpacity": 15,
|
||||
"pointSize": 5,
|
||||
"showPoints": "auto"
|
||||
},
|
||||
"unit": "ops"
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"matcher": { "id": "byName", "options": "restricted" },
|
||||
"properties": [{ "id": "color", "value": { "fixedColor": "yellow", "mode": "fixed" } }]
|
||||
},
|
||||
{
|
||||
"matcher": { "id": "byName", "options": "baseline" },
|
||||
"properties": [{ "id": "color", "value": { "fixedColor": "orange", "mode": "fixed" } }]
|
||||
},
|
||||
{
|
||||
"matcher": { "id": "byName", "options": "privileged" },
|
||||
"properties": [{ "id": "color", "value": { "fixedColor": "red", "mode": "fixed" } }]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"title": "Enforced Denials by Namespace",
|
||||
"description": "Pods blocked per namespace (enforce mode only)",
|
||||
"type": "timeseries",
|
||||
"datasource": { "type": "prometheus" },
|
||||
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 13 },
|
||||
"targets": [
|
||||
{
|
||||
"expr": "sum(rate(pod_security_evaluations_total{decision=\"deny\", mode=\"enforce\"}[5m])) by (resource_namespace)",
|
||||
"legendFormat": "{{ resource_namespace }}",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
"drawStyle": "bars",
|
||||
"lineWidth": 1,
|
||||
"fillOpacity": 80,
|
||||
"stacking": { "mode": "normal" }
|
||||
},
|
||||
"unit": "ops"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"title": "Audit + Warn Violations by Namespace",
|
||||
"description": "Non-enforced violations per namespace — candidates for tightening",
|
||||
"type": "timeseries",
|
||||
"datasource": { "type": "prometheus" },
|
||||
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 13 },
|
||||
"targets": [
|
||||
{
|
||||
"expr": "sum(rate(pod_security_evaluations_total{decision=\"deny\", mode=~\"audit|warn\"}[5m])) by (resource_namespace)",
|
||||
"legendFormat": "{{ resource_namespace }}",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
"drawStyle": "bars",
|
||||
"lineWidth": 1,
|
||||
"fillOpacity": 80,
|
||||
"stacking": { "mode": "normal" }
|
||||
},
|
||||
"unit": "ops"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"title": "Violations Breakdown",
|
||||
"description": "Detailed breakdown of all policy violations",
|
||||
"type": "table",
|
||||
"datasource": { "type": "prometheus" },
|
||||
"gridPos": { "h": 10, "w": 24, "x": 0, "y": 21 },
|
||||
"targets": [
|
||||
{
|
||||
"expr": "sum(increase(pod_security_evaluations_total{decision=\"deny\"}[$__range])) by (resource_namespace, policy_level, mode, request_operation) > 0",
|
||||
"format": "table",
|
||||
"instant": true,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"transformations": [
|
||||
{
|
||||
"id": "organize",
|
||||
"options": {
|
||||
"excludeByName": { "Time": true },
|
||||
"renameByName": {
|
||||
"resource_namespace": "Namespace",
|
||||
"policy_level": "Policy Level",
|
||||
"mode": "Mode",
|
||||
"request_operation": "Operation",
|
||||
"Value": "Violations"
|
||||
},
|
||||
"indexByName": {
|
||||
"resource_namespace": 0,
|
||||
"policy_level": 1,
|
||||
"mode": 2,
|
||||
"request_operation": 3,
|
||||
"Value": 4
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "sortBy",
|
||||
"options": {
|
||||
"fields": {},
|
||||
"sort": [
|
||||
{ "field": "Violations", "desc": true }
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {},
|
||||
"overrides": [
|
||||
{
|
||||
"matcher": { "id": "byName", "options": "Mode" },
|
||||
"properties": [
|
||||
{
|
||||
"id": "mappings",
|
||||
"value": [
|
||||
{ "type": "value", "options": { "enforce": { "text": "Enforce", "color": "red" }, "audit": { "text": "Audit", "color": "orange" }, "warn": { "text": "Warn", "color": "yellow" } } }
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": { "id": "byName", "options": "Violations" },
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.cellOptions",
|
||||
"value": { "type": "color-background", "mode": "gradient" }
|
||||
},
|
||||
{
|
||||
"id": "thresholds",
|
||||
"value": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{ "value": null, "color": "transparent" },
|
||||
{ "value": 1, "color": "orange" },
|
||||
{ "value": 100, "color": "red" }
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"title": "Exemptions",
|
||||
"description": "Pods exempted from policy evaluation",
|
||||
"type": "timeseries",
|
||||
"datasource": { "type": "prometheus" },
|
||||
"gridPos": { "h": 8, "w": 24, "x": 0, "y": 31 },
|
||||
"targets": [
|
||||
{
|
||||
"expr": "sum(rate(pod_security_exemptions_total[5m])) by (request_namespace)",
|
||||
"legendFormat": "{{ request_namespace }}",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
"drawStyle": "line",
|
||||
"lineWidth": 2,
|
||||
"fillOpacity": 10
|
||||
},
|
||||
"unit": "ops"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
}
|
||||
],
|
||||
"schemaVersion": 39,
|
||||
"tags": [
|
||||
"security",
|
||||
"pod-security",
|
||||
"pss",
|
||||
"compliance"
|
||||
],
|
||||
"templating": {
|
||||
"list": []
|
||||
},
|
||||
"time": {
|
||||
"from": "now-24h",
|
||||
"to": "now"
|
||||
},
|
||||
"title": "Pod Security Violations",
|
||||
"uid": "pod-security-violations"
|
||||
}
|
||||
1192
infra/dashboards/traefik-loki.json
Normal file
1192
infra/dashboards/traefik-loki.json
Normal file
File diff suppressed because it is too large
Load Diff
1841
infra/dashboards/trivy.json
Normal file
1841
infra/dashboards/trivy.json
Normal file
File diff suppressed because it is too large
Load Diff
48
infra/gitea-actions.yaml
Normal file
48
infra/gitea-actions.yaml
Normal file
@@ -0,0 +1,48 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: gitea-actions
|
||||
namespace: argocd
|
||||
annotations:
|
||||
argocd.argoproj.io/sync-wave: "2"
|
||||
labels:
|
||||
app.kubernetes.io/name: gitea-actions
|
||||
app.kubernetes.io/part-of: platform
|
||||
app.kubernetes.io/managed-by: argocd
|
||||
finalizers:
|
||||
- resources-finalizer.argocd.argoproj.io
|
||||
spec:
|
||||
project: default
|
||||
|
||||
sources:
|
||||
- repoURL: https://dl.gitea.com/charts
|
||||
chart: actions
|
||||
targetRevision: "0.0.5"
|
||||
helm:
|
||||
releaseName: gitea-actions
|
||||
valueFiles:
|
||||
- $values/infra/values/gitea-actions-values.yaml
|
||||
|
||||
- repoURL: ssh://git@git.forteapps.net:2222/Forte/launchpad.git
|
||||
targetRevision: HEAD
|
||||
ref: values
|
||||
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: gitea
|
||||
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
allowEmpty: false
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
- Validate=true
|
||||
- ServerSideApply=true
|
||||
|
||||
ignoreDifferences:
|
||||
- group: apps
|
||||
kind: StatefulSet
|
||||
jsonPointers:
|
||||
- /spec/volumeClaimTemplates
|
||||
52
infra/gitea.yaml
Normal file
52
infra/gitea.yaml
Normal file
@@ -0,0 +1,52 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: gitea
|
||||
namespace: argocd
|
||||
annotations:
|
||||
argocd.argoproj.io/sync-wave: "1"
|
||||
labels:
|
||||
app.kubernetes.io/name: gitea
|
||||
app.kubernetes.io/part-of: platform
|
||||
app.kubernetes.io/managed-by: argocd
|
||||
finalizers:
|
||||
- resources-finalizer.argocd.argoproj.io
|
||||
spec:
|
||||
project: default
|
||||
|
||||
sources:
|
||||
- repoURL: https://dl.gitea.com/charts
|
||||
chart: gitea
|
||||
targetRevision: "12.5.0"
|
||||
helm:
|
||||
releaseName: gitea
|
||||
valueFiles:
|
||||
- $values/infra/values/gitea-values.yaml
|
||||
|
||||
- repoURL: ssh://git@git.forteapps.net:2222/Forte/launchpad.git
|
||||
targetRevision: HEAD
|
||||
ref: values
|
||||
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: gitea
|
||||
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
allowEmpty: false
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
- Validate=true
|
||||
- ServerSideApply=true
|
||||
|
||||
ignoreDifferences:
|
||||
- group: apps
|
||||
kind: StatefulSet
|
||||
jsonPointers:
|
||||
- /spec/volumeClaimTemplates
|
||||
- group: v1
|
||||
kind: Secret
|
||||
jsonPointers:
|
||||
- /data/postgres-password
|
||||
34
infra/grafana-dashboards.yaml
Normal file
34
infra/grafana-dashboards.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: grafana-dashboards
|
||||
namespace: argocd
|
||||
annotations:
|
||||
argocd.argoproj.io/sync-wave: "2"
|
||||
labels:
|
||||
app.kubernetes.io/name: grafana-dashboards
|
||||
app.kubernetes.io/part-of: monitoring
|
||||
app.kubernetes.io/managed-by: argocd
|
||||
finalizers:
|
||||
- resources-finalizer.argocd.argoproj.io
|
||||
spec:
|
||||
project: default
|
||||
|
||||
source:
|
||||
repoURL: ssh://git@git.forteapps.net:2222/Forte/launchpad.git
|
||||
targetRevision: HEAD
|
||||
path: infra/dashboards
|
||||
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: monitoring
|
||||
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
allowEmpty: false
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
- Validate=true
|
||||
- ServerSideApply=true
|
||||
33
infra/network-policies-application.yaml
Normal file
33
infra/network-policies-application.yaml
Normal file
@@ -0,0 +1,33 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: network-policies
|
||||
namespace: argocd
|
||||
labels:
|
||||
app.kubernetes.io/name: network-policies
|
||||
app.kubernetes.io/part-of: platform
|
||||
app.kubernetes.io/managed-by: argocd
|
||||
annotations:
|
||||
argocd.argoproj.io/sync-wave: "1"
|
||||
finalizers:
|
||||
- resources-finalizer.argocd.argoproj.io
|
||||
spec:
|
||||
project: default
|
||||
|
||||
source:
|
||||
repoURL: ssh://git@git.forteapps.net:2222/Forte/launchpad.git
|
||||
targetRevision: HEAD
|
||||
path: cluster-resources/network
|
||||
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
allowEmpty: false
|
||||
|
||||
syncOptions:
|
||||
- Validate=true
|
||||
- ServerSideApply=true
|
||||
42
infra/renovate.yaml
Normal file
42
infra/renovate.yaml
Normal file
@@ -0,0 +1,42 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: renovate
|
||||
namespace: argocd
|
||||
annotations:
|
||||
argocd.argoproj.io/sync-wave: "2"
|
||||
labels:
|
||||
app.kubernetes.io/name: renovate
|
||||
app.kubernetes.io/part-of: platform
|
||||
app.kubernetes.io/managed-by: argocd
|
||||
finalizers:
|
||||
- resources-finalizer.argocd.argoproj.io
|
||||
spec:
|
||||
project: default
|
||||
|
||||
sources:
|
||||
- repoURL: ghcr.io/renovatebot/charts
|
||||
chart: renovate
|
||||
targetRevision: "46.109.0"
|
||||
helm:
|
||||
releaseName: renovate
|
||||
valueFiles:
|
||||
- $values/infra/values/renovate-values.yaml
|
||||
|
||||
- repoURL: ssh://git@git.forteapps.net:2222/Forte/launchpad.git
|
||||
targetRevision: HEAD
|
||||
ref: values
|
||||
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: renovate
|
||||
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
allowEmpty: false
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
- Validate=true
|
||||
- ServerSideApply=true
|
||||
42
infra/tempo.yaml
Normal file
42
infra/tempo.yaml
Normal file
@@ -0,0 +1,42 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: tempo
|
||||
namespace: argocd
|
||||
annotations:
|
||||
argocd.argoproj.io/sync-wave: "1"
|
||||
labels:
|
||||
app.kubernetes.io/name: tempo
|
||||
app.kubernetes.io/part-of: monitoring
|
||||
app.kubernetes.io/managed-by: argocd
|
||||
finalizers:
|
||||
- resources-finalizer.argocd.argoproj.io
|
||||
spec:
|
||||
project: default
|
||||
|
||||
sources:
|
||||
- repoURL: https://grafana.github.io/helm-charts
|
||||
chart: tempo
|
||||
targetRevision: "1.24.4"
|
||||
helm:
|
||||
releaseName: tempo
|
||||
valueFiles:
|
||||
- $values/infra/values/tempo-values.yaml
|
||||
|
||||
- repoURL: ssh://git@git.forteapps.net:2222/Forte/launchpad.git
|
||||
targetRevision: HEAD
|
||||
ref: values
|
||||
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: monitoring
|
||||
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
allowEmpty: false
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
- Validate=true
|
||||
- ServerSideApply=true
|
||||
@@ -6,10 +6,6 @@ configs:
|
||||
application.resourceTrackingMethod: annotation
|
||||
timeout.reconciliation: 60s
|
||||
admin.enabled: "true"
|
||||
repositories: |
|
||||
- type: git
|
||||
url: https://github.com/snothub
|
||||
name: github-repo
|
||||
params:
|
||||
"server.insecure": true
|
||||
server:
|
||||
@@ -32,7 +28,7 @@ notifications:
|
||||
method: POST
|
||||
body: |
|
||||
{
|
||||
"payload": "🖥️ {{ .context.clusterName }}: 🔄 *{{ .app.metadata.name }}* is syncing...\n📦 Revision: {{ .app.status.sync.revision | substr 0 7 }}"
|
||||
"payload": "🖥️ {{ .context.clusterName }}: 🔄 *{{ .app.metadata.name }}* is syncing...\n📦 Revision: {{ .app.status.sync.revision | default `n/a` | substr 0 7 }}"
|
||||
}
|
||||
template.app-sync-succeeded: |
|
||||
webhook:
|
||||
@@ -40,7 +36,7 @@ notifications:
|
||||
method: POST
|
||||
body: |
|
||||
{
|
||||
"payload": "🖥️ {{ .context.clusterName }}: ✅ *{{ .app.metadata.name }}* sync succeeded\n📦 Revision: {{ .app.status.sync.revision | substr 0 7 }}{{ range .app.status.summary.images }}\n🏷️ Image: {{ . }}{{ end }}"
|
||||
"payload": "🖥️ {{ .context.clusterName }}: ✅ *{{ .app.metadata.name }}* sync succeeded\n📦 Revision: {{ .app.status.sync.revision | default `n/a` | substr 0 7 }}{{ range .app.status.summary.images }}\n🏷️ Image: {{ . }}{{ end }}"
|
||||
}
|
||||
template.app-sync-failed: |
|
||||
webhook:
|
||||
@@ -48,7 +44,7 @@ notifications:
|
||||
method: POST
|
||||
body: |
|
||||
{
|
||||
"payload": "🖥️ {{ .context.clusterName }}: ❌ *{{ .app.metadata.name }}* sync failed\n📦 Revision: {{ .app.status.sync.revision | substr 0 7 }}\n⚠️ Message: {{ .app.status.operationState.message }}"
|
||||
"payload": "🖥️ {{ .context.clusterName }}: ❌ *{{ .app.metadata.name }}* sync failed\n📦 Revision: {{ .app.status.sync.revision | default `n/a` | substr 0 7 }}\n⚠️ Message: {{ .app.status.operationState.message }}"
|
||||
}
|
||||
template.app-degraded: |
|
||||
webhook:
|
||||
@@ -56,7 +52,7 @@ notifications:
|
||||
method: POST
|
||||
body: |
|
||||
{
|
||||
"payload": "🖥️ {{ .context.clusterName }}: ⚠️ *{{ .app.metadata.name }}* is degraded\n🏥 Health: {{ .app.status.health.status }}\n💬 Message: {{ .app.status.health.message }}"
|
||||
"payload": "🖥️ {{ .context.clusterName }}: ⚠️ *{{ .app.metadata.name }}* is degraded\n🏥 Health: {{ .app.status.health.status }}\n📦 Revision: {{ .app.status.sync.revision | default `n/a` | substr 0 7 }}{{ range .app.status.summary.images }}\n🏷️ Image: {{ . }}{{ end }}"
|
||||
}
|
||||
|
||||
# Define notification triggers
|
||||
@@ -65,7 +61,7 @@ notifications:
|
||||
- when: app.status.operationState.phase in ['Running']
|
||||
send: [app-syncing]
|
||||
trigger.on-sync-succeeded: |
|
||||
- when: app.status.operationState.phase in ['Succeeded']
|
||||
- when: app.status.operationState.phase in ['Succeeded'] and app.status.health.status == 'Healthy'
|
||||
send: [app-sync-succeeded]
|
||||
trigger.on-sync-failed: |
|
||||
- when: app.status.operationState.phase in ['Failed']
|
||||
|
||||
@@ -48,7 +48,8 @@ config:
|
||||
Match kube.*
|
||||
Host loki-gateway.monitoring.svc.cluster.local
|
||||
Port 80
|
||||
Labels job=fluent-bit, namespace=$kubernetes['namespace_name'], pod=$kubernetes['pod_name'], container=$kubernetes['container_name']
|
||||
Labels job=fluent-bit, namespace=$kubernetes['namespace_name'], pod=$kubernetes['pod_name'], container=$kubernetes['container_name'], stream=$stream
|
||||
Auto_Kubernetes_Labels Off
|
||||
Line_Format json
|
||||
|
||||
[OUTPUT]
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -19,12 +19,18 @@ ingress:
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||
|
||||
metrics:
|
||||
enabled: true
|
||||
prometheusRule:
|
||||
namespace: monitoring
|
||||
enabled: true
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: 250m
|
||||
memory: 512Mi
|
||||
limits:
|
||||
cpu: "1"
|
||||
cpu: 500m
|
||||
memory: 1Gi
|
||||
|
||||
postgresql:
|
||||
@@ -56,5 +62,395 @@ keycloakConfigCli:
|
||||
"registrationAllowed": false,
|
||||
"loginWithEmailAllowed": true,
|
||||
"resetPasswordAllowed": true,
|
||||
"rememberMe": true
|
||||
"rememberMe": true,
|
||||
"clients": [
|
||||
{
|
||||
"clientId": "gitea",
|
||||
"name": "Gitea",
|
||||
"enabled": true,
|
||||
"protocol": "openid-connect",
|
||||
"clientAuthenticatorType": "client-secret",
|
||||
"standardFlowEnabled": true,
|
||||
"directAccessGrantsEnabled": false,
|
||||
"publicClient": false,
|
||||
"redirectUris": ["https://git.forteapps.net/*"],
|
||||
"webOrigins": ["https://git.forteapps.net"],
|
||||
"defaultClientScopes": ["openid", "email", "profile"],
|
||||
"attributes": {
|
||||
"k8s.secret.sync": "true",
|
||||
"k8s.secret.namespace": "gitea",
|
||||
"k8s.secret.name": "gitea-oidc-credentials",
|
||||
"k8s.secret.client-id-key": "key",
|
||||
"k8s.secret.client-secret-key": "secret"
|
||||
},
|
||||
"protocolMappers": [
|
||||
{
|
||||
"name": "email_verified",
|
||||
"protocol": "openid-connect",
|
||||
"protocolMapper": "oidc-hardcoded-claim-mapper",
|
||||
"config": {
|
||||
"claim.name": "email_verified",
|
||||
"claim.value": "true",
|
||||
"jsonType.label": "boolean",
|
||||
"id.token.claim": "true",
|
||||
"access.token.claim": "true",
|
||||
"userinfo.token.claim": "true"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
extraDeploy:
|
||||
# -- ServiceAccount for the client registrar CronJob
|
||||
- apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: keycloak-client-registrar
|
||||
namespace: keycloak
|
||||
|
||||
# -- ClusterRole granting access to secrets and namespaces
|
||||
- apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: keycloak-client-registrar
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["secrets"]
|
||||
verbs: ["get", "list", "create", "update", "patch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["namespaces"]
|
||||
verbs: ["get", "list"]
|
||||
|
||||
# -- ClusterRoleBinding for the registrar ServiceAccount
|
||||
- apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: keycloak-client-registrar
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: keycloak-client-registrar
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: keycloak-client-registrar
|
||||
namespace: keycloak
|
||||
|
||||
# -- CronJob: registers Keycloak clients and syncs secrets
|
||||
- apiVersion: batch/v1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: keycloak-client-registrar
|
||||
namespace: keycloak
|
||||
spec:
|
||||
schedule: "*/2 * * * *"
|
||||
concurrencyPolicy: Forbid
|
||||
successfulJobsHistoryLimit: 1
|
||||
failedJobsHistoryLimit: 3
|
||||
jobTemplate:
|
||||
spec:
|
||||
backoffLimit: 3
|
||||
template:
|
||||
spec:
|
||||
serviceAccountName: keycloak-client-registrar
|
||||
restartPolicy: Never
|
||||
containers:
|
||||
- name: registrar
|
||||
image: alpine:3.20
|
||||
command: ["/bin/sh", "-c"]
|
||||
args:
|
||||
- |
|
||||
set -e
|
||||
apk add --no-cache curl jq > /dev/null 2>&1
|
||||
|
||||
KEYCLOAK_URL="http://keycloak:80"
|
||||
REALM="forte"
|
||||
K8S_API="https://kubernetes.default.svc"
|
||||
SA_TOKEN=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)
|
||||
CA_CERT="/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
|
||||
CENTRAL_NS="secrets"
|
||||
|
||||
# --- Authenticate to Keycloak Admin API ---
|
||||
ADMIN_USER="admin"
|
||||
ADMIN_PASS=$(cat /secrets/admin-password)
|
||||
|
||||
echo "Authenticating to Keycloak..."
|
||||
TOKEN=$(curl -sf -X POST "${KEYCLOAK_URL}/realms/master/protocol/openid-connect/token" \
|
||||
-d "client_id=admin-cli" \
|
||||
-d "username=${ADMIN_USER}" \
|
||||
-d "password=${ADMIN_PASS}" \
|
||||
-d "grant_type=password" | jq -r '.access_token')
|
||||
|
||||
if [ -z "$TOKEN" ] || [ "$TOKEN" = "null" ]; then
|
||||
echo "ERROR: Failed to authenticate to Keycloak"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# --- Helper functions ---
|
||||
|
||||
# Upsert a K8s Secret: try PUT (update), fall back to POST (create)
|
||||
upsert_secret() {
|
||||
local ns="$1" name="$2" manifest="$3"
|
||||
local code
|
||||
code=$(curl -sf -o /dev/null -w "%{http_code}" \
|
||||
--cacert "$CA_CERT" \
|
||||
-H "Authorization: Bearer ${SA_TOKEN}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PUT -d "$manifest" \
|
||||
"${K8S_API}/api/v1/namespaces/${ns}/secrets/${name}")
|
||||
if [ "$code" = "200" ]; then
|
||||
echo " Updated secret '${ns}/${name}'"
|
||||
elif [ "$code" = "404" ]; then
|
||||
code=$(curl -sf -o /dev/null -w "%{http_code}" \
|
||||
--cacert "$CA_CERT" \
|
||||
-H "Authorization: Bearer ${SA_TOKEN}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST -d "$manifest" \
|
||||
"${K8S_API}/api/v1/namespaces/${ns}/secrets")
|
||||
if [ "$code" = "201" ]; then
|
||||
echo " Created secret '${ns}/${name}'"
|
||||
else
|
||||
echo " ERROR: Failed to create secret '${ns}/${name}' (HTTP ${code})"
|
||||
return 1
|
||||
fi
|
||||
else
|
||||
echo " ERROR: Failed to update secret '${ns}/${name}' (HTTP ${code})"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Build a credential Secret JSON manifest
|
||||
build_credential_secret() {
|
||||
local ns="$1" name="$2" id_key="$3" secret_key="$4" b64_id="$5" b64_secret="$6"
|
||||
cat <<MANIFEST
|
||||
{
|
||||
"apiVersion": "v1",
|
||||
"kind": "Secret",
|
||||
"metadata": {
|
||||
"name": "${name}",
|
||||
"namespace": "${ns}",
|
||||
"labels": {
|
||||
"app.kubernetes.io/managed-by": "keycloak-client-registrar"
|
||||
}
|
||||
},
|
||||
"type": "Opaque",
|
||||
"data": {
|
||||
"${id_key}": "${b64_id}",
|
||||
"${secret_key}": "${b64_secret}"
|
||||
}
|
||||
}
|
||||
MANIFEST
|
||||
}
|
||||
|
||||
# Sync credentials to target + central namespace
|
||||
sync_credentials() {
|
||||
local client_id="$1" client_uuid="$2" target_ns="$3" target_name="$4" id_key="$5" secret_key="$6"
|
||||
|
||||
# Get the client secret from Keycloak
|
||||
local secret_value
|
||||
secret_value=$(curl -sf -H "Authorization: Bearer ${TOKEN}" \
|
||||
"${KEYCLOAK_URL}/admin/realms/${REALM}/clients/${client_uuid}/client-secret" \
|
||||
| jq -r '.value')
|
||||
|
||||
if [ -z "$secret_value" ] || [ "$secret_value" = "null" ]; then
|
||||
echo " WARNING: No secret found for client '${client_id}', skipping"
|
||||
return 0
|
||||
fi
|
||||
|
||||
local b64_id b64_secret
|
||||
b64_id=$(printf '%s' "$client_id" | base64 | tr -d '\n')
|
||||
b64_secret=$(printf '%s' "$secret_value" | base64 | tr -d '\n')
|
||||
|
||||
# Write to target namespace (if it exists)
|
||||
local ns_status
|
||||
ns_status=$(curl -sf -o /dev/null -w "%{http_code}" \
|
||||
--cacert "$CA_CERT" \
|
||||
-H "Authorization: Bearer ${SA_TOKEN}" \
|
||||
"${K8S_API}/api/v1/namespaces/${target_ns}")
|
||||
|
||||
if [ "$ns_status" = "200" ]; then
|
||||
local manifest
|
||||
manifest=$(build_credential_secret "$target_ns" "$target_name" "$id_key" "$secret_key" "$b64_id" "$b64_secret")
|
||||
upsert_secret "$target_ns" "$target_name" "$manifest" || return 1
|
||||
else
|
||||
echo " WARNING: Namespace '${target_ns}' does not exist, skipping target"
|
||||
fi
|
||||
|
||||
# Always write a central copy to the secrets namespace
|
||||
local central_manifest
|
||||
central_manifest=$(build_credential_secret "$CENTRAL_NS" "$target_name" "$id_key" "$secret_key" "$b64_id" "$b64_secret")
|
||||
upsert_secret "$CENTRAL_NS" "$target_name" "$central_manifest" || return 1
|
||||
}
|
||||
|
||||
# Annotate a K8s Secret with sync status
|
||||
annotate_secret() {
|
||||
local ns="$1" name="$2" key="$3" value="$4"
|
||||
local patch
|
||||
patch=$(printf '{"metadata":{"annotations":{"%s":"%s"}}}' "$key" "$value")
|
||||
curl -sf -o /dev/null \
|
||||
--cacert "$CA_CERT" \
|
||||
-H "Authorization: Bearer ${SA_TOKEN}" \
|
||||
-H "Content-Type: application/strategic-merge-patch+json" \
|
||||
-X PATCH -d "$patch" \
|
||||
"${K8S_API}/api/v1/namespaces/${ns}/secrets/${name}"
|
||||
}
|
||||
|
||||
# =============================================
|
||||
# LEGACY PATH — sync existing realm clients
|
||||
# =============================================
|
||||
echo "=== Legacy sync: clients with k8s.secret.sync=true ==="
|
||||
|
||||
CLIENTS=$(curl -sf -H "Authorization: Bearer ${TOKEN}" \
|
||||
"${KEYCLOAK_URL}/admin/realms/${REALM}/clients")
|
||||
|
||||
SYNC_CLIENTS=$(echo "$CLIENTS" | jq -c '[.[] | select(.attributes["k8s.secret.sync"] == "true")]')
|
||||
COUNT=$(echo "$SYNC_CLIENTS" | jq 'length')
|
||||
echo "Found ${COUNT} legacy client(s) with sync enabled"
|
||||
|
||||
echo "$SYNC_CLIENTS" | jq -c '.[]' | while read -r CLIENT; do
|
||||
CLIENT_ID=$(echo "$CLIENT" | jq -r '.clientId')
|
||||
CLIENT_UUID=$(echo "$CLIENT" | jq -r '.id')
|
||||
TARGET_NS=$(echo "$CLIENT" | jq -r '.attributes["k8s.secret.namespace"]')
|
||||
TARGET_NAME=$(echo "$CLIENT" | jq -r '.attributes["k8s.secret.name"]')
|
||||
ID_KEY=$(echo "$CLIENT" | jq -r '.attributes["k8s.secret.client-id-key"] // "client-id"')
|
||||
SECRET_KEY=$(echo "$CLIENT" | jq -r '.attributes["k8s.secret.client-secret-key"] // "client-secret"')
|
||||
|
||||
echo "Processing legacy client '${CLIENT_ID}' -> '${TARGET_NS}/${TARGET_NAME}' (keys: ${ID_KEY}, ${SECRET_KEY})"
|
||||
sync_credentials "$CLIENT_ID" "$CLIENT_UUID" "$TARGET_NS" "$TARGET_NAME" "$ID_KEY" "$SECRET_KEY"
|
||||
done
|
||||
|
||||
# =============================================
|
||||
# NEW PATH — self-service config Secrets
|
||||
# =============================================
|
||||
echo ""
|
||||
echo "=== Self-service: config Secrets with label keycloak.forteapps.net/client-config=true ==="
|
||||
|
||||
CONFIG_SECRETS=$(curl -sf \
|
||||
--cacert "$CA_CERT" \
|
||||
-H "Authorization: Bearer ${SA_TOKEN}" \
|
||||
"${K8S_API}/api/v1/namespaces/keycloak/secrets?labelSelector=keycloak.forteapps.net/client-config=true")
|
||||
|
||||
CONFIG_COUNT=$(echo "$CONFIG_SECRETS" | jq '.items | length')
|
||||
echo "Found ${CONFIG_COUNT} config Secret(s) to process"
|
||||
|
||||
echo "$CONFIG_SECRETS" | jq -c '.items[]' | while read -r CONFIG_SECRET; do
|
||||
CONFIG_NAME=$(echo "$CONFIG_SECRET" | jq -r '.metadata.name')
|
||||
SOURCE_NS=$(echo "$CONFIG_SECRET" | jq -r '.metadata.annotations["keycloak.forteapps.net/source-namespace"] // .metadata.labels["keycloak.forteapps.net/source-namespace"] // "unknown"')
|
||||
|
||||
# Decode client.json from the Secret data
|
||||
CLIENT_JSON_B64=$(echo "$CONFIG_SECRET" | jq -r '.data["client.json"] // empty')
|
||||
if [ -z "$CLIENT_JSON_B64" ]; then
|
||||
echo "WARNING: Config Secret '${CONFIG_NAME}' missing client.json field, skipping"
|
||||
continue
|
||||
fi
|
||||
CLIENT_JSON=$(printf '%s' "$CLIENT_JSON_B64" | base64 -d)
|
||||
|
||||
CLIENT_ID=$(echo "$CLIENT_JSON" | jq -r '.clientId')
|
||||
echo "Processing self-service client '${CLIENT_ID}' from config '${CONFIG_NAME}'"
|
||||
|
||||
# Compute config hash for change detection
|
||||
CONFIG_HASH=$(printf '%s' "$CLIENT_JSON" | sha256sum | cut -d' ' -f1)
|
||||
EXISTING_HASH=$(echo "$CONFIG_SECRET" | jq -r '.metadata.annotations["keycloak.forteapps.net/config-hash"] // ""')
|
||||
|
||||
# Extract secret delivery config from client.json
|
||||
CRED_NS=$(echo "$CLIENT_JSON" | jq -r '.secret.namespace // "'"${SOURCE_NS}"'"')
|
||||
CRED_NAME=$(echo "$CLIENT_JSON" | jq -r '.secret.name // "'"${CLIENT_ID}"'-oidc-credentials"')
|
||||
CRED_ID_KEY=$(echo "$CLIENT_JSON" | jq -r '.secret.keys.clientId // "client-id"')
|
||||
CRED_SECRET_KEY=$(echo "$CLIENT_JSON" | jq -r '.secret.keys.clientSecret // "client-secret"')
|
||||
|
||||
# Check if credential Secret already exists in target namespace
|
||||
CRED_EXISTS=$(curl -sf -o /dev/null -w "%{http_code}" \
|
||||
--cacert "$CA_CERT" \
|
||||
-H "Authorization: Bearer ${SA_TOKEN}" \
|
||||
"${K8S_API}/api/v1/namespaces/${CRED_NS}/secrets/${CRED_NAME}")
|
||||
|
||||
# Skip if hash matches and credential Secret exists
|
||||
if [ "$CONFIG_HASH" = "$EXISTING_HASH" ] && [ "$CRED_EXISTS" = "200" ]; then
|
||||
echo " No changes detected, skipping"
|
||||
continue
|
||||
fi
|
||||
|
||||
# Build Keycloak client representation (strip our secret delivery config)
|
||||
KC_CLIENT=$(echo "$CLIENT_JSON" | jq '{
|
||||
clientId: .clientId,
|
||||
name: .name,
|
||||
enabled: true,
|
||||
protocol: "openid-connect",
|
||||
clientAuthenticatorType: "client-secret",
|
||||
standardFlowEnabled: true,
|
||||
directAccessGrantsEnabled: false,
|
||||
publicClient: false,
|
||||
redirectUris: .redirectUris,
|
||||
webOrigins: .webOrigins,
|
||||
defaultClientScopes: .defaultClientScopes,
|
||||
protocolMappers: (.protocolMappers // [])
|
||||
}')
|
||||
|
||||
# Check if client already exists
|
||||
EXISTING=$(curl -sf -H "Authorization: Bearer ${TOKEN}" \
|
||||
"${KEYCLOAK_URL}/admin/realms/${REALM}/clients?clientId=${CLIENT_ID}" \
|
||||
| jq -r '.[0].id // empty')
|
||||
|
||||
if [ -n "$EXISTING" ]; then
|
||||
echo " Updating existing Keycloak client (uuid: ${EXISTING})"
|
||||
HTTP_CODE=$(curl -sf -o /dev/null -w "%{http_code}" \
|
||||
-H "Authorization: Bearer ${TOKEN}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X PUT -d "$KC_CLIENT" \
|
||||
"${KEYCLOAK_URL}/admin/realms/${REALM}/clients/${EXISTING}")
|
||||
if [ "$HTTP_CODE" != "204" ] && [ "$HTTP_CODE" != "200" ]; then
|
||||
echo " ERROR: Failed to update client '${CLIENT_ID}' (HTTP ${HTTP_CODE})"
|
||||
annotate_secret "keycloak" "$CONFIG_NAME" "keycloak.forteapps.net/sync-status" "error"
|
||||
continue
|
||||
fi
|
||||
CLIENT_UUID="$EXISTING"
|
||||
else
|
||||
echo " Creating new Keycloak client '${CLIENT_ID}'"
|
||||
HTTP_CODE=$(curl -sf -o /dev/null -w "%{http_code}" \
|
||||
-H "Authorization: Bearer ${TOKEN}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-X POST -d "$KC_CLIENT" \
|
||||
"${KEYCLOAK_URL}/admin/realms/${REALM}/clients")
|
||||
if [ "$HTTP_CODE" != "201" ]; then
|
||||
echo " ERROR: Failed to create client '${CLIENT_ID}' (HTTP ${HTTP_CODE})"
|
||||
annotate_secret "keycloak" "$CONFIG_NAME" "keycloak.forteapps.net/sync-status" "error"
|
||||
continue
|
||||
fi
|
||||
# Fetch the newly created client's UUID
|
||||
CLIENT_UUID=$(curl -sf -H "Authorization: Bearer ${TOKEN}" \
|
||||
"${KEYCLOAK_URL}/admin/realms/${REALM}/clients?clientId=${CLIENT_ID}" \
|
||||
| jq -r '.[0].id')
|
||||
fi
|
||||
|
||||
# Sync credentials to target namespace
|
||||
sync_credentials "$CLIENT_ID" "$CLIENT_UUID" "$CRED_NS" "$CRED_NAME" "$CRED_ID_KEY" "$CRED_SECRET_KEY"
|
||||
|
||||
# Annotate config Secret with hash and sync status
|
||||
annotate_secret "keycloak" "$CONFIG_NAME" "keycloak.forteapps.net/config-hash" "$CONFIG_HASH"
|
||||
annotate_secret "keycloak" "$CONFIG_NAME" "keycloak.forteapps.net/sync-status" "synced"
|
||||
TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
||||
annotate_secret "keycloak" "$CONFIG_NAME" "keycloak.forteapps.net/last-sync" "$TIMESTAMP"
|
||||
echo " Synced successfully"
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "Client registrar run complete"
|
||||
volumeMounts:
|
||||
- name: keycloak-credentials
|
||||
mountPath: /secrets
|
||||
readOnly: true
|
||||
resources:
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 128Mi
|
||||
volumes:
|
||||
- name: keycloak-credentials
|
||||
secret:
|
||||
secretName: keycloak-credentials
|
||||
items:
|
||||
- key: admin-password
|
||||
path: admin-password
|
||||
|
||||
@@ -20,20 +20,22 @@ loki:
|
||||
limits_config:
|
||||
reject_old_samples: true
|
||||
reject_old_samples_max_age: 168h
|
||||
ingestion_rate_mb: 10
|
||||
ingestion_burst_size_mb: 20
|
||||
ingestion_rate_mb: 15
|
||||
ingestion_burst_size_mb: 30
|
||||
max_line_size: 512KB
|
||||
chunksCache:
|
||||
enabled: false
|
||||
resultsCache:
|
||||
enabled: false
|
||||
singleBinary:
|
||||
replicas: 1
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 512Mi
|
||||
cpu: 50m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 2Gi
|
||||
cpu: 100m
|
||||
memory: 1Gi
|
||||
read:
|
||||
replicas: 0
|
||||
backend:
|
||||
|
||||
@@ -6,13 +6,15 @@ server:
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: 250m
|
||||
cpu: 150m
|
||||
memory: 512Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
cpu: 300m
|
||||
memory: 1Gi
|
||||
|
||||
enableLifecycle: true
|
||||
extraFlags:
|
||||
- web.enable-remote-write-receiver
|
||||
|
||||
extraScrapeConfigs: |
|
||||
- job_name: kyverno
|
||||
@@ -56,5 +58,24 @@ extraScrapeConfigs: |
|
||||
- source_labels: [__meta_kubernetes_pod_label_app_kubernetes_io_instance]
|
||||
target_label: instance
|
||||
|
||||
- job_name: traefik
|
||||
scrape_interval: 15s
|
||||
metrics_path: /metrics
|
||||
kubernetes_sd_configs:
|
||||
- role: endpoints
|
||||
namespaces:
|
||||
names:
|
||||
- traefik-system
|
||||
relabel_configs:
|
||||
- source_labels: [__meta_kubernetes_endpoint_port_name]
|
||||
regex: metrics
|
||||
action: keep
|
||||
- source_labels: [__meta_kubernetes_service_name]
|
||||
target_label: service
|
||||
- source_labels: [__meta_kubernetes_pod_name]
|
||||
target_label: pod
|
||||
- source_labels: [__meta_kubernetes_namespace]
|
||||
target_label: namespace
|
||||
|
||||
alertmanager:
|
||||
enabled: false
|
||||
|
||||
36
infra/values/gitea-actions-values.yaml
Normal file
36
infra/values/gitea-actions-values.yaml
Normal file
@@ -0,0 +1,36 @@
|
||||
## Gitea Act Runner - Helm values
|
||||
## Chart: actions v0.0.5 (https://dl.gitea.com/charts)
|
||||
|
||||
enabled: true
|
||||
|
||||
giteaRootURL: https://git.forteapps.net
|
||||
|
||||
existingSecret: gitea-runner-token
|
||||
existingSecretKey: token
|
||||
|
||||
statefulset:
|
||||
replicas: 3
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: 250m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: "1"
|
||||
memory: 1Gi
|
||||
|
||||
actRunner:
|
||||
config: |
|
||||
log:
|
||||
level: info
|
||||
cache:
|
||||
enabled: false
|
||||
container:
|
||||
require_docker: true
|
||||
docker_timeout: 300s
|
||||
runner:
|
||||
labels:
|
||||
- "ubuntu-latest:docker://catthehacker/ubuntu:act-22.04"
|
||||
- "ubuntu-22.04:docker://catthehacker/ubuntu:act-22.04"
|
||||
dind:
|
||||
rootless: false
|
||||
181
infra/values/gitea-values.yaml
Normal file
181
infra/values/gitea-values.yaml
Normal file
@@ -0,0 +1,181 @@
|
||||
# Gitea Helm Chart Values
|
||||
# Host: git.forteapps.net
|
||||
# Chart: gitea v12.5.0 (app v1.25.4)
|
||||
# Repo: https://dl.gitea.com/charts
|
||||
|
||||
# -- Admin account (password from sealed secret)
|
||||
gitea:
|
||||
admin:
|
||||
existingSecret: gitea-credentials
|
||||
email: admin@forteapps.net
|
||||
|
||||
# -- Gitea app.ini configuration
|
||||
config:
|
||||
APP_NAME: "Forte Git"
|
||||
|
||||
server:
|
||||
DOMAIN: git.forteapps.net
|
||||
ROOT_URL: https://git.forteapps.net
|
||||
SSH_DOMAIN: git.forteapps.net
|
||||
SSH_PORT: 2222
|
||||
LFS_START_SERVER: true
|
||||
ENABLE_GITEA_PAGES: true
|
||||
ENABLE_BASIC_AUTH_CHALLENGE: true
|
||||
|
||||
service:
|
||||
DISABLE_REGISTRATION: false
|
||||
DEFAULT_ALLOW_CREATE_ORGANIZATION: false
|
||||
REQUIRE_SIGNIN_VIEW: false
|
||||
ALLOW_ONLY_EXTERNAL_REGISTRATION: true
|
||||
ENABLE_BASIC_AUTHENTICATION: true
|
||||
ENABLE_PASSWORD_SIGNIN_FORM: false
|
||||
ENABLE_NOTIFY_MAIL: true
|
||||
|
||||
openid:
|
||||
ENABLE_OPENID_SIGNIN: false
|
||||
ENABLE_OPENID_SIGNUP: false
|
||||
|
||||
oauth2:
|
||||
ENABLED: true
|
||||
ENABLE_AUTO_REGISTRATION: true
|
||||
USERNAME: email
|
||||
|
||||
session:
|
||||
PROVIDER: db
|
||||
|
||||
cache:
|
||||
ADAPTER: memory
|
||||
|
||||
database:
|
||||
DB_TYPE: postgres
|
||||
|
||||
metrics:
|
||||
ENABLED: true
|
||||
|
||||
repository:
|
||||
DEFAULT_BRANCH: main
|
||||
DEFAULT_PRIVATE: last
|
||||
|
||||
actions:
|
||||
ENABLED: true
|
||||
|
||||
packages:
|
||||
ENABLED: true
|
||||
|
||||
indexer:
|
||||
ISSUE_INDEXER_TYPE: bleve
|
||||
REPO_INDEXER_ENABLED: true
|
||||
|
||||
mailer:
|
||||
ENABLED: true
|
||||
PROTOCOL: smtp+starttls
|
||||
SMTP_ADDR: smtp.office365.com
|
||||
SMTP_PORT: 587
|
||||
FROM: "noreply@fortedigital.com"
|
||||
|
||||
admin:
|
||||
DEFAULT_EMAIL_NOTIFICATIONS: enabled
|
||||
|
||||
# -- SMTP credentials injected from secret (USER and PASSWD)
|
||||
additionalConfigFromEnvs:
|
||||
- name: GITEA__mailer__USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: gitea-smtp-secret
|
||||
key: username
|
||||
- name: GITEA__mailer__PASSWD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: gitea-smtp-secret
|
||||
key: password
|
||||
# -- OIDC authentication via Forte
|
||||
oauth:
|
||||
- name: "Forte"
|
||||
provider: "openidConnect"
|
||||
existingSecret: gitea-oidc-credentials
|
||||
key: gitea
|
||||
autoDiscoverUrl: "https://id.forteapps.net/realms/forte/.well-known/openid-configuration"
|
||||
scopes: "openid email profile organization"
|
||||
groupClaimName: "groups"
|
||||
adminGroup: ""
|
||||
restrictedGroup: ""
|
||||
# -- Prometheus metrics (scraped via annotations, no ServiceMonitor CRD needed)
|
||||
metrics:
|
||||
enabled: true
|
||||
serviceMonitor:
|
||||
enabled: false
|
||||
|
||||
# -- Ingress via Traefik with Let's Encrypt TLS
|
||||
ingress:
|
||||
enabled: true
|
||||
className: traefik
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||
hosts:
|
||||
- host: git.forteapps.net
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
tls:
|
||||
- secretName: gitea-tls
|
||||
hosts:
|
||||
- git.forteapps.net
|
||||
|
||||
# -- Git repository storage
|
||||
persistence:
|
||||
enabled: true
|
||||
size: 10Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClass: upcloud-block-storage-maxiops
|
||||
|
||||
# -- Recreate strategy to avoid Multi-Attach errors with RWO volumes
|
||||
strategy:
|
||||
type: Recreate
|
||||
|
||||
# -- Pod resources
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 512Mi
|
||||
|
||||
# -- Embedded PostgreSQL (Bitnami subchart)
|
||||
# Password auto-generated by the subchart; Gitea chart auto-wires the connection.
|
||||
postgresql:
|
||||
enabled: true
|
||||
auth:
|
||||
username: gitea
|
||||
database: gitea
|
||||
primary:
|
||||
persistence:
|
||||
enabled: true
|
||||
size: 8Gi
|
||||
storageClass: upcloud-block-storage-maxiops
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 512Mi
|
||||
|
||||
# -- Disable PostgreSQL HA (using single-instance postgresql above)
|
||||
postgresql-ha:
|
||||
enabled: false
|
||||
|
||||
# -- Disable Redis cluster (use in-memory cache instead)
|
||||
redis-cluster:
|
||||
enabled: false
|
||||
|
||||
# -- Disable test pod
|
||||
test:
|
||||
enabled: false
|
||||
|
||||
# -- SSH service (ClusterIP, exposed externally via Traefik TCP IngressRoute on port 2222)
|
||||
service:
|
||||
ssh:
|
||||
type: ClusterIP
|
||||
port: 22
|
||||
30
infra/values/opencost-values.yaml
Normal file
30
infra/values/opencost-values.yaml
Normal file
@@ -0,0 +1,30 @@
|
||||
opencost:
|
||||
exporter:
|
||||
defaultClusterId: launchpad
|
||||
extraEnv:
|
||||
EMIT_KSM_V1_METRICS: "false"
|
||||
EMIT_KSM_V1_METRICS_ONLY: "true"
|
||||
prometheus:
|
||||
internal:
|
||||
enabled: true
|
||||
serviceName: prometheus-server
|
||||
namespaceName: monitoring
|
||||
port: 80
|
||||
customPricing:
|
||||
enabled: true
|
||||
provider: custom
|
||||
costModel:
|
||||
description: "UpCloud 4-node cluster pricing"
|
||||
CPU: "5.86"
|
||||
RAM: "1.46"
|
||||
GPU: "0"
|
||||
storage: "0.34"
|
||||
zoneNetworkEgress: "0"
|
||||
regionNetworkEgress: "0"
|
||||
internetNetworkEgress: "0"
|
||||
ui:
|
||||
enabled: false
|
||||
service:
|
||||
annotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "9003"
|
||||
45
infra/values/renovate-values.yaml
Normal file
45
infra/values/renovate-values.yaml
Normal file
@@ -0,0 +1,45 @@
|
||||
cronjob:
|
||||
schedule: "@daily"
|
||||
concurrencyPolicy: Forbid
|
||||
|
||||
renovate:
|
||||
config: |
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"platform": "gitea",
|
||||
"endpoint": "https://git.forteapps.net",
|
||||
"autodiscover": true,
|
||||
"gitAuthor": "Renovate Bot <renovate@forteapps.net>",
|
||||
"packageRules": [
|
||||
{
|
||||
"matchRepositories": ["**/10x"],
|
||||
"assignees": ["edvard.unsvag"],
|
||||
"reviewers": ["edvard.unsvag"]
|
||||
},
|
||||
{
|
||||
"matchRepositories": ["**/auth-sidecar"],
|
||||
"assignees": ["danijel.simeunovic"],
|
||||
"reviewers": ["danijel.simeunovic"]
|
||||
},
|
||||
{
|
||||
"matchRepositories": ["**/forte-helm"],
|
||||
"assignees": ["danijel.simeunovic"],
|
||||
"reviewers": ["danijel.simeunovic"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: renovate-env
|
||||
|
||||
env:
|
||||
LOG_LEVEL: info
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 1Gi
|
||||
limits:
|
||||
cpu: "2"
|
||||
memory: 4Gi
|
||||
34
infra/values/tempo-values.yaml
Normal file
34
infra/values/tempo-values.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
tempo:
|
||||
metricsGenerator:
|
||||
enabled: true
|
||||
remoteWriteUrl: "http://prometheus-server.monitoring.svc.cluster.local/api/v1/write"
|
||||
overrides:
|
||||
defaults:
|
||||
metrics_generator:
|
||||
processors:
|
||||
- service-graphs
|
||||
- span-metrics
|
||||
storage:
|
||||
trace:
|
||||
backend: local
|
||||
local:
|
||||
path: /var/tempo/traces
|
||||
receivers:
|
||||
otlp:
|
||||
protocols:
|
||||
grpc:
|
||||
endpoint: "0.0.0.0:4317"
|
||||
http:
|
||||
endpoint: "0.0.0.0:4318"
|
||||
|
||||
persistence:
|
||||
enabled: true
|
||||
size: 10Gi
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 512Mi
|
||||
Reference in New Issue
Block a user