vlogs: accept Vault identity JWTs and run oauth2-proxy HA (#587)

Agents need programmatic vlogs access with short-lived Vault identity OIDC tokens, and the oauth2-proxy runs as a single replica.

- accept Vault identity JWT bearer tokens (audience `victorialogs`) via extra JWT issuer
- run oauth2-proxy with 2 replicas spread across nodes
- add a PodDisruptionBudget (minAvailable 1)

requires terraform-vault #179 applied first

Reviewed-on: #587
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
This commit was merged in pull request #587.
This commit is contained in:
2026-11-16 21:30:39 +11:00
committed by BenVincent
parent 04f9d37a7f
commit e63b85d5a5
4 changed files with 22 additions and 1 deletions
+1
View File
@@ -8,6 +8,7 @@ resources:
- vaultstaticsecret.yaml
- oauth2-proxy-configmap.yaml
- oauth2-proxy-deployment.yaml
- pdb.yaml
- service.yaml
- gateway.yaml
- httproute.yaml
@@ -26,3 +26,5 @@ data:
OAUTH2_PROXY_PROVIDER_CA_FILES: "/etc/ssl/combined/ca-certificates.crt"
OAUTH2_PROXY_CODE_CHALLENGE_METHOD: "S256"
OAUTH2_PROXY_SKIP_PROVIDER_BUTTON: "true"
OAUTH2_PROXY_SKIP_JWT_BEARER_TOKENS: "true"
OAUTH2_PROXY_EXTRA_JWT_ISSUERS: "https://vault.service.consul:8200/v1/identity/oidc=victorialogs"
+8 -1
View File
@@ -8,7 +8,7 @@ metadata:
configmap.reloader.stakater.com/auto: "true"
secret.reloader.stakater.com/reload: "vlogs-oauth-credentials,vault-ca-cert"
spec:
replicas: 1
replicas: 2
selector:
matchLabels:
app: vlogs-oauth2
@@ -23,6 +23,13 @@ spec:
spec:
serviceAccountName: default
automountServiceAccountToken: false
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
app: vlogs-oauth2
securityContext:
runAsNonRoot: true
runAsUser: 65532
+11
View File
@@ -0,0 +1,11 @@
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: vlogs-oauth2
namespace: vlogs
spec:
minAvailable: 1
selector:
matchLabels:
app: vlogs-oauth2