HULL: Helm Uniform Layer Library
Abstractions need to be maintained - Kelsey Hightower
⚠️ Breaking change in 1.37.0: the default RBAC objects are opt-in
Up to and including HULL 1.36.0, every HULL based chart rendered a default ServiceAccount, a default Role and a default RoleBinding unless a global pod serviceAccountName was configured under hull.config.templates.pod.global. Pods that did not specify a serviceAccountName themselves were automatically wired to that default ServiceAccount.
Starting with 1.37.0 these three objects are not created anymore by default. They are opt-in via the new hull.config.general.createDefaultRbacTriplet switch:
hull:
config:
general:
createDefaultRbacTriplet: true # restores the pre-1.37.0 behavior
What happens when upgrading without setting the switch to true:
- the
default ServiceAccount, default Role and default RoleBinding are removed from the release on the next helm upgrade
- pods that do not set a
serviceAccountName no longer get one rendered, so Kubernetes assigns the namespace's own default ServiceAccount to them instead
- if your chart customizes one of the three objects, rendering fails instead of silently dropping the configuration: this applies to
annotations on the default ServiceAccount (for example an IRSA eks.amazonaws.com/role-arn), rules on the default Role and a changed roleRef or subjects on the default RoleBinding. Set createDefaultRbacTriplet: true to keep all three objects, or set enabled explicitly on each affected object to decide for it alone
Each of the three objects can also be enabled on its own by setting its enabled property explicitly, which takes precedence over the switch. Note that they are only connected as a triplet when all three are rendered: enabling only hull.objects.serviceaccount.default renders the ServiceAccount without the default Role and RoleBinding. Whenever the default ServiceAccount is rendered, pods without an explicit serviceAccountName are assigned to it automatically, as before. Set the new hull.config.general.assignDefaultServiceAccountToPods switch to false to opt out of this assignment while still rendering the ServiceAccount.
Note that the hull.config.general.rbac switch is unchanged, it still controls whether any Role, RoleBinding, ClusterRole and ClusterRoleBinding objects are rendered at all. With createDefaultRbacTriplet: true and rbac: false only the default ServiceAccount is created.
Introduction
One major design aspect of Helm is that it forces the user to create individual abstractions of the Kubernetes configuration of applications. For each individual Helm Chart that is realized in form of YAML templates in a Helm charts /templates folder. These template files, containing boilerplate Kubernetes YAML code blocks on the one hand and custom configuration mappings utilizing Go Templating expressions on the other hand, provide the glue between the configuration of the application via the central values.yaml configuration file and the desired Kubernetes YAML output. Arguably this approach of per-application abstraction is suited well to create tailormade configuration packages for even the most specialized applications but comes at a cost of having a large overhead for simpler, recurring and off-the-shelf application packaging use cases. Creating, maintaining and (often) understanding the abstractions introduced by Helm Charts - especially when facing a high number of individual Helm charts from various sources - can become tedious and challenging.