e4ce10f501
The operator still reached the radosgw Admin Ops and S3 APIs via radosgw.service.consul, an endpoint seeded in Vault. RGW is now served at s3.ceph.unkin.net, whose chain verifies against vault-ca-cert. - Sets CEPH_RGW_ENDPOINT and CEPH_RGW_ADMIN_ENDPOINT to https://s3.ceph.unkin.net in the Deployment env, overriding any endpoint in the Vault-rendered secret - Drops the endpoint keys from the Vault seed instructions Reviewed-on: #609 Co-authored-by: unkin-agent <unkin-agent@unkin.net> Co-committed-by: unkin-agent <unkin-agent@unkin.net>
90 lines
2.9 KiB
YAML
90 lines
2.9 KiB
YAML
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: cephrgw-operator
|
|
namespace: cephrgw-system
|
|
labels:
|
|
app.kubernetes.io/name: cephrgw-operator
|
|
annotations:
|
|
# Restart on internal CA rotation only; cephrgw-credentials is Vault-rotated
|
|
# (VSO) and deliberately excluded so routine key rotation causes no restart.
|
|
configmap.reloader.stakater.com/auto: "true"
|
|
secret.reloader.stakater.com/reload: "vault-ca-cert"
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: cephrgw-operator
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: cephrgw-operator
|
|
spec:
|
|
serviceAccountName: cephrgw-operator
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
containers:
|
|
- name: operator
|
|
image: ghcr.io/iuclabs/cephrgw-operator:v0.4.1
|
|
args:
|
|
- --metrics-bind-address=:8080
|
|
- --health-probe-bind-address=:8081
|
|
- --leader-elect
|
|
envFrom:
|
|
# Provides CEPH_RGW_ACCESS_KEY/SECRET_KEY, plus optional
|
|
# CEPH_RGW_REGION / CEPH_RGW_INSECURE. Rendered from Vault per
|
|
# docs/ceph-setup.md; not managed in GitOps.
|
|
- secretRef:
|
|
name: cephrgw-credentials
|
|
env:
|
|
# Explicit env wins over envFrom, so these override any endpoint
|
|
# still present in the Vault-rendered secret.
|
|
- name: CEPH_RGW_ENDPOINT
|
|
value: https://s3.ceph.unkin.net
|
|
- name: CEPH_RGW_ADMIN_ENDPOINT
|
|
value: https://s3.ceph.unkin.net
|
|
# Trust the internal unkin.net (Vault PKI) CA so the operator can
|
|
# verify radosgw's TLS cert. vault-ca-cert is reflected into every
|
|
# namespace from the certificates namespace.
|
|
- name: CEPH_RGW_CA_FILE
|
|
value: /etc/vault-ca/ca.crt
|
|
volumeMounts:
|
|
- name: vault-ca-cert
|
|
mountPath: /etc/vault-ca/ca.crt
|
|
subPath: ca.crt
|
|
readOnly: true
|
|
ports:
|
|
- containerPort: 8080
|
|
name: metrics
|
|
- containerPort: 8081
|
|
name: health
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /readyz
|
|
port: 8081
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: 8081
|
|
initialDelaySeconds: 15
|
|
periodSeconds: 20
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
readOnlyRootFilesystem: true
|
|
capabilities:
|
|
drop: ["ALL"]
|
|
resources:
|
|
requests:
|
|
cpu: 50m
|
|
memory: 64Mi
|
|
limits:
|
|
cpu: 500m
|
|
memory: 256Mi
|
|
volumes:
|
|
- name: vault-ca-cert
|
|
secret:
|
|
secretName: vault-ca-cert
|