mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2026-09-05 23:57:12 +00:00
Rename project
This commit is contained in:
+17
-17
@@ -3,7 +3,7 @@ Copyright 2020 VMware, Inc.
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
// Package server is the command line entry point for placeholder-name-server.
|
||||
// Package server is the command line entry point for pinniped-server.
|
||||
package server
|
||||
|
||||
import (
|
||||
@@ -21,15 +21,15 @@ import (
|
||||
"k8s.io/client-go/kubernetes"
|
||||
restclient "k8s.io/client-go/rest"
|
||||
|
||||
"github.com/suzerain-io/placeholder-name/internal/apiserver"
|
||||
"github.com/suzerain-io/placeholder-name/internal/certauthority/kubecertauthority"
|
||||
"github.com/suzerain-io/placeholder-name/internal/constable"
|
||||
"github.com/suzerain-io/placeholder-name/internal/controllermanager"
|
||||
"github.com/suzerain-io/placeholder-name/internal/downward"
|
||||
"github.com/suzerain-io/placeholder-name/internal/provider"
|
||||
"github.com/suzerain-io/placeholder-name/internal/registry/credentialrequest"
|
||||
placeholderv1alpha1 "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/placeholder/v1alpha1"
|
||||
"github.com/suzerain-io/placeholder-name/pkg/config"
|
||||
"github.com/suzerain-io/pinniped/internal/apiserver"
|
||||
"github.com/suzerain-io/pinniped/internal/certauthority/kubecertauthority"
|
||||
"github.com/suzerain-io/pinniped/internal/constable"
|
||||
"github.com/suzerain-io/pinniped/internal/controllermanager"
|
||||
"github.com/suzerain-io/pinniped/internal/downward"
|
||||
"github.com/suzerain-io/pinniped/internal/provider"
|
||||
"github.com/suzerain-io/pinniped/internal/registry/credentialrequest"
|
||||
pinnipedv1alpha1 "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1"
|
||||
"github.com/suzerain-io/pinniped/pkg/config"
|
||||
)
|
||||
|
||||
type percentageValue struct {
|
||||
@@ -57,7 +57,7 @@ func (p *percentageValue) Type() string {
|
||||
return "percentage"
|
||||
}
|
||||
|
||||
// App is an object that represents the placeholder-name-server application.
|
||||
// App is an object that represents the pinniped-server application.
|
||||
type App struct {
|
||||
cmd *cobra.Command
|
||||
|
||||
@@ -69,7 +69,7 @@ type App struct {
|
||||
|
||||
// This is ignored for now because we turn off etcd storage below, but this is
|
||||
// the right prefix in case we turn it back on.
|
||||
const defaultEtcdPathPrefix = "/registry/" + placeholderv1alpha1.GroupName
|
||||
const defaultEtcdPathPrefix = "/registry/" + pinnipedv1alpha1.GroupName
|
||||
|
||||
// New constructs a new App with command line args, stdout and stderr.
|
||||
func New(ctx context.Context, args []string, stdout, stderr io.Writer) *App {
|
||||
@@ -86,8 +86,8 @@ func (a *App) Run() error {
|
||||
// Create the server command and save it into the App.
|
||||
func (a *App) addServerCommand(ctx context.Context, args []string, stdout, stderr io.Writer) {
|
||||
cmd := &cobra.Command{
|
||||
Use: `placeholder-name-server`,
|
||||
Long: "placeholder-name-server provides a generic API for mapping an external\n" +
|
||||
Use: `pinniped-server`,
|
||||
Long: "pinniped-server provides a generic API for mapping an external\n" +
|
||||
"credential from somewhere to an internal credential to be used for\n" +
|
||||
"authenticating to the Kubernetes API.",
|
||||
RunE: func(cmd *cobra.Command, args []string) error { return a.runServer(ctx) },
|
||||
@@ -108,7 +108,7 @@ func addCommandlineFlagsToCommand(cmd *cobra.Command, app *App) {
|
||||
&app.configPath,
|
||||
"config",
|
||||
"c",
|
||||
"placeholder-name.yaml",
|
||||
"pinniped.yaml",
|
||||
"path to configuration file",
|
||||
)
|
||||
|
||||
@@ -166,7 +166,7 @@ func (a *App) runServer(ctx context.Context) error {
|
||||
// post start hook of the aggregated API server.
|
||||
startControllersFunc, err := controllermanager.PrepareControllers(
|
||||
serverInstallationNamespace,
|
||||
cfg.DiscoveryConfig.URL,
|
||||
cfg.DiscoveryInfo.URL,
|
||||
dynamicCertProvider,
|
||||
a.servingCertRotationThreshold.percentage,
|
||||
)
|
||||
@@ -233,7 +233,7 @@ func getAggregatedAPIServerConfig(
|
||||
) (*apiserver.Config, error) {
|
||||
recommendedOptions := genericoptions.NewRecommendedOptions(
|
||||
defaultEtcdPathPrefix,
|
||||
apiserver.Codecs.LegacyCodec(placeholderv1alpha1.SchemeGroupVersion),
|
||||
apiserver.Codecs.LegacyCodec(pinnipedv1alpha1.SchemeGroupVersion),
|
||||
// TODO we should check to see if all the other default settings are acceptable for us
|
||||
)
|
||||
recommendedOptions.Etcd = nil // turn off etcd storage because we don't need it yet
|
||||
|
||||
@@ -17,17 +17,17 @@ import (
|
||||
)
|
||||
|
||||
const knownGoodUsage = `
|
||||
placeholder-name-server provides a generic API for mapping an external
|
||||
pinniped-server provides a generic API for mapping an external
|
||||
credential from somewhere to an internal credential to be used for
|
||||
authenticating to the Kubernetes API.
|
||||
|
||||
Usage:
|
||||
placeholder-name-server [flags]
|
||||
pinniped-server [flags]
|
||||
|
||||
Flags:
|
||||
-c, --config string path to configuration file (default "placeholder-name.yaml")
|
||||
-c, --config string path to configuration file (default "pinniped.yaml")
|
||||
--downward-api-path string path to Downward API volume mount (default "/etc/podinfo")
|
||||
-h, --help help for placeholder-name-server
|
||||
-h, --help help for pinniped-server
|
||||
--log-flush-frequency duration Maximum number of seconds between log flushes (default 5s)
|
||||
--serving-cert-rotation-threshold percentage real number between 0 and 1 indicating percentage of lifetime before rotation of serving cert (default 70.00%)
|
||||
`
|
||||
@@ -51,7 +51,7 @@ func TestCommand(t *testing.T) {
|
||||
{
|
||||
name: "OneArgFails",
|
||||
args: []string{"tuna"},
|
||||
wantErr: `unknown command "tuna" for "placeholder-name-server"`,
|
||||
wantErr: `unknown command "tuna" for "pinniped-server"`,
|
||||
},
|
||||
{
|
||||
name: "ShortConfigFlagSucceeds",
|
||||
@@ -67,7 +67,7 @@ func TestCommand(t *testing.T) {
|
||||
"--config", "some/path/to/config.yaml",
|
||||
"tuna",
|
||||
},
|
||||
wantErr: `unknown command "tuna" for "placeholder-name-server"`,
|
||||
wantErr: `unknown command "tuna" for "pinniped-server"`,
|
||||
},
|
||||
{
|
||||
name: "PercentageIsNotRealNumber",
|
||||
|
||||
Reference in New Issue
Block a user