|
97 | 97 | silent bool |
98 | 98 | useIPv6 bool |
99 | 99 | silenceAutosupport bool |
| 100 | + excludeAutosupport bool |
100 | 101 | nodePrep []string |
101 | 102 | skipK8sVersionCheck bool |
102 | 103 | windows bool |
@@ -197,6 +198,8 @@ func init() { |
197 | 198 | installCmd.Flags().BoolVar(&useIPv6, "use-ipv6", false, "Use IPv6 for Trident's communication.") |
198 | 199 | installCmd.Flags().BoolVar(&silenceAutosupport, "silence-autosupport", tridentconfig.BuildType != "stable", |
199 | 200 | "Don't send autosupport bundles to NetApp automatically.") |
| 201 | + installCmd.Flags().BoolVar(&excludeAutosupport, "exclude-autosupport", false, |
| 202 | + "Don't install or run the autosupport container.") |
200 | 203 | installCmd.Flags().StringSliceVar(&nodePrep, "node-prep", []string{}, "Comma separated list of protocols to prepare nodes for. Currently only iSCSI is supported.") |
201 | 204 | installCmd.Flags().BoolVar(&enableForceDetach, "enable-force-detach", false, |
202 | 205 | "Enable the force detach feature.") |
@@ -264,6 +267,9 @@ func init() { |
264 | 267 | if err := installCmd.Flags().MarkHidden("autosupport-hostname"); err != nil { |
265 | 268 | _, _ = fmt.Fprintln(os.Stderr, err) |
266 | 269 | } |
| 270 | + if err := installCmd.Flags().MarkHidden("exclude-autosupport"); err != nil { |
| 271 | + _, _ = fmt.Fprintln(os.Stderr, err) |
| 272 | + } |
267 | 273 | if err := installCmd.Flags().MarkHidden("fs-group-policy"); err != nil { |
268 | 274 | _, _ = fmt.Fprintln(os.Stderr, err) |
269 | 275 | } |
@@ -673,6 +679,7 @@ func prepareYAMLFiles() error { |
673 | 679 | ControllingCRDetails: nil, |
674 | 680 | UseIPv6: useIPv6, |
675 | 681 | SilenceAutosupport: silenceAutosupport, |
| 682 | + ExcludeAutosupport: excludeAutosupport, |
676 | 683 | Version: client.ServerVersion(), |
677 | 684 | HTTPRequestTimeout: httpRequestTimeout.String(), |
678 | 685 | ServiceAccountName: getControllerRBACResourceName(), |
@@ -996,6 +1003,13 @@ func installTrident() (returnError error) { |
996 | 1003 | }).Info("ACP is now obsolete; All workflows are now enabled by default.") |
997 | 1004 | } |
998 | 1005 |
|
| 1006 | + // excludeAutosupport completely removes the autosupport container from the deployment. |
| 1007 | + if excludeAutosupport { |
| 1008 | + Log().WithFields(LogFields{ |
| 1009 | + "excludeAutosupport": excludeAutosupport, |
| 1010 | + }).Warn("Autosupport bundles cannot be generated.") |
| 1011 | + } |
| 1012 | + |
999 | 1013 | // Create the deployment |
1000 | 1014 | if useYAML && fileExists(deploymentPath) { |
1001 | 1015 | returnError = validateTridentDeployment() |
@@ -1027,6 +1041,7 @@ func installTrident() (returnError error) { |
1027 | 1041 | ControllingCRDetails: nil, |
1028 | 1042 | UseIPv6: useIPv6, |
1029 | 1043 | SilenceAutosupport: silenceAutosupport, |
| 1044 | + ExcludeAutosupport: excludeAutosupport, |
1030 | 1045 | Version: client.ServerVersion(), |
1031 | 1046 | HTTPRequestTimeout: httpRequestTimeout.String(), |
1032 | 1047 | ServiceAccountName: getControllerRBACResourceName(), |
|
0 commit comments