File tree 8 files changed +119
-82
lines changed
8 files changed +119
-82
lines changed Original file line number Diff line number Diff line change 1
- /go-todo
1
+ /go-todo
2
+
3
+ .DS_Store
4
+ .idea /
Original file line number Diff line number Diff line change
1
+ {
2
+ "version" : " 0.2.0" ,
3
+ "configurations" : [
4
+ {
5
+ "name" : " Connect to okteto" ,
6
+ "type" : " go" ,
7
+ "request" : " attach" ,
8
+ "mode" : " remote" ,
9
+ "remotePath" : " /usr/src/app" ,
10
+ "port" : 2345 ,
11
+ "host" : " 127.0.0.1"
12
+ }
13
+ ]
14
+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ apiVersion : apps/v1
2
+ kind : Deployment
3
+ metadata :
4
+ name : todo-list
5
+ spec :
6
+ replicas : 1
7
+ selector :
8
+ matchLabels :
9
+ app : todo-list
10
+ template :
11
+ metadata :
12
+ labels :
13
+ app : todo-list
14
+ spec :
15
+ containers :
16
+ - image : okteto.dev/todo-list:1.0.0
17
+ name : todo-list
18
+ env :
19
+ - name : POSTGRESQL_HOST
20
+ value : db
21
+ - name : POSTGRESQL_USERNAME
22
+ value : okteto
23
+ - name : POSTGRESQL_PASSWORD
24
+ value : okteto
25
+ - name : POSTGRESQL_DATABASE
26
+ value : okteto
27
+ readinessProbe :
28
+ periodSeconds : 1
29
+ httpGet :
30
+ path : /healthz
31
+ port : 8080
32
+
33
+ ---
34
+
35
+ apiVersion : v1
36
+ kind : Service
37
+ metadata :
38
+ name : todo-list
39
+ spec :
40
+ type : LoadBalancer
41
+ ports :
42
+ - name : " todo-list"
43
+ port : 8080
44
+ selector :
45
+ app : todo-list
46
+
47
+ ---
48
+
49
+ apiVersion : networking.k8s.io/v1
50
+ kind : Ingress
51
+ metadata :
52
+ name : todo-list
53
+ annotations :
54
+ dev.okteto.com/generate-host : todo-list
55
+ spec :
56
+ rules :
57
+ - http :
58
+ paths :
59
+ - backend :
60
+ service :
61
+ name : todo-list
62
+ port :
63
+ number : 8080
64
+ path : /
65
+ pathType : ImplementationSpecific
Original file line number Diff line number Diff line change @@ -2,4 +2,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1
2
2
kind : Kustomization
3
3
resources :
4
4
- k8s.yaml
5
- - postgres.yaml
5
+ - postgres.yaml
Original file line number Diff line number Diff line change @@ -19,27 +19,27 @@ spec:
19
19
- image : postgres:9.4
20
20
name : db
21
21
env :
22
- - name : POSTGRES_USER
23
- value : okteto
24
- - name : POSTGRES_PASSWORD
25
- value : okteto
26
- - name : POSTGRES_DB
27
- value : okteto
22
+ - name : POSTGRES_USER
23
+ value : okteto
24
+ - name : POSTGRES_PASSWORD
25
+ value : okteto
26
+ - name : POSTGRES_DB
27
+ value : okteto
28
28
volumeMounts :
29
29
- mountPath : /var/lib/postgresql/data
30
30
name : data
31
31
subPath : data
32
32
volumeClaimTemplates :
33
- - apiVersion : v1
34
- kind : PersistentVolumeClaim
35
- metadata :
36
- name : data
37
- spec :
38
- accessModes :
39
- - ReadWriteOnce
40
- resources :
41
- requests :
42
- storage : 1Gi
33
+ - apiVersion : v1
34
+ kind : PersistentVolumeClaim
35
+ metadata :
36
+ name : data
37
+ spec :
38
+ accessModes :
39
+ - ReadWriteOnce
40
+ resources :
41
+ requests :
42
+ storage : 1Gi
43
43
44
44
---
45
45
@@ -50,7 +50,7 @@ metadata:
50
50
spec :
51
51
type : ClusterIP
52
52
ports :
53
- - port : 5432
54
- targetPort : 5432
53
+ - port : 5432
54
+ targetPort : 5432
55
55
selector :
56
- app : db
56
+ app : db
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
build :
2
2
todo-list :
3
- image : okteto.dev/todo-list
4
-
3
+ image : okteto.dev/todo-list:1.0.0
4
+ context : .
5
+ todo-list-dev :
6
+ context : .
7
+ target : builder
8
+
5
9
deploy :
6
- - cd manifest; kustomize edit set image okteto.dev/todo-list=${OKTETO_BUILD_TODO_LIST_IMAGE}
7
- - kubectl apply -k manifest
10
+ - cd manifests; kustomize edit set image okteto.dev/todo-list=${OKTETO_BUILD_TODO_LIST_IMAGE}
11
+ - kubectl apply -k manifests
12
+
8
13
dev :
9
14
todo-list :
10
- image : okteto/golang:1
15
+ image : ${OKTETO_BUILD_TODO_LIST_DEV_IMAGE}
11
16
command : bash
12
- securityContext :
13
- capabilities :
14
- add :
15
- - SYS_PTRACE
17
+ sync :
18
+ - .:/app
16
19
volumes :
17
20
- /go/pkg/
18
21
- /root/.cache/go-build/
19
- workdir : /app
20
- sync :
21
- - .:/app
22
+ securityContext :
23
+ capabilities :
24
+ add :
25
+ - SYS_PTRACE
22
26
forward :
23
27
- 2345:2345
You can’t perform that action at this time.
0 commit comments