diff --git a/cmd/kube-mgmt/main.go b/cmd/kube-mgmt/main.go index 4c158a3b..d50510ab 100644 --- a/cmd/kube-mgmt/main.go +++ b/cmd/kube-mgmt/main.go @@ -39,8 +39,6 @@ type params struct { policyValue string dataLabel string dataValue string - podName string - podNamespace string enablePolicies bool enableData bool namespaces []string @@ -80,18 +78,18 @@ func main() { rootCmd.Flags().StringVarP(¶ms.opaAuthFile, "opa-auth-token-file", "", "", "set file containing authentication token for OPA API endpoint") rootCmd.Flags().StringVarP(¶ms.opaCAFile, "opa-ca-file", "", "", "set file containing certificate authority for OPA certificate") rootCmd.Flags().BoolVarP(¶ms.opaAllowInsecure, "opa-allow-insecure", "", false, "allow insecure https connections to OPA") - rootCmd.Flags().StringVarP(¶ms.podName, "pod-name", "", "", "set pod name (required for admission registration ownership)") - rootCmd.Flags().StringVarP(¶ms.podNamespace, "pod-namespace", "", "", "set pod namespace (required for admission registration ownership)") - rootCmd.Flags().StringVar(¶ms.policyLabel, "policy-label", "openpolicyagent.org/policy", "label name for filtering ConfigMaps with policies") - rootCmd.Flags().StringVar(¶ms.policyValue, "policy-value", "rego", "label value for filtering ConfigMaps with policies") - rootCmd.Flags().StringVar(¶ms.dataLabel, "data-label", "openpolicyagent.org/data", "label name for filtering ConfigMaps with data") - rootCmd.Flags().StringVar(¶ms.dataValue, "data-value", "opa", "label value for filtering ConfigMaps with data") rootCmd.Flags().StringVar(¶ms.logLevel, "log-level", "info", "set log level {debug, info, warn}") - // Replication options. - rootCmd.Flags().BoolVarP(¶ms.enablePolicies, "enable-policies", "", true, "whether to automatically discover policies from labelled ConfigMaps") - rootCmd.Flags().BoolVarP(¶ms.enableData, "enable-data", "", true, "whether to automatically discover data from labelled ConfigMaps") - rootCmd.Flags().StringSliceVarP(¶ms.namespaces, "namespaces", "", []string{"opa"}, "namespaces to load policies and data from") + // policy / data + rootCmd.Flags().BoolVarP(¶ms.enablePolicies, "enable-policies", "", true, "whether to automatically discover policies from labelled ConfigMaps") + rootCmd.Flags().StringVar(¶ms.policyLabel, "policy-label", "openpolicyagent.org/policy", "label name for filtering ConfigMaps with policies") + rootCmd.Flags().StringVar(¶ms.policyValue, "policy-value", "rego", "label value for filtering ConfigMaps with policies") + rootCmd.Flags().BoolVarP(¶ms.enableData, "enable-data", "", true, "whether to automatically discover data from labelled ConfigMaps") + rootCmd.Flags().StringVar(¶ms.dataLabel, "data-label", "openpolicyagent.org/data", "label name for filtering ConfigMaps with data") + rootCmd.Flags().StringVar(¶ms.dataValue, "data-value", "opa", "label value for filtering ConfigMaps with data") + rootCmd.Flags().StringSliceVarP(¶ms.namespaces, "namespaces", "", []string{""}, "namespaces to load policies and data from") + + // replication rootCmd.Flags().VarP(¶ms.replicateNamespace, "replicate", "", "replicate namespace-level resources") rootCmd.Flags().VarP(¶ms.replicateCluster, "replicate-cluster", "", "replicate cluster-level resources") rootCmd.Flags().StringVarP(¶ms.replicatePath, "replicate-path", "", "kubernetes", "set path to replicate data into")