{"id":16908787,"url":"https://github.com/saswatamcode/configmap-operator","last_synced_at":"2026-05-03T05:33:20.058Z","repository":{"id":103589117,"uuid":"442429962","full_name":"saswatamcode/configmap-operator","owner":"saswatamcode","description":"Kubernetes Operator which allows you to update ConfigMaps, based on some external URL/filepath which serves the required data.","archived":false,"fork":false,"pushed_at":"2022-01-03T17:41:30.000Z","size":148,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-29T19:17:41.779Z","etag":null,"topics":["kubernetes-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/saswatamcode.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":"2021-12-28T10:36:07.000Z","updated_at":"2024-07-10T13:53:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"5bf55a35-aed0-4655-8a10-f709433e5124","html_url":"https://github.com/saswatamcode/configmap-operator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/saswatamcode/configmap-operator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saswatamcode%2Fconfigmap-operator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saswatamcode%2Fconfigmap-operator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saswatamcode%2Fconfigmap-operator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saswatamcode%2Fconfigmap-operator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saswatamcode","download_url":"https://codeload.github.com/saswatamcode/configmap-operator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saswatamcode%2Fconfigmap-operator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32559716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T03:21:47.309Z","status":"ssl_error","status_checked_at":"2026-05-03T03:21:43.884Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["kubernetes-operator"],"created_at":"2024-10-13T18:52:58.412Z","updated_at":"2026-05-03T05:33:20.030Z","avatar_url":"https://github.com/saswatamcode.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# configmap-operator\n\nKubernetes Operator which allows you to update ConfigMaps, based on some external URL/filepath which serves the required data.\n\n\u003e ⚠ This project is made for learning/experimentation purposes and config can change at any time. Ideally, you can replicate similar functionality via other standard configuration practices.\n\n```bash mdox-exec=\"configmap-operator run --help\"\nusage: configmap-operator run [\u003cflags\u003e]\n\nLaunches ConfigMap Operator\n\nFlags:\n  -h, --help                   Show context-sensitive help (also try --help-long\n                               and --help-man).\n      --version                Show application version.\n      --log.level=info         Log filtering level.\n      --log.format=clilog      Log format to use.\n      --metrics=\"metrics\"      Endpoint for serving metrics.\n      --kubeconfig=KUBECONFIG  Path to a kubeconfig. Only required if\n                               out-of-cluster.\n      --master=MASTER          The address of the Kubernetes API server.\n                               Overrides any value in kubeconfig. Only required\n                               if out-of-cluster.\n      --namespace=\"default\"    The namespace to watch.\n      --refresh.interval=10s   The interval after which the ConfigMap will be\n                               refreshed.\n\n```\n\n## Getting Started\n\nExample manifests are provided [here](examples/manifests) and are generated with jsonnet!\n\nSpin-up a cluster with [kind](https://kind.sigs.k8s.io/docs/user/quick-start/) and create a `configmap-operator-demo` namespace,\n\n```bash\nkubectl apply -f examples/manifests/namespace.yaml\n```\n\nDeploy the `configmap-operator`,\n\n```bash\nkubectl apply -f examples/manifests/\n```\n\nThis creates the ConfigMap below with an empty `data` field and the annotations `configmap-operator-src` and `configmap-operator-key` which will be used by the operator to fill in `data`.\n\n```yaml mdox-exec=\"cat examples/manifests/configmap.yaml\"\napiVersion: v1\nkind: ConfigMap\nmetadata:\n  annotations:\n    configmap-operator-key: prom.yaml\n    configmap-operator-src: https://raw.githubusercontent.com/prometheus/prometheus/main/documentation/examples/prometheus.yml\n  labels:\n    app.kubernetes.io/component: kubernetes-operator\n    app.kubernetes.io/instance: configmap-operator\n    app.kubernetes.io/name: configmap-operator\n  name: example-prom-config\n  namespace: configmap-operator-demo\n```\n\nThe operator is deployed with the Deployment below and its related RoleBinding and ServiceAccount. It finds ConfigMaps with the above annotations and starts updating it periodically (15s)\n\n```yaml mdox-exec=\"cat examples/manifests/deployment.yaml\"\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n  labels:\n    app.kubernetes.io/component: kubernetes-operator\n    app.kubernetes.io/instance: configmap-operator\n    app.kubernetes.io/name: configmap-operator\n  name: configmap-operator\n  namespace: configmap-operator-demo\nspec:\n  replicas: 1\n  selector:\n    matchLabels:\n      app.kubernetes.io/component: kubernetes-operator\n      app.kubernetes.io/instance: configmap-operator\n      app.kubernetes.io/name: configmap-operator\n  template:\n    metadata:\n      labels:\n        app.kubernetes.io/component: kubernetes-operator\n        app.kubernetes.io/instance: configmap-operator\n        app.kubernetes.io/name: configmap-operator\n    spec:\n      containers:\n      - args:\n        - run\n        - --log.level=info\n        - --log.format=json\n        - --refresh.interval=15s\n        - --namespace=$(NAMESPACE)\n        env:\n        - name: NAMESPACE\n          valueFrom:\n            fieldRef:\n              fieldPath: metadata.namespace\n        image: saswatamcode/configmap-operator\n        imagePullPolicy: IfNotPresent\n        name: configmap-operator\n        ports:\n        - containerPort: 9090\n        resources: {}\n      serviceAccount: configmap-operator-sa\n```\n\nWatch the ConfigMap for changes and see the `data` field get populated with a `prom.yaml` sample Prometheus config.\n\n```bash\nwatch kubectl get configmap example-prom-config --namespace configmap-operator-demo -o yaml \n```\n\n## Credits\n\nInitially inspired by [cloud-native-skunkworks/cnskunkworks-operator](https://github.com/cloud-native-skunkworks/cnskunkworks-operator)!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaswatamcode%2Fconfigmap-operator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaswatamcode%2Fconfigmap-operator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaswatamcode%2Fconfigmap-operator/lists"}