{"id":18729230,"url":"https://github.com/kuuji/helm-external-val","last_synced_at":"2025-04-12T16:33:35.171Z","repository":{"id":40450846,"uuid":"449908229","full_name":"kuuji/helm-external-val","owner":"kuuji","description":"helm plugin to fetch values from external sources","archived":false,"fork":false,"pushed_at":"2024-07-25T08:28:30.000Z","size":9408,"stargazers_count":17,"open_issues_count":2,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T11:21:17.509Z","etag":null,"topics":["argocd","gitops","helm","helm-plugin","helm-plugins","kubernetes"],"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/kuuji.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-01-20T01:06:02.000Z","updated_at":"2025-01-19T18:18:40.000Z","dependencies_parsed_at":"2024-06-19T06:16:00.991Z","dependency_job_id":"cdbccdec-651c-4881-b7b7-47516e27fb6b","html_url":"https://github.com/kuuji/helm-external-val","commit_stats":{"total_commits":51,"total_committers":6,"mean_commits":8.5,"dds":0.3529411764705882,"last_synced_commit":"441f904742941d99b2bdbe12553661515eb88239"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kuuji%2Fhelm-external-val","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kuuji%2Fhelm-external-val/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kuuji%2Fhelm-external-val/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kuuji%2Fhelm-external-val/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kuuji","download_url":"https://codeload.github.com/kuuji/helm-external-val/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248596741,"owners_count":21130756,"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":["argocd","gitops","helm","helm-plugin","helm-plugins","kubernetes"],"created_at":"2024-11-07T14:26:15.991Z","updated_at":"2025-04-12T16:33:34.427Z","avatar_url":"https://github.com/kuuji.png","language":"Go","readme":"# helm-external-val\n\n## Overview\n\n`helm-external-val` is a helm plugin that fetches helm values from external source.\nCurrently it supports getting values from kubernetes [ConfigMaps](https://kubernetes.io/docs/concepts/configuration/configmap/) and kubernetes [Secrets](https://kubernetes.io/docs/concepts/configuration/secret/)\n\n## Installation\n\n### Local\n\n```\nhelm plugin install https://github.com/kuuji/helm-external-val\n```\n\nor by specifying the version (git tag)\n\n```\nhelm plugin install --version v0.0.4 https://github.com/kuuji/helm-external-val\n```\n\n\n### ArgoCD\n\n### Via a custom image\n\nThe ArgoCD [recommended option](https://argo-cd.readthedocs.io/en/stable/user-guide/helm/#helm-plugins) is to build a repo-server image that includes the plugin.\nSee example below\n\n```\nFROM argoproj/argocd:v1.5.7\n\nUSER root\nRUN apt-get update \u0026\u0026 \\\n    apt-get install -y \\\n        curl \u0026\u0026 \\\n    apt-get clean \u0026\u0026 \\\n    rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*\n\nUSER argocd\n\nRUN helm plugin install https://github.com/kuuji/helm-external-val\n\nENV HELM_PLUGINS=\"/home/argocd/.local/share/helm/plugins/\"\n```\n\n### Via init container\n\nUsing the helm chart or by patching repo-server we can use an init-container to install helm-external-val in a shared `custom-tools` volume.\nThen we set the helm plugins directory to `/custom-tools/helm-plugins` in the main repo-server container via the env `HELM_PLUGIN`\nCredit to @jkroepke for this neat trick\n\n```\nrepoServer:\n  env:\n    - name: HELM_PLUGINS\n      value: /custom-tools/helm-plugins/\n  volumes:\n    - name: custom-tools\n      emptyDir: {}\n  volumeMounts:\n    - mountPath: /custom-tools\n      name: custom-tools\n  initContainers:\n  - name: download-tools\n    args:\n    - |\n      mkdir -p /custom-tools/helm-plugins\n      helm plugin install https://github.com/kuuji/helm-external-val\n    command:\n    - sh\n    - -ec\n    image: alpine/helm:latest\n    imagePullPolicy: Always\n    terminationMessagePath: /dev/termination-log\n    terminationMessagePolicy: File\n    volumeMounts:\n    - mountPath: /custom-tools\n      name: custom-tools\n    env:\n    - name: HELM_PLUGINS\n      value: /custom-tools/helm-plugins\n```\n\n### Caveats\n\nArgoCD won't re-evaluate the external source unless you do a hard refresh on the application. This is because argocd caches the application manifest and won't evaluate the external values since the application manifest didn't change.\n\nYou can do this either in the ui (click the arrow under the refresh button) or via the cli like below.\n\n```\nargocd app get \u003capplication_name\u003e --hard-refresh\n```\n\n## Usage\n\nThis plugin has 2 modes of operation.\n\n- Using the plugin cli\n  - Create a values.yaml locally from various sources\n\n- As a downloader plugin\n  - Feed a specially formatted url to `helm install|upgrade -f`\n\nThe latter is recommended as it fits well with gitops workflows.\n\n\n### CLI plugin\n\n```\nhelm external-val cm -h\nGet the content of values from a cm and write it to a file\n\nUsage:\n  helm-external-val cm \u003cname\u003e [flags]\n\nFlags:\n      --dataKey string          The key to get the cm from (default \"values.yaml\")\n  -h, --help                    help for cm\n      --kube_namespace string   The namespace to get the cm from (default \"default\")\n  -o, --out string              The file to output the values to (default \"values-cm.yaml\")\n```\n\n```\nhelm external-val secret -h\nGet the content of values from a secret and write it to a file\n\nUsage:\n  helm-external-val secret \u003cname\u003e [flags]\n\nFlags:\n      --dataKey string          The key to get the data from a secret (default \"values.yaml\")\n  -h, --help                    help for secret\n      --kube_namespace string   The namespace to get the secret from (default \"default\")\n  -o, --out string              The file to output the values to (default \"values-secret.yaml\")\n```\n\n### Downloader plugin\n\nHelm will invoke the downloader plugin with 4 parameters `certFile keyFile caFile full-URL`. In our case we're ignoring the first 3.\n\nThe url has to be formatted as follows \n\n```\n\u003csource\u003e://\u003cnamespace\u003e/\u003cname\u003e/\u003ckey\u003e\n```\n\n- source (required) : the protocol to use (`cm` and `secret` are currently supported)\n- namespace (optional) : the namespace in which to look for the resource (defaults to `default`)\n- name (required) : the name of the resource to fetch\n- key (optional) : the key in which to look for the data in the resource (defaults to `values.yaml`)\n\nfor example the url below will fetch the data under `my-values` from ConfigMap named `helm-values` in the namespace `kuuji`.\n\n```\ncm://kuuji/helm-values/my-values\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkuuji%2Fhelm-external-val","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkuuji%2Fhelm-external-val","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkuuji%2Fhelm-external-val/lists"}