Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update helm chart to use Release.Namespace #322

Merged
merged 1 commit into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ az-patch-install-helm: ## Update Azure client env vars and settings in helm valu
yq -i '(.image.repository) = "$(REGISTRY)/workspace"' ./charts/kaito/workspace/values.yaml
yq -i '(.image.tag) = "$(IMG_TAG)"' ./charts/kaito/workspace/values.yaml

helm install kaito-workspace ./charts/kaito/workspace
helm install kaito-workspace ./charts/kaito/workspace --namespace $(KAITO_NAMESPACE) --create-namespace

##@ Build

Expand Down Expand Up @@ -219,7 +219,7 @@ gpu-provisioner-helm: ## Update Azure client env vars and settings in helm valu
yq -i '(.workloadIdentity.clientId) = "$(IDENTITY_CLIENT_ID)"' ./charts/kaito/gpu-provisioner/values.yaml
yq -i '(.workloadIdentity.tenantId) = "$(AZURE_TENANT_ID)"' ./charts/kaito/gpu-provisioner/values.yaml

helm install kaito-gpu-provisioner ./charts/kaito/gpu-provisioner
helm install kaito-gpu-provisioner ./charts/kaito/gpu-provisioner --namespace $(GPU_NAMESPACE) --create-namespace

##@ Build Dependencies

Expand Down
2 changes: 1 addition & 1 deletion charts/kaito/gpu-provisioner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ A Helm chart for gpu-provisioner
To install the chart with the release name `gpu-provisioner`:

```bash
helm install gpu-provisioner ./charts/gpu-provisioner
helm install gpu-provisioner ./charts/gpu-provisioner --namespace=gpu-provisioner --create-namespace
```

## Values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ roleRef:
subjects:
- kind: ServiceAccount
name: gpu-provisioner
namespace: {{ .Values.namespace }}
namespace: {{ .Release.Namespace }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: gpu-provisioner-config-logging
namespace: {{ .Values.namespace }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "gpu-provisioner.labels" . | nindent 4 }}
{{- with .Values.additionalAnnotations }}
Expand Down
2 changes: 1 addition & 1 deletion charts/kaito/gpu-provisioner/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: gpu-provisioner-global-settings
namespace: {{ .Values.namespace }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "gpu-provisioner.labels" . | nindent 4 }}
{{- with .Values.additionalAnnotations }}
Expand Down
9 changes: 1 addition & 8 deletions charts/kaito/gpu-provisioner/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
apiVersion: v1
kind: Namespace
metadata:
name: {{ .Values.namespace }}
labels:
{{- include "gpu-provisioner.labels" . | nindent 4 }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "gpu-provisioner.fullname" . }}
namespace: {{ .Values.namespace }}
namespace: {{ .Release.Namespace }}
labels:
azure.workload.identity/use: "true"
{{- include "gpu-provisioner.labels" . | nindent 4 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/kaito/gpu-provisioner/templates/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ include "gpu-provisioner.fullname" . }}
namespace: {{ .Values.namespace }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "gpu-provisioner.labels" . | nindent 4 }}
{{- with .Values.additionalAnnotations }}
Expand Down
6 changes: 3 additions & 3 deletions charts/kaito/gpu-provisioner/templates/rolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ include "gpu-provisioner.fullname" . }}
namespace: {{ .Values.namespace }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "gpu-provisioner.labels" . | nindent 4 }}
{{- with .Values.additionalAnnotations }}
Expand All @@ -16,7 +16,7 @@ roleRef:
subjects:
- kind: ServiceAccount
name: gpu-provisioner
namespace: {{ .Values.namespace }}
namespace: {{ .Release.Namespace }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
Expand All @@ -36,4 +36,4 @@ roleRef:
subjects:
- kind: ServiceAccount
name: gpu-provisioner
namespace: {{ .Values.namespace }}
namespace: {{ .Release.Namespace }}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: gpu-provisioner
namespace: {{ .Values.namespace }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "gpu-provisioner.labels" . | nindent 4 }}
annotations:
Expand Down
1 change: 0 additions & 1 deletion charts/kaito/gpu-provisioner/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
namespace: gpu-provisioner
# -- Overrides the chart's name.
nameOverride: ""
# -- Overrides the chart's computed fullname.
Expand Down
4 changes: 3 additions & 1 deletion charts/kaito/workspace/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
export REGISTRY=<your_docker_registry>
export IMG_NAME=workspace
export IMG_TAG=0.2.1
helm install workspace ./charts/kaito/workspace --set image.repository=${REGISTRY}/$(IMG_NAME) --set image.tag=$(IMG_TAG)
helm install workspace ./charts/kaito/workspace \
--set image.repository=${REGISTRY}/$(IMG_NAME) --set image.tag=$(IMG_TAG) \
--namespace kaito-workspace --create-namespace
```

## Values
Expand Down
9 changes: 1 addition & 8 deletions charts/kaito/workspace/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
apiVersion: v1
kind: Namespace
metadata:
name: {{ include "kaito.fullname" . }}
labels:
{{- include "kaito.labels" . | nindent 4 }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "kaito.fullname" . }}
namespace: {{ include "kaito.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "kaito.labels" . | nindent 4 }}
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apps/v1
kind: DaemonSet
metadata:
name: nvidia-device-plugin-daemonset
namespace: {{ include "kaito.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "kaito.labels" . | nindent 4 }}
spec:
Expand Down
2 changes: 1 addition & 1 deletion charts/kaito/workspace/templates/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ include "kaito.fullname" . }}-role
namespace: {{ include "kaito.fullname" .}}
namespace: {{ .Release.Namespace }}
labels:
{{- include "kaito.labels" . | nindent 4 }}
rules:
Expand Down
2 changes: 1 addition & 1 deletion charts/kaito/workspace/templates/role_binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ include "kaito.fullname" . }}-rolebinding
namespace: {{ include "kaito.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "kaito.labels" . | nindent 4 }}
roleRef:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: Secret
metadata:
name: workspace-webhook-cert
namespace: {{ include "kaito.fullname" .}}
namespace: {{ .Release.Namespace }}
labels:
{{- include "kaito.labels" . | nindent 4 }}
data:
Expand Down
2 changes: 1 addition & 1 deletion charts/kaito/workspace/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "kaito.fullname" . }}
namespace: {{ include "kaito.fullname" .}}
namespace: {{ .Release.Namespace }}
labels:
{{- include "kaito.labels" . | nindent 4 }}
spec:
Expand Down
2 changes: 1 addition & 1 deletion charts/kaito/workspace/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "kaito.fullname" . }}-sa
namespace: {{ include "kaito.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "kaito.labels" . | nindent 4 }}
5 changes: 3 additions & 2 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ az aks install-cli
Install the Workspace controller.

```bash
helm install workspace ./charts/kaito/workspace
helm install workspace ./charts/kaito/workspace --namespace kaito-workspace --create-namespace
```

Note that if you have installed another node provisioning controller that supports Karpenter-core APIs, the following steps for installing `gpu-provisioner` can be skipped.
Expand Down Expand Up @@ -105,7 +105,8 @@ settings:
EOF

# install gpu-provisioner using values override file
helm install gpu-provisioner ./charts/kaito/gpu-provisioner -f values.override.yaml
helm install gpu-provisioner ./charts/kaito/gpu-provisioner \
--namespace gpu-provisioner --create-namespace -f values.override.yaml
```

#### Create the federated credential
Expand Down
Loading