Skip to content

Commit dae5be5

Browse files
committed
feat(deploy): add --skip-dependencies-repo-refresh, --show-only, --disable-default-values to bundle render
Signed-off-by: Ilya Lesikov <ilya@lesikov.com>
1 parent e0f9ffb commit dae5be5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

cmd/werf/bundle/render/render.go

+7
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ var cmdData struct {
3535
RenderOutput string
3636
Validate bool
3737
IncludeCRDs bool
38+
ShowOnly []string
3839
}
3940

4041
var commonCmdData common.CmdData
@@ -96,7 +97,9 @@ func NewCmd(ctx context.Context) *cobra.Command {
9697
common.SetupValues(&commonCmdData, cmd, false)
9798
common.SetupSecretValues(&commonCmdData, cmd, false)
9899
common.SetupIgnoreSecretKey(&commonCmdData, cmd)
100+
commonCmdData.SetupDisableDefaultValues(cmd)
99101
commonCmdData.SetupDisableDefaultSecretValues(cmd)
102+
commonCmdData.SetupSkipDependenciesRepoRefresh(cmd)
100103

101104
common.SetupKubeConfig(&commonCmdData, cmd)
102105
common.SetupKubeConfigBase64(&commonCmdData, cmd)
@@ -126,6 +129,7 @@ func NewCmd(ctx context.Context) *cobra.Command {
126129
"Get extracted bundle from directory instead of registry (default $WERF_BUNDLE_DIR)")
127130

128131
cmd.Flags().BoolVarP(&cmdData.Validate, "validate", "", util.GetBoolEnvironmentDefaultFalse("WERF_VALIDATE"), "Validate your manifests against the Kubernetes cluster you are currently pointing at (default $WERF_VALIDATE)")
132+
cmd.Flags().StringArrayVarP(&cmdData.ShowOnly, "show-only", "s", []string{}, "only show manifests rendered from the given templates")
129133

130134
return cmd
131135
}
@@ -226,7 +230,9 @@ func runRender(ctx context.Context) error {
226230
ChartDirPath: bundle.Dir,
227231
ChartRepositoryInsecure: *commonCmdData.InsecureHelmDependencies,
228232
ChartRepositorySkipTLSVerify: *commonCmdData.SkipTlsVerifyHelmDependencies,
233+
ChartRepositorySkipUpdate: *commonCmdData.SkipDependenciesRepoRefresh,
229234
DefaultSecretValuesDisable: *commonCmdData.DisableDefaultSecretValues,
235+
DefaultValuesDisable: *commonCmdData.DisableDefaultValues,
230236
ExtraAnnotations: extraAnnotations,
231237
ExtraLabels: extraLabels,
232238
ExtraRuntimeAnnotations: serviceAnnotations,
@@ -254,6 +260,7 @@ func runRender(ctx context.Context) error {
254260
SecretKeyIgnore: *commonCmdData.IgnoreSecretKey,
255261
SecretValuesPaths: common.GetSecretValues(&commonCmdData),
256262
ShowCRDs: cmdData.IncludeCRDs,
263+
ShowOnlyFiles: append(util.PredefinedValuesByEnvNamePrefix("WERF_SHOW_ONLY"), cmdData.ShowOnly...),
257264
ValuesFileSets: common.GetSetFile(&commonCmdData),
258265
ValuesFilesPaths: common.GetValues(&commonCmdData),
259266
ValuesSets: common.GetSet(&commonCmdData),

0 commit comments

Comments
 (0)