Skip to content

Commit 036fd32

Browse files
committed
updated directory with correct version/templates
1 parent 5f118dd commit 036fd32

File tree

78 files changed

+4434
-711
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+4434
-711
lines changed

helm/sas-retrieval-agent-manager/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ annotations:
2424
security.runAsNonRoot: "true"
2525
support.url: https://support.sas.com
2626
apiVersion: v2
27-
appVersion: 2025.9.0
27+
appVersion: 2025.10.0
2828
dependencies:
2929
- name: filebrowser
3030
repository: file://../filebrowser
@@ -112,4 +112,4 @@ name: sas-retrieval-agent-manager
112112
sources:
113113
- https://github.com/sas-institute-rnd-internal/tmp-viya-iot-ram-helm
114114
type: application
115-
version: 2025.9.52
115+
version: 2025.10.5

helm/sas-retrieval-agent-manager/charts/filebrowser/templates/_helpers.tpl

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,32 @@ Usage: {{ include "testValuesPath" (list .Values "x" "y" "z") }}
8080
{{- end }}
8181
{{- $exists }}
8282
{{- end }}
83+
84+
{{/*
85+
Implement logic to determine storage class
86+
and whether to create it based on target platform
87+
*/}}
88+
{{- define "filebrowser.storageConfig" -}}
89+
{{- $platform := .Values.global.targetPlatform }}
90+
{{- $userSC := .Values.rootDir.pvc.storageClassName | default "" }}
91+
{{- $storageClass := $userSC }}
92+
{{- $createSC := .Values.rootDir.pvc.createStorageClass | default false }}
93+
94+
{{- if or (eq $userSC "") (eq $userSC nil) }}
95+
{{- if eq $platform "azure" }}
96+
{{- $storageClass = "azurefile-sas" }}
97+
{{- $createSC = true }}
98+
{{- else if or (eq $platform "openshift") (eq $platform "kubernetes") }}
99+
{{- $storageClass = "nfs-client" }}
100+
{{- $createSC = false }}
101+
{{- else if eq $platform "aws" }}
102+
{{- $storageClass = "efs" }}
103+
{{- $createSC = false }}
104+
{{- else if eq $platform "gcp" }}
105+
{{- $storageClass = "filestore" }}
106+
{{- $createSC = false }}
107+
{{- end }}
108+
{{- end }}
109+
110+
{{- printf "%s|%t" $storageClass $createSC }}
111+
{{- end }}

helm/sas-retrieval-agent-manager/charts/filebrowser/templates/deployment.yaml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
{{- if .Values.enabled -}}
2+
{{- $repo_base := "" -}}
3+
{{- if ((include "testValuesPath" (list .Values "global" "image" "repo" "base")) | eq "true") -}}
4+
{{- $repo_base = .Values.global.image.repo.base | default .Values.image.repo.base -}}
5+
{{- else -}}
6+
{{- $repo_base = .Values.image.repo.base -}}
7+
{{- end -}}
28
apiVersion: apps/v1
39
kind: Deployment
410
metadata:
@@ -16,15 +22,18 @@ spec:
1622
{{- include "filebrowser.selectorLabels" . | nindent 6 }}
1723
template:
1824
metadata:
19-
annotations:
20-
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
2125
{{- with .Values.podAnnotations }}
26+
annotations:
2227
{{- toYaml . | nindent 8 }}
2328
{{- end }}
2429
labels:
2530
{{- include "filebrowser.selectorLabels" . | nindent 8 }}
2631
spec:
27-
{{- with .Values.imagePullSecrets }}
32+
{{- $globalImagePullSecrets := list -}}
33+
{{- if ((include "testValuesPath" (list .Values "global" "imagePullSecrets")) | eq "true") -}}
34+
{{- $globalImagePullSecrets = .Values.global.imagePullSecrets | default (list) -}}
35+
{{- end -}}
36+
{{- with uniq (concat (.Values.imagePullSecrets | default (list)) $globalImagePullSecrets) }}
2837
imagePullSecrets:
2938
{{- toYaml . | nindent 8 }}
3039
{{- end }}
@@ -33,7 +42,7 @@ spec:
3342
{{- toYaml .Values.podSecurityContext | nindent 8 }}
3443
initContainers:
3544
- name: init-db
36-
image: busybox
45+
image: "{{ $repo_base }}/busybox"
3746
command: ["sh", "-c", "touch /db/filebrowser.db && chown 1000:1000 /db/filebrowser.db"]
3847
securityContext:
3948
{{- toYaml .Values.securityContext | nindent 12 }}
@@ -50,14 +59,14 @@ spec:
5059
- name: {{ .Chart.Name }}
5160
securityContext:
5261
{{- toYaml .Values.securityContext | nindent 12 }}
53-
image: "{{ .Values.image.repo.base }}/{{ .Values.image.repo.path }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
62+
image: "{{ $repo_base }}/{{ .Values.image.repo.path }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
5463
imagePullPolicy: {{ .Values.image.pullPolicy }}
5564
env:
56-
{{- if .Values.securityContext.runAsUser }}
65+
{{- if ((include "testValuesPath" (list .Values "securityContext" "runAsUser")) | eq "true") }}
5766
- name: PUID
5867
value: {{ .Values.securityContext.runAsUser | quote }}
5968
{{- end }}
60-
{{- if .Values.securityContext.runAsGroup }}
69+
{{- if ((include "testValuesPath" (list .Values "securityContext" "runAsGroup")) | eq "true") }}
6170
- name: PGID
6271
value: {{ .Values.securityContext.runAsGroup | quote }}
6372
{{- end }}

helm/sas-retrieval-agent-manager/charts/filebrowser/templates/ingress.yaml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
11
{{- if .Values.enabled -}}
22
{{- $dot := . -}}
3-
{{- $globalEnabled := false -}}
4-
{{- if hasKey .Values "global" -}}
5-
{{- if hasKey .Values.global "ingress" -}}
6-
{{- if .Values.global.ingress.enabled -}}
7-
{{- $globalEnabled = true -}}
3+
{{- $globalEnabled := ((include "testValuesPath" (list .Values "global" "ingress" "enabled")) | eq "true") -}}
4+
{{- $globalClassName := "" -}}
5+
{{- if $globalEnabled -}}
6+
{{- $globalClassName = .Values.global.ingress.className | default "" -}}
87
{{- end -}}
8+
{{- $isRouteClassName := false -}}
9+
{{- if $globalEnabled -}}
10+
{{- if eq $globalClassName "route" -}}
11+
{{- $isRouteClassName = true -}}
912
{{- end -}}
13+
{{- else if .Values.ingress.enabled -}}
14+
{{- if eq (.Values.ingress.className | default "") "route" -}}
15+
{{- $isRouteClassName = true -}}
1016
{{- end -}}
11-
{{- if or .Values.ingress.enabled $globalEnabled -}}
17+
{{- end -}}
18+
{{- if and (or .Values.ingress.enabled $globalEnabled) (not $isRouteClassName) -}}
1219
{{- $fullName := include "filebrowser.fullname" . | lower -}}
1320
{{- $svcPort := .Values.service.port -}}
1421
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
apiVersion: policy/v1
2+
kind: PodDisruptionBudget
3+
metadata:
4+
name: {{ include "filebrowser.fullname" . }}-pdb
5+
namespace: {{ .Release.Namespace }}
6+
spec:
7+
minAvailable: 10%
8+
selector:
9+
matchLabels:
10+
app.kubernetes.io/name: filebrowser

helm/sas-retrieval-agent-manager/charts/filebrowser/templates/pvc-rootdir.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
{{- if and (eq .Values.rootDir.type "pvc") (not .Values.rootDir.pvc.existingClaim) }}
1+
{{- if (eq .Values.rootDir.type "pvc") }}
2+
{{- $scParts := include "filebrowser.storageConfig" . | splitList "|" }}
3+
{{- $storageClass := index $scParts 0 }}
24
apiVersion: v1
35
kind: PersistentVolumeClaim
46
metadata:
@@ -15,7 +17,7 @@ spec:
1517
resources:
1618
requests:
1719
storage: {{ .Values.rootDir.pvc.size | quote }}
18-
{{- if .Values.rootDir.pvc.storageClassName }}
19-
storageClassName: {{ .Values.rootDir.pvc.storageClassName }}
20+
{{- if $storageClass }}
21+
storageClassName: {{ $storageClass }}
2022
{{- end }}
2123
{{- end }}
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
{{- if .Values.enabled -}}
2+
{{- $dot := . -}}
3+
{{- $globalEnabled := ((include "testValuesPath" (list .Values "global" "ingress" "enabled")) | eq "true") -}}
4+
{{- $globalClassName := "" -}}
5+
{{- if $globalEnabled -}}
6+
{{- $globalClassName = .Values.global.ingress.className | default "" -}}
7+
{{- end -}}
8+
{{- $isRouteClassName := false -}}
9+
{{- if $globalEnabled -}}
10+
{{- if eq $globalClassName "route" -}}
11+
{{- $isRouteClassName = true -}}
12+
{{- end -}}
13+
{{- else if .Values.ingress.enabled -}}
14+
{{- if eq (.Values.ingress.className | default "") "route" -}}
15+
{{- $isRouteClassName = true -}}
16+
{{- end -}}
17+
{{- end -}}
18+
{{- if and (or .Values.ingress.enabled $globalEnabled) $isRouteClassName -}}
19+
{{- $fullName := include "filebrowser.fullname" . | lower -}}
20+
{{- $svcPort := .Values.service.port -}}
21+
apiVersion: route.openshift.io/v1
22+
kind: Route
23+
metadata:
24+
name: {{ $fullName }}
25+
labels:
26+
{{- include "filebrowser.labels" . | nindent 4 }}
27+
annotations:
28+
{{- if .Values.ingress.annotations }}
29+
{{- range $key, $value := . }}
30+
{{- if not (hasPrefix "nginx.ingress.kubernetes.io/" $key) }}
31+
{{ $key }}: {{ $value | quote }}
32+
{{- end }}
33+
{{- end }}
34+
{{- end }}
35+
# Route-specific annotation for rewrite functionality
36+
haproxy.router.openshift.io/rewrite-target: /
37+
spec:
38+
{{- if $globalEnabled }}
39+
host: {{ .Values.global.domain | quote }}
40+
path: {{ (index .Values.ingress.paths 0).path | default "/SASRetrievalAgentManager/files" }}
41+
{{- else }}
42+
{{- $firstHost := index .Values.ingress.hosts 0 }}
43+
host: {{ $firstHost.host | quote }}
44+
{{- $firstPath := index $firstHost.paths 0 }}
45+
path: {{ $firstPath.path | default "/" }}
46+
{{- end }}
47+
to:
48+
kind: Service
49+
name: {{ $fullName }}
50+
weight: 100
51+
port:
52+
targetPort: {{ $svcPort }}
53+
{{- $globalTlsEnabled := ((include "testValuesPath" (list .Values "global" "ingress" "tls" "enabled")) | eq "true") -}}
54+
{{- $globalTlsSecretName := "" -}}
55+
{{- if ((include "testValuesPath" (list .Values "global" "ingress" "tls" "secretName")) | eq "true") -}}
56+
{{- $globalTlsSecretName = .Values.global.ingress.tls.secretName -}}
57+
{{- end -}}
58+
{{- if or (and $globalEnabled $globalTlsEnabled) .Values.ingress.tls }}
59+
tls:
60+
termination: edge
61+
{{- if $globalEnabled }}
62+
{{- if $globalTlsSecretName }}
63+
key: {{ $globalTlsSecretName }}-key
64+
certificate: {{ $globalTlsSecretName }}-cert
65+
{{- end }}
66+
{{- else }}
67+
{{- if .Values.ingress.tls }}
68+
{{- $firstTls := index .Values.ingress.tls 0 }}
69+
{{- if $firstTls.secretName }}
70+
key: {{ $firstTls.secretName }}-key
71+
certificate: {{ $firstTls.secretName }}-cert
72+
{{- end }}
73+
{{- end }}
74+
{{- end }}
75+
{{- end }}
76+
{{- end -}}
77+
{{- end -}}

helm/sas-retrieval-agent-manager/charts/filebrowser/templates/service.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ spec:
99
type: {{ .Values.service.type }}
1010
ports:
1111
- port: {{ .Values.service.port }}
12+
{{- if eq .Values.service.type "NodePort" }}
13+
nodePort: {{ .Values.service.nodePort }}
14+
{{- end }}
1215
targetPort: http
1316
protocol: TCP
1417
name: http
Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
{{- if .Values.rootDir.pvc.createStorageClass }}
2-
{{- $storageClassName := .Values.rootDir.pvc.storageClassName }}
3-
{{- $storageClass := lookup "storage.k8s.io/v1" "StorageClass" "" $storageClassName }}
4-
{{- if not $storageClass }}
1+
{{- $scParts := include "filebrowser.storageConfig" . | splitList "|" }}
2+
{{- $storageClass := index $scParts 0 }}
3+
{{- $createSC := index $scParts 1 }}
4+
{{- if $createSC }}
5+
{{- $existingSC := lookup "storage.k8s.io/v1" "StorageClass" "" $storageClass }}
6+
{{- if not $existingSC }}
57
apiVersion: storage.k8s.io/v1
68
kind: StorageClass
79
metadata:
8-
name: {{ $storageClassName }}
10+
name: {{ $storageClass }}
911
provisioner: file.csi.azure.com
1012
allowVolumeExpansion: true
1113
mountOptions:
@@ -19,4 +21,4 @@ mountOptions:
1921
parameters:
2022
skuName: Standard_LRS
2123
{{- end }}
22-
{{- end }}
24+
{{- end }}

0 commit comments

Comments
 (0)