Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bad commit #26

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,12 @@ Codefresh GitOps Certification examples - Level 3 - GitOps Enterprise
This repository contains examples for the ArgoCD/GitOps certification workshops (Level 3)

Take the certification yourself at [https://codefresh.io/courses/get-gitops-certified/](https://learning.codefresh.io/)



bad

good commit

good

Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ spec:
value: "qa"
- name: GPU_ENABLED
value: "1"


7 changes: 7 additions & 0 deletions argocd-apps-structure/apps/billing/envs/qa/replicas.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: simple-deployment
spec:
replicas: 2
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
- name: webserver-simple
env:
- name: ENV
value: "prod-us"
value: "prod-eu"
- name: GPU_ENABLED
value: "1"


Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization


resources:
- ../../base


patchesStrategicMerge:
- deployment.yml
- version.yml
- replicas.yml
- settings.yml


Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ spec:
- name: webserver-simple
env:
- name: UI_THEME
value: "light"
value: "dark"
- name: CACHE_SIZE
value: "2048kb"
- name: PAGE_LIMIT
value: "25"
- name: SORTING
value: "ascending"
- name: N_BUCKETS
value: "42"
value: "42"
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ spec:
spec:
containers:
- name: webserver-simple
image: docker.io/kostiscodefresh/simple-env-app:1.0
image: docker.io/kostiscodefresh/simple-env-app:2.0
2 changes: 2 additions & 0 deletions argocd-apps-structure/appsets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
## 说明
在实际环境中,应该需要使用 cluster labels and the matrix generator 以控制哪些应用程序将被分配到哪些集群。
6 changes: 3 additions & 3 deletions argocd-apps-structure/appsets/my-prod-appset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
goTemplateOptions: ["missingkey=error"]
generators:
- git:
repoURL: https://github.com/codefresh-contrib/gitops-cert-level-3-examples.git
repoURL: https://github.com/ForcemCS/gitops-cert-level-3-examples.git
revision: HEAD
directories:
- path: argocd-apps-structure/apps/*/envs/prod-us
Expand All @@ -22,13 +22,13 @@ spec:

# Source of the application manifests
source:
repoURL: https://github.com/codefresh-contrib/gitops-cert-level-3-examples.git
repoURL: https://github.com/ForcemCS/gitops-cert-level-3-examples.git
targetRevision: HEAD
path: '{{.path.path}}'

# Destination cluster and namespace to deploy the application
destination:
server: https://kubernetes.default.svc
name: cluster-2
namespace: '{{index .path.segments 2}}-{{index .path.segments 4}}'

# Sync policy
Expand Down
4 changes: 2 additions & 2 deletions argocd-apps-structure/appsets/my-qa-appset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
goTemplateOptions: ["missingkey=error"]
generators:
- git:
repoURL: https://github.com/codefresh-contrib/gitops-cert-level-3-examples.git
repoURL: https://github.com/ForcemCS/gitops-cert-level-3-examples.git
revision: HEAD
directories:
- path: argocd-apps-structure/apps/*/envs/qa
Expand All @@ -21,7 +21,7 @@ spec:

# Source of the application manifests
source:
repoURL: https://github.com/codefresh-contrib/gitops-cert-level-3-examples.git
repoURL: https://github.com/ForcemCS/gitops-cert-level-3-examples.git
targetRevision: HEAD
path: '{{.path.path}}'

Expand Down
4 changes: 2 additions & 2 deletions argocd-apps-structure/appsets/my-staging-appset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
goTemplateOptions: ["missingkey=error"]
generators:
- git:
repoURL: https://github.com/codefresh-contrib/gitops-cert-level-3-examples.git
repoURL: https://github.com/ForcemCS/gitops-cert-level-3-examples.git
revision: HEAD
directories:
- path: argocd-apps-structure/apps/*/envs/staging
Expand All @@ -21,7 +21,7 @@ spec:

# Source of the application manifests
source:
repoURL: https://github.com/codefresh-contrib/gitops-cert-level-3-examples.git
repoURL: https://github.com/ForcemCS/gitops-cert-level-3-examples.git
targetRevision: HEAD
path: '{{.path.path}}'

Expand Down
2 changes: 1 addition & 1 deletion argocd-apps-structure/root-argocd-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
spec:
project: default
source:
repoURL: https://github.com/codefresh-contrib/gitops-cert-level-3-examples.git
repoURL: https://github.com/ForcemCS/gitops-cert-level-3-examples.git
targetRevision: HEAD
path: argocd-apps-structure/appsets
destination:
Expand Down
4 changes: 2 additions & 2 deletions preview-environments/pr-generator/pr-generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ spec:
generators:
- pullRequest:
github:
owner: codefresh-contrib
owner: ForcemCS
repo: gitops-cert-level-3-examples
requeueAfterSeconds: 180
template:
metadata:
name: 'myapp-{{.branch}}'
spec:
source:
repoURL: 'https://github.com/codefresh-contrib/gitops-cert-level-3-examples.git'
repoURL: 'https://github.com/ForcemCS/gitops-cert-level-3-examples.git'
targetRevision: HEAD
path: preview-environments/kustomize-preview-app/
kustomize:
Expand Down