Sign inSign up

codedstreams/strlabstudio-operator

By codedstreams

•Updated 5 months ago

Deploy Str:::lab Studio on Kubernetes with a single manifest.

Image
Machine learning & AI
Developer tools
Data science
1

686

codedstreams/strlabstudio-operator repository overview

⁠Str:::lab Studio Kube Operator

A Kubernetes operator that manages Str:::lab Studio deployments as first-class CRDs — deploy, configure, and lifecycle-manage Str:::lab Studio instances on any Kubernetes cluster.

License Kubernetes Python

Apache Flink is a trademark of the Apache Software Foundation. Str:::lab Studio is an independent project not affiliated with the Apache Software Foundation.


⁠What is it?

The Str:::lab Studio Kube Operator watches for StrlabStudio custom resources and automatically:

  • Deploys and configures Str:::lab Studio instances
  • Manages nginx reverse proxy configuration to route to your Flink SQL Gateway and JobManager
  • Handles upgrades, scaling, and deletion of studio instances
  • Exposes status conditions on the CRD for GitOps workflows

⁠Quickstart

⁠Install via Helm
helm repo add strlabstudio https://coded-streams.github.io/strlabstudio-operator/charts
helm repo update
helm install strlab-operator strlabstudio/strlab-operator \
  --namespace strlab-system \
  --create-namespace
⁠Deploy a Studio instance
# examples/basic-instance.yaml
apiVersion: codedstreams.io/v1alpha1
kind: StrlabStudio
metadata:
  name: my-studio
  namespace: flink
spec:
  replicas: 1
  gateway:
    host: flink-sql-gateway
    port: 8083
  jobmanager:
    host: flink-jobmanager
    port: 8081
  service:
    type: ClusterIP
    port: 3030
kubectl apply -f examples/basic-instance.yaml
kubectl get strlabstudio -n flink

⁠CRD Reference

See docs/CRD_REFERENCE.md⁠ for full spec documentation.

⁠Core fields
FieldTypeDefaultDescription
spec.replicasint1Number of studio pods
spec.gateway.hoststringrequiredFlink SQL Gateway hostname
spec.gateway.portint8083Gateway port
spec.jobmanager.hoststringrequiredJobManager hostname
spec.jobmanager.portint8081JobManager REST port
spec.service.typestringClusterIPClusterIP, NodePort, or LoadBalancer
spec.imagestringcodedstreams/strlabstudio:latestStudio image to deploy
spec.resourcesResourceRequirements—CPU/memory requests and limits

⁠Project Structure


⁠How it works

The operator uses kopf⁠ (Kubernetes Operator Pythonic Framework):

# controllers/strlabstudio_controller.py

@kopf.on.create('codedstreams.io', 'v1alpha1', 'strlabstudios')
def reconcile(spec, name, namespace, **kwargs):
    # 1. Parse spec into typed StrlabStudioSpec dataclass
    # 2. Create/update Deployment (strlab-studio-<name>) with studio image
    # 3. Create/update Service (strlab-studio-<name>)
    # 4. ownerReferences ensure GC on CR deletion

⁠Development

See docs/DEVELOPMENT.md⁠ for local dev instructions.

# Install dependencies
pip install -r requirements.txt

# Apply CRD first
kubectl apply -f config/crd/strlabstudios.yaml

# Run operator locally (uses your current kubeconfig)
kopf run controllers/strlabstudio_controller.py --verbose

# Apply a sample CR
kubectl apply -f config/samples/basic.yaml

# Watch it
kubectl get strlabstudio -A -w

⁠Hosting & distribution

helm repo add strlabstudio https://coded-streams.github.io/strlabstudio-operator/charts
helm repo update
helm install strlab-operator strlabstudio/strlab-operator \
  --namespace strlab-system --create-namespace
⁠Option B — OCI / GHCR
helm install strlab-operator \
  oci://ghcr.io/coded-streams/helm-charts/strlab-operator \
  --version 1.0.0 --namespace strlab-system --create-namespace
⁠Option C — From source
helm install strlab-operator ./helm/strlab-operator \
  --namespace strlab-system --create-namespace

See docs/HOSTING.md⁠ for the full guide including ArtifactHub and the release checklist.


⁠Verify installation

kubectl get pods -n strlab-system
# NAME                                 READY   STATUS    RESTARTS
# strlabstudio-operator-xxx-yyy        1/1     Running   0

kubectl get crd strlabstudios.codedstreams.io

⁠Deploy your first studio

kubectl apply -f examples/basic-instance.yaml
kubectl port-forward svc/strlab-studio-my-studio 3030:80 -n flink
# Open http://localhost:3030

⁠Changelog

⁠v1.2 (current)
  • Renamed from FlinkSQL Studio Kube Operator to Str:::lab Studio Kube Operator
  • CRD kind renamed FlinkSQLStudio → StrlabStudio, plural flinksqlstudios → strlabstudios
  • Short name changed from fss → sls
  • All resource names, namespaces, and image references updated
  • Studio image updated to codedstreams/strlabstudio:v1.0.22
⁠v1.0
  • Initial release — CREATE/UPDATE/DELETE reconciliation, Helm chart, basic and production sample CRs

⁠Storage & PVC

The operator itself needs no PVC. It is a stateless controller using the Kubernetes API for all state.

The Str:::lab Studio pods it creates are also stateless by default — nginx serves a static file and the user workspace lives in browser localStorage.

See docs/STORAGE.md⁠ for optional PVC usage (custom HTML, server-side workspace backups).


⁠License

Apache License 2.0 — see LICENSE⁠. Created by Nestor A. A · coded-streams⁠

Tag summary

Content type

Image

Digest

sha256:625894d32…

Size

62.4 MB

Last updated

5 months ago

docker pull codedstreams/strlabstudio-operator