diff --git a/app/0-namespace.yaml b/environments/staging/app-1/0-namespace.yaml similarity index 77% rename from app/0-namespace.yaml rename to environments/staging/app-1/0-namespace.yaml index f1ded58..221a15a 100644 --- a/app/0-namespace.yaml +++ b/environments/staging/app-1/0-namespace.yaml @@ -1,4 +1,4 @@ apiVersion: v1 kind: Namespace metadata: - name: prod \ No newline at end of file + name: app1 \ No newline at end of file diff --git a/app/1-deployment.yaml b/environments/staging/app-1/1-deployment.yaml similarity index 95% rename from app/1-deployment.yaml rename to environments/staging/app-1/1-deployment.yaml index f00a510..1ab3139 100644 --- a/app/1-deployment.yaml +++ b/environments/staging/app-1/1-deployment.yaml @@ -2,7 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: nginx - namespace: prod + namespace: app2 spec: replicas: 1 selector: diff --git a/environments/staging/app-2/0-namespace.yaml b/environments/staging/app-2/0-namespace.yaml new file mode 100644 index 0000000..4e22c56 --- /dev/null +++ b/environments/staging/app-2/0-namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: app2 \ No newline at end of file diff --git a/environments/staging/app-2/1-deployment.yaml b/environments/staging/app-2/1-deployment.yaml new file mode 100644 index 0000000..dfef37e --- /dev/null +++ b/environments/staging/app-2/1-deployment.yaml @@ -0,0 +1,24 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: nginx + namespace: app1 +spec: + replicas: 1 + selector: + matchLabels: + app: nginx + template: + metadata: + labels: + app: nginx + spec: + containers: + - name: nginx + image: tf333/nginx:v0.1.2 + resources: + limits: + memory: "128Mi" + cpu: "500m" + ports: + - containerPort: 80 diff --git a/environments/staging/argo-apps/app1.yaml b/environments/staging/argo-apps/app1.yaml new file mode 100644 index 0000000..3061ff7 --- /dev/null +++ b/environments/staging/argo-apps/app1.yaml @@ -0,0 +1,25 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: app1 + namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: 'https://github.com/MeranaTona/argocd-tutorial-app.git' + targetRevision: HEAD + path: environments/staging/app1 + destination: + server: https://kubernetes.default.svc + syncPolicy: + automated: + prune: true + selfHeal: true + allowEmpty: false + syncOptions: + - Validate=true + - CreateNamespace=false + - PrunePropagationPolicy=foreground + - PruneLast=true \ No newline at end of file diff --git a/environments/staging/argo-apps/app2.yaml b/environments/staging/argo-apps/app2.yaml new file mode 100644 index 0000000..ee2e56c --- /dev/null +++ b/environments/staging/argo-apps/app2.yaml @@ -0,0 +1,25 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: app2 + namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: 'https://github.com/MeranaTona/argocd-tutorial-app.git' + targetRevision: HEAD + path: environments/staging/app2 + destination: + server: https://kubernetes.default.svc + syncPolicy: + automated: + prune: true + selfHeal: true + allowEmpty: false + syncOptions: + - Validate=true + - CreateNamespace=false + - PrunePropagationPolicy=foreground + - PruneLast=true \ No newline at end of file