/
cmd_data.go
118 lines (95 loc) · 3.76 KB
/
cmd_data.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
package common
import (
"github.com/spf13/cobra"
"github.com/werf/werf/pkg/util"
)
type CmdData struct {
GitWorkTree *string
ProjectName *string
Dir *string
ConfigPath *string
ConfigTemplatesDir *string
TmpDir *string
HomeDir *string
SSHKeys *[]string
HelmChartDir *string
Environment *string
Release *string
Namespace *string
AddAnnotations *[]string
AddLabels *[]string
KubeContext *string
KubeConfig *string
KubeConfigBase64 *string
KubeConfigPathMergeList *[]string
StatusProgressPeriodSeconds *int64
HooksStatusProgressPeriodSeconds *int64
ReleasesHistoryMax *int
SetDockerConfigJsonValue *bool
Set *[]string
SetString *[]string
Values *[]string
SetFile *[]string
SecretValues *[]string
IgnoreSecretKey *bool
DisableDefaultValues *bool
DisableDefaultSecretValues *bool
WithoutImages *bool
Repo *RepoData
FinalRepo *RepoData
SecondaryStagesStorage *[]string
CacheStagesStorage *[]string
SkipBuild *bool
StubTags *bool
AddCustomTag *[]string
UseCustomTag *string
Synchronization *string
Parallel *bool
ParallelTasksLimit *int64
DockerConfig *string
InsecureRegistry *bool
SkipTlsVerifyRegistry *bool
InsecureHelmDependencies *bool
DryRun *bool
KeepStagesBuiltWithinLastNHours *uint64
WithoutKube *bool
LooseGiterminism *bool
Dev *bool
DevIgnore *[]string
DevBranch *string
IntrospectBeforeError *bool
IntrospectAfterError *bool
StagesToIntrospect *[]string
Follow *bool
LogDebug *bool
LogPretty *bool
LogVerbose *bool
LogQuiet *bool
LogColorMode *string
LogProjectDir *bool
LogTerminalWidth *int64
ReportPath *string
ReportFormat *string
VirtualMerge *bool
ScanContextNamespaceOnly *bool
// Host storage cleanup options
DisableAutoHostCleanup *bool
DockerServerStoragePath *string
AllowedDockerStorageVolumeUsage *uint
AllowedDockerStorageVolumeUsageMargin *uint
AllowedLocalCacheVolumeUsage *uint
AllowedLocalCacheVolumeUsageMargin *uint
Platform *string
}
func (cmdData *CmdData) SetupWithoutImages(cmd *cobra.Command) {
cmdData.WithoutImages = new(bool)
cmd.Flags().BoolVarP(cmdData.WithoutImages, "without-images", "", util.GetBoolEnvironmentDefaultFalse("WERF_WITHOUT_IMAGES"), "Disable building of images defined in the werf.yaml (if any) and usage of such images in the .helm/templates ($WERF_WITHOUT_IMAGES or false by default — e.g. enable all images defined in the werf.yaml by default)")
}
func (cmdData *CmdData) SetupDisableDefaultValues(cmd *cobra.Command) {
cmdData.DisableDefaultValues = new(bool)
cmd.Flags().BoolVarP(cmdData.DisableDefaultValues, "disable-default-values", "", util.GetBoolEnvironmentDefaultFalse("WERF_DISABLE_DEFAULT_VALUES"), `Do not use values from the default .helm/values.yaml file (default $WERF_DISABLE_DEFAULT_VALUES or false)`)
}
func (cmdData *CmdData) SetupDisableDefaultSecretValues(cmd *cobra.Command) {
cmdData.DisableDefaultSecretValues = new(bool)
cmd.Flags().BoolVarP(cmdData.DisableDefaultSecretValues, "disable-default-secret-values", "", util.GetBoolEnvironmentDefaultFalse("WERF_DISABLE_DEFAULT_SECRET_VALUES"), `Do not use secret values from the default .helm/secret-values.yaml file (default $WERF_DISABLE_DEFAULT_SECRET_VALUES or false)`)
}