revert: restore Vaultwarden to original working configuration
- Remove nginx sidecar (was causing compatibility issues) - Restore service targetPort to 80 - Use latest tag instead of fixed version - Remove health probes - Restore simple configuration User will reset data by deleting PVC.
This commit is contained in:
@@ -1,62 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: nginx-well-known-config
|
||||
data:
|
||||
default.conf: |
|
||||
server {
|
||||
listen 8080;
|
||||
server_name _;
|
||||
|
||||
# Well-known endpoint for Bitwarden clients
|
||||
location /.well-known/bitwarden/ {
|
||||
default_type application/json;
|
||||
add_header Content-Type application/json always;
|
||||
add_header Access-Control-Allow-Origin * always;
|
||||
return 200 '{"object":"bitwarden-bitwarden-host","api":"https://vaultwarden.lotimmy.com"}';
|
||||
}
|
||||
|
||||
location = /.well-known/bitwarden {
|
||||
default_type application/json;
|
||||
add_header Content-Type application/json always;
|
||||
add_header Access-Control-Allow-Origin * always;
|
||||
return 200 '{"object":"bitwarden-bitwarden-host","api":"https://vaultwarden.lotimmy.com"}';
|
||||
}
|
||||
|
||||
location /identity/.well-known/bitwarden/ {
|
||||
default_type application/json;
|
||||
add_header Content-Type application/json always;
|
||||
add_header Access-Control-Allow-Origin * always;
|
||||
return 200 '{"object":"bitwarden-bitwarden-host","api":"https://vaultwarden.lotimmy.com"}';
|
||||
}
|
||||
|
||||
# Identity endpoints - handle HEAD requests directly
|
||||
location ~ ^/identity {
|
||||
# HEAD requests - return 200 OK directly
|
||||
if ($request_method = HEAD) {
|
||||
add_header Content-Length 0;
|
||||
return 200;
|
||||
}
|
||||
# All other requests - proxy to Vaultwarden
|
||||
proxy_pass http://127.0.0.1:80;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
}
|
||||
|
||||
# Forward all other requests to Vaultwarden
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:80;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
}
|
||||
}
|
||||
@@ -16,11 +16,8 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: vaultwarden
|
||||
image: vaultwarden/server:1.32.7-alpine
|
||||
image: vaultwarden/server:latest
|
||||
resources:
|
||||
requests:
|
||||
memory: "128Mi"
|
||||
cpu: "100m"
|
||||
limits:
|
||||
memory: "512Mi"
|
||||
cpu: "500m"
|
||||
@@ -32,60 +29,11 @@ spec:
|
||||
- name: DOMAIN
|
||||
value: "https://vaultwarden.lotimmy.com"
|
||||
- name: ADMIN_TOKEN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: vaultwarden-secret
|
||||
key: ADMIN_TOKEN
|
||||
# Health check
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /alive
|
||||
port: 80
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 3
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /alive
|
||||
port: 80
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 3
|
||||
value: "$$argon2id$$v=19$$m=65540,t=3,p=4$$EVIbGzNlkQUK5b0r7aMgKoUWV98aqrpPevU+8Bbv0EE$$JB51q0ih0LGmw6rp7ZVBgT+PNnCepy+bNYyaChD+VMc"
|
||||
volumeMounts:
|
||||
- mountPath: "/data"
|
||||
name: data-vol
|
||||
- name: nginx-well-known
|
||||
image: nginx:alpine
|
||||
resources:
|
||||
requests:
|
||||
memory: "32Mi"
|
||||
cpu: "50m"
|
||||
limits:
|
||||
memory: "64Mi"
|
||||
cpu: "100m"
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
volumeMounts:
|
||||
- mountPath: "/etc/nginx/conf.d"
|
||||
name: nginx-config
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /alive
|
||||
port: 8080
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /alive
|
||||
port: 8080
|
||||
initialDelaySeconds: 3
|
||||
periodSeconds: 10
|
||||
volumes:
|
||||
- name: data-vol
|
||||
persistentVolumeClaim:
|
||||
claimName: vaultwarden-pvc
|
||||
- name: nginx-config
|
||||
configMap:
|
||||
name: nginx-well-known-config
|
||||
|
||||
@@ -28,8 +28,8 @@ spec:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
backend:
|
||||
service:
|
||||
name: vaultwarden-service
|
||||
port:
|
||||
number: 80
|
||||
name: vaultwarden-service
|
||||
port:
|
||||
number: 80
|
||||
|
||||
@@ -11,5 +11,5 @@ spec:
|
||||
- protocol: TCP
|
||||
name: http
|
||||
port: 80
|
||||
targetPort: 8080
|
||||
targetPort: 80
|
||||
type: ClusterIP
|
||||
|
||||
Reference in New Issue
Block a user