{"id":17888267,"url":"https://github.com/squat/configmap-to-disk","last_synced_at":"2025-03-22T19:33:56.463Z","repository":{"id":73956270,"uuid":"280716527","full_name":"squat/configmap-to-disk","owner":"squat","description":"configmap-to-disk synchronizes a ConfigMap from the Kubernetes API to disk","archived":false,"fork":false,"pushed_at":"2023-05-25T16:58:24.000Z","size":3830,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-21T18:53:04.871Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/squat.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":"2020-07-18T18:34:13.000Z","updated_at":"2023-05-25T16:58:29.000Z","dependencies_parsed_at":"2024-06-21T17:45:25.596Z","dependency_job_id":"22659601-22d2-4c4a-9b42-a1c88e9e1313","html_url":"https://github.com/squat/configmap-to-disk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squat%2Fconfigmap-to-disk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squat%2Fconfigmap-to-disk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squat%2Fconfigmap-to-disk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squat%2Fconfigmap-to-disk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/squat","download_url":"https://codeload.github.com/squat/configmap-to-disk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221832786,"owners_count":16888318,"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":[],"created_at":"2024-10-28T13:36:57.998Z","updated_at":"2024-10-28T13:36:58.641Z","avatar_url":"https://github.com/squat.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# configmap-to-disk\n\n`configmap-to-disk` is a sidecar that synchronizes a value from a ConfigMap in the Kubernetes API to a path on disk.\nThis allows for instant reloading of files when they are updated in the API rather than having to wait for the Kubelet to update a volume mount.\n\n[![Build Status](https://travis-ci.org/squat/configmap-to-disk.svg?branch=master)](https://travis-ci.org/squat/configmap-to-disk)\n[![Go Report Card](https://goreportcard.com/badge/github.com/squat/configmap-to-disk)](https://goreportcard.com/report/github.com/squat/configmap-to-disk)\n\n## Example Usage\n\nAdd the following container specification to a Pod in order to have the `configmap-to-disk` sidecar write the value of the key `bar` from ConfigMap `foo` to the path `/path/to/foo/bar`:\n\n```yaml\n- args:\n  - --path=/path/to/foo/bar\n  - --name=foo\n  - --key=bar\n  - --namespace=$(NAMESPACE)\n  env:\n  - name: NAMESPACE\n    valueFrom:\n      fieldRef:\n        fieldPath: metadata.namespace\n  image: squat/configmap-to-disk\n  name: configmap-to-disk\n  volumeMounts:\n  - mountPath: /path/to/foo\n    name: foo\n```\n\n## RBAC\n\n`configmap-to-disk` requires permission to watch and list ConfigMaps in the target ConfigMap's namespace.\nThe following example RBAC resources could be used to provision the necessary permissions:\n\n```yaml\napiVersion: v1\nkind: ServiceAccount\nmetadata:\n  name: configmap-to-disk\n---\napiVersion: rbac.authorization.k8s.io/v1\nkind: Role\nmetadata:\n  name: list-watch-configmaps\nrules:\n- apiGroups:\n  - \"\"\n  resources:\n  - configmaps\n  verbs:\n  - list\n  - watch\n---\napiVersion: rbac.authorization.k8s.io/v1\nkind: RoleBinding\nmetadata:\n  name: configmap-to-disk\nroleRef:\n  apiGroup: rbac.authorization.k8s.io\n  kind: Role\n  name: list-watch-configmaps\nsubjects:\n  - kind: ServiceAccount\n    name: configmap-to-disk\n```\n\n## Usage\n\n[embedmd]:# (tmp/help.txt)\n```txt\nWatch ConfigMaps in the API and write them to disk\n\nUsage:\n  configmap-to-disk [flags]\n\nFlags:\n  -h, --help                help for configmap-to-disk\n      --key string          The ConfigMap key to read.\n      --kubeconfig string   Path to kubeconfig. (default $KUBECONFIG)\n      --listen string       The address at which to listen for health and metrics. (default \":8080\")\n      --log-level string    Log level to use. Possible values: all, debug, info, warn, error, none (default \"info\")\n      --name string         The ConfigMap name.\n      --namespace string    The namespace to watch.\n      --one-time            Syncs the ConfigMap to disk a single time and exits.\n      --path string         Where to write the file.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquat%2Fconfigmap-to-disk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsquat%2Fconfigmap-to-disk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquat%2Fconfigmap-to-disk/lists"}