@@ -20,6 +20,11 @@ func main() {
20 logger.SetFlags(logger.Lshortfile)
20 logger.SetFlags(logger.Lshortfile)
22 configFlagSet := pflag.NewFlagSet("oauth2-proxy", pflag.ContinueOnError)
22 configFlagSet := pflag.NewFlagSet("oauth2-proxy", pflag.ContinueOnError)
24+ // Because we parse early to determine alpha vs legacy config, we have to
25+ // ignore any unknown flags for now
26+ configFlagSet.ParseErrorsWhitelist.UnknownFlags = true
23 config := configFlagSet.String("config", "", "path to config file")
28 config := configFlagSet.String("config", "", "path to config file")
24 alphaConfig := configFlagSet.String("alpha-config", "", "path to alpha config file (use at your own risk - the structure in this config file may change between minor releases)")
29 alphaConfig := configFlagSet.String("alpha-config", "", "path to alpha config file (use at your own risk - the structure in this config file may change between minor releases)")
25 convertConfig := configFlagSet.Bool("convert-config-to-alpha", false, "if true, the proxy will load configuration as normal and convert existing configuration to the alpha config structure, and print it to stdout")
30 convertConfig := configFlagSet.Bool("convert-config-to-alpha", false, "if true, the proxy will load configuration as normal and convert existing configuration to the alpha config structure, and print it to stdout")