Last active
February 3, 2021 20:57
-
-
Save rogerwelin/fac0ac7540b5065063628f6459b1a71f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
repo-groups | |
https://docs.atlassian.com/bitbucket-server/rest/5.2.1/bitbucket-rest.html#idm45701776441776 | |
https://docs.atlassian.com/bitbucket-server/rest/5.2.1/bitbucket-rest.html#idm45701776450800 | |
/REST/API/1.0/PROJECTS/{PROJECTKEY}/REPOS/{REPOSITORYSLUG}/PERMISSIONS/GROUPS?PERMISSION&NAME | |
Promote or demote a group's permission level for the specified repository. Available repository permissions are: | |
* REPO_READ | |
* REPO_WRITE | |
* REPO_ADMIN | |
Typ: | |
PUT /REST/API/1.0/PROJECTS/{PROJECTKEY}/REPOS/{REPOSITORYSLUG}/PERMISSIONS/GROUPS?PERMISSION=REPO_WRITE&NAME=group_name | |
read permission kan skapa PR | |
Kustomize: | |
set image-name och tag samtidigt: | |
kustomize edit set image gitops-argocd=$DOCKER_USERNAME/gitops-argocd:${{ github.sha }} | |
https://github.com/rogerwelin/argocd-kustomize-tutorial/blob/master/.github/workflows/gitops.yml | |
----- | |
Application Config Repo | |
This repository contains the kubernetes deployment files for your application. | |
Changing these files will automatically trigger a deployment event by ArgoCD in the respective environment and cluster; which you can find here ... or here ... | |
[ArgoCD](https://argoproj.github.io/argo-cd/) is the GitOps controller and it's set to watch this repo as it's desired state, changing this repo will call a reconciliation loop in respective cluster where ArgoCD will make sure the desired state is in the same as the observed state | |
The directory structure defines the meat of the yaml files in base/ and the different environment (or also called overlays) in each respective envs/{environment} folder. We keep the yaml file DRY by keeping the main structure in base/ and in the different environment we only specify what's diffing from the base (could be number of replicas or ingress hostname for example). We accomplish this by using a tool called kustomize. | |
You can download Kustomize here (url). If you want to make sure the yaml files are valid (before you push your change) and understood by kustomize you can run this command in the directory where you made your changes: | |
```bash | |
$ kustomize build env/dev | |
``` | |
Please consult the Kubernetes documentation for a reference on the different Kinds we use: | |
* [Service](https://kubernetes.io/docs/concepts/services-networking/service/) | |
* [Deployment](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/) | |
* [Ingress](https://doc.traefik.io/traefik/routing/providers/kubernetes-crd/) | |
Other resources that are not included but that you can add are for example ConfigMaps and Secrets: | |
* [ConfigMap](https://kubernetes.io/docs/concepts/configuration/configmap/) | |
* [Secrets](https://kubernetes.io/docs/concepts/configuration/secret/) | |
However do not check-in secrets in Git without encrypting them first; please follow this guide on how to accomplish that |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment