Skip to content

Commit 07fdefa

Browse files
authored
[API server] Auto create skypilot-system ns on helm install (#5079)
* [API server] Auto create skypilot-system ns on helm install Signed-off-by: Aylei <[email protected]> * More comments Signed-off-by: Aylei <[email protected]> * Add comment Signed-off-by: Aylei <[email protected]> * Add comment Signed-off-by: Aylei <[email protected]> --------- Signed-off-by: Aylei <[email protected]>
1 parent 14543ea commit 07fdefa

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

charts/skypilot/templates/rbac.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,18 @@ roleRef:
3434
{{- end }}
3535
{{- $namespaces = append $namespaces .Release.Namespace | uniq }}
3636
{{- range $namespaces }}
37+
{{/* Create namespaces in advance to enable RBAC rules, filter out the release namespace in case user accidentally added it to grantedNamespaces*/}}
38+
{{- if and (ne . $.Release.Namespace) (not (lookup "v1" "Namespace" "" .)) }}
39+
---
40+
apiVersion: v1
41+
kind: Namespace
42+
metadata:
43+
name: {{ . }}
44+
annotations:
45+
{{/* Keep the namespace when uninstalling the chart, so that the deployed sky resources (if any) can still work even if the API server get uninstalled */}}
46+
helm.sh/resource-policy: keep
47+
{{- end }}
48+
---
3749
apiVersion: rbac.authorization.k8s.io/v1
3850
kind: Role
3951
metadata:

values.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
USER-SUPPLIED VALUES: null
2+
apiService:
3+
image: berkeleyskypilot/skypilot-api-test:20250313104114
4+
resources:
5+
limits:
6+
cpu: 4000m
7+
memory: 8Gi
8+
requests:
9+
cpu: 4000m
10+
memory: 8Gi
11+
skypilotDev: true
12+
awsCredentials:
13+
enabled: true
14+
gcpCredentials:
15+
enabled: true
16+
projectId: sky-dev-465
17+
ingress:
18+
authCredentials: skypilot:$apr1$zPI303sa$eOrIDmadoynRwR2ICZIrJ.
19+
path: /aylei
20+
ingress-nginx:
21+
enabled: false
22+
kubernetesCredentials:
23+
useApiServerCluster: true
24+
useKubeconfig: false

0 commit comments

Comments
 (0)