Compare commits

..

1 Commits

Author SHA1 Message Date
benvin e84f296f88 Deploy cephrgw-operator to cephrgw-system
ci/woodpecker/pr/kubeconform Pipeline failed
ci/woodpecker/pr/pre-commit Pipeline was successful
The cephrgw-operator provisions Ceph RGW (S3) buckets and access keys from
CRDs via the Ceph manager dashboard API. Deploy it as a platform app.

- Add apps/base/cephrgw-system: namespace, ServiceAccount + ClusterRole/
  Binding (manage ceph.unkin.net CRDs, Secrets, leases), and the operator
  Deployment. CRDs are pulled from the operator repo at tag v0.1.0; the
  Deployment sources dashboard credentials from the cephrgw-credentials
  Secret via envFrom and carries the reloader annotation.
- Add apps/overlays/au-syd1/cephrgw-system referencing the base.
- Register apps/overlays/*/cephrgw-system in the platform ApplicationSet.

The platform AppProject already permits *-system namespaces and the
Namespace/ClusterRole/CRD cluster resources, so no project change is needed.
Requires the cephrgw-credentials Secret to be created out-of-band (see the
operator's docs/ceph-setup.md); it is intentionally not managed in GitOps.
2026-07-18 00:11:08 +10:00
6 changed files with 127 additions and 0 deletions
+66
View File
@@ -0,0 +1,66 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: cephrgw-operator
namespace: cephrgw-system
labels:
app.kubernetes.io/name: cephrgw-operator
annotations:
# Restart the operator when the credentials Secret rotates.
reloader.stakater.com/auto: "true"
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: git.unkin.net/unkin/cephrgw-operator:v0.1.0
args:
- --metrics-bind-address=:8080
- --health-probe-bind-address=:8081
- --leader-elect
envFrom:
# Provides CEPH_DASHBOARD_URL/USERNAME/PASSWORD and, optionally,
# CEPH_RGW_ENDPOINT / CEPH_DASHBOARD_CA. Create this Secret per
# docs/ceph-setup.md; it is intentionally not managed in GitOps.
- secretRef:
name: cephrgw-credentials
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
@@ -0,0 +1,11 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- namespace.yaml
# CRDs are pulled from the cephrgw-operator repo at the matching tag rather
# than vendored here, so they never drift from the operator.
- https://git.unkin.net/unkin/cephrgw-operator/raw/tag/v0.1.0/config/crd/install.yaml
- rbac.yaml
- deployment.yaml
+5
View File
@@ -0,0 +1,5 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: cephrgw-system
+38
View File
@@ -0,0 +1,38 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: cephrgw-operator
namespace: cephrgw-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: cephrgw-operator
rules:
- apiGroups: ["ceph.unkin.net"]
resources: ["*"]
verbs: ["*"]
# The operator delivers RGW access/secret keys into Secrets.
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
- apiGroups: [""]
resources: ["events"]
verbs: ["create", "patch"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: cephrgw-operator
subjects:
- kind: ServiceAccount
name: cephrgw-operator
namespace: cephrgw-system
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cephrgw-operator
@@ -0,0 +1,6 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../../base/cephrgw-system
+1
View File
@@ -18,6 +18,7 @@ spec:
- path: apps/overlays/*/cattle-system - path: apps/overlays/*/cattle-system
- path: apps/overlays/*/cert-manager - path: apps/overlays/*/cert-manager
- path: apps/overlays/*/certificates - path: apps/overlays/*/certificates
- path: apps/overlays/*/cephrgw-system
- path: apps/overlays/*/cnpg-system - path: apps/overlays/*/cnpg-system
- path: apps/overlays/*/consul - path: apps/overlays/*/consul
- path: apps/overlays/*/elastic-system - path: apps/overlays/*/elastic-system