{"id":13608993,"url":"https://github.com/TheYkk/synator","last_synced_at":"2025-04-12T17:33:33.768Z","repository":{"id":42718898,"uuid":"289912952","full_name":"TheYkk/synator","owner":"TheYkk","description":"Synator Kubernetes Secret and ConfigMap synchronizer","archived":false,"fork":false,"pushed_at":"2024-01-16T12:30:42.000Z","size":47,"stargazers_count":118,"open_issues_count":5,"forks_count":23,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-08T16:18:33.386Z","etag":null,"topics":["hacktoberfest","kubernetes","secret"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TheYkk.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-08-24T11:48:12.000Z","updated_at":"2025-01-07T18:09:04.000Z","dependencies_parsed_at":"2024-08-01T19:42:47.710Z","dependency_job_id":"b9f44de4-d2fe-459c-ad48-350039d506c0","html_url":"https://github.com/TheYkk/synator","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheYkk%2Fsynator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheYkk%2Fsynator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheYkk%2Fsynator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheYkk%2Fsynator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheYkk","download_url":"https://codeload.github.com/TheYkk/synator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248605498,"owners_count":21132181,"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":["hacktoberfest","kubernetes","secret"],"created_at":"2024-08-01T19:01:31.574Z","updated_at":"2025-04-12T17:33:33.759Z","avatar_url":"https://github.com/TheYkk.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Synator Kubernetes Secret and ConfigMap synchronizer\n\nSometimes we want to use secrets in different namespaces, unfortunately, we can’t do without any helper operators or manual copying because in kubernetes secrets and configmaps are namespace. We can copy secrets and configmaps when we have a couple of namespaces and secrets. But when we have dozens of namespaces, it can be very complicated. \n\nSynator uses [kopf](https://github.com/nolar/kopf) python framework. Its easy to use.\n\n[Medium writeup](https://itnext.io/kubernetes-secret-and-configmap-sync-6c6b9f906b0d)\n## Deployment\nIt’s easy to use synator on K8s. All we have to do is deploy [deploy.yml](https://github.com/TheYkk/synator/blob/master/deploy.yml) to Kubernetes.\n\n## Usage\nAdd annotation `synator/sync=yes` to Secret or ConfigMap. \n![secret.yaml](https://miro.medium.com/max/2400/1*3gXBYpff106HREtJuWIu0Q.png)\n\nOptionally add one of these annotations in include specific destination\nnamespaces, or exclude the namespaces from the sync.\n\nFor only sync in this namespaces:\n`synator/include-namespaces='namespace1,namespace2'`\n\nSync all namespaces excludes this namespaces:\n`synator/exclude-namespaces='kube-system,kube-node-lease'`\n\n![secret.yaml](https://miro.medium.com/max/2400/1*UH4iTu3Gg6DkofHyX2KDHg.png)\n\n## Reload pod when config upgraded\nAdd annotation `synator/reload: \"secret:example\"` to pod or deployment template\nWhen secret example updated busybox pod will reload\n\nNote: For multiple secrte or configmap:\n`synator/reload: \"secret:example,secret:example2,configmap:example...\"`\n\n```\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: busybox\n  namespace: default\nspec:\n  replicas: 1\n  selector:\n    matchLabels:\n      name: busybox\n  template:\n    metadata:\n      labels:\n        name: busybox\n      annotations:\n        synator/reload: \"secret:selam\"\n    spec:\n      containers:\n        - name: busybox\n          image: busybox\n          command:\n            - \"sleep\"\n            - \"1h\"\n```\n## Triggers\n - When update config or secret\n - When create config or secret\n\n## Watching Namespaces\n\nsynator Operator installs with cluster wide permissions, however you can optionally control which namespaces it watches by by setting the WATCH_NAMESPACE environment variable.\n\n`WATCH_NAMESPACE` can be omitted entirely, or a comma separated list of k8s namespaces.\n\n- `WATCH_NAMESPACE=\"\"` will watch for resources across the entire cluster.\n- `WATCH_NAMESPACE=\"foo\"` will watch for resources in the foo namespace.\n- `WATCH_NAMESPACE=\"foo,bar\"` will watch for resources in the foo and bar namespace.\n\n## Build and deploy\nBuild docker image\n\n```\ndocker build -t \u003cusename\u003e/synator:v1 .\n```\n\nEdit deploy.yml with your image name\n\n```\nkubectl apply -f deploy.yml\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTheYkk%2Fsynator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTheYkk%2Fsynator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTheYkk%2Fsynator/lists"}