Skip to content

Commit 4a7961b

Browse files
committed
add no_hooks attr
1 parent 8a1611a commit 4a7961b

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

docs/rules.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Defines a helm lint execution.
108108

109109
<pre>
110110
helm_template(<a href="#helm_template-name">name</a>, <a href="#helm_template-api_versions">api_versions</a>, <a href="#helm_template-chart">chart</a>, <a href="#helm_template-disable_openapi_validation">disable_openapi_validation</a>, <a href="#helm_template-include_crds">include_crds</a>, <a href="#helm_template-is_upgrade">is_upgrade</a>,
111-
<a href="#helm_template-kube_version">kube_version</a>, <a href="#helm_template-namespace">namespace</a>, <a href="#helm_template-release_name">release_name</a>, <a href="#helm_template-validate">validate</a>)
111+
<a href="#helm_template-kube_version">kube_version</a>, <a href="#helm_template-namespace">namespace</a>, <a href="#helm_template-no_hooks">no_hooks</a>, <a href="#helm_template-release_name">release_name</a>, <a href="#helm_template-validate">validate</a>)
112112
</pre>
113113

114114
Defines a helm template execution.
@@ -126,6 +126,7 @@ Defines a helm template execution.
126126
| <a id="helm_template-is_upgrade"></a>is_upgrade | Set .Release.IsUpgrade instead of .Release.IsInstall. | Boolean | optional | False |
127127
| <a id="helm_template-kube_version"></a>kube_version | Kubernetes version used for Capabilities.KubeVersion. | String | optional | "" |
128128
| <a id="helm_template-namespace"></a>namespace | Namespace scope for this reques. | String | optional | "" |
129+
| <a id="helm_template-no_hooks"></a>no_hooks | Prevent hooks from running during install. | Boolean | optional | False |
129130
| <a id="helm_template-release_name"></a>release_name | Release name used by helm. | String | required | |
130131
| <a id="helm_template-validate"></a>validate | Validate your manifests against the Kubernetes cluster you are currently pointing at. | Boolean | optional | False |
131132

helm/private/rules/template.bzl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ _ATTRS = {
3333
"validate": attr.bool(
3434
doc = "Validate your manifests against the Kubernetes cluster you are currently pointing at.",
3535
),
36+
"no_hooks": attr.bool(
37+
doc = "Prevent hooks from running during install.",
38+
),
3639
}
3740

3841
def _impl(ctx):
@@ -72,6 +75,8 @@ def _template(ctx):
7275
command += ["--validate"]
7376
if ctx.attr.namespace:
7477
command += ["--namespace", ctx.attr.namespace]
78+
if ctx.attr.no_hooks:
79+
command += ["--no-hooks"]
7580

7681
ctx.actions.run_shell(
7782
inputs = [ctx.file.chart],

0 commit comments

Comments
 (0)