diff --git a/component/agent.jsonnet b/component/agent.jsonnet index 04134bf..a1d0b31 100644 --- a/component/agent.jsonnet +++ b/component/agent.jsonnet @@ -92,21 +92,27 @@ local defaultOrganizationClusterRoles = std.prune( ); -local configMap = kube.ConfigMap('appuio-cloud-agent-config') { - metadata+: { - namespace: params.namespace, - }, - data: { - 'config.yaml': std.manifestYamlDoc(params.agent.config { - local subjects = mapSubjects(super._subjects), - _subjects:: null, - PrivilegedGroups: subjects.groups, - PrivilegedUsers: subjects.users, - PrivilegedClusterRoles: common.FlattenSet(super.PrivilegedClusterRoles), - DefaultOrganizationClusterRoles: defaultOrganizationClusterRoles, - }), - }, -}; +local configMap = + local cleanConfig = { + [k]: params.agent.config[k] + for k in std.objectFields(params.agent.config) + if params.agent.config[k] != null + }; + kube.ConfigMap('appuio-cloud-agent-config') { + metadata+: { + namespace: params.namespace, + }, + data: { + 'config.yaml': std.manifestYamlDoc(cleanConfig { + local subjects = mapSubjects(super._subjects), + _subjects:: null, + PrivilegedGroups: subjects.groups, + PrivilegedUsers: subjects.users, + PrivilegedClusterRoles: common.FlattenSet(super.PrivilegedClusterRoles), + DefaultOrganizationClusterRoles: defaultOrganizationClusterRoles, + }), + }, + }; local deployment = loadManifest('manager/manager.yaml') { metadata+: { diff --git a/docs/modules/ROOT/pages/references/parameters.adoc b/docs/modules/ROOT/pages/references/parameters.adoc index a421756..45eb9e0 100644 --- a/docs/modules/ROOT/pages/references/parameters.adoc +++ b/docs/modules/ROOT/pages/references/parameters.adoc @@ -245,6 +245,7 @@ default:: https://github.com/appuio/component-appuio-cloud/blob/master/class/def This parameter allows configuring the APPUiO Cloud Agent. See the https://github.com/appuio/appuio-cloud-agent/blob/HEAD/config.go[Agent repository] for an overview of the available configuration options. +Configuration parameters can be removed in the hierarchy by setting them to `null`. ==== `agent.config._subjects`