{"id":37136603,"url":"https://github.com/crenshaw-dev/miaka","last_synced_at":"2026-01-14T15:55:20.360Z","repository":{"id":324812742,"uuid":"1098645614","full_name":"crenshaw-dev/miaka","owner":"crenshaw-dev","description":"values.yaml is an API - treat it like one!","archived":false,"fork":false,"pushed_at":"2025-12-08T03:28:10.000Z","size":266,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-09T06:59:18.969Z","etag":null,"topics":["helm","kubernetes","validation"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crenshaw-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-18T00:49:45.000Z","updated_at":"2025-12-05T20:32:42.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/crenshaw-dev/miaka","commit_stats":null,"previous_names":["crenshaw-dev/miaka"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/crenshaw-dev/miaka","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crenshaw-dev%2Fmiaka","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crenshaw-dev%2Fmiaka/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crenshaw-dev%2Fmiaka/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crenshaw-dev%2Fmiaka/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crenshaw-dev","download_url":"https://codeload.github.com/crenshaw-dev/miaka/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crenshaw-dev%2Fmiaka/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28425569,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T15:24:48.085Z","status":"ssl_error","status_checked_at":"2026-01-14T15:23:41.940Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["helm","kubernetes","validation"],"created_at":"2026-01-14T15:55:19.698Z","updated_at":"2026-01-14T15:55:20.352Z","avatar_url":"https://github.com/crenshaw-dev.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Miaka\n\n[![CI](https://github.com/crenshaw-dev/miaka/actions/workflows/ci.yaml/badge.svg)](https://github.com/crenshaw-dev/miaka/actions/workflows/ci.yaml)\n[![codecov](https://codecov.io/gh/crenshaw-dev/miaka/branch/main/graph/badge.svg)](https://codecov.io/gh/crenshaw-dev/miaka)\n\n\u003e Make It A Kubernetes API\n\n**Miaka** transforms your Helm chart values into fully-validated, Kubernetes-native APIs with automatic schema generation and breaking change detection.\n\n## Why Miaka?\n\n* 🚀 **Easy Schema Generation** - Automatically generate CRDs and JSON schemas from your YAML\n* 🛡️ **Breaking Change Detection** - Prevent API breakage with automatic compatibility checking\n* ✨ **KRM Compliance** - Make your values files follow the Kubernetes Resource Model standard\n\n## Example\n\nHere's what a Miaka example.values.yaml file looks like with validation markers and documentation:\n\n```yaml\napiVersion: example.com/v1alpha1\nkind: MyApp\n\n# Application name\n# +kubebuilder:validation:MinLength=1\n# +kubebuilder:validation:MaxLength=63\n# +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?$\nappName: my-application\n\n# Number of replicas to deploy\n# +kubebuilder:validation:Minimum=1\n# +kubebuilder:validation:Maximum=100\nreplicas: 3\n\n## Service configuration\nservice:\n  # Kubernetes service type\n  # +kubebuilder:validation:Enum=ClusterIP;NodePort;LoadBalancer;ExternalName\n  type: ClusterIP\n  # Service port\n  # +kubebuilder:validation:Minimum=1\n  # +kubebuilder:validation:Maximum=65535\n  port: 80\n  # Service annotations (e.g., for cloud load balancers)\n  # +miaka:type: map[string]string\n  annotations:\n    service.beta.kubernetes.io/aws-load-balancer-type: nlb\n\n## Resource limits and requests\nresources:\n  limits:\n    cpu: 500m\n    memory: 512Mi\n  requests:\n    cpu: 100m\n    memory: 128Mi\n\n## Environment variables\nenv:\n- # Variable name\n  # +kubebuilder:validation:MinLength=1\n  name: LOG_LEVEL\n  # Variable value\n  value: info\n```\n\nSee [`testdata/build/comprehensive/input.yaml`](./testdata/build/comprehensive/input.yaml) for a comprehensive example with all supported features.\n\n## Installation\n\n```bash\ngo install github.com/crenshaw-dev/miaka@latest\nmiaka version\n```\n\n## Quick Start\n\n### 1. Initialize your values file\n\nConvert your existing Helm `values.yaml` to KRM format (or start from scratch):\n\n```bash\ncd \u003cpath to your Helm chart\u003e\nmiaka init\n```\n\nThis generates:\n- `example.values.yaml` - Complete example values file for generating schemas\n\n### 2. Generate your schemas\n\nBuild CRD and JSON Schema from your KRM-compliant YAML:\n\n```bash\nmiaka build\n```\n\nThis automatically reads `example.values.yaml` and generates:\n- `crd.yaml` - Kubernetes CRD with OpenAPI v3 schema\n- `values.schema.json` - JSON Schema for Helm validation\n\n### 3. Validate user values (optional)\n\nTest that values files from your users pass the validation rules:\n\n```bash\nmiaka validate user-values.yaml\n```\n\nThis validates the values file against both your CRD and JSON Schema, helping you catch issues before deployment.\n\n### 4. Update with confidence\n\nMake changes to your values file and rebuild - miaka automatically detects breaking changes:\n\n```bash\nmiaka build\n```\n\nIf you introduce breaking changes (like changing a field type), the build fails with clear error messages showing exactly what broke.\n\nMiaka uses crd.yaml to detect breaking changes, so make sure to keep that file!\n\n## Features\n\n- 📝 **Comment-driven docs**: Add descriptions and kubebuilder validation tags as YAML comments\n- 🔍 **Type inference**: Automatically infers correct types from your example values\n- ✅ **Dual validation**: Validates against both CRD (Kubernetes) and JSON Schema (Helm)\n- 🔄 **Legacy chart friendly**: Works with existing charts - no need to change the structure\n\n## How It Works\n\nMiaka doesn't reinvent the wheel - it brings together proven Kubernetes ecosystem tools:\n\n1. **Schema Generation**: Uses [controller-gen](https://book.kubebuilder.io/reference/controller-gen.html) (the official Kubernetes CRD generator) to create OpenAPI v3 schemas from Go types\n2. **Validation**: Leverages [Helm's JSON Schema validation](https://helm.sh/docs/topics/charts/#schema-files) to verify your values against the generated schema\n3. **Breaking Change Detection**: Employs [crdify](https://github.com/kubernetes-sigs/crdify) to catch API compatibility issues between versions\n\nNo magic, just battle-tested tools working together.\n\n## Beyond Helm\n\nWhile Miaka is designed with Helm charts in mind, nothing about it strictly requires Helm. At its core, Miaka helps you maintain a Kubernetes API based on a complete example file with validation markers. The generated CRD and JSON Schema can be used by any tool that processes YAML adhering to the API:\n\n- **KRM Functions** - Process validated resources in Kustomize pipelines\n- **Kubernetes Controllers** - Build operators that reconcile your custom resources\n\nThe Kubernetes Resource Model (KRM) format and OpenAPI v3 schemas are standards - any tool in the ecosystem can work with them.\n\nBuilding a robust, validated API also means you can swap out the backend implementation (from Helm to a controller, or vice versa) with confidence that existing configurations will continue to work.\n\n## Learn More\n\n```bash\nmiaka --help\nmiaka init --help\nmiaka build --help\nmiaka validate --help\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrenshaw-dev%2Fmiaka","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrenshaw-dev%2Fmiaka","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrenshaw-dev%2Fmiaka/lists"}