{"id":26778273,"url":"https://github.com/elastisys/ck8s-starter-argocd","last_synced_at":"2025-07-28T17:08:45.361Z","repository":{"id":187892030,"uuid":"646793403","full_name":"elastisys/ck8s-starter-argocd","owner":"elastisys","description":"Compliant Kubernetes Jumpstart Kit for NodeJS (ArgoCD version)","archived":false,"fork":false,"pushed_at":"2023-10-26T13:56:58.000Z","size":399,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-29T05:36:45.580Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/elastisys.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}},"created_at":"2023-05-29T11:00:30.000Z","updated_at":"2023-05-29T11:20:34.000Z","dependencies_parsed_at":"2023-08-12T16:31:35.575Z","dependency_job_id":null,"html_url":"https://github.com/elastisys/ck8s-starter-argocd","commit_stats":null,"previous_names":["elastisys/ck8s-starter-argocd"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/elastisys/ck8s-starter-argocd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elastisys%2Fck8s-starter-argocd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elastisys%2Fck8s-starter-argocd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elastisys%2Fck8s-starter-argocd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elastisys%2Fck8s-starter-argocd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elastisys","download_url":"https://codeload.github.com/elastisys/ck8s-starter-argocd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elastisys%2Fck8s-starter-argocd/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267552097,"owners_count":24106000,"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","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-03-29T05:36:47.652Z","updated_at":"2025-07-28T17:08:45.312Z","avatar_url":"https://github.com/elastisys.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Compliant Kubernetes Starter Kit for NodeJS (ArgoCD version)\n\n![argodemoimg](./images/argodemo.drawio.svg)\n\n## How do I deploy my application?\n\n1. Click on [use this template](https://github.com/elastisys/ck8s-starter-argocd/generate) and create a new repository. This will be your **code repository**.\n\\\n*It is recommended to be a private repository.*\n\n2. Go to [this](https://github.com/elastisys/ck8s-starter-argocd-config) repository and create a new repository from that template, this will be your **config repository**.\n\\\n*It is recommended to be a private repository.*\n\n3. Navigate to harbor.$DOMAIN and login. Create a new project, and add a [robot account](https://goharbor.io/docs/2.2.0/working-with-projects/project-configuration/create-robot-accounts/) to that project.\n![harborimg](./images/harbor.png)\n\n4. Export these environment variables:\n```\nDOCKER_USER='robot$name'    # enter robot account name\nDOCKER_PASSWORD=            # enter robot secret\nDOMAIN=                     # enter your domain\n```\n\n5. Make sure your kubeconfig is in the namespace in which you want to deploy your demo application. Then run the script `init-setup-argocd.sh` in the scripts folder. This script will [setup a pull secret](https://elastisys.io/compliantkubernetes/user-guide/deploy/#configure-an-image-pull-secret) in your namespace, aswell as generate an SSH-key that will be used by both ArgoCD and the GitHub Actions workflow.\n```\n./scripts/init-setup-argocd.sh\n```\n\n6. Navigate to argocd.$DOMAIN and login. Go to \"Manage your repositories, projects, settings\", then click on Projects.\n![argoprojectsimg](./images/argoprojects.png)\nClick on \"NEW PROJECT\". Create your project and then edit the following:\n\n**Source Repositories** \\\nyour config-repository\n\n**Destinations** \\\nServer: https://kubernetes.default.svc \\\nName: * \\\nNamespace: your-namespace\n\n7. Configure SSH-Keys. \\\nCopy your public key and add to **Deploy keys** under settings in your **config repository**. *Make sure you enable write access.* You can see your public key with this command:\n```\ncat ~/.ssh/argosshkey.pub\n```\nNavigate to argocd.$DOMAIN and login. Go to \"Manage your repositories, projects, settings\", then click on Repositories.\n![argoreposimg](./images/argorepos.png)\nRead [here](https://argo-cd.readthedocs.io/en/stable/user-guide/private-repositories/#ssh-private-key-credential) on how to connect to private repository with argo using SSH-keys. \\\nYou can see your private key with this command:\n```\ncat ~/.ssh/argosshkey\n```\n\n8. Under repositories in ArgoCD and click the three dots next to the one you just created, select \"Create application\".\n![argocreateappimg](./images/argocreateapp.png)\n- Name your application, select your project that you created, and select if you want a manual or automatic sync policy.\n- Scroll down to \"Source\" and change \"Path\" to `ck8s-user-demo`.\n- Scroll down to \"Destination\" and select \"https://kubernetes.default.svc\" as URL, and then enter your namespace.\n- Click on \"CREATE\".\n\n9. In the **code repository**, go to the environment `development`, and set the following [environment secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-an-environment):\n\n`DOCKER_PASSWORD` (1)\n\\\n`SSH_PRIVKEY` (2)\n\\\n`REPO_OWNER` (3)\n\\\n`REPO_TARGET` (4)\n\n(1) Robot account secret.\n\n(2) The private SSH key created earlier.\n\n(3) Name of the owner of config repository, either organization or username.\n\n(4) Name of the config repository.\n\n*Environments, environment secrets, and environment protection rules are available in public repositories for all products. For access to environments, environment secrets, and deployment branches in private or internal repositories, you must use GitHub Pro, GitHub Team, or GitHub Enterprise. **If your repositories is on an account without these permissions, you can create the secrets as normal repository secrets for the demo.** But please note that **all** branches will have access to the secrets, and using protected branches is not safe.*\n\n10. In the **code repository**, make changes in the [workflow file](.github/workflows/build-and-deploy-to-ck8s.yaml):\n\n`DOMAIN` (1)\n\\\n`APP_DOMAIN` (2)\n\\\n`DOCKER_USER` (3)\n\\\n`REGISTRY_PROJECT` (4)\n\n(1) Your $DOMAIN.\n\n(2) Your desired_appname.$DOMAIN\n\n(3) Name of robot account.\n\n(4) Name of the harbor project you created.\n\n11. Push your changes and done! \\\nNote that ArgoCD automatic sync interval is [by default 3 minutes](https://argo-cd.readthedocs.io/en/stable/user-guide/auto_sync/#automated-sync-semantics). So it may take some time before you see the changes.\n\n## How do I use a protected branch and only deploy if someone reviewed?\n\n1. Go to **Settings** -\u003e **Environments**, chose `development` and edit. Under \"Deployment branches\", select \"Protected branches\". The secrets can now only be used on the protected branches.\n\n2. Go to **Settings** -\u003e **Branches**, click on \"Add branch protection rule\".\n\n3. Enter the branch name \"main\", then click the checkbox for \"Require a pull request before merging\". Here you can also select extra checkboxes like \"Require approvals\", \"Require review from Code Owners\" and more.\n\n4. Done! All changes must be done in separate branches and merged with a pull request to the main branch. After reviewing the changes and merging, it will trigger the workflow with the new changes and automatically deploy to ck8s.\n\n## Why have two separate repositories for code and config?\n\nYou can read about ArgoCD best practices [here](https://argo-cd.readthedocs.io/en/stable/user-guide/best_practices/).\n\n## How do I access my application?\n\nCheck the logs of GitHub Actions.\n\n## Where do I find my application logs?\n\nCheck the logs of GitHub Actions.\n\n## How do I set up alerts for my application?\n\nOnce you found you logs, check out [log-based alerts](https://elastisys.io/compliantkubernetes/user-guide/log-based-alerts/).\n\n## I need help\n\nSend the full output of your CI/CD pipeline to your TAM.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felastisys%2Fck8s-starter-argocd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felastisys%2Fck8s-starter-argocd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felastisys%2Fck8s-starter-argocd/lists"}