Skip to content
Open
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 deploy/helm/deployment-k8s/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ apiVersion: v2
name: aiq2-web
description: AI-Q - WEB Profile ()
type: application
version: 2.0.0
version: 2.0.1

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#290 reproduces against the published aiq2-web-2.1.0, but this change versions the umbrella chart as 2.0.1. Affected users will not receive that as an upgrade. Can we backport this as 2.1.1 or confirm which newer published release will carry the fix before closing #290?

appVersion: '1.0'
dependencies:
- name: aiq
version: 0.0.4
version: 0.0.5
repository: file://../helm-charts-k8s/aiq
alias: aiq
Binary file removed deploy/helm/deployment-k8s/charts/aiq-0.0.4.tgz
Binary file not shown.
Binary file added deploy/helm/deployment-k8s/charts/aiq-0.0.5.tgz
Binary file not shown.
2 changes: 1 addition & 1 deletion deploy/helm/helm-charts-k8s/aiq/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ appVersion: 2.0.0
description: AI-Q Helm Chart
name: aiq
type: application
version: "0.0.4"
version: "0.0.5"
12 changes: 9 additions & 3 deletions deploy/helm/helm-charts-k8s/aiq/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,18 @@ nspect_id: {{ . }}

{{/*
Generate namespace name

Defaults to the release namespace (`helm install -n <ns>` / `.Release.Namespace`)
so the chart honors the install namespace and works with GitOps operators such as
ArgoCD and Fleet that do not pre-create a `ns-<appname>` namespace. Set
`namespace.name` to pin resources to a specific namespace regardless of the
release namespace.
*/}}
{{- define "aiq.namespace" -}}
{{- if eq (.Values.project.deploymentTarget | default "") "kind" -}}
{{- .Values.appname -}}
{{- if .Values.namespace.name -}}
{{- .Values.namespace.name -}}
{{- else -}}
{{- printf "ns-%s" .Values.appname -}}
{{- .Release.Namespace -}}
{{- end -}}
{{- end }}

Expand Down
2 changes: 1 addition & 1 deletion deploy/helm/helm-charts-k8s/aiq/templates/namespace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v1
kind: Namespace
metadata:
name: {{ .Release.Namespace }}
name: {{ include "aiq.namespace" . }}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#290 only requires resources to honor .Release.Namespace. Adding namespace.name introduces a second namespace authority and makes namespace.create retarget a chart-owned Namespace, which creates unsafe upgrade semantics. Can we keep this fix narrow by always using .Release.Namespace, or explicitly define and protect the cross-namespace lifecycle?

labels:
{{- if and .Values.project.dl (ne (.Values.project.orientation | default "internal") "external") }}
sysdev.nvidia.com/dl: {{ .Values.project.dl | quote }}
Expand Down
4 changes: 4 additions & 0 deletions deploy/helm/helm-charts-k8s/aiq/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ project:
# OPTIONAL: Namespace Configuration
# ==========================================
namespace:
# Namespace for all chart resources. Empty uses the release namespace
# (helm install -n <ns> / .Release.Namespace), which is required for GitOps
# operators such as ArgoCD and Fleet. Set to pin a specific namespace.
name: ""
create: false # Set to true to create namespace (useful for ArgoCD)
labels: {} # Additional custom labels
annotations:
Expand Down
Loading