{"id":21476088,"url":"https://github.com/amirhnajafiz/simple-cd","last_synced_at":"2025-07-20T16:33:16.235Z","repository":{"id":76932017,"uuid":"334853187","full_name":"amirhnajafiz/simple-cd","owner":"amirhnajafiz","description":"A simple application for having continuous delivery.","archived":false,"fork":false,"pushed_at":"2024-10-10T19:57:34.000Z","size":1732,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-23T04:41:24.440Z","etag":null,"topics":["cd","continuous-delivery","gitops","shell","shell-script"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amirhnajafiz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2021-02-01T06:30:36.000Z","updated_at":"2024-10-10T19:57:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"e169d283-bd2f-451b-a25b-5f2a83c7ffb2","html_url":"https://github.com/amirhnajafiz/simple-cd","commit_stats":null,"previous_names":["amirhnajafiz-learning/loki","amirhnajafiz-learning/loki-grafana","amirhnajafiz-learning/simple-cd"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/amirhnajafiz/simple-cd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amirhnajafiz%2Fsimple-cd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amirhnajafiz%2Fsimple-cd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amirhnajafiz%2Fsimple-cd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amirhnajafiz%2Fsimple-cd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amirhnajafiz","download_url":"https://codeload.github.com/amirhnajafiz/simple-cd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amirhnajafiz%2Fsimple-cd/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265428713,"owners_count":23763623,"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":["cd","continuous-delivery","gitops","shell","shell-script"],"created_at":"2024-11-23T10:47:11.847Z","updated_at":"2025-07-20T16:33:16.212Z","avatar_url":"https://github.com/amirhnajafiz.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SimpleCD\r\n\r\nSimpleCD (aka simple continuous delivery) is a cloned application for current CD tools like ArgoCD, Jenkins, and Flux. It is being used to deploy applications on Kubernetes cluster.\r\nIt can be installed on Kubernetes clusters or any local machines. I call it SimpleCD because it's logic is so basic and simple. First you give your desired repositories as a source, then, as a destination you need to specify a Namespace. Moreover, if you want to deploy SimpleCD on a Kubernetes cluster, you have to create a serviceAccount with cluster-admin role provided. On the other hand, if you are running SimpleCD on a local machine, make sure to specify the kubernetes API server address and a authentication token with cluster-admin role.\r\n\r\nEach instance of `simple-cd`, get the information of a git repository, and the credentials needed to communicate with a Kubernetes API. Then, it will run a git command to see if the upstream has changed or not. If so, it will pull the changes and apply them to the Kubernetes API.\r\n\r\n## Running on Kubernetes\r\n\r\n```env\r\n# Repository configs\r\nSCD_REPO_PATH=\"logs\"\r\nSCD_REPO_MANIFESTS=\"\"\r\n\r\n# Kubernetes API configs\r\nSCD_KUBE_API=\"https://api:8080\"\r\nSCD_KUBE_TOKEN=\"service-account-or-user-token\"\r\nSCD_KUBE_NS=\"namespace\"\r\n\r\n# Simple-CD configs\r\nSCD_INTERVAL=5         # main loop interval time in seconds\r\nSCD_LOG=\"logs/log.txt\" # the log directory should exists and the process should be able to create files in that directory\r\n```\r\n\r\n```yml\r\napiVersion: v1\r\nkind: Pod\r\nmetadata:\r\n  name: simple-cd\r\nspec:\r\n  initContainers:\r\n  - name: git-clone\r\n    env:\r\n    - name: RIPO\r\n      value: \"https://github.com/repo.git\"\r\n    image: alpine/git\r\n    command:\r\n      - /bin/sh\r\n      - -c\r\n      - |\r\n        git clone \"$RIPO\" /data/repo\r\n    volumeMounts:\r\n      - name: git-volume\r\n        mountPath: /data\r\n  containers:\r\n  - image: ghcr.io/amirhnajafiz/simple-cd:v0.0.1\r\n    env:\r\n    - name: SCD_KUBE_TOKEN\r\n      valueFrom:\r\n        secretKeyRef:\r\n          name: default-token\r\n          key: token\r\n    - name: SCD_KUBE_NS\r\n      valueFrom:\r\n        fieldRef:\r\n          fieldPath: metadata.namespace\r\n    - name: SCD_KUBE_API\r\n      value: \"https://$(KUBERNETES_SERVICE_HOST):$(KUBERNETES_SERVICE_PORT)\"\r\n    volumeMounts:\r\n    - name: service-account-token\r\n      mountPath: /var/run/secrets/kubernetes.io/serviceaccount\r\n      readOnly: true\r\n    - name: git-volume\r\n      mountPath: /app/repo\r\n  volumes:\r\n  - name: git-volume\r\n    emptyDir: {}\r\n  - name: service-account-token\r\n    secret:\r\n      secretName: default-token  # This secret contains the service account token\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famirhnajafiz%2Fsimple-cd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famirhnajafiz%2Fsimple-cd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famirhnajafiz%2Fsimple-cd/lists"}