Skip to content

Commit 8b4f3a7

Browse files
authored
Merge pull request #109 from vidispine/fixes-1.29
Fixes 1.29
2 parents b063ab4 + 67a5ef3 commit 8b4f3a7

File tree

7 files changed

+85
-4
lines changed

7 files changed

+85
-4
lines changed

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.29.0
44
description: hull-vidispine-addon
55
name: hull-vidispine-addon
6-
version: 1.29.2
6+
version: 1.29.3

hull-vidispine-addon/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ Describes configuration options. <br>Has exclusively the following sub-fields: <
6363
| `debug.ignoreEntityRestCallErrors` | If `false`, the `hull-install` and `hull-configure` scripts will stop after an error was encountered and the allowed number of retries was exceeded. To instead ignore errors and provide a list of failed `entities` after execution set this value to `true`, This can be useful for debugging potential issues with Helm Charts. | `false` | `true`
6464
| `debug.retriesForEntityRestCall` | Sets number of retries for each individual GET, PUT, POST and DELETE call before considering the operation failed. | `3` | `1`
6565
| `debug.retriesForEntityRestCall` | Sets number of retries for each individual GET, PUT, POST and DELETE call before considering the operation failed. | `5` | `2`
66-
66+
| `legacy` | Setttings for legacy compatibility.
67+
| `legacy.defaultServiceAccountIsHook` | In older versions of the `hull-vidispine-addon`, the `default` ServiceAccount that is being created by HULL was annotated as a Helm hook by the `hull-vidispine-addon`and used for all pods in the Helm chart. This behavior was problematic because the Hook lifecycle was only appropriate for the `hull-vidispine-addon` jobs but not the remaining pods. Furthermore it opposed granular RBAC settings for the `hull-install` Jobs vs. continuously running regular pods. So by now there are different Helm hook ServiceAccounts created for the `hull-install` and `hull-configure` job and the `default` ServiceAccount is not annotated as a Helm hook anymore.<br><br> This setting should **NEVER** be set to `true` for new Helm charts, only for a transition phase it may be useful to set it to `true` to avoid immediate migration issues. | `false` | `true`
6768
### EndpointSpec
6869
Describes an endpoint which is communicated with. <br>Has exclusively the following sub-fields: <br><br>`endpoint`<br>`auth`<br>`extraHeaders`<br>`stage`<br>`subresources`
6970

@@ -1037,7 +1038,7 @@ _PVCS_: The additional persistentVolumeClaim volumes to add to the volumes as c
10371038
Usage:
10381039

10391040
This function renders a pods volumes section based on the arguments and rest of the charts configuration:
1040-
First it traverses the _COMPONENT_ in `hull.config.specific.components` and adds all `mounts.secret`'s and `mounts.configmap`'s names as references to the volumes secret and configMap volumes. It also adds all Secrets and ConfigMaps names as references for all defined physical files which are stored under the `files/_COMPONENT_/mounts/secret` and `files/_COMPONENT_/mounts/configmap` folders. Then it adds all additional secret's, configMap's, emptyDir's and persistentVolumeClaim's static reference names provided as additional arguments where the name of the reference is the full object name which is being referenced.
1041+
First it traverses the _COMPONENT_ in `hull.config.specific.components` and adds all `mounts.secret`'s and `mounts.configmap`'s names as references to the volumes secret and configMap volumes. Furthermore it is possible to specify arbitrary `volumes` under a _COMPONENT_s `extraVolumes` property which are also added to the pods `volume` section. It also adds all Secrets and ConfigMaps names as references for all defined physical files which are stored under the `files/_COMPONENT_/mounts/secret` and `files/_COMPONENT_/mounts/configmap` folders. Furthermore it is possible to specify arbitrary `volume`'s under a _COMPONENT_'s `extraVolumes` property, these are also added to the pods `volume` section. This grants maximum freedom to add system-specific `volume`'s to the pod. Finally it adds all additional secret's, configMap's, emptyDir's and persistentVolumeClaim's static reference names provided as additional arguments where the name of the reference is the full object name which is to be included.
10411042

10421043
### hull.vidispine.addon.library.component.pod.env
10431044

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
hull:
2+
config:
3+
general:
4+
data:
5+
installation:
6+
config:
7+
legacy:
8+
defaultServiceAccountIsHook: true
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
################################
2+
### Example values.yaml with all features applied
3+
################################
4+
5+
###################################################
6+
### CONFIG
7+
{}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# ServiceAccount
2+
3+
Test creation of objects and features.
4+
5+
* Prepare default test case for kind "ServiceAccount"
6+
7+
## Render and Validate
8+
* Render
9+
* Expected number of "9" objects were rendered
10+
* Validate
11+
12+
## Metadata
13+
* Check basic metadata functionality
14+
15+
## Hooks
16+
* Render
17+
* Set test object to "release-name-hull-test-default"
18+
* Test Object does not have key "metadata§annotations§helm.sh/hook"
19+
* Test Object does not have key "metadata§annotations§helm.sh/hook-weight"
20+
* Test Object does not have key "metadata§annotations§helm.sh/hook-delete-policy"
21+
* Test Object does not have key "metadata§annotations§safe"
22+
* Test Object does not have key "metadata§annotations§safe-weight"
23+
* Test Object does not have key "metadata§annotations§safe-delete-policy"
24+
25+
* Set test object to "release-name-hull-test-hull-install"
26+
* Test Object has key "metadata§annotations§safe" with value "pre-install,pre-upgrade"
27+
* Test Object has key "metadata§annotations§safe-weight" with value "-100"
28+
* Test Object has key "metadata§annotations§safe-delete-policy" with value "before-hook-creation"
29+
30+
## Legacy
31+
* Prepare default test case for kind "ServiceAccount" including suites "legacyserviceaccounthooks"
32+
* Render
33+
34+
* Set test object to "release-name-hull-test-default"
35+
* Test Object has key "metadata§annotations§safe" with value "pre-install,pre-upgrade"
36+
* Test Object has key "metadata§annotations§safe-weight" with value "-100"
37+
* Test Object has key "metadata§annotations§safe-delete-policy" with value "before-hook-creation"
38+
39+
40+
___
41+
42+
43+
* Clean the test execution folder

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ hull:
1919
ignoreEntityRestCallErrors: false
2020
retriesForEntityRestCall: 3
2121
retriesForAuthServiceCall: 10
22+
legacy:
23+
defaultServiceAccountIsHook: false
2224
runtime:
2325
sourcesFolders: _HT/hull.vidispine.addon.sources.folder.secret.count
2426
endpoints:
@@ -473,6 +475,20 @@ hull:
473475
"helm.sh/hook-delete-policy": before-hook-creation
474476

475477
serviceaccount:
478+
default:
479+
annotations:
480+
_HULL_TRANSFORMATION_:
481+
NAME: hull.util.transformation.tpl
482+
CONTENT: |-
483+
{
484+
{{ if (index . "$").Values.hull.config.general.data.installation.config.legacy.defaultServiceAccountIsHook }}
485+
"helm.sh/hook": "pre-install,pre-upgrade",
486+
"helm.sh/hook-weight": "-100",
487+
"helm.sh/hook-delete-policy": "before-hook-creation"
488+
{{ end }}
489+
}
490+
491+
476492
hull-install:
477493
annotations:
478494
helm.sh/hook: pre-install,pre-upgrade

hull-vidispine-addon/templates/_library.tpl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,12 +657,18 @@ etcssl:
657657
{{ range $pvc := $pvcs }}
658658
{{ if (ne $pvc "") }}
659659
{{ $pvc }}:
660-
persistentVolumeClaim:
660+
persistentVolumeClaim:
661661
claimName: {{ $pvc }}
662662
staticName: true
663663
{{ end }}
664664
{{ end }}
665665
{{ end }}
666+
{{ if (ne nil (dig $component "extraVolumes" nil $parent.Values.hull.config.specific.components)) }}
667+
{{ range $evKey, $evValue := (index $parent.Values.hull.config.specific.components $component).extraVolumes }}
668+
{{ $evKey }}:
669+
{{ $evValue | toYaml | indent 2 }}
670+
{{ end }}
671+
{{ end }}
666672
{{ end }}
667673

668674

0 commit comments

Comments
 (0)