{"id":16846950,"url":"https://github.com/mumoshu/waypoint-plugin-helmfile","last_synced_at":"2025-04-11T06:44:25.496Z","repository":{"id":64303613,"uuid":"305546802","full_name":"mumoshu/waypoint-plugin-helmfile","owner":"mumoshu","description":"Helmfile deployment plugin for HashiCorp Waypoint","archived":false,"fork":false,"pushed_at":"2020-10-20T23:55:31.000Z","size":159,"stargazers_count":14,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T04:41:22.930Z","etag":null,"topics":["hashicorp-waypoint","helmfile","kubernetes"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mumoshu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-20T00:31:33.000Z","updated_at":"2024-11-28T16:34:51.000Z","dependencies_parsed_at":"2023-01-15T10:00:38.891Z","dependency_job_id":null,"html_url":"https://github.com/mumoshu/waypoint-plugin-helmfile","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mumoshu%2Fwaypoint-plugin-helmfile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mumoshu%2Fwaypoint-plugin-helmfile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mumoshu%2Fwaypoint-plugin-helmfile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mumoshu%2Fwaypoint-plugin-helmfile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mumoshu","download_url":"https://codeload.github.com/mumoshu/waypoint-plugin-helmfile/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248358549,"owners_count":21090401,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["hashicorp-waypoint","helmfile","kubernetes"],"created_at":"2024-10-13T13:06:00.389Z","updated_at":"2025-04-11T06:44:25.476Z","avatar_url":"https://github.com/mumoshu.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Waypoint Helmfile Plugin\n\n`waypoint-plugin-helmfile` is a [Waypoint](https://github.com/hashicorp/waypoint) plugin to trigger [Helmfile](https://github.com/roboll/helmfile) deployments.\n\n## Introduction\n\n[Waypoint](https://github.com/hashicorp/waypoint) is something more than `make` . It is rather a \"pluggable PaaS\" powered by waypoint cli, the [waypoint-entrypoint](https://www.waypointproject.io/docs/entrypoint) binary embedded into application container images, and the [waypoint-server](https://www.waypointproject.io/docs/server). It provides us a framework to connect various tools to finally produce a Heroku-like experience.\n\nThis plugin allows you to deploy waypoint-built container images via [Helmfile](https://github.com/roboll/helmfile), in a way that the deployed application is connected to the waypoint server.\n\n### Comparison with the builtin `Exec` plugin\n\nThis plugin's implementation is conceptually very similar to the builtin [Exec](https://www.waypointproject.io/plugins/exec) plugin as this plugin shells out to run `Helmfile`.\n\nYou may prefer this over [`Exec`](https://www.waypointproject.io/plugins/exec) when you want:\n\n- Ability to install required versions of Helmfile and Helm on deploy\n- Standardized usage of Helmfile in Waypoint\n\n## Installation\n\nThere're two ways to install the plugin:\n\n1. Binary\n2. From Source\n\n### Binary\n\n- Grab the `waypoint-plugin-helmfile` binary from the [releases](https://github.com/mumoshu/waypoint-plugin-helmfile/releases) page\n- Put the binary under `$YOUR_PROJECT/.config/waypoint/plugins/`\n- Run `waypoint`\n\n### From Source\n\nTo install the plugin from source, `git-clone` this project and run the following command:\n\n```bash\n$ TARGET=path/to/your/waypoint/project make install\n```\n\nThe plugin binary gets installed into:\n\n```\n${TARGET}/.config/waypoint/plugins/waypoint-plugin-helmfile\n```\n\nso that the `waypoint` command can automatically discover the binary.\n\n## Configuration\n\n```hcl\nproject = \"myapp\"\n\napp \"myapp\" {\n  deploy {\n    use \"helmfile\" {\n      // The semver constraint for the version of Helmfile to install and use.\n      // For example, \"\u003e= 0.132.0\" instructs the plugin to install the latest Helmfile version that is greater than or equal to 0.132.0\n      //\n      // This feature is backed by the package manager [shoal](https://github.com/mumoshu/shoal)\n      // is able to fetch any packages hosted in https://github.com/fishworks/fish-food\n      helmfile_version = \"\"\n\n      // The semver constraint for the version of Helm. E.g. \"3.3.4\" or \"\u003e= 3.3.4\"\n      helm_version = \"\"\n\n      // The path to the helmfile executable. Defaults to \"helmfile\" and conflicts with `helmfile_version`\n      helmfile_bin = \"\"\n\n      // The path to the helm executable. Defaults to \"helm\" and conflicts with `helm_version`\n      helm_bin = \"\"\n\n      // Corresponds to `helmfile -e \u003cWAYPOINT_WORKSPACE\u003e`\n      environment_template = \"{{ .Workspace }}\"\n\n      // Corresponds to `helmfile --state-values-file path/to/tmp.yaml`\n      // where tmp.yaml is rendered from the following go template.\n      values_template {\n        data = \u003c\u003c-EOS\n        image:\n          repository: {{.Input.DockerImageName}}\n          tag: {{.Input.DockerImageTag}}\n        env:\n        {{- range $k, $v := .Env }}\n          {{ $k }}: {{ $v }}\n        {{- end }}\n        EOS\n      }\n\n      // Path to the helmfile config. Maps to `helmfile -f \u003cPATH\u003e`\n      path = \"helmfile.yaml\"\n \n      // Path to the working directory of the Helmfile process\n      dir = \".\"\n\n      // Maps to `helmfile --selector foo=bar`\n      selectors = [\"foo=bar\"]\n\n      // The default Kubernetes namespace passed to Helmfile.\n      // Maps to `helmfile -n NAMESPACE` \n      namespace = \"\"\n\n      // The default kubeconfig context passed to Helmfile.\n      // Maps to `helmfile --kube-context CONTEXT`\n      kube_context = \"\"\n\n      // Maps to `helmfile --allow-no-matching-release`\n      allow_no_matching_release = false\n\n      // The number of lines in the context around changes to output\n      // Maps to `helmfile apply --contect N`\n      diff_context = 3\n    }\n  }\n}\n```\n\n`values_template` is important to pass required environment variables to your application.\n\nWaypoint, especially commands like `waypoint logs`, requires that the application's container image to be built by\n`waypoint` so that the image has the \"waypoint entrypoint\" embedded. Please also see [this thread](https://discuss.hashicorp.com/t/waypoint-entrypoint-config-for-exec-plugin/16178/3) for how the entrypoint needs to be configured.\n\nWithin `values_template`, you can use the same set of template parameters as the Exec plugin.\nPlease refer to the [Templates](https://www.waypointproject.io/plugins/exec#templates) section of the Exec plugin documentato for more information.\n\nFor exmaple, a `values_template` like the below:\n\n```\nimage:\n  repository: {{.Input.DockerImageName}}\n  tag: {{.Input.DockerImageTag}}\nenv:\n{{- range $k, $v := .Env }}\n  {{ $k }}: {{ $v }}\n{{- end }}\n```\n\nwould produce outputs like:\n\n```yaml\nimage:\n  repository: waypoint-helmfile-monochart-example\n  tag: 1\nenv:\n  WAYPOINT_DEPLOYMENT_ID: 01EN1T41QZCXGSJCP2BVBMK5JV\n  WAYPOINT_SERVER_DISABLE: 1\n```\n\n## Deployment steps\n\n1. `waypoint init`\n2. Update `waypoint.hcl` with:\n  ```hcl\n  deploy {\n\n    use \"helmfile\" {\n      // Corresponds to `helmfile -e \u003cWAYPOINT_WORKSPACE\u003e`\n      environment_template = \"{{ .Workspace }}\"\n\n      // Corresponds to `helmfile --state-values-file path/to/tmp.yaml`\n      // where tmp.yaml is rendered from the following go template.\n      values_template {\n        data = \u003c\u003c-EOS\n        image:\n          repository: {{.Input.DockerImageName}}\n          tag: {{.Input.DockerImageTag}}\n        env:\n        {{- range $k, $v := .Env }}\n          {{ $k }}: {{ $v }}\n        {{- end }}\n        EOS\n      }\n    }\n  }\n  ```\n3. `waypoint init` to verify the configuration\n4. `waypoint up` to build and deploy the app\n5. Validate that the app is available at the Deployment URL\n6. Validate that k8s resources were deployed: `kubectl get deploy` and `kubectl get svc`  \n\n## Cleanup\n\n1. `waypoint destroy`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmumoshu%2Fwaypoint-plugin-helmfile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmumoshu%2Fwaypoint-plugin-helmfile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmumoshu%2Fwaypoint-plugin-helmfile/lists"}