Skip to content

Commit 31fed67

Browse files
committed
Refactor component-vcluster to use helm chart
This will refactor the component completely to use the latest official helm chart. Due to this change, there are a few breaking changes that will have to be handled carefully. Check the docs for more information Signed-off-by: Nicolas Bigler <[email protected]>
1 parent 947e943 commit 31fed67

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1649
-2800
lines changed

class/defaults.yml

+86-30
Original file line numberDiff line numberDiff line change
@@ -6,56 +6,112 @@ parameters:
66
namespace: syn-${_instance}
77
namespaceMetadata: {}
88

9-
host_service_cidr: null
9+
charts:
10+
vcluster:
11+
source: https://charts.loft.sh
12+
version: 0.24.1
1013

1114
images:
1215
k3s:
1316
registry: docker.io
1417
image: rancher/k3s
15-
tag: v1.25.15-k3s1
18+
tag: v1.32.1-k3s1
1619
syncer:
17-
registry: docker.io
18-
image: loftsh/vcluster
19-
tag: "0.14.1"
20+
registry: ghcr.io
21+
image: loft-sh/vcluster-pro
22+
tag: ""
2023
kubectl:
2124
registry: docker.io
2225
image: bitnami/kubectl
23-
tag: "1.28.15"
26+
tag: "1.32.1"
27+
28+
29+
ocp_route:
30+
host: null
2431

2532
storage:
26-
persistence: true
33+
persistence: auto
2734
size: 5Gi
2835
class_name: null
2936

37+
k3s:
38+
additional_args: []
39+
40+
ingress:
41+
host: ""
42+
annotations:
43+
cert-manager.io/cluster-issuer: letsencrypt-production
44+
route.openshift.io/termination: reencrypt
45+
46+
backing_store: {}
47+
48+
additional_manifests: nil
49+
3050
resources:
3151
k3s:
3252
requests:
33-
cpu: 200m
34-
memory: 256Mi
53+
cpu: 40m
54+
memory: 64Mi
3555
limits:
36-
memory: 2Gi
56+
cpu: 100m
57+
memory: 256Mi
3758
syncer:
3859
requests:
39-
cpu: 100m
40-
memory: 128Mi
60+
cpu: 200m
61+
memory: 256Mi
4162
limits:
42-
memory: 1Gi
43-
44-
ingress:
45-
host: null
46-
labels: {}
47-
annotations:
48-
cert-manager.io/cluster-issuer: letsencrypt-production
49-
50-
ocp_route:
51-
host: null
52-
53-
k3s:
54-
additional_args: []
55-
syncer:
56-
additional_args: []
63+
memory: 2Gi
5764

58-
additional_manifests: {}
65+
helm_values:
66+
sync:
67+
toHost:
68+
ingresses:
69+
enabled: true
70+
controlPlane:
71+
distro:
72+
k3s:
73+
enabled: true
74+
extraArgs: ${vcluster:k3s:additional_args}
75+
image:
76+
registry: ${vcluster:images:k3s:registry}
77+
repository: ${vcluster:images:k3s:image}
78+
tag: ${vcluster:images:k3s:tag}
79+
resources: ${vcluster:resources:k3s}
5980

60-
syn:
61-
registration_url: null
81+
statefulSet:
82+
security:
83+
containerSecurityContext:
84+
allowPrivilegeEscalation: false
85+
runAsUser: null
86+
runAsGroup: null
87+
resources:
88+
${vcluster:resources:syncer}
89+
image:
90+
registry: ${vcluster:images:syncer:registry}
91+
repository: ${vcluster:images:syncer:image}
92+
tag: ${vcluster:images:syncer:tag}
93+
persistence:
94+
volumeClaim:
95+
enabled: ${vcluster:storage:persistence}
96+
size: ${vcluster:storage:size}
97+
storageClass: ${vcluster:storage:class_name}
98+
backingStore: ${vcluster:backing_store}
99+
ingress:
100+
enabled: true
101+
host: ${vcluster:ingress:host}
102+
annotations: ${vcluster:ingress:annotations}
103+
spec:
104+
tls:
105+
- hosts:
106+
- ${vcluster:ingress:host}
107+
secretName: ${_instance}-tls
108+
rbac:
109+
role:
110+
extraRules:
111+
- apiGroups: [""]
112+
resources: ["endpoints/restricted"]
113+
verbs: ["create"]
114+
experimental:
115+
deploy:
116+
vcluster:
117+
manifests: ${vcluster:additional_manifests}

class/vcluster.yml

+15
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
parameters:
22
kapitan:
3+
dependencies:
4+
- type: helm
5+
source: ${vcluster:charts:vcluster:source}
6+
chart_name: vcluster
7+
version: ${vcluster:charts:vcluster:version}
8+
output_path: ${_base_directory}/helmcharts/vcluster/${vcluster:charts:vcluster:version}
39
compile:
410
- input_paths:
511
- vcluster/component/app.jsonnet
@@ -9,3 +15,12 @@ parameters:
915
- vcluster/component/main.jsonnet
1016
input_type: jsonnet
1117
output_path: ${_instance}/
18+
- output_path: ${_instance}/01_vcluster_helmchart
19+
input_type: helm
20+
output_type: yaml
21+
input_paths:
22+
- ${_base_directory}/helmcharts/vcluster/${vcluster:charts:vcluster:version}
23+
helm_params:
24+
name: "${_instance}"
25+
namespace: "${vcluster:namespace}"
26+
helm_values: ${vcluster:helm_values}

0 commit comments

Comments
 (0)