Skip to content

Commit 7b7d31e

Browse files
committed
use configmaps instead of secrets where possible
1 parent 372fc9b commit 7b7d31e

5 files changed

Lines changed: 37 additions & 45 deletions

File tree

hull-vidispine-addon/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ apiVersion: v1
33
appVersion: "1.34"
44
description: hull-vidispine-addon
55
name: hull-vidispine-addon
6-
version: 1.34.2
6+
version: 1.34.3

hull-vidispine-addon/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,11 +242,11 @@ Some of the keys have a numerical prefix which guarantees the order of execution
242242

243243
Besides the ability to specify the configuration for `hull-vidispine-addon` it is also possible to provide it in parts via external files stored in your Helm chart. The reason for this is mainly to reduce the overall size and improve readability of the `values.yaml`. Hereby it is possible to mix dictionary entries from `values.yaml` definitions with those defined in external files as shown next. Technically two different methods are provided for integrating configuration content from external files with a different scope of application and technical implications.
244244

245-
The first `installation.yaml merging` approach is suitable for providing larger configuration sections from external files, the external files content is merged at Helm chart rendering with that of the `values.yaml` to create the `installation.yaml` configuration. Hence the merged result of inline `values.yaml` and all files provided via this method will be viewable in the `installation.yaml` content of the `hull-install` secret. This is suitable for most cases where not too large files need to be managed such as UseCaseDefinitions or UseCaseConfigurations.
245+
The first `installation.yaml merging` approach is suitable for providing larger configuration sections from external files, the external files content is merged at Helm chart rendering with that of the `values.yaml` to create the `installation.yaml` configuration. Hence the merged result of inline `values.yaml` and all files provided via this method will be viewable in the `installation.yaml` content of the `hull-install` ConfigMap. This is suitable for most cases where not too large files need to be managed such as UseCaseDefinitions or UseCaseConfigurations.
246246

247-
The second `installation.yaml reference` approach allows to place separate files into a dedicated folder of the parent's Helm Chart (`files/hull-vidispine-addon/installation/sources`) from which they are stored automatically into a secret which in turn is accessible for the `hull-install` and `hull-configure` job pods. Using the `readConfigFromFile` and `updateConfigValues` instructions available on the `entity` specification level the file contents can serve as the complete `config` content or can be mapped to JSON properties of the `config` field. Use this approach for rather large files (licenses, workflow definitions, ...). To better organize the external files sourced via the `installation.yaml reference` approach you can optionally put the files into direct subfolders of `files/hull-vidispine-addon/installation/sources`. The subfolder names need to be exclusively alphabetical letters in lowercase (eg. `workflows`, `rules`, `ucds`, ...) and when refering to such a file with a `path` directive, prefix the filename with the subfolder name and a `/` (eg. `workflows/mygreatworkflow.bpmn`, `ucds/watchfolder_ingest.json`, ...). Note that the maximum number of subfolders currently usable is limited to 20.
247+
The second `installation.yaml reference` approach allows to place separate files into a dedicated folder of the parent's Helm Chart (`files/hull-vidispine-addon/installation/sources`) from which they are stored automatically into a ConfigMap which in turn is accessible for the `hull-install` and `hull-configure` job pods. Using the `readConfigFromFile` and `updateConfigValues` instructions available on the `entity` specification level the file contents can serve as the complete `config` content or can be mapped to JSON properties of the `config` field. Use this approach for rather large files (licenses, workflow definitions, ...). To better organize the external files sourced via the `installation.yaml reference` approach you can optionally put the files into direct subfolders of `files/hull-vidispine-addon/installation/sources`. The subfolder names need to be exclusively alphabetical letters in lowercase or `-` (eg. `workflows`, `rules`, `extra-rules`, `ucds`, ...) and when refering to such a file with a `path` directive, prefix the filename with the subfolder name and a `/` (eg. `workflows/mygreatworkflow.bpmn`, `ucds/watchfolder_ingest.json`, ...). Note that the maximum number of subfolders currently usable is limited to 20.
248248

249-
When choosing either one approach, care needs to be taken to not overstep the maximum size of the Helm Charts versioned manifest secrets. For each release, Helm collects the contents of the `values.yaml`, all template files contents and all other files contained in the Helm Chart. The sum of this information must not exceed 1.5 MB of data, otherwise installation via Helm will fail. Note that the `installation.yaml merging` approach will not create additional secrets in your cluster, however it duplicates the external files data uncompresed into `values.yaml`. Using the `installation.yaml reference` approach the contents of the files imported only exists once in the overall manifest (as the source files contents) so it can be crucial for larger file contents to import them the second way to stay within the size limits. If the overall size of files in the `files/hull-vidispine-addon/installation/sources` starts exceeding the 1.5 mb mark start organizing them in subfolders, for each subfolder a new secret is created with 1.5 mb capacity.
249+
When choosing either one approach, care needs to be taken to not overstep the maximum size of the Helm Charts versioned manifest secrets. For each release, Helm collects the contents of the `values.yaml`, all template files contents and all other files contained in the Helm Chart. The sum of this information must not exceed 1.5 MB of data, otherwise installation via Helm will fail. Note that the `installation.yaml merging` approach will not create additional ConfigMaps in your cluster, however it duplicates the external files data uncompresed into `values.yaml`. Using the `installation.yaml reference` approach the contents of the files imported only exists once in the overall manifest (as the source files contents) so it can be crucial for larger file contents to import them the second way to stay within the size limits. If the overall size of files in the `files/hull-vidispine-addon/installation/sources` starts exceeding the 1.5 mb mark start organizing them in subfolders, for each subfolder a new ConfigMap is created with 1.5 mb capacity.
250250

251251

252252

hull-vidispine-addon/hull-vidispine-addon.yaml

Lines changed: 24 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ hull:
2727
legacy:
2828
defaultServiceAccountIsHook: false
2929
runtime:
30-
sourcesFolders: _HT/hull.vidispine.addon.sources.folder.secret.count
30+
sourcesFolders: _HT/hull.vidispine.addon.sources.folder.configmap.count
3131
endpoints:
3232
10_vidicore:
3333
auth:
@@ -477,15 +477,6 @@ hull:
477477
helm.sh/hook-weight: "-10"
478478
helm.sh/hook-delete-policy: before-hook-creation
479479

480-
configmap:
481-
482-
hull-database:
483-
enabled: false
484-
annotations:
485-
helm.sh/hook: pre-install,pre-upgrade
486-
helm.sh/hook-weight: "-15"
487-
helm.sh/hook-delete-policy: before-hook-creation
488-
489480
secret:
490481

491482
auth:
@@ -494,7 +485,7 @@ hull:
494485
helm.sh/hook-weight: "-100"
495486
helm.sh/hook-delete-policy: before-hook-creation
496487
data: _HT/hull.vidispine.addon.library.auth.secret.data
497-
488+
498489
'custom-ca-certificates':
499490
enabled: _HT?(index . "$").Values.hull.config.general.data.installation.config.customCaCertificates
500491
annotations:
@@ -507,7 +498,8 @@ hull:
507498
{{ $key }}: { inline: {{ $value | quote }} },
508499
{{ end }}
509500
}
510-
501+
configmap:
502+
511503
'custom-installation-files-setup':
512504
enabled: false
513505
annotations:
@@ -531,121 +523,121 @@ hull:
531523
sources:
532524
- custom-installation-files-setup
533525
- _HULL_OBJECT_TYPE_DEFAULT_
534-
data: _HT/hull.vidispine.addon.sources.folder.secret:FOLDER_INDEX:1
526+
data: _HT/hull.vidispine.addon.sources.folder.configmap:FOLDER_INDEX:1
535527
'custom-installation-files-2':
536528
enabled: _HT?ge (int (index . "$").Values.hull.config.general.data.installation.config.runtime.sourcesFolders) 2
537529
sources:
538530
- custom-installation-files-setup
539531
- _HULL_OBJECT_TYPE_DEFAULT_
540-
data: _HT/hull.vidispine.addon.sources.folder.secret:FOLDER_INDEX:2
532+
data: _HT/hull.vidispine.addon.sources.folder.configmap:FOLDER_INDEX:2
541533
'custom-installation-files-3':
542534
enabled: _HT?ge (int (index . "$").Values.hull.config.general.data.installation.config.runtime.sourcesFolders) 3
543535
sources:
544536
- custom-installation-files-setup
545537
- _HULL_OBJECT_TYPE_DEFAULT_
546-
data: _HT/hull.vidispine.addon.sources.folder.secret:FOLDER_INDEX:3
538+
data: _HT/hull.vidispine.addon.sources.folder.configmap:FOLDER_INDEX:3
547539
'custom-installation-files-4':
548540
enabled: _HT?ge (int (index . "$").Values.hull.config.general.data.installation.config.runtime.sourcesFolders) 4
549541
sources:
550542
- custom-installation-files-setup
551543
- _HULL_OBJECT_TYPE_DEFAULT_
552-
data: _HT/hull.vidispine.addon.sources.folder.secret:FOLDER_INDEX:4
544+
data: _HT/hull.vidispine.addon.sources.folder.configmap:FOLDER_INDEX:4
553545
'custom-installation-files-5':
554546
enabled: _HT?ge (int (index . "$").Values.hull.config.general.data.installation.config.runtime.sourcesFolders) 5
555547
sources:
556548
- custom-installation-files-setup
557549
- _HULL_OBJECT_TYPE_DEFAULT_
558-
data: _HT/hull.vidispine.addon.sources.folder.secret:FOLDER_INDEX:5
550+
data: _HT/hull.vidispine.addon.sources.folder.configmap:FOLDER_INDEX:5
559551
'custom-installation-files-6':
560552
enabled: _HT?ge (int (index . "$").Values.hull.config.general.data.installation.config.runtime.sourcesFolders) 6
561553
sources:
562554
- custom-installation-files-setup
563555
- _HULL_OBJECT_TYPE_DEFAULT_
564-
data: _HT/hull.vidispine.addon.sources.folder.secret:FOLDER_INDEX:6
556+
data: _HT/hull.vidispine.addon.sources.folder.configmap:FOLDER_INDEX:6
565557
'custom-installation-files-7':
566558
enabled: _HT?ge (int (index . "$").Values.hull.config.general.data.installation.config.runtime.sourcesFolders) 7
567559
sources:
568560
- custom-installation-files-setup
569561
- _HULL_OBJECT_TYPE_DEFAULT_
570-
data: _HT/hull.vidispine.addon.sources.folder.secret:FOLDER_INDEX:7
562+
data: _HT/hull.vidispine.addon.sources.folder.configmap:FOLDER_INDEX:7
571563
'custom-installation-files-8':
572564
enabled: _HT?ge (int (index . "$").Values.hull.config.general.data.installation.config.runtime.sourcesFolders) 8
573565
sources:
574566
- custom-installation-files-setup
575567
- _HULL_OBJECT_TYPE_DEFAULT_
576-
data: _HT/hull.vidispine.addon.sources.folder.secret:FOLDER_INDEX:8
568+
data: _HT/hull.vidispine.addon.sources.folder.configmap:FOLDER_INDEX:8
577569
'custom-installation-files-9':
578570
enabled: _HT?ge (int (index . "$").Values.hull.config.general.data.installation.config.runtime.sourcesFolders) 9
579571
sources:
580572
- custom-installation-files-setup
581573
- _HULL_OBJECT_TYPE_DEFAULT_
582-
data: _HT/hull.vidispine.addon.sources.folder.secret:FOLDER_INDEX:9
574+
data: _HT/hull.vidispine.addon.sources.folder.configmap:FOLDER_INDEX:9
583575
'custom-installation-files-10':
584576
enabled: _HT?ge (int (index . "$").Values.hull.config.general.data.installation.config.runtime.sourcesFolders) 10
585577
sources:
586578
- custom-installation-files-setup
587579
- _HULL_OBJECT_TYPE_DEFAULT_
588-
data: _HT/hull.vidispine.addon.sources.folder.secret:FOLDER_INDEX:10
580+
data: _HT/hull.vidispine.addon.sources.folder.configmap:FOLDER_INDEX:10
589581
'custom-installation-files-11':
590582
enabled: _HT?ge (int (index . "$").Values.hull.config.general.data.installation.config.runtime.sourcesFolders) 11
591583
sources:
592584
- custom-installation-files-setup
593585
- _HULL_OBJECT_TYPE_DEFAULT_
594-
data: _HT/hull.vidispine.addon.sources.folder.secret:FOLDER_INDEX:11
586+
data: _HT/hull.vidispine.addon.sources.folder.configmap:FOLDER_INDEX:11
595587
'custom-installation-files-12':
596588
enabled: _HT?ge (int (index . "$").Values.hull.config.general.data.installation.config.runtime.sourcesFolders) 12
597589
sources:
598590
- custom-installation-files-setup
599591
- _HULL_OBJECT_TYPE_DEFAULT_
600-
data: _HT/hull.vidispine.addon.sources.folder.secret:FOLDER_INDEX:12
592+
data: _HT/hull.vidispine.addon.sources.folder.configmap:FOLDER_INDEX:12
601593
'custom-installation-files-13':
602594
enabled: _HT?ge (int (index . "$").Values.hull.config.general.data.installation.config.runtime.sourcesFolders) 13
603595
sources:
604596
- custom-installation-files-setup
605597
- _HULL_OBJECT_TYPE_DEFAULT_
606-
data: _HT/hull.vidispine.addon.sources.folder.secret:FOLDER_INDEX:13
598+
data: _HT/hull.vidispine.addon.sources.folder.configmap:FOLDER_INDEX:13
607599
'custom-installation-files-14':
608600
enabled: _HT?ge (int (index . "$").Values.hull.config.general.data.installation.config.runtime.sourcesFolders) 14
609601
sources:
610602
- custom-installation-files-setup
611603
- _HULL_OBJECT_TYPE_DEFAULT_
612-
data: _HT/hull.vidispine.addon.sources.folder.secret:FOLDER_INDEX:14
604+
data: _HT/hull.vidispine.addon.sources.folder.configmap:FOLDER_INDEX:14
613605
'custom-installation-files-15':
614606
enabled: _HT?ge (int (index . "$").Values.hull.config.general.data.installation.config.runtime.sourcesFolders) 15
615607
sources:
616608
- custom-installation-files-setup
617609
- _HULL_OBJECT_TYPE_DEFAULT_
618-
data: _HT/hull.vidispine.addon.sources.folder.secret:FOLDER_INDEX:15
610+
data: _HT/hull.vidispine.addon.sources.folder.configmap:FOLDER_INDEX:15
619611
'custom-installation-files-16':
620612
enabled: _HT?ge (int (index . "$").Values.hull.config.general.data.installation.config.runtime.sourcesFolders) 16
621613
sources:
622614
- custom-installation-files-setup
623615
- _HULL_OBJECT_TYPE_DEFAULT_
624-
data: _HT/hull.vidispine.addon.sources.folder.secret:FOLDER_INDEX:16
616+
data: _HT/hull.vidispine.addon.sources.folder.configmap:FOLDER_INDEX:16
625617
'custom-installation-files-17':
626618
enabled: _HT?ge (int (index . "$").Values.hull.config.general.data.installation.config.runtime.sourcesFolders) 17
627619
sources:
628620
- custom-installation-files-setup
629621
- _HULL_OBJECT_TYPE_DEFAULT_
630-
data: _HT/hull.vidispine.addon.sources.folder.secret:FOLDER_INDEX:17
622+
data: _HT/hull.vidispine.addon.sources.folder.configmap:FOLDER_INDEX:17
631623
'custom-installation-files-18':
632624
enabled: _HT?ge (int (index . "$").Values.hull.config.general.data.installation.config.runtime.sourcesFolders) 18
633625
sources:
634626
- custom-installation-files-setup
635627
- _HULL_OBJECT_TYPE_DEFAULT_
636-
data: _HT/hull.vidispine.addon.sources.folder.secret:FOLDER_INDEX:18
628+
data: _HT/hull.vidispine.addon.sources.folder.configmap:FOLDER_INDEX:18
637629
'custom-installation-files-19':
638630
enabled: _HT?ge (int (index . "$").Values.hull.config.general.data.installation.config.runtime.sourcesFolders) 19
639631
sources:
640632
- custom-installation-files-setup
641633
- _HULL_OBJECT_TYPE_DEFAULT_
642-
data: _HT/hull.vidispine.addon.sources.folder.secret:FOLDER_INDEX:19
634+
data: _HT/hull.vidispine.addon.sources.folder.configmap:FOLDER_INDEX:19
643635
'custom-installation-files-20':
644636
enabled: _HT?ge (int (index . "$").Values.hull.config.general.data.installation.config.runtime.sourcesFolders) 20
645637
sources:
646638
- custom-installation-files-setup
647639
- _HULL_OBJECT_TYPE_DEFAULT_
648-
data: _HT/hull.vidispine.addon.sources.folder.secret:FOLDER_INDEX:20
640+
data: _HT/hull.vidispine.addon.sources.folder.configmap:FOLDER_INDEX:20
649641
hull-database:
650642
enabled: false
651643
annotations:

hull-vidispine-addon/templates/_library.tpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -866,19 +866,19 @@ etcssl:
866866
'DBUSER':
867867
valueFrom:
868868
secretKeyRef:
869-
name: auth
869+
name: "{{ $component }}"
870870
key: AUTH_BASIC_DATABASE_USERNAME
871871
optional: true
872872
'DBPASSWORD':
873873
valueFrom:
874874
secretKeyRef:
875-
name: auth
875+
name: "{{ $component }}"
876876
key: AUTH_BASIC_DATABASE_PASSWORD
877877
optional: true
878878
'DBNAME':
879879
valueFrom:
880880
secretKeyRef:
881-
name: auth
881+
name: "{{ $component }}"
882882
key: AUTH_BASIC_DATABASE_NAME
883883
optional: true
884884
'DBUSERPOSTFIX':

hull-vidispine-addon/templates/_transformations.tpl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,12 @@ Icon: |-
110110
{
111111
"installation":
112112
{
113-
"secret":{ "secretName": "hull-install" }
113+
"configMap":{ "name": "hull-install" }
114114
},
115115
{{ if (gt (len ($parent.Files.Glob "files/hull-vidispine-addon/installation/sources/*")) 0) }}
116116
"custom-installation-files":
117117
{
118-
"secret": { "secretName": "custom-installation-files" }
118+
"configMap": { "name": "custom-installation-files" }
119119
},
120120
{{ end }}
121121
"etcssl":
@@ -150,9 +150,9 @@ Icon: |-
150150
{{ $_ := set $processedDict $folder "true" }}
151151
"custom-installation-files-{{ $folder }}":
152152
{
153-
secret:
153+
configMap:
154154
{
155-
secretName: "custom-installation-files-{{ $folderCount }}"
155+
name: "custom-installation-files-{{ $folderCount }}"
156156
}
157157
},
158158
{{ end }}
@@ -237,7 +237,7 @@ Icon: |-
237237

238238

239239

240-
{{ define "hull.vidispine.addon.sources.folder.secret" }}
240+
{{ define "hull.vidispine.addon.sources.folder.configmap" }}
241241
{{ $parent := (index . "PARENT_CONTEXT") }}
242242
{{ $folderIndex := (index . "FOLDER_INDEX") }}
243243
{
@@ -259,7 +259,7 @@ Icon: |-
259259

260260

261261

262-
{{- define "hull.vidispine.addon.sources.folder.secret.count" -}}
262+
{{- define "hull.vidispine.addon.sources.folder.configmap.count" -}}
263263
{{- $parent := (index . "PARENT_CONTEXT") -}}
264264
{{- $folderIndex := (index . "FOLDER_INDEX") -}}
265265
{{- $processedDict := dict -}}

0 commit comments

Comments
 (0)