--- tags: - service - josiedot - irc-now domain: (internal) status: active stack: - Rust - kube.rs auth: none --- # platform-operator Kubernetes operator managing platform services via custom resources. Reconciles WebService, ChatService, and MinioInstance CRDs into Deployments, Services, Routes, Certificates, and PVCs using server-side apply. ## Stack - Rust (kube.rs 3.0, k8s-openapi, k8s-crds-cert-manager) - CRD group: `irc.now`, version: `v1alpha1` ## CRDs ### WebService (shortname: ws) Manages web applications with optional OIDC, database, S3, and Stripe integrations. | Instance | Host | |----------|------| | web-landing | irc.now | | bot-landing | irc.bot | | web-api | my.irc.now | | txt | txt.irc.now | | pics | irc.pics | ### ChatService (shortname: chat) Manages chat services with WebSocket timeout annotation on routes. | Instance | Host | |----------|------| | chat | chat.irc.now | ### MinioInstance (shortname: minio) Manages MinIO S3 storage with PVC provisioning. | Instance | Storage | |----------|---------| | minio | 10Gi | ## Managed Resources per CR - Deployment (image, env vars from secrets, readiness probe, resource limits) - Service (ClusterIP, port 8080 default) - Route (edge TLS with externalCertificate) - Certificate (cert-manager, from TLS spec) - PVC (MinioInstance only, customer-workload-storage) ## Instance CRs Located at `deploy/instances/` in the irc-now repo: - web-landing.yaml, bot-landing.yaml, web-api.yaml, txt.yaml, pics.yaml, chat.yaml, minio.yaml - bot.yaml (created but not applied -- bot crate not built yet) ## CRD Generation ```bash cargo run -p platform-operator --bin platform-crdgen > crates/platform-operator/deploy/crd.yaml ``` ## Deployment - OCP namespace: irc-josie-cloud - ServiceAccount: platform-operator (ClusterRole with WebService/ChatService/MinioInstance, Deployment, Service, Route, Certificate, PVC, Lease, Event permissions) - Build: `oc start-build platform-operator --from-archive` (rust:1.88 -> ubi9-minimal) - Containerfile: crates/platform-operator/Containerfile - Resources: 64Mi/128Mi memory, 50m/200m cpu - Reconciliation interval: 300s ## Source - Repo: ~/development/irc-now - Crate: `crates/platform-operator/` - Deploy manifests: `crates/platform-operator/deploy/` - Tests: 50 unit tests ## Related - [[irc-now-landing]] - [[irc-bot-landing]] - [[irc-now-portal]] - [[irc-now-txt]] - [[irc-now-pics]] - [[irc-now-chat]] - [[irc-now-soju-operator]] - [[irc-now-ergo-operator]]