Skip to content

fix: close all critical YAML validation gaps from deep audit - #58

Merged
irony merged 5 commits into
mainfrom
fix/validation-gaps
Aug 7, 2026
Merged

fix: close all critical YAML validation gaps from deep audit#58
irony merged 5 commits into
mainfrom
fix/validation-gaps

Conversation

@irony

@irony irony commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

What

Four agents deep-validated every resource in all 4 rendered YAML files (67 resources total). Found and fixed 6 critical issues + 2 warnings.

Critical fixes

Issue File Fix
Superset admin Secret referenced but never created → pod crash superset/src/index.ts Create Secret (or accept existingSecret)
Superset DB credentials Secret referenced but never created superset/src/index.ts Create Secret when password provided
Superset REDIS_HOST mismatched OT-CK service name superset/src/index.ts Use (OT-Container-Kit convention)
Superset DB_HOST cross-namespace without FQDN examples/saas-platform Use
Superset DB_NAME mismatched CNPG initdb examples/saas-platform (not )
LokiStack referenced loki-storage Secret that didn't exist examples/monitoring-stack Create Secret with S3 creds
Deployment/api DATABASE_URL wrong db name examples/saas-platform (not )

Warnings fixed

  • Auth Gateway lacked TLS (Keycloak over plain HTTP) → added tls prop in both examples
  • VaultStaticSecret apiVersion inconsistency (v1alpha1 vs v1beta1) → unified to v1beta1

Verified

  • 426 tests green
  • r8s validate passes on all 3 examples (only remaining warning: auth-service is operator-managed by Keycloak — documented)

Four agents validated every resource in all 4 rendered YAML files
(67 resources total). Critical fixes:

Superset (saas-platform):
- Create admin Secret (was referenced but never created → pod crash)
- Create DB credentials Secret when password is provided
- Fix Redis host: OT-Container-Kit creates <name>-master, not <name>
- Fix DB_HOST: use FQDN for cross-namespace (analytics-db-rw.saas.svc)
- Fix DB_NAME: match CNPG initdb database name (analytics-db, not analytics)
- Change adminSecret prop to admin: { password } | { existingSecret }

Loki (monitoring-stack):
- Create loki-storage Secret (S3 creds) referenced by LokiStack

Auth TLS (web-shop + saas):
- Add tls prop to Auth so Keycloak gets HTTPS, not plain HTTP

Database URL (saas):
- Fix DATABASE_URL: match CNPG database name (platform-db, not platform)

VaultStaticSecret:
- Fix apiVersion inconsistency (v1alpha1 → v1beta1 for hashicorp)

ServiceMonitor:
- Add comment clarifying it monitors an external Service

All 426 tests green. r8s validate passes on all 3 examples (only
remaining warning: auth-service is operator-managed by Keycloak).
Copilot AI lite review requested due to automatic review settings August 7, 2026 07:29
@irony
irony requested a review from a team as a code owner August 7, 2026 07:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses manifest correctness issues found via deep YAML validation across rendered examples and components, focusing on missing/incorrect Secrets, service name conventions, and CRD apiVersion consistency to prevent runtime failures and validation errors.

Changes:

  • Add Superset Secret creation logic for admin secret key and optional DB password secret; align managed Redis service DNS name with operator conventions.
  • Unify VaultStaticSecret apiVersion usage in DnsProvider, and add TLS config to Auth usage in examples.
  • Fix example manifests for Superset DB connection parameters and add missing Loki S3 credentials Secret.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
packages/superset/src/index.ts Creates missing Superset Secrets and updates managed Redis host naming.
packages/superset/tests/superset.test.ts Updates test expectations for newly rendered Secret and Redis host naming.
packages/recipes/src/dns-provider.tsx Bumps StaticSecret apiVersion for TSIG Secret rendering.
examples/web-shop/index.tsx Adds TLS configuration to the Auth (Keycloak) example.
examples/saas-platform/index.tsx Fixes Superset DB host/name and API DATABASE_URL; adds Auth TLS and Superset secret inputs.
examples/monitoring-stack/index.tsx Adds missing loki-storage Secret and clarifies ServiceMonitor example comment.
Suppressed comments (1)

examples/saas-platform/index.tsx:83

  • This example commits a plaintext Superset admin secret key (admin.password). Consider using an ${env:...} placeholder to avoid encouraging hard-coded secrets in source control.
      redis={{ create: true }}
      admin={{ password: 'superset-admin-password' }}
      tls={{ secretName: 'superset-tls', clusterIssuer: 'letsencrypt-prod' }}

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +124 to +128
metadata: { name: database.passwordSecret, namespace },
type: 'Opaque',
stringData: {
password: database.password,
},
Comment on lines +33 to +36
/** Admin credentials. If `existingSecret` is set, that Secret must
* already exist (with a `secretKey` key). Otherwise a Secret named
* `<name>-admin` is created with a generated secret key. */
admin: { existingSecret: string } | { password?: string }
Comment on lines 174 to 178
const SecretKind = secrets.backend === 'openbao' ? 'OpenBaoStaticSecret' : 'VaultStaticSecret'
resources.push(
jsx(SecretKind, {
apiVersion: 'secrets.hashicorp.com/v1alpha1',
apiVersion: 'secrets.hashicorp.com/v1beta1',
kind: SecretKind,
database: 'analytics-db',
user: 'superset',
passwordSecret: 'superset-db-credentials',
password: 'superset-db-password',
Comment on lines 18 to +23
it('should render Namespace, ConfigMap, Deployment, Service and Ingress', () => {
const result = render(jsx(Superset, baseProps))

expect(result.resources).toHaveLength(5)
expect(result.resources).toHaveLength(6)
const kinds = result.resources.map((r) => r.kind)
expect(kinds).toEqual(['Namespace', 'ConfigMap', 'Deployment', 'Service', 'Ingress'])
expect(kinds).toEqual(['Namespace', 'Secret', 'ConfigMap', 'Deployment', 'Service', 'Ingress'])
@irony
irony merged commit b92d0d4 into main Aug 7, 2026
3 checks passed
@irony
irony deleted the fix/validation-gaps branch August 7, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants