{"id":19967942,"url":"https://github.com/damiannolan/eventing-init","last_synced_at":"2026-05-13T04:32:56.107Z","repository":{"id":113893383,"uuid":"199287508","full_name":"damiannolan/eventing-init","owner":"damiannolan","description":"A K8s Init Container as a wait mechanism for Kafka availability and Topic configuration","archived":false,"fork":false,"pushed_at":"2019-08-05T11:42:57.000Z","size":910,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-03-05T20:20:49.060Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/damiannolan.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":"2019-07-28T12:58:07.000Z","updated_at":"2024-06-19T11:10:12.558Z","dependencies_parsed_at":null,"dependency_job_id":"f2e77e2e-d946-452e-ac79-ac7780daca9e","html_url":"https://github.com/damiannolan/eventing-init","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damiannolan%2Feventing-init","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damiannolan%2Feventing-init/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damiannolan%2Feventing-init/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damiannolan%2Feventing-init/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/damiannolan","download_url":"https://codeload.github.com/damiannolan/eventing-init/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241404207,"owners_count":19957650,"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-11-13T02:44:06.811Z","updated_at":"2026-05-13T04:32:56.055Z","avatar_url":"https://github.com/damiannolan.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eventing-init\n\nA [Kubernetes Init Container](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/) as a wait mechanism for Kafka availability and topic configuration.\n\nThis project serves as a means to block service startup until Kafka eventing and topic dependencies have been fulfilled.\n\n## Usage\n\nThe following example assumes the use of [Helm](https://helm.sh/) (A Package manager for Kubernetes), however this is not a requirement and appropriate K8s manifests can be constructed without the use of Helm's templating functionality.\n\n1. A ConfigMap should be provided with the required Kafka Topics.\nFor Example:\n\n```yaml\napiVersion: v1\nkind: ConfigMap\nmetadata:\n  name: service-x-topics-config\ndata:\n  topics.yml: |\n    topics:\n    {{- range .Values.kafka.topics }}\n      - {{ . | quote }}\n    {{- end }}\n```\n\n2. Topic entries should be supplied through `values.yaml`\nFor Example:\n\n```yaml\n...\nkafka:\n  topics:\n    - notification-events\n    - request-events\n```\n\n3. An `initContainers` entry should be added to the service Deployment PodSpec with a `volumeMounts` entry specifying the associated ConfigMap. Environment variables can be provided in the Container spec, if omitted the default configuration fallbacks are used for Kafka host, port and version.\n\nFor Example:\n\n```yaml\nspec:\n    initContainers:\n    - name: eventing-init\n      image: damiannolan/eventing-init:0.1.0\n      imagePullPolicy: Always\n      volumeMounts:\n      - name: topics-config\n        mountPath: /etc/config\n    ...\n    volumes:\n    - name: topics-config\n      configMap:\n      name: sevice-x-topics-config\n```\n\n### TODO's\n\n- Cleanup config pkg - possibly use [viper](https://github.com/spf13/viper)\n- Add more configurability (Create topics if not exists option)\n- Use [logrus](https://github.com/sirupsen/logrus) for logging\n- Use [testify](https://github.com/stretchr/testify) for assertions","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamiannolan%2Feventing-init","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdamiannolan%2Feventing-init","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamiannolan%2Feventing-init/lists"}