diff --git a/deploy/helm/deployment-k8s/Chart.yaml b/deploy/helm/deployment-k8s/Chart.yaml index e8c1f6276..b89d4372b 100644 --- a/deploy/helm/deployment-k8s/Chart.yaml +++ b/deploy/helm/deployment-k8s/Chart.yaml @@ -2,10 +2,10 @@ apiVersion: v2 name: aiq2-web description: AI-Q - WEB Profile () type: application -version: 2.0.0 +version: 2.0.1 appVersion: '1.0' dependencies: - name: aiq - version: 0.0.4 + version: 0.0.5 repository: file://../helm-charts-k8s/aiq alias: aiq diff --git a/deploy/helm/deployment-k8s/charts/aiq-0.0.4.tgz b/deploy/helm/deployment-k8s/charts/aiq-0.0.4.tgz deleted file mode 100644 index 1cc37098b..000000000 Binary files a/deploy/helm/deployment-k8s/charts/aiq-0.0.4.tgz and /dev/null differ diff --git a/deploy/helm/deployment-k8s/charts/aiq-0.0.5.tgz b/deploy/helm/deployment-k8s/charts/aiq-0.0.5.tgz new file mode 100644 index 000000000..41ae43dd2 Binary files /dev/null and b/deploy/helm/deployment-k8s/charts/aiq-0.0.5.tgz differ diff --git a/deploy/helm/helm-charts-k8s/aiq/Chart.yaml b/deploy/helm/helm-charts-k8s/aiq/Chart.yaml index 0801e4850..5c0f19f7d 100644 --- a/deploy/helm/helm-charts-k8s/aiq/Chart.yaml +++ b/deploy/helm/helm-charts-k8s/aiq/Chart.yaml @@ -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" diff --git a/deploy/helm/helm-charts-k8s/aiq/templates/_helpers.tpl b/deploy/helm/helm-charts-k8s/aiq/templates/_helpers.tpl index 2a48d8615..c291397a3 100644 --- a/deploy/helm/helm-charts-k8s/aiq/templates/_helpers.tpl +++ b/deploy/helm/helm-charts-k8s/aiq/templates/_helpers.tpl @@ -50,12 +50,18 @@ nspect_id: {{ . }} {{/* Generate namespace name + +Defaults to the release namespace (`helm install -n ` / `.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-` 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 }} diff --git a/deploy/helm/helm-charts-k8s/aiq/templates/namespace.yaml b/deploy/helm/helm-charts-k8s/aiq/templates/namespace.yaml index 67638ff93..1e97417e5 100644 --- a/deploy/helm/helm-charts-k8s/aiq/templates/namespace.yaml +++ b/deploy/helm/helm-charts-k8s/aiq/templates/namespace.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Namespace metadata: - name: {{ .Release.Namespace }} + name: {{ include "aiq.namespace" . }} labels: {{- if and .Values.project.dl (ne (.Values.project.orientation | default "internal") "external") }} sysdev.nvidia.com/dl: {{ .Values.project.dl | quote }} diff --git a/deploy/helm/helm-charts-k8s/aiq/values.yaml b/deploy/helm/helm-charts-k8s/aiq/values.yaml index 91ad807fd..05bfb192b 100644 --- a/deploy/helm/helm-charts-k8s/aiq/values.yaml +++ b/deploy/helm/helm-charts-k8s/aiq/values.yaml @@ -20,6 +20,10 @@ project: # OPTIONAL: Namespace Configuration # ========================================== namespace: + # Namespace for all chart resources. Empty uses the release namespace + # (helm install -n / .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: