Skip to content

Commit

Permalink
Merge pull request #342 from vidispine/release-1.31
Browse files Browse the repository at this point in the history
Release 1.31
  • Loading branch information
gre9ory authored Oct 21, 2024
2 parents 8cfc8e9 + c8fca15 commit 3f31563
Show file tree
Hide file tree
Showing 38 changed files with 1,669 additions and 1,021 deletions.
35 changes: 17 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ hull: # HULL is configured via subchart key 'hull'
application_version: v23.1 # a shared image tag for multiple container
myapp: # some exemplary configuration settings for the app, exposed here for transparency
rate_limit: 100
max_connections: 5
max_connections: 5
objects: # all objects to create are defined here
deployment: # create deployments
myapp-frontend: # the base part of the object name for frontend deployment
Expand Down Expand Up @@ -88,40 +88,39 @@ hull: # HULL is configured via subchart key 'hull'
myappconfig: # the backend configuration
data: # data section
backend-appconfig.json: # key name is file name
inline: |- # define the contents of the file, using templating logic and references
{
"rate-limit": {{ .Values.hull.config.specific.myapp.rate_limit }},
"max-connections": {{ .Values.hull.config.specific.myapp.max_connections }},
"debug-log": {{ if .Values.hull.config.specific.debug }}true{{ else }}false{{ end }}
}
serialization: toPrettyJson # serialize the dictionary content of inline to pretty Json
inline: # define the contents of the file as a dictionary for convenience
rate-limit: _HT*hull.config.specific.myapp.rate_limit
max-connections: _HT*hull.config.specific.myapp.max_connections
debug-log: _HT!{{ if _HT*hull.config.specific.debug }}true{{ else }}false{{ end }}
service: # create services
myapp-frontend: # frontend service, automatically matches pods with identical parent object's key name
type: |- # dynamically switch type based on hull.config.specific.debug setting
_HT!
{{- if (index . "$").Values.hull.config.specific.debug -}}
NodePort
{{- else -}}
ClusterIP
{{- end -}}
ports: # definition of service ports
http: # http port for type=ClusterIP
enabled: _HT?not (index . "$").Values.hull.config.specific.debug # bind rendering to debug: false condition
enabled: _HT?not _HT*hull.config.specific.debug # bind rendering to debug: false condition, use embedded transformation to reference field
port: 80 # regular port
targetPort: http # targetPort setting
http_nodeport: # http port for type=NodePort
enabled: _HT?(index . "$").Values.hull.config.specific.debug # bind rendering to debug: true condition
enabled: _HT?_HT*hull.config.specific.debug # bind rendering to debug: true condition
port: 80 # regular port
nodePort: 31111 # the node port
targetPort: http # targetPort setting
type: |- # dynamically switch type based on hull.config.specific.debug setting
_HT!
{{- if _HT*hull.config.specific.debug -}}
NodePort
{{- else -}}
ClusterIP
{{- end -}}
myapp-backend: # backend service, automatically matches pods with identical parent object's key name
type: ClusterIP # in cluster service
ports: # definition of service ports
http: # http port
port: 8080 # regular port
targetPort: http # targetPort setting
type: ClusterIP # in cluster service
ingress: # create ingresses
myapp: # the central frontend ingress
enabled: _HT?not (index . "$").Values.hull.config.specific.debug # rendering bound to debug: false
enabled: _HT?not _HT*hull.config.specific.debug # rendering bound to debug: false
rules: # the ingress rules
myapp: # key-value dictionary of rules
host: SET_HOSTNAME_HERE # change the host at deployment time to actual one
Expand Down
11 changes: 6 additions & 5 deletions hull/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Changelog
------------------
[1.31.1]
[1.31.2]
------------------
FIXES:
- fixed follow-up problem with a previous fix for calculation of `hashsumAnnotation` for ConfigMaps or Secrets. In an unlikely case, where a ConfigMap or Secret object has no `data` property set and is then disabled, an unintended error was thrown. ConfigMaps or Secrets with no actual `data` properties can now be disabled without the `hashsumAnnotation` functionality failing.
- fixed printed empty string when referencing multi-line strings including line breaks using `_HT*`. Referenced strings via `_HT*` are now bytewise interpreted and printed including newlines using `printf "%s" ($value | quote)` instead of just `$value`. This transports original string as they are literally specified.
- partially fixed referencing large numbers in their original form. Previously if a string contains large numbers > 999999 or values resembling scientific notation, any reference via `_HT*` to the source field interpreted the strings as numbers and converted them to usually undesired scientific notation, chaning their value and meaning. Side effect of using `printf "%s" ($value | quote)` for string references, all strings are now transported unchanged. Essentially this makes the [JSON hack mentioned in this issue](https://github.com/vidispine/hull/issues/262) obsolete when the source value is in string form.

CHANGES:
- added include shortform transformation `_HT/` to the allowed transformations that can be used within `_HT!` tpl transformations. Similar to using the `_HT*` get syntax within `_HT!` transformations, the `_HT/` include syntax is now embeddable as well. To delimit the `_HT/` arguments from the rest of the `_HT!` content, the `_HT/` block must have a clear ending suffix `/TH_`, similar to bashs `if`/`fi` style. For example, the following syntax now executes the include function within the tpl content: `_HT!{{- printf "%s-%s" _HT/hull.metadata.name:COMPONENT:"tpl-include"/TH_ "example" -}}`
- added possibility to override individual object instance namespaces by setting an optional `namespaceOverride` property on the object instance. CAUTION: creating objects in multiple namespaces _may_ go against Helm principles since normally all objects are created only in the release namespace!
- added more example `values.yaml` files to `files/examples` and updated outdated ones
- using `tpl` transformations with `_HT!` now allows in-place serialization of the result using `toJson`, `toPrettyJson`, `toRawJson`, `toYaml` or `toString`. This adds another serialization possibility besides the existing `_HT/` include and `_HT*` get transformation result serialization capabilities. Thanks [ievgenii-shepeliuk](https://github.com/ievgenii-shepeliuk) for the feature request [here](https://github.com/vidispine/hull/issues/339).
- made previously required dictionary wrapping of array contents for include/`_HT/` transformations obsolete by correctly making use of to `fromYamlArray` Helm function. If an array was to be returned by a `_HT/` transformation, previously it was needed to wrap it in a dictionary and grab the result from the chosen dictionary key. For example, an transformation like `_HT/result/hull.transformation.do.something` would essentially return an array if the include produces a dictionary with a key `result` that has an array value. Starting with this version, it is possible to call `_HT/hull.transformation.do.something` and the resulting include can directly produce the array.
- restructured documentation on transformations in the `hull/doc/transformation.md` file and removed references to obsolete legacy syntax for transformations.
2 changes: 1 addition & 1 deletion hull/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: hull
version: "1.31.1"
version: "1.31.2"
description: HULL - Helm Uniform Layer Library
type: library
keywords:
Expand Down
12 changes: 12 additions & 0 deletions hull/HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
# History
------------------
[1.31.2]
------------------
FIXES:
- fixed printed empty string when referencing multi-line strings including line breaks using `_HT*`. Referenced strings via `_HT*` are now bytewise interpreted and printed including newlines using `printf "%s" ($value | quote)` instead of just `$value`. This transports original string as they are literally specified.
- partially fixed referencing large numbers in their original form. Previously if a string contains large numbers > 999999 or values resembling scientific notation, any reference via `_HT*` to the source field interpreted the strings as numbers and converted them to usually undesired scientific notation, chaning their value and meaning. Side effect of using `printf "%s" ($value | quote)` for string references, all strings are now transported unchanged. Essentially this makes the [JSON hack mentioned in this issue](https://github.com/vidispine/hull/issues/262) obsolete when the source value is in string form.

CHANGES:
- using `tpl` transformations with `_HT!` now allows in-place serialization of the result using `toJson`, `toPrettyJson`, `toRawJson`, `toYaml` or `toString`. This adds another serialization possibility besides the existing `_HT/` include and `_HT*` get transformation result serialization capabilities. Thanks [ievgenii-shepeliuk](https://github.com/ievgenii-shepeliuk) for the feature request [here](https://github.com/vidispine/hull/issues/339).
- made previously required dictionary wrapping of array contents for include/`_HT/` transformations obsolete by correctly making use of to `fromYamlArray` Helm function. If an array was to be returned by a `_HT/` transformation, previously it was needed to wrap it in a dictionary and grab the result from the chosen dictionary key. For example, an transformation like `_HT/result/hull.transformation.do.something` would essentially return an array if the include produces a dictionary with a key `result` that has an array value. Starting with this version, it is possible to call `_HT/hull.transformation.do.something` and the resulting include can directly produce the array.
- restructured documentation on transformations in the `hull/doc/transformation.md` file and removed references to obsolete legacy syntax for transformations.

------------------
[1.31.1]
------------------
Expand Down
35 changes: 17 additions & 18 deletions hull/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ hull: # HULL is configured via subchart key 'hull'
application_version: v23.1 # a shared image tag for multiple container
myapp: # some exemplary configuration settings for the app, exposed here for transparency
rate_limit: 100
max_connections: 5
max_connections: 5
objects: # all objects to create are defined here
deployment: # create deployments
myapp-frontend: # the base part of the object name for frontend deployment
Expand Down Expand Up @@ -74,40 +74,39 @@ hull: # HULL is configured via subchart key 'hull'
myappconfig: # the backend configuration
data: # data section
backend-appconfig.json: # key name is file name
inline: |- # define the contents of the file, using templating logic and references
{
"rate-limit": {{ .Values.hull.config.specific.myapp.rate_limit }},
"max-connections": {{ .Values.hull.config.specific.myapp.max_connections }},
"debug-log": {{ if .Values.hull.config.specific.debug }}true{{ else }}false{{ end }}
}
serialization: toPrettyJson # serialize the dictionary content of inline to pretty Json
inline: # define the contents of the file as a dictionary for convenience
rate-limit: _HT*hull.config.specific.myapp.rate_limit
max-connections: _HT*hull.config.specific.myapp.max_connections
debug-log: _HT!{{ if _HT*hull.config.specific.debug }}true{{ else }}false{{ end }}
service: # create services
myapp-frontend: # frontend service, automatically matches pods with identical parent object's key name
type: |- # dynamically switch type based on hull.config.specific.debug setting
_HT!
{{- if (index . "$").Values.hull.config.specific.debug -}}
NodePort
{{- else -}}
ClusterIP
{{- end -}}
ports: # definition of service ports
http: # http port for type=ClusterIP
enabled: _HT?not (index . "$").Values.hull.config.specific.debug # bind rendering to debug: false condition
enabled: _HT?not _HT*hull.config.specific.debug # bind rendering to debug: false condition, use embedded transformation to reference field
port: 80 # regular port
targetPort: http # targetPort setting
http_nodeport: # http port for type=NodePort
enabled: _HT?(index . "$").Values.hull.config.specific.debug # bind rendering to debug: true condition
enabled: _HT?_HT*hull.config.specific.debug # bind rendering to debug: true condition
port: 80 # regular port
nodePort: 31111 # the node port
targetPort: http # targetPort setting
type: |- # dynamically switch type based on hull.config.specific.debug setting
_HT!
{{- if _HT*hull.config.specific.debug -}}
NodePort
{{- else -}}
ClusterIP
{{- end -}}
myapp-backend: # backend service, automatically matches pods with identical parent object's key name
type: ClusterIP # in cluster service
ports: # definition of service ports
http: # http port
port: 8080 # regular port
targetPort: http # targetPort setting
type: ClusterIP # in cluster service
ingress: # create ingresses
myapp: # the central frontend ingress
enabled: _HT?not (index . "$").Values.hull.config.specific.debug # rendering bound to debug: false
enabled: _HT?not _HT*hull.config.specific.debug # rendering bound to debug: false
rules: # the ingress rules
myapp: # key-value dictionary of rules
host: SET_HOSTNAME_HERE # change the host at deployment time to actual one
Expand Down
2 changes: 1 addition & 1 deletion hull/doc/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ The end to end process using HULL contains the following phases:
- `role`
- `clusterrole`
- objects with a `spec` field:
- `perstistentvolume`
- `persistentvolume`
- `persistentvolumeclaim`
- `servicemonitor`
- `poddisruptionbudget`
Expand Down
Loading

0 comments on commit 3f31563

Please sign in to comment.