Skip to content

Commit 83088a7

Browse files
authored
Merge pull request #3 from codezeron/test-dev
fix: config for deployment in argocd
2 parents 639a100 + c4ddc74 commit 83088a7

File tree

7 files changed

+74
-48
lines changed

7 files changed

+74
-48
lines changed

kustom-webapp/base/configmap.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: my-configmap
5+
# data:
6+
# DATABASE_URL: "postgres://user:password@db-hostname:5432/mydatabase"

kustom-webapp/base/deployment.yaml

Lines changed: 0 additions & 23 deletions
This file was deleted.

kustom-webapp/base/deployment.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: app-deployment
5+
spec:
6+
replicas: 1
7+
selector:
8+
matchLabels:
9+
app: my-app
10+
template:
11+
metadata:
12+
labels:
13+
app: my-app
14+
spec:
15+
containers:
16+
- name: tester
17+
image: enzoyh/teste-repo:latest
18+
ports:
19+
- containerPort: 80
20+
# env:
21+
# - name: NODE_ENV
22+
# value: "production"
23+
# - name: DATABASE_URL
24+
# value: "postgres://user:password@db-host:5432/my-database"
25+
resources:
26+
requests:
27+
memory: "16Mi"
28+
cpu: "50m" # 500milliCPUs (1/2 CPU)
29+
limits:
30+
memory: "128Mi"
31+
cpu: "100m"

kustom-webapp/base/ingress.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
apiVersion: networking.k8s.io/v1
2+
kind: Ingress
3+
metadata:
4+
name: my-ingress
5+
annotations:
6+
nginx.ingress.kubernetes.io/rewrite-target: /
7+
spec:
8+
rules:
9+
- host: teste.com
10+
http:
11+
paths:
12+
- path: /prod
13+
pathType: Prefix
14+
backend:
15+
service:
16+
name: app-service
17+
port:
18+
name: tester
19+
- path: /dev
20+
pathType: Prefix
21+
backend:
22+
service:
23+
name: app-service
24+
port:
25+
name: tester

kustom-webapp/base/kustomization.yaml

Lines changed: 0 additions & 15 deletions
This file was deleted.

kustom-webapp/base/service.yaml

Lines changed: 0 additions & 10 deletions
This file was deleted.

kustom-webapp/base/service.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: app-service
5+
spec:
6+
selector:
7+
app: my-app
8+
container-name: tester
9+
ports:
10+
- protocol: TCP
11+
port: 80
12+
targetPort: 80

0 commit comments

Comments
 (0)