diff --git a/.devcontainer/.env b/.devcontainer/.env index 388b2309..80d4ef54 100644 --- a/.devcontainer/.env +++ b/.devcontainer/.env @@ -19,12 +19,12 @@ IDENTITYAPI_TRACING_PROVIDER=jaeger IDENTITYAPI_TRACING_JAEGER_ENDPOINT=http://localhost:14268/api/traces IDENTITYAPI_CRDB_URI="postgresql://root@crdb:26257/identityapi_dev?sslmode=disable" -PERMISSIONAPI_TRACING_ENABLED=true -PERMISSIONAPI_TRACING_PROVIDER=jaeger -PERMISSIONAPI_TRACING_JAEGER_ENDPOINT=http://localhost:14268/api/traces -PERMISSIONAPI_SPICEDB_ENDPOINT=spicedb:50051 -PERMISSIONAPI_SPICEDB_KEY=$SPICEDB_GRPC_PRESHARED_KEY -PERMISSIONAPI_SPICEDB_INSECURE=true +PERMISSIONSAPI_TRACING_ENABLED=true +PERMISSIONSAPI_TRACING_PROVIDER=jaeger +PERMISSIONSAPI_TRACING_JAEGER_ENDPOINT=http://localhost:14268/api/traces +PERMISSIONSAPI_SPICEDB_ENDPOINT=spicedb:50051 +PERMISSIONSAPI_SPICEDB_KEY=$SPICEDB_GRPC_PRESHARED_KEY +PERMISSIONSAPI_SPICEDB_INSECURE=true # cockroachdb container config COCKROACH_INSECURE=true diff --git a/cmd/root.go b/cmd/root.go index 8b10cedb..e4ad2b09 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -16,7 +16,7 @@ import ( ) var ( - appName = "permissionapi" + appName = "permissions-api" cfgFile string logger *zap.SugaredLogger globalCfg *config.AppConfig @@ -24,8 +24,8 @@ var ( // rootCmd represents the base command when called without any subcommands var rootCmd = &cobra.Command{ - Use: "infra-permission-api", - Short: "Infratographer Permission API Service", + Use: appName, + Short: "Infratographer Permissions API Service", } // Execute adds all child commands to the root command and sets flags appropriately. @@ -39,7 +39,7 @@ func Execute() { func init() { cobra.OnInitialize(initConfig) - rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is /etc/infratographer/permission-api.yaml)") + rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is /etc/infratographer/permissions-api.yaml)") loggingx.MustViperFlags(viper.GetViper(), rootCmd.PersistentFlags()) // Add version command @@ -69,7 +69,7 @@ func initConfig() { } viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_")) - viper.SetEnvPrefix(appName) + viper.SetEnvPrefix("permissionsapi") viper.AutomaticEnv() // read in environment variables that match // If a config file is found, read it in. diff --git a/cmd/server.go b/cmd/server.go index 1d4247cb..bfeb4210 100644 --- a/cmd/server.go +++ b/cmd/server.go @@ -22,7 +22,7 @@ var ( var serverCmd = &cobra.Command{ Use: "server", - Short: "starts the permission api server", + Short: "starts the permissions-api server", Run: func(cmd *cobra.Command, args []string) { serve(cmd.Context(), globalCfg) },