diff --git a/Dockerfile b/Dockerfile index ee71025ac..21284fbd0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,17 +33,17 @@ COPY tools ./tools COPY hack ./hack # Build the executable binary (CGO_ENABLED=0 means static linking) -RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "$(hack/get-ldflags.sh)" -o out ./cmd/placeholder-name-server/... +RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "$(hack/get-ldflags.sh)" -o out ./cmd/pinniped-server/... # Use a runtime image based on Debian slim FROM debian:10.5-slim # Copy the binary from the build-env stage -COPY --from=build-env /work/out/placeholder-name-server /usr/local/bin/placeholder-name-server +COPY --from=build-env /work/out/pinniped-server /usr/local/bin/pinniped-server # Document the port EXPOSE 443 # Set the entrypoint -ENTRYPOINT ["/usr/local/bin/placeholder-name-server"] +ENTRYPOINT ["/usr/local/bin/pinniped-server"] diff --git a/README.md b/README.md index 58039403c..71955058c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,15 @@ -# placeholder-name +# Pinniped -Copyright 2020 VMware, Inc. +Image of pinniped + + + +## About Pinniped + +Pinniped provides authentication for Kubernetes clusters. ## Developing @@ -28,3 +37,9 @@ pre-commit installed at .git/hooks/pre-commit ``` [pre-commit]: https://pre-commit.com/ + +## Licence + +Pinniped is open source and licenced under Apache License Version 2.0. See [LICENSE](LICENSE) file. + +Copyright 2020 VMware, Inc. diff --git a/cmd/placeholder-name-server/main.go b/cmd/pinniped-server/main.go similarity index 90% rename from cmd/placeholder-name-server/main.go rename to cmd/pinniped-server/main.go index 355627338..a2a100e17 100644 --- a/cmd/placeholder-name-server/main.go +++ b/cmd/pinniped-server/main.go @@ -14,7 +14,7 @@ import ( "k8s.io/component-base/logs" "k8s.io/klog/v2" - "github.com/suzerain-io/placeholder-name/internal/server" + "github.com/suzerain-io/pinniped/internal/server" ) func main() { diff --git a/cmd/placeholder-name/main.go b/cmd/pinniped/main.go similarity index 80% rename from cmd/placeholder-name/main.go rename to cmd/pinniped/main.go index a4e678f02..450fab43c 100644 --- a/cmd/placeholder-name/main.go +++ b/cmd/pinniped/main.go @@ -16,8 +16,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" clientauthenticationv1beta1 "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1" - "github.com/suzerain-io/placeholder-name/internal/constable" - "github.com/suzerain-io/placeholder-name/pkg/client" + "github.com/suzerain-io/pinniped/internal/constable" + "github.com/suzerain-io/pinniped/pkg/client" ) func main() { @@ -37,19 +37,19 @@ func run(envGetter envGetter, tokenExchanger tokenExchanger, outputWriter io.Wri ctx, cancel := context.WithTimeout(context.Background(), timeout) defer cancel() - token, varExists := envGetter("PLACEHOLDER_NAME_TOKEN") + token, varExists := envGetter("PINNIPED_TOKEN") if !varExists { - return envVarNotSetError("PLACEHOLDER_NAME_TOKEN") + return envVarNotSetError("PINNIPED_TOKEN") } - caBundle, varExists := envGetter("PLACEHOLDER_NAME_CA_BUNDLE") + caBundle, varExists := envGetter("PINNIPED_CA_BUNDLE") if !varExists { - return envVarNotSetError("PLACEHOLDER_NAME_CA_BUNDLE") + return envVarNotSetError("PINNIPED_CA_BUNDLE") } - apiEndpoint, varExists := envGetter("PLACEHOLDER_NAME_K8S_API_ENDPOINT") + apiEndpoint, varExists := envGetter("PINNIPED_K8S_API_ENDPOINT") if !varExists { - return envVarNotSetError("PLACEHOLDER_NAME_K8S_API_ENDPOINT") + return envVarNotSetError("PINNIPED_K8S_API_ENDPOINT") } cred, err := tokenExchanger(ctx, token, caBundle, apiEndpoint) diff --git a/cmd/placeholder-name/main_test.go b/cmd/pinniped/main_test.go similarity index 79% rename from cmd/placeholder-name/main_test.go rename to cmd/pinniped/main_test.go index 418864771..3a9b0c4be 100644 --- a/cmd/placeholder-name/main_test.go +++ b/cmd/pinniped/main_test.go @@ -12,13 +12,13 @@ import ( "testing" "time" - "github.com/suzerain-io/placeholder-name/internal/testutil" + "github.com/suzerain-io/pinniped/internal/testutil" "github.com/sclevine/spec" "github.com/sclevine/spec/report" "github.com/stretchr/testify/require" - "github.com/suzerain-io/placeholder-name/pkg/client" + "github.com/suzerain-io/pinniped/pkg/client" ) func TestRun(t *testing.T) { @@ -40,29 +40,29 @@ func TestRun(t *testing.T) { r = require.New(t) buffer = new(bytes.Buffer) fakeEnv = map[string]string{ - "PLACEHOLDER_NAME_TOKEN": "token from env", - "PLACEHOLDER_NAME_CA_BUNDLE": "ca bundle from env", - "PLACEHOLDER_NAME_K8S_API_ENDPOINT": "k8s api from env", + "PINNIPED_TOKEN": "token from env", + "PINNIPED_CA_BUNDLE": "ca bundle from env", + "PINNIPED_K8S_API_ENDPOINT": "k8s api from env", } }) when("env vars are missing", func() { - it("returns an error when PLACEHOLDER_NAME_TOKEN is missing", func() { - delete(fakeEnv, "PLACEHOLDER_NAME_TOKEN") + it("returns an error when PINNIPED_TOKEN is missing", func() { + delete(fakeEnv, "PINNIPED_TOKEN") err := run(envGetter, tokenExchanger, buffer, 30*time.Second) - r.EqualError(err, "failed to get credential: environment variable not set: PLACEHOLDER_NAME_TOKEN") + r.EqualError(err, "failed to get credential: environment variable not set: PINNIPED_TOKEN") }) - it("returns an error when PLACEHOLDER_NAME_CA_BUNDLE is missing", func() { - delete(fakeEnv, "PLACEHOLDER_NAME_CA_BUNDLE") + it("returns an error when PINNIPED_CA_BUNDLE is missing", func() { + delete(fakeEnv, "PINNIPED_CA_BUNDLE") err := run(envGetter, tokenExchanger, buffer, 30*time.Second) - r.EqualError(err, "failed to get credential: environment variable not set: PLACEHOLDER_NAME_CA_BUNDLE") + r.EqualError(err, "failed to get credential: environment variable not set: PINNIPED_CA_BUNDLE") }) - it("returns an error when PLACEHOLDER_NAME_K8S_API_ENDPOINT is missing", func() { - delete(fakeEnv, "PLACEHOLDER_NAME_K8S_API_ENDPOINT") + it("returns an error when PINNIPED_K8S_API_ENDPOINT is missing", func() { + delete(fakeEnv, "PINNIPED_K8S_API_ENDPOINT") err := run(envGetter, tokenExchanger, buffer, 30*time.Second) - r.EqualError(err, "failed to get credential: environment variable not set: PLACEHOLDER_NAME_K8S_API_ENDPOINT") + r.EqualError(err, "failed to get credential: environment variable not set: PINNIPED_K8S_API_ENDPOINT") }) }) @@ -129,9 +129,9 @@ func TestRun(t *testing.T) { it("writes the execCredential to the given writer", func() { err := run(envGetter, tokenExchanger, buffer, 30*time.Second) r.NoError(err) - r.Equal(fakeEnv["PLACEHOLDER_NAME_TOKEN"], actualToken) - r.Equal(fakeEnv["PLACEHOLDER_NAME_CA_BUNDLE"], actualCaBundle) - r.Equal(fakeEnv["PLACEHOLDER_NAME_K8S_API_ENDPOINT"], actualAPIEndpoint) + r.Equal(fakeEnv["PINNIPED_TOKEN"], actualToken) + r.Equal(fakeEnv["PINNIPED_CA_BUNDLE"], actualCaBundle) + r.Equal(fakeEnv["PINNIPED_K8S_API_ENDPOINT"], actualAPIEndpoint) expected := `{ "kind": "ExecCredential", "apiVersion": "client.authentication.k8s.io/v1beta1", diff --git a/deploy/README.md b/deploy/README.md index 9a03d551f..3e7228a95 100644 --- a/deploy/README.md +++ b/deploy/README.md @@ -8,4 +8,4 @@ https://hub.docker.com/r/k14s/image/tags 1. Fill in the values in [values.yml](values.yaml) 2. In a terminal, cd to this `deploy` directory -3. Run: `ytt --file . | kapp deploy --yes --app placeholder-name --diff-changes --file -` +3. Run: `ytt --file . | kapp deploy --yes --app pinniped --diff-changes --file -` diff --git a/deploy/crd.yaml b/deploy/crd.yaml index 46dc59b29..8fb9b6c8a 100644 --- a/deploy/crd.yaml +++ b/deploy/crd.yaml @@ -1,9 +1,9 @@ #@ load("@ytt:data", "data") -#! Example of valid LoginDiscoveryConfig object: +#! Example of valid PinnipedDiscoveryInfo object: #! --- -#! apiVersion: suzerain-io.github.io/v1alpha1 -#! kind: LoginDiscoveryConfig +#! apiVersion: crd.pinniped.dev/v1alpha1 +#! kind: PinnipedDiscoveryInfo #! metadata: #! name: login-discovery #! namespace: integration @@ -15,12 +15,12 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: - name: logindiscoveryconfigs.crds.placeholder.suzerain-io.github.io + name: pinnipeddiscoveryinfos.crd.pinniped.dev spec: - group: crds.placeholder.suzerain-io.github.io + group: crd.pinniped.dev versions: #! Any changes to these schemas should also be reflected in the types.go file(s) - #! in https://github.com/suzerain-io/placeholder-name-api/tree/main/pkg/apis/placeholder + #! in https://github.com/suzerain-io/pinniped-api/tree/main/pkg/apis/pinniped - name: v1alpha1 served: true storage: true @@ -42,8 +42,8 @@ spec: minLength: 1 scope: Namespaced names: - plural: logindiscoveryconfigs - singular: logindiscoveryconfig - kind: LoginDiscoveryConfig + plural: pinnipeddiscoveryinfos + singular: pinnipeddiscoveryinfo + kind: PinnipedDiscoveryInfo shortNames: - ldc diff --git a/deploy/deployment.yaml b/deploy/deployment.yaml index 5f752f46d..a4d081cab 100644 --- a/deploy/deployment.yaml +++ b/deploy/deployment.yaml @@ -23,7 +23,7 @@ metadata: app: #@ data.values.app_name data: #@yaml/text-templated-strings - placeholder-name.yaml: | + pinniped.yaml: | discovery: url: (@= data.values.discovery_url or "null" @) webhook: @@ -70,7 +70,7 @@ spec: - name: image-pull-secret #@ end containers: - - name: placeholder-name + - name: pinniped #@ if data.values.image_digest: image: #@ data.values.image_repo + "@" + data.values.image_digest #@ else: @@ -78,7 +78,7 @@ spec: #@ end imagePullPolicy: IfNotPresent args: - - --config=/etc/config/placeholder-name.yaml + - --config=/etc/config/pinniped.yaml - --downward-api-path=/etc/podinfo volumeMounts: - name: config-volume @@ -128,7 +128,7 @@ spec: apiVersion: v1 kind: Service metadata: - name: placeholder-name-api #! the golang code assumes this specific name as part of the common name during cert generation + name: pinniped-api #! the golang code assumes this specific name as part of the common name during cert generation namespace: #@ data.values.namespace labels: app: #@ data.values.app_name @@ -144,16 +144,16 @@ spec: apiVersion: apiregistration.k8s.io/v1 kind: APIService metadata: - name: v1alpha1.placeholder.suzerain-io.github.io + name: v1alpha1.pinniped.dev labels: app: #@ data.values.app_name spec: version: v1alpha1 - group: placeholder.suzerain-io.github.io + group: pinniped.dev groupPriorityMinimum: 2500 #! TODO what is the right value? https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#apiservicespec-v1beta1-apiregistration-k8s-io versionPriority: 10 #! TODO what is the right value? https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#apiservicespec-v1beta1-apiregistration-k8s-io #! caBundle: Do not include this key here. Starts out null, will be updated/owned by the golang code. service: - name: placeholder-name-api + name: pinniped-api namespace: #@ data.values.namespace port: 443 diff --git a/deploy/rbac.yaml b/deploy/rbac.yaml index 4701222f1..d1082f672 100644 --- a/deploy/rbac.yaml +++ b/deploy/rbac.yaml @@ -44,8 +44,8 @@ rules: - apiGroups: [""] resources: [secrets] verbs: [create, get, list, patch, update, watch, delete] - - apiGroups: [crds.placeholder.suzerain-io.github.io] - resources: [logindiscoveryconfigs] + - apiGroups: [crd.pinniped.dev] + resources: [pinnipeddiscoveryinfos] verbs: [create, get, list, update, watch] --- kind: RoleBinding @@ -98,7 +98,7 @@ kind: ClusterRole metadata: name: #@ data.values.app_name + "-credentialrequests-cluster-role" rules: - - apiGroups: [placeholder.suzerain-io.github.io] + - apiGroups: [pinniped.dev] resources: [credentialrequests] verbs: [create] --- diff --git a/deploy/values.yaml b/deploy/values.yaml index e5a4c501e..b8c71c549 100644 --- a/deploy/values.yaml +++ b/deploy/values.yaml @@ -1,9 +1,9 @@ #@data/values --- -app_name: placeholder-name +app_name: pinniped -namespace: #! e.g. placeholder-name +namespace: #! e.g. pinniped #! Specify either an image_digest or an image_tag. If both are given, only image_digest will be used. image_repo: #! e.g. registry.example.com/your-project-name/repo-name diff --git a/go.mod b/go.mod index 187ab4873..89e6bf74c 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/suzerain-io/placeholder-name +module github.com/suzerain-io/pinniped go 1.14 @@ -12,9 +12,9 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.6.1 github.com/suzerain-io/controller-go v0.0.0-20200730212956-7f99b569ca9f - github.com/suzerain-io/placeholder-name/kubernetes/1.19/api v0.0.0-00010101000000-000000000000 - github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go v0.0.0-00010101000000-000000000000 - github.com/suzerain-io/placeholder-name/pkg/client v0.0.0-00010101000000-000000000000 + github.com/suzerain-io/pinniped/kubernetes/1.19/api v0.0.0-00010101000000-000000000000 + github.com/suzerain-io/pinniped/kubernetes/1.19/client-go v0.0.0-00010101000000-000000000000 + github.com/suzerain-io/pinniped/pkg/client v0.0.0-00010101000000-000000000000 k8s.io/api v0.19.0-rc.0 k8s.io/apimachinery v0.19.0-rc.0 k8s.io/apiserver v0.19.0-rc.0 @@ -27,7 +27,7 @@ require ( ) replace ( - github.com/suzerain-io/placeholder-name/kubernetes/1.19/api => ./kubernetes/1.19/api - github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go => ./kubernetes/1.19/client-go - github.com/suzerain-io/placeholder-name/pkg/client => ./pkg/client + github.com/suzerain-io/pinniped/kubernetes/1.19/api => ./kubernetes/1.19/api + github.com/suzerain-io/pinniped/kubernetes/1.19/client-go => ./kubernetes/1.19/client-go + github.com/suzerain-io/pinniped/pkg/client => ./pkg/client ) diff --git a/hack/lib/codegen.sh b/hack/lib/codegen.sh index d7c4a649a..9f79e7afb 100755 --- a/hack/lib/codegen.sh +++ b/hack/lib/codegen.sh @@ -10,7 +10,7 @@ GOPATH="${GOPATH:-$(mktemp -d)}" K8S_PKG_VERSION="${K8S_PKG_VERSION:-"1.19"}" CODEGEN_IMAGE=${CODEGEN_IMAGE:-"gcr.io/tanzu-user-authentication/k8s-code-generator-${K8S_PKG_VERSION}:latest"} -BASE_PKG="github.com/suzerain-io/placeholder-name" +BASE_PKG="github.com/suzerain-io/pinniped" function codegen::ensure_module_in_gopath() { # This should be something like "kubernetes/1.19/api". @@ -53,20 +53,20 @@ function codegen::generate_for_module() { deepcopy,defaulter \ "${BASE_PKG}/kubernetes/1.19/api/generated" \ "${BASE_PKG}/kubernetes/1.19/api/apis" \ - "placeholder:v1alpha1 crdsplaceholder:v1alpha1" + "pinniped:v1alpha1 crdpinniped:v1alpha1" codegen::invoke_code_generator generate-internal-groups "${mod_basename_for_version}" \ deepcopy,defaulter,conversion,openapi \ "${BASE_PKG}/kubernetes/1.19/api/generated" \ "${BASE_PKG}/kubernetes/1.19/api/apis" \ "${BASE_PKG}/kubernetes/1.19/api/apis" \ - "placeholder:v1alpha1 crdsplaceholder:v1alpha1" + "pinniped:v1alpha1 crdpinniped:v1alpha1" ;; 1.19/client-go) codegen::invoke_code_generator generate-groups "${mod_basename_for_version}" \ client,lister,informer \ "${BASE_PKG}/kubernetes/1.19/client-go" \ "${BASE_PKG}/kubernetes/1.19/api/apis" \ - "placeholder:v1alpha1 crdsplaceholder:v1alpha1" + "pinniped:v1alpha1 crdpinniped:v1alpha1" ;; esac } diff --git a/internal/apiserver/apiserver.go b/internal/apiserver/apiserver.go index fde37c382..3b223aa4e 100644 --- a/internal/apiserver/apiserver.go +++ b/internal/apiserver/apiserver.go @@ -20,9 +20,9 @@ import ( "k8s.io/client-go/pkg/version" "k8s.io/klog/v2" - "github.com/suzerain-io/placeholder-name/internal/registry/credentialrequest" - placeholderapi "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/placeholder" - placeholderv1alpha1 "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/placeholder/v1alpha1" + "github.com/suzerain-io/pinniped/internal/registry/credentialrequest" + pinnipedapi "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped" + pinnipedv1alpha1 "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1" ) var ( @@ -35,8 +35,8 @@ var ( //nolint: gochecknoinits func init() { - utilruntime.Must(placeholderv1alpha1.AddToScheme(scheme)) - utilruntime.Must(placeholderapi.AddToScheme(scheme)) + utilruntime.Must(pinnipedv1alpha1.AddToScheme(scheme)) + utilruntime.Must(pinnipedapi.AddToScheme(scheme)) // add the options to empty v1 metav1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) @@ -62,7 +62,7 @@ type ExtraConfig struct { StartControllersPostStartHook func(ctx context.Context) } -type PlaceHolderServer struct { +type PinnipedServer struct { GenericAPIServer *genericapiserver.GenericAPIServer } @@ -90,17 +90,17 @@ func (c *Config) Complete() CompletedConfig { } // New returns a new instance of AdmissionServer from the given config. -func (c completedConfig) New() (*PlaceHolderServer, error) { - genericServer, err := c.GenericConfig.New("place-holder-server", genericapiserver.NewEmptyDelegate()) // completion is done in Complete, no need for a second time +func (c completedConfig) New() (*PinnipedServer, error) { + genericServer, err := c.GenericConfig.New("pinniped-server", genericapiserver.NewEmptyDelegate()) // completion is done in Complete, no need for a second time if err != nil { return nil, fmt.Errorf("completion error: %w", err) } - s := &PlaceHolderServer{ + s := &PinnipedServer{ GenericAPIServer: genericServer, } - gvr := placeholderv1alpha1.SchemeGroupVersion.WithResource("credentialrequests") + gvr := pinnipedv1alpha1.SchemeGroupVersion.WithResource("credentialrequests") apiGroupInfo := genericapiserver.APIGroupInfo{ PrioritizedVersions: []schema.GroupVersion{gvr.GroupVersion()}, diff --git a/internal/certauthority/kubecertauthority/kubecertauthority.go b/internal/certauthority/kubecertauthority/kubecertauthority.go index 8c91ac21c..3840e748b 100644 --- a/internal/certauthority/kubecertauthority/kubecertauthority.go +++ b/internal/certauthority/kubecertauthority/kubecertauthority.go @@ -24,8 +24,8 @@ import ( "k8s.io/client-go/tools/remotecommand" "k8s.io/klog/v2" - "github.com/suzerain-io/placeholder-name/internal/certauthority" - "github.com/suzerain-io/placeholder-name/internal/constable" + "github.com/suzerain-io/pinniped/internal/certauthority" + "github.com/suzerain-io/pinniped/internal/constable" ) // ErrNoKubeControllerManagerPod is returned when no kube-controller-manager pod is found on the cluster. diff --git a/internal/certauthority/kubecertauthority/kubecertauthority_test.go b/internal/certauthority/kubecertauthority/kubecertauthority_test.go index 99c390558..51276e92d 100644 --- a/internal/certauthority/kubecertauthority/kubecertauthority_test.go +++ b/internal/certauthority/kubecertauthority/kubecertauthority_test.go @@ -23,7 +23,7 @@ import ( kubernetesfake "k8s.io/client-go/kubernetes/fake" "k8s.io/klog/v2" - "github.com/suzerain-io/placeholder-name/internal/testutil" + "github.com/suzerain-io/pinniped/internal/testutil" ) type fakePodExecutor struct { diff --git a/internal/controller/apicerts/certs_expirer.go b/internal/controller/apicerts/certs_expirer.go index 552b15802..837ed2665 100644 --- a/internal/controller/apicerts/certs_expirer.go +++ b/internal/controller/apicerts/certs_expirer.go @@ -19,8 +19,8 @@ import ( "k8s.io/klog/v2" "github.com/suzerain-io/controller-go" - "github.com/suzerain-io/placeholder-name/internal/constable" - placeholdernamecontroller "github.com/suzerain-io/placeholder-name/internal/controller" + "github.com/suzerain-io/pinniped/internal/constable" + pinnipedcontroller "github.com/suzerain-io/pinniped/internal/controller" ) type certsExpirerController struct { @@ -44,7 +44,7 @@ func NewCertsExpirerController( namespace string, k8sClient kubernetes.Interface, secretInformer corev1informers.SecretInformer, - withInformer placeholdernamecontroller.WithInformerOptionFunc, + withInformer pinnipedcontroller.WithInformerOptionFunc, ageThreshold float32, ) controller.Controller { return controller.New( @@ -59,7 +59,7 @@ func NewCertsExpirerController( }, withInformer( secretInformer, - placeholdernamecontroller.NameAndNamespaceExactMatchFilterFactory(certsSecretName, namespace), + pinnipedcontroller.NameAndNamespaceExactMatchFilterFactory(certsSecretName, namespace), controller.InformerOption{}, ), ) diff --git a/internal/controller/apicerts/certs_expirer_test.go b/internal/controller/apicerts/certs_expirer_test.go index cdafb2bc6..5ce69cbeb 100644 --- a/internal/controller/apicerts/certs_expirer_test.go +++ b/internal/controller/apicerts/certs_expirer_test.go @@ -24,7 +24,7 @@ import ( kubetesting "k8s.io/client-go/testing" "github.com/suzerain-io/controller-go" - "github.com/suzerain-io/placeholder-name/internal/testutil" + "github.com/suzerain-io/pinniped/internal/testutil" ) func TestExpirerControllerFilters(t *testing.T) { diff --git a/internal/controller/apicerts/certs_manager.go b/internal/controller/apicerts/certs_manager.go index b817152ff..e204dfa3b 100644 --- a/internal/controller/apicerts/certs_manager.go +++ b/internal/controller/apicerts/certs_manager.go @@ -19,8 +19,8 @@ import ( aggregatorclient "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset" "github.com/suzerain-io/controller-go" - "github.com/suzerain-io/placeholder-name/internal/certauthority" - placeholdernamecontroller "github.com/suzerain-io/placeholder-name/internal/controller" + "github.com/suzerain-io/pinniped/internal/certauthority" + pinnipedcontroller "github.com/suzerain-io/pinniped/internal/controller" ) const ( @@ -43,8 +43,8 @@ func NewCertsManagerController( k8sClient kubernetes.Interface, aggregatorClient aggregatorclient.Interface, secretInformer corev1informers.SecretInformer, - withInformer placeholdernamecontroller.WithInformerOptionFunc, - withInitialEvent placeholdernamecontroller.WithInitialEventOptionFunc, + withInformer pinnipedcontroller.WithInformerOptionFunc, + withInitialEvent pinnipedcontroller.WithInitialEventOptionFunc, ) controller.Controller { return controller.New( controller.Config{ @@ -58,7 +58,7 @@ func NewCertsManagerController( }, withInformer( secretInformer, - placeholdernamecontroller.NameAndNamespaceExactMatchFilterFactory(certsSecretName, namespace), + pinnipedcontroller.NameAndNamespaceExactMatchFilterFactory(certsSecretName, namespace), controller.InformerOption{}, ), // Be sure to run once even if the Secret that the informer is watching doesn't exist. @@ -82,13 +82,13 @@ func (c *certsManagerController) Sync(ctx controller.Context) error { } // Create a CA. - aggregatedAPIServerCA, err := certauthority.New(pkix.Name{CommonName: "Placeholder CA"}) + aggregatedAPIServerCA, err := certauthority.New(pkix.Name{CommonName: "Pinniped CA"}) if err != nil { return fmt.Errorf("could not initialize CA: %w", err) } // This string must match the name of the Service declared in the deployment yaml. - const serviceName = "placeholder-name-api" + const serviceName = "pinniped-api" // Using the CA from above, create a TLS server cert for the aggregated API server to use. serviceEndpoint := serviceName + "." + c.namespace + ".svc" diff --git a/internal/controller/apicerts/certs_manager_test.go b/internal/controller/apicerts/certs_manager_test.go index decdc0b9f..b7ba0cac7 100644 --- a/internal/controller/apicerts/certs_manager_test.go +++ b/internal/controller/apicerts/certs_manager_test.go @@ -25,8 +25,8 @@ import ( aggregatorfake "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/fake" "github.com/suzerain-io/controller-go" - "github.com/suzerain-io/placeholder-name/internal/testutil" - placeholderv1alpha1 "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/placeholder/v1alpha1" + "github.com/suzerain-io/pinniped/internal/testutil" + pinnipedv1alpha1 "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1" ) func TestManagerControllerOptions(t *testing.T) { @@ -187,7 +187,7 @@ func TestManagerControllerSync(t *testing.T) { it.Before(func() { apiService := &apiregistrationv1.APIService{ ObjectMeta: metav1.ObjectMeta{ - Name: placeholderv1alpha1.SchemeGroupVersion.Version + "." + placeholderv1alpha1.GroupName, + Name: pinnipedv1alpha1.SchemeGroupVersion.Version + "." + pinnipedv1alpha1.GroupName, }, Spec: apiregistrationv1.APIServiceSpec{ CABundle: nil, @@ -220,14 +220,14 @@ func TestManagerControllerSync(t *testing.T) { // Validate the created cert using the CA, and also validate the cert's hostname validCert := testutil.ValidateCertificate(t, actualCACert, actualCertChain) - validCert.RequireDNSName("placeholder-name-api." + installedInNamespace + ".svc") + validCert.RequireDNSName("pinniped-api." + installedInNamespace + ".svc") validCert.RequireLifetime(time.Now(), time.Now().Add(24*365*time.Hour), 2*time.Minute) validCert.RequireMatchesPrivateKey(actualPrivateKey) // Make sure we updated the APIService caBundle and left it otherwise unchanged r.Len(aggregatorAPIClient.Actions(), 2) r.Equal("get", aggregatorAPIClient.Actions()[0].GetVerb()) - expectedAPIServiceName := placeholderv1alpha1.SchemeGroupVersion.Version + "." + placeholderv1alpha1.GroupName + expectedAPIServiceName := pinnipedv1alpha1.SchemeGroupVersion.Version + "." + pinnipedv1alpha1.GroupName expectedUpdateAction := coretesting.NewUpdateAction( schema.GroupVersionResource{ Group: apiregistrationv1.GroupName, diff --git a/internal/controller/apicerts/certs_observer.go b/internal/controller/apicerts/certs_observer.go index b574ef064..41f98e39e 100644 --- a/internal/controller/apicerts/certs_observer.go +++ b/internal/controller/apicerts/certs_observer.go @@ -13,8 +13,8 @@ import ( "k8s.io/klog/v2" "github.com/suzerain-io/controller-go" - placeholdernamecontroller "github.com/suzerain-io/placeholder-name/internal/controller" - "github.com/suzerain-io/placeholder-name/internal/provider" + pinnipedcontroller "github.com/suzerain-io/pinniped/internal/controller" + "github.com/suzerain-io/pinniped/internal/provider" ) type certsObserverController struct { @@ -27,7 +27,7 @@ func NewCertsObserverController( namespace string, dynamicCertProvider provider.DynamicTLSServingCertProvider, secretInformer corev1informers.SecretInformer, - withInformer placeholdernamecontroller.WithInformerOptionFunc, + withInformer pinnipedcontroller.WithInformerOptionFunc, ) controller.Controller { return controller.New( controller.Config{ @@ -40,7 +40,7 @@ func NewCertsObserverController( }, withInformer( secretInformer, - placeholdernamecontroller.NameAndNamespaceExactMatchFilterFactory(certsSecretName, namespace), + pinnipedcontroller.NameAndNamespaceExactMatchFilterFactory(certsSecretName, namespace), controller.InformerOption{}, ), ) diff --git a/internal/controller/apicerts/certs_observer_test.go b/internal/controller/apicerts/certs_observer_test.go index c979830b7..46b0663e9 100644 --- a/internal/controller/apicerts/certs_observer_test.go +++ b/internal/controller/apicerts/certs_observer_test.go @@ -19,8 +19,8 @@ import ( kubernetesfake "k8s.io/client-go/kubernetes/fake" "github.com/suzerain-io/controller-go" - "github.com/suzerain-io/placeholder-name/internal/provider" - "github.com/suzerain-io/placeholder-name/internal/testutil" + "github.com/suzerain-io/pinniped/internal/provider" + "github.com/suzerain-io/pinniped/internal/testutil" ) func TestObserverControllerInformerFilters(t *testing.T) { diff --git a/internal/controller/apicerts/update_api_service.go b/internal/controller/apicerts/update_api_service.go index 63ceaf901..86e0562ca 100644 --- a/internal/controller/apicerts/update_api_service.go +++ b/internal/controller/apicerts/update_api_service.go @@ -13,13 +13,13 @@ import ( "k8s.io/client-go/util/retry" aggregatorclient "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset" - placeholderv1alpha1 "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/placeholder/v1alpha1" + pinnipedv1alpha1 "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1" ) // UpdateAPIService updates the APIService's CA bundle. func UpdateAPIService(ctx context.Context, aggregatorClient aggregatorclient.Interface, aggregatedAPIServerCA []byte) error { apiServices := aggregatorClient.ApiregistrationV1().APIServices() - apiServiceName := placeholderv1alpha1.SchemeGroupVersion.Version + "." + placeholderv1alpha1.GroupName + apiServiceName := pinnipedv1alpha1.SchemeGroupVersion.Version + "." + pinnipedv1alpha1.GroupName if err := retry.RetryOnConflict(retry.DefaultRetry, func() error { // Retrieve the latest version of the Service before attempting update. diff --git a/internal/controller/apicerts/update_api_service_test.go b/internal/controller/apicerts/update_api_service_test.go index 962d8a957..a615a6a8d 100644 --- a/internal/controller/apicerts/update_api_service_test.go +++ b/internal/controller/apicerts/update_api_service_test.go @@ -21,7 +21,7 @@ import ( ) func TestUpdateAPIService(t *testing.T) { - const apiServiceName = "v1alpha1.placeholder.suzerain-io.github.io" + const apiServiceName = "v1alpha1.pinniped.dev" tests := []struct { name string diff --git a/internal/controller/discovery/doc.go b/internal/controller/discovery/doc.go new file mode 100644 index 000000000..2d0603e19 --- /dev/null +++ b/internal/controller/discovery/doc.go @@ -0,0 +1,7 @@ +/* +Copyright 2020 VMware, Inc. +SPDX-License-Identifier: Apache-2.0 +*/ + +// Package discovery contains controller(s) for reconciling PinnipedDiscoveryInfo's. +package discovery diff --git a/internal/controller/discovery/publisher.go b/internal/controller/discovery/publisher.go new file mode 100644 index 000000000..37a10f561 --- /dev/null +++ b/internal/controller/discovery/publisher.go @@ -0,0 +1,174 @@ +/* +Copyright 2020 VMware, Inc. +SPDX-License-Identifier: Apache-2.0 +*/ + +package discovery + +import ( + "context" + "encoding/base64" + "fmt" + + k8serrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1informers "k8s.io/client-go/informers/core/v1" + "k8s.io/client-go/tools/clientcmd" + "k8s.io/klog/v2" + + "github.com/suzerain-io/controller-go" + pinnipedcontroller "github.com/suzerain-io/pinniped/internal/controller" + crdpinnipedv1alpha1 "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/crdpinniped/v1alpha1" + pinnipedclientset "github.com/suzerain-io/pinniped/kubernetes/1.19/client-go/clientset/versioned" + crdpinnipedv1alpha1informers "github.com/suzerain-io/pinniped/kubernetes/1.19/client-go/informers/externalversions/crdpinniped/v1alpha1" +) + +const ( + ClusterInfoNamespace = "kube-public" + + clusterInfoName = "cluster-info" + clusterInfoConfigMapKey = "kubeconfig" + + configName = "pinniped-config" +) + +type publisherController struct { + namespace string + serverOverride *string + pinnipedClient pinnipedclientset.Interface + configMapInformer corev1informers.ConfigMapInformer + pinnipedDiscoveryInfoInformer crdpinnipedv1alpha1informers.PinnipedDiscoveryInfoInformer +} + +func NewPublisherController( + namespace string, + serverOverride *string, + pinnipedClient pinnipedclientset.Interface, + configMapInformer corev1informers.ConfigMapInformer, + pinnipedDiscoveryInfoInformer crdpinnipedv1alpha1informers.PinnipedDiscoveryInfoInformer, + withInformer pinnipedcontroller.WithInformerOptionFunc, +) controller.Controller { + return controller.New( + controller.Config{ + Name: "publisher-controller", + Syncer: &publisherController{ + namespace: namespace, + serverOverride: serverOverride, + pinnipedClient: pinnipedClient, + configMapInformer: configMapInformer, + pinnipedDiscoveryInfoInformer: pinnipedDiscoveryInfoInformer, + }, + }, + withInformer( + configMapInformer, + pinnipedcontroller.NameAndNamespaceExactMatchFilterFactory(clusterInfoName, ClusterInfoNamespace), + controller.InformerOption{}, + ), + withInformer( + pinnipedDiscoveryInfoInformer, + pinnipedcontroller.NameAndNamespaceExactMatchFilterFactory(configName, namespace), + controller.InformerOption{}, + ), + ) +} + +func (c *publisherController) Sync(ctx controller.Context) error { + configMap, err := c.configMapInformer. + Lister(). + ConfigMaps(ClusterInfoNamespace). + Get(clusterInfoName) + notFound := k8serrors.IsNotFound(err) + if err != nil && !notFound { + return fmt.Errorf("failed to get %s configmap: %w", clusterInfoName, err) + } + if notFound { + klog.InfoS( + "could not find config map", + "configmap", + klog.KRef(ClusterInfoNamespace, clusterInfoName), + ) + return nil + } + + kubeConfig, kubeConfigPresent := configMap.Data[clusterInfoConfigMapKey] + if !kubeConfigPresent { + klog.InfoS("could not find kubeconfig configmap key") + return nil + } + + config, _ := clientcmd.Load([]byte(kubeConfig)) + + var certificateAuthorityData, server string + for _, v := range config.Clusters { + certificateAuthorityData = base64.StdEncoding.EncodeToString(v.CertificateAuthorityData) + server = v.Server + break + } + + if c.serverOverride != nil { + server = *c.serverOverride + } + + discoveryInfo := crdpinnipedv1alpha1.PinnipedDiscoveryInfo{ + TypeMeta: metav1.TypeMeta{}, + ObjectMeta: metav1.ObjectMeta{ + Name: configName, + Namespace: c.namespace, + }, + Spec: crdpinnipedv1alpha1.PinnipedDiscoveryInfoSpec{ + Server: server, + CertificateAuthorityData: certificateAuthorityData, + }, + } + if err := c.createOrUpdatePinnipedDiscoveryInfo(ctx.Context, &discoveryInfo); err != nil { + return err + } + + return nil +} + +func (c *publisherController) createOrUpdatePinnipedDiscoveryInfo( + ctx context.Context, + discoveryInfo *crdpinnipedv1alpha1.PinnipedDiscoveryInfo, +) error { + existingDiscoveryInfo, err := c.pinnipedDiscoveryInfoInformer. + Lister(). + PinnipedDiscoveryInfos(c.namespace). + Get(discoveryInfo.Name) + notFound := k8serrors.IsNotFound(err) + if err != nil && !notFound { + return fmt.Errorf("could not get pinnipeddiscoveryinfo: %w", err) + } + + pinnipedDiscoveryInfos := c.pinnipedClient. + CrdV1alpha1(). + PinnipedDiscoveryInfos(c.namespace) + if notFound { + if _, err := pinnipedDiscoveryInfos.Create( + ctx, + discoveryInfo, + metav1.CreateOptions{}, + ); err != nil { + return fmt.Errorf("could not create pinnipeddiscoveryinfo: %w", err) + } + } else if !equal(existingDiscoveryInfo, discoveryInfo) { + // Update just the fields we care about. + existingDiscoveryInfo.Spec.Server = discoveryInfo.Spec.Server + existingDiscoveryInfo.Spec.CertificateAuthorityData = discoveryInfo.Spec.CertificateAuthorityData + + if _, err := pinnipedDiscoveryInfos.Update( + ctx, + existingDiscoveryInfo, + metav1.UpdateOptions{}, + ); err != nil { + return fmt.Errorf("could not update pinnipeddiscoveryinfo: %w", err) + } + } + + return nil +} + +func equal(a, b *crdpinnipedv1alpha1.PinnipedDiscoveryInfo) bool { + return a.Spec.Server == b.Spec.Server && + a.Spec.CertificateAuthorityData == b.Spec.CertificateAuthorityData +} diff --git a/internal/controller/logindiscovery/publisher_test.go b/internal/controller/discovery/publisher_test.go similarity index 68% rename from internal/controller/logindiscovery/publisher_test.go rename to internal/controller/discovery/publisher_test.go index 0672cfadc..b8be2ef34 100644 --- a/internal/controller/logindiscovery/publisher_test.go +++ b/internal/controller/discovery/publisher_test.go @@ -3,7 +3,7 @@ Copyright 2020 VMware, Inc. SPDX-License-Identifier: Apache-2.0 */ -package logindiscovery +package discovery import ( "context" @@ -24,10 +24,10 @@ import ( coretesting "k8s.io/client-go/testing" "github.com/suzerain-io/controller-go" - "github.com/suzerain-io/placeholder-name/internal/testutil" - crdsplaceholderv1alpha1 "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/crdsplaceholder/v1alpha1" - placeholderfake "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/clientset/versioned/fake" - placeholderinformers "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/informers/externalversions" + "github.com/suzerain-io/pinniped/internal/testutil" + crdpinnipedv1alpha1 "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/crdpinniped/v1alpha1" + pinnipedfake "github.com/suzerain-io/pinniped/kubernetes/1.19/client-go/clientset/versioned/fake" + pinnipedinformers "github.com/suzerain-io/pinniped/kubernetes/1.19/client-go/informers/externalversions" ) func TestInformerFilters(t *testing.T) { @@ -37,23 +37,23 @@ func TestInformerFilters(t *testing.T) { var r *require.Assertions var observableWithInformerOption *testutil.ObservableWithInformerOption var configMapInformerFilter controller.Filter - var loginDiscoveryConfigInformerFilter controller.Filter + var pinnipedDiscoveryInfoInformerFilter controller.Filter it.Before(func() { r = require.New(t) observableWithInformerOption = testutil.NewObservableWithInformerOption() configMapInformer := kubeinformers.NewSharedInformerFactory(nil, 0).Core().V1().ConfigMaps() - loginDiscoveryConfigInformer := placeholderinformers.NewSharedInformerFactory(nil, 0).Crds().V1alpha1().LoginDiscoveryConfigs() + pinnipedDiscoveryInfoInformer := pinnipedinformers.NewSharedInformerFactory(nil, 0).Crd().V1alpha1().PinnipedDiscoveryInfos() _ = NewPublisherController( installedInNamespace, nil, nil, configMapInformer, - loginDiscoveryConfigInformer, + pinnipedDiscoveryInfoInformer, observableWithInformerOption.WithInformer, // make it possible to observe the behavior of the Filters ) configMapInformerFilter = observableWithInformerOption.GetFilterForInformer(configMapInformer) - loginDiscoveryConfigInformerFilter = observableWithInformerOption.GetFilterForInformer(loginDiscoveryConfigInformer) + pinnipedDiscoveryInfoInformerFilter = observableWithInformerOption.GetFilterForInformer(pinnipedDiscoveryInfoInformer) }) when("watching ConfigMap objects", func() { @@ -104,27 +104,27 @@ func TestInformerFilters(t *testing.T) { }) }) - when("watching LoginDiscoveryConfig objects", func() { + when("watching PinnipedDiscoveryInfo objects", func() { var subject controller.Filter - var target, wrongNamespace, wrongName, unrelated *crdsplaceholderv1alpha1.LoginDiscoveryConfig + var target, wrongNamespace, wrongName, unrelated *crdpinnipedv1alpha1.PinnipedDiscoveryInfo it.Before(func() { - subject = loginDiscoveryConfigInformerFilter - target = &crdsplaceholderv1alpha1.LoginDiscoveryConfig{ - ObjectMeta: metav1.ObjectMeta{Name: "placeholder-name-config", Namespace: installedInNamespace}, + subject = pinnipedDiscoveryInfoInformerFilter + target = &crdpinnipedv1alpha1.PinnipedDiscoveryInfo{ + ObjectMeta: metav1.ObjectMeta{Name: "pinniped-config", Namespace: installedInNamespace}, } - wrongNamespace = &crdsplaceholderv1alpha1.LoginDiscoveryConfig{ - ObjectMeta: metav1.ObjectMeta{Name: "placeholder-name-config", Namespace: "wrong-namespace"}, + wrongNamespace = &crdpinnipedv1alpha1.PinnipedDiscoveryInfo{ + ObjectMeta: metav1.ObjectMeta{Name: "pinniped-config", Namespace: "wrong-namespace"}, } - wrongName = &crdsplaceholderv1alpha1.LoginDiscoveryConfig{ + wrongName = &crdpinnipedv1alpha1.PinnipedDiscoveryInfo{ ObjectMeta: metav1.ObjectMeta{Name: "wrong-name", Namespace: installedInNamespace}, } - unrelated = &crdsplaceholderv1alpha1.LoginDiscoveryConfig{ + unrelated = &crdpinnipedv1alpha1.PinnipedDiscoveryInfo{ ObjectMeta: metav1.ObjectMeta{Name: "wrong-name", Namespace: "wrong-namespace"}, } }) - when("the target LoginDiscoveryConfig changes", func() { + when("the target PinnipedDiscoveryInfo changes", func() { it("returns true to trigger the sync method", func() { r.True(subject.Add(target)) r.True(subject.Update(target, unrelated)) @@ -133,7 +133,7 @@ func TestInformerFilters(t *testing.T) { }) }) - when("a LoginDiscoveryConfig from another namespace changes", func() { + when("a PinnipedDiscoveryInfo from another namespace changes", func() { it("returns false to avoid triggering the sync method", func() { r.False(subject.Add(wrongNamespace)) r.False(subject.Update(wrongNamespace, unrelated)) @@ -142,7 +142,7 @@ func TestInformerFilters(t *testing.T) { }) }) - when("a LoginDiscoveryConfig with a different name changes", func() { + when("a PinnipedDiscoveryInfo with a different name changes", func() { it("returns false to avoid triggering the sync method", func() { r.False(subject.Add(wrongName)) r.False(subject.Update(wrongName, unrelated)) @@ -151,7 +151,7 @@ func TestInformerFilters(t *testing.T) { }) }) - when("a LoginDiscoveryConfig with a different name and a different namespace changes", func() { + when("a PinnipedDiscoveryInfo with a different name and a different namespace changes", func() { it("returns false to avoid triggering the sync method", func() { r.False(subject.Add(unrelated)) r.False(subject.Update(unrelated, unrelated)) @@ -171,31 +171,31 @@ func TestSync(t *testing.T) { var subject controller.Controller var serverOverride *string var kubeInformerClient *kubernetesfake.Clientset - var placeholderInformerClient *placeholderfake.Clientset + var pinnipedInformerClient *pinnipedfake.Clientset var kubeInformers kubeinformers.SharedInformerFactory - var placeholderInformers placeholderinformers.SharedInformerFactory - var placeholderAPIClient *placeholderfake.Clientset + var pinnipedInformers pinnipedinformers.SharedInformerFactory + var pinnipedAPIClient *pinnipedfake.Clientset var timeoutContext context.Context var timeoutContextCancel context.CancelFunc var syncContext *controller.Context - var expectedLoginDiscoveryConfig = func(expectedNamespace, expectedServerURL, expectedCAData string) (schema.GroupVersionResource, *crdsplaceholderv1alpha1.LoginDiscoveryConfig) { - expectedLoginDiscoveryConfigGVR := schema.GroupVersionResource{ - Group: crdsplaceholderv1alpha1.GroupName, + var expectedPinnipedDiscoveryInfo = func(expectedNamespace, expectedServerURL, expectedCAData string) (schema.GroupVersionResource, *crdpinnipedv1alpha1.PinnipedDiscoveryInfo) { + expectedPinnipedDiscoveryInfoGVR := schema.GroupVersionResource{ + Group: crdpinnipedv1alpha1.GroupName, Version: "v1alpha1", - Resource: "logindiscoveryconfigs", + Resource: "pinnipeddiscoveryinfos", } - expectedLoginDiscoveryConfig := &crdsplaceholderv1alpha1.LoginDiscoveryConfig{ + expectedPinnipedDiscoveryInfo := &crdpinnipedv1alpha1.PinnipedDiscoveryInfo{ ObjectMeta: metav1.ObjectMeta{ - Name: "placeholder-name-config", + Name: "pinniped-config", Namespace: expectedNamespace, }, - Spec: crdsplaceholderv1alpha1.LoginDiscoveryConfigSpec{ + Spec: crdpinnipedv1alpha1.PinnipedDiscoveryInfoSpec{ Server: expectedServerURL, CertificateAuthorityData: expectedCAData, }, } - return expectedLoginDiscoveryConfigGVR, expectedLoginDiscoveryConfig + return expectedPinnipedDiscoveryInfoGVR, expectedPinnipedDiscoveryInfo } // Defer starting the informers until the last possible moment so that the @@ -205,9 +205,9 @@ func TestSync(t *testing.T) { subject = NewPublisherController( installedInNamespace, serverOverride, - placeholderAPIClient, + pinnipedAPIClient, kubeInformers.Core().V1().ConfigMaps(), - placeholderInformers.Crds().V1alpha1().LoginDiscoveryConfigs(), + pinnipedInformers.Crd().V1alpha1().PinnipedDiscoveryInfos(), controller.WithInformer, ) @@ -223,7 +223,7 @@ func TestSync(t *testing.T) { // Must start informers before calling TestRunSynchronously() kubeInformers.Start(timeoutContext.Done()) - placeholderInformers.Start(timeoutContext.Done()) + pinnipedInformers.Start(timeoutContext.Done()) controller.TestRunSynchronously(t, subject) } @@ -234,9 +234,9 @@ func TestSync(t *testing.T) { kubeInformerClient = kubernetesfake.NewSimpleClientset() kubeInformers = kubeinformers.NewSharedInformerFactory(kubeInformerClient, 0) - placeholderAPIClient = placeholderfake.NewSimpleClientset() - placeholderInformerClient = placeholderfake.NewSimpleClientset() - placeholderInformers = placeholderinformers.NewSharedInformerFactory(placeholderInformerClient, 0) + pinnipedAPIClient = pinnipedfake.NewSimpleClientset() + pinnipedInformerClient = pinnipedfake.NewSimpleClientset() + pinnipedInformers = pinnipedinformers.NewSharedInformerFactory(pinnipedInformerClient, 0) }) it.After(func() { @@ -268,13 +268,13 @@ func TestSync(t *testing.T) { r.NoError(err) }) - when("the LoginDiscoveryConfig does not already exist", func() { - it("creates a LoginDiscoveryConfig", func() { + when("the PinnipedDiscoveryInfo does not already exist", func() { + it("creates a PinnipedDiscoveryInfo", func() { startInformersAndController() err := controller.TestSync(t, subject, *syncContext) r.NoError(err) - expectedLoginDiscoveryConfigGVR, expectedLoginDiscoveryConfig := expectedLoginDiscoveryConfig( + expectedPinnipedDiscoveryInfoGVR, expectedPinnipedDiscoveryInfo := expectedPinnipedDiscoveryInfo( installedInNamespace, kubeServerURL, caData, @@ -283,20 +283,20 @@ func TestSync(t *testing.T) { r.Equal( []coretesting.Action{ coretesting.NewCreateAction( - expectedLoginDiscoveryConfigGVR, + expectedPinnipedDiscoveryInfoGVR, installedInNamespace, - expectedLoginDiscoveryConfig, + expectedPinnipedDiscoveryInfo, ), }, - placeholderAPIClient.Actions(), + pinnipedAPIClient.Actions(), ) }) - when("creating the LoginDiscoveryConfig fails", func() { + when("creating the PinnipedDiscoveryInfo fails", func() { it.Before(func() { - placeholderAPIClient.PrependReactor( + pinnipedAPIClient.PrependReactor( "create", - "logindiscoveryconfigs", + "pinnipeddiscoveryinfos", func(_ coretesting.Action) (bool, runtime.Object, error) { return true, nil, errors.New("create failed") }, @@ -306,7 +306,7 @@ func TestSync(t *testing.T) { it("returns the create error", func() { startInformersAndController() err := controller.TestSync(t, subject, *syncContext) - r.EqualError(err, "could not create logindiscoveryconfig: create failed") + r.EqualError(err, "could not create pinnipeddiscoveryinfo: create failed") }) }) @@ -319,85 +319,85 @@ func TestSync(t *testing.T) { err := controller.TestSync(t, subject, *syncContext) r.NoError(err) - expectedLoginDiscoveryConfigGVR, expectedLoginDiscoveryConfig := expectedLoginDiscoveryConfig( + expectedPinnipedDiscoveryInfoGVR, expectedPinnipedDiscoveryInfo := expectedPinnipedDiscoveryInfo( installedInNamespace, kubeServerURL, caData, ) - expectedLoginDiscoveryConfig.Spec.Server = "https://some-server-override" + expectedPinnipedDiscoveryInfo.Spec.Server = "https://some-server-override" r.Equal( []coretesting.Action{ coretesting.NewCreateAction( - expectedLoginDiscoveryConfigGVR, + expectedPinnipedDiscoveryInfoGVR, installedInNamespace, - expectedLoginDiscoveryConfig, + expectedPinnipedDiscoveryInfo, ), }, - placeholderAPIClient.Actions(), + pinnipedAPIClient.Actions(), ) }) }) }) - when("the LoginDiscoveryConfig already exists", func() { - when("the LoginDiscoveryConfig is already up to date according to the data in the ConfigMap", func() { + when("the PinnipedDiscoveryInfo already exists", func() { + when("the PinnipedDiscoveryInfo is already up to date according to the data in the ConfigMap", func() { it.Before(func() { - _, expectedLoginDiscoveryConfig := expectedLoginDiscoveryConfig( + _, expectedPinnipedDiscoveryInfo := expectedPinnipedDiscoveryInfo( installedInNamespace, kubeServerURL, caData, ) - err := placeholderInformerClient.Tracker().Add(expectedLoginDiscoveryConfig) + err := pinnipedInformerClient.Tracker().Add(expectedPinnipedDiscoveryInfo) r.NoError(err) }) - it("does not update the LoginDiscoveryConfig to avoid unnecessary etcd writes/api calls", func() { + it("does not update the PinnipedDiscoveryInfo to avoid unnecessary etcd writes/api calls", func() { startInformersAndController() err := controller.TestSync(t, subject, *syncContext) r.NoError(err) - r.Empty(placeholderAPIClient.Actions()) + r.Empty(pinnipedAPIClient.Actions()) }) }) - when("the LoginDiscoveryConfig is stale compared to the data in the ConfigMap", func() { + when("the PinnipedDiscoveryInfo is stale compared to the data in the ConfigMap", func() { it.Before(func() { - _, expectedLoginDiscoveryConfig := expectedLoginDiscoveryConfig( + _, expectedPinnipedDiscoveryInfo := expectedPinnipedDiscoveryInfo( installedInNamespace, kubeServerURL, caData, ) - expectedLoginDiscoveryConfig.Spec.Server = "https://some-other-server" - r.NoError(placeholderInformerClient.Tracker().Add(expectedLoginDiscoveryConfig)) - r.NoError(placeholderAPIClient.Tracker().Add(expectedLoginDiscoveryConfig)) + expectedPinnipedDiscoveryInfo.Spec.Server = "https://some-other-server" + r.NoError(pinnipedInformerClient.Tracker().Add(expectedPinnipedDiscoveryInfo)) + r.NoError(pinnipedAPIClient.Tracker().Add(expectedPinnipedDiscoveryInfo)) }) - it("updates the existing LoginDiscoveryConfig", func() { + it("updates the existing PinnipedDiscoveryInfo", func() { startInformersAndController() err := controller.TestSync(t, subject, *syncContext) r.NoError(err) - expectedLoginDiscoveryConfigGVR, expectedLoginDiscoveryConfig := expectedLoginDiscoveryConfig( + expectedPinnipedDiscoveryInfoGVR, expectedPinnipedDiscoveryInfo := expectedPinnipedDiscoveryInfo( installedInNamespace, kubeServerURL, caData, ) expectedActions := []coretesting.Action{ coretesting.NewUpdateAction( - expectedLoginDiscoveryConfigGVR, + expectedPinnipedDiscoveryInfoGVR, installedInNamespace, - expectedLoginDiscoveryConfig, + expectedPinnipedDiscoveryInfo, ), } - r.Equal(expectedActions, placeholderAPIClient.Actions()) + r.Equal(expectedActions, pinnipedAPIClient.Actions()) }) - when("updating the LoginDiscoveryConfig fails", func() { + when("updating the PinnipedDiscoveryInfo fails", func() { it.Before(func() { - placeholderAPIClient.PrependReactor( + pinnipedAPIClient.PrependReactor( "update", - "logindiscoveryconfigs", + "pinnipeddiscoveryinfos", func(_ coretesting.Action) (bool, runtime.Object, error) { return true, nil, errors.New("update failed") }, @@ -407,7 +407,7 @@ func TestSync(t *testing.T) { it("returns the update error", func() { startInformersAndController() err := controller.TestSync(t, subject, *syncContext) - r.EqualError(err, "could not update logindiscoveryconfig: update failed") + r.EqualError(err, "could not update pinnipeddiscoveryinfo: update failed") }) }) }) @@ -430,7 +430,7 @@ func TestSync(t *testing.T) { startInformersAndController() err := controller.TestSync(t, subject, *syncContext) r.NoError(err) - r.Empty(placeholderAPIClient.Actions()) + r.Empty(pinnipedAPIClient.Actions()) }) }) }) @@ -451,7 +451,7 @@ func TestSync(t *testing.T) { startInformersAndController() err := controller.TestSync(t, subject, *syncContext) r.NoError(err) - r.Empty(placeholderAPIClient.Actions()) + r.Empty(pinnipedAPIClient.Actions()) }) }) }, spec.Parallel(), spec.Report(report.Terminal{})) diff --git a/internal/controller/logindiscovery/doc.go b/internal/controller/logindiscovery/doc.go deleted file mode 100644 index 513f8a1ef..000000000 --- a/internal/controller/logindiscovery/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -/* -Copyright 2020 VMware, Inc. -SPDX-License-Identifier: Apache-2.0 -*/ - -// Package logindiscovery contains controller(s) for reconciling LoginDiscoveryConfig's. -package logindiscovery diff --git a/internal/controller/logindiscovery/publisher.go b/internal/controller/logindiscovery/publisher.go deleted file mode 100644 index 54026c44f..000000000 --- a/internal/controller/logindiscovery/publisher.go +++ /dev/null @@ -1,174 +0,0 @@ -/* -Copyright 2020 VMware, Inc. -SPDX-License-Identifier: Apache-2.0 -*/ - -package logindiscovery - -import ( - "context" - "encoding/base64" - "fmt" - - k8serrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - corev1informers "k8s.io/client-go/informers/core/v1" - "k8s.io/client-go/tools/clientcmd" - "k8s.io/klog/v2" - - "github.com/suzerain-io/controller-go" - placeholdernamecontroller "github.com/suzerain-io/placeholder-name/internal/controller" - crdsplaceholderv1alpha1 "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/crdsplaceholder/v1alpha1" - placeholderclientset "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/clientset/versioned" - crdsplaceholderv1alpha1informers "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/informers/externalversions/crdsplaceholder/v1alpha1" -) - -const ( - ClusterInfoNamespace = "kube-public" - - clusterInfoName = "cluster-info" - clusterInfoConfigMapKey = "kubeconfig" - - configName = "placeholder-name-config" -) - -type publisherController struct { - namespace string - serverOverride *string - placeholderClient placeholderclientset.Interface - configMapInformer corev1informers.ConfigMapInformer - loginDiscoveryConfigInformer crdsplaceholderv1alpha1informers.LoginDiscoveryConfigInformer -} - -func NewPublisherController( - namespace string, - serverOverride *string, - placeholderClient placeholderclientset.Interface, - configMapInformer corev1informers.ConfigMapInformer, - loginDiscoveryConfigInformer crdsplaceholderv1alpha1informers.LoginDiscoveryConfigInformer, - withInformer placeholdernamecontroller.WithInformerOptionFunc, -) controller.Controller { - return controller.New( - controller.Config{ - Name: "publisher-controller", - Syncer: &publisherController{ - namespace: namespace, - serverOverride: serverOverride, - placeholderClient: placeholderClient, - configMapInformer: configMapInformer, - loginDiscoveryConfigInformer: loginDiscoveryConfigInformer, - }, - }, - withInformer( - configMapInformer, - placeholdernamecontroller.NameAndNamespaceExactMatchFilterFactory(clusterInfoName, ClusterInfoNamespace), - controller.InformerOption{}, - ), - withInformer( - loginDiscoveryConfigInformer, - placeholdernamecontroller.NameAndNamespaceExactMatchFilterFactory(configName, namespace), - controller.InformerOption{}, - ), - ) -} - -func (c *publisherController) Sync(ctx controller.Context) error { - configMap, err := c.configMapInformer. - Lister(). - ConfigMaps(ClusterInfoNamespace). - Get(clusterInfoName) - notFound := k8serrors.IsNotFound(err) - if err != nil && !notFound { - return fmt.Errorf("failed to get %s configmap: %w", clusterInfoName, err) - } - if notFound { - klog.InfoS( - "could not find config map", - "configmap", - klog.KRef(ClusterInfoNamespace, clusterInfoName), - ) - return nil - } - - kubeConfig, kubeConfigPresent := configMap.Data[clusterInfoConfigMapKey] - if !kubeConfigPresent { - klog.InfoS("could not find kubeconfig configmap key") - return nil - } - - config, _ := clientcmd.Load([]byte(kubeConfig)) - - var certificateAuthorityData, server string - for _, v := range config.Clusters { - certificateAuthorityData = base64.StdEncoding.EncodeToString(v.CertificateAuthorityData) - server = v.Server - break - } - - if c.serverOverride != nil { - server = *c.serverOverride - } - - discoveryConfig := crdsplaceholderv1alpha1.LoginDiscoveryConfig{ - TypeMeta: metav1.TypeMeta{}, - ObjectMeta: metav1.ObjectMeta{ - Name: configName, - Namespace: c.namespace, - }, - Spec: crdsplaceholderv1alpha1.LoginDiscoveryConfigSpec{ - Server: server, - CertificateAuthorityData: certificateAuthorityData, - }, - } - if err := c.createOrUpdateLoginDiscoveryConfig(ctx.Context, &discoveryConfig); err != nil { - return err - } - - return nil -} - -func (c *publisherController) createOrUpdateLoginDiscoveryConfig( - ctx context.Context, - discoveryConfig *crdsplaceholderv1alpha1.LoginDiscoveryConfig, -) error { - existingDiscoveryConfig, err := c.loginDiscoveryConfigInformer. - Lister(). - LoginDiscoveryConfigs(c.namespace). - Get(discoveryConfig.Name) - notFound := k8serrors.IsNotFound(err) - if err != nil && !notFound { - return fmt.Errorf("could not get logindiscoveryconfig: %w", err) - } - - loginDiscoveryConfigs := c.placeholderClient. - CrdsV1alpha1(). - LoginDiscoveryConfigs(c.namespace) - if notFound { - if _, err := loginDiscoveryConfigs.Create( - ctx, - discoveryConfig, - metav1.CreateOptions{}, - ); err != nil { - return fmt.Errorf("could not create logindiscoveryconfig: %w", err) - } - } else if !equal(existingDiscoveryConfig, discoveryConfig) { - // Update just the fields we care about. - existingDiscoveryConfig.Spec.Server = discoveryConfig.Spec.Server - existingDiscoveryConfig.Spec.CertificateAuthorityData = discoveryConfig.Spec.CertificateAuthorityData - - if _, err := loginDiscoveryConfigs.Update( - ctx, - existingDiscoveryConfig, - metav1.UpdateOptions{}, - ); err != nil { - return fmt.Errorf("could not update logindiscoveryconfig: %w", err) - } - } - - return nil -} - -func equal(a, b *crdsplaceholderv1alpha1.LoginDiscoveryConfig) bool { - return a.Spec.Server == b.Spec.Server && - a.Spec.CertificateAuthorityData == b.Spec.CertificateAuthorityData -} diff --git a/internal/controllermanager/prepare_controllers.go b/internal/controllermanager/prepare_controllers.go index 4dc030c0b..66fee1adc 100644 --- a/internal/controllermanager/prepare_controllers.go +++ b/internal/controllermanager/prepare_controllers.go @@ -17,11 +17,11 @@ import ( aggregatorclient "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset" "github.com/suzerain-io/controller-go" - "github.com/suzerain-io/placeholder-name/internal/controller/apicerts" - "github.com/suzerain-io/placeholder-name/internal/controller/logindiscovery" - "github.com/suzerain-io/placeholder-name/internal/provider" - placeholderclientset "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/clientset/versioned" - placeholderinformers "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/informers/externalversions" + "github.com/suzerain-io/pinniped/internal/controller/apicerts" + "github.com/suzerain-io/pinniped/internal/controller/discovery" + "github.com/suzerain-io/pinniped/internal/provider" + pinnipedclientset "github.com/suzerain-io/pinniped/kubernetes/1.19/client-go/clientset/versioned" + pinnipedinformers "github.com/suzerain-io/pinniped/kubernetes/1.19/client-go/informers/externalversions" ) const ( @@ -37,25 +37,25 @@ func PrepareControllers( servingCertRotationThreshold float32, ) (func(ctx context.Context), error) { // Create k8s clients. - k8sClient, aggregatorClient, placeholderClient, err := createClients() + k8sClient, aggregatorClient, pinnipedClient, err := createClients() if err != nil { return nil, fmt.Errorf("could not create clients for the controllers: %w", err) } // Create informers. Don't forget to make sure they get started in the function returned below. - kubePublicNamespaceK8sInformers, installationNamespaceK8sInformers, installationNamespacePlaceholderInformers := - createInformers(serverInstallationNamespace, k8sClient, placeholderClient) + kubePublicNamespaceK8sInformers, installationNamespaceK8sInformers, installationNamespacePinnipedInformers := + createInformers(serverInstallationNamespace, k8sClient, pinnipedClient) // Create controller manager. controllerManager := controller. NewManager(). WithController( - logindiscovery.NewPublisherController( + discovery.NewPublisherController( serverInstallationNamespace, discoveryURLOverride, - placeholderClient, + pinnipedClient, kubePublicNamespaceK8sInformers.Core().V1().ConfigMaps(), - installationNamespacePlaceholderInformers.Crds().V1alpha1().LoginDiscoveryConfigs(), + installationNamespacePinnipedInformers.Crd().V1alpha1().PinnipedDiscoveryInfos(), controller.WithInformer, ), singletonWorker, @@ -95,7 +95,7 @@ func PrepareControllers( return func(ctx context.Context) { kubePublicNamespaceK8sInformers.Start(ctx.Done()) installationNamespaceK8sInformers.Start(ctx.Done()) - installationNamespacePlaceholderInformers.Start(ctx.Done()) + installationNamespacePinnipedInformers.Start(ctx.Done()) go controllerManager.Start(ctx) }, nil @@ -105,7 +105,7 @@ func PrepareControllers( func createClients() ( k8sClient *kubernetes.Clientset, aggregatorClient *aggregatorclient.Clientset, - placeholderClient *placeholderclientset.Clientset, + pinnipedClient *pinnipedclientset.Clientset, err error, ) { // Load the Kubernetes client configuration. @@ -129,12 +129,12 @@ func createClients() ( return nil, nil, nil, fmt.Errorf("could not initialize Kubernetes client: %w", err) } - // Connect to the placeholder API. + // Connect to the pinniped API. // I think we can't use protobuf encoding here because we are using CRDs // (for which protobuf encoding is not supported). - placeholderClient, err = placeholderclientset.NewForConfig(kubeConfig) + pinnipedClient, err = pinnipedclientset.NewForConfig(kubeConfig) if err != nil { - return nil, nil, nil, fmt.Errorf("could not initialize placeholder client: %w", err) + return nil, nil, nil, fmt.Errorf("could not initialize pinniped client: %w", err) } //nolint: nakedret @@ -145,26 +145,26 @@ func createClients() ( func createInformers( serverInstallationNamespace string, k8sClient *kubernetes.Clientset, - placeholderClient *placeholderclientset.Clientset, + pinnipedClient *pinnipedclientset.Clientset, ) ( kubePublicNamespaceK8sInformers k8sinformers.SharedInformerFactory, installationNamespaceK8sInformers k8sinformers.SharedInformerFactory, - installationNamespacePlaceholderInformers placeholderinformers.SharedInformerFactory, + installationNamespacePinnipedInformers pinnipedinformers.SharedInformerFactory, ) { kubePublicNamespaceK8sInformers = k8sinformers.NewSharedInformerFactoryWithOptions( k8sClient, defaultResyncInterval, - k8sinformers.WithNamespace(logindiscovery.ClusterInfoNamespace), + k8sinformers.WithNamespace(discovery.ClusterInfoNamespace), ) installationNamespaceK8sInformers = k8sinformers.NewSharedInformerFactoryWithOptions( k8sClient, defaultResyncInterval, k8sinformers.WithNamespace(serverInstallationNamespace), ) - installationNamespacePlaceholderInformers = placeholderinformers.NewSharedInformerFactoryWithOptions( - placeholderClient, + installationNamespacePinnipedInformers = pinnipedinformers.NewSharedInformerFactoryWithOptions( + pinnipedClient, defaultResyncInterval, - placeholderinformers.WithNamespace(serverInstallationNamespace), + pinnipedinformers.WithNamespace(serverInstallationNamespace), ) return } diff --git a/internal/mocks/mockcertissuer/generate.go b/internal/mocks/mockcertissuer/generate.go index c21f1b236..e67341737 100644 --- a/internal/mocks/mockcertissuer/generate.go +++ b/internal/mocks/mockcertissuer/generate.go @@ -5,4 +5,4 @@ SPDX-License-Identifier: Apache-2.0 package mockcertissuer -//go:generate go run -v github.com/golang/mock/mockgen -destination=mockcertissuer.go -package=mockcertissuer -copyright_file=../../../hack/header.txt github.com/suzerain-io/placeholder-name/internal/registry/credentialrequest CertIssuer +//go:generate go run -v github.com/golang/mock/mockgen -destination=mockcertissuer.go -package=mockcertissuer -copyright_file=../../../hack/header.txt github.com/suzerain-io/pinniped/internal/registry/credentialrequest CertIssuer diff --git a/internal/mocks/mockcertissuer/mockcertissuer.go b/internal/mocks/mockcertissuer/mockcertissuer.go index 25f336c4c..9b23841f3 100644 --- a/internal/mocks/mockcertissuer/mockcertissuer.go +++ b/internal/mocks/mockcertissuer/mockcertissuer.go @@ -3,16 +3,17 @@ // // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/suzerain-io/placeholder-name/internal/registry/credentialrequest (interfaces: CertIssuer) +// Source: github.com/suzerain-io/pinniped/internal/registry/credentialrequest (interfaces: CertIssuer) // Package mockcertissuer is a generated GoMock package. package mockcertissuer import ( pkix "crypto/x509/pkix" - gomock "github.com/golang/mock/gomock" reflect "reflect" time "time" + + gomock "github.com/golang/mock/gomock" ) // MockCertIssuer is a mock of CertIssuer interface diff --git a/internal/registry/credentialrequest/rest.go b/internal/registry/credentialrequest/rest.go index fed40b345..cbdc9faa1 100644 --- a/internal/registry/credentialrequest/rest.go +++ b/internal/registry/credentialrequest/rest.go @@ -21,7 +21,7 @@ import ( "k8s.io/apiserver/pkg/registry/rest" "k8s.io/utils/trace" - placeholderapi "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/placeholder" + pinnipedapi "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped" ) // clientCertificateTTL is the TTL for short-lived client certificates returned by this API. @@ -51,7 +51,7 @@ type REST struct { } func (r *REST) New() runtime.Object { - return &placeholderapi.CredentialRequest{} + return &pinnipedapi.CredentialRequest{} } func (r *REST) NamespaceScoped() bool { @@ -107,9 +107,9 @@ func (r *REST) Create(ctx context.Context, obj runtime.Object, createValidation traceSuccess(t, authResponse.User, authenticated, true) - return &placeholderapi.CredentialRequest{ - Status: placeholderapi.CredentialRequestStatus{ - Credential: &placeholderapi.CredentialRequestCredential{ + return &pinnipedapi.CredentialRequest{ + Status: pinnipedapi.CredentialRequestStatus{ + Credential: &pinnipedapi.CredentialRequestCredential{ ExpirationTimestamp: metav1.NewTime(time.Now().UTC().Add(clientCertificateTTL)), ClientCertificateData: string(certPEM), ClientKeyData: string(keyPEM), @@ -118,8 +118,8 @@ func (r *REST) Create(ctx context.Context, obj runtime.Object, createValidation }, nil } -func validateRequest(ctx context.Context, obj runtime.Object, createValidation rest.ValidateObjectFunc, options *metav1.CreateOptions, t *trace.Trace) (*placeholderapi.CredentialRequest, error) { - credentialRequest, ok := obj.(*placeholderapi.CredentialRequest) +func validateRequest(ctx context.Context, obj runtime.Object, createValidation rest.ValidateObjectFunc, options *metav1.CreateOptions, t *trace.Trace) (*pinnipedapi.CredentialRequest, error) { + credentialRequest, ok := obj.(*pinnipedapi.CredentialRequest) if !ok { traceValidationFailure(t, "not a CredentialRequest") return nil, apierrors.NewBadRequest(fmt.Sprintf("not a CredentialRequest: %#v", obj)) @@ -128,20 +128,20 @@ func validateRequest(ctx context.Context, obj runtime.Object, createValidation r if len(credentialRequest.Spec.Type) == 0 { traceValidationFailure(t, "type must be supplied") errs := field.ErrorList{field.Required(field.NewPath("spec", "type"), "type must be supplied")} - return nil, apierrors.NewInvalid(placeholderapi.Kind(credentialRequest.Kind), credentialRequest.Name, errs) + return nil, apierrors.NewInvalid(pinnipedapi.Kind(credentialRequest.Kind), credentialRequest.Name, errs) } - if credentialRequest.Spec.Type != placeholderapi.TokenCredentialType { + if credentialRequest.Spec.Type != pinnipedapi.TokenCredentialType { traceValidationFailure(t, "unrecognized type") errs := field.ErrorList{field.Invalid(field.NewPath("spec", "type"), credentialRequest.Spec.Type, "unrecognized type")} - return nil, apierrors.NewInvalid(placeholderapi.Kind(credentialRequest.Kind), credentialRequest.Name, errs) + return nil, apierrors.NewInvalid(pinnipedapi.Kind(credentialRequest.Kind), credentialRequest.Name, errs) } token := credentialRequest.Spec.Token if token == nil || len(token.Value) == 0 { traceValidationFailure(t, "token must be supplied") errs := field.ErrorList{field.Required(field.NewPath("spec", "token", "value"), "token must be supplied")} - return nil, apierrors.NewInvalid(placeholderapi.Kind(credentialRequest.Kind), credentialRequest.Name, errs) + return nil, apierrors.NewInvalid(pinnipedapi.Kind(credentialRequest.Kind), credentialRequest.Name, errs) } // just a sanity check, not sure how to honor a dry run on a virtual API @@ -149,7 +149,7 @@ func validateRequest(ctx context.Context, obj runtime.Object, createValidation r if len(options.DryRun) != 0 { traceValidationFailure(t, "dryRun not supported") errs := field.ErrorList{field.NotSupported(field.NewPath("dryRun"), options.DryRun, nil)} - return nil, apierrors.NewInvalid(placeholderapi.Kind(credentialRequest.Kind), credentialRequest.Name, errs) + return nil, apierrors.NewInvalid(pinnipedapi.Kind(credentialRequest.Kind), credentialRequest.Name, errs) } } @@ -160,7 +160,7 @@ func validateRequest(ctx context.Context, obj runtime.Object, createValidation r // they already got the token. if createValidation != nil { requestForValidation := obj.DeepCopyObject() - credentialRequestCopy, _ := requestForValidation.(*placeholderapi.CredentialRequest) + credentialRequestCopy, _ := requestForValidation.(*pinnipedapi.CredentialRequest) credentialRequestCopy.Spec.Token.Value = "" if err := createValidation(ctx, requestForValidation); err != nil { traceFailureWithError(t, "validation webhook", err) @@ -171,7 +171,7 @@ func validateRequest(ctx context.Context, obj runtime.Object, createValidation r return credentialRequest, nil } -func traceSuccess(t *trace.Trace, user user.Info, webhookAuthenticated bool, placeholderNameAuthenticated bool) { +func traceSuccess(t *trace.Trace, user user.Info, webhookAuthenticated bool, pinnipedAuthenticated bool) { userID := "" if user != nil { userID = user.GetUID() @@ -179,7 +179,7 @@ func traceSuccess(t *trace.Trace, user user.Info, webhookAuthenticated bool, pla t.Step("success", trace.Field{Key: "userID", Value: userID}, trace.Field{Key: "idpAuthenticated", Value: webhookAuthenticated}, - trace.Field{Key: "placeholderNameAuthenticated", Value: placeholderNameAuthenticated}, + trace.Field{Key: "pinnipedAuthenticated", Value: pinnipedAuthenticated}, ) } @@ -197,10 +197,10 @@ func traceFailureWithError(t *trace.Trace, failureType string, err error) { ) } -func failureResponse() *placeholderapi.CredentialRequest { +func failureResponse() *pinnipedapi.CredentialRequest { m := "authentication failed" - return &placeholderapi.CredentialRequest{ - Status: placeholderapi.CredentialRequestStatus{ + return &pinnipedapi.CredentialRequest{ + Status: pinnipedapi.CredentialRequestStatus{ Credential: nil, Message: &m, }, diff --git a/internal/registry/credentialrequest/rest_test.go b/internal/registry/credentialrequest/rest_test.go index a23d0d19f..437c78234 100644 --- a/internal/registry/credentialrequest/rest_test.go +++ b/internal/registry/credentialrequest/rest_test.go @@ -25,9 +25,9 @@ import ( "k8s.io/apiserver/pkg/registry/rest" "k8s.io/klog/v2" - "github.com/suzerain-io/placeholder-name/internal/mocks/mockcertissuer" - "github.com/suzerain-io/placeholder-name/internal/testutil" - placeholderapi "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/placeholder" + "github.com/suzerain-io/pinniped/internal/mocks/mockcertissuer" + "github.com/suzerain-io/pinniped/internal/testutil" + pinnipedapi "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped" ) type contextKey struct{} @@ -105,16 +105,16 @@ func TestCreate(t *testing.T) { response, err := callCreate(context.Background(), storage, validCredentialRequestWithToken(requestToken)) r.NoError(err) - r.IsType(&placeholderapi.CredentialRequest{}, response) + r.IsType(&pinnipedapi.CredentialRequest{}, response) - expires := response.(*placeholderapi.CredentialRequest).Status.Credential.ExpirationTimestamp + expires := response.(*pinnipedapi.CredentialRequest).Status.Credential.ExpirationTimestamp r.NotNil(expires) r.InDelta(time.Now().Add(1*time.Hour).Unix(), expires.Unix(), 5) - response.(*placeholderapi.CredentialRequest).Status.Credential.ExpirationTimestamp = metav1.Time{} + response.(*pinnipedapi.CredentialRequest).Status.Credential.ExpirationTimestamp = metav1.Time{} - r.Equal(response, &placeholderapi.CredentialRequest{ - Status: placeholderapi.CredentialRequestStatus{ - Credential: &placeholderapi.CredentialRequestCredential{ + r.Equal(response, &pinnipedapi.CredentialRequest{ + Status: pinnipedapi.CredentialRequestStatus{ + Credential: &pinnipedapi.CredentialRequestCredential{ ExpirationTimestamp: metav1.Time{}, ClientCertificateData: "test-cert", ClientKeyData: "test-key", @@ -164,7 +164,7 @@ func TestCreate(t *testing.T) { requireSuccessfulResponseWithAuthenticationFailureMessage(t, err, response) r.Equal(requestToken, webhook.calledWithToken) - requireOneLogStatement(r, logger, `"success" userID:test-user-uid,idpAuthenticated:false,placeholderNameAuthenticated:false`) + requireOneLogStatement(r, logger, `"success" userID:test-user-uid,idpAuthenticated:false,pinnipedAuthenticated:false`) }) it("CreateSucceedsWithAnUnauthenticatedStatusWhenGivenATokenAndTheWebhookReturnsUnauthenticatedWithNilUser", func() { @@ -179,7 +179,7 @@ func TestCreate(t *testing.T) { requireSuccessfulResponseWithAuthenticationFailureMessage(t, err, response) r.Equal(requestToken, webhook.calledWithToken) - requireOneLogStatement(r, logger, `"success" userID:,idpAuthenticated:false,placeholderNameAuthenticated:false`) + requireOneLogStatement(r, logger, `"success" userID:,idpAuthenticated:false,pinnipedAuthenticated:false`) }) it("CreateSucceedsWithAnUnauthenticatedStatusWhenWebhookFails", func() { @@ -204,7 +204,7 @@ func TestCreate(t *testing.T) { response, err := callCreate(context.Background(), storage, validCredentialRequest()) requireSuccessfulResponseWithAuthenticationFailureMessage(t, err, response) - requireOneLogStatement(r, logger, `"success" userID:,idpAuthenticated:true,placeholderNameAuthenticated:false`) + requireOneLogStatement(r, logger, `"success" userID:,idpAuthenticated:true,pinnipedAuthenticated:false`) }) it("CreateSucceedsWithAnUnauthenticatedStatusWhenWebhookReturnsAnEmptyUsername", func() { @@ -220,7 +220,7 @@ func TestCreate(t *testing.T) { response, err := callCreate(context.Background(), storage, validCredentialRequest()) requireSuccessfulResponseWithAuthenticationFailureMessage(t, err, response) - requireOneLogStatement(r, logger, `"success" userID:,idpAuthenticated:true,placeholderNameAuthenticated:false`) + requireOneLogStatement(r, logger, `"success" userID:,idpAuthenticated:true,pinnipedAuthenticated:false`) }) it("CreateDoesNotPassAdditionalContextInfoToTheWebhook", func() { @@ -250,49 +250,49 @@ func TestCreate(t *testing.T) { it("CreateFailsWhenTokenIsNilInRequest", func() { storage := NewREST(&FakeToken{}, nil) - response, err := callCreate(context.Background(), storage, credentialRequest(placeholderapi.CredentialRequestSpec{ - Type: placeholderapi.TokenCredentialType, + response, err := callCreate(context.Background(), storage, credentialRequest(pinnipedapi.CredentialRequestSpec{ + Type: pinnipedapi.TokenCredentialType, Token: nil, })) requireAPIError(t, response, err, apierrors.IsInvalid, - `.placeholder.suzerain-io.github.io "request name" is invalid: spec.token.value: Required value: token must be supplied`) + `.pinniped.dev "request name" is invalid: spec.token.value: Required value: token must be supplied`) requireOneLogStatement(r, logger, `"failure" failureType:request validation,msg:token must be supplied`) }) it("CreateFailsWhenTypeInRequestIsMissing", func() { storage := NewREST(&FakeToken{}, nil) - response, err := callCreate(context.Background(), storage, credentialRequest(placeholderapi.CredentialRequestSpec{ + response, err := callCreate(context.Background(), storage, credentialRequest(pinnipedapi.CredentialRequestSpec{ Type: "", - Token: &placeholderapi.CredentialRequestTokenCredential{Value: "a token"}, + Token: &pinnipedapi.CredentialRequestTokenCredential{Value: "a token"}, })) requireAPIError(t, response, err, apierrors.IsInvalid, - `.placeholder.suzerain-io.github.io "request name" is invalid: spec.type: Required value: type must be supplied`) + `.pinniped.dev "request name" is invalid: spec.type: Required value: type must be supplied`) requireOneLogStatement(r, logger, `"failure" failureType:request validation,msg:type must be supplied`) }) it("CreateFailsWhenTypeInRequestIsNotLegal", func() { storage := NewREST(&FakeToken{}, nil) - response, err := callCreate(context.Background(), storage, credentialRequest(placeholderapi.CredentialRequestSpec{ + response, err := callCreate(context.Background(), storage, credentialRequest(pinnipedapi.CredentialRequestSpec{ Type: "this in an invalid type", - Token: &placeholderapi.CredentialRequestTokenCredential{Value: "a token"}, + Token: &pinnipedapi.CredentialRequestTokenCredential{Value: "a token"}, })) requireAPIError(t, response, err, apierrors.IsInvalid, - `.placeholder.suzerain-io.github.io "request name" is invalid: spec.type: Invalid value: "this in an invalid type": unrecognized type`) + `.pinniped.dev "request name" is invalid: spec.type: Invalid value: "this in an invalid type": unrecognized type`) requireOneLogStatement(r, logger, `"failure" failureType:request validation,msg:unrecognized type`) }) it("CreateFailsWhenTokenValueIsEmptyInRequest", func() { storage := NewREST(&FakeToken{}, nil) - response, err := callCreate(context.Background(), storage, credentialRequest(placeholderapi.CredentialRequestSpec{ - Type: placeholderapi.TokenCredentialType, - Token: &placeholderapi.CredentialRequestTokenCredential{Value: ""}, + response, err := callCreate(context.Background(), storage, credentialRequest(pinnipedapi.CredentialRequestSpec{ + Type: pinnipedapi.TokenCredentialType, + Token: &pinnipedapi.CredentialRequestTokenCredential{Value: ""}, })) requireAPIError(t, response, err, apierrors.IsInvalid, - `.placeholder.suzerain-io.github.io "request name" is invalid: spec.token.value: Required value: token must be supplied`) + `.pinniped.dev "request name" is invalid: spec.token.value: Required value: token must be supplied`) requireOneLogStatement(r, logger, `"failure" failureType:request validation,msg:token must be supplied`) }) @@ -320,7 +320,7 @@ func TestCreate(t *testing.T) { context.Background(), validCredentialRequestWithToken(requestToken), func(ctx context.Context, obj runtime.Object) error { - credentialRequest, _ := obj.(*placeholderapi.CredentialRequest) + credentialRequest, _ := obj.(*pinnipedapi.CredentialRequest) credentialRequest.Spec.Token.Value = "foobaz" return nil }, @@ -342,7 +342,7 @@ func TestCreate(t *testing.T) { context.Background(), validCredentialRequest(), func(ctx context.Context, obj runtime.Object) error { - credentialRequest, _ := obj.(*placeholderapi.CredentialRequest) + credentialRequest, _ := obj.(*pinnipedapi.CredentialRequest) validationFunctionWasCalled = true validationFunctionSawTokenValue = credentialRequest.Spec.Token.Value return nil @@ -364,7 +364,7 @@ func TestCreate(t *testing.T) { }) requireAPIError(t, response, err, apierrors.IsInvalid, - `.placeholder.suzerain-io.github.io "request name" is invalid: dryRun: Unsupported value: []string{"some dry run flag"}`) + `.pinniped.dev "request name" is invalid: dryRun: Unsupported value: []string{"some dry run flag"}`) requireOneLogStatement(r, logger, `"failure" failureType:request validation,msg:dryRun not supported`) }) @@ -431,7 +431,7 @@ func requireOneLogStatement(r *require.Assertions, logger *testutil.TranscriptLo r.Contains(transcript[0].Message, messageContains) } -func callCreate(ctx context.Context, storage *REST, credentialRequest *placeholderapi.CredentialRequest) (runtime.Object, error) { +func callCreate(ctx context.Context, storage *REST, credentialRequest *pinnipedapi.CredentialRequest) (runtime.Object, error) { return storage.Create( ctx, credentialRequest, @@ -441,19 +441,19 @@ func callCreate(ctx context.Context, storage *REST, credentialRequest *placehold }) } -func validCredentialRequest() *placeholderapi.CredentialRequest { +func validCredentialRequest() *pinnipedapi.CredentialRequest { return validCredentialRequestWithToken("some token") } -func validCredentialRequestWithToken(token string) *placeholderapi.CredentialRequest { - return credentialRequest(placeholderapi.CredentialRequestSpec{ - Type: placeholderapi.TokenCredentialType, - Token: &placeholderapi.CredentialRequestTokenCredential{Value: token}, +func validCredentialRequestWithToken(token string) *pinnipedapi.CredentialRequest { + return credentialRequest(pinnipedapi.CredentialRequestSpec{ + Type: pinnipedapi.TokenCredentialType, + Token: &pinnipedapi.CredentialRequestTokenCredential{Value: token}, }) } -func credentialRequest(spec placeholderapi.CredentialRequestSpec) *placeholderapi.CredentialRequest { - return &placeholderapi.CredentialRequest{ +func credentialRequest(spec pinnipedapi.CredentialRequestSpec) *pinnipedapi.CredentialRequest { + return &pinnipedapi.CredentialRequest{ TypeMeta: metav1.TypeMeta{}, ObjectMeta: metav1.ObjectMeta{ Name: "request name", @@ -483,8 +483,8 @@ func requireAPIError(t *testing.T, response runtime.Object, err error, expectedE func requireSuccessfulResponseWithAuthenticationFailureMessage(t *testing.T, err error, response runtime.Object) { t.Helper() require.NoError(t, err) - require.Equal(t, response, &placeholderapi.CredentialRequest{ - Status: placeholderapi.CredentialRequestStatus{ + require.Equal(t, response, &pinnipedapi.CredentialRequest{ + Status: pinnipedapi.CredentialRequestStatus{ Credential: nil, Message: stringPtr("authentication failed"), }, diff --git a/internal/server/server.go b/internal/server/server.go index 3707dbdf6..acef3898d 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -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 diff --git a/internal/server/server_test.go b/internal/server/server_test.go index 56bb4a26b..9100cf774 100644 --- a/internal/server/server_test.go +++ b/internal/server/server_test.go @@ -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", diff --git a/kubernetes/1.19/api/apis/crdpinniped/doc.go b/kubernetes/1.19/api/apis/crdpinniped/doc.go new file mode 100644 index 000000000..052320b45 --- /dev/null +++ b/kubernetes/1.19/api/apis/crdpinniped/doc.go @@ -0,0 +1,10 @@ +/* +Copyright 2020 VMware, Inc. +SPDX-License-Identifier: Apache-2.0 +*/ + +// +k8s:deepcopy-gen=package +// +groupName=crd.pinniped.dev + +// Package pinniped is the internal version of the API. +package crdpinniped diff --git a/kubernetes/1.19/api/apis/crdsplaceholder/register.go b/kubernetes/1.19/api/apis/crdpinniped/register.go similarity index 92% rename from kubernetes/1.19/api/apis/crdsplaceholder/register.go rename to kubernetes/1.19/api/apis/crdpinniped/register.go index 4d5d31af2..e0c06ecfe 100644 --- a/kubernetes/1.19/api/apis/crdsplaceholder/register.go +++ b/kubernetes/1.19/api/apis/crdpinniped/register.go @@ -4,14 +4,14 @@ SPDX-License-Identifier: Apache-2.0 */ //nolint:gochecknoglobals -package crdsplaceholder +package crdpinniped import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) -const GroupName = "crds.placeholder.suzerain-io.github.io" +const GroupName = "crd.pinniped.dev" // SchemeGroupVersion is group version used to register these objects. var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} diff --git a/kubernetes/1.19/api/apis/crdsplaceholder/types.go b/kubernetes/1.19/api/apis/crdpinniped/types.go similarity index 74% rename from kubernetes/1.19/api/apis/crdsplaceholder/types.go rename to kubernetes/1.19/api/apis/crdpinniped/types.go index ffb9c4a3b..615e5e8d4 100644 --- a/kubernetes/1.19/api/apis/crdsplaceholder/types.go +++ b/kubernetes/1.19/api/apis/crdpinniped/types.go @@ -3,4 +3,4 @@ Copyright 2020 VMware, Inc. SPDX-License-Identifier: Apache-2.0 */ -package crdsplaceholder +package crdpinniped diff --git a/kubernetes/1.19/api/apis/crdsplaceholder/v1alpha1/conversion.go b/kubernetes/1.19/api/apis/crdpinniped/v1alpha1/conversion.go similarity index 100% rename from kubernetes/1.19/api/apis/crdsplaceholder/v1alpha1/conversion.go rename to kubernetes/1.19/api/apis/crdpinniped/v1alpha1/conversion.go diff --git a/kubernetes/1.19/api/apis/crdsplaceholder/v1alpha1/defaults.go b/kubernetes/1.19/api/apis/crdpinniped/v1alpha1/defaults.go similarity index 100% rename from kubernetes/1.19/api/apis/crdsplaceholder/v1alpha1/defaults.go rename to kubernetes/1.19/api/apis/crdpinniped/v1alpha1/defaults.go diff --git a/kubernetes/1.19/api/apis/placeholder/v1alpha1/doc.go b/kubernetes/1.19/api/apis/crdpinniped/v1alpha1/doc.go similarity index 60% rename from kubernetes/1.19/api/apis/placeholder/v1alpha1/doc.go rename to kubernetes/1.19/api/apis/crdpinniped/v1alpha1/doc.go index 4bb468ab0..cb845c95c 100644 --- a/kubernetes/1.19/api/apis/placeholder/v1alpha1/doc.go +++ b/kubernetes/1.19/api/apis/crdpinniped/v1alpha1/doc.go @@ -5,9 +5,9 @@ SPDX-License-Identifier: Apache-2.0 // +k8s:openapi-gen=true // +k8s:deepcopy-gen=package -// +k8s:conversion-gen=github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/placeholder +// +k8s:conversion-gen=github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/crdpinniped // +k8s:defaulter-gen=TypeMeta -// +groupName=placeholder.suzerain-io.github.io +// +groupName=crd.pinniped.dev // Package v1alpha1 is the v1alpha1 version of the API. package v1alpha1 diff --git a/kubernetes/1.19/api/apis/crdsplaceholder/v1alpha1/register.go b/kubernetes/1.19/api/apis/crdpinniped/v1alpha1/register.go similarity index 91% rename from kubernetes/1.19/api/apis/crdsplaceholder/v1alpha1/register.go rename to kubernetes/1.19/api/apis/crdpinniped/v1alpha1/register.go index f8fa00d1f..1210c96f6 100644 --- a/kubernetes/1.19/api/apis/crdsplaceholder/v1alpha1/register.go +++ b/kubernetes/1.19/api/apis/crdpinniped/v1alpha1/register.go @@ -12,7 +12,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" ) -const GroupName = "crds.placeholder.suzerain-io.github.io" +const GroupName = "crd.pinniped.dev" // SchemeGroupVersion is group version used to register these objects. var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} @@ -33,8 +33,8 @@ func init() { // Adds the list of known types to the given scheme. func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, - &LoginDiscoveryConfig{}, - &LoginDiscoveryConfigList{}, + &PinnipedDiscoveryInfo{}, + &PinnipedDiscoveryInfoList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/kubernetes/1.19/api/apis/crdsplaceholder/v1alpha1/types.go b/kubernetes/1.19/api/apis/crdpinniped/v1alpha1/types.go similarity index 76% rename from kubernetes/1.19/api/apis/crdsplaceholder/v1alpha1/types.go rename to kubernetes/1.19/api/apis/crdpinniped/v1alpha1/types.go index 9959c4a6a..7095ad926 100644 --- a/kubernetes/1.19/api/apis/crdsplaceholder/v1alpha1/types.go +++ b/kubernetes/1.19/api/apis/crdpinniped/v1alpha1/types.go @@ -7,7 +7,7 @@ package v1alpha1 import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -type LoginDiscoveryConfigSpec struct { +type PinnipedDiscoveryInfoSpec struct { // The K8s API server URL. Required. Server string `json:"server,omitempty"` @@ -18,18 +18,18 @@ type LoginDiscoveryConfigSpec struct { // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type LoginDiscoveryConfig struct { +type PinnipedDiscoveryInfo struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - Spec LoginDiscoveryConfigSpec `json:"spec"` + Spec PinnipedDiscoveryInfoSpec `json:"spec"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type LoginDiscoveryConfigList struct { +type PinnipedDiscoveryInfoList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []LoginDiscoveryConfig `json:"items"` + Items []PinnipedDiscoveryInfo `json:"items"` } diff --git a/kubernetes/1.19/api/apis/crdsplaceholder/v1alpha1/zz_generated.conversion.go b/kubernetes/1.19/api/apis/crdpinniped/v1alpha1/zz_generated.conversion.go similarity index 100% rename from kubernetes/1.19/api/apis/crdsplaceholder/v1alpha1/zz_generated.conversion.go rename to kubernetes/1.19/api/apis/crdpinniped/v1alpha1/zz_generated.conversion.go diff --git a/kubernetes/1.19/api/apis/crdsplaceholder/v1alpha1/zz_generated.deepcopy.go b/kubernetes/1.19/api/apis/crdpinniped/v1alpha1/zz_generated.deepcopy.go similarity index 64% rename from kubernetes/1.19/api/apis/crdsplaceholder/v1alpha1/zz_generated.deepcopy.go rename to kubernetes/1.19/api/apis/crdpinniped/v1alpha1/zz_generated.deepcopy.go index 37fa5001a..6f1ddbdc2 100644 --- a/kubernetes/1.19/api/apis/crdsplaceholder/v1alpha1/zz_generated.deepcopy.go +++ b/kubernetes/1.19/api/apis/crdpinniped/v1alpha1/zz_generated.deepcopy.go @@ -14,7 +14,7 @@ import ( ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LoginDiscoveryConfig) DeepCopyInto(out *LoginDiscoveryConfig) { +func (in *PinnipedDiscoveryInfo) DeepCopyInto(out *PinnipedDiscoveryInfo) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) @@ -22,18 +22,18 @@ func (in *LoginDiscoveryConfig) DeepCopyInto(out *LoginDiscoveryConfig) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoginDiscoveryConfig. -func (in *LoginDiscoveryConfig) DeepCopy() *LoginDiscoveryConfig { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PinnipedDiscoveryInfo. +func (in *PinnipedDiscoveryInfo) DeepCopy() *PinnipedDiscoveryInfo { if in == nil { return nil } - out := new(LoginDiscoveryConfig) + out := new(PinnipedDiscoveryInfo) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *LoginDiscoveryConfig) DeepCopyObject() runtime.Object { +func (in *PinnipedDiscoveryInfo) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -41,13 +41,13 @@ func (in *LoginDiscoveryConfig) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LoginDiscoveryConfigList) DeepCopyInto(out *LoginDiscoveryConfigList) { +func (in *PinnipedDiscoveryInfoList) DeepCopyInto(out *PinnipedDiscoveryInfoList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]LoginDiscoveryConfig, len(*in)) + *out = make([]PinnipedDiscoveryInfo, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -55,18 +55,18 @@ func (in *LoginDiscoveryConfigList) DeepCopyInto(out *LoginDiscoveryConfigList) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoginDiscoveryConfigList. -func (in *LoginDiscoveryConfigList) DeepCopy() *LoginDiscoveryConfigList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PinnipedDiscoveryInfoList. +func (in *PinnipedDiscoveryInfoList) DeepCopy() *PinnipedDiscoveryInfoList { if in == nil { return nil } - out := new(LoginDiscoveryConfigList) + out := new(PinnipedDiscoveryInfoList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *LoginDiscoveryConfigList) DeepCopyObject() runtime.Object { +func (in *PinnipedDiscoveryInfoList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -74,17 +74,17 @@ func (in *LoginDiscoveryConfigList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LoginDiscoveryConfigSpec) DeepCopyInto(out *LoginDiscoveryConfigSpec) { +func (in *PinnipedDiscoveryInfoSpec) DeepCopyInto(out *PinnipedDiscoveryInfoSpec) { *out = *in return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoginDiscoveryConfigSpec. -func (in *LoginDiscoveryConfigSpec) DeepCopy() *LoginDiscoveryConfigSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PinnipedDiscoveryInfoSpec. +func (in *PinnipedDiscoveryInfoSpec) DeepCopy() *PinnipedDiscoveryInfoSpec { if in == nil { return nil } - out := new(LoginDiscoveryConfigSpec) + out := new(PinnipedDiscoveryInfoSpec) in.DeepCopyInto(out) return out } diff --git a/kubernetes/1.19/api/apis/crdsplaceholder/v1alpha1/zz_generated.defaults.go b/kubernetes/1.19/api/apis/crdpinniped/v1alpha1/zz_generated.defaults.go similarity index 100% rename from kubernetes/1.19/api/apis/crdsplaceholder/v1alpha1/zz_generated.defaults.go rename to kubernetes/1.19/api/apis/crdpinniped/v1alpha1/zz_generated.defaults.go diff --git a/kubernetes/1.19/api/apis/crdsplaceholder/zz_generated.deepcopy.go b/kubernetes/1.19/api/apis/crdpinniped/zz_generated.deepcopy.go similarity index 86% rename from kubernetes/1.19/api/apis/crdsplaceholder/zz_generated.deepcopy.go rename to kubernetes/1.19/api/apis/crdpinniped/zz_generated.deepcopy.go index 43c8b37f8..cdce74662 100644 --- a/kubernetes/1.19/api/apis/crdsplaceholder/zz_generated.deepcopy.go +++ b/kubernetes/1.19/api/apis/crdpinniped/zz_generated.deepcopy.go @@ -7,4 +7,4 @@ SPDX-License-Identifier: Apache-2.0 // Code generated by deepcopy-gen. DO NOT EDIT. -package crdsplaceholder +package crdpinniped diff --git a/kubernetes/1.19/api/apis/crdsplaceholder/doc.go b/kubernetes/1.19/api/apis/crdsplaceholder/doc.go deleted file mode 100644 index cb442ffb4..000000000 --- a/kubernetes/1.19/api/apis/crdsplaceholder/doc.go +++ /dev/null @@ -1,10 +0,0 @@ -/* -Copyright 2020 VMware, Inc. -SPDX-License-Identifier: Apache-2.0 -*/ - -// +k8s:deepcopy-gen=package -// +groupName=crds.placeholder.suzerain-io.github.io - -// Package placeholder is the internal version of the API. -package crdsplaceholder diff --git a/kubernetes/1.19/api/apis/pinniped/doc.go b/kubernetes/1.19/api/apis/pinniped/doc.go new file mode 100644 index 000000000..99df8e0a3 --- /dev/null +++ b/kubernetes/1.19/api/apis/pinniped/doc.go @@ -0,0 +1,10 @@ +/* +Copyright 2020 VMware, Inc. +SPDX-License-Identifier: Apache-2.0 +*/ + +// +k8s:deepcopy-gen=package +// +groupName=pinniped.dev + +// Package pinniped is the internal version of the API. +package pinniped diff --git a/kubernetes/1.19/api/apis/placeholder/install/install.go b/kubernetes/1.19/api/apis/pinniped/install/install.go similarity index 65% rename from kubernetes/1.19/api/apis/placeholder/install/install.go rename to kubernetes/1.19/api/apis/pinniped/install/install.go index 928cd9a88..bf4a64182 100644 --- a/kubernetes/1.19/api/apis/placeholder/install/install.go +++ b/kubernetes/1.19/api/apis/pinniped/install/install.go @@ -9,13 +9,13 @@ import ( "k8s.io/apimachinery/pkg/runtime" utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/placeholder" - "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/placeholder/v1alpha1" + "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped" + "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1" ) // Install registers the API group and adds types to a scheme. func Install(scheme *runtime.Scheme) { - utilruntime.Must(placeholder.AddToScheme(scheme)) + utilruntime.Must(pinniped.AddToScheme(scheme)) utilruntime.Must(v1alpha1.AddToScheme(scheme)) utilruntime.Must(scheme.SetVersionPriority(v1alpha1.SchemeGroupVersion)) } diff --git a/kubernetes/1.19/api/apis/placeholder/register.go b/kubernetes/1.19/api/apis/pinniped/register.go similarity index 93% rename from kubernetes/1.19/api/apis/placeholder/register.go rename to kubernetes/1.19/api/apis/pinniped/register.go index 9e1f0c341..c6570bc7a 100644 --- a/kubernetes/1.19/api/apis/placeholder/register.go +++ b/kubernetes/1.19/api/apis/pinniped/register.go @@ -4,14 +4,14 @@ SPDX-License-Identifier: Apache-2.0 */ //nolint:gochecknoglobals -package placeholder +package pinniped import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) -const GroupName = "placeholder.suzerain-io.github.io" +const GroupName = "pinniped.dev" // SchemeGroupVersion is group version used to register these objects. var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} diff --git a/kubernetes/1.19/api/apis/placeholder/types.go b/kubernetes/1.19/api/apis/pinniped/types.go similarity index 98% rename from kubernetes/1.19/api/apis/placeholder/types.go rename to kubernetes/1.19/api/apis/pinniped/types.go index cc68849cc..4c558bd68 100644 --- a/kubernetes/1.19/api/apis/placeholder/types.go +++ b/kubernetes/1.19/api/apis/pinniped/types.go @@ -3,7 +3,7 @@ Copyright 2020 VMware, Inc. SPDX-License-Identifier: Apache-2.0 */ -package placeholder +package pinniped import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/kubernetes/1.19/api/apis/placeholder/v1alpha1/conversion.go b/kubernetes/1.19/api/apis/pinniped/v1alpha1/conversion.go similarity index 100% rename from kubernetes/1.19/api/apis/placeholder/v1alpha1/conversion.go rename to kubernetes/1.19/api/apis/pinniped/v1alpha1/conversion.go diff --git a/kubernetes/1.19/api/apis/placeholder/v1alpha1/defaults.go b/kubernetes/1.19/api/apis/pinniped/v1alpha1/defaults.go similarity index 100% rename from kubernetes/1.19/api/apis/placeholder/v1alpha1/defaults.go rename to kubernetes/1.19/api/apis/pinniped/v1alpha1/defaults.go diff --git a/kubernetes/1.19/api/apis/crdsplaceholder/v1alpha1/doc.go b/kubernetes/1.19/api/apis/pinniped/v1alpha1/doc.go similarity index 59% rename from kubernetes/1.19/api/apis/crdsplaceholder/v1alpha1/doc.go rename to kubernetes/1.19/api/apis/pinniped/v1alpha1/doc.go index f3ad92f34..1c5e2f05c 100644 --- a/kubernetes/1.19/api/apis/crdsplaceholder/v1alpha1/doc.go +++ b/kubernetes/1.19/api/apis/pinniped/v1alpha1/doc.go @@ -5,9 +5,9 @@ SPDX-License-Identifier: Apache-2.0 // +k8s:openapi-gen=true // +k8s:deepcopy-gen=package -// +k8s:conversion-gen=github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/crdsplaceholder +// +k8s:conversion-gen=github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped // +k8s:defaulter-gen=TypeMeta -// +groupName=crds.placeholder.suzerain-io.github.io +// +groupName=pinniped.dev // Package v1alpha1 is the v1alpha1 version of the API. package v1alpha1 diff --git a/kubernetes/1.19/api/apis/placeholder/v1alpha1/register.go b/kubernetes/1.19/api/apis/pinniped/v1alpha1/register.go similarity index 96% rename from kubernetes/1.19/api/apis/placeholder/v1alpha1/register.go rename to kubernetes/1.19/api/apis/pinniped/v1alpha1/register.go index 64ca0901f..b1ae3aea5 100644 --- a/kubernetes/1.19/api/apis/placeholder/v1alpha1/register.go +++ b/kubernetes/1.19/api/apis/pinniped/v1alpha1/register.go @@ -12,7 +12,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" ) -const GroupName = "placeholder.suzerain-io.github.io" +const GroupName = "pinniped.dev" // SchemeGroupVersion is group version used to register these objects. var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} diff --git a/kubernetes/1.19/api/apis/placeholder/v1alpha1/types.go b/kubernetes/1.19/api/apis/pinniped/v1alpha1/types.go similarity index 100% rename from kubernetes/1.19/api/apis/placeholder/v1alpha1/types.go rename to kubernetes/1.19/api/apis/pinniped/v1alpha1/types.go diff --git a/kubernetes/1.19/api/apis/pinniped/v1alpha1/zz_generated.conversion.go b/kubernetes/1.19/api/apis/pinniped/v1alpha1/zz_generated.conversion.go new file mode 100644 index 000000000..cfc0acd8b --- /dev/null +++ b/kubernetes/1.19/api/apis/pinniped/v1alpha1/zz_generated.conversion.go @@ -0,0 +1,233 @@ +// +build !ignore_autogenerated + +/* +Copyright 2020 VMware, Inc. +SPDX-License-Identifier: Apache-2.0 +*/ + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + unsafe "unsafe" + + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + + pinniped "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped" +) + +func init() { + localSchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*CredentialRequest)(nil), (*pinniped.CredentialRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_CredentialRequest_To_pinniped_CredentialRequest(a.(*CredentialRequest), b.(*pinniped.CredentialRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*pinniped.CredentialRequest)(nil), (*CredentialRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_pinniped_CredentialRequest_To_v1alpha1_CredentialRequest(a.(*pinniped.CredentialRequest), b.(*CredentialRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CredentialRequestCredential)(nil), (*pinniped.CredentialRequestCredential)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_CredentialRequestCredential_To_pinniped_CredentialRequestCredential(a.(*CredentialRequestCredential), b.(*pinniped.CredentialRequestCredential), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*pinniped.CredentialRequestCredential)(nil), (*CredentialRequestCredential)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_pinniped_CredentialRequestCredential_To_v1alpha1_CredentialRequestCredential(a.(*pinniped.CredentialRequestCredential), b.(*CredentialRequestCredential), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CredentialRequestList)(nil), (*pinniped.CredentialRequestList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_CredentialRequestList_To_pinniped_CredentialRequestList(a.(*CredentialRequestList), b.(*pinniped.CredentialRequestList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*pinniped.CredentialRequestList)(nil), (*CredentialRequestList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_pinniped_CredentialRequestList_To_v1alpha1_CredentialRequestList(a.(*pinniped.CredentialRequestList), b.(*CredentialRequestList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CredentialRequestSpec)(nil), (*pinniped.CredentialRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_CredentialRequestSpec_To_pinniped_CredentialRequestSpec(a.(*CredentialRequestSpec), b.(*pinniped.CredentialRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*pinniped.CredentialRequestSpec)(nil), (*CredentialRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_pinniped_CredentialRequestSpec_To_v1alpha1_CredentialRequestSpec(a.(*pinniped.CredentialRequestSpec), b.(*CredentialRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CredentialRequestStatus)(nil), (*pinniped.CredentialRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_CredentialRequestStatus_To_pinniped_CredentialRequestStatus(a.(*CredentialRequestStatus), b.(*pinniped.CredentialRequestStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*pinniped.CredentialRequestStatus)(nil), (*CredentialRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_pinniped_CredentialRequestStatus_To_v1alpha1_CredentialRequestStatus(a.(*pinniped.CredentialRequestStatus), b.(*CredentialRequestStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CredentialRequestTokenCredential)(nil), (*pinniped.CredentialRequestTokenCredential)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_CredentialRequestTokenCredential_To_pinniped_CredentialRequestTokenCredential(a.(*CredentialRequestTokenCredential), b.(*pinniped.CredentialRequestTokenCredential), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*pinniped.CredentialRequestTokenCredential)(nil), (*CredentialRequestTokenCredential)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_pinniped_CredentialRequestTokenCredential_To_v1alpha1_CredentialRequestTokenCredential(a.(*pinniped.CredentialRequestTokenCredential), b.(*CredentialRequestTokenCredential), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha1_CredentialRequest_To_pinniped_CredentialRequest(in *CredentialRequest, out *pinniped.CredentialRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha1_CredentialRequestSpec_To_pinniped_CredentialRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha1_CredentialRequestStatus_To_pinniped_CredentialRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha1_CredentialRequest_To_pinniped_CredentialRequest is an autogenerated conversion function. +func Convert_v1alpha1_CredentialRequest_To_pinniped_CredentialRequest(in *CredentialRequest, out *pinniped.CredentialRequest, s conversion.Scope) error { + return autoConvert_v1alpha1_CredentialRequest_To_pinniped_CredentialRequest(in, out, s) +} + +func autoConvert_pinniped_CredentialRequest_To_v1alpha1_CredentialRequest(in *pinniped.CredentialRequest, out *CredentialRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_pinniped_CredentialRequestSpec_To_v1alpha1_CredentialRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_pinniped_CredentialRequestStatus_To_v1alpha1_CredentialRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_pinniped_CredentialRequest_To_v1alpha1_CredentialRequest is an autogenerated conversion function. +func Convert_pinniped_CredentialRequest_To_v1alpha1_CredentialRequest(in *pinniped.CredentialRequest, out *CredentialRequest, s conversion.Scope) error { + return autoConvert_pinniped_CredentialRequest_To_v1alpha1_CredentialRequest(in, out, s) +} + +func autoConvert_v1alpha1_CredentialRequestCredential_To_pinniped_CredentialRequestCredential(in *CredentialRequestCredential, out *pinniped.CredentialRequestCredential, s conversion.Scope) error { + out.ExpirationTimestamp = in.ExpirationTimestamp + out.Token = in.Token + out.ClientCertificateData = in.ClientCertificateData + out.ClientKeyData = in.ClientKeyData + return nil +} + +// Convert_v1alpha1_CredentialRequestCredential_To_pinniped_CredentialRequestCredential is an autogenerated conversion function. +func Convert_v1alpha1_CredentialRequestCredential_To_pinniped_CredentialRequestCredential(in *CredentialRequestCredential, out *pinniped.CredentialRequestCredential, s conversion.Scope) error { + return autoConvert_v1alpha1_CredentialRequestCredential_To_pinniped_CredentialRequestCredential(in, out, s) +} + +func autoConvert_pinniped_CredentialRequestCredential_To_v1alpha1_CredentialRequestCredential(in *pinniped.CredentialRequestCredential, out *CredentialRequestCredential, s conversion.Scope) error { + out.ExpirationTimestamp = in.ExpirationTimestamp + out.Token = in.Token + out.ClientCertificateData = in.ClientCertificateData + out.ClientKeyData = in.ClientKeyData + return nil +} + +// Convert_pinniped_CredentialRequestCredential_To_v1alpha1_CredentialRequestCredential is an autogenerated conversion function. +func Convert_pinniped_CredentialRequestCredential_To_v1alpha1_CredentialRequestCredential(in *pinniped.CredentialRequestCredential, out *CredentialRequestCredential, s conversion.Scope) error { + return autoConvert_pinniped_CredentialRequestCredential_To_v1alpha1_CredentialRequestCredential(in, out, s) +} + +func autoConvert_v1alpha1_CredentialRequestList_To_pinniped_CredentialRequestList(in *CredentialRequestList, out *pinniped.CredentialRequestList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]pinniped.CredentialRequest)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha1_CredentialRequestList_To_pinniped_CredentialRequestList is an autogenerated conversion function. +func Convert_v1alpha1_CredentialRequestList_To_pinniped_CredentialRequestList(in *CredentialRequestList, out *pinniped.CredentialRequestList, s conversion.Scope) error { + return autoConvert_v1alpha1_CredentialRequestList_To_pinniped_CredentialRequestList(in, out, s) +} + +func autoConvert_pinniped_CredentialRequestList_To_v1alpha1_CredentialRequestList(in *pinniped.CredentialRequestList, out *CredentialRequestList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]CredentialRequest)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_pinniped_CredentialRequestList_To_v1alpha1_CredentialRequestList is an autogenerated conversion function. +func Convert_pinniped_CredentialRequestList_To_v1alpha1_CredentialRequestList(in *pinniped.CredentialRequestList, out *CredentialRequestList, s conversion.Scope) error { + return autoConvert_pinniped_CredentialRequestList_To_v1alpha1_CredentialRequestList(in, out, s) +} + +func autoConvert_v1alpha1_CredentialRequestSpec_To_pinniped_CredentialRequestSpec(in *CredentialRequestSpec, out *pinniped.CredentialRequestSpec, s conversion.Scope) error { + out.Type = pinniped.CredentialType(in.Type) + out.Token = (*pinniped.CredentialRequestTokenCredential)(unsafe.Pointer(in.Token)) + return nil +} + +// Convert_v1alpha1_CredentialRequestSpec_To_pinniped_CredentialRequestSpec is an autogenerated conversion function. +func Convert_v1alpha1_CredentialRequestSpec_To_pinniped_CredentialRequestSpec(in *CredentialRequestSpec, out *pinniped.CredentialRequestSpec, s conversion.Scope) error { + return autoConvert_v1alpha1_CredentialRequestSpec_To_pinniped_CredentialRequestSpec(in, out, s) +} + +func autoConvert_pinniped_CredentialRequestSpec_To_v1alpha1_CredentialRequestSpec(in *pinniped.CredentialRequestSpec, out *CredentialRequestSpec, s conversion.Scope) error { + out.Type = CredentialType(in.Type) + out.Token = (*CredentialRequestTokenCredential)(unsafe.Pointer(in.Token)) + return nil +} + +// Convert_pinniped_CredentialRequestSpec_To_v1alpha1_CredentialRequestSpec is an autogenerated conversion function. +func Convert_pinniped_CredentialRequestSpec_To_v1alpha1_CredentialRequestSpec(in *pinniped.CredentialRequestSpec, out *CredentialRequestSpec, s conversion.Scope) error { + return autoConvert_pinniped_CredentialRequestSpec_To_v1alpha1_CredentialRequestSpec(in, out, s) +} + +func autoConvert_v1alpha1_CredentialRequestStatus_To_pinniped_CredentialRequestStatus(in *CredentialRequestStatus, out *pinniped.CredentialRequestStatus, s conversion.Scope) error { + out.Credential = (*pinniped.CredentialRequestCredential)(unsafe.Pointer(in.Credential)) + out.Message = (*string)(unsafe.Pointer(in.Message)) + return nil +} + +// Convert_v1alpha1_CredentialRequestStatus_To_pinniped_CredentialRequestStatus is an autogenerated conversion function. +func Convert_v1alpha1_CredentialRequestStatus_To_pinniped_CredentialRequestStatus(in *CredentialRequestStatus, out *pinniped.CredentialRequestStatus, s conversion.Scope) error { + return autoConvert_v1alpha1_CredentialRequestStatus_To_pinniped_CredentialRequestStatus(in, out, s) +} + +func autoConvert_pinniped_CredentialRequestStatus_To_v1alpha1_CredentialRequestStatus(in *pinniped.CredentialRequestStatus, out *CredentialRequestStatus, s conversion.Scope) error { + out.Credential = (*CredentialRequestCredential)(unsafe.Pointer(in.Credential)) + out.Message = (*string)(unsafe.Pointer(in.Message)) + return nil +} + +// Convert_pinniped_CredentialRequestStatus_To_v1alpha1_CredentialRequestStatus is an autogenerated conversion function. +func Convert_pinniped_CredentialRequestStatus_To_v1alpha1_CredentialRequestStatus(in *pinniped.CredentialRequestStatus, out *CredentialRequestStatus, s conversion.Scope) error { + return autoConvert_pinniped_CredentialRequestStatus_To_v1alpha1_CredentialRequestStatus(in, out, s) +} + +func autoConvert_v1alpha1_CredentialRequestTokenCredential_To_pinniped_CredentialRequestTokenCredential(in *CredentialRequestTokenCredential, out *pinniped.CredentialRequestTokenCredential, s conversion.Scope) error { + out.Value = in.Value + return nil +} + +// Convert_v1alpha1_CredentialRequestTokenCredential_To_pinniped_CredentialRequestTokenCredential is an autogenerated conversion function. +func Convert_v1alpha1_CredentialRequestTokenCredential_To_pinniped_CredentialRequestTokenCredential(in *CredentialRequestTokenCredential, out *pinniped.CredentialRequestTokenCredential, s conversion.Scope) error { + return autoConvert_v1alpha1_CredentialRequestTokenCredential_To_pinniped_CredentialRequestTokenCredential(in, out, s) +} + +func autoConvert_pinniped_CredentialRequestTokenCredential_To_v1alpha1_CredentialRequestTokenCredential(in *pinniped.CredentialRequestTokenCredential, out *CredentialRequestTokenCredential, s conversion.Scope) error { + out.Value = in.Value + return nil +} + +// Convert_pinniped_CredentialRequestTokenCredential_To_v1alpha1_CredentialRequestTokenCredential is an autogenerated conversion function. +func Convert_pinniped_CredentialRequestTokenCredential_To_v1alpha1_CredentialRequestTokenCredential(in *pinniped.CredentialRequestTokenCredential, out *CredentialRequestTokenCredential, s conversion.Scope) error { + return autoConvert_pinniped_CredentialRequestTokenCredential_To_v1alpha1_CredentialRequestTokenCredential(in, out, s) +} diff --git a/kubernetes/1.19/api/apis/placeholder/v1alpha1/zz_generated.deepcopy.go b/kubernetes/1.19/api/apis/pinniped/v1alpha1/zz_generated.deepcopy.go similarity index 100% rename from kubernetes/1.19/api/apis/placeholder/v1alpha1/zz_generated.deepcopy.go rename to kubernetes/1.19/api/apis/pinniped/v1alpha1/zz_generated.deepcopy.go diff --git a/kubernetes/1.19/api/apis/placeholder/v1alpha1/zz_generated.defaults.go b/kubernetes/1.19/api/apis/pinniped/v1alpha1/zz_generated.defaults.go similarity index 100% rename from kubernetes/1.19/api/apis/placeholder/v1alpha1/zz_generated.defaults.go rename to kubernetes/1.19/api/apis/pinniped/v1alpha1/zz_generated.defaults.go diff --git a/kubernetes/1.19/api/apis/placeholder/zz_generated.deepcopy.go b/kubernetes/1.19/api/apis/pinniped/zz_generated.deepcopy.go similarity index 99% rename from kubernetes/1.19/api/apis/placeholder/zz_generated.deepcopy.go rename to kubernetes/1.19/api/apis/pinniped/zz_generated.deepcopy.go index 29053f9de..51c9dde64 100644 --- a/kubernetes/1.19/api/apis/placeholder/zz_generated.deepcopy.go +++ b/kubernetes/1.19/api/apis/pinniped/zz_generated.deepcopy.go @@ -7,7 +7,7 @@ SPDX-License-Identifier: Apache-2.0 // Code generated by deepcopy-gen. DO NOT EDIT. -package placeholder +package pinniped import ( runtime "k8s.io/apimachinery/pkg/runtime" diff --git a/kubernetes/1.19/api/apis/placeholder/doc.go b/kubernetes/1.19/api/apis/placeholder/doc.go deleted file mode 100644 index 305567391..000000000 --- a/kubernetes/1.19/api/apis/placeholder/doc.go +++ /dev/null @@ -1,10 +0,0 @@ -/* -Copyright 2020 VMware, Inc. -SPDX-License-Identifier: Apache-2.0 -*/ - -// +k8s:deepcopy-gen=package -// +groupName=placeholder.suzerain-io.github.io - -// Package placeholder is the internal version of the API. -package placeholder diff --git a/kubernetes/1.19/api/apis/placeholder/v1alpha1/zz_generated.conversion.go b/kubernetes/1.19/api/apis/placeholder/v1alpha1/zz_generated.conversion.go deleted file mode 100644 index 2f2c18f04..000000000 --- a/kubernetes/1.19/api/apis/placeholder/v1alpha1/zz_generated.conversion.go +++ /dev/null @@ -1,232 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 2020 VMware, Inc. -SPDX-License-Identifier: Apache-2.0 -*/ - -// Code generated by conversion-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - unsafe "unsafe" - - placeholder "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/placeholder" - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -func init() { - localSchemeBuilder.Register(RegisterConversions) -} - -// RegisterConversions adds conversion functions to the given scheme. -// Public to allow building arbitrary schemes. -func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddGeneratedConversionFunc((*CredentialRequest)(nil), (*placeholder.CredentialRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_CredentialRequest_To_placeholder_CredentialRequest(a.(*CredentialRequest), b.(*placeholder.CredentialRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*placeholder.CredentialRequest)(nil), (*CredentialRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_placeholder_CredentialRequest_To_v1alpha1_CredentialRequest(a.(*placeholder.CredentialRequest), b.(*CredentialRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CredentialRequestCredential)(nil), (*placeholder.CredentialRequestCredential)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_CredentialRequestCredential_To_placeholder_CredentialRequestCredential(a.(*CredentialRequestCredential), b.(*placeholder.CredentialRequestCredential), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*placeholder.CredentialRequestCredential)(nil), (*CredentialRequestCredential)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_placeholder_CredentialRequestCredential_To_v1alpha1_CredentialRequestCredential(a.(*placeholder.CredentialRequestCredential), b.(*CredentialRequestCredential), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CredentialRequestList)(nil), (*placeholder.CredentialRequestList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_CredentialRequestList_To_placeholder_CredentialRequestList(a.(*CredentialRequestList), b.(*placeholder.CredentialRequestList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*placeholder.CredentialRequestList)(nil), (*CredentialRequestList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_placeholder_CredentialRequestList_To_v1alpha1_CredentialRequestList(a.(*placeholder.CredentialRequestList), b.(*CredentialRequestList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CredentialRequestSpec)(nil), (*placeholder.CredentialRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_CredentialRequestSpec_To_placeholder_CredentialRequestSpec(a.(*CredentialRequestSpec), b.(*placeholder.CredentialRequestSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*placeholder.CredentialRequestSpec)(nil), (*CredentialRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_placeholder_CredentialRequestSpec_To_v1alpha1_CredentialRequestSpec(a.(*placeholder.CredentialRequestSpec), b.(*CredentialRequestSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CredentialRequestStatus)(nil), (*placeholder.CredentialRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_CredentialRequestStatus_To_placeholder_CredentialRequestStatus(a.(*CredentialRequestStatus), b.(*placeholder.CredentialRequestStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*placeholder.CredentialRequestStatus)(nil), (*CredentialRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_placeholder_CredentialRequestStatus_To_v1alpha1_CredentialRequestStatus(a.(*placeholder.CredentialRequestStatus), b.(*CredentialRequestStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CredentialRequestTokenCredential)(nil), (*placeholder.CredentialRequestTokenCredential)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_CredentialRequestTokenCredential_To_placeholder_CredentialRequestTokenCredential(a.(*CredentialRequestTokenCredential), b.(*placeholder.CredentialRequestTokenCredential), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*placeholder.CredentialRequestTokenCredential)(nil), (*CredentialRequestTokenCredential)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_placeholder_CredentialRequestTokenCredential_To_v1alpha1_CredentialRequestTokenCredential(a.(*placeholder.CredentialRequestTokenCredential), b.(*CredentialRequestTokenCredential), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha1_CredentialRequest_To_placeholder_CredentialRequest(in *CredentialRequest, out *placeholder.CredentialRequest, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha1_CredentialRequestSpec_To_placeholder_CredentialRequestSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha1_CredentialRequestStatus_To_placeholder_CredentialRequestStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_CredentialRequest_To_placeholder_CredentialRequest is an autogenerated conversion function. -func Convert_v1alpha1_CredentialRequest_To_placeholder_CredentialRequest(in *CredentialRequest, out *placeholder.CredentialRequest, s conversion.Scope) error { - return autoConvert_v1alpha1_CredentialRequest_To_placeholder_CredentialRequest(in, out, s) -} - -func autoConvert_placeholder_CredentialRequest_To_v1alpha1_CredentialRequest(in *placeholder.CredentialRequest, out *CredentialRequest, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_placeholder_CredentialRequestSpec_To_v1alpha1_CredentialRequestSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_placeholder_CredentialRequestStatus_To_v1alpha1_CredentialRequestStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_placeholder_CredentialRequest_To_v1alpha1_CredentialRequest is an autogenerated conversion function. -func Convert_placeholder_CredentialRequest_To_v1alpha1_CredentialRequest(in *placeholder.CredentialRequest, out *CredentialRequest, s conversion.Scope) error { - return autoConvert_placeholder_CredentialRequest_To_v1alpha1_CredentialRequest(in, out, s) -} - -func autoConvert_v1alpha1_CredentialRequestCredential_To_placeholder_CredentialRequestCredential(in *CredentialRequestCredential, out *placeholder.CredentialRequestCredential, s conversion.Scope) error { - out.ExpirationTimestamp = in.ExpirationTimestamp - out.Token = in.Token - out.ClientCertificateData = in.ClientCertificateData - out.ClientKeyData = in.ClientKeyData - return nil -} - -// Convert_v1alpha1_CredentialRequestCredential_To_placeholder_CredentialRequestCredential is an autogenerated conversion function. -func Convert_v1alpha1_CredentialRequestCredential_To_placeholder_CredentialRequestCredential(in *CredentialRequestCredential, out *placeholder.CredentialRequestCredential, s conversion.Scope) error { - return autoConvert_v1alpha1_CredentialRequestCredential_To_placeholder_CredentialRequestCredential(in, out, s) -} - -func autoConvert_placeholder_CredentialRequestCredential_To_v1alpha1_CredentialRequestCredential(in *placeholder.CredentialRequestCredential, out *CredentialRequestCredential, s conversion.Scope) error { - out.ExpirationTimestamp = in.ExpirationTimestamp - out.Token = in.Token - out.ClientCertificateData = in.ClientCertificateData - out.ClientKeyData = in.ClientKeyData - return nil -} - -// Convert_placeholder_CredentialRequestCredential_To_v1alpha1_CredentialRequestCredential is an autogenerated conversion function. -func Convert_placeholder_CredentialRequestCredential_To_v1alpha1_CredentialRequestCredential(in *placeholder.CredentialRequestCredential, out *CredentialRequestCredential, s conversion.Scope) error { - return autoConvert_placeholder_CredentialRequestCredential_To_v1alpha1_CredentialRequestCredential(in, out, s) -} - -func autoConvert_v1alpha1_CredentialRequestList_To_placeholder_CredentialRequestList(in *CredentialRequestList, out *placeholder.CredentialRequestList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]placeholder.CredentialRequest)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha1_CredentialRequestList_To_placeholder_CredentialRequestList is an autogenerated conversion function. -func Convert_v1alpha1_CredentialRequestList_To_placeholder_CredentialRequestList(in *CredentialRequestList, out *placeholder.CredentialRequestList, s conversion.Scope) error { - return autoConvert_v1alpha1_CredentialRequestList_To_placeholder_CredentialRequestList(in, out, s) -} - -func autoConvert_placeholder_CredentialRequestList_To_v1alpha1_CredentialRequestList(in *placeholder.CredentialRequestList, out *CredentialRequestList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]CredentialRequest)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_placeholder_CredentialRequestList_To_v1alpha1_CredentialRequestList is an autogenerated conversion function. -func Convert_placeholder_CredentialRequestList_To_v1alpha1_CredentialRequestList(in *placeholder.CredentialRequestList, out *CredentialRequestList, s conversion.Scope) error { - return autoConvert_placeholder_CredentialRequestList_To_v1alpha1_CredentialRequestList(in, out, s) -} - -func autoConvert_v1alpha1_CredentialRequestSpec_To_placeholder_CredentialRequestSpec(in *CredentialRequestSpec, out *placeholder.CredentialRequestSpec, s conversion.Scope) error { - out.Type = placeholder.CredentialType(in.Type) - out.Token = (*placeholder.CredentialRequestTokenCredential)(unsafe.Pointer(in.Token)) - return nil -} - -// Convert_v1alpha1_CredentialRequestSpec_To_placeholder_CredentialRequestSpec is an autogenerated conversion function. -func Convert_v1alpha1_CredentialRequestSpec_To_placeholder_CredentialRequestSpec(in *CredentialRequestSpec, out *placeholder.CredentialRequestSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_CredentialRequestSpec_To_placeholder_CredentialRequestSpec(in, out, s) -} - -func autoConvert_placeholder_CredentialRequestSpec_To_v1alpha1_CredentialRequestSpec(in *placeholder.CredentialRequestSpec, out *CredentialRequestSpec, s conversion.Scope) error { - out.Type = CredentialType(in.Type) - out.Token = (*CredentialRequestTokenCredential)(unsafe.Pointer(in.Token)) - return nil -} - -// Convert_placeholder_CredentialRequestSpec_To_v1alpha1_CredentialRequestSpec is an autogenerated conversion function. -func Convert_placeholder_CredentialRequestSpec_To_v1alpha1_CredentialRequestSpec(in *placeholder.CredentialRequestSpec, out *CredentialRequestSpec, s conversion.Scope) error { - return autoConvert_placeholder_CredentialRequestSpec_To_v1alpha1_CredentialRequestSpec(in, out, s) -} - -func autoConvert_v1alpha1_CredentialRequestStatus_To_placeholder_CredentialRequestStatus(in *CredentialRequestStatus, out *placeholder.CredentialRequestStatus, s conversion.Scope) error { - out.Credential = (*placeholder.CredentialRequestCredential)(unsafe.Pointer(in.Credential)) - out.Message = (*string)(unsafe.Pointer(in.Message)) - return nil -} - -// Convert_v1alpha1_CredentialRequestStatus_To_placeholder_CredentialRequestStatus is an autogenerated conversion function. -func Convert_v1alpha1_CredentialRequestStatus_To_placeholder_CredentialRequestStatus(in *CredentialRequestStatus, out *placeholder.CredentialRequestStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_CredentialRequestStatus_To_placeholder_CredentialRequestStatus(in, out, s) -} - -func autoConvert_placeholder_CredentialRequestStatus_To_v1alpha1_CredentialRequestStatus(in *placeholder.CredentialRequestStatus, out *CredentialRequestStatus, s conversion.Scope) error { - out.Credential = (*CredentialRequestCredential)(unsafe.Pointer(in.Credential)) - out.Message = (*string)(unsafe.Pointer(in.Message)) - return nil -} - -// Convert_placeholder_CredentialRequestStatus_To_v1alpha1_CredentialRequestStatus is an autogenerated conversion function. -func Convert_placeholder_CredentialRequestStatus_To_v1alpha1_CredentialRequestStatus(in *placeholder.CredentialRequestStatus, out *CredentialRequestStatus, s conversion.Scope) error { - return autoConvert_placeholder_CredentialRequestStatus_To_v1alpha1_CredentialRequestStatus(in, out, s) -} - -func autoConvert_v1alpha1_CredentialRequestTokenCredential_To_placeholder_CredentialRequestTokenCredential(in *CredentialRequestTokenCredential, out *placeholder.CredentialRequestTokenCredential, s conversion.Scope) error { - out.Value = in.Value - return nil -} - -// Convert_v1alpha1_CredentialRequestTokenCredential_To_placeholder_CredentialRequestTokenCredential is an autogenerated conversion function. -func Convert_v1alpha1_CredentialRequestTokenCredential_To_placeholder_CredentialRequestTokenCredential(in *CredentialRequestTokenCredential, out *placeholder.CredentialRequestTokenCredential, s conversion.Scope) error { - return autoConvert_v1alpha1_CredentialRequestTokenCredential_To_placeholder_CredentialRequestTokenCredential(in, out, s) -} - -func autoConvert_placeholder_CredentialRequestTokenCredential_To_v1alpha1_CredentialRequestTokenCredential(in *placeholder.CredentialRequestTokenCredential, out *CredentialRequestTokenCredential, s conversion.Scope) error { - out.Value = in.Value - return nil -} - -// Convert_placeholder_CredentialRequestTokenCredential_To_v1alpha1_CredentialRequestTokenCredential is an autogenerated conversion function. -func Convert_placeholder_CredentialRequestTokenCredential_To_v1alpha1_CredentialRequestTokenCredential(in *placeholder.CredentialRequestTokenCredential, out *CredentialRequestTokenCredential, s conversion.Scope) error { - return autoConvert_placeholder_CredentialRequestTokenCredential_To_v1alpha1_CredentialRequestTokenCredential(in, out, s) -} diff --git a/kubernetes/1.19/api/generated/openapi/zz_generated.openapi.go b/kubernetes/1.19/api/generated/openapi/zz_generated.openapi.go index 593483852..cde35adac 100644 --- a/kubernetes/1.19/api/generated/openapi/zz_generated.openapi.go +++ b/kubernetes/1.19/api/generated/openapi/zz_generated.openapi.go @@ -19,71 +19,71 @@ import ( func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { return map[string]common.OpenAPIDefinition{ - "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/crdsplaceholder/v1alpha1.LoginDiscoveryConfig": schema_api_apis_crdsplaceholder_v1alpha1_LoginDiscoveryConfig(ref), - "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/crdsplaceholder/v1alpha1.LoginDiscoveryConfigList": schema_api_apis_crdsplaceholder_v1alpha1_LoginDiscoveryConfigList(ref), - "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/crdsplaceholder/v1alpha1.LoginDiscoveryConfigSpec": schema_api_apis_crdsplaceholder_v1alpha1_LoginDiscoveryConfigSpec(ref), - "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/placeholder/v1alpha1.CredentialRequest": schema_api_apis_placeholder_v1alpha1_CredentialRequest(ref), - "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/placeholder/v1alpha1.CredentialRequestCredential": schema_api_apis_placeholder_v1alpha1_CredentialRequestCredential(ref), - "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/placeholder/v1alpha1.CredentialRequestList": schema_api_apis_placeholder_v1alpha1_CredentialRequestList(ref), - "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/placeholder/v1alpha1.CredentialRequestSpec": schema_api_apis_placeholder_v1alpha1_CredentialRequestSpec(ref), - "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/placeholder/v1alpha1.CredentialRequestStatus": schema_api_apis_placeholder_v1alpha1_CredentialRequestStatus(ref), - "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/placeholder/v1alpha1.CredentialRequestTokenCredential": schema_api_apis_placeholder_v1alpha1_CredentialRequestTokenCredential(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup": schema_pkg_apis_meta_v1_APIGroup(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroupList": schema_pkg_apis_meta_v1_APIGroupList(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIResource": schema_pkg_apis_meta_v1_APIResource(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIResourceList": schema_pkg_apis_meta_v1_APIResourceList(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIVersions": schema_pkg_apis_meta_v1_APIVersions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Condition": schema_pkg_apis_meta_v1_Condition(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.CreateOptions": schema_pkg_apis_meta_v1_CreateOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions": schema_pkg_apis_meta_v1_DeleteOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration": schema_pkg_apis_meta_v1_Duration(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ExportOptions": schema_pkg_apis_meta_v1_ExportOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1": schema_pkg_apis_meta_v1_FieldsV1(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GetOptions": schema_pkg_apis_meta_v1_GetOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupKind": schema_pkg_apis_meta_v1_GroupKind(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupResource": schema_pkg_apis_meta_v1_GroupResource(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersion": schema_pkg_apis_meta_v1_GroupVersion(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery": schema_pkg_apis_meta_v1_GroupVersionForDiscovery(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionKind": schema_pkg_apis_meta_v1_GroupVersionKind(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionResource": schema_pkg_apis_meta_v1_GroupVersionResource(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.InternalEvent": schema_pkg_apis_meta_v1_InternalEvent(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector": schema_pkg_apis_meta_v1_LabelSelector(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement": schema_pkg_apis_meta_v1_LabelSelectorRequirement(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.List": schema_pkg_apis_meta_v1_List(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta": schema_pkg_apis_meta_v1_ListMeta(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ListOptions": schema_pkg_apis_meta_v1_ListOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry": schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime": schema_pkg_apis_meta_v1_MicroTime(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta": schema_pkg_apis_meta_v1_ObjectMeta(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference": schema_pkg_apis_meta_v1_OwnerReference(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata": schema_pkg_apis_meta_v1_PartialObjectMetadata(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadataList": schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Patch": schema_pkg_apis_meta_v1_Patch(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.PatchOptions": schema_pkg_apis_meta_v1_PatchOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions": schema_pkg_apis_meta_v1_Preconditions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.RootPaths": schema_pkg_apis_meta_v1_RootPaths(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR": schema_pkg_apis_meta_v1_ServerAddressByClientCIDR(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Status": schema_pkg_apis_meta_v1_Status(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause": schema_pkg_apis_meta_v1_StatusCause(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails": schema_pkg_apis_meta_v1_StatusDetails(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Table": schema_pkg_apis_meta_v1_Table(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition": schema_pkg_apis_meta_v1_TableColumnDefinition(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TableOptions": schema_pkg_apis_meta_v1_TableOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TableRow": schema_pkg_apis_meta_v1_TableRow(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition": schema_pkg_apis_meta_v1_TableRowCondition(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Time": schema_pkg_apis_meta_v1_Time(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Timestamp": schema_pkg_apis_meta_v1_Timestamp(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TypeMeta": schema_pkg_apis_meta_v1_TypeMeta(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.UpdateOptions": schema_pkg_apis_meta_v1_UpdateOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.WatchEvent": schema_pkg_apis_meta_v1_WatchEvent(ref), - "k8s.io/apimachinery/pkg/runtime.RawExtension": schema_k8sio_apimachinery_pkg_runtime_RawExtension(ref), - "k8s.io/apimachinery/pkg/runtime.TypeMeta": schema_k8sio_apimachinery_pkg_runtime_TypeMeta(ref), - "k8s.io/apimachinery/pkg/runtime.Unknown": schema_k8sio_apimachinery_pkg_runtime_Unknown(ref), - "k8s.io/apimachinery/pkg/version.Info": schema_k8sio_apimachinery_pkg_version_Info(ref), + "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/crdpinniped/v1alpha1.PinnipedDiscoveryInfo": schema_api_apis_crdpinniped_v1alpha1_PinnipedDiscoveryInfo(ref), + "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/crdpinniped/v1alpha1.PinnipedDiscoveryInfoList": schema_api_apis_crdpinniped_v1alpha1_PinnipedDiscoveryInfoList(ref), + "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/crdpinniped/v1alpha1.PinnipedDiscoveryInfoSpec": schema_api_apis_crdpinniped_v1alpha1_PinnipedDiscoveryInfoSpec(ref), + "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1.CredentialRequest": schema_api_apis_pinniped_v1alpha1_CredentialRequest(ref), + "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1.CredentialRequestCredential": schema_api_apis_pinniped_v1alpha1_CredentialRequestCredential(ref), + "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1.CredentialRequestList": schema_api_apis_pinniped_v1alpha1_CredentialRequestList(ref), + "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1.CredentialRequestSpec": schema_api_apis_pinniped_v1alpha1_CredentialRequestSpec(ref), + "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1.CredentialRequestStatus": schema_api_apis_pinniped_v1alpha1_CredentialRequestStatus(ref), + "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1.CredentialRequestTokenCredential": schema_api_apis_pinniped_v1alpha1_CredentialRequestTokenCredential(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup": schema_pkg_apis_meta_v1_APIGroup(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroupList": schema_pkg_apis_meta_v1_APIGroupList(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.APIResource": schema_pkg_apis_meta_v1_APIResource(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.APIResourceList": schema_pkg_apis_meta_v1_APIResourceList(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.APIVersions": schema_pkg_apis_meta_v1_APIVersions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Condition": schema_pkg_apis_meta_v1_Condition(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.CreateOptions": schema_pkg_apis_meta_v1_CreateOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions": schema_pkg_apis_meta_v1_DeleteOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration": schema_pkg_apis_meta_v1_Duration(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.ExportOptions": schema_pkg_apis_meta_v1_ExportOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1": schema_pkg_apis_meta_v1_FieldsV1(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GetOptions": schema_pkg_apis_meta_v1_GetOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupKind": schema_pkg_apis_meta_v1_GroupKind(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupResource": schema_pkg_apis_meta_v1_GroupResource(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersion": schema_pkg_apis_meta_v1_GroupVersion(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery": schema_pkg_apis_meta_v1_GroupVersionForDiscovery(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionKind": schema_pkg_apis_meta_v1_GroupVersionKind(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionResource": schema_pkg_apis_meta_v1_GroupVersionResource(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.InternalEvent": schema_pkg_apis_meta_v1_InternalEvent(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector": schema_pkg_apis_meta_v1_LabelSelector(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement": schema_pkg_apis_meta_v1_LabelSelectorRequirement(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.List": schema_pkg_apis_meta_v1_List(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta": schema_pkg_apis_meta_v1_ListMeta(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.ListOptions": schema_pkg_apis_meta_v1_ListOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry": schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime": schema_pkg_apis_meta_v1_MicroTime(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta": schema_pkg_apis_meta_v1_ObjectMeta(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference": schema_pkg_apis_meta_v1_OwnerReference(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata": schema_pkg_apis_meta_v1_PartialObjectMetadata(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadataList": schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Patch": schema_pkg_apis_meta_v1_Patch(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.PatchOptions": schema_pkg_apis_meta_v1_PatchOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions": schema_pkg_apis_meta_v1_Preconditions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.RootPaths": schema_pkg_apis_meta_v1_RootPaths(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR": schema_pkg_apis_meta_v1_ServerAddressByClientCIDR(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Status": schema_pkg_apis_meta_v1_Status(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause": schema_pkg_apis_meta_v1_StatusCause(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails": schema_pkg_apis_meta_v1_StatusDetails(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Table": schema_pkg_apis_meta_v1_Table(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition": schema_pkg_apis_meta_v1_TableColumnDefinition(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.TableOptions": schema_pkg_apis_meta_v1_TableOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.TableRow": schema_pkg_apis_meta_v1_TableRow(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition": schema_pkg_apis_meta_v1_TableRowCondition(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Time": schema_pkg_apis_meta_v1_Time(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Timestamp": schema_pkg_apis_meta_v1_Timestamp(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.TypeMeta": schema_pkg_apis_meta_v1_TypeMeta(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.UpdateOptions": schema_pkg_apis_meta_v1_UpdateOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.WatchEvent": schema_pkg_apis_meta_v1_WatchEvent(ref), + "k8s.io/apimachinery/pkg/runtime.RawExtension": schema_k8sio_apimachinery_pkg_runtime_RawExtension(ref), + "k8s.io/apimachinery/pkg/runtime.TypeMeta": schema_k8sio_apimachinery_pkg_runtime_TypeMeta(ref), + "k8s.io/apimachinery/pkg/runtime.Unknown": schema_k8sio_apimachinery_pkg_runtime_Unknown(ref), + "k8s.io/apimachinery/pkg/version.Info": schema_k8sio_apimachinery_pkg_version_Info(ref), } } -func schema_api_apis_crdsplaceholder_v1alpha1_LoginDiscoveryConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_apis_crdpinniped_v1alpha1_PinnipedDiscoveryInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -110,7 +110,7 @@ func schema_api_apis_crdsplaceholder_v1alpha1_LoginDiscoveryConfig(ref common.Re }, "spec": { SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/crdsplaceholder/v1alpha1.LoginDiscoveryConfigSpec"), + Ref: ref("github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/crdpinniped/v1alpha1.PinnipedDiscoveryInfoSpec"), }, }, }, @@ -118,11 +118,11 @@ func schema_api_apis_crdsplaceholder_v1alpha1_LoginDiscoveryConfig(ref common.Re }, }, Dependencies: []string{ - "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/crdsplaceholder/v1alpha1.LoginDiscoveryConfigSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/crdpinniped/v1alpha1.PinnipedDiscoveryInfoSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_api_apis_crdsplaceholder_v1alpha1_LoginDiscoveryConfigList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_apis_crdpinniped_v1alpha1_PinnipedDiscoveryInfoList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -153,7 +153,7 @@ func schema_api_apis_crdsplaceholder_v1alpha1_LoginDiscoveryConfigList(ref commo Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/crdsplaceholder/v1alpha1.LoginDiscoveryConfig"), + Ref: ref("github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/crdpinniped/v1alpha1.PinnipedDiscoveryInfo"), }, }, }, @@ -164,11 +164,11 @@ func schema_api_apis_crdsplaceholder_v1alpha1_LoginDiscoveryConfigList(ref commo }, }, Dependencies: []string{ - "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/crdsplaceholder/v1alpha1.LoginDiscoveryConfig", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/crdpinniped/v1alpha1.PinnipedDiscoveryInfo", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_api_apis_crdsplaceholder_v1alpha1_LoginDiscoveryConfigSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_apis_crdpinniped_v1alpha1_PinnipedDiscoveryInfoSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -194,7 +194,7 @@ func schema_api_apis_crdsplaceholder_v1alpha1_LoginDiscoveryConfigSpec(ref commo } } -func schema_api_apis_placeholder_v1alpha1_CredentialRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_apis_pinniped_v1alpha1_CredentialRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -221,23 +221,23 @@ func schema_api_apis_placeholder_v1alpha1_CredentialRequest(ref common.Reference }, "spec": { SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/placeholder/v1alpha1.CredentialRequestSpec"), + Ref: ref("github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1.CredentialRequestSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/placeholder/v1alpha1.CredentialRequestStatus"), + Ref: ref("github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1.CredentialRequestStatus"), }, }, }, }, }, Dependencies: []string{ - "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/placeholder/v1alpha1.CredentialRequestSpec", "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/placeholder/v1alpha1.CredentialRequestStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1.CredentialRequestSpec", "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1.CredentialRequestStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_api_apis_placeholder_v1alpha1_CredentialRequestCredential(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_apis_pinniped_v1alpha1_CredentialRequestCredential(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -278,7 +278,7 @@ func schema_api_apis_placeholder_v1alpha1_CredentialRequestCredential(ref common } } -func schema_api_apis_placeholder_v1alpha1_CredentialRequestList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_apis_pinniped_v1alpha1_CredentialRequestList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -310,7 +310,7 @@ func schema_api_apis_placeholder_v1alpha1_CredentialRequestList(ref common.Refer Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/placeholder/v1alpha1.CredentialRequest"), + Ref: ref("github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1.CredentialRequest"), }, }, }, @@ -321,11 +321,11 @@ func schema_api_apis_placeholder_v1alpha1_CredentialRequestList(ref common.Refer }, }, Dependencies: []string{ - "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/placeholder/v1alpha1.CredentialRequest", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1.CredentialRequest", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_api_apis_placeholder_v1alpha1_CredentialRequestSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_apis_pinniped_v1alpha1_CredentialRequestSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -341,18 +341,18 @@ func schema_api_apis_placeholder_v1alpha1_CredentialRequestSpec(ref common.Refer "token": { SchemaProps: spec.SchemaProps{ Description: "Token credential (when Type == TokenCredentialType).", - Ref: ref("github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/placeholder/v1alpha1.CredentialRequestTokenCredential"), + Ref: ref("github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1.CredentialRequestTokenCredential"), }, }, }, }, }, Dependencies: []string{ - "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/placeholder/v1alpha1.CredentialRequestTokenCredential"}, + "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1.CredentialRequestTokenCredential"}, } } -func schema_api_apis_placeholder_v1alpha1_CredentialRequestStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_apis_pinniped_v1alpha1_CredentialRequestStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -361,7 +361,7 @@ func schema_api_apis_placeholder_v1alpha1_CredentialRequestStatus(ref common.Ref "credential": { SchemaProps: spec.SchemaProps{ Description: "A Credential will be returned for a successful credential request.", - Ref: ref("github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/placeholder/v1alpha1.CredentialRequestCredential"), + Ref: ref("github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1.CredentialRequestCredential"), }, }, "message": { @@ -375,11 +375,11 @@ func schema_api_apis_placeholder_v1alpha1_CredentialRequestStatus(ref common.Ref }, }, Dependencies: []string{ - "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/placeholder/v1alpha1.CredentialRequestCredential"}, + "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1.CredentialRequestCredential"}, } } -func schema_api_apis_placeholder_v1alpha1_CredentialRequestTokenCredential(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_apis_pinniped_v1alpha1_CredentialRequestTokenCredential(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ diff --git a/kubernetes/1.19/api/go.mod b/kubernetes/1.19/api/go.mod index b7ba4070a..367ba6811 100644 --- a/kubernetes/1.19/api/go.mod +++ b/kubernetes/1.19/api/go.mod @@ -1,4 +1,4 @@ -module github.com/suzerain-io/placeholder-name/kubernetes/1.19/api +module github.com/suzerain-io/pinniped/kubernetes/1.19/api go 1.14 diff --git a/kubernetes/1.19/client-go/clientset/versioned/clientset.go b/kubernetes/1.19/client-go/clientset/versioned/clientset.go index b61bfc4df..d55d352a3 100644 --- a/kubernetes/1.19/client-go/clientset/versioned/clientset.go +++ b/kubernetes/1.19/client-go/clientset/versioned/clientset.go @@ -10,35 +10,36 @@ package versioned import ( "fmt" - crdsv1alpha1 "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/clientset/versioned/typed/crdsplaceholder/v1alpha1" - placeholderv1alpha1 "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/clientset/versioned/typed/placeholder/v1alpha1" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" flowcontrol "k8s.io/client-go/util/flowcontrol" + + crdv1alpha1 "github.com/suzerain-io/pinniped/kubernetes/1.19/client-go/clientset/versioned/typed/crdpinniped/v1alpha1" + pinnipedv1alpha1 "github.com/suzerain-io/pinniped/kubernetes/1.19/client-go/clientset/versioned/typed/pinniped/v1alpha1" ) type Interface interface { Discovery() discovery.DiscoveryInterface - CrdsV1alpha1() crdsv1alpha1.CrdsV1alpha1Interface - PlaceholderV1alpha1() placeholderv1alpha1.PlaceholderV1alpha1Interface + CrdV1alpha1() crdv1alpha1.CrdV1alpha1Interface + PinnipedV1alpha1() pinnipedv1alpha1.PinnipedV1alpha1Interface } // Clientset contains the clients for groups. Each group has exactly one // version included in a Clientset. type Clientset struct { *discovery.DiscoveryClient - crdsV1alpha1 *crdsv1alpha1.CrdsV1alpha1Client - placeholderV1alpha1 *placeholderv1alpha1.PlaceholderV1alpha1Client + crdV1alpha1 *crdv1alpha1.CrdV1alpha1Client + pinnipedV1alpha1 *pinnipedv1alpha1.PinnipedV1alpha1Client } -// CrdsV1alpha1 retrieves the CrdsV1alpha1Client -func (c *Clientset) CrdsV1alpha1() crdsv1alpha1.CrdsV1alpha1Interface { - return c.crdsV1alpha1 +// CrdV1alpha1 retrieves the CrdV1alpha1Client +func (c *Clientset) CrdV1alpha1() crdv1alpha1.CrdV1alpha1Interface { + return c.crdV1alpha1 } -// PlaceholderV1alpha1 retrieves the PlaceholderV1alpha1Client -func (c *Clientset) PlaceholderV1alpha1() placeholderv1alpha1.PlaceholderV1alpha1Interface { - return c.placeholderV1alpha1 +// PinnipedV1alpha1 retrieves the PinnipedV1alpha1Client +func (c *Clientset) PinnipedV1alpha1() pinnipedv1alpha1.PinnipedV1alpha1Interface { + return c.pinnipedV1alpha1 } // Discovery retrieves the DiscoveryClient @@ -62,11 +63,11 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { } var cs Clientset var err error - cs.crdsV1alpha1, err = crdsv1alpha1.NewForConfig(&configShallowCopy) + cs.crdV1alpha1, err = crdv1alpha1.NewForConfig(&configShallowCopy) if err != nil { return nil, err } - cs.placeholderV1alpha1, err = placeholderv1alpha1.NewForConfig(&configShallowCopy) + cs.pinnipedV1alpha1, err = pinnipedv1alpha1.NewForConfig(&configShallowCopy) if err != nil { return nil, err } @@ -82,8 +83,8 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { // panics if there is an error in the config. func NewForConfigOrDie(c *rest.Config) *Clientset { var cs Clientset - cs.crdsV1alpha1 = crdsv1alpha1.NewForConfigOrDie(c) - cs.placeholderV1alpha1 = placeholderv1alpha1.NewForConfigOrDie(c) + cs.crdV1alpha1 = crdv1alpha1.NewForConfigOrDie(c) + cs.pinnipedV1alpha1 = pinnipedv1alpha1.NewForConfigOrDie(c) cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) return &cs @@ -92,8 +93,8 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { // New creates a new Clientset for the given RESTClient. func New(c rest.Interface) *Clientset { var cs Clientset - cs.crdsV1alpha1 = crdsv1alpha1.New(c) - cs.placeholderV1alpha1 = placeholderv1alpha1.New(c) + cs.crdV1alpha1 = crdv1alpha1.New(c) + cs.pinnipedV1alpha1 = pinnipedv1alpha1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) return &cs diff --git a/kubernetes/1.19/client-go/clientset/versioned/fake/clientset_generated.go b/kubernetes/1.19/client-go/clientset/versioned/fake/clientset_generated.go index 62da952b5..c8a874f79 100644 --- a/kubernetes/1.19/client-go/clientset/versioned/fake/clientset_generated.go +++ b/kubernetes/1.19/client-go/clientset/versioned/fake/clientset_generated.go @@ -8,16 +8,17 @@ SPDX-License-Identifier: Apache-2.0 package fake import ( - clientset "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/clientset/versioned" - crdsv1alpha1 "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/clientset/versioned/typed/crdsplaceholder/v1alpha1" - fakecrdsv1alpha1 "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/clientset/versioned/typed/crdsplaceholder/v1alpha1/fake" - placeholderv1alpha1 "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/clientset/versioned/typed/placeholder/v1alpha1" - fakeplaceholderv1alpha1 "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/clientset/versioned/typed/placeholder/v1alpha1/fake" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/discovery" fakediscovery "k8s.io/client-go/discovery/fake" "k8s.io/client-go/testing" + + clientset "github.com/suzerain-io/pinniped/kubernetes/1.19/client-go/clientset/versioned" + crdv1alpha1 "github.com/suzerain-io/pinniped/kubernetes/1.19/client-go/clientset/versioned/typed/crdpinniped/v1alpha1" + fakecrdv1alpha1 "github.com/suzerain-io/pinniped/kubernetes/1.19/client-go/clientset/versioned/typed/crdpinniped/v1alpha1/fake" + pinnipedv1alpha1 "github.com/suzerain-io/pinniped/kubernetes/1.19/client-go/clientset/versioned/typed/pinniped/v1alpha1" + fakepinnipedv1alpha1 "github.com/suzerain-io/pinniped/kubernetes/1.19/client-go/clientset/versioned/typed/pinniped/v1alpha1/fake" ) // NewSimpleClientset returns a clientset that will respond with the provided objects. @@ -67,12 +68,12 @@ func (c *Clientset) Tracker() testing.ObjectTracker { var _ clientset.Interface = &Clientset{} -// CrdsV1alpha1 retrieves the CrdsV1alpha1Client -func (c *Clientset) CrdsV1alpha1() crdsv1alpha1.CrdsV1alpha1Interface { - return &fakecrdsv1alpha1.FakeCrdsV1alpha1{Fake: &c.Fake} +// CrdV1alpha1 retrieves the CrdV1alpha1Client +func (c *Clientset) CrdV1alpha1() crdv1alpha1.CrdV1alpha1Interface { + return &fakecrdv1alpha1.FakeCrdV1alpha1{Fake: &c.Fake} } -// PlaceholderV1alpha1 retrieves the PlaceholderV1alpha1Client -func (c *Clientset) PlaceholderV1alpha1() placeholderv1alpha1.PlaceholderV1alpha1Interface { - return &fakeplaceholderv1alpha1.FakePlaceholderV1alpha1{Fake: &c.Fake} +// PinnipedV1alpha1 retrieves the PinnipedV1alpha1Client +func (c *Clientset) PinnipedV1alpha1() pinnipedv1alpha1.PinnipedV1alpha1Interface { + return &fakepinnipedv1alpha1.FakePinnipedV1alpha1{Fake: &c.Fake} } diff --git a/kubernetes/1.19/client-go/clientset/versioned/fake/register.go b/kubernetes/1.19/client-go/clientset/versioned/fake/register.go index 991dde53b..bfadb21cc 100644 --- a/kubernetes/1.19/client-go/clientset/versioned/fake/register.go +++ b/kubernetes/1.19/client-go/clientset/versioned/fake/register.go @@ -8,21 +8,22 @@ SPDX-License-Identifier: Apache-2.0 package fake import ( - crdsv1alpha1 "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/crdsplaceholder/v1alpha1" - placeholderv1alpha1 "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/placeholder/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" utilruntime "k8s.io/apimachinery/pkg/util/runtime" + + crdv1alpha1 "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/crdpinniped/v1alpha1" + pinnipedv1alpha1 "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1" ) var scheme = runtime.NewScheme() var codecs = serializer.NewCodecFactory(scheme) var localSchemeBuilder = runtime.SchemeBuilder{ - crdsv1alpha1.AddToScheme, - placeholderv1alpha1.AddToScheme, + crdv1alpha1.AddToScheme, + pinnipedv1alpha1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/kubernetes/1.19/client-go/clientset/versioned/scheme/register.go b/kubernetes/1.19/client-go/clientset/versioned/scheme/register.go index 099007540..2be3f6c9a 100644 --- a/kubernetes/1.19/client-go/clientset/versioned/scheme/register.go +++ b/kubernetes/1.19/client-go/clientset/versioned/scheme/register.go @@ -8,21 +8,22 @@ SPDX-License-Identifier: Apache-2.0 package scheme import ( - crdsv1alpha1 "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/crdsplaceholder/v1alpha1" - placeholderv1alpha1 "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/placeholder/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" utilruntime "k8s.io/apimachinery/pkg/util/runtime" + + crdv1alpha1 "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/crdpinniped/v1alpha1" + pinnipedv1alpha1 "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1" ) var Scheme = runtime.NewScheme() var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) var localSchemeBuilder = runtime.SchemeBuilder{ - crdsv1alpha1.AddToScheme, - placeholderv1alpha1.AddToScheme, + crdv1alpha1.AddToScheme, + pinnipedv1alpha1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/kubernetes/1.19/client-go/clientset/versioned/typed/crdpinniped/v1alpha1/crdpinniped_client.go b/kubernetes/1.19/client-go/clientset/versioned/typed/crdpinniped/v1alpha1/crdpinniped_client.go new file mode 100644 index 000000000..e6081f915 --- /dev/null +++ b/kubernetes/1.19/client-go/clientset/versioned/typed/crdpinniped/v1alpha1/crdpinniped_client.go @@ -0,0 +1,79 @@ +/* +Copyright 2020 VMware, Inc. +SPDX-License-Identifier: Apache-2.0 +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + rest "k8s.io/client-go/rest" + + v1alpha1 "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/crdpinniped/v1alpha1" + "github.com/suzerain-io/pinniped/kubernetes/1.19/client-go/clientset/versioned/scheme" +) + +type CrdV1alpha1Interface interface { + RESTClient() rest.Interface + PinnipedDiscoveryInfosGetter +} + +// CrdV1alpha1Client is used to interact with features provided by the crd.pinniped.dev group. +type CrdV1alpha1Client struct { + restClient rest.Interface +} + +func (c *CrdV1alpha1Client) PinnipedDiscoveryInfos(namespace string) PinnipedDiscoveryInfoInterface { + return newPinnipedDiscoveryInfos(c, namespace) +} + +// NewForConfig creates a new CrdV1alpha1Client for the given config. +func NewForConfig(c *rest.Config) (*CrdV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &CrdV1alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new CrdV1alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *CrdV1alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new CrdV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *CrdV1alpha1Client { + return &CrdV1alpha1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1alpha1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *CrdV1alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/kubernetes/1.19/client-go/clientset/versioned/typed/crdsplaceholder/v1alpha1/doc.go b/kubernetes/1.19/client-go/clientset/versioned/typed/crdpinniped/v1alpha1/doc.go similarity index 100% rename from kubernetes/1.19/client-go/clientset/versioned/typed/crdsplaceholder/v1alpha1/doc.go rename to kubernetes/1.19/client-go/clientset/versioned/typed/crdpinniped/v1alpha1/doc.go diff --git a/kubernetes/1.19/client-go/clientset/versioned/typed/crdsplaceholder/v1alpha1/fake/doc.go b/kubernetes/1.19/client-go/clientset/versioned/typed/crdpinniped/v1alpha1/fake/doc.go similarity index 100% rename from kubernetes/1.19/client-go/clientset/versioned/typed/crdsplaceholder/v1alpha1/fake/doc.go rename to kubernetes/1.19/client-go/clientset/versioned/typed/crdpinniped/v1alpha1/fake/doc.go diff --git a/kubernetes/1.19/client-go/clientset/versioned/typed/crdsplaceholder/v1alpha1/fake/fake_crdsplaceholder_client.go b/kubernetes/1.19/client-go/clientset/versioned/typed/crdpinniped/v1alpha1/fake/fake_crdpinniped_client.go similarity index 50% rename from kubernetes/1.19/client-go/clientset/versioned/typed/crdsplaceholder/v1alpha1/fake/fake_crdsplaceholder_client.go rename to kubernetes/1.19/client-go/clientset/versioned/typed/crdpinniped/v1alpha1/fake/fake_crdpinniped_client.go index c0c6c5b8a..6705738e5 100644 --- a/kubernetes/1.19/client-go/clientset/versioned/typed/crdsplaceholder/v1alpha1/fake/fake_crdsplaceholder_client.go +++ b/kubernetes/1.19/client-go/clientset/versioned/typed/crdpinniped/v1alpha1/fake/fake_crdpinniped_client.go @@ -8,22 +8,23 @@ SPDX-License-Identifier: Apache-2.0 package fake import ( - v1alpha1 "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/clientset/versioned/typed/crdsplaceholder/v1alpha1" rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" + + v1alpha1 "github.com/suzerain-io/pinniped/kubernetes/1.19/client-go/clientset/versioned/typed/crdpinniped/v1alpha1" ) -type FakeCrdsV1alpha1 struct { +type FakeCrdV1alpha1 struct { *testing.Fake } -func (c *FakeCrdsV1alpha1) LoginDiscoveryConfigs(namespace string) v1alpha1.LoginDiscoveryConfigInterface { - return &FakeLoginDiscoveryConfigs{c, namespace} +func (c *FakeCrdV1alpha1) PinnipedDiscoveryInfos(namespace string) v1alpha1.PinnipedDiscoveryInfoInterface { + return &FakePinnipedDiscoveryInfos{c, namespace} } // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeCrdsV1alpha1) RESTClient() rest.Interface { +func (c *FakeCrdV1alpha1) RESTClient() rest.Interface { var ret *rest.RESTClient return ret } diff --git a/kubernetes/1.19/client-go/clientset/versioned/typed/crdpinniped/v1alpha1/fake/fake_pinnipeddiscoveryinfo.go b/kubernetes/1.19/client-go/clientset/versioned/typed/crdpinniped/v1alpha1/fake/fake_pinnipeddiscoveryinfo.go new file mode 100644 index 000000000..90b3f729c --- /dev/null +++ b/kubernetes/1.19/client-go/clientset/versioned/typed/crdpinniped/v1alpha1/fake/fake_pinnipeddiscoveryinfo.go @@ -0,0 +1,120 @@ +/* +Copyright 2020 VMware, Inc. +SPDX-License-Identifier: Apache-2.0 +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" + + v1alpha1 "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/crdpinniped/v1alpha1" +) + +// FakePinnipedDiscoveryInfos implements PinnipedDiscoveryInfoInterface +type FakePinnipedDiscoveryInfos struct { + Fake *FakeCrdV1alpha1 + ns string +} + +var pinnipeddiscoveryinfosResource = schema.GroupVersionResource{Group: "crd.pinniped.dev", Version: "v1alpha1", Resource: "pinnipeddiscoveryinfos"} + +var pinnipeddiscoveryinfosKind = schema.GroupVersionKind{Group: "crd.pinniped.dev", Version: "v1alpha1", Kind: "PinnipedDiscoveryInfo"} + +// Get takes name of the pinnipedDiscoveryInfo, and returns the corresponding pinnipedDiscoveryInfo object, and an error if there is any. +func (c *FakePinnipedDiscoveryInfos) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.PinnipedDiscoveryInfo, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(pinnipeddiscoveryinfosResource, c.ns, name), &v1alpha1.PinnipedDiscoveryInfo{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.PinnipedDiscoveryInfo), err +} + +// List takes label and field selectors, and returns the list of PinnipedDiscoveryInfos that match those selectors. +func (c *FakePinnipedDiscoveryInfos) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.PinnipedDiscoveryInfoList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(pinnipeddiscoveryinfosResource, pinnipeddiscoveryinfosKind, c.ns, opts), &v1alpha1.PinnipedDiscoveryInfoList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.PinnipedDiscoveryInfoList{ListMeta: obj.(*v1alpha1.PinnipedDiscoveryInfoList).ListMeta} + for _, item := range obj.(*v1alpha1.PinnipedDiscoveryInfoList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested pinnipedDiscoveryInfos. +func (c *FakePinnipedDiscoveryInfos) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(pinnipeddiscoveryinfosResource, c.ns, opts)) + +} + +// Create takes the representation of a pinnipedDiscoveryInfo and creates it. Returns the server's representation of the pinnipedDiscoveryInfo, and an error, if there is any. +func (c *FakePinnipedDiscoveryInfos) Create(ctx context.Context, pinnipedDiscoveryInfo *v1alpha1.PinnipedDiscoveryInfo, opts v1.CreateOptions) (result *v1alpha1.PinnipedDiscoveryInfo, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(pinnipeddiscoveryinfosResource, c.ns, pinnipedDiscoveryInfo), &v1alpha1.PinnipedDiscoveryInfo{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.PinnipedDiscoveryInfo), err +} + +// Update takes the representation of a pinnipedDiscoveryInfo and updates it. Returns the server's representation of the pinnipedDiscoveryInfo, and an error, if there is any. +func (c *FakePinnipedDiscoveryInfos) Update(ctx context.Context, pinnipedDiscoveryInfo *v1alpha1.PinnipedDiscoveryInfo, opts v1.UpdateOptions) (result *v1alpha1.PinnipedDiscoveryInfo, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(pinnipeddiscoveryinfosResource, c.ns, pinnipedDiscoveryInfo), &v1alpha1.PinnipedDiscoveryInfo{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.PinnipedDiscoveryInfo), err +} + +// Delete takes name of the pinnipedDiscoveryInfo and deletes it. Returns an error if one occurs. +func (c *FakePinnipedDiscoveryInfos) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(pinnipeddiscoveryinfosResource, c.ns, name), &v1alpha1.PinnipedDiscoveryInfo{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakePinnipedDiscoveryInfos) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(pinnipeddiscoveryinfosResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.PinnipedDiscoveryInfoList{}) + return err +} + +// Patch applies the patch and returns the patched pinnipedDiscoveryInfo. +func (c *FakePinnipedDiscoveryInfos) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PinnipedDiscoveryInfo, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(pinnipeddiscoveryinfosResource, c.ns, name, pt, data, subresources...), &v1alpha1.PinnipedDiscoveryInfo{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.PinnipedDiscoveryInfo), err +} diff --git a/kubernetes/1.19/client-go/clientset/versioned/typed/crdsplaceholder/v1alpha1/generated_expansion.go b/kubernetes/1.19/client-go/clientset/versioned/typed/crdpinniped/v1alpha1/generated_expansion.go similarity index 73% rename from kubernetes/1.19/client-go/clientset/versioned/typed/crdsplaceholder/v1alpha1/generated_expansion.go rename to kubernetes/1.19/client-go/clientset/versioned/typed/crdpinniped/v1alpha1/generated_expansion.go index 588ceb5b4..7fc2b8a52 100644 --- a/kubernetes/1.19/client-go/clientset/versioned/typed/crdsplaceholder/v1alpha1/generated_expansion.go +++ b/kubernetes/1.19/client-go/clientset/versioned/typed/crdpinniped/v1alpha1/generated_expansion.go @@ -7,4 +7,4 @@ SPDX-License-Identifier: Apache-2.0 package v1alpha1 -type LoginDiscoveryConfigExpansion interface{} +type PinnipedDiscoveryInfoExpansion interface{} diff --git a/kubernetes/1.19/client-go/clientset/versioned/typed/crdpinniped/v1alpha1/pinnipeddiscoveryinfo.go b/kubernetes/1.19/client-go/clientset/versioned/typed/crdpinniped/v1alpha1/pinnipeddiscoveryinfo.go new file mode 100644 index 000000000..561b3332d --- /dev/null +++ b/kubernetes/1.19/client-go/clientset/versioned/typed/crdpinniped/v1alpha1/pinnipeddiscoveryinfo.go @@ -0,0 +1,168 @@ +/* +Copyright 2020 VMware, Inc. +SPDX-License-Identifier: Apache-2.0 +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" + + v1alpha1 "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/crdpinniped/v1alpha1" + scheme "github.com/suzerain-io/pinniped/kubernetes/1.19/client-go/clientset/versioned/scheme" +) + +// PinnipedDiscoveryInfosGetter has a method to return a PinnipedDiscoveryInfoInterface. +// A group's client should implement this interface. +type PinnipedDiscoveryInfosGetter interface { + PinnipedDiscoveryInfos(namespace string) PinnipedDiscoveryInfoInterface +} + +// PinnipedDiscoveryInfoInterface has methods to work with PinnipedDiscoveryInfo resources. +type PinnipedDiscoveryInfoInterface interface { + Create(ctx context.Context, pinnipedDiscoveryInfo *v1alpha1.PinnipedDiscoveryInfo, opts v1.CreateOptions) (*v1alpha1.PinnipedDiscoveryInfo, error) + Update(ctx context.Context, pinnipedDiscoveryInfo *v1alpha1.PinnipedDiscoveryInfo, opts v1.UpdateOptions) (*v1alpha1.PinnipedDiscoveryInfo, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.PinnipedDiscoveryInfo, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.PinnipedDiscoveryInfoList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PinnipedDiscoveryInfo, err error) + PinnipedDiscoveryInfoExpansion +} + +// pinnipedDiscoveryInfos implements PinnipedDiscoveryInfoInterface +type pinnipedDiscoveryInfos struct { + client rest.Interface + ns string +} + +// newPinnipedDiscoveryInfos returns a PinnipedDiscoveryInfos +func newPinnipedDiscoveryInfos(c *CrdV1alpha1Client, namespace string) *pinnipedDiscoveryInfos { + return &pinnipedDiscoveryInfos{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the pinnipedDiscoveryInfo, and returns the corresponding pinnipedDiscoveryInfo object, and an error if there is any. +func (c *pinnipedDiscoveryInfos) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.PinnipedDiscoveryInfo, err error) { + result = &v1alpha1.PinnipedDiscoveryInfo{} + err = c.client.Get(). + Namespace(c.ns). + Resource("pinnipeddiscoveryinfos"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of PinnipedDiscoveryInfos that match those selectors. +func (c *pinnipedDiscoveryInfos) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.PinnipedDiscoveryInfoList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.PinnipedDiscoveryInfoList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("pinnipeddiscoveryinfos"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested pinnipedDiscoveryInfos. +func (c *pinnipedDiscoveryInfos) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("pinnipeddiscoveryinfos"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a pinnipedDiscoveryInfo and creates it. Returns the server's representation of the pinnipedDiscoveryInfo, and an error, if there is any. +func (c *pinnipedDiscoveryInfos) Create(ctx context.Context, pinnipedDiscoveryInfo *v1alpha1.PinnipedDiscoveryInfo, opts v1.CreateOptions) (result *v1alpha1.PinnipedDiscoveryInfo, err error) { + result = &v1alpha1.PinnipedDiscoveryInfo{} + err = c.client.Post(). + Namespace(c.ns). + Resource("pinnipeddiscoveryinfos"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(pinnipedDiscoveryInfo). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a pinnipedDiscoveryInfo and updates it. Returns the server's representation of the pinnipedDiscoveryInfo, and an error, if there is any. +func (c *pinnipedDiscoveryInfos) Update(ctx context.Context, pinnipedDiscoveryInfo *v1alpha1.PinnipedDiscoveryInfo, opts v1.UpdateOptions) (result *v1alpha1.PinnipedDiscoveryInfo, err error) { + result = &v1alpha1.PinnipedDiscoveryInfo{} + err = c.client.Put(). + Namespace(c.ns). + Resource("pinnipeddiscoveryinfos"). + Name(pinnipedDiscoveryInfo.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(pinnipedDiscoveryInfo). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the pinnipedDiscoveryInfo and deletes it. Returns an error if one occurs. +func (c *pinnipedDiscoveryInfos) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("pinnipeddiscoveryinfos"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *pinnipedDiscoveryInfos) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("pinnipeddiscoveryinfos"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched pinnipedDiscoveryInfo. +func (c *pinnipedDiscoveryInfos) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PinnipedDiscoveryInfo, err error) { + result = &v1alpha1.PinnipedDiscoveryInfo{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("pinnipeddiscoveryinfos"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/kubernetes/1.19/client-go/clientset/versioned/typed/crdsplaceholder/v1alpha1/crdsplaceholder_client.go b/kubernetes/1.19/client-go/clientset/versioned/typed/crdsplaceholder/v1alpha1/crdsplaceholder_client.go deleted file mode 100644 index 8dee51c85..000000000 --- a/kubernetes/1.19/client-go/clientset/versioned/typed/crdsplaceholder/v1alpha1/crdsplaceholder_client.go +++ /dev/null @@ -1,78 +0,0 @@ -/* -Copyright 2020 VMware, Inc. -SPDX-License-Identifier: Apache-2.0 -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1alpha1 "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/crdsplaceholder/v1alpha1" - "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/clientset/versioned/scheme" - rest "k8s.io/client-go/rest" -) - -type CrdsV1alpha1Interface interface { - RESTClient() rest.Interface - LoginDiscoveryConfigsGetter -} - -// CrdsV1alpha1Client is used to interact with features provided by the crds.placeholder.suzerain-io.github.io group. -type CrdsV1alpha1Client struct { - restClient rest.Interface -} - -func (c *CrdsV1alpha1Client) LoginDiscoveryConfigs(namespace string) LoginDiscoveryConfigInterface { - return newLoginDiscoveryConfigs(c, namespace) -} - -// NewForConfig creates a new CrdsV1alpha1Client for the given config. -func NewForConfig(c *rest.Config) (*CrdsV1alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &CrdsV1alpha1Client{client}, nil -} - -// NewForConfigOrDie creates a new CrdsV1alpha1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *CrdsV1alpha1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new CrdsV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *CrdsV1alpha1Client { - return &CrdsV1alpha1Client{c} -} - -func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.SchemeGroupVersion - config.GroupVersion = &gv - config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() - - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *CrdsV1alpha1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/kubernetes/1.19/client-go/clientset/versioned/typed/crdsplaceholder/v1alpha1/fake/fake_logindiscoveryconfig.go b/kubernetes/1.19/client-go/clientset/versioned/typed/crdsplaceholder/v1alpha1/fake/fake_logindiscoveryconfig.go deleted file mode 100644 index a55478707..000000000 --- a/kubernetes/1.19/client-go/clientset/versioned/typed/crdsplaceholder/v1alpha1/fake/fake_logindiscoveryconfig.go +++ /dev/null @@ -1,119 +0,0 @@ -/* -Copyright 2020 VMware, Inc. -SPDX-License-Identifier: Apache-2.0 -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v1alpha1 "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/crdsplaceholder/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" -) - -// FakeLoginDiscoveryConfigs implements LoginDiscoveryConfigInterface -type FakeLoginDiscoveryConfigs struct { - Fake *FakeCrdsV1alpha1 - ns string -} - -var logindiscoveryconfigsResource = schema.GroupVersionResource{Group: "crds.placeholder.suzerain-io.github.io", Version: "v1alpha1", Resource: "logindiscoveryconfigs"} - -var logindiscoveryconfigsKind = schema.GroupVersionKind{Group: "crds.placeholder.suzerain-io.github.io", Version: "v1alpha1", Kind: "LoginDiscoveryConfig"} - -// Get takes name of the loginDiscoveryConfig, and returns the corresponding loginDiscoveryConfig object, and an error if there is any. -func (c *FakeLoginDiscoveryConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.LoginDiscoveryConfig, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(logindiscoveryconfigsResource, c.ns, name), &v1alpha1.LoginDiscoveryConfig{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.LoginDiscoveryConfig), err -} - -// List takes label and field selectors, and returns the list of LoginDiscoveryConfigs that match those selectors. -func (c *FakeLoginDiscoveryConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.LoginDiscoveryConfigList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(logindiscoveryconfigsResource, logindiscoveryconfigsKind, c.ns, opts), &v1alpha1.LoginDiscoveryConfigList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.LoginDiscoveryConfigList{ListMeta: obj.(*v1alpha1.LoginDiscoveryConfigList).ListMeta} - for _, item := range obj.(*v1alpha1.LoginDiscoveryConfigList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested loginDiscoveryConfigs. -func (c *FakeLoginDiscoveryConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(logindiscoveryconfigsResource, c.ns, opts)) - -} - -// Create takes the representation of a loginDiscoveryConfig and creates it. Returns the server's representation of the loginDiscoveryConfig, and an error, if there is any. -func (c *FakeLoginDiscoveryConfigs) Create(ctx context.Context, loginDiscoveryConfig *v1alpha1.LoginDiscoveryConfig, opts v1.CreateOptions) (result *v1alpha1.LoginDiscoveryConfig, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(logindiscoveryconfigsResource, c.ns, loginDiscoveryConfig), &v1alpha1.LoginDiscoveryConfig{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.LoginDiscoveryConfig), err -} - -// Update takes the representation of a loginDiscoveryConfig and updates it. Returns the server's representation of the loginDiscoveryConfig, and an error, if there is any. -func (c *FakeLoginDiscoveryConfigs) Update(ctx context.Context, loginDiscoveryConfig *v1alpha1.LoginDiscoveryConfig, opts v1.UpdateOptions) (result *v1alpha1.LoginDiscoveryConfig, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(logindiscoveryconfigsResource, c.ns, loginDiscoveryConfig), &v1alpha1.LoginDiscoveryConfig{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.LoginDiscoveryConfig), err -} - -// Delete takes name of the loginDiscoveryConfig and deletes it. Returns an error if one occurs. -func (c *FakeLoginDiscoveryConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(logindiscoveryconfigsResource, c.ns, name), &v1alpha1.LoginDiscoveryConfig{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeLoginDiscoveryConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(logindiscoveryconfigsResource, c.ns, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha1.LoginDiscoveryConfigList{}) - return err -} - -// Patch applies the patch and returns the patched loginDiscoveryConfig. -func (c *FakeLoginDiscoveryConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.LoginDiscoveryConfig, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(logindiscoveryconfigsResource, c.ns, name, pt, data, subresources...), &v1alpha1.LoginDiscoveryConfig{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.LoginDiscoveryConfig), err -} diff --git a/kubernetes/1.19/client-go/clientset/versioned/typed/crdsplaceholder/v1alpha1/logindiscoveryconfig.go b/kubernetes/1.19/client-go/clientset/versioned/typed/crdsplaceholder/v1alpha1/logindiscoveryconfig.go deleted file mode 100644 index 69291124d..000000000 --- a/kubernetes/1.19/client-go/clientset/versioned/typed/crdsplaceholder/v1alpha1/logindiscoveryconfig.go +++ /dev/null @@ -1,167 +0,0 @@ -/* -Copyright 2020 VMware, Inc. -SPDX-License-Identifier: Apache-2.0 -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - "time" - - v1alpha1 "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/crdsplaceholder/v1alpha1" - scheme "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// LoginDiscoveryConfigsGetter has a method to return a LoginDiscoveryConfigInterface. -// A group's client should implement this interface. -type LoginDiscoveryConfigsGetter interface { - LoginDiscoveryConfigs(namespace string) LoginDiscoveryConfigInterface -} - -// LoginDiscoveryConfigInterface has methods to work with LoginDiscoveryConfig resources. -type LoginDiscoveryConfigInterface interface { - Create(ctx context.Context, loginDiscoveryConfig *v1alpha1.LoginDiscoveryConfig, opts v1.CreateOptions) (*v1alpha1.LoginDiscoveryConfig, error) - Update(ctx context.Context, loginDiscoveryConfig *v1alpha1.LoginDiscoveryConfig, opts v1.UpdateOptions) (*v1alpha1.LoginDiscoveryConfig, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.LoginDiscoveryConfig, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.LoginDiscoveryConfigList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.LoginDiscoveryConfig, err error) - LoginDiscoveryConfigExpansion -} - -// loginDiscoveryConfigs implements LoginDiscoveryConfigInterface -type loginDiscoveryConfigs struct { - client rest.Interface - ns string -} - -// newLoginDiscoveryConfigs returns a LoginDiscoveryConfigs -func newLoginDiscoveryConfigs(c *CrdsV1alpha1Client, namespace string) *loginDiscoveryConfigs { - return &loginDiscoveryConfigs{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the loginDiscoveryConfig, and returns the corresponding loginDiscoveryConfig object, and an error if there is any. -func (c *loginDiscoveryConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.LoginDiscoveryConfig, err error) { - result = &v1alpha1.LoginDiscoveryConfig{} - err = c.client.Get(). - Namespace(c.ns). - Resource("logindiscoveryconfigs"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of LoginDiscoveryConfigs that match those selectors. -func (c *loginDiscoveryConfigs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.LoginDiscoveryConfigList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1alpha1.LoginDiscoveryConfigList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("logindiscoveryconfigs"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested loginDiscoveryConfigs. -func (c *loginDiscoveryConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("logindiscoveryconfigs"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a loginDiscoveryConfig and creates it. Returns the server's representation of the loginDiscoveryConfig, and an error, if there is any. -func (c *loginDiscoveryConfigs) Create(ctx context.Context, loginDiscoveryConfig *v1alpha1.LoginDiscoveryConfig, opts v1.CreateOptions) (result *v1alpha1.LoginDiscoveryConfig, err error) { - result = &v1alpha1.LoginDiscoveryConfig{} - err = c.client.Post(). - Namespace(c.ns). - Resource("logindiscoveryconfigs"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(loginDiscoveryConfig). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a loginDiscoveryConfig and updates it. Returns the server's representation of the loginDiscoveryConfig, and an error, if there is any. -func (c *loginDiscoveryConfigs) Update(ctx context.Context, loginDiscoveryConfig *v1alpha1.LoginDiscoveryConfig, opts v1.UpdateOptions) (result *v1alpha1.LoginDiscoveryConfig, err error) { - result = &v1alpha1.LoginDiscoveryConfig{} - err = c.client.Put(). - Namespace(c.ns). - Resource("logindiscoveryconfigs"). - Name(loginDiscoveryConfig.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(loginDiscoveryConfig). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the loginDiscoveryConfig and deletes it. Returns an error if one occurs. -func (c *loginDiscoveryConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("logindiscoveryconfigs"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *loginDiscoveryConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("logindiscoveryconfigs"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched loginDiscoveryConfig. -func (c *loginDiscoveryConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.LoginDiscoveryConfig, err error) { - result = &v1alpha1.LoginDiscoveryConfig{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("logindiscoveryconfigs"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/kubernetes/1.19/client-go/clientset/versioned/typed/placeholder/v1alpha1/credentialrequest.go b/kubernetes/1.19/client-go/clientset/versioned/typed/pinniped/v1alpha1/credentialrequest.go similarity index 95% rename from kubernetes/1.19/client-go/clientset/versioned/typed/placeholder/v1alpha1/credentialrequest.go rename to kubernetes/1.19/client-go/clientset/versioned/typed/pinniped/v1alpha1/credentialrequest.go index 9a31a9123..6d4b9f893 100644 --- a/kubernetes/1.19/client-go/clientset/versioned/typed/placeholder/v1alpha1/credentialrequest.go +++ b/kubernetes/1.19/client-go/clientset/versioned/typed/pinniped/v1alpha1/credentialrequest.go @@ -11,12 +11,13 @@ import ( "context" "time" - v1alpha1 "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/placeholder/v1alpha1" - scheme "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" rest "k8s.io/client-go/rest" + + v1alpha1 "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1" + scheme "github.com/suzerain-io/pinniped/kubernetes/1.19/client-go/clientset/versioned/scheme" ) // CredentialRequestsGetter has a method to return a CredentialRequestInterface. @@ -45,7 +46,7 @@ type credentialRequests struct { } // newCredentialRequests returns a CredentialRequests -func newCredentialRequests(c *PlaceholderV1alpha1Client) *credentialRequests { +func newCredentialRequests(c *PinnipedV1alpha1Client) *credentialRequests { return &credentialRequests{ client: c.RESTClient(), } diff --git a/kubernetes/1.19/client-go/clientset/versioned/typed/placeholder/v1alpha1/doc.go b/kubernetes/1.19/client-go/clientset/versioned/typed/pinniped/v1alpha1/doc.go similarity index 100% rename from kubernetes/1.19/client-go/clientset/versioned/typed/placeholder/v1alpha1/doc.go rename to kubernetes/1.19/client-go/clientset/versioned/typed/pinniped/v1alpha1/doc.go diff --git a/kubernetes/1.19/client-go/clientset/versioned/typed/placeholder/v1alpha1/fake/doc.go b/kubernetes/1.19/client-go/clientset/versioned/typed/pinniped/v1alpha1/fake/doc.go similarity index 100% rename from kubernetes/1.19/client-go/clientset/versioned/typed/placeholder/v1alpha1/fake/doc.go rename to kubernetes/1.19/client-go/clientset/versioned/typed/pinniped/v1alpha1/fake/doc.go diff --git a/kubernetes/1.19/client-go/clientset/versioned/typed/placeholder/v1alpha1/fake/fake_credentialrequest.go b/kubernetes/1.19/client-go/clientset/versioned/typed/pinniped/v1alpha1/fake/fake_credentialrequest.go similarity index 93% rename from kubernetes/1.19/client-go/clientset/versioned/typed/placeholder/v1alpha1/fake/fake_credentialrequest.go rename to kubernetes/1.19/client-go/clientset/versioned/typed/pinniped/v1alpha1/fake/fake_credentialrequest.go index 09416d23c..2667ea113 100644 --- a/kubernetes/1.19/client-go/clientset/versioned/typed/placeholder/v1alpha1/fake/fake_credentialrequest.go +++ b/kubernetes/1.19/client-go/clientset/versioned/typed/pinniped/v1alpha1/fake/fake_credentialrequest.go @@ -10,23 +10,24 @@ package fake import ( "context" - v1alpha1 "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/placeholder/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" + + v1alpha1 "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1" ) // FakeCredentialRequests implements CredentialRequestInterface type FakeCredentialRequests struct { - Fake *FakePlaceholderV1alpha1 + Fake *FakePinnipedV1alpha1 } -var credentialrequestsResource = schema.GroupVersionResource{Group: "placeholder.suzerain-io.github.io", Version: "v1alpha1", Resource: "credentialrequests"} +var credentialrequestsResource = schema.GroupVersionResource{Group: "pinniped.dev", Version: "v1alpha1", Resource: "credentialrequests"} -var credentialrequestsKind = schema.GroupVersionKind{Group: "placeholder.suzerain-io.github.io", Version: "v1alpha1", Kind: "CredentialRequest"} +var credentialrequestsKind = schema.GroupVersionKind{Group: "pinniped.dev", Version: "v1alpha1", Kind: "CredentialRequest"} // Get takes name of the credentialRequest, and returns the corresponding credentialRequest object, and an error if there is any. func (c *FakeCredentialRequests) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.CredentialRequest, err error) { diff --git a/kubernetes/1.19/client-go/clientset/versioned/typed/placeholder/v1alpha1/fake/fake_placeholder_client.go b/kubernetes/1.19/client-go/clientset/versioned/typed/pinniped/v1alpha1/fake/fake_placeholder_client.go similarity index 56% rename from kubernetes/1.19/client-go/clientset/versioned/typed/placeholder/v1alpha1/fake/fake_placeholder_client.go rename to kubernetes/1.19/client-go/clientset/versioned/typed/pinniped/v1alpha1/fake/fake_placeholder_client.go index c719e3a81..f6ff675f5 100644 --- a/kubernetes/1.19/client-go/clientset/versioned/typed/placeholder/v1alpha1/fake/fake_placeholder_client.go +++ b/kubernetes/1.19/client-go/clientset/versioned/typed/pinniped/v1alpha1/fake/fake_placeholder_client.go @@ -8,22 +8,23 @@ SPDX-License-Identifier: Apache-2.0 package fake import ( - v1alpha1 "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/clientset/versioned/typed/placeholder/v1alpha1" rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" + + v1alpha1 "github.com/suzerain-io/pinniped/kubernetes/1.19/client-go/clientset/versioned/typed/pinniped/v1alpha1" ) -type FakePlaceholderV1alpha1 struct { +type FakePinnipedV1alpha1 struct { *testing.Fake } -func (c *FakePlaceholderV1alpha1) CredentialRequests() v1alpha1.CredentialRequestInterface { +func (c *FakePinnipedV1alpha1) CredentialRequests() v1alpha1.CredentialRequestInterface { return &FakeCredentialRequests{c} } // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakePlaceholderV1alpha1) RESTClient() rest.Interface { +func (c *FakePinnipedV1alpha1) RESTClient() rest.Interface { var ret *rest.RESTClient return ret } diff --git a/kubernetes/1.19/client-go/clientset/versioned/typed/placeholder/v1alpha1/generated_expansion.go b/kubernetes/1.19/client-go/clientset/versioned/typed/pinniped/v1alpha1/generated_expansion.go similarity index 100% rename from kubernetes/1.19/client-go/clientset/versioned/typed/placeholder/v1alpha1/generated_expansion.go rename to kubernetes/1.19/client-go/clientset/versioned/typed/pinniped/v1alpha1/generated_expansion.go diff --git a/kubernetes/1.19/client-go/clientset/versioned/typed/placeholder/v1alpha1/placeholder_client.go b/kubernetes/1.19/client-go/clientset/versioned/typed/pinniped/v1alpha1/pinniped_client.go similarity index 50% rename from kubernetes/1.19/client-go/clientset/versioned/typed/placeholder/v1alpha1/placeholder_client.go rename to kubernetes/1.19/client-go/clientset/versioned/typed/pinniped/v1alpha1/pinniped_client.go index 645d79967..4e3324fb0 100644 --- a/kubernetes/1.19/client-go/clientset/versioned/typed/placeholder/v1alpha1/placeholder_client.go +++ b/kubernetes/1.19/client-go/clientset/versioned/typed/pinniped/v1alpha1/pinniped_client.go @@ -8,27 +8,28 @@ SPDX-License-Identifier: Apache-2.0 package v1alpha1 import ( - v1alpha1 "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/placeholder/v1alpha1" - "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/clientset/versioned/scheme" rest "k8s.io/client-go/rest" + + v1alpha1 "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1" + "github.com/suzerain-io/pinniped/kubernetes/1.19/client-go/clientset/versioned/scheme" ) -type PlaceholderV1alpha1Interface interface { +type PinnipedV1alpha1Interface interface { RESTClient() rest.Interface CredentialRequestsGetter } -// PlaceholderV1alpha1Client is used to interact with features provided by the placeholder.suzerain-io.github.io group. -type PlaceholderV1alpha1Client struct { +// PinnipedV1alpha1Client is used to interact with features provided by the pinniped.dev group. +type PinnipedV1alpha1Client struct { restClient rest.Interface } -func (c *PlaceholderV1alpha1Client) CredentialRequests() CredentialRequestInterface { +func (c *PinnipedV1alpha1Client) CredentialRequests() CredentialRequestInterface { return newCredentialRequests(c) } -// NewForConfig creates a new PlaceholderV1alpha1Client for the given config. -func NewForConfig(c *rest.Config) (*PlaceholderV1alpha1Client, error) { +// NewForConfig creates a new PinnipedV1alpha1Client for the given config. +func NewForConfig(c *rest.Config) (*PinnipedV1alpha1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err @@ -37,12 +38,12 @@ func NewForConfig(c *rest.Config) (*PlaceholderV1alpha1Client, error) { if err != nil { return nil, err } - return &PlaceholderV1alpha1Client{client}, nil + return &PinnipedV1alpha1Client{client}, nil } -// NewForConfigOrDie creates a new PlaceholderV1alpha1Client for the given config and +// NewForConfigOrDie creates a new PinnipedV1alpha1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *PlaceholderV1alpha1Client { +func NewForConfigOrDie(c *rest.Config) *PinnipedV1alpha1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -50,9 +51,9 @@ func NewForConfigOrDie(c *rest.Config) *PlaceholderV1alpha1Client { return client } -// New creates a new PlaceholderV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *PlaceholderV1alpha1Client { - return &PlaceholderV1alpha1Client{c} +// New creates a new PinnipedV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *PinnipedV1alpha1Client { + return &PinnipedV1alpha1Client{c} } func setConfigDefaults(config *rest.Config) error { @@ -70,7 +71,7 @@ func setConfigDefaults(config *rest.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *PlaceholderV1alpha1Client) RESTClient() rest.Interface { +func (c *PinnipedV1alpha1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/kubernetes/1.19/client-go/go.mod b/kubernetes/1.19/client-go/go.mod index f11904951..67a9f4285 100644 --- a/kubernetes/1.19/client-go/go.mod +++ b/kubernetes/1.19/client-go/go.mod @@ -1,12 +1,12 @@ -module github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go +module github.com/suzerain-io/pinniped/kubernetes/1.19/client-go go 1.14 require ( - github.com/suzerain-io/placeholder-name/kubernetes/1.19/api v0.0.0-00010101000000-000000000000 + github.com/suzerain-io/pinniped/kubernetes/1.19/api v0.0.0-00010101000000-000000000000 golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e // indirect k8s.io/apimachinery v0.19.0-rc.0 k8s.io/client-go v0.19.0-rc.0 ) -replace github.com/suzerain-io/placeholder-name/kubernetes/1.19/api => ../api +replace github.com/suzerain-io/pinniped/kubernetes/1.19/api => ../api diff --git a/kubernetes/1.19/client-go/informers/externalversions/placeholder/interface.go b/kubernetes/1.19/client-go/informers/externalversions/crdpinniped/interface.go similarity index 76% rename from kubernetes/1.19/client-go/informers/externalversions/placeholder/interface.go rename to kubernetes/1.19/client-go/informers/externalversions/crdpinniped/interface.go index 6f92abe80..e99341ebd 100644 --- a/kubernetes/1.19/client-go/informers/externalversions/placeholder/interface.go +++ b/kubernetes/1.19/client-go/informers/externalversions/crdpinniped/interface.go @@ -5,11 +5,11 @@ SPDX-License-Identifier: Apache-2.0 // Code generated by informer-gen. DO NOT EDIT. -package placeholder +package crdpinniped import ( - internalinterfaces "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/informers/externalversions/placeholder/v1alpha1" + v1alpha1 "github.com/suzerain-io/pinniped/kubernetes/1.19/client-go/informers/externalversions/crdpinniped/v1alpha1" + internalinterfaces "github.com/suzerain-io/pinniped/kubernetes/1.19/client-go/informers/externalversions/internalinterfaces" ) // Interface provides access to each of this group's versions. diff --git a/kubernetes/1.19/client-go/informers/externalversions/crdsplaceholder/v1alpha1/interface.go b/kubernetes/1.19/client-go/informers/externalversions/crdpinniped/v1alpha1/interface.go similarity index 57% rename from kubernetes/1.19/client-go/informers/externalversions/crdsplaceholder/v1alpha1/interface.go rename to kubernetes/1.19/client-go/informers/externalversions/crdpinniped/v1alpha1/interface.go index 3c20f59c1..ec531821e 100644 --- a/kubernetes/1.19/client-go/informers/externalversions/crdsplaceholder/v1alpha1/interface.go +++ b/kubernetes/1.19/client-go/informers/externalversions/crdpinniped/v1alpha1/interface.go @@ -8,13 +8,13 @@ SPDX-License-Identifier: Apache-2.0 package v1alpha1 import ( - internalinterfaces "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/informers/externalversions/internalinterfaces" + internalinterfaces "github.com/suzerain-io/pinniped/kubernetes/1.19/client-go/informers/externalversions/internalinterfaces" ) // Interface provides access to all the informers in this group version. type Interface interface { - // LoginDiscoveryConfigs returns a LoginDiscoveryConfigInformer. - LoginDiscoveryConfigs() LoginDiscoveryConfigInformer + // PinnipedDiscoveryInfos returns a PinnipedDiscoveryInfoInformer. + PinnipedDiscoveryInfos() PinnipedDiscoveryInfoInformer } type version struct { @@ -28,7 +28,7 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } -// LoginDiscoveryConfigs returns a LoginDiscoveryConfigInformer. -func (v *version) LoginDiscoveryConfigs() LoginDiscoveryConfigInformer { - return &loginDiscoveryConfigInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +// PinnipedDiscoveryInfos returns a PinnipedDiscoveryInfoInformer. +func (v *version) PinnipedDiscoveryInfos() PinnipedDiscoveryInfoInformer { + return &pinnipedDiscoveryInfoInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } diff --git a/kubernetes/1.19/client-go/informers/externalversions/crdpinniped/v1alpha1/pinnipeddiscoveryinfo.go b/kubernetes/1.19/client-go/informers/externalversions/crdpinniped/v1alpha1/pinnipeddiscoveryinfo.go new file mode 100644 index 000000000..d91a3b22f --- /dev/null +++ b/kubernetes/1.19/client-go/informers/externalversions/crdpinniped/v1alpha1/pinnipeddiscoveryinfo.go @@ -0,0 +1,80 @@ +/* +Copyright 2020 VMware, Inc. +SPDX-License-Identifier: Apache-2.0 +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + time "time" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" + + crdpinnipedv1alpha1 "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/crdpinniped/v1alpha1" + versioned "github.com/suzerain-io/pinniped/kubernetes/1.19/client-go/clientset/versioned" + internalinterfaces "github.com/suzerain-io/pinniped/kubernetes/1.19/client-go/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/suzerain-io/pinniped/kubernetes/1.19/client-go/listers/crdpinniped/v1alpha1" +) + +// PinnipedDiscoveryInfoInformer provides access to a shared informer and lister for +// PinnipedDiscoveryInfos. +type PinnipedDiscoveryInfoInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.PinnipedDiscoveryInfoLister +} + +type pinnipedDiscoveryInfoInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewPinnipedDiscoveryInfoInformer constructs a new informer for PinnipedDiscoveryInfo type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewPinnipedDiscoveryInfoInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredPinnipedDiscoveryInfoInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredPinnipedDiscoveryInfoInformer constructs a new informer for PinnipedDiscoveryInfo type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredPinnipedDiscoveryInfoInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.CrdV1alpha1().PinnipedDiscoveryInfos(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.CrdV1alpha1().PinnipedDiscoveryInfos(namespace).Watch(context.TODO(), options) + }, + }, + &crdpinnipedv1alpha1.PinnipedDiscoveryInfo{}, + resyncPeriod, + indexers, + ) +} + +func (f *pinnipedDiscoveryInfoInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredPinnipedDiscoveryInfoInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *pinnipedDiscoveryInfoInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&crdpinnipedv1alpha1.PinnipedDiscoveryInfo{}, f.defaultInformer) +} + +func (f *pinnipedDiscoveryInfoInformer) Lister() v1alpha1.PinnipedDiscoveryInfoLister { + return v1alpha1.NewPinnipedDiscoveryInfoLister(f.Informer().GetIndexer()) +} diff --git a/kubernetes/1.19/client-go/informers/externalversions/crdsplaceholder/v1alpha1/logindiscoveryconfig.go b/kubernetes/1.19/client-go/informers/externalversions/crdsplaceholder/v1alpha1/logindiscoveryconfig.go deleted file mode 100644 index e38f6161b..000000000 --- a/kubernetes/1.19/client-go/informers/externalversions/crdsplaceholder/v1alpha1/logindiscoveryconfig.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -Copyright 2020 VMware, Inc. -SPDX-License-Identifier: Apache-2.0 -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - time "time" - - crdsplaceholderv1alpha1 "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/crdsplaceholder/v1alpha1" - versioned "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/clientset/versioned" - internalinterfaces "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/listers/crdsplaceholder/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// LoginDiscoveryConfigInformer provides access to a shared informer and lister for -// LoginDiscoveryConfigs. -type LoginDiscoveryConfigInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1alpha1.LoginDiscoveryConfigLister -} - -type loginDiscoveryConfigInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewLoginDiscoveryConfigInformer constructs a new informer for LoginDiscoveryConfig type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewLoginDiscoveryConfigInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredLoginDiscoveryConfigInformer(client, namespace, resyncPeriod, indexers, nil) -} - -// NewFilteredLoginDiscoveryConfigInformer constructs a new informer for LoginDiscoveryConfig type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredLoginDiscoveryConfigInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.CrdsV1alpha1().LoginDiscoveryConfigs(namespace).List(context.TODO(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.CrdsV1alpha1().LoginDiscoveryConfigs(namespace).Watch(context.TODO(), options) - }, - }, - &crdsplaceholderv1alpha1.LoginDiscoveryConfig{}, - resyncPeriod, - indexers, - ) -} - -func (f *loginDiscoveryConfigInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredLoginDiscoveryConfigInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *loginDiscoveryConfigInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&crdsplaceholderv1alpha1.LoginDiscoveryConfig{}, f.defaultInformer) -} - -func (f *loginDiscoveryConfigInformer) Lister() v1alpha1.LoginDiscoveryConfigLister { - return v1alpha1.NewLoginDiscoveryConfigLister(f.Informer().GetIndexer()) -} diff --git a/kubernetes/1.19/client-go/informers/externalversions/factory.go b/kubernetes/1.19/client-go/informers/externalversions/factory.go index 1104cbe8b..2d15b1764 100644 --- a/kubernetes/1.19/client-go/informers/externalversions/factory.go +++ b/kubernetes/1.19/client-go/informers/externalversions/factory.go @@ -12,14 +12,15 @@ import ( sync "sync" time "time" - versioned "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/clientset/versioned" - crdsplaceholder "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/informers/externalversions/crdsplaceholder" - internalinterfaces "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/informers/externalversions/internalinterfaces" - placeholder "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/informers/externalversions/placeholder" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" + + versioned "github.com/suzerain-io/pinniped/kubernetes/1.19/client-go/clientset/versioned" + crdpinniped "github.com/suzerain-io/pinniped/kubernetes/1.19/client-go/informers/externalversions/crdpinniped" + internalinterfaces "github.com/suzerain-io/pinniped/kubernetes/1.19/client-go/informers/externalversions/internalinterfaces" + pinniped "github.com/suzerain-io/pinniped/kubernetes/1.19/client-go/informers/externalversions/pinniped" ) // SharedInformerOption defines the functional option type for SharedInformerFactory. @@ -162,14 +163,14 @@ type SharedInformerFactory interface { ForResource(resource schema.GroupVersionResource) (GenericInformer, error) WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool - Crds() crdsplaceholder.Interface - Placeholder() placeholder.Interface + Crd() crdpinniped.Interface + Pinniped() pinniped.Interface } -func (f *sharedInformerFactory) Crds() crdsplaceholder.Interface { - return crdsplaceholder.New(f, f.namespace, f.tweakListOptions) +func (f *sharedInformerFactory) Crd() crdpinniped.Interface { + return crdpinniped.New(f, f.namespace, f.tweakListOptions) } -func (f *sharedInformerFactory) Placeholder() placeholder.Interface { - return placeholder.New(f, f.namespace, f.tweakListOptions) +func (f *sharedInformerFactory) Pinniped() pinniped.Interface { + return pinniped.New(f, f.namespace, f.tweakListOptions) } diff --git a/kubernetes/1.19/client-go/informers/externalversions/generic.go b/kubernetes/1.19/client-go/informers/externalversions/generic.go index 2824b71c8..522bbf8ed 100644 --- a/kubernetes/1.19/client-go/informers/externalversions/generic.go +++ b/kubernetes/1.19/client-go/informers/externalversions/generic.go @@ -10,10 +10,11 @@ package externalversions import ( "fmt" - v1alpha1 "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/crdsplaceholder/v1alpha1" - placeholderv1alpha1 "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/placeholder/v1alpha1" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" + + v1alpha1 "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/crdpinniped/v1alpha1" + pinnipedv1alpha1 "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1" ) // GenericInformer is type of SharedIndexInformer which will locate and delegate to other @@ -42,13 +43,13 @@ func (f *genericInformer) Lister() cache.GenericLister { // TODO extend this to unknown resources with a client pool func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) { switch resource { - // Group=crds.placeholder.suzerain-io.github.io, Version=v1alpha1 - case v1alpha1.SchemeGroupVersion.WithResource("logindiscoveryconfigs"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Crds().V1alpha1().LoginDiscoveryConfigs().Informer()}, nil + // Group=crd.pinniped.dev, Version=v1alpha1 + case v1alpha1.SchemeGroupVersion.WithResource("pinnipeddiscoveryinfos"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Crd().V1alpha1().PinnipedDiscoveryInfos().Informer()}, nil - // Group=placeholder.suzerain-io.github.io, Version=v1alpha1 - case placeholderv1alpha1.SchemeGroupVersion.WithResource("credentialrequests"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Placeholder().V1alpha1().CredentialRequests().Informer()}, nil + // Group=pinniped.dev, Version=v1alpha1 + case pinnipedv1alpha1.SchemeGroupVersion.WithResource("credentialrequests"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Pinniped().V1alpha1().CredentialRequests().Informer()}, nil } diff --git a/kubernetes/1.19/client-go/informers/externalversions/internalinterfaces/factory_interfaces.go b/kubernetes/1.19/client-go/informers/externalversions/internalinterfaces/factory_interfaces.go index 5ad2d90c0..a2b40e656 100644 --- a/kubernetes/1.19/client-go/informers/externalversions/internalinterfaces/factory_interfaces.go +++ b/kubernetes/1.19/client-go/informers/externalversions/internalinterfaces/factory_interfaces.go @@ -10,10 +10,11 @@ package internalinterfaces import ( time "time" - versioned "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/clientset/versioned" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" cache "k8s.io/client-go/tools/cache" + + versioned "github.com/suzerain-io/pinniped/kubernetes/1.19/client-go/clientset/versioned" ) // NewInformerFunc takes versioned.Interface and time.Duration to return a SharedIndexInformer. diff --git a/kubernetes/1.19/client-go/informers/externalversions/crdsplaceholder/interface.go b/kubernetes/1.19/client-go/informers/externalversions/pinniped/interface.go similarity index 76% rename from kubernetes/1.19/client-go/informers/externalversions/crdsplaceholder/interface.go rename to kubernetes/1.19/client-go/informers/externalversions/pinniped/interface.go index 7a05e77fa..7a66c7f97 100644 --- a/kubernetes/1.19/client-go/informers/externalversions/crdsplaceholder/interface.go +++ b/kubernetes/1.19/client-go/informers/externalversions/pinniped/interface.go @@ -5,11 +5,11 @@ SPDX-License-Identifier: Apache-2.0 // Code generated by informer-gen. DO NOT EDIT. -package crdsplaceholder +package pinniped import ( - v1alpha1 "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/informers/externalversions/crdsplaceholder/v1alpha1" - internalinterfaces "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/informers/externalversions/internalinterfaces" + internalinterfaces "github.com/suzerain-io/pinniped/kubernetes/1.19/client-go/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/suzerain-io/pinniped/kubernetes/1.19/client-go/informers/externalversions/pinniped/v1alpha1" ) // Interface provides access to each of this group's versions. diff --git a/kubernetes/1.19/client-go/informers/externalversions/placeholder/v1alpha1/credentialrequest.go b/kubernetes/1.19/client-go/informers/externalversions/pinniped/v1alpha1/credentialrequest.go similarity index 77% rename from kubernetes/1.19/client-go/informers/externalversions/placeholder/v1alpha1/credentialrequest.go rename to kubernetes/1.19/client-go/informers/externalversions/pinniped/v1alpha1/credentialrequest.go index 8ee8c77f9..41c8dc8f2 100644 --- a/kubernetes/1.19/client-go/informers/externalversions/placeholder/v1alpha1/credentialrequest.go +++ b/kubernetes/1.19/client-go/informers/externalversions/pinniped/v1alpha1/credentialrequest.go @@ -11,14 +11,15 @@ import ( "context" time "time" - placeholderv1alpha1 "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/placeholder/v1alpha1" - versioned "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/clientset/versioned" - internalinterfaces "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/listers/placeholder/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" cache "k8s.io/client-go/tools/cache" + + pinnipedv1alpha1 "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1" + versioned "github.com/suzerain-io/pinniped/kubernetes/1.19/client-go/clientset/versioned" + internalinterfaces "github.com/suzerain-io/pinniped/kubernetes/1.19/client-go/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/suzerain-io/pinniped/kubernetes/1.19/client-go/listers/pinniped/v1alpha1" ) // CredentialRequestInformer provides access to a shared informer and lister for @@ -50,16 +51,16 @@ func NewFilteredCredentialRequestInformer(client versioned.Interface, resyncPeri if tweakListOptions != nil { tweakListOptions(&options) } - return client.PlaceholderV1alpha1().CredentialRequests().List(context.TODO(), options) + return client.PinnipedV1alpha1().CredentialRequests().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.PlaceholderV1alpha1().CredentialRequests().Watch(context.TODO(), options) + return client.PinnipedV1alpha1().CredentialRequests().Watch(context.TODO(), options) }, }, - &placeholderv1alpha1.CredentialRequest{}, + &pinnipedv1alpha1.CredentialRequest{}, resyncPeriod, indexers, ) @@ -70,7 +71,7 @@ func (f *credentialRequestInformer) defaultInformer(client versioned.Interface, } func (f *credentialRequestInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&placeholderv1alpha1.CredentialRequest{}, f.defaultInformer) + return f.factory.InformerFor(&pinnipedv1alpha1.CredentialRequest{}, f.defaultInformer) } func (f *credentialRequestInformer) Lister() v1alpha1.CredentialRequestLister { diff --git a/kubernetes/1.19/client-go/informers/externalversions/placeholder/v1alpha1/interface.go b/kubernetes/1.19/client-go/informers/externalversions/pinniped/v1alpha1/interface.go similarity index 88% rename from kubernetes/1.19/client-go/informers/externalversions/placeholder/v1alpha1/interface.go rename to kubernetes/1.19/client-go/informers/externalversions/pinniped/v1alpha1/interface.go index d7a99c92c..980f992ba 100644 --- a/kubernetes/1.19/client-go/informers/externalversions/placeholder/v1alpha1/interface.go +++ b/kubernetes/1.19/client-go/informers/externalversions/pinniped/v1alpha1/interface.go @@ -8,7 +8,7 @@ SPDX-License-Identifier: Apache-2.0 package v1alpha1 import ( - internalinterfaces "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/informers/externalversions/internalinterfaces" + internalinterfaces "github.com/suzerain-io/pinniped/kubernetes/1.19/client-go/informers/externalversions/internalinterfaces" ) // Interface provides access to all the informers in this group version. diff --git a/kubernetes/1.19/client-go/listers/crdpinniped/v1alpha1/expansion_generated.go b/kubernetes/1.19/client-go/listers/crdpinniped/v1alpha1/expansion_generated.go new file mode 100644 index 000000000..27899f034 --- /dev/null +++ b/kubernetes/1.19/client-go/listers/crdpinniped/v1alpha1/expansion_generated.go @@ -0,0 +1,16 @@ +/* +Copyright 2020 VMware, Inc. +SPDX-License-Identifier: Apache-2.0 +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +// PinnipedDiscoveryInfoListerExpansion allows custom methods to be added to +// PinnipedDiscoveryInfoLister. +type PinnipedDiscoveryInfoListerExpansion interface{} + +// PinnipedDiscoveryInfoNamespaceListerExpansion allows custom methods to be added to +// PinnipedDiscoveryInfoNamespaceLister. +type PinnipedDiscoveryInfoNamespaceListerExpansion interface{} diff --git a/kubernetes/1.19/client-go/listers/crdpinniped/v1alpha1/pinnipeddiscoveryinfo.go b/kubernetes/1.19/client-go/listers/crdpinniped/v1alpha1/pinnipeddiscoveryinfo.go new file mode 100644 index 000000000..0b7fc7914 --- /dev/null +++ b/kubernetes/1.19/client-go/listers/crdpinniped/v1alpha1/pinnipeddiscoveryinfo.go @@ -0,0 +1,89 @@ +/* +Copyright 2020 VMware, Inc. +SPDX-License-Identifier: Apache-2.0 +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" + + v1alpha1 "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/crdpinniped/v1alpha1" +) + +// PinnipedDiscoveryInfoLister helps list PinnipedDiscoveryInfos. +// All objects returned here must be treated as read-only. +type PinnipedDiscoveryInfoLister interface { + // List lists all PinnipedDiscoveryInfos in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.PinnipedDiscoveryInfo, err error) + // PinnipedDiscoveryInfos returns an object that can list and get PinnipedDiscoveryInfos. + PinnipedDiscoveryInfos(namespace string) PinnipedDiscoveryInfoNamespaceLister + PinnipedDiscoveryInfoListerExpansion +} + +// pinnipedDiscoveryInfoLister implements the PinnipedDiscoveryInfoLister interface. +type pinnipedDiscoveryInfoLister struct { + indexer cache.Indexer +} + +// NewPinnipedDiscoveryInfoLister returns a new PinnipedDiscoveryInfoLister. +func NewPinnipedDiscoveryInfoLister(indexer cache.Indexer) PinnipedDiscoveryInfoLister { + return &pinnipedDiscoveryInfoLister{indexer: indexer} +} + +// List lists all PinnipedDiscoveryInfos in the indexer. +func (s *pinnipedDiscoveryInfoLister) List(selector labels.Selector) (ret []*v1alpha1.PinnipedDiscoveryInfo, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.PinnipedDiscoveryInfo)) + }) + return ret, err +} + +// PinnipedDiscoveryInfos returns an object that can list and get PinnipedDiscoveryInfos. +func (s *pinnipedDiscoveryInfoLister) PinnipedDiscoveryInfos(namespace string) PinnipedDiscoveryInfoNamespaceLister { + return pinnipedDiscoveryInfoNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// PinnipedDiscoveryInfoNamespaceLister helps list and get PinnipedDiscoveryInfos. +// All objects returned here must be treated as read-only. +type PinnipedDiscoveryInfoNamespaceLister interface { + // List lists all PinnipedDiscoveryInfos in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.PinnipedDiscoveryInfo, err error) + // Get retrieves the PinnipedDiscoveryInfo from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1alpha1.PinnipedDiscoveryInfo, error) + PinnipedDiscoveryInfoNamespaceListerExpansion +} + +// pinnipedDiscoveryInfoNamespaceLister implements the PinnipedDiscoveryInfoNamespaceLister +// interface. +type pinnipedDiscoveryInfoNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all PinnipedDiscoveryInfos in the indexer for a given namespace. +func (s pinnipedDiscoveryInfoNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.PinnipedDiscoveryInfo, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.PinnipedDiscoveryInfo)) + }) + return ret, err +} + +// Get retrieves the PinnipedDiscoveryInfo from the indexer for a given namespace and name. +func (s pinnipedDiscoveryInfoNamespaceLister) Get(name string) (*v1alpha1.PinnipedDiscoveryInfo, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("pinnipeddiscoveryinfo"), name) + } + return obj.(*v1alpha1.PinnipedDiscoveryInfo), nil +} diff --git a/kubernetes/1.19/client-go/listers/crdsplaceholder/v1alpha1/expansion_generated.go b/kubernetes/1.19/client-go/listers/crdsplaceholder/v1alpha1/expansion_generated.go deleted file mode 100644 index 13ef0d8ed..000000000 --- a/kubernetes/1.19/client-go/listers/crdsplaceholder/v1alpha1/expansion_generated.go +++ /dev/null @@ -1,16 +0,0 @@ -/* -Copyright 2020 VMware, Inc. -SPDX-License-Identifier: Apache-2.0 -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha1 - -// LoginDiscoveryConfigListerExpansion allows custom methods to be added to -// LoginDiscoveryConfigLister. -type LoginDiscoveryConfigListerExpansion interface{} - -// LoginDiscoveryConfigNamespaceListerExpansion allows custom methods to be added to -// LoginDiscoveryConfigNamespaceLister. -type LoginDiscoveryConfigNamespaceListerExpansion interface{} diff --git a/kubernetes/1.19/client-go/listers/crdsplaceholder/v1alpha1/logindiscoveryconfig.go b/kubernetes/1.19/client-go/listers/crdsplaceholder/v1alpha1/logindiscoveryconfig.go deleted file mode 100644 index 2c7f602ea..000000000 --- a/kubernetes/1.19/client-go/listers/crdsplaceholder/v1alpha1/logindiscoveryconfig.go +++ /dev/null @@ -1,88 +0,0 @@ -/* -Copyright 2020 VMware, Inc. -SPDX-License-Identifier: Apache-2.0 -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1alpha1 "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/crdsplaceholder/v1alpha1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// LoginDiscoveryConfigLister helps list LoginDiscoveryConfigs. -// All objects returned here must be treated as read-only. -type LoginDiscoveryConfigLister interface { - // List lists all LoginDiscoveryConfigs in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.LoginDiscoveryConfig, err error) - // LoginDiscoveryConfigs returns an object that can list and get LoginDiscoveryConfigs. - LoginDiscoveryConfigs(namespace string) LoginDiscoveryConfigNamespaceLister - LoginDiscoveryConfigListerExpansion -} - -// loginDiscoveryConfigLister implements the LoginDiscoveryConfigLister interface. -type loginDiscoveryConfigLister struct { - indexer cache.Indexer -} - -// NewLoginDiscoveryConfigLister returns a new LoginDiscoveryConfigLister. -func NewLoginDiscoveryConfigLister(indexer cache.Indexer) LoginDiscoveryConfigLister { - return &loginDiscoveryConfigLister{indexer: indexer} -} - -// List lists all LoginDiscoveryConfigs in the indexer. -func (s *loginDiscoveryConfigLister) List(selector labels.Selector) (ret []*v1alpha1.LoginDiscoveryConfig, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.LoginDiscoveryConfig)) - }) - return ret, err -} - -// LoginDiscoveryConfigs returns an object that can list and get LoginDiscoveryConfigs. -func (s *loginDiscoveryConfigLister) LoginDiscoveryConfigs(namespace string) LoginDiscoveryConfigNamespaceLister { - return loginDiscoveryConfigNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// LoginDiscoveryConfigNamespaceLister helps list and get LoginDiscoveryConfigs. -// All objects returned here must be treated as read-only. -type LoginDiscoveryConfigNamespaceLister interface { - // List lists all LoginDiscoveryConfigs in the indexer for a given namespace. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.LoginDiscoveryConfig, err error) - // Get retrieves the LoginDiscoveryConfig from the indexer for a given namespace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha1.LoginDiscoveryConfig, error) - LoginDiscoveryConfigNamespaceListerExpansion -} - -// loginDiscoveryConfigNamespaceLister implements the LoginDiscoveryConfigNamespaceLister -// interface. -type loginDiscoveryConfigNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all LoginDiscoveryConfigs in the indexer for a given namespace. -func (s loginDiscoveryConfigNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.LoginDiscoveryConfig, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.LoginDiscoveryConfig)) - }) - return ret, err -} - -// Get retrieves the LoginDiscoveryConfig from the indexer for a given namespace and name. -func (s loginDiscoveryConfigNamespaceLister) Get(name string) (*v1alpha1.LoginDiscoveryConfig, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1alpha1.Resource("logindiscoveryconfig"), name) - } - return obj.(*v1alpha1.LoginDiscoveryConfig), nil -} diff --git a/kubernetes/1.19/client-go/listers/placeholder/v1alpha1/credentialrequest.go b/kubernetes/1.19/client-go/listers/pinniped/v1alpha1/credentialrequest.go similarity index 95% rename from kubernetes/1.19/client-go/listers/placeholder/v1alpha1/credentialrequest.go rename to kubernetes/1.19/client-go/listers/pinniped/v1alpha1/credentialrequest.go index e6a88cf94..81a6e9005 100644 --- a/kubernetes/1.19/client-go/listers/placeholder/v1alpha1/credentialrequest.go +++ b/kubernetes/1.19/client-go/listers/pinniped/v1alpha1/credentialrequest.go @@ -8,10 +8,11 @@ SPDX-License-Identifier: Apache-2.0 package v1alpha1 import ( - v1alpha1 "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/placeholder/v1alpha1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" + + v1alpha1 "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1" ) // CredentialRequestLister helps list CredentialRequests. diff --git a/kubernetes/1.19/client-go/listers/placeholder/v1alpha1/expansion_generated.go b/kubernetes/1.19/client-go/listers/pinniped/v1alpha1/expansion_generated.go similarity index 100% rename from kubernetes/1.19/client-go/listers/placeholder/v1alpha1/expansion_generated.go rename to kubernetes/1.19/client-go/listers/pinniped/v1alpha1/expansion_generated.go diff --git a/pkg/client/client.go b/pkg/client/client.go index 0490175af..2e8b595c8 100644 --- a/pkg/client/client.go +++ b/pkg/client/client.go @@ -31,10 +31,10 @@ var ( const ( // credentialRequestsAPIPath is the API path for the v1alpha1 CredentialRequest API. - credentialRequestsAPIPath = "/apis/placeholder.suzerain-io.github.io/v1alpha1/credentialrequests" + credentialRequestsAPIPath = "/apis/pinniped.dev/v1alpha1/credentialrequests" // userAgent is the user agent header value sent with requests. - userAgent = "placeholder-name" + userAgent = "pinniped" ) func credentialRequest(ctx context.Context, apiEndpoint *url.URL, token string) (*http.Request, error) { @@ -54,7 +54,7 @@ func credentialRequest(ctx context.Context, apiEndpoint *url.URL, token string) Spec CredentialRequestSpec `json:"spec"` Status struct{} `json:"status"` }{ - APIVersion: "placeholder.suzerain-io.github.io/v1alpha1", + APIVersion: "pinniped.dev/v1alpha1", Kind: "CredentialRequest", Spec: CredentialRequestSpec{Type: "token", Token: &CredentialRequestTokenCredential{Value: token}}, } @@ -99,8 +99,8 @@ func ExchangeToken(ctx context.Context, token, caBundle, apiEndpoint string) (*C } // Form the CredentialRequest API URL by appending the API path to the main API endpoint. - placeholderEndpointURL := *endpointURL - placeholderEndpointURL.Path = filepath.Join(placeholderEndpointURL.Path, credentialRequestsAPIPath) + pinnipedEndpointURL := *endpointURL + pinnipedEndpointURL.Path = filepath.Join(pinnipedEndpointURL.Path, credentialRequestsAPIPath) // Initialize a TLS client configuration from the provided CA bundle. tlsConfig := tls.Config{ @@ -111,8 +111,8 @@ func ExchangeToken(ctx context.Context, token, caBundle, apiEndpoint string) (*C return nil, fmt.Errorf("%w: no certificates found", ErrInvalidCABundle) } - // Create a request object for the "POST /apis/placeholder.suzerain-io.github.io/v1alpha1/credentialrequests" request. - req, err := credentialRequest(ctx, &placeholderEndpointURL, token) + // Create a request object for the "POST /apis/pinniped.dev/v1alpha1/credentialrequests" request. + req, err := credentialRequest(ctx, &pinnipedEndpointURL, token) if err != nil { return nil, fmt.Errorf("could not build request: %w", err) } diff --git a/pkg/client/client_test.go b/pkg/client/client_test.go index 4f5d9cc35..11849f5a5 100644 --- a/pkg/client/client_test.go +++ b/pkg/client/client_test.go @@ -136,7 +136,7 @@ func TestExchangeToken(t *testing.T) { _, _ = w.Write([]byte(` { "kind": "CredentialRequest", - "apiVersion": "placeholder.suzerain-io.github.io/v1alpha1", + "apiVersion": "pinniped.dev/v1alpha1", "metadata": { "creationTimestamp": null }, @@ -161,7 +161,7 @@ func TestExchangeToken(t *testing.T) { _, _ = w.Write([]byte(` { "kind": "CredentialRequest", - "apiVersion": "placeholder.suzerain-io.github.io/v1alpha1", + "apiVersion": "pinniped.dev/v1alpha1", "metadata": { "creationTimestamp": null }, @@ -185,7 +185,7 @@ func TestExchangeToken(t *testing.T) { // Start a test server that returns successfully and asserts various properties of the request. caBundle, endpoint := startTestServer(t, func(w http.ResponseWriter, r *http.Request) { require.Equal(t, http.MethodPost, r.Method) - require.Equal(t, "/apis/placeholder.suzerain-io.github.io/v1alpha1/credentialrequests", r.URL.Path) + require.Equal(t, "/apis/pinniped.dev/v1alpha1/credentialrequests", r.URL.Path) require.Equal(t, "application/json", r.Header.Get("content-type")) body, err := ioutil.ReadAll(r.Body) @@ -193,7 +193,7 @@ func TestExchangeToken(t *testing.T) { require.JSONEq(t, `{ "kind": "CredentialRequest", - "apiVersion": "placeholder.suzerain-io.github.io/v1alpha1", + "apiVersion": "pinniped.dev/v1alpha1", "metadata": { "creationTimestamp": null }, @@ -213,7 +213,7 @@ func TestExchangeToken(t *testing.T) { _, _ = w.Write([]byte(` { "kind": "CredentialRequest", - "apiVersion": "placeholder.suzerain-io.github.io/v1alpha1", + "apiVersion": "pinniped.dev/v1alpha1", "metadata": { "creationTimestamp": null }, diff --git a/pkg/client/go.mod b/pkg/client/go.mod index af4f7b818..31b0b1282 100644 --- a/pkg/client/go.mod +++ b/pkg/client/go.mod @@ -1,4 +1,4 @@ -module github.com/suzerain-io/placeholder-name/pkg/client +module github.com/suzerain-io/pinniped/pkg/client go 1.14 diff --git a/pkg/config/api/types.go b/pkg/config/api/types.go index 64cb25c43..bf7c468c6 100644 --- a/pkg/config/api/types.go +++ b/pkg/config/api/types.go @@ -5,16 +5,16 @@ SPDX-License-Identifier: Apache-2.0 package api -// Config contains knobs to setup an instance of placeholder-name. +// Config contains knobs to setup an instance of pinniped. type Config struct { - WebhookConfig WebhookConfigSpec `json:"webhook"` - DiscoveryConfig DiscoveryConfigSpec `json:"discovery"` + WebhookConfig WebhookConfigSpec `json:"webhook"` + DiscoveryInfo DiscoveryInfoSpec `json:"discovery"` } -// WebhookConfig contains configuration knobs specific to placeholder-name's use +// WebhookConfig contains configuration knobs specific to Pinniped's use // of a webhook for token validation. type WebhookConfigSpec struct { - // URL contains the URL of the webhook that placeholder-name will use + // URL contains the URL of the webhook that pinniped will use // to validate external credentials. URL string `json:"url"` @@ -23,11 +23,11 @@ type WebhookConfigSpec struct { CABundle []byte `json:"caBundle"` } -// DiscoveryConfigSpec contains configuration knobs specific to -// placeholder-name's publishing of discovery information. These values can be -// viewed as overrides, i.e., if these are set, then placeholder-name will +// DiscoveryInfoSpec contains configuration knobs specific to +// pinniped's publishing of discovery information. These values can be +// viewed as overrides, i.e., if these are set, then pinniped will // publish these values in its discovery document instead of the ones it finds. -type DiscoveryConfigSpec struct { - // URL contains the URL at which placeholder-name can be contacted. +type DiscoveryInfoSpec struct { + // URL contains the URL at which pinniped can be contacted. URL *string `json:"url,omitempty"` } diff --git a/pkg/config/config.go b/pkg/config/config.go index 1be825101..bfbaec2a6 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -13,7 +13,7 @@ import ( "sigs.k8s.io/yaml" - "github.com/suzerain-io/placeholder-name/pkg/config/api" + "github.com/suzerain-io/pinniped/pkg/config/api" ) // FromPath loads an api.Config from a provided local file path. diff --git a/pkg/config/config_test.go b/pkg/config/config_test.go index 82f06379f..c355fcfa0 100644 --- a/pkg/config/config_test.go +++ b/pkg/config/config_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/suzerain-io/placeholder-name/pkg/config/api" + "github.com/suzerain-io/pinniped/pkg/config/api" ) func TestFromPath(t *testing.T) { @@ -23,7 +23,7 @@ func TestFromPath(t *testing.T) { name: "Happy", path: "testdata/happy.yaml", wantConfig: &api.Config{ - DiscoveryConfig: api.DiscoveryConfigSpec{ + DiscoveryInfo: api.DiscoveryInfoSpec{ URL: stringPtr("https://some.discovery/url"), }, WebhookConfig: api.WebhookConfigSpec{ @@ -36,7 +36,7 @@ func TestFromPath(t *testing.T) { name: "NoDiscovery", path: "testdata/no-discovery.yaml", wantConfig: &api.Config{ - DiscoveryConfig: api.DiscoveryConfigSpec{ + DiscoveryInfo: api.DiscoveryInfoSpec{ URL: nil, }, WebhookConfig: api.WebhookConfigSpec{ diff --git a/pkg/config/webhook.go b/pkg/config/webhook.go index 81b8c46a4..b359b25af 100644 --- a/pkg/config/webhook.go +++ b/pkg/config/webhook.go @@ -18,13 +18,13 @@ import ( "k8s.io/client-go/tools/clientcmd" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" - "github.com/suzerain-io/placeholder-name/pkg/config/api" + "github.com/suzerain-io/pinniped/pkg/config/api" ) // NewWebhook creates a webhook from the provided API server url and caBundle // used to validate TLS connections. func NewWebhook(spec api.WebhookConfigSpec) (*webhook.WebhookTokenAuthenticator, error) { - kubeconfig, err := ioutil.TempFile("", "placeholder-name-webhook-kubeconfig-*") + kubeconfig, err := ioutil.TempFile("", "pinniped-webhook-kubeconfig-*") if err != nil { return nil, fmt.Errorf("create temp file: %w", err) } diff --git a/pkg/config/webhook_test.go b/pkg/config/webhook_test.go index bb3c47906..3ba33cda9 100644 --- a/pkg/config/webhook_test.go +++ b/pkg/config/webhook_test.go @@ -17,7 +17,7 @@ import ( func TestAnonymousKubeconfig(t *testing.T) { expect := require.New(t) - f, err := ioutil.TempFile("", "placeholder-name-anonymous-kubeconfig-test-*") + f, err := ioutil.TempFile("", "pinniped-anonymous-kubeconfig-test-*") expect.NoError(err) defer os.Remove(f.Name()) diff --git a/test/go.mod b/test/go.mod index ca2e2c15c..20dfd4d64 100644 --- a/test/go.mod +++ b/test/go.mod @@ -1,30 +1,23 @@ -module github.com/suzerain-io/placeholder-name/test +module github.com/suzerain-io/pinniped/test go 1.14 require ( - github.com/coreos/go-etcd v2.0.0+incompatible // indirect - github.com/cpuguy83/go-md2man v1.0.10 // indirect github.com/davecgh/go-spew v1.1.1 - github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0 // indirect - github.com/evanphx/json-patch v4.2.0+incompatible // indirect - github.com/gophercloud/gophercloud v0.1.0 // indirect github.com/stretchr/testify v1.6.1 - github.com/suzerain-io/placeholder-name v0.0.0-20200819182107-1b9a70d089f4 - github.com/suzerain-io/placeholder-name/kubernetes/1.19/api v0.0.0-00010101000000-000000000000 - github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go v0.0.0-00010101000000-000000000000 - github.com/suzerain-io/placeholder-name/pkg/client v0.0.0-00010101000000-000000000000 - github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8 // indirect + github.com/suzerain-io/pinniped v0.0.0-20200819182107-1b9a70d089f4 + github.com/suzerain-io/pinniped/kubernetes/1.19/api v0.0.0-00010101000000-000000000000 + github.com/suzerain-io/pinniped/kubernetes/1.19/client-go v0.0.0-00010101000000-000000000000 + github.com/suzerain-io/pinniped/pkg/client v0.0.0-00010101000000-000000000000 k8s.io/api v0.19.0-rc.0 k8s.io/apimachinery v0.19.0-rc.0 k8s.io/client-go v0.19.0-rc.0 - k8s.io/klog v1.0.0 // indirect k8s.io/kube-aggregator v0.19.0-rc.0 ) replace ( - github.com/suzerain-io/placeholder-name => ../ - github.com/suzerain-io/placeholder-name/kubernetes/1.19/api => ../kubernetes/1.19/api - github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go => ../kubernetes/1.19/client-go - github.com/suzerain-io/placeholder-name/pkg/client => ../pkg/client + github.com/suzerain-io/pinniped => ../ + github.com/suzerain-io/pinniped/kubernetes/1.19/api => ../kubernetes/1.19/api + github.com/suzerain-io/pinniped/kubernetes/1.19/client-go => ../kubernetes/1.19/client-go + github.com/suzerain-io/pinniped/pkg/client => ../pkg/client ) diff --git a/test/go.sum b/test/go.sum index 194c34527..1e03f4e3b 100644 --- a/test/go.sum +++ b/test/go.sum @@ -67,16 +67,13 @@ github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:z github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -89,7 +86,6 @@ github.com/denis-tingajkin/go-header v0.3.1 h1:ymEpSiFjeItCy1FOP+x0M2KdCELdEAHUs github.com/denis-tingajkin/go-header v0.3.1/go.mod h1:sq/2IxMhaZX+RRcgHfCRx/m0M5na0fBt4/CRe7Lrji0= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -100,7 +96,6 @@ github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v0.0.0-20190815234213-e83c0a1c26c8/go.mod h1:pmLOTb3x90VhIKxsA9yeQG5yfOkkKnkk1h+Ql8NDYDw= -github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= @@ -176,7 +171,6 @@ github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfb github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -238,16 +232,14 @@ github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OI github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.4.1 h1:DLJCy1n/vrD4HPjOvYcT8aYQXpPIzoRZONaYwyycI+I= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/gookit/color v1.2.4/go.mod h1:AhIE+pS6D4Ql0SQWbBeXPHw7gY0/sjHoA4s/n1KB7xg= github.com/gookit/color v1.2.5/go.mod h1:AhIE+pS6D4Ql0SQWbBeXPHw7gY0/sjHoA4s/n1KB7xg= -github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= @@ -297,7 +289,6 @@ github.com/jmoiron/sqlx v1.2.1-0.20190826204134-d7d95172beb5/go.mod h1:1FEQNm3xl github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= @@ -386,6 +377,7 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWb github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nishanths/exhaustive v0.0.0-20200708172631-8866003e3856 h1:W3KBC2LFyfgd+wNudlfgCCsTo4q97MeNWrfz8/wSdSc= github.com/nishanths/exhaustive v0.0.0-20200708172631-8866003e3856/go.mod h1:wBEpHwM2OdmeNpdCvRPUlkEbBuaFmcK4Wv8Q7FuGW3c= +github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= @@ -394,11 +386,13 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.13.0 h1:M76yO2HkZASFjXL0HSoZJ1AYEmQxNJmY41Jx1zNUq1Y= github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= +github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= @@ -440,7 +434,6 @@ github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95/go.mod h1:r github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.0/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryancurrah/gomodguard v1.1.0 h1:DWbye9KyMgytn8uYpuHkwf0RHqAYO6Ay/D0TbCpPtVU= github.com/ryancurrah/gomodguard v1.1.0/go.mod h1:4O8tr7hBODaGE6VIhfJDHcwzh5GUccKSJBU0UMXJFVM= @@ -478,7 +471,6 @@ github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTd github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.0.0 h1:6m/oheQuQ13N9ks4hubMG6BnvwOeaJrqSPLahSnczz8= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= @@ -488,7 +480,6 @@ github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.7.0 h1:xVKxvI7ouOI5I+U9s2eeiUfMaWBVoXA3AWskkrqK0VM= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= @@ -508,8 +499,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/suzerain-io/controller-go v0.0.0-20200730212956-7f99b569ca9f h1:gZ6rAdl+VE9DT0yE52xY/kJZ/hOJYxwtsgGoPr5vItI= github.com/suzerain-io/controller-go v0.0.0-20200730212956-7f99b569ca9f/go.mod h1:+v9upryFWBJac6KXKlheGHr7e3kqpk1ldH1iIMFopMs= -github.com/suzerain-io/placeholder-name v0.0.0-20200819182107-1b9a70d089f4 h1:3pdsX5UVieFJnYTtlNMoa/OHMzfHAfDwc91gT6LrtYU= -github.com/suzerain-io/placeholder-name v0.0.0-20200819182107-1b9a70d089f4/go.mod h1:ohfv1ktuLQCoLviP17/IjYnDpbUOPkwsjH61P8Wraa8= github.com/tdakkota/asciicheck v0.0.0-20200416190851-d7f85be797a2 h1:Xr9gkxfOP0KQWXKNqmwe8vEeSUiUj4Rlee9CMVX2ZUQ= github.com/tdakkota/asciicheck v0.0.0-20200416190851-d7f85be797a2/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= github.com/tetafro/godot v0.4.2/go.mod h1:/7NLHhv08H1+8DNj0MElpAACw1ajsCuf3TKNQxA5S+0= @@ -522,7 +511,6 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1 github.com/tommy-muehle/go-mnd v1.3.1-0.20200224220436-e6f9a994e8fa h1:RC4maTWLKKwb7p1cnoygsbKIgNlJqSYBeAFON3Ar8As= github.com/tommy-muehle/go-mnd v1.3.1-0.20200224220436-e6f9a994e8fa/go.mod h1:dSUh0FtTP8VhvkL1S+gUR1OKd9ZnSaozuI6r3m6wOig= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ultraware/funlen v0.0.2 h1:Av96YVBwwNSe4MLR7iI/BIa3VyI7/djnto/pK3Uxbdo= github.com/ultraware/funlen v0.0.2/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= github.com/ultraware/whitespace v0.0.4 h1:If7Va4cM03mpgrNH9k49/VOicWpGoG70XPBFFODYDsg= @@ -542,7 +530,6 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= -go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.etcd.io/etcd v0.5.0-alpha.5.0.20200520232829-54ba9589114f/go.mod h1:skWido08r9w6Lq/w70DO5XYIKMu4QFu1+4VsqLQuJy8= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= @@ -553,8 +540,6 @@ go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/ go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -589,7 +574,6 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -609,7 +593,6 @@ golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e h1:3G+cUijn7XD+S4eJFddp53Pv7+slrESplyjG25HgL+k= @@ -629,7 +612,6 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -637,8 +619,6 @@ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -652,7 +632,6 @@ golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -667,7 +646,6 @@ golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4 h1:5/PjkGUjvEU5Gl6BxmvKRPpqo2uNMv4rcHBMwzk/st8= golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -710,7 +688,6 @@ golang.org/x/tools v0.0.0-20190719005602-e377ae9d6386/go.mod h1:jcCCGcm9btYwXyDq golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -764,7 +741,6 @@ google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiq google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -794,6 +770,7 @@ gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -815,41 +792,25 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.4 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.18.6/go.mod h1:eeyxr+cwCjMdLAmr2W3RyDI0VvTawSg/3RFFBEnmZGI= k8s.io/api v0.19.0-rc.0 h1:K+xi+F3RNAxpFyS1f7uHekMNprjFX7WVZDx2lJE+A3A= k8s.io/api v0.19.0-rc.0/go.mod h1:WBGMHEmngOdQBAvJiYUgP5mGDdCWXM52yDm1gtos8C0= -k8s.io/apimachinery v0.18.6/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= k8s.io/apimachinery v0.19.0-rc.0 h1:IBmRy0elJCGgxtCT0bHT93N+rhx+vF2DD1XXJ3ntLa8= k8s.io/apimachinery v0.19.0-rc.0/go.mod h1:EjWiYOPi+BZennZ5pGa3JLkQ+znhEOodGy/+umjiLDU= -k8s.io/apiserver v0.18.6/go.mod h1:Zt2XvTHuaZjBz6EFYzpp+X4hTmgWGy8AthNVnTdm3Wg= k8s.io/apiserver v0.19.0-rc.0/go.mod h1:yEjU524zw/pxiG6nOsgY5Hu/akAg7tH/J/tKrLUp/mo= -k8s.io/client-go v0.18.6/go.mod h1:/fwtGLjYMS1MaM5oi+eXhKwG+1UHidUEXRh6cNsdO0Q= k8s.io/client-go v0.19.0-rc.0 h1:6WW8MElhoLeYcLiN4ky1159XG5E39KYdmLCrV/6lNiE= k8s.io/client-go v0.19.0-rc.0/go.mod h1:3kWGD05F7c58atlk7ep9ob1hg2Yu9NSz8gJxCNNTHhc= -k8s.io/code-generator v0.18.6/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= k8s.io/code-generator v0.19.0-rc.0/go.mod h1:2jgaU9hVSqti1GiO69UFSoTZcL5XAvZSrXaNnK5RVA0= -k8s.io/component-base v0.18.6/go.mod h1:knSVsibPR5K6EW2XOjEHik6sdU5nCvKMrzMt2D4In14= k8s.io/component-base v0.19.0-rc.0/go.mod h1:8cHxNUQdeDIIcORXOrMABUPbuEmbbHRtEweSSk8Il4g= -k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= -k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0 h1:XRvcwJozkgZ1UQJmfMGpvRthQHOvihEhYtDfAaxMz/A= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/kube-aggregator v0.18.6 h1:xGP3oe0tAWEYnGWTnDPjXiIItekrnwDA2O7w0WqvGoo= -k8s.io/kube-aggregator v0.18.6/go.mod h1:MKm8inLHdeiXQJCl6UdmgMosRrqJgyxO2obTXOkey/s= k8s.io/kube-aggregator v0.19.0-rc.0 h1:+u9y1c0R2GF8fuaEnlJrdUtxoEmQOON98oatycSquOA= k8s.io/kube-aggregator v0.19.0-rc.0/go.mod h1:DCq8Korz9XUEZVsq0wAGIAyJW79xdcYhIBtvWNTsTkc= -k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= k8s.io/kube-openapi v0.0.0-20200427153329-656914f816f9/go.mod h1:bfCVj+qXcEaE5SCvzBaqpOySr6tuCcpPKqF6HD8nyCw= k8s.io/kube-openapi v0.0.0-20200615155156-dffdd1682719 h1:n/ElZyI1dzFPXKS8nZMw8wozBUz7vEfL0Ja7jN2rSvA= k8s.io/kube-openapi v0.0.0-20200615155156-dffdd1682719/go.mod h1:bfCVj+qXcEaE5SCvzBaqpOySr6tuCcpPKqF6HD8nyCw= -k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200619165400-6e3d28b6ed19 h1:7Nu2dTj82c6IaWvL7hImJzcXoTPz1MsSCH7r+0m6rfo= k8s.io/utils v0.0.0-20200619165400-6e3d28b6ed19/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= mvdan.cc/gofumpt v0.0.0-20200709182408-4fd085cb6d5f h1:gi7cb8HTDZ6q8VqsUpkdoFi3vxwHMneQ6+Q5Ap5hjPE= @@ -863,7 +824,6 @@ mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f/go.mod h1:4G1h5nDURzA3bwVMZI rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.9/go.mod h1:dzAXnQbTRyDlZPJX2SUPEqvnB+j7AJjtlox7PEwigU0= sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= sigs.k8s.io/structured-merge-diff/v3 v3.0.0 h1:dOmIZBMfhcHS09XZkMyUgkq5trg3/jRyJYFZUiaOp8E= diff --git a/test/integration/api_discovery_test.go b/test/integration/api_discovery_test.go index 0d9761f4c..c0f797c1f 100644 --- a/test/integration/api_discovery_test.go +++ b/test/integration/api_discovery_test.go @@ -11,40 +11,40 @@ import ( "github.com/stretchr/testify/require" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/suzerain-io/placeholder-name/test/library" + "github.com/suzerain-io/pinniped/test/library" ) func TestGetAPIResourceList(t *testing.T) { library.SkipUnlessIntegration(t) - client := library.NewPlaceholderNameClientset(t) + client := library.NewPinnipedClientset(t) groups, resources, err := client.Discovery().ServerGroupsAndResources() require.NoError(t, err) - groupName := "placeholder.suzerain-io.github.io" + groupName := "pinniped.dev" actualGroup := findGroup(groupName, groups) require.NotNil(t, actualGroup) expectedGroup := &metav1.APIGroup{ - Name: "placeholder.suzerain-io.github.io", + Name: "pinniped.dev", Versions: []metav1.GroupVersionForDiscovery{ { - GroupVersion: "placeholder.suzerain-io.github.io/v1alpha1", + GroupVersion: "pinniped.dev/v1alpha1", Version: "v1alpha1", }, }, PreferredVersion: metav1.GroupVersionForDiscovery{ - GroupVersion: "placeholder.suzerain-io.github.io/v1alpha1", + GroupVersion: "pinniped.dev/v1alpha1", Version: "v1alpha1", }, } require.Equal(t, expectedGroup, actualGroup) - actualPlaceHolderResources := findResources("placeholder.suzerain-io.github.io/v1alpha1", resources) - require.NotNil(t, actualPlaceHolderResources) - actualCrdsPlaceHolderResources := findResources("crds.placeholder.suzerain-io.github.io/v1alpha1", resources) - require.NotNil(t, actualPlaceHolderResources) + actualPinnipedResources := findResources("pinniped.dev/v1alpha1", resources) + require.NotNil(t, actualPinnipedResources) + actualCrdPinnipedResources := findResources("crd.pinniped.dev/v1alpha1", resources) + require.NotNil(t, actualPinnipedResources) expectedCredentialRequestAPIResource := metav1.APIResource{ Name: "credentialrequests", @@ -61,10 +61,10 @@ func TestGetAPIResourceList(t *testing.T) { } expectedLDCAPIResource := metav1.APIResource{ - Name: "logindiscoveryconfigs", - SingularName: "logindiscoveryconfig", + Name: "pinnipeddiscoveryinfos", + SingularName: "pinnipeddiscoveryinfo", Namespaced: true, - Kind: "LoginDiscoveryConfig", + Kind: "PinnipedDiscoveryInfo", Verbs: metav1.Verbs([]string{ "delete", "deletecollection", "get", "list", "patch", "create", "update", "watch", }), @@ -72,11 +72,11 @@ func TestGetAPIResourceList(t *testing.T) { StorageVersionHash: "unknown: to be filled in automatically below", } - require.Len(t, actualPlaceHolderResources.APIResources, 1) - require.Equal(t, expectedCredentialRequestAPIResource, actualPlaceHolderResources.APIResources[0]) + require.Len(t, actualPinnipedResources.APIResources, 1) + require.Equal(t, expectedCredentialRequestAPIResource, actualPinnipedResources.APIResources[0]) - require.Len(t, actualCrdsPlaceHolderResources.APIResources, 1) - actualAPIResource := actualCrdsPlaceHolderResources.APIResources[0] + require.Len(t, actualCrdPinnipedResources.APIResources, 1) + actualAPIResource := actualCrdPinnipedResources.APIResources[0] // workaround because its hard to predict the storage version hash (e.g. "t/+v41y+3e4=") // so just don't worry about comparing that field expectedLDCAPIResource.StorageVersionHash = actualAPIResource.StorageVersionHash diff --git a/test/integration/api_serving_certs_test.go b/test/integration/api_serving_certs_test.go index 0d4337171..ba69fdc19 100644 --- a/test/integration/api_serving_certs_test.go +++ b/test/integration/api_serving_certs_test.go @@ -15,9 +15,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes" - "github.com/suzerain-io/placeholder-name/internal/testutil" - "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/placeholder/v1alpha1" - "github.com/suzerain-io/placeholder-name/test/library" + "github.com/suzerain-io/pinniped/internal/testutil" + "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1" + "github.com/suzerain-io/pinniped/test/library" ) func TestAPIServingCertificateAutoCreationAndRotation(t *testing.T) { @@ -74,15 +74,15 @@ func TestAPIServingCertificateAutoCreationAndRotation(t *testing.T) { for _, test := range tests { test := test t.Run(test.name, func(t *testing.T) { - namespaceName := library.Getenv(t, "PLACEHOLDER_NAME_NAMESPACE") + namespaceName := library.Getenv(t, "PINNIPED_NAMESPACE") kubeClient := library.NewClientset(t) aggregatedClient := library.NewAggregatedClientset(t) - placeholderClient := library.NewPlaceholderNameClientset(t) + pinnipedClient := library.NewPinnipedClientset(t) ctx, cancel := context.WithTimeout(context.Background(), 2*time.Minute) defer cancel() - const apiServiceName = "v1alpha1.placeholder.suzerain-io.github.io" + const apiServiceName = "v1alpha1.pinniped.dev" // Get the initial auto-generated version of the Secret. secret, err := kubeClient.CoreV1().Secrets(namespaceName).Get(ctx, "api-serving-cert", metav1.GetOptions{}) @@ -132,7 +132,7 @@ func TestAPIServingCertificateAutoCreationAndRotation(t *testing.T) { // because the kube API server uses these certs when proxying requests to the aggregated API server, // so this is effectively checking that the aggregated API server is using these new certs. aggregatedAPIWorking := func() bool { - _, err = placeholderClient.PlaceholderV1alpha1().CredentialRequests().Create(ctx, &v1alpha1.CredentialRequest{ + _, err = pinnipedClient.PinnipedV1alpha1().CredentialRequests().Create(ctx, &v1alpha1.CredentialRequest{ TypeMeta: metav1.TypeMeta{}, ObjectMeta: metav1.ObjectMeta{}, Spec: v1alpha1.CredentialRequestSpec{ diff --git a/test/integration/app_availability_test.go b/test/integration/app_availability_test.go index e636baabf..e21c1ef2b 100644 --- a/test/integration/app_availability_test.go +++ b/test/integration/app_availability_test.go @@ -15,13 +15,13 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/suzerain-io/placeholder-name/test/library" + "github.com/suzerain-io/pinniped/test/library" ) func TestGetDeployment(t *testing.T) { library.SkipUnlessIntegration(t) - namespaceName := library.Getenv(t, "PLACEHOLDER_NAME_NAMESPACE") - deploymentName := library.Getenv(t, "PLACEHOLDER_NAME_APP_NAME") + namespaceName := library.Getenv(t, "PINNIPED_NAMESPACE") + deploymentName := library.Getenv(t, "PINNIPED_APP_NAME") client := library.NewClientset(t) diff --git a/test/integration/client_test.go b/test/integration/client_test.go index 6f318a5a3..1cb374a3f 100644 --- a/test/integration/client_test.go +++ b/test/integration/client_test.go @@ -13,8 +13,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/suzerain-io/placeholder-name/pkg/client" - "github.com/suzerain-io/placeholder-name/test/library" + "github.com/suzerain-io/pinniped/pkg/client" + "github.com/suzerain-io/pinniped/test/library" ) /* @@ -56,7 +56,7 @@ var maskKey = func(s string) string { return strings.ReplaceAll(s, "TESTING KEY" func TestClient(t *testing.T) { library.SkipUnlessIntegration(t) - tmcClusterToken := library.Getenv(t, "PLACEHOLDER_NAME_TMC_CLUSTER_TOKEN") + tmcClusterToken := library.Getenv(t, "PINNIPED_TMC_CLUSTER_TOKEN") ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) defer cancel() diff --git a/test/integration/credentialrequest_test.go b/test/integration/credentialrequest_test.go index af4fe8fb3..69990850e 100644 --- a/test/integration/credentialrequest_test.go +++ b/test/integration/credentialrequest_test.go @@ -22,19 +22,19 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes" - "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/placeholder/v1alpha1" - "github.com/suzerain-io/placeholder-name/test/library" + "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1" + "github.com/suzerain-io/pinniped/test/library" ) func makeRequest(t *testing.T, spec v1alpha1.CredentialRequestSpec) (*v1alpha1.CredentialRequest, error) { t.Helper() - client := library.NewAnonymousPlaceholderNameClientset(t) + client := library.NewAnonymousPinnipedClientset(t) ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() - return client.PlaceholderV1alpha1().CredentialRequests().Create(ctx, &v1alpha1.CredentialRequest{ + return client.PinnipedV1alpha1().CredentialRequests().Create(ctx, &v1alpha1.CredentialRequest{ TypeMeta: metav1.TypeMeta{}, ObjectMeta: metav1.ObjectMeta{}, Spec: spec, @@ -63,7 +63,7 @@ func addTestClusterRoleBinding(ctx context.Context, t *testing.T, adminClient ku func TestSuccessfulCredentialRequest(t *testing.T) { library.SkipUnlessIntegration(t) - tmcClusterToken := library.Getenv(t, "PLACEHOLDER_NAME_TMC_CLUSTER_TOKEN") + tmcClusterToken := library.Getenv(t, "PINNIPED_TMC_CLUSTER_TOKEN") response, err := makeRequest(t, v1alpha1.CredentialRequestSpec{ Type: v1alpha1.TokenCredentialType, diff --git a/test/integration/kubectl_test.go b/test/integration/kubectl_test.go index b00569812..c849adef1 100644 --- a/test/integration/kubectl_test.go +++ b/test/integration/kubectl_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/suzerain-io/placeholder-name/test/library" + "github.com/suzerain-io/pinniped/test/library" ) func TestGetNodes(t *testing.T) { diff --git a/test/integration/logindiscoveryconfig_test.go b/test/integration/pinnipeddiscoveryinfo_test.go similarity index 54% rename from test/integration/logindiscoveryconfig_test.go rename to test/integration/pinnipeddiscoveryinfo_test.go index d7fe896cb..59d555128 100644 --- a/test/integration/logindiscoveryconfig_test.go +++ b/test/integration/pinnipeddiscoveryinfo_test.go @@ -15,15 +15,15 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/rest" - crdsplaceholderv1alpha1 "github.com/suzerain-io/placeholder-name/kubernetes/1.19/api/apis/crdsplaceholder/v1alpha1" - "github.com/suzerain-io/placeholder-name/test/library" + crdpinnipedv1alpha1 "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/crdpinniped/v1alpha1" + "github.com/suzerain-io/pinniped/test/library" ) -func TestSuccessfulLoginDiscoveryConfig(t *testing.T) { +func TestSuccessfulPinnipedDiscoveryInfo(t *testing.T) { library.SkipUnlessIntegration(t) - namespaceName := library.Getenv(t, "PLACEHOLDER_NAME_NAMESPACE") + namespaceName := library.Getenv(t, "PINNIPED_NAMESPACE") - client := library.NewPlaceholderNameClientset(t) + client := library.NewPinnipedClientset(t) ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() @@ -31,38 +31,38 @@ func TestSuccessfulLoginDiscoveryConfig(t *testing.T) { config := library.NewClientConfig(t) expectedLDCSpec := expectedLDCSpec(config) configList, err := client. - CrdsV1alpha1(). - LoginDiscoveryConfigs(namespaceName). + CrdV1alpha1(). + PinnipedDiscoveryInfos(namespaceName). List(ctx, metav1.ListOptions{}) require.NoError(t, err) require.Len(t, configList.Items, 1) require.Equal(t, expectedLDCSpec, &configList.Items[0].Spec) } -func TestReconcilingLoginDiscoveryConfig(t *testing.T) { +func TestReconcilingPinnipedDiscoveryInfo(t *testing.T) { library.SkipUnlessIntegration(t) - namespaceName := library.Getenv(t, "PLACEHOLDER_NAME_NAMESPACE") + namespaceName := library.Getenv(t, "PINNIPED_NAMESPACE") - client := library.NewPlaceholderNameClientset(t) + client := library.NewPinnipedClientset(t) ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() err := client. - CrdsV1alpha1(). - LoginDiscoveryConfigs(namespaceName). - Delete(ctx, "placeholder-name-config", metav1.DeleteOptions{}) + CrdV1alpha1(). + PinnipedDiscoveryInfos(namespaceName). + Delete(ctx, "pinniped-config", metav1.DeleteOptions{}) require.NoError(t, err) config := library.NewClientConfig(t) expectedLDCSpec := expectedLDCSpec(config) - var actualLDC *crdsplaceholderv1alpha1.LoginDiscoveryConfig + var actualLDC *crdpinnipedv1alpha1.PinnipedDiscoveryInfo for i := 0; i < 10; i++ { actualLDC, err = client. - CrdsV1alpha1(). - LoginDiscoveryConfigs(namespaceName). - Get(ctx, "placeholder-name-config", metav1.GetOptions{}) + CrdV1alpha1(). + PinnipedDiscoveryInfos(namespaceName). + Get(ctx, "pinniped-config", metav1.GetOptions{}) if err == nil { break } @@ -72,8 +72,8 @@ func TestReconcilingLoginDiscoveryConfig(t *testing.T) { require.Equal(t, expectedLDCSpec, &actualLDC.Spec) } -func expectedLDCSpec(config *rest.Config) *crdsplaceholderv1alpha1.LoginDiscoveryConfigSpec { - return &crdsplaceholderv1alpha1.LoginDiscoveryConfigSpec{ +func expectedLDCSpec(config *rest.Config) *crdpinnipedv1alpha1.PinnipedDiscoveryInfoSpec { + return &crdpinnipedv1alpha1.PinnipedDiscoveryInfoSpec{ Server: config.Host, CertificateAuthorityData: base64.StdEncoding.EncodeToString(config.TLSClientConfig.CAData), } diff --git a/test/library/client.go b/test/library/client.go index 92b70c874..910df3efc 100644 --- a/test/library/client.go +++ b/test/library/client.go @@ -17,7 +17,7 @@ import ( clientcmdapi "k8s.io/client-go/tools/clientcmd/api" aggregatorclient "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset" - placeholdernameclientset "github.com/suzerain-io/placeholder-name/kubernetes/1.19/client-go/clientset/versioned" + pinnipedclientset "github.com/suzerain-io/pinniped/kubernetes/1.19/client-go/clientset/versioned" ) func NewClientConfig(t *testing.T) *rest.Config { @@ -38,16 +38,16 @@ func NewClientsetWithCertAndKey(t *testing.T, clientCertificateData, clientKeyDa return newClientsetWithConfig(t, newAnonymousClientRestConfigWithCertAndKeyAdded(t, clientCertificateData, clientKeyData)) } -func NewPlaceholderNameClientset(t *testing.T) placeholdernameclientset.Interface { +func NewPinnipedClientset(t *testing.T) pinnipedclientset.Interface { t.Helper() - return placeholdernameclientset.NewForConfigOrDie(NewClientConfig(t)) + return pinnipedclientset.NewForConfigOrDie(NewClientConfig(t)) } -func NewAnonymousPlaceholderNameClientset(t *testing.T) placeholdernameclientset.Interface { +func NewAnonymousPinnipedClientset(t *testing.T) pinnipedclientset.Interface { t.Helper() - return placeholdernameclientset.NewForConfigOrDie(newAnonymousClientRestConfig(t)) + return pinnipedclientset.NewForConfigOrDie(newAnonymousClientRestConfig(t)) } func NewAggregatedClientset(t *testing.T) aggregatorclient.Interface { @@ -83,7 +83,7 @@ func newAnonymousClientRestConfig(t *testing.T) *rest.Config { realConfig := NewClientConfig(t) - out, err := ioutil.TempFile("", "placeholder-name-anonymous-kubeconfig-test-*") + out, err := ioutil.TempFile("", "pinniped-anonymous-kubeconfig-test-*") require.NoError(t, err) defer os.Remove(out.Name())