|
|
|
|
@@ -401,7 +401,7 @@ func AddValidateFlags(cmd *cobra.Command) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func AddValidateOptionFlags(cmd *cobra.Command, options *ValidateOptions) {
|
|
|
|
|
cmd.Flags().BoolVar(&options.EnableValidation, "validate", true, "If true, use a schema to validate the input before sending it")
|
|
|
|
|
cmd.Flags().BoolVar(&options.EnableValidation, "validate", options.EnableValidation, "If true, use a schema to validate the input before sending it")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func AddFilenameOptionFlags(cmd *cobra.Command, options *resource.FilenameOptions, usage string) {
|
|
|
|
|
@@ -427,7 +427,7 @@ func AddApplyAnnotationFlags(cmd *cobra.Command) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func AddApplyAnnotationVarFlags(cmd *cobra.Command, applyAnnotation *bool) {
|
|
|
|
|
cmd.Flags().BoolVar(applyAnnotation, ApplyAnnotationsFlag, false, "If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.")
|
|
|
|
|
cmd.Flags().BoolVar(applyAnnotation, ApplyAnnotationsFlag, *applyAnnotation, "If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// AddGeneratorFlags adds flags common to resource generation commands
|
|
|
|
|
@@ -524,7 +524,7 @@ func AddRecordFlag(cmd *cobra.Command) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func AddRecordVarFlag(cmd *cobra.Command, record *bool) {
|
|
|
|
|
cmd.Flags().BoolVar(record, "record", false, "Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists.")
|
|
|
|
|
cmd.Flags().BoolVar(record, "record", *record, "Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists.")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func GetRecordFlag(cmd *cobra.Command) bool {
|
|
|
|
|
@@ -601,7 +601,7 @@ func AddInclude3rdPartyFlags(cmd *cobra.Command) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func AddInclude3rdPartyVarFlags(cmd *cobra.Command, include3rdParty *bool) {
|
|
|
|
|
cmd.Flags().BoolVar(include3rdParty, "include-extended-apis", true, "If true, include definitions of new APIs via calls to the API server. [default true]")
|
|
|
|
|
cmd.Flags().BoolVar(include3rdParty, "include-extended-apis", *include3rdParty, "If true, include definitions of new APIs via calls to the API server. [default true]")
|
|
|
|
|
cmd.Flags().MarkDeprecated("include-extended-apis", "No longer required.")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|