Skip to content

Commit

Permalink
fix: Update helm chart to use Release.Namespace (#113)
Browse files Browse the repository at this point in the history
Update helm chart to use `Release.Namespace` instead of chart name.

Signed-off-by: Heba Elayoty <hebaelayoty@gmail.com>
  • Loading branch information
helayoty authored Mar 29, 2024
1 parent 9e01ecf commit efcaabe
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ jobs:
run: |
echo "IDENTITY_CLIENT_ID=$(az identity show --name gpuIdentity -g "${{ env.CLUSTER_NAME }}" --query 'clientId' -otsv)" >> $GITHUB_ENV
make az-patch-helm
helm install gpu-provisioner ./charts/gpu-provisioner
helm install gpu-provisioner ./charts/gpu-provisioner --namespace gpu-provisioner --create-namespace
kubectl wait --for=condition=available deploy "gpu-provisioner" -n gpu-provisioner --timeout=300s
env:
AZURE_RESOURCE_GROUP: ${{ env.CLUSTER_NAME }}
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ It implements the cloud provider interfaces to realize the following abstraction
VERSION=v0.2.0 make docker-build
make az-identity-perm
make az-patch-helm
helm install gpu-provisioner /charts/gpu-provisioner
helm install gpu-provisioner /charts/gpu-provisioner --namespace gpu-provisioner --create-namespace
make az-federated-credential
```
You should have a running controller in `gpu-provisioner` namespace.

Expand Down
2 changes: 1 addition & 1 deletion charts/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
2 changes: 1 addition & 1 deletion charts/gpu-provisioner/templates/clusterrole-core.yaml
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
2 changes: 1 addition & 1 deletion charts/gpu-provisioner/templates/configmap-logging.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-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/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/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/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/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 }}
2 changes: 1 addition & 1 deletion charts/gpu-provisioner/templates/serviceaccount.yaml
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/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

0 comments on commit efcaabe

Please sign in to comment.