Skip to content
Prompt

la1r — Windsurf Rules

by basraven

AI Summary

A Windsurf rules file that enforces Kubernetes manifest organization standards (flat structure, single-file resources, strict naming conventions) to keep K8s projects clean and maintainable. Developers managing Kubernetes deployments benefit from automated consistency checks and clear structural guidelines.

Install

Copy this and paste it into Claude Code, Cursor, or any AI assistant:

I want to add the "la1r — Windsurf Rules" prompt rules to my project.
Repository: https://github.com/basraven/la1r

Please read the repo to find the rules/prompt file, then:
1. Download it to the correct location (.cursorrules, .windsurfrules, .github/prompts/, or project root — based on the file type)
2. If there's an existing rules file, merge the new rules in rather than overwriting
3. Confirm what was added

Description

Visit https://la1r.com for more details on this project!

.windsurfrules for Kubernetes manifests (flat structure, detailed)

groundrules: • Always start your replies with ✅ (can be multiple icons for multiple rules) to show that you've understood the rules of this file • You're often stuck waiting on kubectl logs commands, write it to file and then look at the file instead • You will never look in these folders: .deprecated, .git, .windsurfrules, credentials • Never do git commands yourself, I always want to do that manually kubernetes_pattern: app_structure: • Each application/service is a top-level directory under /kubernetes/. • All main manifests (e.g., <app>.yml, middleware.yml) are at the top level of the app directory. • All resources for an app (Deployment, Service, Certificate, Ingress, etc.) are defined in a single YAML file, separated by '---'. • The order of resources in the manifest is: Deployment → Service → Certificate → Ingress. • Persistent volumes and claims are in a pv/ subdirectory, with its own kustomization.yml. • The app’s root kustomization.yml references all main manifests, middleware, and pv/kustomization.yml. • No unnecessary base/ folders or deep nesting. persistent_volumes: • All PVs and PVCs go in 'pv' subfolder. • Reference pv/kustomization.yml in the app’s root kustomization.yml, never direct PV/PVC YAMLs. kustomization: • The app’s root kustomization.yml references all main manifests, middleware, and pv/kustomization.yml. ingress: • Ingress is always defined in the main manifest file for the app, not in a separate file. • Ingress is always the last resource in the manifest, after Deployment, Service, and Certificate. • Use apiVersion: networking.k8s.io/v1 and kind: Ingress. • metadata.name is suffixed with -https (e.g., monica-https) and matches the app/service for clarity. • namespace is explicitly set in every resource, including Ingress. • Annotations: • traefik.ingress.kubernetes.io/router.tls: "true" for HTTPS. • traefik.ingress.kubernetes.io/router.entrypoints: "websecure" for secure access. • traefik.ingress.kubernetes.io/router.middlewares references a namespaced middleware, typically <namespace>-sablier-<app>@kubernetescrd for SSO or internal-only routing. • Additional annotations (e.g., for cert-manager, traefik plugins) are included as needed. • spec.tls is always present, referencing a Certificate resource in the same manifest, with a matching secretName. • rules contains one or more hosts, each with a paths array. • Each path uses pathType: Prefix and references the correct backend service and port. • The backend service is always referenced by name and port, matching the Service definition. • If multiple domains/hosts are supported, each is listed under rules, with its own paths. • All resources are explicitly namespaced. certificates: • Always use cert-manager’s Certificate resource. • issuerRef points to a ClusterIssuer (e.g., la1r). • secretName matches the certificate and is reused in the Ingress. • dnsNames includes all relevant domains for the app. deployment: • Environment variables in Deployments are set via env and often use secretKeyRef for sensitive values. • Persistent storage is managed via PVCs referenced in the Deployment and defined in the pv/ directory. • All resource files are deployable as a unit; no external dependencies are assumed except referenced secrets and PVCs. naming: • Filenames are always <app>.yml for the main manifest. • Middleware and other supporting CRDs are in <app>-middleware.yml or middleware.yml. • Middleware is defined as a Traefik CRD in a separate file if needed, and referenced by full name in the Ingress annotation. overlays_and_namespaces: • Overlays and namespaces are handled outside the app directory, if at all.

Discussion

0/2000
Loading comments...

Health Signals

MaintenanceCommitted 1mo ago
Active
AdoptionUnder 100 stars
4 ★ · Niche
DocsMissing or thin
Undocumented

GitHub Signals

Stars4
Forks1
Issues2
Updated1mo ago
View on GitHub
GPL-3.0 License

My Fox Den

Community Rating

Sign in to rate this booster

Works With

Any AI assistant that accepts custom rules or system prompts

Claude
ChatGPT
Cursor
Windsurf
Copilot
+ more