Skip to content

Commit

Permalink
Delete namespace.yaml
Browse files Browse the repository at this point in the history
* Namespace should be created with --create-namespace per helm/helm#3503
* Fixed some SA bugs to work with Terraform wrapper.
  • Loading branch information
zacharyblasczyk committed Jul 11, 2023
1 parent 5acde54 commit 43142fe
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 20 deletions.
2 changes: 1 addition & 1 deletion charts/launch-agent/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: launch-agent
icon: https://em-content.zobj.net/thumbs/240/apple/354/rocket_1f680.png
description: A Helm chart for running the W&B Launch Agent in Kubernetes
type: application
version: 0.7.0
version: 0.8.0
maintainers:
- name: wandb
email: support@wandb.com
Expand Down
11 changes: 0 additions & 11 deletions charts/launch-agent/templates/namespace.yaml

This file was deleted.

16 changes: 10 additions & 6 deletions charts/launch-agent/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ kind: ServiceAccount
metadata:
name: wandb-launch-serviceaccount
namespace: {{ .Values.namespace }}
{{ if .Values.serviceAccount.annotations }}
{{- if .Values.serviceAccount.annotations }}
annotations:
{{ toYaml .Values.serviceAccount.annotations | indent 4 }}
{{ end }}
...
{{- toYaml .Values.serviceAccount.annotations | nindent 4 }}
{{- end }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
Expand Down Expand Up @@ -53,8 +52,10 @@ roleRef:
name: wandb-launch-agent
apiGroup: rbac.authorization.k8s.io
...
{{- define "unique.namespaces" }}
{{- $root := . -}}
{{- range $ns := append .Values.additionalTargetNamespaces .Values.namespace }}
{{- $unique := uniq (append .Values.additionalTargetNamespaces .Values.namespace) }}
{{- range $ns := $unique }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
Expand All @@ -70,4 +71,7 @@ roleRef:
name: job-creator
apiGroup: rbac.authorization.k8s.io
...
{{- end }}
{{- end }}
{{- end }}

{{ include "unique.namespaces" . }}
4 changes: 2 additions & 2 deletions charts/launch-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ gitCreds: |
# Annotations for the wandb service account. Useful when setting up workload identity on gcp.
serviceAccount:
annotations:
iam.gke.io/gcp-service-account:
azure.workload.identity/client-id:
# iam.gke.io/gcp-service-account:
# azure.workload.identity/client-id:

# Set to access key for azure storage if using kaniko with azure.
azureStorageAccessKey: ""

0 comments on commit 43142fe

Please sign in to comment.