This repository was archived by the owner on Mar 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathskaffold.yaml
169 lines (167 loc) · 4.02 KB
/
skaffold.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
## Copyright (c) 2021, Oracle and/or its affiliates.
## All rights reserved. The Universal Permissive License (UPL), Version 1.0 as shown at http://oss.oracle.com/licenses/upl
apiVersion: skaffold/v2beta11
kind: Config
metadata:
name: demo
build:
tagPolicy:
gitCommit:
variant: AbbrevCommitSha
artifacts:
- image: consumer
context: images/consumer
docker:
dockerfile: Dockerfile
sync:
manual:
- src: src/**
dest: .
- image: producer
context: images/producer
sync:
manual:
- src: src/**
dest: .
docker:
dockerfile: Dockerfile
- image: web
context: images/web
docker:
dockerfile: Dockerfile
sync:
manual:
- src: src/**
dest: .
# default deploy
deploy:
kustomize:
paths:
- k8s/overlays/development/app
profiles:
- name: dev
activation:
# run this profile when using skaffold dev
- command: dev
deploy:
kustomize:
paths:
- k8s/overlays/branch
# defaultNamespace: dev2
patches:
# add tag prefix to avoid rebuilding over the same hash
- op: add
path: /build/tagPolicy/gitCommit/prefix
value: arl-
# change the target image to use autoreload when code changes
- op: add
path: /build/artifacts/0/docker/target
value: autoreload
- op: add
path: /build/artifacts/1/docker/target
value: autoreload
- op: add
path: /build/artifacts/2/docker/target
value: autoreload
- name: debug
activation:
# activate this profile when using skaffold debug
- command: debug
deploy:
kustomize:
paths:
- k8s/overlays/branch
patches:
# add tag prefix to avoid rebuilding over the same hash
- op: add
path: /build/tagPolicy/gitCommit/prefix
value: dbg-
# change the target image to use debugger from skaffold
# requires that python
- op: add
path: /build/artifacts/0/docker/target
value: debug
- op: add
path: /build/artifacts/1/docker/target
value: debug
- op: add
path: /build/artifacts/2/docker/target
value: debug
portForward:
- resourceType: Deployment
resourceName: dev-producer
port: 5678
localPort: 5678
- resourceType: Deployment
resourceName: dev-consumer
port: 5678
localPort: 5679
- resourceType: Deployment
resourceName: dev-web
port: 5678
localPort: 5680
- name: development
deploy:
kustomize:
paths:
- k8s/overlays/development/app
- name: staging
deploy:
kustomize:
paths:
- k8s/overlays/staging/app
patches:
# add tag prefix to avoid rebuilding over the same hash
- op: add
path: /build/tagPolicy/gitCommit/prefix
value: stage-
- name: production
deploy:
kustomize:
paths:
- k8s/overlays/production/app
- name: development-infra
build:
artifacts:
- image: db-config
context: images/db-config
docker:
dockerfile: Dockerfile
sync:
manual:
- src: src/**
dest: .
deploy:
kustomize:
paths:
- k8s/overlays/development/infra
- name: staging-infra
build:
artifacts:
- image: db-config
context: images/db-config
docker:
dockerfile: Dockerfile
sync:
manual:
- src: src/**
dest: .
deploy:
kustomize:
paths:
- k8s/overlays/staging/infra
- name: production-infra
build:
artifacts:
- image: db-config
context: images/db-config
docker:
dockerfile: Dockerfile
sync:
manual:
- src: src/**
dest: .
deploy:
kustomize:
paths:
- k8s/overlays/production/infra