Skip to content

Commit

Permalink
Rename --analytics to --enable-analytics (#314)
Browse files Browse the repository at this point in the history
  • Loading branch information
tamalsaha authored Mar 21, 2018
1 parent 6612934 commit 5c1e71e
Show file tree
Hide file tree
Showing 33 changed files with 34 additions and 16 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Want to help improve Searchlight? Please start [here](https://appscode.com/produ
---

**Searchlight binaries collects anonymous usage statistics to help us learn how the software is being used and
how we can improve it. To disable stats collection, run the operator with the flag** `--analytics=false`.
how we can improve it. To disable stats collection, run the operator with the flag** `--enable-analytics=false`.

---

Expand Down
2 changes: 1 addition & 1 deletion chart/stable/searchlight/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ spec:
- --audit-log-path=-
- --tls-cert-file=/var/serving-cert/tls.crt
- --tls-private-key-file=/var/serving-cert/tls.key
- --analytics={{ .Values.enableAnalytics }}
- --enable-analytics={{ .Values.enableAnalytics }}
ports:
- containerPort: 8443
- containerPort: 56790
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ make our docs better.
---

**Searchlight binaries collects anonymous usage statistics to help us learn how the software is being used and how we can improve it.
To disable stats collection, run the operator with the flag** `--analytics=false`.
To disable stats collection, run the operator with the flag** `--enable-analytics=false`.

---
2 changes: 1 addition & 1 deletion docs/reference/hostfacts/hostfacts.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Hostfacts by AppsCode - Expose node metrics

```
--alsologtostderr log to standard error as well as files
--analytics Send analytical events to Google Analytics (default true)
--enable-analytics send usage events to Google Analytics (default true)
-h, --help help for hostfacts
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/hostfacts/hostfacts_run.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ hostfacts run [flags]

```
--alsologtostderr log to standard error as well as files
--analytics Send analytical events to Google Analytics (default true)
--enable-analytics send usage events to Google Analytics (default true)
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/hostfacts/hostfacts_version.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ hostfacts version [flags]

```
--alsologtostderr log to standard error as well as files
--analytics Send analytical events to Google Analytics (default true)
--enable-analytics send usage events to Google Analytics (default true)
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
Expand Down
1 change: 1 addition & 0 deletions docs/reference/hyperalert/hyperalert.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ hyperalert [flags]

```
--alsologtostderr log to standard error as well as files
--enable-analytics send usage events to Google Analytics
-h, --help help for hyperalert
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
Expand Down
1 change: 1 addition & 0 deletions docs/reference/hyperalert/hyperalert_analytics_id.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ hyperalert analytics_id [flags]

```
--alsologtostderr log to standard error as well as files
--enable-analytics send usage events to Google Analytics
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
Expand Down
1 change: 1 addition & 0 deletions docs/reference/hyperalert/hyperalert_check_ca_cert.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ hyperalert check_ca_cert [flags]

```
--alsologtostderr log to standard error as well as files
--enable-analytics send usage events to Google Analytics
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
Expand Down
1 change: 1 addition & 0 deletions docs/reference/hyperalert/hyperalert_check_cert.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ hyperalert check_cert [flags]

```
--alsologtostderr log to standard error as well as files
--enable-analytics send usage events to Google Analytics
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ hyperalert check_component_status [flags]

```
--alsologtostderr log to standard error as well as files
--enable-analytics send usage events to Google Analytics
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
Expand Down
1 change: 1 addition & 0 deletions docs/reference/hyperalert/hyperalert_check_env.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ hyperalert check_env [flags]

```
--alsologtostderr log to standard error as well as files
--enable-analytics send usage events to Google Analytics
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
Expand Down
1 change: 1 addition & 0 deletions docs/reference/hyperalert/hyperalert_check_event.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ hyperalert check_event [flags]

```
--alsologtostderr log to standard error as well as files
--enable-analytics send usage events to Google Analytics
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
Expand Down
1 change: 1 addition & 0 deletions docs/reference/hyperalert/hyperalert_check_influx_query.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ hyperalert check_influx_query [flags]

```
--alsologtostderr log to standard error as well as files
--enable-analytics send usage events to Google Analytics
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
Expand Down
1 change: 1 addition & 0 deletions docs/reference/hyperalert/hyperalert_check_json_path.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ hyperalert check_json_path [flags]

```
--alsologtostderr log to standard error as well as files
--enable-analytics send usage events to Google Analytics
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
Expand Down
1 change: 1 addition & 0 deletions docs/reference/hyperalert/hyperalert_check_node_exists.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ hyperalert check_node_exists [flags]

```
--alsologtostderr log to standard error as well as files
--enable-analytics send usage events to Google Analytics
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
Expand Down
1 change: 1 addition & 0 deletions docs/reference/hyperalert/hyperalert_check_node_status.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ hyperalert check_node_status [flags]

```
--alsologtostderr log to standard error as well as files
--enable-analytics send usage events to Google Analytics
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
Expand Down
1 change: 1 addition & 0 deletions docs/reference/hyperalert/hyperalert_check_pod_exec.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ hyperalert check_pod_exec [flags]

```
--alsologtostderr log to standard error as well as files
--enable-analytics send usage events to Google Analytics
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
Expand Down
1 change: 1 addition & 0 deletions docs/reference/hyperalert/hyperalert_check_pod_exists.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ hyperalert check_pod_exists [flags]

```
--alsologtostderr log to standard error as well as files
--enable-analytics send usage events to Google Analytics
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
Expand Down
1 change: 1 addition & 0 deletions docs/reference/hyperalert/hyperalert_check_pod_status.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ hyperalert check_pod_status [flags]

```
--alsologtostderr log to standard error as well as files
--enable-analytics send usage events to Google Analytics
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
Expand Down
1 change: 1 addition & 0 deletions docs/reference/hyperalert/hyperalert_check_volume.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ hyperalert check_volume [flags]

```
--alsologtostderr log to standard error as well as files
--enable-analytics send usage events to Google Analytics
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
Expand Down
1 change: 1 addition & 0 deletions docs/reference/hyperalert/hyperalert_notifier.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ hyperalert notifier [flags]

```
--alsologtostderr log to standard error as well as files
--enable-analytics send usage events to Google Analytics
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
Expand Down
1 change: 1 addition & 0 deletions docs/reference/hyperalert/hyperalert_version.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ hyperalert version [flags]

```
--alsologtostderr log to standard error as well as files
--enable-analytics send usage events to Google Analytics
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/searchlight/searchlight.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Searchlight by AppsCode - Alerts for Kubernetes

```
--alsologtostderr log to standard error as well as files
--analytics Send analytical events to Google Analytics (default true)
--enable-analytics send usage events to Google Analytics (default true)
-h, --help help for searchlight
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/searchlight/searchlight_configure.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ searchlight configure [flags]

```
--alsologtostderr log to standard error as well as files
--analytics Send analytical events to Google Analytics (default true)
--enable-analytics send usage events to Google Analytics (default true)
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/searchlight/searchlight_run.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ searchlight run [flags]

```
--alsologtostderr log to standard error as well as files
--analytics Send analytical events to Google Analytics (default true)
--enable-analytics send usage events to Google Analytics (default true)
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/searchlight/searchlight_version.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ searchlight version [flags]

```
--alsologtostderr log to standard error as well as files
--analytics Send analytical events to Google Analytics (default true)
--enable-analytics send usage events to Google Analytics (default true)
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log_dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
Expand Down
2 changes: 1 addition & 1 deletion docs/setup/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ options:
--image-pull-secret name of secret used to pull searchlight operator images
--run-on-master run searchlight operator on master
--enable-admission-webhook configure admission webhook for searchlight CRDs
--analytics send usage events to Google Analytics (default: true)
--enable-analytics send usage events to Google Analytics (default: true)
--uninstall uninstall searchlight
--purge purges searchlight crd objects and crds
```
Expand Down
2 changes: 1 addition & 1 deletion hack/deploy/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ spec:
- --audit-log-path=-
- --tls-cert-file=/var/serving-cert/tls.crt
- --tls-private-key-file=/var/serving-cert/tls.key
- --analytics="${SEARCHLIGHT_ENABLE_ANALYTICS}"
- --enable-analytics="${SEARCHLIGHT_ENABLE_ANALYTICS}"
ports:
- containerPort: 8443
- containerPort: 56790
Expand Down
4 changes: 2 additions & 2 deletions hack/deploy/searchlight.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ show_help() {
echo " --image-pull-secret name of secret used to pull searchlight operator images"
echo " --run-on-master run searchlight operator on master"
echo " --enable-admission-webhook configure admission webhook for searchlight CRDs"
echo " --analytics send usage events to Google Analytics (default: true)"
echo " --enable-analytics send usage events to Google Analytics (default: true)"
echo " --uninstall uninstall searchlight"
echo " --purge purges searchlight crd objects and crds"
}
Expand Down Expand Up @@ -119,7 +119,7 @@ while test $# -gt 0; do
fi
shift
;;
--analytics*)
--enable-analytics*)
val=`echo $1 | sed -e 's/^[^=]*=//g'`
if [ "$val" = "false" ]; then
export SEARCHLIGHT_ENABLE_ANALYTICS=false
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmds/hostfacts.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func NewCmdHostfacts() *cobra.Command {
cmd.PersistentFlags().AddGoFlagSet(flag.CommandLine)
// ref: https://github.com/kubernetes/kubernetes/issues/17162#issuecomment-225596212
flag.CommandLine.Parse([]string{})
cmd.PersistentFlags().BoolVar(&enableAnalytics, "analytics", enableAnalytics, "Send analytical events to Google Analytics")
cmd.PersistentFlags().BoolVar(&enableAnalytics, "enable-analytics", enableAnalytics, "send usage events to Google Analytics")

cmd.AddCommand(NewCmdServer())
cmd.AddCommand(v.NewCmdVersion())
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmds/searchlight.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func NewCmdSearchlight() *cobra.Command {
rootCmd.PersistentFlags().AddGoFlagSet(flag.CommandLine)
// ref: https://github.com/kubernetes/kubernetes/issues/17162#issuecomment-225596212
flag.CommandLine.Parse([]string{})
rootCmd.PersistentFlags().BoolVar(&enableAnalytics, "analytics", enableAnalytics, "Send analytical events to Google Analytics")
rootCmd.PersistentFlags().BoolVar(&enableAnalytics, "enable-analytics", enableAnalytics, "send usage events to Google Analytics")

stopCh := genericapiserver.SetupSignalHandler()
rootCmd.AddCommand(NewCmdRun(os.Stdout, os.Stderr, stopCh))
Expand Down
1 change: 1 addition & 0 deletions plugins/hyperalert/lib.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ func NewCmd() *cobra.Command {
cmd.PersistentFlags().AddGoFlagSet(flag.CommandLine)
// ref: https://github.com/kubernetes/kubernetes/issues/17162#issuecomment-225596212
flag.CommandLine.Parse([]string{})
cmd.PersistentFlags().BoolVar(&enableAnalytics, "enable-analytics", enableAnalytics, "send usage events to Google Analytics")

// CheckCluster
cmd.AddCommand(check_component_status.NewCmd())
Expand Down

0 comments on commit 5c1e71e

Please sign in to comment.