forked from loft-sh/vcluster
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevspace.yaml
More file actions
193 lines (193 loc) · 5.03 KB
/
Copy pathdevspace.yaml
File metadata and controls
193 lines (193 loc) · 5.03 KB
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
version: v1beta11
vars:
- name: SYNCER_IMAGE
value: ghcr.io/loft-sh/loft-enterprise/dev-vcluster
- name: K3S_IMAGE
value: rancher/k3s:v1.23.5-k3s1
images:
vcluster:
image: ${SYNCER_IMAGE}
rebuildStrategy: ignoreContextChanges
build:
buildKit:
options:
target: builder
deployments:
- name: vcluster
helm:
chart:
name: ./charts/k3s
values:
service:
type: NodePort
serviceCIDR: $([ $1 == "dev" ] && vcluster get service-cidr || echo "null")
mapServices:
fromVirtual:
- from: test/test
to: test
fromHost:
- from: test/test
to: default/test
coredns:
replicas: 3
etcd:
replicas: 3
api:
replicas: 3
controller:
replicas: 3
enableHA: true
tolerations:
- operator: "Exists"
serviceAccount:
create: false
name: default
vcluster:
image: ${K3S_IMAGE}
rbac:
clusterRole:
create: true
role:
extended: true
syncer:
readinessProbe:
enabled: false
livenessProbe:
enabled: false
image: ${SYNCER_IMAGE}
noArgs: true
workingDir: /vcluster-dev
command: ["sleep"]
extraArgs: ["99999999999"]
dev:
terminal:
imageSelector: ${SYNCER_IMAGE}
command: ["./devspace_start.sh"]
ports:
- imageSelector: ${SYNCER_IMAGE}
forward:
- port: 2346
remotePort: 2345
sync:
- imageSelector: ${SYNCER_IMAGE}
excludePaths:
- '**'
- '!/pkg'
- '!/cmd'
- '!/vendor'
- '!/hack'
- '!/go.mod'
- '!/go.sum'
- '!/devspace_start.sh'
- '!/manifests'
commands:
- name: dev
command: "devspace dev -n vcluster $@"
- name: dev-crc
command: "devspace dev -n vcluster --profile dev-crc $@"
- name: deploy
command: "devspace deploy --profile deploy -n vcluster -d $@"
- name: deploy-crc
command: "devspace deploy --profile deploy-crc -n vcluster -d $@"
profiles:
- name: parent-deploy
patches:
- op: remove
path: deployments.name=vcluster.helm.values.syncer.command
- op: replace
path: deployments.name=vcluster.helm.values.syncer
value:
image: ${SYNCER_IMAGE}
- name: deploy
parents:
- profile: parent-deploy
patches:
- op: remove
path: images.vcluster.rebuildStrategy
- op: replace
path: images.vcluster.build.buildKit
value: {}
- name: k3s
# This profile is empty for now because the default config is for k3s
# Keep the empty profile because it's used in the distribution matrix of the GH workflow for e2e.
- name: k0s
patches:
- op: replace
path: deployments.name=vcluster.helm.chart.name
value: ./charts/k0s
- op: remove
path: deployments.name=vcluster.helm.values.vcluster.image
- name: k8s
patches:
- op: replace
path: deployments.name=vcluster.helm.chart.name
value: ./charts/k8s
- name: eks
patches:
- op: replace
path: deployments.name=vcluster.helm.chart.name
value: ./charts/eks
- name: kind-load
patches:
- op: add
path: hooks
value:
- name: "post-image-build-hook"
command: |
kind load docker-image image(vcluster):tag(vcluster)
events: ["after:build:vcluster"]
- name: no-cpu-requests
patches:
- op: replace
path: deployments.name=vcluster.helm.values.syncer.resources
value:
requests:
cpu: "0"
- op: replace
path: deployments.name=vcluster.helm.values.vcluster.resources
value:
requests:
cpu: "0"
- op: replace
path: deployments.name=vcluster.helm.values.etcd.resources
value:
requests:
cpu: "0"
- op: replace
path: deployments.name=vcluster.helm.values.controller.resources
value:
requests:
cpu: "0"
- op: replace
path: deployments.name=vcluster.helm.values.api.resources
value:
requests:
cpu: "0"
- name: sync-networkpolicies
patches:
- op: replace
path: deployments.name=vcluster.helm.values.syncer.extraArgs
value: ['--sync=networkpolicies']
- name: parent-crc
patches:
- op: replace
path: images.vcluster.build.custom
value:
command: ./hack/crc-podman-build.sh
imageFlag: "-t"
- op: replace
path: deployments.name=vcluster.helm.values.openshift
value:
enable: true
- name: deploy-crc
parents:
- profile: parent-deploy
- profile: parent-crc
- name: dev-crc
parents:
- profile: parent-crc
patches:
- op: replace
path: images.vcluster.build.custom.args
value:
- "--target=builder"