Edit.
This commit is contained in:
@@ -9,7 +9,7 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
project: default
|
project: default
|
||||||
source:
|
source:
|
||||||
repoURL: https://github.com/antonputra/lesson-158.git
|
repoURL: https://git.benadis.ru/gitops/argocd-001.git
|
||||||
targetRevision: HEAD
|
targetRevision: HEAD
|
||||||
path: my-app
|
path: my-app
|
||||||
destination:
|
destination:
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
project: default
|
project: default
|
||||||
source:
|
source:
|
||||||
repoURL: https://github.com/antonputra/lesson-158.git
|
repoURL: https://git.benadis.ru/gitops/argocd-001.git
|
||||||
targetRevision: HEAD
|
targetRevision: HEAD
|
||||||
path: environments/staging/apps
|
path: environments/staging/apps
|
||||||
destination:
|
destination:
|
||||||
|
|||||||
1
deploy-pr/README.md
Normal file
1
deploy-pr/README.md
Normal file
@@ -0,0 +1 @@
|
|||||||
|
# lesson-158-private
|
||||||
7
deploy-pr/environments/dev/my-app/kustomization.yaml
Normal file
7
deploy-pr/environments/dev/my-app/kustomization.yaml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
namespace: staging
|
||||||
|
images:
|
||||||
|
- name: aputra/nginx
|
||||||
|
newTag: v0.1.0
|
||||||
|
resources:
|
||||||
|
- ../../../my-app-base
|
||||||
21
deploy-pr/my-app-base/deployment.yaml
Normal file
21
deploy-pr/my-app-base/deployment.yaml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: nginx
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: nginx
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: nginx
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: nginx
|
||||||
|
imagePullPolicy: Always
|
||||||
|
image: aputra/nginx
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
8
deploy-pr/my-app-base/kustomization.yaml
Normal file
8
deploy-pr/my-app-base/kustomization.yaml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
metadata:
|
||||||
|
name: arbitrary
|
||||||
|
resources:
|
||||||
|
- deployment.yaml
|
||||||
|
- namespace.yaml
|
||||||
5
deploy-pr/my-app-base/namespace.yaml
Normal file
5
deploy-pr/my-app-base/namespace.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: default
|
||||||
5
deploy-pr/my-app/0-namespace.yaml
Normal file
5
deploy-pr/my-app/0-namespace.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: foo
|
||||||
26
deploy-pr/my-app/1-deployment.yaml
Normal file
26
deploy-pr/my-app/1-deployment.yaml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: nginx
|
||||||
|
namespace: foo
|
||||||
|
labels:
|
||||||
|
app: nginx
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: nginx
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: nginx
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: nginx
|
||||||
|
imagePullPolicy: Always
|
||||||
|
image: aputra/nginx-private:v0.1.0
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: dockerconfigjson
|
||||||
26
deploy/apps/my-app.yaml
Normal file
26
deploy/apps/my-app.yaml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: my-app-foo
|
||||||
|
namespace: argocd
|
||||||
|
finalizers:
|
||||||
|
- resources-finalizer.argocd.argoproj.io
|
||||||
|
spec:
|
||||||
|
project: default
|
||||||
|
source:
|
||||||
|
repoURL: https://git.benadis.ru/gitops/argocd-001.git
|
||||||
|
targetRevision: HEAD
|
||||||
|
path: environments/staging/my-app
|
||||||
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
|
allowEmpty: false
|
||||||
|
syncOptions:
|
||||||
|
- Validate=true
|
||||||
|
- CreateNamespace=false
|
||||||
|
- PrunePropagationPolicy=foreground
|
||||||
|
- PruneLast=true
|
||||||
26
deploy/apps/second-app.yaml
Normal file
26
deploy/apps/second-app.yaml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: second-app-bar
|
||||||
|
namespace: argocd
|
||||||
|
finalizers:
|
||||||
|
- resources-finalizer.argocd.argoproj.io
|
||||||
|
spec:
|
||||||
|
project: default
|
||||||
|
source:
|
||||||
|
repoURL: https://git.benadis.ru/gitops/argocd-001.git
|
||||||
|
targetRevision: HEAD
|
||||||
|
path: environments/staging/second-app
|
||||||
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
|
allowEmpty: false
|
||||||
|
syncOptions:
|
||||||
|
- Validate=true
|
||||||
|
- CreateNamespace=false
|
||||||
|
- PrunePropagationPolicy=foreground
|
||||||
|
- PruneLast=true
|
||||||
5
deploy/my-app/0-namespace.yaml
Normal file
5
deploy/my-app/0-namespace.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: foo
|
||||||
23
deploy/my-app/1-deployment.yaml
Normal file
23
deploy/my-app/1-deployment.yaml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: nginx
|
||||||
|
namespace: foo
|
||||||
|
labels:
|
||||||
|
app: nginx
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: nginx
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: nginx
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: nginx
|
||||||
|
image: aputra/nginx:v0.1.3
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
5
deploy/second-app/0-namespace.yaml
Normal file
5
deploy/second-app/0-namespace.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: bar
|
||||||
23
deploy/second-app/1-deployment.yaml
Normal file
23
deploy/second-app/1-deployment.yaml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: nginx
|
||||||
|
namespace: bar
|
||||||
|
labels:
|
||||||
|
app: nginx
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: nginx
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: nginx
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: nginx
|
||||||
|
image: aputra/nginx:v0.1.3
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
@@ -9,7 +9,7 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
project: default
|
project: default
|
||||||
source:
|
source:
|
||||||
repoURL: https://github.com/antonputra/lesson-158.git
|
repoURL: https://git.benadis.ru/gitops/argocd-001.git
|
||||||
targetRevision: HEAD
|
targetRevision: HEAD
|
||||||
path: environments/staging/my-app
|
path: environments/staging/my-app
|
||||||
destination:
|
destination:
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
project: default
|
project: default
|
||||||
source:
|
source:
|
||||||
repoURL: https://github.com/antonputra/lesson-158.git
|
repoURL: https://git.benadis.ru/gitops/argocd-001.git
|
||||||
targetRevision: HEAD
|
targetRevision: HEAD
|
||||||
path: environments/staging/second-app
|
path: environments/staging/second-app
|
||||||
destination:
|
destination:
|
||||||
|
|||||||
Reference in New Issue
Block a user