{"id":22213998,"url":"https://github.com/xmlking/kustomize","last_synced_at":"2025-03-25T06:24:01.096Z","repository":{"id":39060651,"uuid":"273802788","full_name":"xmlking/kustomize","owner":"xmlking","description":"A collection of kustomization recipes","archived":false,"fork":false,"pushed_at":"2022-06-23T23:52:59.000Z","size":59,"stargazers_count":0,"open_issues_count":9,"forks_count":0,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2025-01-30T05:43:21.310Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/xmlking.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["xmlking"],"open_collective":"xmlking"}},"created_at":"2020-06-20T23:51:31.000Z","updated_at":"2020-06-21T00:18:47.000Z","dependencies_parsed_at":"2022-09-09T00:41:30.168Z","dependency_job_id":null,"html_url":"https://github.com/xmlking/kustomize","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmlking%2Fkustomize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmlking%2Fkustomize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmlking%2Fkustomize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmlking%2Fkustomize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xmlking","download_url":"https://codeload.github.com/xmlking/kustomize/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245409566,"owners_count":20610554,"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-12-02T21:12:53.867Z","updated_at":"2025-03-25T06:24:01.073Z","avatar_url":"https://github.com/xmlking.png","language":"Shell","readme":"# kustomize\n\nA collection of Infrastructure components' kustomization recipes.\n\n\n## Deployment\n\ndeploying with **appctl** and **Kustomize**\n\n### Structure\n\n```\n├── config\n│   ├── base\n│   │   ├── kustomization.yaml\n│   │   └── myapp.yaml\n│   └── envs\n│       ├── prod\n│       │   └── kustomization.yaml\n│       └── staging\n│           ├── kustomization.yaml\n│           └── patch-replicas.yaml\n└── delivery\n    └── envs\n        ├── prod.yaml\n        └── staging.yaml\n```\n\nwe can even have multiple levels of nested overlays\n\ne.g., base, envs, \u003cregions/zones\u003e\n\n#### config/base\n\n  Configuration in the directory `config/base` applies to all environments. Additional configuration in `config/envs` can modify this configuration.\n\n#### config/envs\n\n  The repository contains information on two environments, defined in the directory `config/envs`: `prod` and `staging`.\n\n  The `prod` environment refers only to the configuration in `config/base/myapp.yaml`.\n\n  The `staging` environment has an additional customization in `config/envs/staging/patch-replicas.yaml`. This customization is referenced in `config/envs/staging/kustomization.yaml`.\n\n#### delivery/envs\n\n  Subdirectories in `delivery/envs` contain information on the GKE clusters that host each environment. These files are automatically generated and don't need to be modified directly.\n\n### Install\n\n```bash\ngcloud components install appctl\n```\n\n### Setup\n\n\u003e One time setup\n\n```bash\n# Initialize existing repository\n# make sure the `git remote -v` show `git@github.com:xmlking/grpc-starter-kit.git`\ncd ..\nappctl init grpc-starter-kit --app-config-repo=github.com/xmlking/grpc-starter-kit\ncd grpc-starter-kit\n# Create the configuration for your Kubernetes workload. i.e., add/update `config/base`, then test:\n# kubectl apply -k config/base/ --dry-run=client -o yaml\nkustomize build config/base\n# if works, add changes to git and commit.\ngit add .\ngit commit -m \"chore(deploy): bootstraping config\"\ngit push\n# 2. add new envs and connect to cluster\nappctl env add development --cluster=sumo --namespace=development --review-required=false\nappctl env add staging --cluster=sumo --namespace=staging --review-required=false\nappctl env add production --cluster=sumo --namespace=production --review-required=true\n# To see appctl changes, run `git log -p *`.\n# push auto-generated configurations\ngit push\n# Create the configuration for your enveronments. i.e., add/update `config/envs`, then test, push code.\n# dry run to see what you will create\n# kubectl apply -k config/envs/development  --dry-run=client -o yaml\nmkdir -p {./build/kubernetes/development,./build/kubernetes/production,./build/kubernetes/staging}\nkustomize build config/envs/development --output ./build/kubernetes/development --load_restrictor none \nkustomize build config/envs/production --output ./build/kubernetes/production --load_restrictor none \nkustomize build config/envs/staging --output ./build/kubernetes/staging --load_restrictor none\n# tag changes\ngit tag v0.1.3\ngit push origin  v0.1.3\n# prepare env PR (response with created PR in seymour-env)\nappctl prepare development\nappctl prepare development --from-tag v0.1.3\n# run apply without merge the PR -\u003e deny\nappctl apply staging\n# merge PR in seymour-env and see created dev branch\n# rerun apply\n# open GCP and see GKE/Applications\n# to promote a release candidate from one environment to another, run the following command:\nappctl prepare prod --from-env staging\n# to deploy the release candidate to the target environment, run the following command:\nappctl apply prod\n# rollback\nappctl apply development --from-tag v0.1.0\n```\n\n### Reference\n\n1. [kustomize](https://kubectl.docs.kubernetes.io/pages/examples/kustomize.html)\n1. \u003chttps://github.com/kubernetes-sigs/kustomize/blob/master/docs/glossary.md\u003e\n1. \u003chttps://blog.jetstack.io/blog/kustomize-cert-manager/\u003e\n1. \u003chttps://kustomize.io/\u003e\n1. with sops \u003chttps://teuto.net/deploying-jupyterhub-to-kubernetes-via-kustomize-using-sops-secret-management/?lang=en\u003e\n1. \u003chttps://github.com/pwittrock-me/petclinic-config/tree/master/config\u003e\n1. [TODO: gRPC-Web Istio Demo](https://github.com/venilnoronha/grpc-web-istio-demo)\n1. patch example, keycloak traefik \u003chttps://github.com/piotrjanik/opa-warsaw-cloud-native-conf/tree/master/manifests\u003e\n1. [Application Delivery](https://cloud.google.com/kubernetes-engine/docs/concepts/add-on/application-delivery)\n1. [Application Manager for GKE](https://cloud.google.com/blog/products/containers-kubernetes/announcing-application-manager-for-google-kubernetes-engine)\n1. [Application Manager brings GitOps to GKE](https://www.youtube.com/watch?v=r5_xYtbZPfc)\n","funding_links":["https://github.com/sponsors/xmlking","https://opencollective.com/xmlking"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxmlking%2Fkustomize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxmlking%2Fkustomize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxmlking%2Fkustomize/lists"}