Compare commits
30 Commits
feature/ho
...
hotfix/bac
| Author | SHA1 | Date | |
|---|---|---|---|
| 9d33b6a9c3 | |||
| 0036d986a8 | |||
| 70dab12b05 | |||
| 47e9619ae2 | |||
| 2e09a2d404 | |||
| 9e9254a466 | |||
| 539217c3f2 | |||
| 80cf435486 | |||
| 0d7980d105 | |||
| f280596ddb | |||
| 65dc795cd6 | |||
| 237dc0ff90 | |||
| 788cc8f4f4 | |||
| 4def4d2ed7 | |||
| 7d1e2d4665 | |||
| 417185d567 | |||
| 03e60a3512 | |||
| 2135580210 | |||
| 37a38a1179 | |||
| 4ca9039686 | |||
| 6a9eadbde8 | |||
| f19f7c9237 | |||
| 5a459d486e | |||
| 31fb476a78 | |||
| a088425b70 | |||
| b3b3edf82c | |||
| 308755a4b3 | |||
| db6afaf180 | |||
| 5a2f9a1b88 | |||
| 1c6f18b67c |
@@ -57,7 +57,7 @@ This repository contains the complete GitOps configuration for our Kubernetes cl
|
|||||||
|
|
||||||
### What's Inside
|
### What's Inside
|
||||||
|
|
||||||
- **Infrastructure Applications**: Traefik, Cert-Manager, Kyverno, Prometheus, Grafana, Loki, Tempo, Sealed Secrets
|
- **Infrastructure Applications**: Traefik, Cert-Manager, Kyverno, Prometheus, Grafana, Loki, Tempo, Sealed Secrets, Homepage (platform dashboard)
|
||||||
- **Business Applications**: MCP10X, MusicMan, Dot-AI Stack, ArgoCD MCP
|
- **Business Applications**: MCP10X, MusicMan, Dot-AI Stack, ArgoCD MCP
|
||||||
- **Policies**: Kyverno security policies for secret management, namespace controls, pod verification
|
- **Policies**: Kyverno security policies for secret management, namespace controls, pod verification
|
||||||
- **Monitoring**: Full observability stack with metrics, logs, traces, and alerting
|
- **Monitoring**: Full observability stack with metrics, logs, traces, and alerting
|
||||||
|
|||||||
47
apps/overlays/upc-dev/dbunk-demo/dbunk-demo.yaml
Normal file
47
apps/overlays/upc-dev/dbunk-demo/dbunk-demo.yaml
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: dbunk-demo
|
||||||
|
namespace: argocd
|
||||||
|
annotations:
|
||||||
|
argocd.argoproj.io/sync-wave: "12"
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: dbunk-demo
|
||||||
|
app.kubernetes.io/part-of: apps
|
||||||
|
app.kubernetes.io/managed-by: argocd
|
||||||
|
finalizers:
|
||||||
|
- resources-finalizer.argocd.argoproj.io
|
||||||
|
spec:
|
||||||
|
project: default
|
||||||
|
|
||||||
|
sources:
|
||||||
|
- repoURL: ssh://git@git.forteapps.net:2222/Forte/forte-helm.git
|
||||||
|
path: forteapp
|
||||||
|
targetRevision: HEAD
|
||||||
|
helm:
|
||||||
|
valueFiles:
|
||||||
|
- $values/dbunk-demo/values.yaml
|
||||||
|
|
||||||
|
- repoURL: ssh://git@git.forteapps.net:2222/Forte/helm-prod-values.git
|
||||||
|
targetRevision: HEAD
|
||||||
|
ref: values
|
||||||
|
|
||||||
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: dbunk-demo
|
||||||
|
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
|
allowEmpty: false
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=true
|
||||||
|
- Validate=true
|
||||||
|
- ServerSideApply=true
|
||||||
|
retry:
|
||||||
|
limit: 5
|
||||||
|
backoff:
|
||||||
|
duration: 5s
|
||||||
|
factor: 2
|
||||||
|
maxDuration: 3m
|
||||||
4
apps/overlays/upc-dev/dbunk-demo/kustomization.yaml
Normal file
4
apps/overlays/upc-dev/dbunk-demo/kustomization.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- dbunk-demo.yaml
|
||||||
53
apps/overlays/upc-dev/feedback/feedback.yaml
Normal file
53
apps/overlays/upc-dev/feedback/feedback.yaml
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: feedback
|
||||||
|
namespace: argocd
|
||||||
|
annotations:
|
||||||
|
argocd.argoproj.io/sync-wave: "12"
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: feedback
|
||||||
|
app.kubernetes.io/part-of: apps
|
||||||
|
app.kubernetes.io/managed-by: argocd
|
||||||
|
finalizers:
|
||||||
|
- resources-finalizer.argocd.argoproj.io
|
||||||
|
spec:
|
||||||
|
project: default
|
||||||
|
|
||||||
|
sources:
|
||||||
|
- repoURL: ssh://git@git.forteapps.net:2222/Forte/forte-helm.git
|
||||||
|
path: forteapp
|
||||||
|
targetRevision: HEAD
|
||||||
|
helm:
|
||||||
|
valueFiles:
|
||||||
|
- $values/feedback/values.yaml
|
||||||
|
|
||||||
|
- repoURL: ssh://git@git.forteapps.net:2222/Forte/helm-prod-values.git
|
||||||
|
targetRevision: HEAD
|
||||||
|
ref: values
|
||||||
|
|
||||||
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: feedback
|
||||||
|
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
|
allowEmpty: false
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=true
|
||||||
|
- Validate=true
|
||||||
|
- ServerSideApply=true
|
||||||
|
retry:
|
||||||
|
limit: 5
|
||||||
|
backoff:
|
||||||
|
duration: 5s
|
||||||
|
factor: 2
|
||||||
|
maxDuration: 3m
|
||||||
|
|
||||||
|
ignoreDifferences:
|
||||||
|
- group: apps
|
||||||
|
kind: StatefulSet
|
||||||
|
jsonPointers:
|
||||||
|
- /spec/volumeClaimTemplates
|
||||||
4
apps/overlays/upc-dev/feedback/kustomization.yaml
Normal file
4
apps/overlays/upc-dev/feedback/kustomization.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- feedback.yaml
|
||||||
@@ -2,6 +2,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
|||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
resources:
|
resources:
|
||||||
- ../../base
|
- ../../base
|
||||||
|
- dbunk-demo
|
||||||
|
- feedback
|
||||||
|
|
||||||
# No patches needed — base already has "upc-dev" paths
|
# No patches needed — base already has "upc-dev" paths
|
||||||
# upc-dev is the default/base cluster
|
# upc-dev is the default/base cluster
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ Bootstrap()
|
|||||||
Gitea()
|
Gitea()
|
||||||
{
|
{
|
||||||
echo "Installing secret..."
|
echo "Installing secret..."
|
||||||
kubectl apply -f "secrets/"
|
|
||||||
kubectl apply -f "private/${CLUSTER}/gitea-repo-main.yaml"
|
kubectl apply -f "private/${CLUSTER}/gitea-repo-main.yaml"
|
||||||
kubectl apply -f "private/${CLUSTER}/main.key"
|
kubectl apply -f "private/${CLUSTER}/main.key"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -245,6 +245,12 @@ spec:
|
|||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: "{{ request.object.metadata.annotations.\"policies.forteapps.io/auth-oidc-credentials-secret\" || 'auth-oidc' }}"
|
name: "{{ request.object.metadata.annotations.\"policies.forteapps.io/auth-oidc-credentials-secret\" || 'auth-oidc' }}"
|
||||||
key: "{{ request.object.metadata.annotations.\"policies.forteapps.io/auth-oidc-credentials-secret-key\" || 'client-secret' }}"
|
key: "{{ request.object.metadata.annotations.\"policies.forteapps.io/auth-oidc-credentials-secret-key\" || 'client-secret' }}"
|
||||||
|
- name: AUTH_OIDC_IDP_HINT
|
||||||
|
value: "{{ request.object.metadata.annotations.\"policies.forteapps.io/auth-oidc-idp-hint\" || '' }}"
|
||||||
|
- name: AUTH_OIDC_BROKER_ALIAS
|
||||||
|
value: "{{ request.object.metadata.annotations.\"policies.forteapps.io/auth-oidc-broker-alias\" || '' }}"
|
||||||
|
- name: AUTH_OIDC_BROKER_TOKEN_HEADER
|
||||||
|
value: "{{ request.object.metadata.annotations.\"policies.forteapps.io/auth-oidc-broker-token-header\" || '' }}"
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
cpu: 50m
|
cpu: 50m
|
||||||
@@ -324,6 +330,8 @@ spec:
|
|||||||
value: "{{ request.object.metadata.annotations.\"policies.forteapps.io/auth-public-paths\" || '/healthz' }}"
|
value: "{{ request.object.metadata.annotations.\"policies.forteapps.io/auth-public-paths\" || '/healthz' }}"
|
||||||
- name: AUTH_MCP_SCOPES_SUPPORTED
|
- name: AUTH_MCP_SCOPES_SUPPORTED
|
||||||
value: "{{ request.object.metadata.annotations.\"policies.forteapps.io/auth-mcp-scopes\" || 'profile' }}"
|
value: "{{ request.object.metadata.annotations.\"policies.forteapps.io/auth-mcp-scopes\" || 'profile' }}"
|
||||||
|
- name: AUTH_MCP_IDP_HINT
|
||||||
|
value: "{{ request.object.metadata.annotations.\"policies.forteapps.io/auth-mcp-idp-hint\" || '' }}"
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
cpu: 50m
|
cpu: 50m
|
||||||
|
|||||||
@@ -725,6 +725,59 @@ TLS terminates at Traefik; ArgoCD runs in insecure mode behind the proxy.
|
|||||||
|
|
||||||
## Infrastructure Components
|
## Infrastructure Components
|
||||||
|
|
||||||
|
### Homepage (Platform Dashboard)
|
||||||
|
|
||||||
|
**Chart**: `jameswynn/homepage`
|
||||||
|
**Namespace**: `homepage`
|
||||||
|
**URL**: `https://start.forteapps.net`
|
||||||
|
|
||||||
|
Platform dashboard that auto-discovers deployed apps via Kubernetes service annotations.
|
||||||
|
|
||||||
|
**Discovery mechanism**: Services annotated with `gethomepage.dev/enabled: "true"` appear in the dashboard. Apps not deployed = annotations absent = not shown. Fully dynamic per environment.
|
||||||
|
|
||||||
|
**Annotated services**:
|
||||||
|
| Service | Namespace | Group | Widget |
|
||||||
|
|---------|-----------|-------|--------|
|
||||||
|
| `gitea-http` | `gitea` | DevOps | `gitea` |
|
||||||
|
| `argocd-server` | `argocd` | DevOps | `argocd` |
|
||||||
|
| `keycloak` | `keycloak` | Identity | none |
|
||||||
|
| `grafana` | `monitoring` | Monitoring | `grafana` |
|
||||||
|
| `karpor-server` | `karpor` | DevOps | none |
|
||||||
|
|
||||||
|
**Adding a new app**: Annotate the app's Service in its Helm values:
|
||||||
|
```yaml
|
||||||
|
service:
|
||||||
|
annotations:
|
||||||
|
gethomepage.dev/enabled: "true"
|
||||||
|
gethomepage.dev/name: "My App"
|
||||||
|
gethomepage.dev/description: "What it does"
|
||||||
|
gethomepage.dev/group: "GroupName"
|
||||||
|
gethomepage.dev/icon: "icon-name" # https://github.com/walkxcode/dashboard-icons
|
||||||
|
gethomepage.dev/href: "https://myapp.forteapps.net"
|
||||||
|
# Optional live widget:
|
||||||
|
gethomepage.dev/widget.type: "myapp"
|
||||||
|
gethomepage.dev/widget.url: "https://myapp.forteapps.net"
|
||||||
|
# gethomepage.dev/widget.key: "{{HOMEPAGE_VAR_MYAPP_TOKEN}}"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Widget API credentials**: Inject via env vars into the Homepage pod:
|
||||||
|
```yaml
|
||||||
|
# In homepage-values.yaml per environment
|
||||||
|
env:
|
||||||
|
- name: HOMEPAGE_VAR_GRAFANA_TOKEN
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: homepage-widget-credentials
|
||||||
|
key: grafana-token
|
||||||
|
```
|
||||||
|
Then reference as `gethomepage.dev/widget.key: "{{HOMEPAGE_VAR_GRAFANA_TOKEN}}"`.
|
||||||
|
|
||||||
|
**Values files**:
|
||||||
|
- `infra/values/base/homepage-values.yaml` — RBAC, kubernetes mode, layout
|
||||||
|
- `infra/values/{env}/homepage-values.yaml` — hostname per environment
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
### Traefik
|
### Traefik
|
||||||
|
|
||||||
**Chart**: `traefik/traefik`
|
**Chart**: `traefik/traefik`
|
||||||
@@ -1331,6 +1384,46 @@ spec:
|
|||||||
- Adds source tracking annotations (`keycloak.forteapps.net/source-namespace`, `keycloak.forteapps.net/source-name`)
|
- Adds source tracking annotations (`keycloak.forteapps.net/source-namespace`, `keycloak.forteapps.net/source-name`)
|
||||||
- `synchronize: true` — changes to the source Secret are reflected in the clone
|
- `synchronize: true` — changes to the source Secret are reflected in the clone
|
||||||
|
|
||||||
|
### Keycloak Microsoft/Entra Identity Provider
|
||||||
|
|
||||||
|
**File**: `infra/values/upc-dev/keycloak-values.yaml`
|
||||||
|
**Namespace**: `keycloak`
|
||||||
|
|
||||||
|
**Purpose**: Configures Microsoft Entra (Azure AD) as an external identity provider for the Forte realm, enabling SSO via Microsoft accounts with token storage for downstream API access (e.g., Microsoft Graph).
|
||||||
|
|
||||||
|
**Configuration via keycloakConfigCli**:
|
||||||
|
- IdP alias: `forte-entra`, provider: `microsoft`
|
||||||
|
- Client secret injected from `microsoft-idp-credentials` Secret via `$(env:MS_IDP_CLIENT_SECRET)` syntax
|
||||||
|
- `extraEnvVarsSecret: microsoft-idp-credentials` makes the Secret available as env vars to config-cli
|
||||||
|
|
||||||
|
**Key Configuration Notes**:
|
||||||
|
|
||||||
|
| Field | Location | Notes |
|
||||||
|
|-------|----------|-------|
|
||||||
|
| `tenant` | `config.tenant` | **Must be `tenant`, NOT `tenantId`** — wrong key silently falls back to `common` (multi-tenant) |
|
||||||
|
| `storeToken` | Top-level IdP field | **NOT inside `config`** — enables broker token storage for KC broker API |
|
||||||
|
| `defaultScope` | `config.defaultScope` | Space-separated: `openid email profile User.Read Mail.Send` |
|
||||||
|
| `syncMode` | `config.syncMode` | `IMPORT` — imports user on first login |
|
||||||
|
|
||||||
|
**Token Storage & Broker Access**:
|
||||||
|
- `storeToken: true` persists the Entra access token in Keycloak
|
||||||
|
- Realm role `default-roles-forte` includes composite `broker.read-token` — grants all realm users access to broker token API
|
||||||
|
- Broker token retrievable via: `GET /realms/forte/broker/forte-entra/token`
|
||||||
|
|
||||||
|
**Identity Provider Mappers**:
|
||||||
|
- `forte-entra-email`: Hardcodes `emailVerified=true` for Entra-authenticated users (Entra guarantees email verification)
|
||||||
|
|
||||||
|
**Required Secret** (`microsoft-idp-credentials`):
|
||||||
|
```yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: microsoft-idp-credentials
|
||||||
|
namespace: keycloak
|
||||||
|
stringData:
|
||||||
|
MS_IDP_CLIENT_SECRET: "<entra-app-client-secret>"
|
||||||
|
```
|
||||||
|
|
||||||
### Default Namespace Blocker
|
### Default Namespace Blocker
|
||||||
|
|
||||||
**File**: `cluster-resources/policies/default-ns-blocker.yaml`
|
**File**: `cluster-resources/policies/default-ns-blocker.yaml`
|
||||||
|
|||||||
21
infra/base/homepage/homepage-extra-rbac.yaml
Normal file
21
infra/base/homepage/homepage-extra-rbac.yaml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: homepage-services-reader
|
||||||
|
rules:
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["services"]
|
||||||
|
verbs: ["get", "list", "watch"]
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: homepage-services-reader
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: homepage-services-reader
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: homepage
|
||||||
|
namespace: homepage
|
||||||
16
infra/base/homepage/homepage-widget-credentials-sealed.yaml
Normal file
16
infra/base/homepage/homepage-widget-credentials-sealed.yaml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
apiVersion: bitnami.com/v1alpha1
|
||||||
|
kind: SealedSecret
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
name: homepage-widget-credentials
|
||||||
|
namespace: homepage
|
||||||
|
spec:
|
||||||
|
encryptedData:
|
||||||
|
HOMEPAGE_VAR_GITEA_TOKEN: AgAVN1C931EQpn+sodr3CpjlhORfJVTW8aUr+pGZQb+65Pb8QLGeVGVa7Jv60gDJUX3r+93/jMrEbCOeDL6I4qCz/V35wMCxFZLnXIdkmto0W4MKt6cK8To1/OP7EhQJOGBlSuOFsrwoy+HDtvLIqmyF0nrxhTusm9/NHrw+gCVwSTPhiAX1MCuSOSRWpbXvyNphW8j7aqUaV6ixDt424Fe4alEIShYELcS3EX/VPgsf2p2bhvBRCQOh3LEprkuxSFMuPfCBk06TPTbIN4saNVm0Ke0zW/pxkVNSiIxEnKjOmpPJtacsfWN7du+nQbx276G2qvWrf+iawJVq0Z/SLikA/NUFBL6EjSRfgE3cSOri8sbxsd0AycsFGyp98EM29wE+WOQl52M/lwl02EmCivqkICSO7Jp9pM1ScbmRMa5vcnupsGbVDxhRKLqxhAskt/BXDkRzvHN31gH3YmelES3JuqNMHV0urFxmX2oOX9Pxbtv63csc+zhy1Ui5aoex7TPnLdk7kYLSAE2MSrzT6wHvVhBC5kNnDYVrLehvJrT+eNh0MOLx2wkuJmIOxRAGUyNi5DfDnP6qnvj2aefEymLuOXAIUXH8DbeBtrjsd74HX2hhIfBlPkXvhJR3ks7i5RXjK2/YYHkgJ+nJoW80S9N7ciaRy103g74TNJZt6QzzL5Vb80qZ6yQOD4G081KmTLDmhHjJVIIv9M3nLh2s0IeBV3/Z5qHZmtjN7sSaKAn4MIr5FaH9quhx
|
||||||
|
HOMEPAGE_VAR_GRAFANA_TOKEN: AgBloBlOlP+R/4VizE1CGpj0wyiwU14BemAnuUpld7OvOGc67dwfDPyponkQXjAZg3UU2cZ70A51WUAuVlAr+25Ktlf/FW2OBqj+1BJOCqMMyu+kv026yjX2aB8dKGzlTxgF8aji+j1mC8vP3vvmgI4Zf2HQAH7uFwLfeo8+QnV5EyhcExSS0xDne+VtOP9jNXbPRayry0DdyRVtaeKAiZacO+45oAJWszWOwmoMTg9FZQkLjER6Q0tyI6NnoNObsFCnh56chZTdzBOYtmPnwld1bP2FjoJDqn8AfRwbPTIj7t0eFP7WLUO7GQKpxVl+pFwJLb5xCOw2+HNtp1BhNCu7icuc0P88IlvwzkbN0lXJbYigVOzyjEo8f/al1DXPM4WaB/Nqmr7Mtt8KTRh2WMVTgiX5jsu25D0rGDvY9gqfBBqswkRhCLsG0v0EN32zXj1/52KYdmB7pk/+2lMwSaGMS11MOenHeU1Z95fGxm9f3EGF0E8xlFr4FowgsNwr+tJQqpM0bT/4mZnaQbGWtKPFizMtsfQFm+rHFcNCrGaOuecslmiIJs8lTm18KlrncsGfxNS64tVXk+LvydU0rwybvpg2rQjEWtAl1IQsaaiz96OAlYxxK1MGxN7KE6F8R4kfnWTZ5Fs1KMmd/DOIVBXyCbqXxk8pbekmaIeNSfv92JNZ0QNJWsBa2vgQ24WI2pb4XiR0BvtLpt3BVlZUcSK92SzUblWmYWVMwHYCJkEeEUV1PhYEmyiN+V/Kq5Qb
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
name: homepage-widget-credentials
|
||||||
|
namespace: homepage
|
||||||
43
infra/base/homepage/homepage.yaml
Normal file
43
infra/base/homepage/homepage.yaml
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: homepage
|
||||||
|
namespace: argocd
|
||||||
|
annotations:
|
||||||
|
argocd.argoproj.io/sync-wave: "3"
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: homepage
|
||||||
|
app.kubernetes.io/part-of: platform
|
||||||
|
app.kubernetes.io/managed-by: argocd
|
||||||
|
finalizers:
|
||||||
|
- resources-finalizer.argocd.argoproj.io
|
||||||
|
spec:
|
||||||
|
project: default
|
||||||
|
|
||||||
|
sources:
|
||||||
|
- repoURL: https://jameswynn.github.io/helm-charts
|
||||||
|
chart: homepage
|
||||||
|
targetRevision: "2.1.0"
|
||||||
|
helm:
|
||||||
|
releaseName: homepage
|
||||||
|
valueFiles:
|
||||||
|
- $values/infra/values/base/homepage-values.yaml
|
||||||
|
- $values/infra/values/upc-dev/homepage-values.yaml
|
||||||
|
|
||||||
|
- repoURL: ssh://git@git.forteapps.net:2222/Forte/launchpad.git
|
||||||
|
targetRevision: HEAD
|
||||||
|
ref: values
|
||||||
|
|
||||||
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: homepage
|
||||||
|
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
|
allowEmpty: false
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=true
|
||||||
|
- Validate=true
|
||||||
|
- ServerSideApply=true
|
||||||
6
infra/base/homepage/kustomization.yaml
Normal file
6
infra/base/homepage/kustomization.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- homepage.yaml
|
||||||
|
- homepage-widget-credentials-sealed.yaml
|
||||||
|
- homepage-extra-rbac.yaml
|
||||||
@@ -21,3 +21,5 @@ resources:
|
|||||||
- grafana-dashboards
|
- grafana-dashboards
|
||||||
- karpor
|
- karpor
|
||||||
- databunker
|
- databunker
|
||||||
|
- homepage
|
||||||
|
- vault
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ spec:
|
|||||||
automated:
|
automated:
|
||||||
prune: true
|
prune: true
|
||||||
selfHeal: true
|
selfHeal: true
|
||||||
allowEmpty: false
|
|
||||||
syncOptions:
|
syncOptions:
|
||||||
- CreateNamespace=true
|
- CreateNamespace=true
|
||||||
- Validate=true
|
- Validate=true
|
||||||
|
|||||||
4
infra/base/vault/kustomization.yaml
Normal file
4
infra/base/vault/kustomization.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- vault.yaml
|
||||||
49
infra/base/vault/vault.yaml
Normal file
49
infra/base/vault/vault.yaml
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: vault
|
||||||
|
namespace: argocd
|
||||||
|
annotations:
|
||||||
|
argocd.argoproj.io/sync-wave: "1"
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: vault
|
||||||
|
app.kubernetes.io/part-of: security
|
||||||
|
app.kubernetes.io/managed-by: argocd
|
||||||
|
finalizers:
|
||||||
|
- resources-finalizer.argocd.argoproj.io
|
||||||
|
spec:
|
||||||
|
project: default
|
||||||
|
|
||||||
|
sources:
|
||||||
|
- repoURL: https://helm.releases.hashicorp.com
|
||||||
|
chart: vault
|
||||||
|
targetRevision: "0.32.0"
|
||||||
|
helm:
|
||||||
|
releaseName: vault
|
||||||
|
valueFiles:
|
||||||
|
- $values/infra/values/base/vault-values.yaml
|
||||||
|
- $values/infra/values/upc-dev/vault-values.yaml
|
||||||
|
|
||||||
|
- repoURL: ssh://git@git.forteapps.net:2222/Forte/launchpad.git
|
||||||
|
targetRevision: HEAD
|
||||||
|
ref: values
|
||||||
|
|
||||||
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: vault
|
||||||
|
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
|
allowEmpty: false
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=true
|
||||||
|
- Validate=true
|
||||||
|
- ServerSideApply=true
|
||||||
|
|
||||||
|
ignoreDifferences:
|
||||||
|
- group: apps
|
||||||
|
kind: StatefulSet
|
||||||
|
jsonPointers:
|
||||||
|
- /spec/volumeClaimTemplates
|
||||||
@@ -13,9 +13,19 @@ resources:
|
|||||||
- ../../base/prometheus
|
- ../../base/prometheus
|
||||||
- ../../base/sealedsecrets
|
- ../../base/sealedsecrets
|
||||||
- ../../base/tempo
|
- ../../base/tempo
|
||||||
|
- ../../base/homepage
|
||||||
- ../../base/traefik-application
|
- ../../base/traefik-application
|
||||||
|
|
||||||
patches:
|
patches:
|
||||||
|
# Homepage: swap upc-dev → aks-dev
|
||||||
|
- target:
|
||||||
|
kind: Application
|
||||||
|
name: homepage
|
||||||
|
patch: |
|
||||||
|
- op: replace
|
||||||
|
path: /spec/sources/0/helm/valueFiles/1
|
||||||
|
value: $values/infra/values/aks-dev/homepage-values.yaml
|
||||||
|
|
||||||
# Traefik: swap upc-dev → aks-dev
|
# Traefik: swap upc-dev → aks-dev
|
||||||
- target:
|
- target:
|
||||||
kind: Application
|
kind: Application
|
||||||
|
|||||||
15
infra/overlays/upc-dev/entra-upc-dev-credentials-sealed.yaml
Normal file
15
infra/overlays/upc-dev/entra-upc-dev-credentials-sealed.yaml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
apiVersion: bitnami.com/v1alpha1
|
||||||
|
kind: SealedSecret
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
name: microsoft-idp-credentials
|
||||||
|
namespace: keycloak
|
||||||
|
spec:
|
||||||
|
encryptedData:
|
||||||
|
MS_IDP_CLIENT_SECRET: AgBGeloOR8LVop8yluydjc7qj4JUkb85z7B3h07i3xLPup1ojgSqtx08huv+8gvSaFoPdxOY8g23iuKeAr2b2A70paHv0ILSVRsIpxzjuao4aDRWxMHD/SFzvitvqaXD1eQUcBNRDk/1NOG0o5b9o4ddMWkNmyCYuZcmOyx18DC1kFrcWGUgJkLTr+YRZcLJ2T80obZ+y4zztYc+vNQlu11KSIALz++c9XzK2XYSdOMdFHmzadWxoCjvkJqG4W5C6AQBlYa7NSydyU6K3TnwS4VHF8w1DRNneM/IuHLMNbcL8WZjHlSS8xgXFUMhG4rkejwM6joQLx57OosTQe1/xdCOPBXq4NO8Q76RXXkoI0EYMbzfK33vr4NVh8zmBUYxhaeQySh2jYdYp7t/79UzvP7jtGYUgqIZNEBqbDKkzvXsJ4dHJnss8U8lWVgLev31ZhaTjIr3A8VKDPbJKIRZPO71/4DiCF0WKLYNKfbYJ5tsyTxivFWDY5NPNkKkgXk4QoScZ3r4bYNZjDp1rC5zCRPGf0Lt1C5Zovx1HTUjpGpAFVi7DyNmEc0uXn2sTwPARAuAj8str+RnlRNzBkpPWKdlOoDVPTSA41dSTfUVZMlQlluu4fdDgGj5sEnhEN0iIxZNRwU/2DD2AVSqG+KtdIkfH6/j0jzdFn4D3Ha6vwAsBIURK4Ird/pLuNGGCDB+LrrNGXDTTKAPFydCuRtpyoM9kFOtSZb7T7q6Vfkqa7LfgP8mdG9JGXJx
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
name: microsoft-idp-credentials
|
||||||
|
namespace: keycloak
|
||||||
@@ -2,6 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
|||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
resources:
|
resources:
|
||||||
- ../../base
|
- ../../base
|
||||||
|
- entra-upc-dev-credentials-sealed.yaml
|
||||||
|
|
||||||
# No patches needed — base already has "upc-dev" paths
|
# No patches needed — base already has "upc-dev" paths
|
||||||
# upc-dev is the default/base cluster
|
# upc-dev is the default/base cluster
|
||||||
|
|||||||
15
infra/values/aks-dev/homepage-values.yaml
Normal file
15
infra/values/aks-dev/homepage-values.yaml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
ingress:
|
||||||
|
main:
|
||||||
|
enabled: true
|
||||||
|
ingressClassName: traefik
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||||
|
hosts:
|
||||||
|
- host: start.forteapps.net
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
tls:
|
||||||
|
- secretName: homepage-tls
|
||||||
|
hosts:
|
||||||
|
- start.forteapps.net
|
||||||
@@ -35,6 +35,12 @@ server:
|
|||||||
ingressClassName: traefik
|
ingressClassName: traefik
|
||||||
annotations:
|
annotations:
|
||||||
cert-manager.io/cluster-issuer: letsencrypt-prod
|
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||||
|
gethomepage.dev/enabled: "true"
|
||||||
|
gethomepage.dev/name: "ArgoCD"
|
||||||
|
gethomepage.dev/description: "GitOps continuous delivery"
|
||||||
|
gethomepage.dev/group: "DevOps"
|
||||||
|
gethomepage.dev/icon: "argo-cd"
|
||||||
|
gethomepage.dev/href: "https://argocd.forteapps.net"
|
||||||
tls: true
|
tls: true
|
||||||
extraArgs:
|
extraArgs:
|
||||||
- --insecure
|
- --insecure
|
||||||
|
|||||||
@@ -114,6 +114,15 @@ ingress:
|
|||||||
className: traefik
|
className: traefik
|
||||||
annotations:
|
annotations:
|
||||||
cert-manager.io/cluster-issuer: letsencrypt-prod
|
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||||
|
gethomepage.dev/enabled: "true"
|
||||||
|
gethomepage.dev/name: "Gitea"
|
||||||
|
gethomepage.dev/description: "Git hosting & CI/CD"
|
||||||
|
gethomepage.dev/group: "DevOps"
|
||||||
|
gethomepage.dev/icon: "gitea"
|
||||||
|
gethomepage.dev/href: "https://git.forteapps.net"
|
||||||
|
gethomepage.dev/widget.type: "gitea"
|
||||||
|
gethomepage.dev/widget.url: "https://git.forteapps.net"
|
||||||
|
gethomepage.dev/widget.key: "{{HOMEPAGE_VAR_GITEA_TOKEN}}"
|
||||||
hosts:
|
hosts:
|
||||||
- host: git.forteapps.net
|
- host: git.forteapps.net
|
||||||
paths:
|
paths:
|
||||||
|
|||||||
@@ -3,11 +3,21 @@ ingress:
|
|||||||
ingressClassName: traefik
|
ingressClassName: traefik
|
||||||
annotations:
|
annotations:
|
||||||
cert-manager.io/cluster-issuer: letsencrypt-prod
|
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||||
|
gethomepage.dev/enabled: "true"
|
||||||
|
gethomepage.dev/name: "Grafana"
|
||||||
|
gethomepage.dev/description: "Metrics & observability dashboards"
|
||||||
|
gethomepage.dev/group: "Monitoring"
|
||||||
|
gethomepage.dev/icon: "grafana"
|
||||||
|
gethomepage.dev/href: "https://grafana.forteapps.net"
|
||||||
tls:
|
tls:
|
||||||
- secretName: grafana-tls
|
- secretName: grafana-tls
|
||||||
hosts:
|
hosts:
|
||||||
- grafana.forteapps.net
|
- grafana.forteapps.net
|
||||||
|
|
||||||
|
persistence:
|
||||||
|
enabled: true
|
||||||
|
size: 1Gi
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 50m
|
cpu: 50m
|
||||||
|
|||||||
72
infra/values/base/homepage-values.yaml
Normal file
72
infra/values/base/homepage-values.yaml
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
# Homepage Helm Values
|
||||||
|
# Chart: jameswynn/homepage — https://gethomepage.dev
|
||||||
|
# Discovery: K8s service annotations (gethomepage.dev/*)
|
||||||
|
# Each deployed app annotates its own Service — apps not deployed = not visible.
|
||||||
|
|
||||||
|
# RBAC ClusterRole — required for cluster-wide service annotation scanning
|
||||||
|
enableRbac: true
|
||||||
|
|
||||||
|
serviceAccount:
|
||||||
|
create: true
|
||||||
|
name: homepage
|
||||||
|
|
||||||
|
config:
|
||||||
|
# Scan all namespaces for services with gethomepage.dev/enabled: "true"
|
||||||
|
kubernetes:
|
||||||
|
mode: cluster
|
||||||
|
traefik: true
|
||||||
|
|
||||||
|
settings:
|
||||||
|
title: "Platform"
|
||||||
|
headerStyle: clean
|
||||||
|
layout:
|
||||||
|
Apps:
|
||||||
|
style: row
|
||||||
|
columns: 3
|
||||||
|
Security:
|
||||||
|
style: row
|
||||||
|
columns: 3
|
||||||
|
Tools:
|
||||||
|
style: row
|
||||||
|
header: false
|
||||||
|
columns: 2
|
||||||
|
DevOps:
|
||||||
|
style: column
|
||||||
|
rows: 2
|
||||||
|
Monitoring:
|
||||||
|
style: column
|
||||||
|
rows: 1
|
||||||
|
|
||||||
|
# Top-of-page cluster overview widget
|
||||||
|
widgets:
|
||||||
|
- kubernetes:
|
||||||
|
cluster:
|
||||||
|
show: true
|
||||||
|
cpu: true
|
||||||
|
memory: true
|
||||||
|
showLabel: true
|
||||||
|
label: "Cluster"
|
||||||
|
nodes:
|
||||||
|
show: true
|
||||||
|
cpu: true
|
||||||
|
memory: true
|
||||||
|
showLabel: true
|
||||||
|
# In-cluster entries come from K8s service annotations.
|
||||||
|
# External (out-of-cluster) services are listed here statically.
|
||||||
|
bookmarks: []
|
||||||
|
services: []
|
||||||
|
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 10m
|
||||||
|
memory: 128Mi
|
||||||
|
limits:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 256Mi
|
||||||
|
|
||||||
|
env:
|
||||||
|
- name: HOMEPAGE_ALLOWED_HOSTS
|
||||||
|
value: start.forteapps.net
|
||||||
|
envFrom:
|
||||||
|
- secretRef:
|
||||||
|
name: homepage-widget-credentials
|
||||||
@@ -18,6 +18,12 @@ ingress:
|
|||||||
ingressClassName: traefik
|
ingressClassName: traefik
|
||||||
annotations:
|
annotations:
|
||||||
cert-manager.io/cluster-issuer: letsencrypt-prod
|
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||||
|
gethomepage.dev/enabled: "true"
|
||||||
|
gethomepage.dev/name: "Keycloak"
|
||||||
|
gethomepage.dev/description: "Identity & access management"
|
||||||
|
gethomepage.dev/group: "Security"
|
||||||
|
gethomepage.dev/icon: "keycloak"
|
||||||
|
gethomepage.dev/href: "https://id.forteapps.net/admin/forte-test/console/"
|
||||||
|
|
||||||
metrics:
|
metrics:
|
||||||
enabled: true
|
enabled: true
|
||||||
@@ -253,7 +259,7 @@ extraDeploy:
|
|||||||
ADMIN_PASS=$(cat /secrets/admin-password)
|
ADMIN_PASS=$(cat /secrets/admin-password)
|
||||||
|
|
||||||
echo "Authenticating to Keycloak..."
|
echo "Authenticating to Keycloak..."
|
||||||
TOKEN=$(curl -sf -X POST "${KEYCLOAK_URL}/realms/master/protocol/openid-connect/token" \
|
TOKEN=$(curl -s -X POST "${KEYCLOAK_URL}/realms/master/protocol/openid-connect/token" \
|
||||||
-d "client_id=admin-cli" \
|
-d "client_id=admin-cli" \
|
||||||
-d "username=${ADMIN_USER}" \
|
-d "username=${ADMIN_USER}" \
|
||||||
-d "password=${ADMIN_PASS}" \
|
-d "password=${ADMIN_PASS}" \
|
||||||
@@ -270,7 +276,7 @@ extraDeploy:
|
|||||||
upsert_secret() {
|
upsert_secret() {
|
||||||
local ns="$1" name="$2" manifest="$3"
|
local ns="$1" name="$2" manifest="$3"
|
||||||
local code
|
local code
|
||||||
code=$(curl -sf -o /dev/null -w "%{http_code}" \
|
code=$(curl -s -o /dev/null -w "%{http_code}" \
|
||||||
--cacert "$CA_CERT" \
|
--cacert "$CA_CERT" \
|
||||||
-H "Authorization: Bearer ${SA_TOKEN}" \
|
-H "Authorization: Bearer ${SA_TOKEN}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
@@ -279,7 +285,7 @@ extraDeploy:
|
|||||||
if [ "$code" = "200" ]; then
|
if [ "$code" = "200" ]; then
|
||||||
echo " Updated secret '${ns}/${name}'"
|
echo " Updated secret '${ns}/${name}'"
|
||||||
elif [ "$code" = "404" ]; then
|
elif [ "$code" = "404" ]; then
|
||||||
code=$(curl -sf -o /dev/null -w "%{http_code}" \
|
code=$(curl -s -o /dev/null -w "%{http_code}" \
|
||||||
--cacert "$CA_CERT" \
|
--cacert "$CA_CERT" \
|
||||||
-H "Authorization: Bearer ${SA_TOKEN}" \
|
-H "Authorization: Bearer ${SA_TOKEN}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
@@ -326,7 +332,7 @@ extraDeploy:
|
|||||||
|
|
||||||
# Get the client secret from Keycloak
|
# Get the client secret from Keycloak
|
||||||
local secret_value
|
local secret_value
|
||||||
secret_value=$(curl -sf -H "Authorization: Bearer ${TOKEN}" \
|
secret_value=$(curl -s -H "Authorization: Bearer ${TOKEN}" \
|
||||||
"${KEYCLOAK_URL}/admin/realms/${REALM}/clients/${client_uuid}/client-secret" \
|
"${KEYCLOAK_URL}/admin/realms/${REALM}/clients/${client_uuid}/client-secret" \
|
||||||
| jq -r '.value')
|
| jq -r '.value')
|
||||||
|
|
||||||
@@ -341,7 +347,7 @@ extraDeploy:
|
|||||||
|
|
||||||
# Write to target namespace (if it exists)
|
# Write to target namespace (if it exists)
|
||||||
local ns_status
|
local ns_status
|
||||||
ns_status=$(curl -sf -o /dev/null -w "%{http_code}" \
|
ns_status=$(curl -s -o /dev/null -w "%{http_code}" \
|
||||||
--cacert "$CA_CERT" \
|
--cacert "$CA_CERT" \
|
||||||
-H "Authorization: Bearer ${SA_TOKEN}" \
|
-H "Authorization: Bearer ${SA_TOKEN}" \
|
||||||
"${K8S_API}/api/v1/namespaces/${target_ns}")
|
"${K8S_API}/api/v1/namespaces/${target_ns}")
|
||||||
@@ -365,12 +371,12 @@ extraDeploy:
|
|||||||
local ns="$1" name="$2" key="$3" value="$4"
|
local ns="$1" name="$2" key="$3" value="$4"
|
||||||
local patch
|
local patch
|
||||||
patch=$(printf '{"metadata":{"annotations":{"%s":"%s"}}}' "$key" "$value")
|
patch=$(printf '{"metadata":{"annotations":{"%s":"%s"}}}' "$key" "$value")
|
||||||
curl -sf -o /dev/null \
|
curl -s -o /dev/null \
|
||||||
--cacert "$CA_CERT" \
|
--cacert "$CA_CERT" \
|
||||||
-H "Authorization: Bearer ${SA_TOKEN}" \
|
-H "Authorization: Bearer ${SA_TOKEN}" \
|
||||||
-H "Content-Type: application/strategic-merge-patch+json" \
|
-H "Content-Type: application/strategic-merge-patch+json" \
|
||||||
-X PATCH -d "$patch" \
|
-X PATCH -d "$patch" \
|
||||||
"${K8S_API}/api/v1/namespaces/${ns}/secrets/${name}"
|
"${K8S_API}/api/v1/namespaces/${ns}/secrets/${name}" || true
|
||||||
}
|
}
|
||||||
|
|
||||||
# =============================================
|
# =============================================
|
||||||
@@ -378,7 +384,7 @@ extraDeploy:
|
|||||||
# =============================================
|
# =============================================
|
||||||
echo "=== Legacy sync: clients with k8s.secret.sync=true ==="
|
echo "=== Legacy sync: clients with k8s.secret.sync=true ==="
|
||||||
|
|
||||||
CLIENTS=$(curl -sf -H "Authorization: Bearer ${TOKEN}" \
|
CLIENTS=$(curl -s -H "Authorization: Bearer ${TOKEN}" \
|
||||||
"${KEYCLOAK_URL}/admin/realms/${REALM}/clients")
|
"${KEYCLOAK_URL}/admin/realms/${REALM}/clients")
|
||||||
|
|
||||||
SYNC_CLIENTS=$(echo "$CLIENTS" | jq -c '[.[] | select(.attributes["k8s.secret.sync"] == "true")]')
|
SYNC_CLIENTS=$(echo "$CLIENTS" | jq -c '[.[] | select(.attributes["k8s.secret.sync"] == "true")]')
|
||||||
@@ -403,7 +409,7 @@ extraDeploy:
|
|||||||
echo ""
|
echo ""
|
||||||
echo "=== Self-service: config Secrets with label keycloak.forteapps.net/client-config=true ==="
|
echo "=== Self-service: config Secrets with label keycloak.forteapps.net/client-config=true ==="
|
||||||
|
|
||||||
CONFIG_SECRETS=$(curl -sf \
|
CONFIG_SECRETS=$(curl -s \
|
||||||
--cacert "$CA_CERT" \
|
--cacert "$CA_CERT" \
|
||||||
-H "Authorization: Bearer ${SA_TOKEN}" \
|
-H "Authorization: Bearer ${SA_TOKEN}" \
|
||||||
"${K8S_API}/api/v1/namespaces/keycloak/secrets?labelSelector=keycloak.forteapps.net/client-config=true")
|
"${K8S_API}/api/v1/namespaces/keycloak/secrets?labelSelector=keycloak.forteapps.net/client-config=true")
|
||||||
@@ -424,6 +430,10 @@ extraDeploy:
|
|||||||
CLIENT_JSON=$(printf '%s' "$CLIENT_JSON_B64" | base64 -d)
|
CLIENT_JSON=$(printf '%s' "$CLIENT_JSON_B64" | base64 -d)
|
||||||
|
|
||||||
CLIENT_ID=$(echo "$CLIENT_JSON" | jq -r '.clientId')
|
CLIENT_ID=$(echo "$CLIENT_JSON" | jq -r '.clientId')
|
||||||
|
if [ -z "$CLIENT_ID" ] || [ "$CLIENT_ID" = "null" ]; then
|
||||||
|
echo "ERROR: Could not extract clientId from config '${CONFIG_NAME}', skipping"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
echo "Processing self-service client '${CLIENT_ID}' from config '${CONFIG_NAME}'"
|
echo "Processing self-service client '${CLIENT_ID}' from config '${CONFIG_NAME}'"
|
||||||
|
|
||||||
# Compute config hash for change detection
|
# Compute config hash for change detection
|
||||||
@@ -437,7 +447,7 @@ extraDeploy:
|
|||||||
CRED_SECRET_KEY=$(echo "$CLIENT_JSON" | jq -r '.secret.keys.clientSecret // "client-secret"')
|
CRED_SECRET_KEY=$(echo "$CLIENT_JSON" | jq -r '.secret.keys.clientSecret // "client-secret"')
|
||||||
|
|
||||||
# Check if credential Secret already exists in target namespace
|
# Check if credential Secret already exists in target namespace
|
||||||
CRED_EXISTS=$(curl -sf -o /dev/null -w "%{http_code}" \
|
CRED_EXISTS=$(curl -s -o /dev/null -w "%{http_code}" \
|
||||||
--cacert "$CA_CERT" \
|
--cacert "$CA_CERT" \
|
||||||
-H "Authorization: Bearer ${SA_TOKEN}" \
|
-H "Authorization: Bearer ${SA_TOKEN}" \
|
||||||
"${K8S_API}/api/v1/namespaces/${CRED_NS}/secrets/${CRED_NAME}")
|
"${K8S_API}/api/v1/namespaces/${CRED_NS}/secrets/${CRED_NAME}")
|
||||||
@@ -460,18 +470,17 @@ extraDeploy:
|
|||||||
publicClient: false,
|
publicClient: false,
|
||||||
redirectUris: .redirectUris,
|
redirectUris: .redirectUris,
|
||||||
webOrigins: .webOrigins,
|
webOrigins: .webOrigins,
|
||||||
defaultClientScopes: .defaultClientScopes,
|
|
||||||
protocolMappers: (.protocolMappers // [])
|
protocolMappers: (.protocolMappers // [])
|
||||||
}')
|
} + if .defaultClientScopes then {defaultClientScopes: .defaultClientScopes} else {} end')
|
||||||
|
|
||||||
# Check if client already exists
|
# Check if client already exists
|
||||||
EXISTING=$(curl -sf -H "Authorization: Bearer ${TOKEN}" \
|
EXISTING=$(curl -s -H "Authorization: Bearer ${TOKEN}" \
|
||||||
"${KEYCLOAK_URL}/admin/realms/${REALM}/clients?clientId=${CLIENT_ID}" \
|
"${KEYCLOAK_URL}/admin/realms/${REALM}/clients?clientId=${CLIENT_ID}" \
|
||||||
| jq -r '.[0].id // empty')
|
| jq -r '.[0].id // empty')
|
||||||
|
|
||||||
if [ -n "$EXISTING" ]; then
|
if [ -n "$EXISTING" ]; then
|
||||||
echo " Updating existing Keycloak client (uuid: ${EXISTING})"
|
echo " Updating existing Keycloak client (uuid: ${EXISTING})"
|
||||||
HTTP_CODE=$(curl -sf -o /dev/null -w "%{http_code}" \
|
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" \
|
||||||
-H "Authorization: Bearer ${TOKEN}" \
|
-H "Authorization: Bearer ${TOKEN}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-X PUT -d "$KC_CLIENT" \
|
-X PUT -d "$KC_CLIENT" \
|
||||||
@@ -484,7 +493,7 @@ extraDeploy:
|
|||||||
CLIENT_UUID="$EXISTING"
|
CLIENT_UUID="$EXISTING"
|
||||||
else
|
else
|
||||||
echo " Creating new Keycloak client '${CLIENT_ID}'"
|
echo " Creating new Keycloak client '${CLIENT_ID}'"
|
||||||
HTTP_CODE=$(curl -sf -o /dev/null -w "%{http_code}" \
|
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" \
|
||||||
-H "Authorization: Bearer ${TOKEN}" \
|
-H "Authorization: Bearer ${TOKEN}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-X POST -d "$KC_CLIENT" \
|
-X POST -d "$KC_CLIENT" \
|
||||||
@@ -495,11 +504,37 @@ extraDeploy:
|
|||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
# Fetch the newly created client's UUID
|
# Fetch the newly created client's UUID
|
||||||
CLIENT_UUID=$(curl -sf -H "Authorization: Bearer ${TOKEN}" \
|
CLIENT_UUID=$(curl -s -H "Authorization: Bearer ${TOKEN}" \
|
||||||
"${KEYCLOAK_URL}/admin/realms/${REALM}/clients?clientId=${CLIENT_ID}" \
|
"${KEYCLOAK_URL}/admin/realms/${REALM}/clients?clientId=${CLIENT_ID}" \
|
||||||
| jq -r '.[0].id')
|
| jq -r '.[0].id')
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Assign default client scopes (KC REST API ignores defaultClientScopes in POST/PUT body)
|
||||||
|
REQUESTED_SCOPES=$(echo "$CLIENT_JSON" | jq -r '.defaultClientScopes // [] | .[]' 2>/dev/null)
|
||||||
|
if [ -n "$REQUESTED_SCOPES" ]; then
|
||||||
|
# Fetch all realm client scopes once
|
||||||
|
ALL_SCOPES=$(curl -s -H "Authorization: Bearer ${TOKEN}" \
|
||||||
|
"${KEYCLOAK_URL}/admin/realms/${REALM}/client-scopes")
|
||||||
|
|
||||||
|
echo "$REQUESTED_SCOPES" | while read -r SCOPE_NAME; do
|
||||||
|
[ -z "$SCOPE_NAME" ] && continue
|
||||||
|
SCOPE_ID=$(echo "$ALL_SCOPES" | jq -r --arg name "$SCOPE_NAME" '.[] | select(.name == $name) | .id // empty')
|
||||||
|
if [ -z "$SCOPE_ID" ]; then
|
||||||
|
echo " WARNING: Scope '${SCOPE_NAME}' not found in realm, skipping"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
SC_CODE=$(curl -s -o /dev/null -w "%{http_code}" \
|
||||||
|
-H "Authorization: Bearer ${TOKEN}" \
|
||||||
|
-X PUT \
|
||||||
|
"${KEYCLOAK_URL}/admin/realms/${REALM}/clients/${CLIENT_UUID}/default-client-scopes/${SCOPE_ID}")
|
||||||
|
if [ "$SC_CODE" = "204" ] || [ "$SC_CODE" = "200" ]; then
|
||||||
|
echo " Assigned scope '${SCOPE_NAME}'"
|
||||||
|
else
|
||||||
|
echo " WARNING: Failed to assign scope '${SCOPE_NAME}' (HTTP ${SC_CODE})"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
# Sync credentials to target namespace
|
# Sync credentials to target namespace
|
||||||
sync_credentials "$CLIENT_ID" "$CLIENT_UUID" "$CRED_NS" "$CRED_NAME" "$CRED_ID_KEY" "$CRED_SECRET_KEY"
|
sync_credentials "$CLIENT_ID" "$CLIENT_UUID" "$CRED_NS" "$CRED_NAME" "$CRED_ID_KEY" "$CRED_SECRET_KEY"
|
||||||
|
|
||||||
|
|||||||
36
infra/values/base/vault-values.yaml
Normal file
36
infra/values/base/vault-values.yaml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
# HashiCorp Vault Helm Chart Values
|
||||||
|
# Chart: hashicorp/vault v0.32.0
|
||||||
|
|
||||||
|
server:
|
||||||
|
standalone:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
dataStorage:
|
||||||
|
enabled: true
|
||||||
|
size: 5Gi
|
||||||
|
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 128Mi
|
||||||
|
limits:
|
||||||
|
cpu: 250m
|
||||||
|
memory: 256Mi
|
||||||
|
|
||||||
|
ingress:
|
||||||
|
enabled: true
|
||||||
|
ingressClassName: traefik
|
||||||
|
pathType: Prefix
|
||||||
|
activeService: true
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||||
|
gethomepage.dev/enabled: "true"
|
||||||
|
gethomepage.dev/name: "Vault"
|
||||||
|
gethomepage.dev/description: "Secrets management"
|
||||||
|
gethomepage.dev/group: "Security"
|
||||||
|
gethomepage.dev/icon: "vault"
|
||||||
|
gethomepage.dev/href: "https://vault.forteapps.net"
|
||||||
|
|
||||||
|
ui:
|
||||||
|
enabled: true
|
||||||
|
serviceType: ClusterIP
|
||||||
@@ -1,3 +1,10 @@
|
|||||||
ingress:
|
ingress:
|
||||||
enabled: true
|
enabled: true
|
||||||
host: databunker.forteapps.net
|
host: databunker.forteapps.net
|
||||||
|
annotations:
|
||||||
|
gethomepage.dev/enabled: "true"
|
||||||
|
gethomepage.dev/name: "Databunker"
|
||||||
|
gethomepage.dev/description: "Secure Database for PII and PCI Records"
|
||||||
|
gethomepage.dev/group: "Security"
|
||||||
|
gethomepage.dev/icon: "double-take"
|
||||||
|
gethomepage.dev/href: "https://databunker.forteapps.net"
|
||||||
|
|||||||
65
infra/values/upc-dev/homepage-values.yaml
Normal file
65
infra/values/upc-dev/homepage-values.yaml
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
ingress:
|
||||||
|
main:
|
||||||
|
enabled: true
|
||||||
|
ingressClassName: traefik
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||||
|
hosts:
|
||||||
|
- host: start.forteapps.net
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
tls:
|
||||||
|
- secretName: homepage-tls
|
||||||
|
hosts:
|
||||||
|
- start.forteapps.net
|
||||||
|
|
||||||
|
config:
|
||||||
|
settings:
|
||||||
|
title: "Forte Platform"
|
||||||
|
headerStyle: clean
|
||||||
|
layout:
|
||||||
|
Apps:
|
||||||
|
style: row
|
||||||
|
columns: 2
|
||||||
|
Security:
|
||||||
|
style: row
|
||||||
|
columns: 3
|
||||||
|
Tools:
|
||||||
|
style: row
|
||||||
|
header: false
|
||||||
|
columns: 2
|
||||||
|
DevOps:
|
||||||
|
style: column
|
||||||
|
rows: 2
|
||||||
|
Monitoring:
|
||||||
|
style: column
|
||||||
|
rows: 1
|
||||||
|
|
||||||
|
# Top-of-page cluster overview widget
|
||||||
|
widgets:
|
||||||
|
- kubernetes:
|
||||||
|
cluster:
|
||||||
|
show: true
|
||||||
|
cpu: true
|
||||||
|
memory: true
|
||||||
|
showLabel: true
|
||||||
|
label: "Cluster"
|
||||||
|
nodes:
|
||||||
|
show: true
|
||||||
|
cpu: true
|
||||||
|
memory: true
|
||||||
|
showLabel: true
|
||||||
|
# In-cluster entries come from K8s service annotations.
|
||||||
|
# External (out-of-cluster) services are listed here statically.
|
||||||
|
bookmarks: []
|
||||||
|
services:
|
||||||
|
- Apps:
|
||||||
|
- Forte Benken:
|
||||||
|
href: https://benken.hackathon.forteapps.net
|
||||||
|
description: Teknisk kompetanse fra offentlige anbud
|
||||||
|
icon: forte
|
||||||
|
- Forte Feedback:
|
||||||
|
href: https://feedback.forteapps.net
|
||||||
|
description: Fortes internal feedback app
|
||||||
|
icon: forte
|
||||||
@@ -1,2 +1,112 @@
|
|||||||
ingress:
|
ingress:
|
||||||
hostname: id.forteapps.net
|
hostname: id.forteapps.net
|
||||||
|
|
||||||
|
extraEnvVars:
|
||||||
|
- name: KC_FEATURES
|
||||||
|
value: "token-exchange:v1,admin-fine-grained-authz:v1"
|
||||||
|
|
||||||
|
keycloakConfigCli:
|
||||||
|
enabled: true
|
||||||
|
extraEnvVars:
|
||||||
|
- name: IMPORT_VAR_SUBSTITUTION_ENABLED
|
||||||
|
value: "true"
|
||||||
|
- name: MS_IDP_CLIENT_SECRET
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: microsoft-idp-credentials
|
||||||
|
key: MS_IDP_CLIENT_SECRET
|
||||||
|
configuration:
|
||||||
|
microsoft-idp.json: |
|
||||||
|
{
|
||||||
|
"realm": "forte",
|
||||||
|
"authenticationFlows": [
|
||||||
|
{
|
||||||
|
"alias": "auto-link-first-broker-login",
|
||||||
|
"description": "Auto-link IdP accounts to existing users by email",
|
||||||
|
"providerId": "basic-flow",
|
||||||
|
"topLevel": true,
|
||||||
|
"builtIn": false,
|
||||||
|
"authenticationExecutions": [
|
||||||
|
{
|
||||||
|
"authenticator": "idp-create-user-if-unique",
|
||||||
|
"authenticatorFlow": false,
|
||||||
|
"requirement": "ALTERNATIVE",
|
||||||
|
"priority": 10
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"authenticator": "idp-auto-link",
|
||||||
|
"authenticatorFlow": false,
|
||||||
|
"requirement": "ALTERNATIVE",
|
||||||
|
"priority": 20
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"identityProviders": [
|
||||||
|
{
|
||||||
|
"alias": "forte-entra",
|
||||||
|
"displayName": "Forte Entra",
|
||||||
|
"providerId": "microsoft",
|
||||||
|
"enabled": true,
|
||||||
|
"trustEmail": true,
|
||||||
|
"firstBrokerLoginFlowAlias": "auto-link-first-broker-login",
|
||||||
|
"config": {
|
||||||
|
"clientId": "7995d2b5-b798-4caf-8da6-b00b78bb34d7",
|
||||||
|
"clientSecret": "$(env:MS_IDP_CLIENT_SECRET)",
|
||||||
|
"defaultScope": "openid email profile",
|
||||||
|
"tenantId": "063afd9e-5fcb-48d2-a769-ca31b0f5b443",
|
||||||
|
"syncMode": "IMPORT"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"alias": "forte-entra-graph",
|
||||||
|
"displayName": "Forte Entra (Graph)",
|
||||||
|
"providerId": "microsoft",
|
||||||
|
"enabled": true,
|
||||||
|
"storeToken": true,
|
||||||
|
"trustEmail": true,
|
||||||
|
"firstBrokerLoginFlowAlias": "auto-link-first-broker-login",
|
||||||
|
"config": {
|
||||||
|
"clientId": "7995d2b5-b798-4caf-8da6-b00b78bb34d7",
|
||||||
|
"clientSecret": "$(env:MS_IDP_CLIENT_SECRET)",
|
||||||
|
"defaultScope": "openid email profile User.Read Mail.Send",
|
||||||
|
"tenantId": "063afd9e-5fcb-48d2-a769-ca31b0f5b443",
|
||||||
|
"syncMode": "IMPORT"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"identityProviderMappers": [
|
||||||
|
{
|
||||||
|
"name": "forte-entra-email",
|
||||||
|
"identityProviderAlias": "forte-entra",
|
||||||
|
"identityProviderMapper": "hardcoded-attribute-idp-mapper",
|
||||||
|
"config": {
|
||||||
|
"syncMode": "INHERIT",
|
||||||
|
"attribute": "emailVerified",
|
||||||
|
"attribute.value": "true"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "forte-entra-graph-email",
|
||||||
|
"identityProviderAlias": "forte-entra-graph",
|
||||||
|
"identityProviderMapper": "hardcoded-attribute-idp-mapper",
|
||||||
|
"config": {
|
||||||
|
"syncMode": "INHERIT",
|
||||||
|
"attribute": "emailVerified",
|
||||||
|
"attribute.value": "true"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"roles": {
|
||||||
|
"realm": [
|
||||||
|
{
|
||||||
|
"name": "default-roles-forte",
|
||||||
|
"composites": {
|
||||||
|
"client": {
|
||||||
|
"broker": ["read-token"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
9
infra/values/upc-dev/vault-values.yaml
Normal file
9
infra/values/upc-dev/vault-values.yaml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
server:
|
||||||
|
ingress:
|
||||||
|
hosts:
|
||||||
|
- host: vault.forteapps.net
|
||||||
|
paths: []
|
||||||
|
tls:
|
||||||
|
- secretName: vault-tls
|
||||||
|
hosts:
|
||||||
|
- vault.forteapps.net
|
||||||
Submodule shared-prompts updated: c5bc55b3d7...b79858d73c
Reference in New Issue
Block a user