You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by vi...@apache.org on 2026/10/12 21:15:26 UTC
(superset-kubernetes-operator) branch main updated: fix(samples): align basic sample with dev-dependencies (#429)
This is an automated email from the ASF dual-hosted git repository.
villebro pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/superset-kubernetes-operator.git
The following commit(s) were added to refs/heads/main by this push:
new b16bb7b fix(samples): align basic sample with dev-dependencies (#429)
b16bb7b is described below
commit b16bb7bf4d27632bfa1bb1449cc2a17fe65e83ca
Author: Ville Brofeldt <33...@users.noreply.github.com>
AuthorDate: Mon Oct 12 14:15:21 2026 -0700
fix(samples): align basic sample with dev-dependencies (#429)
* fix(samples): align basic sample with dev-dependencies
The basic sample could not run against config/samples/dev-dependencies.yaml:
it used the lean 6.1.0 image, which ships no psycopg2, so the migrate task
failed with "No module named 'psycopg2'", and it set no Valkey password while
the dev Valkey requires one. The development setup guide hand-built yet
another Postgres/Valkey variant.
Switch the basic sample to the 6.1.0-dev image and the dev Valkey password,
make the development setup guide apply dev-dependencies.yaml, and add a unit
test that checks every Development-mode sample against the hosts, ports,
credentials, and image variant that dev-dependencies.yaml provides.
Co-Authored-By: Claude Opus 5.5 <no...@anthropic.com>
* test(samples): drop samples consistency unit test
A static check of the samples against dev-dependencies.yaml is the wrong layer;
coverage for the samples belongs in an e2e flow that actually deploys them.
Co-Authored-By: Claude Opus 5.5 <no...@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <no...@anthropic.com>
---
config/samples/dev-dependencies.yaml | 5 ++--
config/samples/superset_v1alpha1_superset.yaml | 9 ++++++-
docs/contributing/development-setup.md | 35 +++++++-------------------
3 files changed, 20 insertions(+), 29 deletions(-)
diff --git a/config/samples/dev-dependencies.yaml b/config/samples/dev-dependencies.yaml
index 2010a1b..6ecabed 100644
--- a/config/samples/dev-dependencies.yaml
+++ b/config/samples/dev-dependencies.yaml
@@ -14,8 +14,9 @@
# limitations under the License.
# Throwaway PostgreSQL + Valkey for local DEVELOPMENT/testing on Kind.
-# Provides the two backing services that superset_v1alpha1_superset_dev_full.yaml
-# expects: a PostgreSQL at host "postgres" and a Valkey at host "valkey", with
+# Provides the two backing services that the Development-mode samples
+# (superset_v1alpha1_superset.yaml and superset_v1alpha1_superset_dev_full.yaml)
+# expect: a PostgreSQL at host "postgres" and a Valkey at host "valkey", with
# matching credentials (user/db "superset", password "superset").
#
# WARNING: ephemeral (emptyDir) storage, plain-text passwords, single replica —
diff --git a/config/samples/superset_v1alpha1_superset.yaml b/config/samples/superset_v1alpha1_superset.yaml
index 32fe89f..dee755b 100644
--- a/config/samples/superset_v1alpha1_superset.yaml
+++ b/config/samples/superset_v1alpha1_superset.yaml
@@ -15,6 +15,12 @@
# WARNING: This sample uses dev mode with inline secrets for local development only.
# For production, see superset_v1alpha1_superset_prod.yaml.
+#
+# Expects the PostgreSQL and Valkey from the companion manifest:
+# kubectl apply -f config/samples/dev-dependencies.yaml
+#
+# The -dev image variant ships the psycopg2 driver; the lean image (e.g. 6.1.0)
+# has no database drivers, so migrations against PostgreSQL would fail.
apiVersion: superset.apache.org/v1alpha1
kind: Superset
metadata:
@@ -24,13 +30,14 @@ metadata:
name: superset-sample
spec:
image:
- tag: 6.1.0
+ tag: 6.1.0-dev
environment: Development
secretKey: thisIsNotSecure_changeInProduction!
metastore:
uri: postgresql+psycopg2://superset:superset@postgres:5432/superset
valkey:
host: valkey
+ password: superset
featureFlags:
ENABLE_TEMPLATE_PROCESSING: true
webServer: {}
diff --git a/docs/contributing/development-setup.md b/docs/contributing/development-setup.md
index b67ede4..3ff2e7d 100644
--- a/docs/contributing/development-setup.md
+++ b/docs/contributing/development-setup.md
@@ -48,33 +48,16 @@ This guide walks through setting up a local development environment with Kind, P
kind create cluster --name superset
```
-## 2. Deploy PostgreSQL
+## 2. Deploy PostgreSQL and Valkey
```bash
-kubectl create deployment postgres --image=postgres:16 \
- --port=5432 \
- -- sh -c 'exec postgres'
-kubectl set env deployment/postgres \
- POSTGRES_USER=superset \
- POSTGRES_PASSWORD=superset \
- POSTGRES_DB=superset
-kubectl expose deployment postgres --port=5432
+kubectl apply -f config/samples/dev-dependencies.yaml
+kubectl wait --for=condition=available deployment/postgres deployment/valkey --timeout=120s
```
-Wait for the pod to be ready:
+This creates a throwaway PostgreSQL (user, password, and database `superset`) and a Valkey (password `superset`) with ephemeral storage. The Development-mode samples are configured to match it.
-```bash
-kubectl wait --for=condition=available deployment/postgres --timeout=60s
-```
-
-## 3. Deploy Valkey
-
-```bash
-kubectl create deployment valkey --image=valkey/valkey:8 --port=6379
-kubectl expose deployment valkey --port=6379
-```
-
-## 4. Run the operator
+## 3. Run the operator
There are two ways to run the operator:
@@ -102,15 +85,15 @@ kubectl logs -n superset-operator-system deployment/superset-operator-controller
`make deploy` is a superset of `make install` — it installs CRDs, RBAC, and the operator Deployment in one step.
-## 5. Deploy Superset
+## 4. Deploy Superset
```bash
kubectl apply -f config/samples/superset_v1alpha1_superset.yaml
```
-The sample manifest deploys a web server in dev mode, runs the init task, and points at the Postgres instance created above.
+The sample manifest deploys a web server in dev mode, runs the migrate and init tasks, and points at the PostgreSQL and Valkey created above.
-## 6. Access Superset
+## 5. Access Superset
```bash
kubectl port-forward svc/superset-sample-web-server 8088:8088
@@ -118,7 +101,7 @@ kubectl port-forward svc/superset-sample-web-server 8088:8088
Open [http://localhost:8088](http://localhost:8088).
-## 7. Clean up
+## 6. Clean up
```bash
kubectl delete superset superset-sample