{"id":17754741,"url":"https://github.com/gianlucam76/ytt-controller","last_synced_at":"2026-02-03T19:03:01.831Z","repository":{"id":167959490,"uuid":"642402214","full_name":"gianlucam76/ytt-controller","owner":"gianlucam76","description":"A Carvel YTT  controller. Get ytt files from either Flux source or ConfigMap/Secret. Process them using ytt module. Make output available for Sveltos","archived":false,"fork":false,"pushed_at":"2025-02-13T10:14:52.000Z","size":251,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-25T01:50:49.195Z","etag":null,"topics":["carvel","clusterapi","controller","flux","gitops","kubernetes","ytt"],"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/gianlucam76.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":"2023-05-18T13:39:47.000Z","updated_at":"2025-02-13T10:05:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"db6cbd59-fee0-40ad-b452-56e2cd36dc57","html_url":"https://github.com/gianlucam76/ytt-controller","commit_stats":null,"previous_names":["gianlucam76/ytt-controller"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/gianlucam76/ytt-controller","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gianlucam76%2Fytt-controller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gianlucam76%2Fytt-controller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gianlucam76%2Fytt-controller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gianlucam76%2Fytt-controller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gianlucam76","download_url":"https://codeload.github.com/gianlucam76/ytt-controller/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gianlucam76%2Fytt-controller/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29054050,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T15:43:47.601Z","status":"ssl_error","status_checked_at":"2026-02-03T15:43:46.709Z","response_time":96,"last_error":"SSL_read: 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":["carvel","clusterapi","controller","flux","gitops","kubernetes","ytt"],"created_at":"2024-10-26T14:08:19.781Z","updated_at":"2026-02-03T19:03:01.801Z","avatar_url":"https://github.com/gianlucam76.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ytt-controller\nA YTT Carvel controller. It can fetch YTT files from:\n1. Flux Sources (GitRepository/OCIRepository/Bucket)\n2. ConfigMap/Secret\n\nprocess those files programmatically invoking Carvel `ytt` and store the output in its Status section.\n[Sveltos addon-manager](https://github.com/projectsveltos/addon-manager) can then be used to deploy the output of the ytt-controller in all selected managed clusters.\n\n\u003cimg src=\"https://github.com/projectsveltos/sveltos/blob/e045d8cb059ac7796a00470a61c5759f1389746f/docs/assets/flux-ytt-sveltos.png\"\u003e\n\n## Install\n\n```bash\nkubectl apply -f https://raw.githubusercontent.com/gianlucam76/ytt-controller/main/manifest/manifest.yaml\n```\n\nor if you want a specific version\n\n```bash\nkubectl apply -f https://raw.githubusercontent.com/gianlucam76/ytt-controller/\u003ctag\u003e/manifest/manifest.yaml\n```\n\n## Using Flux GitRepository\n\nFor instance, this Github repository https://github.com/gianlucam76/ytt-examples contains ytt files. \nYou can use Flux to sync from it and then simply post this [YttSource](https://github.com/gianlucam76/ytt-controller/blob/main/api/v1alpha1/yttsource_types.go) CRD instance.\nThe ytt-controller will detect when Flux has synced the repo (and anytime there is a change), will programatically invoke ytt and store the outcome in its Status.Resources field.\n\n```yaml\napiVersion: extension.projectsveltos.io/v1beta1\nkind: YttSource\nmetadata:\n  name: yttsource-flux\nspec:\n  namespace: flux-system\n  name: flux-system\n  kind: GitRepository\n  path: ./deployment/\n```\n\n```yaml\napiVersion: extension.projectsveltos.io/v1beta1\nkind: YttSource\nmetadata:\n  annotations:\n    kubectl.kubernetes.io/last-applied-configuration: |\n      {\"apiVersion\":\"extension.projectsveltos.io/v1beta1\",\"kind\":\"YttSource\",\"metadata\":{\"annotations\":{},\"name\":\"yttsource-flux\",\"namespace\":\"default\"},\"spec\":{\"kind\":\"GitRepository\",\"name\":\"flux-system\",\"namespace\":\"flux-system\",\"path\":\"./deployment/\"}}\n  creationTimestamp: \"2023-05-22T06:20:01Z\"\n  generation: 1\n  name: yttsource-flux\n  namespace: default\n  resourceVersion: \"91726\"\n  uid: c7ae3485-37a9-447a-9fa4-7d21a129ccf6\nspec:\n  kind: GitRepository\n  name: flux-system\n  namespace: flux-system\n  path: ./deployment/\nstatus:\n  resources: |\n    apiVersion: v1\n    kind: Service\n    metadata:\n      name: sample-app\n      labels:\n        environment: staging\n    spec:\n      selector:\n        app: sample-app\n      ports:\n      - protocol: TCP\n        port: 80\n        targetPort: 8080\n    ---\n    apiVersion: apps/v1\n    kind: Deployment\n    metadata:\n      name: sample-app\n      labels:\n        environment: staging\n    spec:\n      replicas: 1\n      selector:\n        matchLabels:\n          environment: staging\n      template:\n        metadata:\n          labels:\n            environment: staging\n        spec:\n          containers:\n          - name: sample-app\n            image: nginx:latest\n            imagePullPolicy: IfNotPresent\n            ports:\n            - containerPort: 8080\n    ---\n    apiVersion: v1\n    kind: Secret\n    metadata:\n      name: application-settings\n    stringData:\n      app_mode: staging\n      certificates: /etc/ssl/staging\n      db_user: staging-user\n      db_password: staging-password\n```\n\n## Using ConfigMap/Secret\n\nYttSource can also reference ConfigMap/Secret. For instance, we can create a ConfigMap whose BinaryData section contains ytt files.\n\n```bash\ntar -czf ytt.tar.gz -C ~mgianluc/go/src/github.com/gianlucam76/ytt-examples/deployment .\nkubectl create configmap ytt --from-file=ytt.tar.gz=ytt.tar.gz \n```\n\nThen we can have YttSource reference this ConfigMap instance\n\n```yaml\napiVersion: extension.projectsveltos.io/v1beta1\nkind: YttSource\nmetadata:\n  name: yttsource-sample\nspec:\n  namespace: default\n  name: ytt\n  kind: ConfigMap\n  path: ./\n```\n\nand the controller will programmatically execute ytt and store the outcome in Status.Results.\n\n```yaml\napiVersion: extension.projectsveltos.io/v1beta1\nkind: YttSource\nmetadata:\n  annotations:\n    kubectl.kubernetes.io/last-applied-configuration: |\n      {\"apiVersion\":\"extension.projectsveltos.io/v1beta1\",\"kind\":\"YttSource\",\"metadata\":{\"annotations\":{},\"name\":\"yttsource-sample\",\"namespace\":\"default\"},\"spec\":{\"kind\":\"ConfigMap\",\"name\":\"ytt\",\"namespace\":\"default\",\"path\":\"./\"}}\n  creationTimestamp: \"2023-05-22T06:27:31Z\"\n  generation: 1\n  name: yttsource-sample\n  namespace: default\n  resourceVersion: \"94517\"\n  uid: 4b0b4efb-57b4-4ffd-ab32-dc56fee21a09\nspec:\n  kind: ConfigMap\n  name: ytt\n  namespace: default\n  path: ./\nstatus:\n  resources: |\n    apiVersion: v1\n    kind: Service\n    metadata:\n      name: sample-app\n      labels:\n        environment: staging\n    spec:\n      selector:\n        app: sample-app\n      ports:\n      - protocol: TCP\n        port: 80\n        targetPort: 8080\n    ---\n    apiVersion: apps/v1\n    kind: Deployment\n    metadata:\n      name: sample-app\n      labels:\n        environment: staging\n    spec:\n      replicas: 1\n      selector:\n        matchLabels:\n          environment: staging\n      template:\n        metadata:\n          labels:\n            environment: staging\n        spec:\n          containers:\n          - name: sample-app\n            image: nginx:latest\n            imagePullPolicy: IfNotPresent\n            ports:\n            - containerPort: 8080\n    ---\n    apiVersion: v1\n    kind: Secret\n    metadata:\n      name: application-settings\n    stringData:\n      app_mode: staging\n      certificates: /etc/ssl/staging\n      db_user: staging-user\n      db_password: staging-password\n```\n\nAt this point [Sveltos Kubernetes addon controller](https://github.com/projectsveltos/addon-controller) to use the output of the ytt-controller and deploy those resources in all selected managed clusters. To know more refer to [Sveltos documentation](https://projectsveltos.github.io/sveltos/ytt_extension/)\n\n\n## Contributing\n\n❤️ Your contributions are always welcome! If you want to contribute, have questions, noticed any bug or want to get the latest project news, you can connect with us in the following ways:\n\n1. Open a bug/feature enhancement on github [![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/projectsveltos/addon-manager/issues)\n2. Chat with us on the Slack in the #projectsveltos channel [![Slack](https://img.shields.io/badge/join%20slack-%23projectsveltos-brighteen)](https://join.slack.com/t/projectsveltos/shared_invite/zt-1hraownbr-W8NTs6LTimxLPB8Erj8Q6Q)\n3. [Contact Us](mailto:support@projectsveltos.io)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgianlucam76%2Fytt-controller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgianlucam76%2Fytt-controller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgianlucam76%2Fytt-controller/lists"}