Skip to content

Commit 39c2aaa

Browse files
feat(sysbox): onboard sysbox as a secure container runtime (#788)
* sysbox artifact init * add ng * ignore local tf files during debugging * change path * pass on launch_template var * test * add icon * rm ingress * fix vars * seems to have troubles with subnets, rm for now * not yet published, hardcode * set some required variables * add sysbox reserved taint * add block device mappings * add sysbox-install label * desired capacity one * clean up * sysbox resources for install * fix pluralfile * rm gitignore, messes with tf publish * format * make recipes private * rename ng, lt * string valued * output ngs, debug * use subnet ids from other nodegroups * paremetrize subnets correctly * shorten names * disk size in lt * mark recipes as non-private * add outputs to artifact * pass key pari create flag * add eks label * create key pair * eks.amazonaws.com/ is reserved label prefix * fix typo * bubble up key s * fix ami * clean up * revert to tpl * prepare usable helm chart * prep helm chart * mark not private * get subnets from bootstrap artifact * add toleration * rm node role arn, inferred from eks data soruce * uninstall with hook * fix tpl * add helm labels and annotations * fix labels * change filter * set max pods to 16 * pass owners * restructure temporarily * labels and taints * move into its onw * complete yaml * fix ami filter * add plural ami ng * fix owners * update plural sysbox ami * new ami * test new ami * rm outputs * test new ami, + tf * rearrange, rm unnecessary templates * new ami * use multi az * correct labels * update ami * rm old lt * rm explicit labels * rm k8s install * update ami * new ami * clean up * fix performancetype * new ami * test max pods * update final ami * update ami owner * pass lt as var to ng * clean up * point to module-library release ref * set app version to sysbox version * rm sysbox ns * rm azure and gcp artifacts * rm gcp recipe * rm deps from azure/gcp * bump --------- Co-authored-by: michaeljguarino <[email protected]>
1 parent 1781260 commit 39c2aaa

File tree

19 files changed

+368
-16
lines changed

19 files changed

+368
-16
lines changed

ray/terraform/aws/variables.tf

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
variable "namespace" {
2-
type = string
2+
type = string
33
default = "ray"
44
}
55

@@ -8,7 +8,7 @@ variable "cluster_name" {
88
}
99

1010
variable "create_single_az_node_groups" {
11-
type = bool
11+
type = bool
1212
default = false
1313
}
1414

@@ -27,34 +27,35 @@ variable "node_groups_defaults" {
2727
type = any
2828
default = {
2929
desired_capacity = 0
30-
min_capacity = 0
31-
max_capacity = 3
30+
min_capacity = 0
31+
max_capacity = 3
3232

33-
instance_types = ["t3.large", "t3a.large"]
34-
disk_size = 50
35-
ami_release_version = "1.22.15-20221222"
33+
instance_types = ["t3.large", "t3a.large"]
34+
disk_size = 50
35+
ami_release_version = "1.22.15-20221222"
3636
force_update_version = true
37-
ami_type = "AL2_x86_64"
38-
k8s_labels = {}
39-
k8s_taints = []
37+
ami_type = "AL2_x86_64"
38+
k8s_labels = {}
39+
k8s_taints = []
4040
}
4141
}
4242

4343
variable "single_az_node_groups" {
4444
type = any
4545
default = {
4646
ray_small_burst_spot = {
47-
name = "ray-small-burst-spot"
48-
capacity_type = "SPOT"
47+
name = "ray-small-burst-spot"
48+
capacity_type = "SPOT"
4949
instance_types = ["t3.large", "t3a.large"]
5050
k8s_labels = {
51-
"plural.sh/capacityType" = "SPOT"
51+
"plural.sh/capacityType" = "SPOT"
5252
"plural.sh/performanceType" = "BURST"
53-
"plural.sh/scalingGroup" = "ray-small-burst-spot"
53+
"plural.sh/scalingGroup" = "ray-small-burst-spot"
54+
"sysbox-install" = "yes"
5455
}
5556
k8s_taints = [{
56-
key = "plural.sh/capacityType"
57-
value = "SPOT"
57+
key = "plural.sh/capacityType"
58+
value = "SPOT"
5859
effect = "NO_SCHEDULE"
5960
}]
6061
}

sysbox/Pluralfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
REPO sysbox
2+
ATTRIBUTES Plural repository.yaml
3+
4+
TF terraform/*
5+
HELM helm/*
6+
RECIPE plural/recipes/*

sysbox/helm/sysbox/.helmignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/

sysbox/helm/sysbox/Chart.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apiVersion: v2
2+
name: sysbox
3+
description: helm chart for sysbox
4+
type: application
5+
version: 0.1.2
6+
appVersion: "v0.6.2"

sysbox/helm/sysbox/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
A helm chart for sysbox

sysbox/helm/sysbox/deps.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
apiVersion: plural.sh/v1alpha1
2+
kind: Dependencies
3+
metadata:
4+
application: true
5+
description: Deploys sysbox crafted for the target cloud
6+
spec:
7+
dependencies:
8+
- type: helm
9+
name: bootstrap
10+
repo: bootstrap
11+
version: '>= 0.5.1'
12+
- type: terraform
13+
name: aws
14+
repo: sysbox
15+
version: '>= 0.1.0'
16+
optional: true
17+
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{{/*
2+
Expand the name of the chart.
3+
*/}}
4+
{{- define "sysbox.name" -}}
5+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
6+
{{- end }}
7+
8+
{{/*
9+
Create a default fully qualified app name.
10+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
11+
If release name contains chart name it will be used as a full name.
12+
*/}}
13+
{{- define "sysbox.fullname" -}}
14+
{{- if .Values.fullnameOverride }}
15+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
16+
{{- else }}
17+
{{- $name := default .Chart.Name .Values.nameOverride }}
18+
{{- if contains $name .Release.Name }}
19+
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
20+
{{- else }}
21+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
22+
{{- end }}
23+
{{- end }}
24+
{{- end }}
25+
26+
{{/*
27+
Create chart name and version as used by the chart label.
28+
*/}}
29+
{{- define "sysbox.chart" -}}
30+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
31+
{{- end }}
32+
33+
{{/*
34+
Common labels
35+
*/}}
36+
{{- define "sysbox.labels" -}}
37+
helm.sh/chart: {{ include "sysbox.chart" . }}
38+
{{ include "sysbox.selectorLabels" . }}
39+
{{- if .Chart.AppVersion }}
40+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
41+
{{- end }}
42+
app.kubernetes.io/managed-by: {{ .Release.Service }}
43+
{{- end }}
44+
45+
{{/*
46+
Selector labels
47+
*/}}
48+
{{- define "sysbox.selectorLabels" -}}
49+
app.kubernetes.io/name: {{ include "sysbox.name" . }}
50+
app.kubernetes.io/instance: {{ .Release.Name }}
51+
{{- end }}
52+
53+
{{/*
54+
Create the name of the service account to use
55+
*/}}
56+
{{- define "sysbox.serviceAccountName" -}}
57+
{{- if .Values.serviceAccount.create }}
58+
{{- default (include "sysbox.fullname" .) .Values.serviceAccount.name }}
59+
{{- else }}
60+
{{- default "default" .Values.serviceAccount.name }}
61+
{{- end }}
62+
{{- end }}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: node.k8s.io/v1
2+
kind: RuntimeClass
3+
metadata:
4+
name: sysbox-runc
5+
handler: sysbox-runc
6+
scheduling:
7+
nodeSelector:
8+
sysbox-runtime: running

sysbox/helm/sysbox/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

sysbox/helm/sysbox/values.yaml.tpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

0 commit comments

Comments
 (0)