{"id":13638413,"url":"https://github.com/phoban01/cue-flux-controller","last_synced_at":"2026-01-26T04:10:49.198Z","repository":{"id":43753584,"uuid":"456611128","full_name":"phoban01/cue-flux-controller","owner":"phoban01","description":"A Kubernetes controller for CUE via Flux","archived":false,"fork":false,"pushed_at":"2023-11-22T10:55:09.000Z","size":485,"stargazers_count":70,"open_issues_count":1,"forks_count":8,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-19T19:36:47.001Z","etag":null,"topics":["controller","cuelang","flux","fluxcd","gitops","gitops-toolkit","kubernetes","kubernetes-operator","operator"],"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/phoban01.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}},"created_at":"2022-02-07T17:37:56.000Z","updated_at":"2025-03-03T13:54:54.000Z","dependencies_parsed_at":"2024-06-19T00:25:49.578Z","dependency_job_id":"df4add1c-67cf-4b8a-8fcb-18d09b40cb1b","html_url":"https://github.com/phoban01/cue-flux-controller","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/phoban01/cue-flux-controller","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phoban01%2Fcue-flux-controller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phoban01%2Fcue-flux-controller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phoban01%2Fcue-flux-controller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phoban01%2Fcue-flux-controller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phoban01","download_url":"https://codeload.github.com/phoban01/cue-flux-controller/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phoban01%2Fcue-flux-controller/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28766536,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T03:54:34.369Z","status":"ssl_error","status_checked_at":"2026-01-26T03:54:33.031Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["controller","cuelang","flux","fluxcd","gitops","gitops-toolkit","kubernetes","kubernetes-operator","operator"],"created_at":"2024-08-02T01:00:45.437Z","updated_at":"2026-01-26T04:10:49.170Z","avatar_url":"https://github.com/phoban01.png","language":"Go","funding_links":[],"categories":["kubernetes","Projects"],"sub_categories":[],"readme":"# cue-controller\n\n[![report](https://goreportcard.com/badge/github.com/phoban01/cue-flux-controller)](https://goreportcard.com/report/github.com/phoban01/cue-flux-controller)\n[![license](https://img.shields.io/github/license/phoban01/cue-flux-controller.svg)](https://github.com/fluxcd/cue-flux-controller/blob/main/LICENSE)\n[![release](https://img.shields.io/github/release/phoban01/cue-flux-controller/all.svg)](https://github.com/phoban01/cue-flux-controller/releases)\n\nThe cue-controller is an experimental Kubernetes controller for the CUE language. It integrates with Flux using the GitOps Toolkit and enables building GitOps pipelines directly in CUE.\n\nThe cue-controller is **heavily** based on the codebase for [kustomize-controller](https://github.com/fluxcd/kustomize-controller) and will aim for feature parity insofar as it makes sense to do so.\n\nUse cases:\n- GitOps Kubernetes resources using pure CUE, CUE+yaml or yaml alone\n- Validate CUE or yaml with policies written in CUE\n- Manage applications and infrastructure using modules \u0026 packages\n- Single policy language to rule them all: write policy for local development, CI and last-mile in CUE\n\n### Development Roadmap: Phase 1\n- [x] Build CUE instances from a source repository\n- [x] Specify the CUE working directory and module root\n- [x] Specify the CUE expression(s) from which the instance will build\n- [x] Set CUE tags and tag variables for the instance\n- [x] Specify module root, package and directory variables for CUE instance\n- [x] Apply manifests from a CUE instance\n- [x] Impersonation via ServiceAccount\n- [x] Remote cluster access via kubeconfig\n- [x] Prune Kubernetes resources removed from the CUE source\n- [x] Support for non-CUE files\n- [x] Policy-mode (use CUE only for schema validation, with configurable failure modes)\n- [x] Validation failure notifications (via notification controller)\n- [x] Dependency ordering using `dependsOn`\n- [x] Health checks for deployed workloads\n- [x] Gate deployments using CUE expressions\n- [ ] Support for decrypting secrets with Mozilla SOPS\n\nSpecifications:\n* [API](docs/api/v1alpha1/cue.md)\n\nFor more on CUE visit: https://cuelang.org/\nFor more on Flux visit: https://fluxcd.io/\n\n## Examples\n\nCheckout https://github.com/phoban01/cuedemo for examples and patterns of using the cue-controller to build GitOps pipelines.\n\n## Usage\n\nThe cue-controller requires that you already have the [GitOps toolkit](https://fluxcd.io/docs/components/)\ncontrollers installed in your cluster. Visit [https://fluxcd.io/docs/get-started/](https://fluxcd.io/docs/get-started/) for information on getting started if you are new to `flux`.\n\n### Installation\n\nTo install the latest release of the controller execute the following:\n```bash\nRELEASE=$(gh release list -R phoban01/cue-flux-controller -L 1 | awk '{print $1}')\nRELEASE_MANIFESTS=https://github.com/phoban01/cue-flux-controller/releases/download/$RELEASE\nkubectl apply -f \"$RELEASE_MANIFESTS/cue-controller.crds.yaml\"\nkubectl apply -f \"$RELEASE_MANIFESTS/cue-controller.rbac.yaml\"\nkubectl apply -f \"$RELEASE_MANIFESTS/cue-controller.deployment.yaml\"\n```\n\nThis will install the cue-controller in the `flux-system` namespace.\n\n### Usage\n#### Define a Git repository source\n\nCreate a source object that points to a Git repository containing Kubernetes manifests and a Cue module:\n\n```yaml\napiVersion: source.toolkit.fluxcd.io/v1beta1\nkind: GitRepository\nmetadata:\n  name: cuedemo\n  namespace: default\nspec:\n  interval: 5m\n  url: https://github.com/phoban01/cuedemo\n  ref:\n    branch: main\n```\n\n#### Define a CueInstance\n\nCreate a `CueInstance` resource that references the `GitRepository` source previously defined. The `CueInstance` specifies the module root and the expression we wish to build.\n\n```yaml\napiVersion: cue.contrib.flux.io/v1alpha1\nkind: CueInstance\nmetadata:\n  name: podinfo\n  namespace: default\nspec:\n  interval: 5m\n  root: \"./examples/podinfo\"\n  expressions:\n  - out\n  tags:\n  - name: hpa\n  prune: true\n  sourceRef:\n    kind: GitRepository\n    name: cuedemo\n```\n\nVerify that the resources have been deployed:\n\n```bash\nkubectl -n default get sa,po,svc,hpa -l app=podinfo\n```\n\nShould return similar to the following:\n```bash\nNAME                     SECRETS   AGE\nserviceaccount/podinfo   1         10s\n\nNAME                           READY   STATUS    RESTARTS   AGE\npod/podinfo-59b967cb85-vd42l   1/1     Running   0          11s\n\nNAME              TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE\nservice/podinfo   ClusterIP   10.96.171.221   \u003cnone\u003e        9898/TCP   5s\n\nNAME                                          REFERENCE            TARGETS                          MINPODS   MAXPODS   REPLICAS   AGE\nhorizontalpodautoscaler.autoscaling/podinfo   Deployment/podinfo   \u003cunknown\u003e/500Mi, \u003cunknown\u003e/75%   1         4         1          10s\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphoban01%2Fcue-flux-controller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphoban01%2Fcue-flux-controller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphoban01%2Fcue-flux-controller/lists"}