From 48f4f00d14172bcdd72f2fcde29803ac8d109d8a Mon Sep 17 00:00:00 2001 From: Zack Brady Date: Thu, 8 Aug 2024 19:47:26 -0400 Subject: [PATCH 1/7] updated chart for new org/repo/version (#3) * updated chart for new org/repo/version * upgraded for latest version --- README.md | 4 ++-- charts/hauler/Chart.yaml | 4 ++-- charts/hauler/README.md | 6 +++--- charts/hauler/app-readme.md | 6 +++--- charts/hauler/values.yaml | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 59b73bb..a42c0ce 100644 --- a/README.md +++ b/README.md @@ -24,13 +24,13 @@ helm repo update #### via GitHub Container Registry ```bash -ghcr.io/hauler-dev/charts/hauler +ghcr.io/hauler-dev/hauler-helm ``` #### via Dockerhub Container Registry ```bash -docker.io/hauler/charts/hauler +docker.io/hauler/hauler-helm ``` ### Adding the Helm Chart via Rancher Manager diff --git a/charts/hauler/Chart.yaml b/charts/hauler/Chart.yaml index 9e85dd5..427b9f2 100644 --- a/charts/hauler/Chart.yaml +++ b/charts/hauler/Chart.yaml @@ -3,5 +3,5 @@ name: hauler-helm description: Hauler Helm Chart - Airgap Swiss Army Knife icon: https://raw.githubusercontent.com/hauler-dev/hauler/main/static/rgs-hauler-logo-icon.svg type: application -version: 1.0.4 -appVersion: 1.0.4 +version: 1.0.6 +appVersion: 1.0.6 diff --git a/charts/hauler/README.md b/charts/hauler/README.md index 19b7662..09f4ea9 100644 --- a/charts/hauler/README.md +++ b/charts/hauler/README.md @@ -4,7 +4,7 @@ | Type | Chart Version | App Version | | ----------- | ------------- | ----------- | -| application | `1.0.4` | `1.0.4` | +| application | `1.0.6` | `1.0.6` | ## Installing the Chart @@ -20,13 +20,13 @@ helm upgrade -i hauler hauler-helm/hauler -n hauler-system -f values.yaml #### via GitHub Container Registry ```bash -helm upgrade -i hauler oci://ghcr.io/hauler-dev/charts/hauler -n hauler-system -f values.yaml +helm upgrade -i hauler oci://ghcr.io/hauler-dev/hauler-helm -n hauler-system -f values.yaml ``` #### via DockerHub Container Registry ```bash -helm upgrade -i hauler oci://docker.io/hauler/charts/hauler -n hauler-system -f values.yaml +helm upgrade -i hauler oci://docker.io/hauler/hauler-helm -n hauler-system -f values.yaml ``` ## Helm Chart Deployment Status diff --git a/charts/hauler/app-readme.md b/charts/hauler/app-readme.md index 19b7662..09f4ea9 100644 --- a/charts/hauler/app-readme.md +++ b/charts/hauler/app-readme.md @@ -4,7 +4,7 @@ | Type | Chart Version | App Version | | ----------- | ------------- | ----------- | -| application | `1.0.4` | `1.0.4` | +| application | `1.0.6` | `1.0.6` | ## Installing the Chart @@ -20,13 +20,13 @@ helm upgrade -i hauler hauler-helm/hauler -n hauler-system -f values.yaml #### via GitHub Container Registry ```bash -helm upgrade -i hauler oci://ghcr.io/hauler-dev/charts/hauler -n hauler-system -f values.yaml +helm upgrade -i hauler oci://ghcr.io/hauler-dev/hauler-helm -n hauler-system -f values.yaml ``` #### via DockerHub Container Registry ```bash -helm upgrade -i hauler oci://docker.io/hauler/charts/hauler -n hauler-system -f values.yaml +helm upgrade -i hauler oci://docker.io/hauler/hauler-helm -n hauler-system -f values.yaml ``` ## Helm Chart Deployment Status diff --git a/charts/hauler/values.yaml b/charts/hauler/values.yaml index b8821d8..439079b 100644 --- a/charts/hauler/values.yaml +++ b/charts/hauler/values.yaml @@ -4,7 +4,7 @@ hauler: image: repository: ghcr.io/hauler-dev/hauler - tag: v1.0.4 + tag: v1.0.6 imagePullPolicy: Always initContainers: @@ -25,8 +25,8 @@ hauler: haulerJobs: image: - repository: rancher/shell - tag: v0.1.24 + repository: ghcr.io/hauler-dev/hauler-debug + tag: v1.0.6 imagePullPolicy: Always hauls: From 03711a14d637fb7a6215cf9251494519b49a080c Mon Sep 17 00:00:00 2001 From: Zack Brady Date: Mon, 26 Aug 2024 12:28:25 -0400 Subject: [PATCH 2/7] updated chart for latest version (#4) --- charts/hauler/Chart.yaml | 4 ++-- charts/hauler/README.md | 2 +- charts/hauler/app-readme.md | 2 +- charts/hauler/values.yaml | 10 +++++----- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/charts/hauler/Chart.yaml b/charts/hauler/Chart.yaml index 427b9f2..a44ff30 100644 --- a/charts/hauler/Chart.yaml +++ b/charts/hauler/Chart.yaml @@ -3,5 +3,5 @@ name: hauler-helm description: Hauler Helm Chart - Airgap Swiss Army Knife icon: https://raw.githubusercontent.com/hauler-dev/hauler/main/static/rgs-hauler-logo-icon.svg type: application -version: 1.0.6 -appVersion: 1.0.6 +version: 1.0.7 +appVersion: 1.0.7 diff --git a/charts/hauler/README.md b/charts/hauler/README.md index 09f4ea9..eb885a8 100644 --- a/charts/hauler/README.md +++ b/charts/hauler/README.md @@ -4,7 +4,7 @@ | Type | Chart Version | App Version | | ----------- | ------------- | ----------- | -| application | `1.0.6` | `1.0.6` | +| application | `1.0.7` | `1.0.7` | ## Installing the Chart diff --git a/charts/hauler/app-readme.md b/charts/hauler/app-readme.md index 09f4ea9..eb885a8 100644 --- a/charts/hauler/app-readme.md +++ b/charts/hauler/app-readme.md @@ -4,7 +4,7 @@ | Type | Chart Version | App Version | | ----------- | ------------- | ----------- | -| application | `1.0.6` | `1.0.6` | +| application | `1.0.7` | `1.0.7` | ## Installing the Chart diff --git a/charts/hauler/values.yaml b/charts/hauler/values.yaml index 439079b..0fbcc58 100644 --- a/charts/hauler/values.yaml +++ b/charts/hauler/values.yaml @@ -3,8 +3,8 @@ hauler: image: - repository: ghcr.io/hauler-dev/hauler - tag: v1.0.6 + repository: hauler/hauler + tag: v1.0.7 imagePullPolicy: Always initContainers: @@ -17,7 +17,7 @@ hauler: data: pvc: accessModes: ReadWriteMany - storageClass: longhorn # optional... will use default storage class + # storageClass: longhorn # optional... will use default storage class storageRequest: 48Gi # recommended size of 3x the artifact(s) # Helm Chart Values for the Hauler Jobs @@ -25,8 +25,8 @@ hauler: haulerJobs: image: - repository: ghcr.io/hauler-dev/hauler-debug - tag: v1.0.6 + repository: hauler/hauler-debug + tag: v1.0.7 imagePullPolicy: Always hauls: From 23f7b20fbb8fdbca1867947cbbdbf746eb04d64a Mon Sep 17 00:00:00 2001 From: Zack Brady Date: Thu, 19 Sep 2024 12:47:14 -0400 Subject: [PATCH 3/7] backported updates for v1.0.8 (#6) --- charts/hauler/Chart.yaml | 4 ++-- charts/hauler/README.md | 2 +- charts/hauler/app-readme.md | 2 +- charts/hauler/values.yaml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/charts/hauler/Chart.yaml b/charts/hauler/Chart.yaml index a44ff30..bae7720 100644 --- a/charts/hauler/Chart.yaml +++ b/charts/hauler/Chart.yaml @@ -3,5 +3,5 @@ name: hauler-helm description: Hauler Helm Chart - Airgap Swiss Army Knife icon: https://raw.githubusercontent.com/hauler-dev/hauler/main/static/rgs-hauler-logo-icon.svg type: application -version: 1.0.7 -appVersion: 1.0.7 +version: 1.0.8 +appVersion: 1.0.8 diff --git a/charts/hauler/README.md b/charts/hauler/README.md index eb885a8..64b0389 100644 --- a/charts/hauler/README.md +++ b/charts/hauler/README.md @@ -4,7 +4,7 @@ | Type | Chart Version | App Version | | ----------- | ------------- | ----------- | -| application | `1.0.7` | `1.0.7` | +| application | `1.0.8` | `1.0.8` | ## Installing the Chart diff --git a/charts/hauler/app-readme.md b/charts/hauler/app-readme.md index eb885a8..64b0389 100644 --- a/charts/hauler/app-readme.md +++ b/charts/hauler/app-readme.md @@ -4,7 +4,7 @@ | Type | Chart Version | App Version | | ----------- | ------------- | ----------- | -| application | `1.0.7` | `1.0.7` | +| application | `1.0.8` | `1.0.8` | ## Installing the Chart diff --git a/charts/hauler/values.yaml b/charts/hauler/values.yaml index 0fbcc58..a2ea3e7 100644 --- a/charts/hauler/values.yaml +++ b/charts/hauler/values.yaml @@ -4,7 +4,7 @@ hauler: image: repository: hauler/hauler - tag: v1.0.7 + tag: v1.0.8 imagePullPolicy: Always initContainers: @@ -26,7 +26,7 @@ hauler: haulerJobs: image: repository: hauler/hauler-debug - tag: v1.0.7 + tag: v1.0.8 imagePullPolicy: Always hauls: From 6ee405c574ab61d391b71867283c571586ced6b2 Mon Sep 17 00:00:00 2001 From: Zack Brady Date: Fri, 4 Oct 2024 18:41:00 -0400 Subject: [PATCH 4/7] updated chart for hauler v1.1.0 (#5) Signed-off-by: Zack Brady --- charts/hauler/Chart.yaml | 4 ++-- charts/hauler/README.md | 2 +- charts/hauler/app-readme.md | 2 +- charts/hauler/values.yaml | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/charts/hauler/Chart.yaml b/charts/hauler/Chart.yaml index bae7720..c0ffca8 100644 --- a/charts/hauler/Chart.yaml +++ b/charts/hauler/Chart.yaml @@ -3,5 +3,5 @@ name: hauler-helm description: Hauler Helm Chart - Airgap Swiss Army Knife icon: https://raw.githubusercontent.com/hauler-dev/hauler/main/static/rgs-hauler-logo-icon.svg type: application -version: 1.0.8 -appVersion: 1.0.8 +version: 1.1.0 +appVersion: 1.1.0 diff --git a/charts/hauler/README.md b/charts/hauler/README.md index 64b0389..b4a86eb 100644 --- a/charts/hauler/README.md +++ b/charts/hauler/README.md @@ -4,7 +4,7 @@ | Type | Chart Version | App Version | | ----------- | ------------- | ----------- | -| application | `1.0.8` | `1.0.8` | +| application | `1.1.0` | `1.1.0` | ## Installing the Chart diff --git a/charts/hauler/app-readme.md b/charts/hauler/app-readme.md index 64b0389..b4a86eb 100644 --- a/charts/hauler/app-readme.md +++ b/charts/hauler/app-readme.md @@ -4,7 +4,7 @@ | Type | Chart Version | App Version | | ----------- | ------------- | ----------- | -| application | `1.0.8` | `1.0.8` | +| application | `1.1.0` | `1.1.0` | ## Installing the Chart diff --git a/charts/hauler/values.yaml b/charts/hauler/values.yaml index a2ea3e7..0d12528 100644 --- a/charts/hauler/values.yaml +++ b/charts/hauler/values.yaml @@ -4,13 +4,13 @@ hauler: image: repository: hauler/hauler - tag: v1.0.8 + tag: v1.1.0 imagePullPolicy: Always initContainers: image: repository: rancher/kubectl - tag: v1.28.0 # update to your kubernetes version + tag: v1.29.0 # update to your kubernetes version imagePullPolicy: Always timeout: 1h @@ -26,7 +26,7 @@ hauler: haulerJobs: image: repository: hauler/hauler-debug - tag: v1.0.8 + tag: v1.1.0 imagePullPolicy: Always hauls: From 3bb36e41af6c28ba0907e9c1d5056943a88590c6 Mon Sep 17 00:00:00 2001 From: Zack Brady Date: Sat, 5 Oct 2024 08:48:58 -0400 Subject: [PATCH 5/7] updated tags for hauler v1.1.0 (#7) --- charts/hauler/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/hauler/values.yaml b/charts/hauler/values.yaml index 0d12528..7a761c6 100644 --- a/charts/hauler/values.yaml +++ b/charts/hauler/values.yaml @@ -4,7 +4,7 @@ hauler: image: repository: hauler/hauler - tag: v1.1.0 + tag: 1.1.0 imagePullPolicy: Always initContainers: @@ -26,7 +26,7 @@ hauler: haulerJobs: image: repository: hauler/hauler-debug - tag: v1.1.0 + tag: 1.1.0 imagePullPolicy: Always hauls: From 20a6a6f5ef59d6d37406328f9b6f7c13f393ac40 Mon Sep 17 00:00:00 2001 From: Zack Brady Date: Mon, 9 Dec 2024 22:04:22 -0500 Subject: [PATCH 6/7] updates for hauler v1.1.1 (#8) --- charts/hauler/Chart.yaml | 4 ++-- charts/hauler/README.md | 2 +- charts/hauler/app-readme.md | 2 +- charts/hauler/values.yaml | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/charts/hauler/Chart.yaml b/charts/hauler/Chart.yaml index c0ffca8..8638442 100644 --- a/charts/hauler/Chart.yaml +++ b/charts/hauler/Chart.yaml @@ -3,5 +3,5 @@ name: hauler-helm description: Hauler Helm Chart - Airgap Swiss Army Knife icon: https://raw.githubusercontent.com/hauler-dev/hauler/main/static/rgs-hauler-logo-icon.svg type: application -version: 1.1.0 -appVersion: 1.1.0 +version: 1.1.1 +appVersion: 1.1.1 diff --git a/charts/hauler/README.md b/charts/hauler/README.md index b4a86eb..34f0119 100644 --- a/charts/hauler/README.md +++ b/charts/hauler/README.md @@ -4,7 +4,7 @@ | Type | Chart Version | App Version | | ----------- | ------------- | ----------- | -| application | `1.1.0` | `1.1.0` | +| application | `1.1.1` | `1.1.1` | ## Installing the Chart diff --git a/charts/hauler/app-readme.md b/charts/hauler/app-readme.md index b4a86eb..34f0119 100644 --- a/charts/hauler/app-readme.md +++ b/charts/hauler/app-readme.md @@ -4,7 +4,7 @@ | Type | Chart Version | App Version | | ----------- | ------------- | ----------- | -| application | `1.1.0` | `1.1.0` | +| application | `1.1.1` | `1.1.1` | ## Installing the Chart diff --git a/charts/hauler/values.yaml b/charts/hauler/values.yaml index 7a761c6..7d4407c 100644 --- a/charts/hauler/values.yaml +++ b/charts/hauler/values.yaml @@ -4,13 +4,13 @@ hauler: image: repository: hauler/hauler - tag: 1.1.0 + tag: 1.1.1 imagePullPolicy: Always initContainers: image: repository: rancher/kubectl - tag: v1.29.0 # update to your kubernetes version + tag: v1.31.3 # update to your kubernetes version imagePullPolicy: Always timeout: 1h @@ -26,7 +26,7 @@ hauler: haulerJobs: image: repository: hauler/hauler-debug - tag: 1.1.0 + tag: 1.1.1 imagePullPolicy: Always hauls: From 312674b219fe23e4cce36d9a13b9c35b561d5be5 Mon Sep 17 00:00:00 2001 From: Taylor Shrauner-Biggs Date: Fri, 17 Jan 2025 00:35:58 -0500 Subject: [PATCH 7/7] make changes to allow for "local" vs. "remote" in values, bump to version 1.2.0 --- charts/hauler/Chart.yaml | 4 +- charts/hauler/README.md | 2 +- charts/hauler/app-readme.md | 2 +- .../hauler-fileserver-deployment.yaml | 23 +-- .../hauler-registry-deployment.yaml | 25 +-- .../hauler-registry-ingress.yaml | 4 + .../hauler/templates/hauler/hauler-jobs.yaml | 186 +++++++++++------- charts/hauler/values.yaml | 35 +++- 8 files changed, 151 insertions(+), 130 deletions(-) diff --git a/charts/hauler/Chart.yaml b/charts/hauler/Chart.yaml index 8638442..2f8ddad 100644 --- a/charts/hauler/Chart.yaml +++ b/charts/hauler/Chart.yaml @@ -3,5 +3,5 @@ name: hauler-helm description: Hauler Helm Chart - Airgap Swiss Army Knife icon: https://raw.githubusercontent.com/hauler-dev/hauler/main/static/rgs-hauler-logo-icon.svg type: application -version: 1.1.1 -appVersion: 1.1.1 +version: 1.2.0 +appVersion: 1.2.0 diff --git a/charts/hauler/README.md b/charts/hauler/README.md index 34f0119..8531df2 100644 --- a/charts/hauler/README.md +++ b/charts/hauler/README.md @@ -4,7 +4,7 @@ | Type | Chart Version | App Version | | ----------- | ------------- | ----------- | -| application | `1.1.1` | `1.1.1` | +| application | `1.2.0` | `1.2.0` | ## Installing the Chart diff --git a/charts/hauler/app-readme.md b/charts/hauler/app-readme.md index 34f0119..8531df2 100644 --- a/charts/hauler/app-readme.md +++ b/charts/hauler/app-readme.md @@ -4,7 +4,7 @@ | Type | Chart Version | App Version | | ----------- | ------------- | ----------- | -| application | `1.1.1` | `1.1.1` | +| application | `1.2.0` | `1.2.0` | ## Installing the Chart diff --git a/charts/hauler/templates/hauler-fileserver/hauler-fileserver-deployment.yaml b/charts/hauler/templates/hauler-fileserver/hauler-fileserver-deployment.yaml index 849cb84..b14b5de 100644 --- a/charts/hauler/templates/hauler-fileserver/hauler-fileserver-deployment.yaml +++ b/charts/hauler/templates/hauler-fileserver/hauler-fileserver-deployment.yaml @@ -18,13 +18,11 @@ spec: app: hauler-fileserver {{- include "hauler.selectorLabels" . | nindent 8 }} spec: - {{- if or .Values.haulerJobs.hauls.enabled .Values.haulerJobs.manifests.enabled }} + {{- if and (or .Values.haulerJobs.remote .Values.haulerJobs.local) (or (and .Values.haulerJobs.local .Values.haulerJobs.local.path) (and .Values.haulerJobs.remote .Values.haulerJobs.remote.artifacts (gt (len .Values.haulerJobs.remote.artifacts) 0)) (and .Values.haulerJobs.remote .Values.haulerJobs.remote.manifests (gt (len .Values.haulerJobs.remote.manifests) 0)) (and .Values.haulerJobs.local .Values.haulerJobs.local.artifacts (gt (len .Values.haulerJobs.local.artifacts) 0)) (and .Values.haulerJobs.local .Values.haulerJobs.local.manifests (gt (len .Values.haulerJobs.local.manifests) 0)) ) }} initContainers: - {{- if .Values.haulerJobs.hauls.enabled }} - - name: wait-for-hauler-hauls-job - image: {{ .Values.hauler.initContainers.image.repository }}:{{ .Values.hauler.initContainers.image.tag }} + - name: wait-for-hauler-loader imagePullPolicy: {{ .Values.hauler.initContainers.imagePullPolicy }} - args: ["wait", "--for=condition=complete", "job", "hauler-hauls-job", "--namespace", "{{ .Release.Namespace }}", "--timeout={{ .Values.hauler.initContainers.timeout }}"] + args: ["wait", "--for=condition=complete", "job", "hauler-loader", "--namespace", "{{ .Release.Namespace }}", "--timeout={{ .Values.hauler.initContainers.timeout }}"] securityContext: allowPrivilegeEscalation: false capabilities: @@ -33,21 +31,6 @@ spec: runAsUser: 1001 seccompProfile: type: RuntimeDefault - {{- end }} - {{- if .Values.haulerJobs.manifests.enabled }} - - name: wait-for-hauler-manifests-job - image: {{ .Values.hauler.initContainers.image.repository }}:{{ .Values.hauler.initContainers.image.tag }} - imagePullPolicy: {{ .Values.hauler.initContainers.imagePullPolicy }} - args: ["wait", "--for=condition=complete", "job", "hauler-manifests-job", "--namespace", "{{ .Release.Namespace }}", "--timeout={{ .Values.hauler.initContainers.timeout }}"] - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: ["ALL"] - runAsNonRoot: true - runAsUser: 1001 - seccompProfile: - type: RuntimeDefault - {{- end }} {{- end }} containers: - name: hauler-fileserver diff --git a/charts/hauler/templates/hauler-registry/hauler-registry-deployment.yaml b/charts/hauler/templates/hauler-registry/hauler-registry-deployment.yaml index 9a3d2b2..f3db745 100644 --- a/charts/hauler/templates/hauler-registry/hauler-registry-deployment.yaml +++ b/charts/hauler/templates/hauler-registry/hauler-registry-deployment.yaml @@ -18,13 +18,11 @@ spec: app: hauler-registry {{- include "hauler.selectorLabels" . | nindent 8 }} spec: - {{- if or .Values.haulerJobs.hauls.enabled .Values.haulerJobs.manifests.enabled }} + {{- if and (or .Values.haulerJobs.remote .Values.haulerJobs.local) (or (and .Values.haulerJobs.local .Values.haulerJobs.local.path) (and .Values.haulerJobs.remote .Values.haulerJobs.remote.artifacts (gt (len .Values.haulerJobs.remote.artifacts) 0)) (and .Values.haulerJobs.remote .Values.haulerJobs.remote.manifests (gt (len .Values.haulerJobs.remote.manifests) 0)) (and .Values.haulerJobs.local .Values.haulerJobs.local.artifacts (gt (len .Values.haulerJobs.local.artifacts) 0)) (and .Values.haulerJobs.local .Values.haulerJobs.local.manifests (gt (len .Values.haulerJobs.local.manifests) 0)) ) }} initContainers: - {{- if .Values.haulerJobs.hauls.enabled }} - - name: wait-for-hauler-hauls-job - image: {{ .Values.hauler.initContainers.image.repository }}:{{ .Values.hauler.initContainers.image.tag }} + - name: wait-for-hauler-loader imagePullPolicy: {{ .Values.hauler.initContainers.imagePullPolicy }} - args: ["wait", "--for=condition=complete", "job", "hauler-hauls-job", "--namespace", "{{ .Release.Namespace }}", "--timeout={{ .Values.hauler.initContainers.timeout }}"] + args: ["wait", "--for=condition=complete", "job", "hauler-loader", "--namespace", "{{ .Release.Namespace }}", "--timeout={{ .Values.hauler.initContainers.timeout }}"] securityContext: allowPrivilegeEscalation: false capabilities: @@ -33,21 +31,6 @@ spec: runAsUser: 1001 seccompProfile: type: RuntimeDefault - {{- end }} - {{- if .Values.haulerJobs.manifests.enabled }} - - name: wait-for-hauler-manifests-job - image: {{ .Values.hauler.initContainers.image.repository }}:{{ .Values.hauler.initContainers.image.tag }} - imagePullPolicy: {{ .Values.hauler.initContainers.imagePullPolicy }} - args: ["wait", "--for=condition=complete", "job", "hauler-manifests-job", "--namespace", "{{ .Release.Namespace }}", "--timeout={{ .Values.hauler.initContainers.timeout }}"] - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: ["ALL"] - runAsNonRoot: true - runAsUser: 1001 - seccompProfile: - type: RuntimeDefault - {{- end }} {{- end }} containers: - name: hauler-registry @@ -73,4 +56,4 @@ spec: - name: hauler-data persistentVolumeClaim: claimName: hauler-data -{{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/hauler/templates/hauler-registry/hauler-registry-ingress.yaml b/charts/hauler/templates/hauler-registry/hauler-registry-ingress.yaml index 0afdfc5..8245f88 100644 --- a/charts/hauler/templates/hauler-registry/hauler-registry-ingress.yaml +++ b/charts/hauler/templates/hauler-registry/hauler-registry-ingress.yaml @@ -2,6 +2,10 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: + annotations: + {{- range $key, $value := .Values.haulerRegistry.ingress.annotations }} + {{ $key }}: {{ $value | quote }} + {{- end }} name: hauler-registry namespace: {{ .Release.Namespace }} labels: diff --git a/charts/hauler/templates/hauler/hauler-jobs.yaml b/charts/hauler/templates/hauler/hauler-jobs.yaml index d46a99d..44a660c 100644 --- a/charts/hauler/templates/hauler/hauler-jobs.yaml +++ b/charts/hauler/templates/hauler/hauler-jobs.yaml @@ -1,8 +1,8 @@ -{{- if .Values.haulerJobs.hauls.enabled }} +{{- if and (or .Values.haulerJobs.remote .Values.haulerJobs.local) (or (and .Values.haulerJobs.local .Values.haulerJobs.local.path) (and .Values.haulerJobs.remote .Values.haulerJobs.remote.artifacts (gt (len .Values.haulerJobs.remote.artifacts) 0)) (and .Values.haulerJobs.remote .Values.haulerJobs.remote.manifests (gt (len .Values.haulerJobs.remote.manifests) 0)) (and .Values.haulerJobs.local .Values.haulerJobs.local.artifacts (gt (len .Values.haulerJobs.local.artifacts) 0)) (and .Values.haulerJobs.local .Values.haulerJobs.local.manifests (gt (len .Values.haulerJobs.local.manifests) 0)) ) }} apiVersion: batch/v1 kind: Job metadata: - name: hauler-hauls-job + name: hauler-loader namespace: {{ .Release.Namespace }} labels: {{- include "hauler.labels" . | nindent 4 }} @@ -10,82 +10,64 @@ spec: template: spec: initContainers: - - name: hauler-fetch-hauls + - name: hauler-fetch image: {{ .Values.haulerJobs.image.repository }}:{{ .Values.haulerJobs.image.tag }} imagePullPolicy: {{ .Values.haulerJobs.imagePullPolicy }} command: ["/bin/sh", "-c"] args: - | - {{- range .Values.haulerJobs.hauls.artifacts }} - curl -o /hauls/{{ .name }} {{ .path }} && + {{- if and .Values.haulerJobs.local .Values.haulerJobs.local.store }} + cp -vr /local-store/* /store/ && + chown -R 1001:1001 /store && {{- end }} - echo hauler fetch completed - volumeMounts: - - name: hauler-data - mountPath: /hauls - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: ["ALL"] - runAsNonRoot: true - runAsUser: 1001 - seccompProfile: - type: RuntimeDefault - containers: - - name: hauler-load-hauls - image: {{ .Values.hauler.image.repository }}:{{ .Values.hauler.image.tag }} - imagePullPolicy: {{ .Values.hauler.imagePullPolicy }} - args: - - "store" - - "load" - {{- range .Values.haulerJobs.hauls.artifacts }} - - "/hauls/{{ .name }}" - {{- end }} - volumeMounts: - - name: hauler-data - mountPath: /hauls - - name: hauler-data - mountPath: /store - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: ["ALL"] - runAsNonRoot: true - runAsUser: 1001 - seccompProfile: - type: RuntimeDefault - restartPolicy: OnFailure - volumes: - - name: hauler-data - persistentVolumeClaim: - claimName: hauler-data -{{- end }} ---- -{{- if .Values.haulerJobs.manifests.enabled }} -apiVersion: batch/v1 -kind: Job -metadata: - name: hauler-manifests-job - namespace: {{ .Release.Namespace }} - labels: - {{- include "hauler.labels" . | nindent 4 }} -spec: - template: - spec: - initContainers: - - name: hauler-fetch-manifests - image: {{ .Values.haulerJobs.image.repository }}:{{ .Values.haulerJobs.image.tag }} - imagePullPolicy: {{ .Values.haulerJobs.imagePullPolicy }} - command: ["/bin/sh", "-c"] - args: - - | - {{- range .Values.haulerJobs.manifests.artifacts }} + {{- if and .Values.haulerJobs.local .Values.haulerJobs.local.artifacts }} + {{- range .Values.haulerJobs.local.artifacts }} + cp -v /tmp/local-artifact-{{ .name }} /artifacts/ && + {{- end}} + {{- end}} + {{- if and .Values.haulerJobs.local .Values.haulerJobs.local.manifests }} + {{- range .Values.haulerJobs.local.manifests }} + cp -v /tmp/local-manifest-{{ .name }} /manifests/ && + {{- end}} + {{- end}} + {{- if and .Values.haulerJobs.remote .Values.haulerJobs.remote.artifacts }} + {{- range .Values.haulerJobs.remote.artifacts }} + curl -o /artifacts/{{ .name }} {{ .path }} && + {{- end }} + {{- end }} + {{- if and .Values.haulerJobs.remote .Values.haulerJobs.remote.manifests }} + {{- range .Values.haulerJobs.remote.manifests }} curl -o /manifests/{{ .name }} {{ .path }} && {{- end }} + {{- end }} echo hauler fetch completed volumeMounts: - - name: hauler-data + {{- if or (and .Values.haulerJobs.remote .Values.haulerJobs.remote.artifacts (gt (len .Values.haulerJobs.remote.artifacts) 0)) (and .Values.haulerJobs.local .Values.haulerJobs.local.artifacts (gt (len .Values.haulerJobs.local.artifacts) 0)) }} + - name: artifact-data + mountPath: /artifacts + {{- end }} + {{- if and .Values.haulerJobs.local .Values.haulerJobs.local.artifacts (gt (len .Values.haulerJobs.local.artifacts) 0) }} + {{- range .Values.haulerJobs.local.artifacts }} + - name: local-artifact-{{ .name }} + mountPath: /tmp/local-artifact-{{ .name }} + {{- end }} + {{- end }} + {{- if or (and .Values.haulerJobs.remote .Values.haulerJobs.remote.manifests (gt (len .Values.haulerJobs.remote.manifests) 0)) (and .Values.haulerJobs.local .Values.haulerJobs.local.manifests (gt (len .Values.haulerJobs.local.manifests) 0)) }} + - name: manifest-data mountPath: /manifests + {{- end }} + {{- if and .Values.haulerJobs.local .Values.haulerJobs.local.manifests (gt (len .Values.haulerJobs.local.manifests) 0) }} + {{- range .Values.haulerJobs.local.manifests }} + - name: local-manifest-{{ .name }} + mountPath: /tmp/local-manifest-{{ .name }} + {{- end }} + {{- end }} + {{- if and .Values.haulerJobs.local .Values.haulerJobs.local.store }} + - name: store-data + mountPath: /local-store + {{- end }} + - name: hauler-data + mountPath: /store securityContext: allowPrivilegeEscalation: false capabilities: @@ -95,19 +77,46 @@ spec: seccompProfile: type: RuntimeDefault containers: - - name: hauler-load-manifests + - name: hauler-load image: {{ .Values.hauler.image.repository }}:{{ .Values.hauler.image.tag }} imagePullPolicy: {{ .Values.hauler.imagePullPolicy }} + command: ["/bin/sh", "-c"] args: - {{- range .Values.haulerJobs.manifests.artifacts }} - - "store" - - "sync" - - "--files" - - "/manifests/{{ .name }}" + - | + {{- if and .Values.haulerJobs.remote .Values.haulerJobs.remote.artifacts (gt (len .Values.haulerJobs.remote.artifacts) 0) }} + {{- range .Values.haulerJobs.remote.artifacts }} + hauler store load /artifacts/{{ .name }} && + {{- end }} + {{- end }} + {{- if and .Values.haulerJobs.local .Values.haulerJobs.local.artifacts (gt (len .Values.haulerJobs.local.artifacts) 0) }} + {{- range .Values.haulerJobs.local.artifacts }} + hauler store load /artifacts/{{ .name }} && {{- end }} + {{- end }} + {{- if and .Values.haulerJobs.remote .Values.haulerJobs.remote.manifests (gt (len .Values.haulerJobs.remote.manifests) 0) }} + {{- range .Values.haulerJobs.remote.manifests }} + hauler store sync --files /manifests/{{ .name }} && + {{- end }} + {{- end }} + {{- if and .Values.haulerJobs.local .Values.haulerJobs.local.manifests (gt (len .Values.haulerJobs.local.manifests) 0) }} + {{- range .Values.haulerJobs.local.manifests }} + hauler store sync --files /manifests/{{ .name }} && + {{- end }} + {{- end }} + echo hauler load completed volumeMounts: - - name: hauler-data + {{- if and .Values.haulerJobs.remote .Values.haulerJobs.remote.artifacts (gt (len .Values.haulerJobs.remote.artifacts) 0) }} + - name: artifact-data + mountPath: /artifacts + {{- end }} + {{- if and .Values.haulerJobs.remote .Values.haulerJobs.remote.manifests (gt (len .Values.haulerJobs.remote.manifests) 0) }} + - name: manifest-data mountPath: /manifests + {{- end }} + {{- if and .Values.haulerJobs.local .Values.haulerJobs.local.store }} + - name: store-data + mountPath: /local-store + {{- end }} - name: hauler-data mountPath: /store securityContext: @@ -120,7 +129,34 @@ spec: type: RuntimeDefault restartPolicy: OnFailure volumes: + {{- if or (and .Values.haulerJobs.remote .Values.haulerJobs.remote.artifacts (gt (len .Values.haulerJobs.remote.artifacts) 0)) (and .Values.haulerJobs.local .Values.haulerJobs.local.artifacts (gt (len .Values.haulerJobs.local.artifacts) 0)) }} + - name: artifact-data + emptyDir: + {{- end }} + {{- if (and .Values.haulerJobs.local .Values.haulerJobs.local.artifacts (gt (len .Values.haulerJobs.local.artifacts) 0)) }} + {{- range .Values.haulerJobs.local.artifacts }} + - name: local-artifact-{{ .name }} + hostPath: + path: {{ .path }} + {{- end }} + {{- end }} + {{- if or (and .Values.haulerJobs.remote .Values.haulerJobs.remote.manifests (gt (len .Values.haulerJobs.remote.manifests) 0)) (and .Values.haulerJobs.local .Values.haulerJobs.local.manifests (gt (len .Values.haulerJobs.local.manifests) 0)) }} + - name: manifest-data + emptyDir: + {{- end }} + {{- if (and .Values.haulerJobs.local .Values.haulerJobs.local.manifests (gt (len .Values.haulerJobs.local.manifests) 0)) }} + {{- range .Values.haulerJobs.local.manifests }} + - name: local-manifest-{{ .name }} + hostPath: + path: {{ .path }} + {{- end }} + {{- end }} + {{- if and .Values.haulerJobs.local .Values.haulerJobs.local.store }} + - name: store-data + hostPath: + path: {{ .Values.haulerJobs.local.store }} + {{- end }} - name: hauler-data persistentVolumeClaim: claimName: hauler-data -{{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/hauler/values.yaml b/charts/hauler/values.yaml index 7d4407c..1a4b339 100644 --- a/charts/hauler/values.yaml +++ b/charts/hauler/values.yaml @@ -4,7 +4,7 @@ hauler: image: repository: hauler/hauler - tag: 1.1.1 + tag: 1.2.0 imagePullPolicy: Always initContainers: @@ -22,31 +22,46 @@ hauler: # Helm Chart Values for the Hauler Jobs # Docs: https://rancherfederal.github.io/hauler-docs/docs/introduction/quickstart +# Hauler Jobs are used to populate the Registry and/or Filestore with content +# Use "local" in order to populate the hauler store with locally available stores, artifacts, and/or manifests. +# Use "remote" if these are remotely (HTTP/S/FTP/etc) available instead +# Simply comment out any unneeded values haulerJobs: image: repository: hauler/hauler-debug - tag: 1.1.1 + tag: 1.2.0 imagePullPolicy: Always - - hauls: - enabled: true + # "remote" refers to URL-based hauler artifacts and/or manifests + remote: artifacts: - path: https://raw.githubusercontent.com/hauler-dev/hauler/main/testdata/haul.tar.zst - name: haul.tar.zst + name: remhaul.tar.zst # - path: /path/to/additional-hauls.tar.zst # name: additional-hauls.tar.zst - - manifests: - enabled: true - artifacts: + manifests: - path: https://raw.githubusercontent.com/hauler-dev/hauler/main/testdata/hauler-manifest.yaml + name: remhauler-manifest.yaml + # - path: /path/to/additional-manifests.yaml + # name: additional-manifests.yaml + # "local" refers to the host the container/kubectl is being run on. Use filesystem paths (hostDir) for these values. + local: + artifacts: + - path: /usr/local/testdata/haul.tar.zst + name: haul.tar.zst + # - path: /path/to/additional-hauls.tar.zst + # name: additional-hauls.tar.zst + manifests: + - path: /usr/local/testdata/hauler-manifest.yaml name: hauler-manifest.yaml # - path: /path/to/additional-manifests.yaml # name: additional-manifests.yaml + # "store" refers to a previously created hauler folder structure. See the "-s" argument to hauler. Only one path is acceptable + store: /my/previously/created/hauler/store/dir/ # Helm Chart Values for the Hauler Fileserver # Docs: https://rancherfederal.github.io/hauler-docs/docs/guides-references/command-line/hauler-store#hauler-store-serve-fileserver +# haulerFileserver: enabled: true