From 889348e9997a6cbd37e2c13a2803ca42ca3d6f6f Mon Sep 17 00:00:00 2001 From: Margo Crawford Date: Thu, 9 Jun 2022 13:45:21 -0700 Subject: [PATCH 01/11] WIP aggregated api for oidcclientsecretrequest Signed-off-by: Margo Crawford --- apis/supervisor/virtual/oauth/doc.go.tmpl | 8 + .../supervisor/virtual/oauth/register.go.tmpl | 37 ++++ .../types_oidcclientsecretrequest.go.tmpl | 25 +++ .../virtual/oauth/v1alpha1/conversion.go.tmpl | 4 + .../virtual/oauth/v1alpha1/defaults.go.tmpl | 12 ++ .../virtual/oauth/v1alpha1/doc.go.tmpl | 11 ++ .../virtual/oauth/v1alpha1/register.go.tmpl | 42 ++++ .../types_oidcclientsecretrequest.go.tmpl | 28 +++ deploy/supervisor/deployment.yaml | 35 ++++ deploy/supervisor/helpers.lib.yaml | 1 + deploy/supervisor/rbac.yaml | 97 +++++++++- generated/1.17/README.adoc | 94 +++++++++ .../1.17/apis/supervisor/virtual/oauth/doc.go | 8 + .../apis/supervisor/virtual/oauth/register.go | 37 ++++ .../oauth/types_oidcclientsecretrequest.go | 25 +++ .../virtual/oauth/v1alpha1/conversion.go | 4 + .../virtual/oauth/v1alpha1/defaults.go | 12 ++ .../supervisor/virtual/oauth/v1alpha1/doc.go | 11 ++ .../virtual/oauth/v1alpha1/register.go | 42 ++++ .../v1alpha1/types_oidcclientsecretrequest.go | 28 +++ .../oauth/v1alpha1/zz_generated.conversion.go | 131 +++++++++++++ .../oauth/v1alpha1/zz_generated.deepcopy.go | 73 +++++++ .../oauth/v1alpha1/zz_generated.defaults.go | 20 ++ .../virtual/oauth/zz_generated.deepcopy.go | 73 +++++++ .../virtual/clientset/versioned/clientset.go | 84 ++++++++ .../virtual/clientset/versioned/doc.go | 7 + .../versioned/fake/clientset_generated.go | 69 +++++++ .../virtual/clientset/versioned/fake/doc.go | 7 + .../clientset/versioned/fake/register.go | 43 +++++ .../virtual/clientset/versioned/scheme/doc.go | 7 + .../clientset/versioned/scheme/register.go | 43 +++++ .../versioned/typed/oauth/v1alpha1/doc.go | 7 + .../typed/oauth/v1alpha1/fake/doc.go | 7 + .../oauth/v1alpha1/fake/fake_oauth_client.go | 27 +++ .../fake/fake_oidcclientsecretrequest.go | 33 ++++ .../oauth/v1alpha1/generated_expansion.go | 8 + .../typed/oauth/v1alpha1/oauth_client.go | 76 ++++++++ .../oauth/v1alpha1/oidcclientsecretrequest.go | 49 +++++ generated/1.18/README.adoc | 94 +++++++++ .../1.18/apis/supervisor/virtual/oauth/doc.go | 8 + .../apis/supervisor/virtual/oauth/register.go | 37 ++++ .../oauth/types_oidcclientsecretrequest.go | 25 +++ .../virtual/oauth/v1alpha1/conversion.go | 4 + .../virtual/oauth/v1alpha1/defaults.go | 12 ++ .../supervisor/virtual/oauth/v1alpha1/doc.go | 11 ++ .../virtual/oauth/v1alpha1/register.go | 42 ++++ .../v1alpha1/types_oidcclientsecretrequest.go | 28 +++ .../oauth/v1alpha1/zz_generated.conversion.go | 131 +++++++++++++ .../oauth/v1alpha1/zz_generated.deepcopy.go | 73 +++++++ .../oauth/v1alpha1/zz_generated.defaults.go | 20 ++ .../virtual/oauth/zz_generated.deepcopy.go | 73 +++++++ .../virtual/clientset/versioned/clientset.go | 84 ++++++++ .../virtual/clientset/versioned/doc.go | 7 + .../versioned/fake/clientset_generated.go | 69 +++++++ .../virtual/clientset/versioned/fake/doc.go | 7 + .../clientset/versioned/fake/register.go | 43 +++++ .../virtual/clientset/versioned/scheme/doc.go | 7 + .../clientset/versioned/scheme/register.go | 43 +++++ .../versioned/typed/oauth/v1alpha1/doc.go | 7 + .../typed/oauth/v1alpha1/fake/doc.go | 7 + .../oauth/v1alpha1/fake/fake_oauth_client.go | 27 +++ .../fake/fake_oidcclientsecretrequest.go | 36 ++++ .../oauth/v1alpha1/generated_expansion.go | 8 + .../typed/oauth/v1alpha1/oauth_client.go | 76 ++++++++ .../oauth/v1alpha1/oidcclientsecretrequest.go | 54 ++++++ generated/1.19/README.adoc | 94 +++++++++ .../1.19/apis/supervisor/virtual/oauth/doc.go | 8 + .../apis/supervisor/virtual/oauth/register.go | 37 ++++ .../oauth/types_oidcclientsecretrequest.go | 25 +++ .../virtual/oauth/v1alpha1/conversion.go | 4 + .../virtual/oauth/v1alpha1/defaults.go | 12 ++ .../supervisor/virtual/oauth/v1alpha1/doc.go | 11 ++ .../virtual/oauth/v1alpha1/register.go | 42 ++++ .../v1alpha1/types_oidcclientsecretrequest.go | 28 +++ .../oauth/v1alpha1/zz_generated.conversion.go | 131 +++++++++++++ .../oauth/v1alpha1/zz_generated.deepcopy.go | 73 +++++++ .../oauth/v1alpha1/zz_generated.defaults.go | 20 ++ .../virtual/oauth/zz_generated.deepcopy.go | 73 +++++++ .../virtual/clientset/versioned/clientset.go | 84 ++++++++ .../virtual/clientset/versioned/doc.go | 7 + .../versioned/fake/clientset_generated.go | 69 +++++++ .../virtual/clientset/versioned/fake/doc.go | 7 + .../clientset/versioned/fake/register.go | 43 +++++ .../virtual/clientset/versioned/scheme/doc.go | 7 + .../clientset/versioned/scheme/register.go | 43 +++++ .../versioned/typed/oauth/v1alpha1/doc.go | 7 + .../typed/oauth/v1alpha1/fake/doc.go | 7 + .../oauth/v1alpha1/fake/fake_oauth_client.go | 27 +++ .../fake/fake_oidcclientsecretrequest.go | 36 ++++ .../oauth/v1alpha1/generated_expansion.go | 8 + .../typed/oauth/v1alpha1/oauth_client.go | 76 ++++++++ .../oauth/v1alpha1/oidcclientsecretrequest.go | 54 ++++++ generated/1.20/README.adoc | 94 +++++++++ .../1.20/apis/supervisor/virtual/oauth/doc.go | 8 + .../apis/supervisor/virtual/oauth/register.go | 37 ++++ .../oauth/types_oidcclientsecretrequest.go | 25 +++ .../virtual/oauth/v1alpha1/conversion.go | 4 + .../virtual/oauth/v1alpha1/defaults.go | 12 ++ .../supervisor/virtual/oauth/v1alpha1/doc.go | 11 ++ .../virtual/oauth/v1alpha1/register.go | 42 ++++ .../v1alpha1/types_oidcclientsecretrequest.go | 28 +++ .../oauth/v1alpha1/zz_generated.conversion.go | 131 +++++++++++++ .../oauth/v1alpha1/zz_generated.deepcopy.go | 73 +++++++ .../oauth/v1alpha1/zz_generated.defaults.go | 20 ++ .../virtual/oauth/zz_generated.deepcopy.go | 73 +++++++ .../virtual/clientset/versioned/clientset.go | 84 ++++++++ .../virtual/clientset/versioned/doc.go | 7 + .../versioned/fake/clientset_generated.go | 69 +++++++ .../virtual/clientset/versioned/fake/doc.go | 7 + .../clientset/versioned/fake/register.go | 43 +++++ .../virtual/clientset/versioned/scheme/doc.go | 7 + .../clientset/versioned/scheme/register.go | 43 +++++ .../versioned/typed/oauth/v1alpha1/doc.go | 7 + .../typed/oauth/v1alpha1/fake/doc.go | 7 + .../oauth/v1alpha1/fake/fake_oauth_client.go | 27 +++ .../fake/fake_oidcclientsecretrequest.go | 36 ++++ .../oauth/v1alpha1/generated_expansion.go | 8 + .../typed/oauth/v1alpha1/oauth_client.go | 76 ++++++++ .../oauth/v1alpha1/oidcclientsecretrequest.go | 54 ++++++ generated/1.21/README.adoc | 94 +++++++++ .../1.21/apis/supervisor/virtual/oauth/doc.go | 8 + .../apis/supervisor/virtual/oauth/register.go | 37 ++++ .../oauth/types_oidcclientsecretrequest.go | 25 +++ .../virtual/oauth/v1alpha1/conversion.go | 4 + .../virtual/oauth/v1alpha1/defaults.go | 12 ++ .../supervisor/virtual/oauth/v1alpha1/doc.go | 11 ++ .../virtual/oauth/v1alpha1/register.go | 42 ++++ .../v1alpha1/types_oidcclientsecretrequest.go | 28 +++ .../oauth/v1alpha1/zz_generated.conversion.go | 131 +++++++++++++ .../oauth/v1alpha1/zz_generated.deepcopy.go | 73 +++++++ .../oauth/v1alpha1/zz_generated.defaults.go | 20 ++ .../virtual/oauth/zz_generated.deepcopy.go | 73 +++++++ .../virtual/clientset/versioned/clientset.go | 84 ++++++++ .../virtual/clientset/versioned/doc.go | 7 + .../versioned/fake/clientset_generated.go | 69 +++++++ .../virtual/clientset/versioned/fake/doc.go | 7 + .../clientset/versioned/fake/register.go | 43 +++++ .../virtual/clientset/versioned/scheme/doc.go | 7 + .../clientset/versioned/scheme/register.go | 43 +++++ .../versioned/typed/oauth/v1alpha1/doc.go | 7 + .../typed/oauth/v1alpha1/fake/doc.go | 7 + .../oauth/v1alpha1/fake/fake_oauth_client.go | 27 +++ .../fake/fake_oidcclientsecretrequest.go | 36 ++++ .../oauth/v1alpha1/generated_expansion.go | 8 + .../typed/oauth/v1alpha1/oauth_client.go | 76 ++++++++ .../oauth/v1alpha1/oidcclientsecretrequest.go | 54 ++++++ generated/1.22/README.adoc | 94 +++++++++ .../1.22/apis/supervisor/virtual/oauth/doc.go | 8 + .../apis/supervisor/virtual/oauth/register.go | 37 ++++ .../oauth/types_oidcclientsecretrequest.go | 25 +++ .../virtual/oauth/v1alpha1/conversion.go | 4 + .../virtual/oauth/v1alpha1/defaults.go | 12 ++ .../supervisor/virtual/oauth/v1alpha1/doc.go | 11 ++ .../virtual/oauth/v1alpha1/register.go | 42 ++++ .../v1alpha1/types_oidcclientsecretrequest.go | 28 +++ .../oauth/v1alpha1/zz_generated.conversion.go | 131 +++++++++++++ .../oauth/v1alpha1/zz_generated.deepcopy.go | 73 +++++++ .../oauth/v1alpha1/zz_generated.defaults.go | 20 ++ .../virtual/oauth/zz_generated.deepcopy.go | 73 +++++++ .../virtual/clientset/versioned/clientset.go | 84 ++++++++ .../virtual/clientset/versioned/doc.go | 7 + .../versioned/fake/clientset_generated.go | 72 +++++++ .../virtual/clientset/versioned/fake/doc.go | 7 + .../clientset/versioned/fake/register.go | 43 +++++ .../virtual/clientset/versioned/scheme/doc.go | 7 + .../clientset/versioned/scheme/register.go | 43 +++++ .../versioned/typed/oauth/v1alpha1/doc.go | 7 + .../typed/oauth/v1alpha1/fake/doc.go | 7 + .../oauth/v1alpha1/fake/fake_oauth_client.go | 27 +++ .../fake/fake_oidcclientsecretrequest.go | 36 ++++ .../oauth/v1alpha1/generated_expansion.go | 8 + .../typed/oauth/v1alpha1/oauth_client.go | 76 ++++++++ .../oauth/v1alpha1/oidcclientsecretrequest.go | 54 ++++++ generated/1.23/README.adoc | 94 +++++++++ .../1.23/apis/supervisor/virtual/oauth/doc.go | 8 + .../apis/supervisor/virtual/oauth/register.go | 37 ++++ .../oauth/types_oidcclientsecretrequest.go | 25 +++ .../virtual/oauth/v1alpha1/conversion.go | 4 + .../virtual/oauth/v1alpha1/defaults.go | 12 ++ .../supervisor/virtual/oauth/v1alpha1/doc.go | 11 ++ .../virtual/oauth/v1alpha1/register.go | 42 ++++ .../v1alpha1/types_oidcclientsecretrequest.go | 28 +++ .../oauth/v1alpha1/zz_generated.conversion.go | 131 +++++++++++++ .../oauth/v1alpha1/zz_generated.deepcopy.go | 73 +++++++ .../oauth/v1alpha1/zz_generated.defaults.go | 20 ++ .../virtual/oauth/zz_generated.deepcopy.go | 73 +++++++ .../virtual/clientset/versioned/clientset.go | 104 ++++++++++ .../virtual/clientset/versioned/doc.go | 7 + .../versioned/fake/clientset_generated.go | 72 +++++++ .../virtual/clientset/versioned/fake/doc.go | 7 + .../clientset/versioned/fake/register.go | 43 +++++ .../virtual/clientset/versioned/scheme/doc.go | 7 + .../clientset/versioned/scheme/register.go | 43 +++++ .../versioned/typed/oauth/v1alpha1/doc.go | 7 + .../typed/oauth/v1alpha1/fake/doc.go | 7 + .../oauth/v1alpha1/fake/fake_oauth_client.go | 27 +++ .../fake/fake_oidcclientsecretrequest.go | 36 ++++ .../oauth/v1alpha1/generated_expansion.go | 8 + .../typed/oauth/v1alpha1/oauth_client.go | 94 +++++++++ .../oauth/v1alpha1/oidcclientsecretrequest.go | 54 ++++++ .../apis/supervisor/virtual/oauth/doc.go | 8 + .../apis/supervisor/virtual/oauth/register.go | 37 ++++ .../oauth/types_oidcclientsecretrequest.go | 25 +++ .../virtual/oauth/v1alpha1/conversion.go | 4 + .../virtual/oauth/v1alpha1/defaults.go | 12 ++ .../supervisor/virtual/oauth/v1alpha1/doc.go | 11 ++ .../virtual/oauth/v1alpha1/register.go | 42 ++++ .../v1alpha1/types_oidcclientsecretrequest.go | 28 +++ .../oauth/v1alpha1/zz_generated.conversion.go | 131 +++++++++++++ .../oauth/v1alpha1/zz_generated.deepcopy.go | 73 +++++++ .../oauth/v1alpha1/zz_generated.defaults.go | 20 ++ .../virtual/oauth/zz_generated.deepcopy.go | 73 +++++++ .../virtual/clientset/versioned/clientset.go | 104 ++++++++++ .../virtual/clientset/versioned/doc.go | 7 + .../versioned/fake/clientset_generated.go | 72 +++++++ .../virtual/clientset/versioned/fake/doc.go | 7 + .../clientset/versioned/fake/register.go | 43 +++++ .../virtual/clientset/versioned/scheme/doc.go | 7 + .../clientset/versioned/scheme/register.go | 43 +++++ .../versioned/typed/oauth/v1alpha1/doc.go | 7 + .../typed/oauth/v1alpha1/fake/doc.go | 7 + .../oauth/v1alpha1/fake/fake_oauth_client.go | 27 +++ .../fake/fake_oidcclientsecretrequest.go | 36 ++++ .../oauth/v1alpha1/generated_expansion.go | 8 + .../typed/oauth/v1alpha1/oauth_client.go | 94 +++++++++ .../oauth/v1alpha1/oidcclientsecretrequest.go | 54 ++++++ hack/lib/update-codegen.sh | 13 +- internal/config/supervisor/types.go | 1 + internal/groupsuffix/groupdata.go | 16 +- internal/registry/clientsecretrequest/rest.go | 83 ++++++++ internal/supervisor/apiserver/apiserver.go | 139 ++++++++++++++ internal/supervisor/scheme/scheme.go | 91 +++++++++ internal/supervisor/scheme/scheme_test.go | 139 ++++++++++++++ internal/supervisor/server/server.go | 179 ++++++++++++++++-- test/integration/kube_api_discovery_test.go | 34 +++- 235 files changed, 9218 insertions(+), 24 deletions(-) create mode 100644 apis/supervisor/virtual/oauth/doc.go.tmpl create mode 100644 apis/supervisor/virtual/oauth/register.go.tmpl create mode 100644 apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go.tmpl create mode 100644 apis/supervisor/virtual/oauth/v1alpha1/conversion.go.tmpl create mode 100644 apis/supervisor/virtual/oauth/v1alpha1/defaults.go.tmpl create mode 100644 apis/supervisor/virtual/oauth/v1alpha1/doc.go.tmpl create mode 100644 apis/supervisor/virtual/oauth/v1alpha1/register.go.tmpl create mode 100644 apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go.tmpl create mode 100644 generated/1.17/apis/supervisor/virtual/oauth/doc.go create mode 100644 generated/1.17/apis/supervisor/virtual/oauth/register.go create mode 100644 generated/1.17/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go create mode 100644 generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/conversion.go create mode 100644 generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/defaults.go create mode 100644 generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/doc.go create mode 100644 generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/register.go create mode 100644 generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go create mode 100644 generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go create mode 100644 generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go create mode 100644 generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go create mode 100644 generated/1.17/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go create mode 100644 generated/1.17/client/supervisor/virtual/clientset/versioned/clientset.go create mode 100644 generated/1.17/client/supervisor/virtual/clientset/versioned/doc.go create mode 100644 generated/1.17/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go create mode 100644 generated/1.17/client/supervisor/virtual/clientset/versioned/fake/doc.go create mode 100644 generated/1.17/client/supervisor/virtual/clientset/versioned/fake/register.go create mode 100644 generated/1.17/client/supervisor/virtual/clientset/versioned/scheme/doc.go create mode 100644 generated/1.17/client/supervisor/virtual/clientset/versioned/scheme/register.go create mode 100644 generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go create mode 100644 generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go create mode 100644 generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go create mode 100644 generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go create mode 100644 generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go create mode 100644 generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go create mode 100644 generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go create mode 100644 generated/1.18/apis/supervisor/virtual/oauth/doc.go create mode 100644 generated/1.18/apis/supervisor/virtual/oauth/register.go create mode 100644 generated/1.18/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go create mode 100644 generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/conversion.go create mode 100644 generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/defaults.go create mode 100644 generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/doc.go create mode 100644 generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/register.go create mode 100644 generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go create mode 100644 generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go create mode 100644 generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go create mode 100644 generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go create mode 100644 generated/1.18/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go create mode 100644 generated/1.18/client/supervisor/virtual/clientset/versioned/clientset.go create mode 100644 generated/1.18/client/supervisor/virtual/clientset/versioned/doc.go create mode 100644 generated/1.18/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go create mode 100644 generated/1.18/client/supervisor/virtual/clientset/versioned/fake/doc.go create mode 100644 generated/1.18/client/supervisor/virtual/clientset/versioned/fake/register.go create mode 100644 generated/1.18/client/supervisor/virtual/clientset/versioned/scheme/doc.go create mode 100644 generated/1.18/client/supervisor/virtual/clientset/versioned/scheme/register.go create mode 100644 generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go create mode 100644 generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go create mode 100644 generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go create mode 100644 generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go create mode 100644 generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go create mode 100644 generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go create mode 100644 generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go create mode 100644 generated/1.19/apis/supervisor/virtual/oauth/doc.go create mode 100644 generated/1.19/apis/supervisor/virtual/oauth/register.go create mode 100644 generated/1.19/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go create mode 100644 generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/conversion.go create mode 100644 generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/defaults.go create mode 100644 generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/doc.go create mode 100644 generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/register.go create mode 100644 generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go create mode 100644 generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go create mode 100644 generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go create mode 100644 generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go create mode 100644 generated/1.19/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go create mode 100644 generated/1.19/client/supervisor/virtual/clientset/versioned/clientset.go create mode 100644 generated/1.19/client/supervisor/virtual/clientset/versioned/doc.go create mode 100644 generated/1.19/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go create mode 100644 generated/1.19/client/supervisor/virtual/clientset/versioned/fake/doc.go create mode 100644 generated/1.19/client/supervisor/virtual/clientset/versioned/fake/register.go create mode 100644 generated/1.19/client/supervisor/virtual/clientset/versioned/scheme/doc.go create mode 100644 generated/1.19/client/supervisor/virtual/clientset/versioned/scheme/register.go create mode 100644 generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go create mode 100644 generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go create mode 100644 generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go create mode 100644 generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go create mode 100644 generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go create mode 100644 generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go create mode 100644 generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go create mode 100644 generated/1.20/apis/supervisor/virtual/oauth/doc.go create mode 100644 generated/1.20/apis/supervisor/virtual/oauth/register.go create mode 100644 generated/1.20/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go create mode 100644 generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/conversion.go create mode 100644 generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/defaults.go create mode 100644 generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/doc.go create mode 100644 generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/register.go create mode 100644 generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go create mode 100644 generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go create mode 100644 generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go create mode 100644 generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go create mode 100644 generated/1.20/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go create mode 100644 generated/1.20/client/supervisor/virtual/clientset/versioned/clientset.go create mode 100644 generated/1.20/client/supervisor/virtual/clientset/versioned/doc.go create mode 100644 generated/1.20/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go create mode 100644 generated/1.20/client/supervisor/virtual/clientset/versioned/fake/doc.go create mode 100644 generated/1.20/client/supervisor/virtual/clientset/versioned/fake/register.go create mode 100644 generated/1.20/client/supervisor/virtual/clientset/versioned/scheme/doc.go create mode 100644 generated/1.20/client/supervisor/virtual/clientset/versioned/scheme/register.go create mode 100644 generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go create mode 100644 generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go create mode 100644 generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go create mode 100644 generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go create mode 100644 generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go create mode 100644 generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go create mode 100644 generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go create mode 100644 generated/1.21/apis/supervisor/virtual/oauth/doc.go create mode 100644 generated/1.21/apis/supervisor/virtual/oauth/register.go create mode 100644 generated/1.21/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go create mode 100644 generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/conversion.go create mode 100644 generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/defaults.go create mode 100644 generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/doc.go create mode 100644 generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/register.go create mode 100644 generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go create mode 100644 generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go create mode 100644 generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go create mode 100644 generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go create mode 100644 generated/1.21/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go create mode 100644 generated/1.21/client/supervisor/virtual/clientset/versioned/clientset.go create mode 100644 generated/1.21/client/supervisor/virtual/clientset/versioned/doc.go create mode 100644 generated/1.21/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go create mode 100644 generated/1.21/client/supervisor/virtual/clientset/versioned/fake/doc.go create mode 100644 generated/1.21/client/supervisor/virtual/clientset/versioned/fake/register.go create mode 100644 generated/1.21/client/supervisor/virtual/clientset/versioned/scheme/doc.go create mode 100644 generated/1.21/client/supervisor/virtual/clientset/versioned/scheme/register.go create mode 100644 generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go create mode 100644 generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go create mode 100644 generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go create mode 100644 generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go create mode 100644 generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go create mode 100644 generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go create mode 100644 generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go create mode 100644 generated/1.22/apis/supervisor/virtual/oauth/doc.go create mode 100644 generated/1.22/apis/supervisor/virtual/oauth/register.go create mode 100644 generated/1.22/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go create mode 100644 generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/conversion.go create mode 100644 generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/defaults.go create mode 100644 generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/doc.go create mode 100644 generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/register.go create mode 100644 generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go create mode 100644 generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go create mode 100644 generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go create mode 100644 generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go create mode 100644 generated/1.22/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go create mode 100644 generated/1.22/client/supervisor/virtual/clientset/versioned/clientset.go create mode 100644 generated/1.22/client/supervisor/virtual/clientset/versioned/doc.go create mode 100644 generated/1.22/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go create mode 100644 generated/1.22/client/supervisor/virtual/clientset/versioned/fake/doc.go create mode 100644 generated/1.22/client/supervisor/virtual/clientset/versioned/fake/register.go create mode 100644 generated/1.22/client/supervisor/virtual/clientset/versioned/scheme/doc.go create mode 100644 generated/1.22/client/supervisor/virtual/clientset/versioned/scheme/register.go create mode 100644 generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go create mode 100644 generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go create mode 100644 generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go create mode 100644 generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go create mode 100644 generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go create mode 100644 generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go create mode 100644 generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go create mode 100644 generated/1.23/apis/supervisor/virtual/oauth/doc.go create mode 100644 generated/1.23/apis/supervisor/virtual/oauth/register.go create mode 100644 generated/1.23/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go create mode 100644 generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/conversion.go create mode 100644 generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/defaults.go create mode 100644 generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/doc.go create mode 100644 generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/register.go create mode 100644 generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go create mode 100644 generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go create mode 100644 generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go create mode 100644 generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go create mode 100644 generated/1.23/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go create mode 100644 generated/1.23/client/supervisor/virtual/clientset/versioned/clientset.go create mode 100644 generated/1.23/client/supervisor/virtual/clientset/versioned/doc.go create mode 100644 generated/1.23/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go create mode 100644 generated/1.23/client/supervisor/virtual/clientset/versioned/fake/doc.go create mode 100644 generated/1.23/client/supervisor/virtual/clientset/versioned/fake/register.go create mode 100644 generated/1.23/client/supervisor/virtual/clientset/versioned/scheme/doc.go create mode 100644 generated/1.23/client/supervisor/virtual/clientset/versioned/scheme/register.go create mode 100644 generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go create mode 100644 generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go create mode 100644 generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go create mode 100644 generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go create mode 100644 generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go create mode 100644 generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go create mode 100644 generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go create mode 100644 generated/latest/apis/supervisor/virtual/oauth/doc.go create mode 100644 generated/latest/apis/supervisor/virtual/oauth/register.go create mode 100644 generated/latest/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go create mode 100644 generated/latest/apis/supervisor/virtual/oauth/v1alpha1/conversion.go create mode 100644 generated/latest/apis/supervisor/virtual/oauth/v1alpha1/defaults.go create mode 100644 generated/latest/apis/supervisor/virtual/oauth/v1alpha1/doc.go create mode 100644 generated/latest/apis/supervisor/virtual/oauth/v1alpha1/register.go create mode 100644 generated/latest/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go create mode 100644 generated/latest/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go create mode 100644 generated/latest/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go create mode 100644 generated/latest/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go create mode 100644 generated/latest/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go create mode 100644 generated/latest/client/supervisor/virtual/clientset/versioned/clientset.go create mode 100644 generated/latest/client/supervisor/virtual/clientset/versioned/doc.go create mode 100644 generated/latest/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go create mode 100644 generated/latest/client/supervisor/virtual/clientset/versioned/fake/doc.go create mode 100644 generated/latest/client/supervisor/virtual/clientset/versioned/fake/register.go create mode 100644 generated/latest/client/supervisor/virtual/clientset/versioned/scheme/doc.go create mode 100644 generated/latest/client/supervisor/virtual/clientset/versioned/scheme/register.go create mode 100644 generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go create mode 100644 generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go create mode 100644 generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go create mode 100644 generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go create mode 100644 generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go create mode 100644 generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go create mode 100644 generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go create mode 100644 internal/registry/clientsecretrequest/rest.go create mode 100644 internal/supervisor/apiserver/apiserver.go create mode 100644 internal/supervisor/scheme/scheme.go create mode 100644 internal/supervisor/scheme/scheme_test.go diff --git a/apis/supervisor/virtual/oauth/doc.go.tmpl b/apis/supervisor/virtual/oauth/doc.go.tmpl new file mode 100644 index 00000000..ca4e9a63 --- /dev/null +++ b/apis/supervisor/virtual/oauth/doc.go.tmpl @@ -0,0 +1,8 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// +k8s:deepcopy-gen=package +// +groupName=oauth.virtual.supervisor.pinniped.dev + +// Package oauth is the internal version of the Pinniped virtual oauth API. +package oauth diff --git a/apis/supervisor/virtual/oauth/register.go.tmpl b/apis/supervisor/virtual/oauth/register.go.tmpl new file mode 100644 index 00000000..a238d85f --- /dev/null +++ b/apis/supervisor/virtual/oauth/register.go.tmpl @@ -0,0 +1,37 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package oauth + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +const GroupName = "oauth.virtual.supervisor.pinniped.dev" + +// SchemeGroupVersion is group version used to register these objects. +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} + +// Kind takes an unqualified kind and returns back a Group qualified GroupKind. +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Resource takes an unqualified resource and returns back a Group qualified GroupResource. +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + AddToScheme = SchemeBuilder.AddToScheme +) + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &OIDCClientSecretRequest{}, + ) + return nil +} diff --git a/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go.tmpl b/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go.tmpl new file mode 100644 index 00000000..ac54a93c --- /dev/null +++ b/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go.tmpl @@ -0,0 +1,25 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package oauth + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +type OIDCClientSecretRequestSpec struct { + GenerateNewSecret bool `json:"generateNewSecret"` + RevokeOldSecrets bool `json:"revokeOldSecrets"` +} + +type OIDCClientSecretRequestStatus struct { + GeneratedSecret string `json:"generatedSecret,omitempty"` + TotalClientSecrets int `json:"totalClientSecrets"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequest struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` // metadata.name must be set to the client ID + + Spec OIDCClientSecretRequestSpec `json:"spec"` + Status OIDCClientSecretRequestStatus `json:"status"` +} diff --git a/apis/supervisor/virtual/oauth/v1alpha1/conversion.go.tmpl b/apis/supervisor/virtual/oauth/v1alpha1/conversion.go.tmpl new file mode 100644 index 00000000..fcf4e82f --- /dev/null +++ b/apis/supervisor/virtual/oauth/v1alpha1/conversion.go.tmpl @@ -0,0 +1,4 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 diff --git a/apis/supervisor/virtual/oauth/v1alpha1/defaults.go.tmpl b/apis/supervisor/virtual/oauth/v1alpha1/defaults.go.tmpl new file mode 100644 index 00000000..d4f5a9e8 --- /dev/null +++ b/apis/supervisor/virtual/oauth/v1alpha1/defaults.go.tmpl @@ -0,0 +1,12 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/runtime" +) + +func addDefaultingFuncs(scheme *runtime.Scheme) error { + return RegisterDefaults(scheme) +} diff --git a/apis/supervisor/virtual/oauth/v1alpha1/doc.go.tmpl b/apis/supervisor/virtual/oauth/v1alpha1/doc.go.tmpl new file mode 100644 index 00000000..c94cc7b7 --- /dev/null +++ b/apis/supervisor/virtual/oauth/v1alpha1/doc.go.tmpl @@ -0,0 +1,11 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen=package +// +k8s:conversion-gen=go.pinniped.dev/GENERATED_PKG/apis/supervisor/virtual/oauth +// +k8s:defaulter-gen=TypeMeta +// +groupName=oauth.virtual.supervisor.pinniped.dev + +// Package v1alpha1 is the v1alpha1 version of the Pinniped virtual oauth API. +package v1alpha1 diff --git a/apis/supervisor/virtual/oauth/v1alpha1/register.go.tmpl b/apis/supervisor/virtual/oauth/v1alpha1/register.go.tmpl new file mode 100644 index 00000000..ecc75a08 --- /dev/null +++ b/apis/supervisor/virtual/oauth/v1alpha1/register.go.tmpl @@ -0,0 +1,42 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +const GroupName = "oauth.virtual.supervisor.pinniped.dev" + +// SchemeGroupVersion is group version used to register these objects. +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} + +var ( + SchemeBuilder runtime.SchemeBuilder + localSchemeBuilder = &SchemeBuilder + AddToScheme = SchemeBuilder.AddToScheme +) + +func init() { + // We only register manually written functions here. The registration of the + // generated functions takes place in the generated files. The separation + // makes the code compile even when the generated files are missing. + localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs) +} + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &OIDCClientSecretRequest{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} + +// Resource takes an unqualified resource and returns back a Group qualified GroupResource. +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} diff --git a/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go.tmpl b/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go.tmpl new file mode 100644 index 00000000..dda2f3bb --- /dev/null +++ b/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go.tmpl @@ -0,0 +1,28 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +type OIDCClientSecretRequestSpec struct { + GenerateNewSecret bool `json:"generateNewSecret"` + RevokeOldSecrets bool `json:"revokeOldSecrets"` +} + +type OIDCClientSecretRequestStatus struct { + GeneratedSecret string `json:"generatedSecret,omitempty"` + TotalClientSecrets int `json:"totalClientSecrets"` +} + +// +genclient +// +genclient:onlyVerbs=create +// +kubebuilder:subresource:status +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequest struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` // metadata.name must be set to the client ID + + Spec OIDCClientSecretRequestSpec `json:"spec"` + Status OIDCClientSecretRequestStatus `json:"status"` +} diff --git a/deploy/supervisor/deployment.yaml b/deploy/supervisor/deployment.yaml index b4c60ec2..e125771a 100644 --- a/deploy/supervisor/deployment.yaml +++ b/deploy/supervisor/deployment.yaml @@ -10,6 +10,7 @@ #@ "namespace", #@ "defaultResourceName", #@ "defaultResourceNameWithSuffix", +#@ "pinnipedDevAPIGroupWithPrefix", #@ "getPinnipedConfigMapData", #@ "hasUnixNetworkEndpoint", #@ ) @@ -174,3 +175,37 @@ spec: labelSelector: matchLabels: #@ deploymentPodLabel() topologyKey: kubernetes.io/hostname +--- +apiVersion: v1 +kind: Service +metadata: + #! If name is changed, must also change names.apiService in the ConfigMap above and spec.service.name in the APIService below. + name: #@ defaultResourceNameWithSuffix("api") + namespace: #@ namespace() + labels: #@ labels() + #! prevent kapp from altering the selector of our services to match kubectl behavior + annotations: + kapp.k14s.io/disable-default-label-scoping-rules: "" +spec: + type: ClusterIP + selector: #@ deploymentPodLabel() + ports: + - protocol: TCP + port: 443 + targetPort: 10250 +--- +apiVersion: apiregistration.k8s.io/v1 +kind: APIService +metadata: + name: #@ pinnipedDevAPIGroupWithPrefix("v1alpha1.oauth.virtual.supervisor") + labels: #@ labels() +spec: + version: v1alpha1 + group: #@ pinnipedDevAPIGroupWithPrefix("oauth.virtual.supervisor") + groupPriorityMinimum: 9900 + versionPriority: 15 + #! caBundle: Do not include this key here. Starts out null, will be updated/owned by the golang code. + service: + name: #@ defaultResourceNameWithSuffix("api") + namespace: #@ namespace() + port: 443 diff --git a/deploy/supervisor/helpers.lib.yaml b/deploy/supervisor/helpers.lib.yaml index d759e874..fbb60a2d 100644 --- a/deploy/supervisor/helpers.lib.yaml +++ b/deploy/supervisor/helpers.lib.yaml @@ -50,6 +50,7 @@ _: #@ template.replace(data.values.custom_labels) #@ "apiGroupSuffix": data.values.api_group_suffix, #@ "names": { #@ "defaultTLSCertificateSecret": defaultResourceNameWithSuffix("default-tls-certificate"), +#@ "apiService": defaultResourceNameWithSuffix("api"), #@ }, #@ "labels": labels(), #@ "insecureAcceptExternalUnencryptedHttpRequests": data.values.deprecated_insecure_accept_external_unencrypted_http_requests diff --git a/deploy/supervisor/rbac.yaml b/deploy/supervisor/rbac.yaml index f980a92f..8fe7e58d 100644 --- a/deploy/supervisor/rbac.yaml +++ b/deploy/supervisor/rbac.yaml @@ -1,4 +1,4 @@ -#! Copyright 2020-2021 the Pinniped contributors. All Rights Reserved. +#! Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. #! SPDX-License-Identifier: Apache-2.0 #@ load("@ytt:data", "data") @@ -74,3 +74,98 @@ roleRef: kind: Role name: #@ defaultResourceName() apiGroup: rbac.authorization.k8s.io + +#! Give permissions for a special configmap of CA bundles that is needed by aggregated api servers +--- +kind: RoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: #@ defaultResourceNameWithSuffix("extension-apiserver-authentication-reader") + namespace: kube-system + labels: #@ labels() +subjects: + - kind: ServiceAccount + name: #@ defaultResourceName() + namespace: #@ namespace() +roleRef: + kind: Role + name: extension-apiserver-authentication-reader + apiGroup: rbac.authorization.k8s.io + +#! Give permission to list and watch ConfigMaps in kube-public +--- +kind: Role +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: #@ defaultResourceNameWithSuffix("cluster-info-lister-watcher") + namespace: kube-public + labels: #@ labels() +rules: + - apiGroups: [ "" ] + resources: [ configmaps ] + verbs: [ list, watch ] +#! Give permissions for subjectaccessreviews, tokenreview that is needed by aggregated api servers +--- +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: #@ defaultResourceName() + labels: #@ labels() +subjects: + - kind: ServiceAccount + name: #@ defaultResourceName() + namespace: #@ namespace() +roleRef: + kind: ClusterRole + name: system:auth-delegator + apiGroup: rbac.authorization.k8s.io +--- +kind: RoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: #@ defaultResourceNameWithSuffix("cluster-info-lister-watcher") + namespace: kube-public + labels: #@ labels() +subjects: + - kind: ServiceAccount + name: #@ defaultResourceName() + namespace: #@ namespace() +roleRef: + kind: Role + name: #@ defaultResourceNameWithSuffix("cluster-info-lister-watcher") + apiGroup: rbac.authorization.k8s.io + +#! Give permission to various cluster-scoped objects +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: #@ defaultResourceNameWithSuffix("aggregated-api-server") + labels: #@ labels() +rules: + - apiGroups: [ "" ] + resources: [ namespaces ] + verbs: [ get, list, watch ] + - apiGroups: [ apiregistration.k8s.io ] + resources: [ apiservices ] + verbs: [ get, list, patch, update, watch ] + - apiGroups: [ admissionregistration.k8s.io ] + resources: [ validatingwebhookconfigurations, mutatingwebhookconfigurations ] + verbs: [ get, list, watch ] + - apiGroups: [ flowcontrol.apiserver.k8s.io ] + resources: [ flowschemas, prioritylevelconfigurations ] + verbs: [ get, list, watch ] +--- +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: #@ defaultResourceNameWithSuffix("aggregated-api-server") + labels: #@ labels() +subjects: + - kind: ServiceAccount + name: #@ defaultResourceName() + namespace: #@ namespace() +roleRef: + kind: ClusterRole + name: #@ defaultResourceNameWithSuffix("aggregated-api-server") + apiGroup: rbac.authorization.k8s.io diff --git a/generated/1.17/README.adoc b/generated/1.17/README.adoc index 693d8d6b..0b90292d 100644 --- a/generated/1.17/README.adoc +++ b/generated/1.17/README.adoc @@ -13,6 +13,8 @@ - xref:{anchor_prefix}-idp-supervisor-pinniped-dev-v1alpha1[$$idp.supervisor.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-login-concierge-pinniped-dev-v1alpha1[$$login.concierge.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-oauth-supervisor-pinniped-dev-v1alpha1[$$oauth.supervisor.pinniped.dev/v1alpha1$$] +- xref:{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-oauth[$$oauth.virtual.supervisor.pinniped.dev/oauth$$] +- xref:{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-v1alpha1[$$oauth.virtual.supervisor.pinniped.dev/v1alpha1$$] [id="{anchor_prefix}-authentication-concierge-pinniped-dev-v1alpha1"] @@ -1386,3 +1388,95 @@ OIDCClientSpec is a struct that describes an OIDC Client. + +[id="{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-oauth"] +=== oauth.virtual.supervisor.pinniped.dev/oauth + +Package oauth is the internal version of the Pinniped virtual oauth API. + + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-virtual-oauth-oidcclientsecretrequestspec"] +==== OIDCClientSecretRequestSpec + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-virtual-oauth-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generateNewSecret`* __boolean__ | +| *`revokeOldSecrets`* __boolean__ | +|=== + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-virtual-oauth-oidcclientsecretrequeststatus"] +==== OIDCClientSecretRequestStatus + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-virtual-oauth-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generatedSecret`* __string__ | +| *`totalClientSecrets`* __integer__ | +|=== + + + +[id="{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-v1alpha1"] +=== oauth.virtual.supervisor.pinniped.dev/v1alpha1 + +Package v1alpha1 is the v1alpha1 version of the Pinniped virtual oauth API. + + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequestspec"] +==== OIDCClientSecretRequestSpec + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generateNewSecret`* __boolean__ | +| *`revokeOldSecrets`* __boolean__ | +|=== + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequeststatus"] +==== OIDCClientSecretRequestStatus + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generatedSecret`* __string__ | +| *`totalClientSecrets`* __integer__ | +|=== + + diff --git a/generated/1.17/apis/supervisor/virtual/oauth/doc.go b/generated/1.17/apis/supervisor/virtual/oauth/doc.go new file mode 100644 index 00000000..ca4e9a63 --- /dev/null +++ b/generated/1.17/apis/supervisor/virtual/oauth/doc.go @@ -0,0 +1,8 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// +k8s:deepcopy-gen=package +// +groupName=oauth.virtual.supervisor.pinniped.dev + +// Package oauth is the internal version of the Pinniped virtual oauth API. +package oauth diff --git a/generated/1.17/apis/supervisor/virtual/oauth/register.go b/generated/1.17/apis/supervisor/virtual/oauth/register.go new file mode 100644 index 00000000..a238d85f --- /dev/null +++ b/generated/1.17/apis/supervisor/virtual/oauth/register.go @@ -0,0 +1,37 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package oauth + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +const GroupName = "oauth.virtual.supervisor.pinniped.dev" + +// SchemeGroupVersion is group version used to register these objects. +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} + +// Kind takes an unqualified kind and returns back a Group qualified GroupKind. +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Resource takes an unqualified resource and returns back a Group qualified GroupResource. +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + AddToScheme = SchemeBuilder.AddToScheme +) + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &OIDCClientSecretRequest{}, + ) + return nil +} diff --git a/generated/1.17/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go b/generated/1.17/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go new file mode 100644 index 00000000..ac54a93c --- /dev/null +++ b/generated/1.17/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go @@ -0,0 +1,25 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package oauth + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +type OIDCClientSecretRequestSpec struct { + GenerateNewSecret bool `json:"generateNewSecret"` + RevokeOldSecrets bool `json:"revokeOldSecrets"` +} + +type OIDCClientSecretRequestStatus struct { + GeneratedSecret string `json:"generatedSecret,omitempty"` + TotalClientSecrets int `json:"totalClientSecrets"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequest struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` // metadata.name must be set to the client ID + + Spec OIDCClientSecretRequestSpec `json:"spec"` + Status OIDCClientSecretRequestStatus `json:"status"` +} diff --git a/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/conversion.go b/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/conversion.go new file mode 100644 index 00000000..fcf4e82f --- /dev/null +++ b/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/conversion.go @@ -0,0 +1,4 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 diff --git a/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/defaults.go b/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/defaults.go new file mode 100644 index 00000000..d4f5a9e8 --- /dev/null +++ b/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/defaults.go @@ -0,0 +1,12 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/runtime" +) + +func addDefaultingFuncs(scheme *runtime.Scheme) error { + return RegisterDefaults(scheme) +} diff --git a/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/doc.go b/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/doc.go new file mode 100644 index 00000000..6437db4d --- /dev/null +++ b/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/doc.go @@ -0,0 +1,11 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen=package +// +k8s:conversion-gen=go.pinniped.dev/generated/1.17/apis/supervisor/virtual/oauth +// +k8s:defaulter-gen=TypeMeta +// +groupName=oauth.virtual.supervisor.pinniped.dev + +// Package v1alpha1 is the v1alpha1 version of the Pinniped virtual oauth API. +package v1alpha1 diff --git a/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/register.go b/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/register.go new file mode 100644 index 00000000..ecc75a08 --- /dev/null +++ b/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/register.go @@ -0,0 +1,42 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +const GroupName = "oauth.virtual.supervisor.pinniped.dev" + +// SchemeGroupVersion is group version used to register these objects. +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} + +var ( + SchemeBuilder runtime.SchemeBuilder + localSchemeBuilder = &SchemeBuilder + AddToScheme = SchemeBuilder.AddToScheme +) + +func init() { + // We only register manually written functions here. The registration of the + // generated functions takes place in the generated files. The separation + // makes the code compile even when the generated files are missing. + localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs) +} + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &OIDCClientSecretRequest{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} + +// Resource takes an unqualified resource and returns back a Group qualified GroupResource. +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} diff --git a/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go b/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go new file mode 100644 index 00000000..dda2f3bb --- /dev/null +++ b/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go @@ -0,0 +1,28 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +type OIDCClientSecretRequestSpec struct { + GenerateNewSecret bool `json:"generateNewSecret"` + RevokeOldSecrets bool `json:"revokeOldSecrets"` +} + +type OIDCClientSecretRequestStatus struct { + GeneratedSecret string `json:"generatedSecret,omitempty"` + TotalClientSecrets int `json:"totalClientSecrets"` +} + +// +genclient +// +genclient:onlyVerbs=create +// +kubebuilder:subresource:status +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequest struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` // metadata.name must be set to the client ID + + Spec OIDCClientSecretRequestSpec `json:"spec"` + Status OIDCClientSecretRequestStatus `json:"status"` +} diff --git a/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go b/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go new file mode 100644 index 00000000..b4f28183 --- /dev/null +++ b/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go @@ -0,0 +1,131 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + oauth "go.pinniped.dev/generated/1.17/apis/supervisor/virtual/oauth" + 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((*OIDCClientSecretRequest)(nil), (*oauth.OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(a.(*OIDCClientSecretRequest), b.(*oauth.OIDCClientSecretRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequest)(nil), (*OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(a.(*oauth.OIDCClientSecretRequest), b.(*OIDCClientSecretRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestSpec)(nil), (*oauth.OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(a.(*OIDCClientSecretRequestSpec), b.(*oauth.OIDCClientSecretRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequestSpec)(nil), (*OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(a.(*oauth.OIDCClientSecretRequestSpec), b.(*OIDCClientSecretRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestStatus)(nil), (*oauth.OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(a.(*OIDCClientSecretRequestStatus), b.(*oauth.OIDCClientSecretRequestStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequestStatus)(nil), (*OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(a.(*oauth.OIDCClientSecretRequestStatus), b.(*OIDCClientSecretRequestStatus), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *oauth.OIDCClientSecretRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *oauth.OIDCClientSecretRequest, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in, out, s) +} + +func autoConvert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *oauth.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest is an autogenerated conversion function. +func Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *oauth.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { + return autoConvert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in, out, s) +} + +func autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *oauth.OIDCClientSecretRequestSpec, s conversion.Scope) error { + out.GenerateNewSecret = in.GenerateNewSecret + out.RevokeOldSecrets = in.RevokeOldSecrets + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *oauth.OIDCClientSecretRequestSpec, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in, out, s) +} + +func autoConvert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *oauth.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { + out.GenerateNewSecret = in.GenerateNewSecret + out.RevokeOldSecrets = in.RevokeOldSecrets + return nil +} + +// Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec is an autogenerated conversion function. +func Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *oauth.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { + return autoConvert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in, out, s) +} + +func autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *oauth.OIDCClientSecretRequestStatus, s conversion.Scope) error { + out.GeneratedSecret = in.GeneratedSecret + out.TotalClientSecrets = in.TotalClientSecrets + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *oauth.OIDCClientSecretRequestStatus, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in, out, s) +} + +func autoConvert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *oauth.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { + out.GeneratedSecret = in.GeneratedSecret + out.TotalClientSecrets = in.TotalClientSecrets + return nil +} + +// Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus is an autogenerated conversion function. +func Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *oauth.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { + return autoConvert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in, out, s) +} diff --git a/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go b/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 00000000..e4fce842 --- /dev/null +++ b/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,73 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequest) DeepCopyInto(out *OIDCClientSecretRequest) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequest. +func (in *OIDCClientSecretRequest) DeepCopy() *OIDCClientSecretRequest { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestSpec. +func (in *OIDCClientSecretRequestSpec) DeepCopy() *OIDCClientSecretRequestSpec { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestStatus) DeepCopyInto(out *OIDCClientSecretRequestStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestStatus. +func (in *OIDCClientSecretRequestStatus) DeepCopy() *OIDCClientSecretRequestStatus { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestStatus) + in.DeepCopyInto(out) + return out +} diff --git a/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go b/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go new file mode 100644 index 00000000..9097a935 --- /dev/null +++ b/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go @@ -0,0 +1,20 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/generated/1.17/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go b/generated/1.17/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go new file mode 100644 index 00000000..24b58e7b --- /dev/null +++ b/generated/1.17/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go @@ -0,0 +1,73 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package oauth + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequest) DeepCopyInto(out *OIDCClientSecretRequest) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequest. +func (in *OIDCClientSecretRequest) DeepCopy() *OIDCClientSecretRequest { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestSpec. +func (in *OIDCClientSecretRequestSpec) DeepCopy() *OIDCClientSecretRequestSpec { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestStatus) DeepCopyInto(out *OIDCClientSecretRequestStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestStatus. +func (in *OIDCClientSecretRequestStatus) DeepCopy() *OIDCClientSecretRequestStatus { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestStatus) + in.DeepCopyInto(out) + return out +} diff --git a/generated/1.17/client/supervisor/virtual/clientset/versioned/clientset.go b/generated/1.17/client/supervisor/virtual/clientset/versioned/clientset.go new file mode 100644 index 00000000..61281edb --- /dev/null +++ b/generated/1.17/client/supervisor/virtual/clientset/versioned/clientset.go @@ -0,0 +1,84 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package versioned + +import ( + "fmt" + + oauthv1alpha1 "go.pinniped.dev/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" + discovery "k8s.io/client-go/discovery" + rest "k8s.io/client-go/rest" + flowcontrol "k8s.io/client-go/util/flowcontrol" +) + +type Interface interface { + Discovery() discovery.DiscoveryInterface + OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface +} + +// Clientset contains the clients for groups. Each group has exactly one +// version included in a Clientset. +type Clientset struct { + *discovery.DiscoveryClient + oauthV1alpha1 *oauthv1alpha1.OauthV1alpha1Client +} + +// OauthV1alpha1 retrieves the OauthV1alpha1Client +func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { + return c.oauthV1alpha1 +} + +// Discovery retrieves the DiscoveryClient +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + if c == nil { + return nil + } + return c.DiscoveryClient +} + +// NewForConfig creates a new Clientset for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewForConfig will generate a rate-limiter in configShallowCopy. +func NewForConfig(c *rest.Config) (*Clientset, error) { + configShallowCopy := *c + if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { + if configShallowCopy.Burst <= 0 { + return nil, fmt.Errorf("Burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + } + configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) + } + var cs Clientset + var err error + cs.oauthV1alpha1, err = oauthv1alpha1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + + cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + return &cs, nil +} + +// NewForConfigOrDie creates a new Clientset for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *Clientset { + var cs Clientset + cs.oauthV1alpha1 = oauthv1alpha1.NewForConfigOrDie(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) + return &cs +} + +// New creates a new Clientset for the given RESTClient. +func New(c rest.Interface) *Clientset { + var cs Clientset + cs.oauthV1alpha1 = oauthv1alpha1.New(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClient(c) + return &cs +} diff --git a/generated/1.17/client/supervisor/virtual/clientset/versioned/doc.go b/generated/1.17/client/supervisor/virtual/clientset/versioned/doc.go new file mode 100644 index 00000000..5dc02e6e --- /dev/null +++ b/generated/1.17/client/supervisor/virtual/clientset/versioned/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated clientset. +package versioned diff --git a/generated/1.17/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go b/generated/1.17/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go new file mode 100644 index 00000000..40b8c342 --- /dev/null +++ b/generated/1.17/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go @@ -0,0 +1,69 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + clientset "go.pinniped.dev/generated/1.17/client/supervisor/virtual/clientset/versioned" + oauthv1alpha1 "go.pinniped.dev/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" + fakeoauthv1alpha1 "go.pinniped.dev/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/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" +) + +// NewSimpleClientset returns a clientset that will respond with the provided objects. +// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, +// without applying any validations and/or defaults. It shouldn't be considered a replacement +// for a real clientset and is mostly useful in simple unit tests. +func NewSimpleClientset(objects ...runtime.Object) *Clientset { + o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) + for _, obj := range objects { + if err := o.Add(obj); err != nil { + panic(err) + } + } + + cs := &Clientset{tracker: o} + cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} + cs.AddReactor("*", "*", testing.ObjectReaction(o)) + cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { + gvr := action.GetResource() + ns := action.GetNamespace() + watch, err := o.Watch(gvr, ns) + if err != nil { + return false, nil, err + } + return true, watch, nil + }) + + return cs +} + +// Clientset implements clientset.Interface. Meant to be embedded into a +// struct to get a default implementation. This makes faking out just the method +// you want to test easier. +type Clientset struct { + testing.Fake + discovery *fakediscovery.FakeDiscovery + tracker testing.ObjectTracker +} + +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + return c.discovery +} + +func (c *Clientset) Tracker() testing.ObjectTracker { + return c.tracker +} + +var _ clientset.Interface = &Clientset{} + +// OauthV1alpha1 retrieves the OauthV1alpha1Client +func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { + return &fakeoauthv1alpha1.FakeOauthV1alpha1{Fake: &c.Fake} +} diff --git a/generated/1.17/client/supervisor/virtual/clientset/versioned/fake/doc.go b/generated/1.17/client/supervisor/virtual/clientset/versioned/fake/doc.go new file mode 100644 index 00000000..7c9538fd --- /dev/null +++ b/generated/1.17/client/supervisor/virtual/clientset/versioned/fake/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated fake clientset. +package fake diff --git a/generated/1.17/client/supervisor/virtual/clientset/versioned/fake/register.go b/generated/1.17/client/supervisor/virtual/clientset/versioned/fake/register.go new file mode 100644 index 00000000..675d744f --- /dev/null +++ b/generated/1.17/client/supervisor/virtual/clientset/versioned/fake/register.go @@ -0,0 +1,43 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + oauthv1alpha1 "go.pinniped.dev/generated/1.17/apis/supervisor/virtual/oauth/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" +) + +var scheme = runtime.NewScheme() +var codecs = serializer.NewCodecFactory(scheme) +var parameterCodec = runtime.NewParameterCodec(scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + oauthv1alpha1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(scheme)) +} diff --git a/generated/1.17/client/supervisor/virtual/clientset/versioned/scheme/doc.go b/generated/1.17/client/supervisor/virtual/clientset/versioned/scheme/doc.go new file mode 100644 index 00000000..cc02f1d3 --- /dev/null +++ b/generated/1.17/client/supervisor/virtual/clientset/versioned/scheme/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// This package contains the scheme of the automatically generated clientset. +package scheme diff --git a/generated/1.17/client/supervisor/virtual/clientset/versioned/scheme/register.go b/generated/1.17/client/supervisor/virtual/clientset/versioned/scheme/register.go new file mode 100644 index 00000000..f027d173 --- /dev/null +++ b/generated/1.17/client/supervisor/virtual/clientset/versioned/scheme/register.go @@ -0,0 +1,43 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package scheme + +import ( + oauthv1alpha1 "go.pinniped.dev/generated/1.17/apis/supervisor/virtual/oauth/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" +) + +var Scheme = runtime.NewScheme() +var Codecs = serializer.NewCodecFactory(Scheme) +var ParameterCodec = runtime.NewParameterCodec(Scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + oauthv1alpha1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(Scheme)) +} diff --git a/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go b/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go new file mode 100644 index 00000000..e7a470b6 --- /dev/null +++ b/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1alpha1 diff --git a/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go b/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go new file mode 100644 index 00000000..7906901b --- /dev/null +++ b/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go b/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go new file mode 100644 index 00000000..97afc436 --- /dev/null +++ b/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go @@ -0,0 +1,27 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1alpha1 "go.pinniped.dev/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeOauthV1alpha1 struct { + *testing.Fake +} + +func (c *FakeOauthV1alpha1) OIDCClientSecretRequests(namespace string) v1alpha1.OIDCClientSecretRequestInterface { + return &FakeOIDCClientSecretRequests{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeOauthV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go b/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go new file mode 100644 index 00000000..f2450f9b --- /dev/null +++ b/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go @@ -0,0 +1,33 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1alpha1 "go.pinniped.dev/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1" + schema "k8s.io/apimachinery/pkg/runtime/schema" + testing "k8s.io/client-go/testing" +) + +// FakeOIDCClientSecretRequests implements OIDCClientSecretRequestInterface +type FakeOIDCClientSecretRequests struct { + Fake *FakeOauthV1alpha1 + ns string +} + +var oidcclientsecretrequestsResource = schema.GroupVersionResource{Group: "oauth.virtual.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclientsecretrequests"} + +var oidcclientsecretrequestsKind = schema.GroupVersionKind{Group: "oauth.virtual.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClientSecretRequest"} + +// Create takes the representation of a oIDCClientSecretRequest and creates it. Returns the server's representation of the oIDCClientSecretRequest, and an error, if there is any. +func (c *FakeOIDCClientSecretRequests) Create(oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest) (result *v1alpha1.OIDCClientSecretRequest, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(oidcclientsecretrequestsResource, c.ns, oIDCClientSecretRequest), &v1alpha1.OIDCClientSecretRequest{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.OIDCClientSecretRequest), err +} diff --git a/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go b/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go new file mode 100644 index 00000000..427a2ad8 --- /dev/null +++ b/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go @@ -0,0 +1,8 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +type OIDCClientSecretRequestExpansion interface{} diff --git a/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go b/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go new file mode 100644 index 00000000..b3a80cae --- /dev/null +++ b/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go @@ -0,0 +1,76 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "go.pinniped.dev/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1" + "go.pinniped.dev/generated/1.17/client/supervisor/virtual/clientset/versioned/scheme" + rest "k8s.io/client-go/rest" +) + +type OauthV1alpha1Interface interface { + RESTClient() rest.Interface + OIDCClientSecretRequestsGetter +} + +// OauthV1alpha1Client is used to interact with features provided by the oauth.virtual.supervisor.pinniped.dev group. +type OauthV1alpha1Client struct { + restClient rest.Interface +} + +func (c *OauthV1alpha1Client) OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface { + return newOIDCClientSecretRequests(c, namespace) +} + +// NewForConfig creates a new OauthV1alpha1Client for the given config. +func NewForConfig(c *rest.Config) (*OauthV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &OauthV1alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new OauthV1alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *OauthV1alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new OauthV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *OauthV1alpha1Client { + return &OauthV1alpha1Client{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 *OauthV1alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go b/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go new file mode 100644 index 00000000..97031447 --- /dev/null +++ b/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go @@ -0,0 +1,49 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "go.pinniped.dev/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1" + rest "k8s.io/client-go/rest" +) + +// OIDCClientSecretRequestsGetter has a method to return a OIDCClientSecretRequestInterface. +// A group's client should implement this interface. +type OIDCClientSecretRequestsGetter interface { + OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface +} + +// OIDCClientSecretRequestInterface has methods to work with OIDCClientSecretRequest resources. +type OIDCClientSecretRequestInterface interface { + Create(*v1alpha1.OIDCClientSecretRequest) (*v1alpha1.OIDCClientSecretRequest, error) + OIDCClientSecretRequestExpansion +} + +// oIDCClientSecretRequests implements OIDCClientSecretRequestInterface +type oIDCClientSecretRequests struct { + client rest.Interface + ns string +} + +// newOIDCClientSecretRequests returns a OIDCClientSecretRequests +func newOIDCClientSecretRequests(c *OauthV1alpha1Client, namespace string) *oIDCClientSecretRequests { + return &oIDCClientSecretRequests{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Create takes the representation of a oIDCClientSecretRequest and creates it. Returns the server's representation of the oIDCClientSecretRequest, and an error, if there is any. +func (c *oIDCClientSecretRequests) Create(oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest) (result *v1alpha1.OIDCClientSecretRequest, err error) { + result = &v1alpha1.OIDCClientSecretRequest{} + err = c.client.Post(). + Namespace(c.ns). + Resource("oidcclientsecretrequests"). + Body(oIDCClientSecretRequest). + Do(). + Into(result) + return +} diff --git a/generated/1.18/README.adoc b/generated/1.18/README.adoc index f2346ef6..db96bb48 100644 --- a/generated/1.18/README.adoc +++ b/generated/1.18/README.adoc @@ -13,6 +13,8 @@ - xref:{anchor_prefix}-idp-supervisor-pinniped-dev-v1alpha1[$$idp.supervisor.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-login-concierge-pinniped-dev-v1alpha1[$$login.concierge.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-oauth-supervisor-pinniped-dev-v1alpha1[$$oauth.supervisor.pinniped.dev/v1alpha1$$] +- xref:{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-oauth[$$oauth.virtual.supervisor.pinniped.dev/oauth$$] +- xref:{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-v1alpha1[$$oauth.virtual.supervisor.pinniped.dev/v1alpha1$$] [id="{anchor_prefix}-authentication-concierge-pinniped-dev-v1alpha1"] @@ -1386,3 +1388,95 @@ OIDCClientSpec is a struct that describes an OIDC Client. + +[id="{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-oauth"] +=== oauth.virtual.supervisor.pinniped.dev/oauth + +Package oauth is the internal version of the Pinniped virtual oauth API. + + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-virtual-oauth-oidcclientsecretrequestspec"] +==== OIDCClientSecretRequestSpec + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-virtual-oauth-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generateNewSecret`* __boolean__ | +| *`revokeOldSecrets`* __boolean__ | +|=== + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-virtual-oauth-oidcclientsecretrequeststatus"] +==== OIDCClientSecretRequestStatus + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-virtual-oauth-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generatedSecret`* __string__ | +| *`totalClientSecrets`* __integer__ | +|=== + + + +[id="{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-v1alpha1"] +=== oauth.virtual.supervisor.pinniped.dev/v1alpha1 + +Package v1alpha1 is the v1alpha1 version of the Pinniped virtual oauth API. + + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequestspec"] +==== OIDCClientSecretRequestSpec + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generateNewSecret`* __boolean__ | +| *`revokeOldSecrets`* __boolean__ | +|=== + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequeststatus"] +==== OIDCClientSecretRequestStatus + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generatedSecret`* __string__ | +| *`totalClientSecrets`* __integer__ | +|=== + + diff --git a/generated/1.18/apis/supervisor/virtual/oauth/doc.go b/generated/1.18/apis/supervisor/virtual/oauth/doc.go new file mode 100644 index 00000000..ca4e9a63 --- /dev/null +++ b/generated/1.18/apis/supervisor/virtual/oauth/doc.go @@ -0,0 +1,8 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// +k8s:deepcopy-gen=package +// +groupName=oauth.virtual.supervisor.pinniped.dev + +// Package oauth is the internal version of the Pinniped virtual oauth API. +package oauth diff --git a/generated/1.18/apis/supervisor/virtual/oauth/register.go b/generated/1.18/apis/supervisor/virtual/oauth/register.go new file mode 100644 index 00000000..a238d85f --- /dev/null +++ b/generated/1.18/apis/supervisor/virtual/oauth/register.go @@ -0,0 +1,37 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package oauth + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +const GroupName = "oauth.virtual.supervisor.pinniped.dev" + +// SchemeGroupVersion is group version used to register these objects. +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} + +// Kind takes an unqualified kind and returns back a Group qualified GroupKind. +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Resource takes an unqualified resource and returns back a Group qualified GroupResource. +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + AddToScheme = SchemeBuilder.AddToScheme +) + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &OIDCClientSecretRequest{}, + ) + return nil +} diff --git a/generated/1.18/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go b/generated/1.18/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go new file mode 100644 index 00000000..ac54a93c --- /dev/null +++ b/generated/1.18/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go @@ -0,0 +1,25 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package oauth + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +type OIDCClientSecretRequestSpec struct { + GenerateNewSecret bool `json:"generateNewSecret"` + RevokeOldSecrets bool `json:"revokeOldSecrets"` +} + +type OIDCClientSecretRequestStatus struct { + GeneratedSecret string `json:"generatedSecret,omitempty"` + TotalClientSecrets int `json:"totalClientSecrets"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequest struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` // metadata.name must be set to the client ID + + Spec OIDCClientSecretRequestSpec `json:"spec"` + Status OIDCClientSecretRequestStatus `json:"status"` +} diff --git a/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/conversion.go b/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/conversion.go new file mode 100644 index 00000000..fcf4e82f --- /dev/null +++ b/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/conversion.go @@ -0,0 +1,4 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 diff --git a/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/defaults.go b/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/defaults.go new file mode 100644 index 00000000..d4f5a9e8 --- /dev/null +++ b/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/defaults.go @@ -0,0 +1,12 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/runtime" +) + +func addDefaultingFuncs(scheme *runtime.Scheme) error { + return RegisterDefaults(scheme) +} diff --git a/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/doc.go b/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/doc.go new file mode 100644 index 00000000..215e4edf --- /dev/null +++ b/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/doc.go @@ -0,0 +1,11 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen=package +// +k8s:conversion-gen=go.pinniped.dev/generated/1.18/apis/supervisor/virtual/oauth +// +k8s:defaulter-gen=TypeMeta +// +groupName=oauth.virtual.supervisor.pinniped.dev + +// Package v1alpha1 is the v1alpha1 version of the Pinniped virtual oauth API. +package v1alpha1 diff --git a/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/register.go b/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/register.go new file mode 100644 index 00000000..ecc75a08 --- /dev/null +++ b/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/register.go @@ -0,0 +1,42 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +const GroupName = "oauth.virtual.supervisor.pinniped.dev" + +// SchemeGroupVersion is group version used to register these objects. +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} + +var ( + SchemeBuilder runtime.SchemeBuilder + localSchemeBuilder = &SchemeBuilder + AddToScheme = SchemeBuilder.AddToScheme +) + +func init() { + // We only register manually written functions here. The registration of the + // generated functions takes place in the generated files. The separation + // makes the code compile even when the generated files are missing. + localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs) +} + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &OIDCClientSecretRequest{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} + +// Resource takes an unqualified resource and returns back a Group qualified GroupResource. +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} diff --git a/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go b/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go new file mode 100644 index 00000000..dda2f3bb --- /dev/null +++ b/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go @@ -0,0 +1,28 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +type OIDCClientSecretRequestSpec struct { + GenerateNewSecret bool `json:"generateNewSecret"` + RevokeOldSecrets bool `json:"revokeOldSecrets"` +} + +type OIDCClientSecretRequestStatus struct { + GeneratedSecret string `json:"generatedSecret,omitempty"` + TotalClientSecrets int `json:"totalClientSecrets"` +} + +// +genclient +// +genclient:onlyVerbs=create +// +kubebuilder:subresource:status +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequest struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` // metadata.name must be set to the client ID + + Spec OIDCClientSecretRequestSpec `json:"spec"` + Status OIDCClientSecretRequestStatus `json:"status"` +} diff --git a/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go b/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go new file mode 100644 index 00000000..d71f1e76 --- /dev/null +++ b/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go @@ -0,0 +1,131 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + oauth "go.pinniped.dev/generated/1.18/apis/supervisor/virtual/oauth" + 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((*OIDCClientSecretRequest)(nil), (*oauth.OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(a.(*OIDCClientSecretRequest), b.(*oauth.OIDCClientSecretRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequest)(nil), (*OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(a.(*oauth.OIDCClientSecretRequest), b.(*OIDCClientSecretRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestSpec)(nil), (*oauth.OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(a.(*OIDCClientSecretRequestSpec), b.(*oauth.OIDCClientSecretRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequestSpec)(nil), (*OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(a.(*oauth.OIDCClientSecretRequestSpec), b.(*OIDCClientSecretRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestStatus)(nil), (*oauth.OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(a.(*OIDCClientSecretRequestStatus), b.(*oauth.OIDCClientSecretRequestStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequestStatus)(nil), (*OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(a.(*oauth.OIDCClientSecretRequestStatus), b.(*OIDCClientSecretRequestStatus), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *oauth.OIDCClientSecretRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *oauth.OIDCClientSecretRequest, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in, out, s) +} + +func autoConvert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *oauth.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest is an autogenerated conversion function. +func Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *oauth.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { + return autoConvert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in, out, s) +} + +func autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *oauth.OIDCClientSecretRequestSpec, s conversion.Scope) error { + out.GenerateNewSecret = in.GenerateNewSecret + out.RevokeOldSecrets = in.RevokeOldSecrets + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *oauth.OIDCClientSecretRequestSpec, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in, out, s) +} + +func autoConvert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *oauth.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { + out.GenerateNewSecret = in.GenerateNewSecret + out.RevokeOldSecrets = in.RevokeOldSecrets + return nil +} + +// Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec is an autogenerated conversion function. +func Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *oauth.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { + return autoConvert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in, out, s) +} + +func autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *oauth.OIDCClientSecretRequestStatus, s conversion.Scope) error { + out.GeneratedSecret = in.GeneratedSecret + out.TotalClientSecrets = in.TotalClientSecrets + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *oauth.OIDCClientSecretRequestStatus, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in, out, s) +} + +func autoConvert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *oauth.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { + out.GeneratedSecret = in.GeneratedSecret + out.TotalClientSecrets = in.TotalClientSecrets + return nil +} + +// Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus is an autogenerated conversion function. +func Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *oauth.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { + return autoConvert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in, out, s) +} diff --git a/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go b/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 00000000..e4fce842 --- /dev/null +++ b/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,73 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequest) DeepCopyInto(out *OIDCClientSecretRequest) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequest. +func (in *OIDCClientSecretRequest) DeepCopy() *OIDCClientSecretRequest { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestSpec. +func (in *OIDCClientSecretRequestSpec) DeepCopy() *OIDCClientSecretRequestSpec { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestStatus) DeepCopyInto(out *OIDCClientSecretRequestStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestStatus. +func (in *OIDCClientSecretRequestStatus) DeepCopy() *OIDCClientSecretRequestStatus { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestStatus) + in.DeepCopyInto(out) + return out +} diff --git a/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go b/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go new file mode 100644 index 00000000..9097a935 --- /dev/null +++ b/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go @@ -0,0 +1,20 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/generated/1.18/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go b/generated/1.18/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go new file mode 100644 index 00000000..24b58e7b --- /dev/null +++ b/generated/1.18/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go @@ -0,0 +1,73 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package oauth + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequest) DeepCopyInto(out *OIDCClientSecretRequest) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequest. +func (in *OIDCClientSecretRequest) DeepCopy() *OIDCClientSecretRequest { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestSpec. +func (in *OIDCClientSecretRequestSpec) DeepCopy() *OIDCClientSecretRequestSpec { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestStatus) DeepCopyInto(out *OIDCClientSecretRequestStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestStatus. +func (in *OIDCClientSecretRequestStatus) DeepCopy() *OIDCClientSecretRequestStatus { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestStatus) + in.DeepCopyInto(out) + return out +} diff --git a/generated/1.18/client/supervisor/virtual/clientset/versioned/clientset.go b/generated/1.18/client/supervisor/virtual/clientset/versioned/clientset.go new file mode 100644 index 00000000..f5038211 --- /dev/null +++ b/generated/1.18/client/supervisor/virtual/clientset/versioned/clientset.go @@ -0,0 +1,84 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package versioned + +import ( + "fmt" + + oauthv1alpha1 "go.pinniped.dev/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" + discovery "k8s.io/client-go/discovery" + rest "k8s.io/client-go/rest" + flowcontrol "k8s.io/client-go/util/flowcontrol" +) + +type Interface interface { + Discovery() discovery.DiscoveryInterface + OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface +} + +// Clientset contains the clients for groups. Each group has exactly one +// version included in a Clientset. +type Clientset struct { + *discovery.DiscoveryClient + oauthV1alpha1 *oauthv1alpha1.OauthV1alpha1Client +} + +// OauthV1alpha1 retrieves the OauthV1alpha1Client +func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { + return c.oauthV1alpha1 +} + +// Discovery retrieves the DiscoveryClient +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + if c == nil { + return nil + } + return c.DiscoveryClient +} + +// NewForConfig creates a new Clientset for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewForConfig will generate a rate-limiter in configShallowCopy. +func NewForConfig(c *rest.Config) (*Clientset, error) { + configShallowCopy := *c + if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { + if configShallowCopy.Burst <= 0 { + return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + } + configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) + } + var cs Clientset + var err error + cs.oauthV1alpha1, err = oauthv1alpha1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + + cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + return &cs, nil +} + +// NewForConfigOrDie creates a new Clientset for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *Clientset { + var cs Clientset + cs.oauthV1alpha1 = oauthv1alpha1.NewForConfigOrDie(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) + return &cs +} + +// New creates a new Clientset for the given RESTClient. +func New(c rest.Interface) *Clientset { + var cs Clientset + cs.oauthV1alpha1 = oauthv1alpha1.New(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClient(c) + return &cs +} diff --git a/generated/1.18/client/supervisor/virtual/clientset/versioned/doc.go b/generated/1.18/client/supervisor/virtual/clientset/versioned/doc.go new file mode 100644 index 00000000..5dc02e6e --- /dev/null +++ b/generated/1.18/client/supervisor/virtual/clientset/versioned/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated clientset. +package versioned diff --git a/generated/1.18/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go b/generated/1.18/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go new file mode 100644 index 00000000..11c90feb --- /dev/null +++ b/generated/1.18/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go @@ -0,0 +1,69 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + clientset "go.pinniped.dev/generated/1.18/client/supervisor/virtual/clientset/versioned" + oauthv1alpha1 "go.pinniped.dev/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" + fakeoauthv1alpha1 "go.pinniped.dev/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/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" +) + +// NewSimpleClientset returns a clientset that will respond with the provided objects. +// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, +// without applying any validations and/or defaults. It shouldn't be considered a replacement +// for a real clientset and is mostly useful in simple unit tests. +func NewSimpleClientset(objects ...runtime.Object) *Clientset { + o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) + for _, obj := range objects { + if err := o.Add(obj); err != nil { + panic(err) + } + } + + cs := &Clientset{tracker: o} + cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} + cs.AddReactor("*", "*", testing.ObjectReaction(o)) + cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { + gvr := action.GetResource() + ns := action.GetNamespace() + watch, err := o.Watch(gvr, ns) + if err != nil { + return false, nil, err + } + return true, watch, nil + }) + + return cs +} + +// Clientset implements clientset.Interface. Meant to be embedded into a +// struct to get a default implementation. This makes faking out just the method +// you want to test easier. +type Clientset struct { + testing.Fake + discovery *fakediscovery.FakeDiscovery + tracker testing.ObjectTracker +} + +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + return c.discovery +} + +func (c *Clientset) Tracker() testing.ObjectTracker { + return c.tracker +} + +var _ clientset.Interface = &Clientset{} + +// OauthV1alpha1 retrieves the OauthV1alpha1Client +func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { + return &fakeoauthv1alpha1.FakeOauthV1alpha1{Fake: &c.Fake} +} diff --git a/generated/1.18/client/supervisor/virtual/clientset/versioned/fake/doc.go b/generated/1.18/client/supervisor/virtual/clientset/versioned/fake/doc.go new file mode 100644 index 00000000..7c9538fd --- /dev/null +++ b/generated/1.18/client/supervisor/virtual/clientset/versioned/fake/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated fake clientset. +package fake diff --git a/generated/1.18/client/supervisor/virtual/clientset/versioned/fake/register.go b/generated/1.18/client/supervisor/virtual/clientset/versioned/fake/register.go new file mode 100644 index 00000000..5a912824 --- /dev/null +++ b/generated/1.18/client/supervisor/virtual/clientset/versioned/fake/register.go @@ -0,0 +1,43 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + oauthv1alpha1 "go.pinniped.dev/generated/1.18/apis/supervisor/virtual/oauth/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" +) + +var scheme = runtime.NewScheme() +var codecs = serializer.NewCodecFactory(scheme) +var parameterCodec = runtime.NewParameterCodec(scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + oauthv1alpha1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(scheme)) +} diff --git a/generated/1.18/client/supervisor/virtual/clientset/versioned/scheme/doc.go b/generated/1.18/client/supervisor/virtual/clientset/versioned/scheme/doc.go new file mode 100644 index 00000000..cc02f1d3 --- /dev/null +++ b/generated/1.18/client/supervisor/virtual/clientset/versioned/scheme/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// This package contains the scheme of the automatically generated clientset. +package scheme diff --git a/generated/1.18/client/supervisor/virtual/clientset/versioned/scheme/register.go b/generated/1.18/client/supervisor/virtual/clientset/versioned/scheme/register.go new file mode 100644 index 00000000..81e95f84 --- /dev/null +++ b/generated/1.18/client/supervisor/virtual/clientset/versioned/scheme/register.go @@ -0,0 +1,43 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package scheme + +import ( + oauthv1alpha1 "go.pinniped.dev/generated/1.18/apis/supervisor/virtual/oauth/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" +) + +var Scheme = runtime.NewScheme() +var Codecs = serializer.NewCodecFactory(Scheme) +var ParameterCodec = runtime.NewParameterCodec(Scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + oauthv1alpha1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(Scheme)) +} diff --git a/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go b/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go new file mode 100644 index 00000000..e7a470b6 --- /dev/null +++ b/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1alpha1 diff --git a/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go b/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go new file mode 100644 index 00000000..7906901b --- /dev/null +++ b/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go b/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go new file mode 100644 index 00000000..99987eec --- /dev/null +++ b/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go @@ -0,0 +1,27 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1alpha1 "go.pinniped.dev/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeOauthV1alpha1 struct { + *testing.Fake +} + +func (c *FakeOauthV1alpha1) OIDCClientSecretRequests(namespace string) v1alpha1.OIDCClientSecretRequestInterface { + return &FakeOIDCClientSecretRequests{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeOauthV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go b/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go new file mode 100644 index 00000000..8094fcf0 --- /dev/null +++ b/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go @@ -0,0 +1,36 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "go.pinniped.dev/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + schema "k8s.io/apimachinery/pkg/runtime/schema" + testing "k8s.io/client-go/testing" +) + +// FakeOIDCClientSecretRequests implements OIDCClientSecretRequestInterface +type FakeOIDCClientSecretRequests struct { + Fake *FakeOauthV1alpha1 + ns string +} + +var oidcclientsecretrequestsResource = schema.GroupVersionResource{Group: "oauth.virtual.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclientsecretrequests"} + +var oidcclientsecretrequestsKind = schema.GroupVersionKind{Group: "oauth.virtual.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClientSecretRequest"} + +// Create takes the representation of a oIDCClientSecretRequest and creates it. Returns the server's representation of the oIDCClientSecretRequest, and an error, if there is any. +func (c *FakeOIDCClientSecretRequests) Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (result *v1alpha1.OIDCClientSecretRequest, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(oidcclientsecretrequestsResource, c.ns, oIDCClientSecretRequest), &v1alpha1.OIDCClientSecretRequest{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.OIDCClientSecretRequest), err +} diff --git a/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go b/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go new file mode 100644 index 00000000..427a2ad8 --- /dev/null +++ b/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go @@ -0,0 +1,8 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +type OIDCClientSecretRequestExpansion interface{} diff --git a/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go b/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go new file mode 100644 index 00000000..9d839dfb --- /dev/null +++ b/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go @@ -0,0 +1,76 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "go.pinniped.dev/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1" + "go.pinniped.dev/generated/1.18/client/supervisor/virtual/clientset/versioned/scheme" + rest "k8s.io/client-go/rest" +) + +type OauthV1alpha1Interface interface { + RESTClient() rest.Interface + OIDCClientSecretRequestsGetter +} + +// OauthV1alpha1Client is used to interact with features provided by the oauth.virtual.supervisor.pinniped.dev group. +type OauthV1alpha1Client struct { + restClient rest.Interface +} + +func (c *OauthV1alpha1Client) OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface { + return newOIDCClientSecretRequests(c, namespace) +} + +// NewForConfig creates a new OauthV1alpha1Client for the given config. +func NewForConfig(c *rest.Config) (*OauthV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &OauthV1alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new OauthV1alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *OauthV1alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new OauthV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *OauthV1alpha1Client { + return &OauthV1alpha1Client{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 *OauthV1alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go b/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go new file mode 100644 index 00000000..c4382045 --- /dev/null +++ b/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go @@ -0,0 +1,54 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + + v1alpha1 "go.pinniped.dev/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1" + scheme "go.pinniped.dev/generated/1.18/client/supervisor/virtual/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + rest "k8s.io/client-go/rest" +) + +// OIDCClientSecretRequestsGetter has a method to return a OIDCClientSecretRequestInterface. +// A group's client should implement this interface. +type OIDCClientSecretRequestsGetter interface { + OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface +} + +// OIDCClientSecretRequestInterface has methods to work with OIDCClientSecretRequest resources. +type OIDCClientSecretRequestInterface interface { + Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (*v1alpha1.OIDCClientSecretRequest, error) + OIDCClientSecretRequestExpansion +} + +// oIDCClientSecretRequests implements OIDCClientSecretRequestInterface +type oIDCClientSecretRequests struct { + client rest.Interface + ns string +} + +// newOIDCClientSecretRequests returns a OIDCClientSecretRequests +func newOIDCClientSecretRequests(c *OauthV1alpha1Client, namespace string) *oIDCClientSecretRequests { + return &oIDCClientSecretRequests{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Create takes the representation of a oIDCClientSecretRequest and creates it. Returns the server's representation of the oIDCClientSecretRequest, and an error, if there is any. +func (c *oIDCClientSecretRequests) Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (result *v1alpha1.OIDCClientSecretRequest, err error) { + result = &v1alpha1.OIDCClientSecretRequest{} + err = c.client.Post(). + Namespace(c.ns). + Resource("oidcclientsecretrequests"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(oIDCClientSecretRequest). + Do(ctx). + Into(result) + return +} diff --git a/generated/1.19/README.adoc b/generated/1.19/README.adoc index 6cd1eaa0..29d52abb 100644 --- a/generated/1.19/README.adoc +++ b/generated/1.19/README.adoc @@ -13,6 +13,8 @@ - xref:{anchor_prefix}-idp-supervisor-pinniped-dev-v1alpha1[$$idp.supervisor.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-login-concierge-pinniped-dev-v1alpha1[$$login.concierge.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-oauth-supervisor-pinniped-dev-v1alpha1[$$oauth.supervisor.pinniped.dev/v1alpha1$$] +- xref:{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-oauth[$$oauth.virtual.supervisor.pinniped.dev/oauth$$] +- xref:{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-v1alpha1[$$oauth.virtual.supervisor.pinniped.dev/v1alpha1$$] [id="{anchor_prefix}-authentication-concierge-pinniped-dev-v1alpha1"] @@ -1386,3 +1388,95 @@ OIDCClientSpec is a struct that describes an OIDC Client. + +[id="{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-oauth"] +=== oauth.virtual.supervisor.pinniped.dev/oauth + +Package oauth is the internal version of the Pinniped virtual oauth API. + + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-virtual-oauth-oidcclientsecretrequestspec"] +==== OIDCClientSecretRequestSpec + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-virtual-oauth-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generateNewSecret`* __boolean__ | +| *`revokeOldSecrets`* __boolean__ | +|=== + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-virtual-oauth-oidcclientsecretrequeststatus"] +==== OIDCClientSecretRequestStatus + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-virtual-oauth-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generatedSecret`* __string__ | +| *`totalClientSecrets`* __integer__ | +|=== + + + +[id="{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-v1alpha1"] +=== oauth.virtual.supervisor.pinniped.dev/v1alpha1 + +Package v1alpha1 is the v1alpha1 version of the Pinniped virtual oauth API. + + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequestspec"] +==== OIDCClientSecretRequestSpec + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generateNewSecret`* __boolean__ | +| *`revokeOldSecrets`* __boolean__ | +|=== + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequeststatus"] +==== OIDCClientSecretRequestStatus + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generatedSecret`* __string__ | +| *`totalClientSecrets`* __integer__ | +|=== + + diff --git a/generated/1.19/apis/supervisor/virtual/oauth/doc.go b/generated/1.19/apis/supervisor/virtual/oauth/doc.go new file mode 100644 index 00000000..ca4e9a63 --- /dev/null +++ b/generated/1.19/apis/supervisor/virtual/oauth/doc.go @@ -0,0 +1,8 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// +k8s:deepcopy-gen=package +// +groupName=oauth.virtual.supervisor.pinniped.dev + +// Package oauth is the internal version of the Pinniped virtual oauth API. +package oauth diff --git a/generated/1.19/apis/supervisor/virtual/oauth/register.go b/generated/1.19/apis/supervisor/virtual/oauth/register.go new file mode 100644 index 00000000..a238d85f --- /dev/null +++ b/generated/1.19/apis/supervisor/virtual/oauth/register.go @@ -0,0 +1,37 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package oauth + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +const GroupName = "oauth.virtual.supervisor.pinniped.dev" + +// SchemeGroupVersion is group version used to register these objects. +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} + +// Kind takes an unqualified kind and returns back a Group qualified GroupKind. +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Resource takes an unqualified resource and returns back a Group qualified GroupResource. +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + AddToScheme = SchemeBuilder.AddToScheme +) + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &OIDCClientSecretRequest{}, + ) + return nil +} diff --git a/generated/1.19/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go b/generated/1.19/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go new file mode 100644 index 00000000..ac54a93c --- /dev/null +++ b/generated/1.19/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go @@ -0,0 +1,25 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package oauth + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +type OIDCClientSecretRequestSpec struct { + GenerateNewSecret bool `json:"generateNewSecret"` + RevokeOldSecrets bool `json:"revokeOldSecrets"` +} + +type OIDCClientSecretRequestStatus struct { + GeneratedSecret string `json:"generatedSecret,omitempty"` + TotalClientSecrets int `json:"totalClientSecrets"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequest struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` // metadata.name must be set to the client ID + + Spec OIDCClientSecretRequestSpec `json:"spec"` + Status OIDCClientSecretRequestStatus `json:"status"` +} diff --git a/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/conversion.go b/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/conversion.go new file mode 100644 index 00000000..fcf4e82f --- /dev/null +++ b/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/conversion.go @@ -0,0 +1,4 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 diff --git a/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/defaults.go b/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/defaults.go new file mode 100644 index 00000000..d4f5a9e8 --- /dev/null +++ b/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/defaults.go @@ -0,0 +1,12 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/runtime" +) + +func addDefaultingFuncs(scheme *runtime.Scheme) error { + return RegisterDefaults(scheme) +} diff --git a/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/doc.go b/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/doc.go new file mode 100644 index 00000000..49c85a15 --- /dev/null +++ b/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/doc.go @@ -0,0 +1,11 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen=package +// +k8s:conversion-gen=go.pinniped.dev/generated/1.19/apis/supervisor/virtual/oauth +// +k8s:defaulter-gen=TypeMeta +// +groupName=oauth.virtual.supervisor.pinniped.dev + +// Package v1alpha1 is the v1alpha1 version of the Pinniped virtual oauth API. +package v1alpha1 diff --git a/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/register.go b/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/register.go new file mode 100644 index 00000000..ecc75a08 --- /dev/null +++ b/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/register.go @@ -0,0 +1,42 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +const GroupName = "oauth.virtual.supervisor.pinniped.dev" + +// SchemeGroupVersion is group version used to register these objects. +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} + +var ( + SchemeBuilder runtime.SchemeBuilder + localSchemeBuilder = &SchemeBuilder + AddToScheme = SchemeBuilder.AddToScheme +) + +func init() { + // We only register manually written functions here. The registration of the + // generated functions takes place in the generated files. The separation + // makes the code compile even when the generated files are missing. + localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs) +} + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &OIDCClientSecretRequest{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} + +// Resource takes an unqualified resource and returns back a Group qualified GroupResource. +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} diff --git a/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go b/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go new file mode 100644 index 00000000..dda2f3bb --- /dev/null +++ b/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go @@ -0,0 +1,28 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +type OIDCClientSecretRequestSpec struct { + GenerateNewSecret bool `json:"generateNewSecret"` + RevokeOldSecrets bool `json:"revokeOldSecrets"` +} + +type OIDCClientSecretRequestStatus struct { + GeneratedSecret string `json:"generatedSecret,omitempty"` + TotalClientSecrets int `json:"totalClientSecrets"` +} + +// +genclient +// +genclient:onlyVerbs=create +// +kubebuilder:subresource:status +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequest struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` // metadata.name must be set to the client ID + + Spec OIDCClientSecretRequestSpec `json:"spec"` + Status OIDCClientSecretRequestStatus `json:"status"` +} diff --git a/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go b/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go new file mode 100644 index 00000000..ae93108c --- /dev/null +++ b/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go @@ -0,0 +1,131 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + oauth "go.pinniped.dev/generated/1.19/apis/supervisor/virtual/oauth" + 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((*OIDCClientSecretRequest)(nil), (*oauth.OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(a.(*OIDCClientSecretRequest), b.(*oauth.OIDCClientSecretRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequest)(nil), (*OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(a.(*oauth.OIDCClientSecretRequest), b.(*OIDCClientSecretRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestSpec)(nil), (*oauth.OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(a.(*OIDCClientSecretRequestSpec), b.(*oauth.OIDCClientSecretRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequestSpec)(nil), (*OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(a.(*oauth.OIDCClientSecretRequestSpec), b.(*OIDCClientSecretRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestStatus)(nil), (*oauth.OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(a.(*OIDCClientSecretRequestStatus), b.(*oauth.OIDCClientSecretRequestStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequestStatus)(nil), (*OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(a.(*oauth.OIDCClientSecretRequestStatus), b.(*OIDCClientSecretRequestStatus), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *oauth.OIDCClientSecretRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *oauth.OIDCClientSecretRequest, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in, out, s) +} + +func autoConvert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *oauth.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest is an autogenerated conversion function. +func Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *oauth.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { + return autoConvert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in, out, s) +} + +func autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *oauth.OIDCClientSecretRequestSpec, s conversion.Scope) error { + out.GenerateNewSecret = in.GenerateNewSecret + out.RevokeOldSecrets = in.RevokeOldSecrets + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *oauth.OIDCClientSecretRequestSpec, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in, out, s) +} + +func autoConvert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *oauth.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { + out.GenerateNewSecret = in.GenerateNewSecret + out.RevokeOldSecrets = in.RevokeOldSecrets + return nil +} + +// Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec is an autogenerated conversion function. +func Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *oauth.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { + return autoConvert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in, out, s) +} + +func autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *oauth.OIDCClientSecretRequestStatus, s conversion.Scope) error { + out.GeneratedSecret = in.GeneratedSecret + out.TotalClientSecrets = in.TotalClientSecrets + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *oauth.OIDCClientSecretRequestStatus, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in, out, s) +} + +func autoConvert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *oauth.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { + out.GeneratedSecret = in.GeneratedSecret + out.TotalClientSecrets = in.TotalClientSecrets + return nil +} + +// Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus is an autogenerated conversion function. +func Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *oauth.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { + return autoConvert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in, out, s) +} diff --git a/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go b/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 00000000..e4fce842 --- /dev/null +++ b/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,73 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequest) DeepCopyInto(out *OIDCClientSecretRequest) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequest. +func (in *OIDCClientSecretRequest) DeepCopy() *OIDCClientSecretRequest { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestSpec. +func (in *OIDCClientSecretRequestSpec) DeepCopy() *OIDCClientSecretRequestSpec { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestStatus) DeepCopyInto(out *OIDCClientSecretRequestStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestStatus. +func (in *OIDCClientSecretRequestStatus) DeepCopy() *OIDCClientSecretRequestStatus { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestStatus) + in.DeepCopyInto(out) + return out +} diff --git a/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go b/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go new file mode 100644 index 00000000..9097a935 --- /dev/null +++ b/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go @@ -0,0 +1,20 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/generated/1.19/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go b/generated/1.19/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go new file mode 100644 index 00000000..24b58e7b --- /dev/null +++ b/generated/1.19/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go @@ -0,0 +1,73 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package oauth + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequest) DeepCopyInto(out *OIDCClientSecretRequest) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequest. +func (in *OIDCClientSecretRequest) DeepCopy() *OIDCClientSecretRequest { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestSpec. +func (in *OIDCClientSecretRequestSpec) DeepCopy() *OIDCClientSecretRequestSpec { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestStatus) DeepCopyInto(out *OIDCClientSecretRequestStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestStatus. +func (in *OIDCClientSecretRequestStatus) DeepCopy() *OIDCClientSecretRequestStatus { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestStatus) + in.DeepCopyInto(out) + return out +} diff --git a/generated/1.19/client/supervisor/virtual/clientset/versioned/clientset.go b/generated/1.19/client/supervisor/virtual/clientset/versioned/clientset.go new file mode 100644 index 00000000..b4890903 --- /dev/null +++ b/generated/1.19/client/supervisor/virtual/clientset/versioned/clientset.go @@ -0,0 +1,84 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package versioned + +import ( + "fmt" + + oauthv1alpha1 "go.pinniped.dev/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" + discovery "k8s.io/client-go/discovery" + rest "k8s.io/client-go/rest" + flowcontrol "k8s.io/client-go/util/flowcontrol" +) + +type Interface interface { + Discovery() discovery.DiscoveryInterface + OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface +} + +// Clientset contains the clients for groups. Each group has exactly one +// version included in a Clientset. +type Clientset struct { + *discovery.DiscoveryClient + oauthV1alpha1 *oauthv1alpha1.OauthV1alpha1Client +} + +// OauthV1alpha1 retrieves the OauthV1alpha1Client +func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { + return c.oauthV1alpha1 +} + +// Discovery retrieves the DiscoveryClient +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + if c == nil { + return nil + } + return c.DiscoveryClient +} + +// NewForConfig creates a new Clientset for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewForConfig will generate a rate-limiter in configShallowCopy. +func NewForConfig(c *rest.Config) (*Clientset, error) { + configShallowCopy := *c + if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { + if configShallowCopy.Burst <= 0 { + return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + } + configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) + } + var cs Clientset + var err error + cs.oauthV1alpha1, err = oauthv1alpha1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + + cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + return &cs, nil +} + +// NewForConfigOrDie creates a new Clientset for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *Clientset { + var cs Clientset + cs.oauthV1alpha1 = oauthv1alpha1.NewForConfigOrDie(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) + return &cs +} + +// New creates a new Clientset for the given RESTClient. +func New(c rest.Interface) *Clientset { + var cs Clientset + cs.oauthV1alpha1 = oauthv1alpha1.New(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClient(c) + return &cs +} diff --git a/generated/1.19/client/supervisor/virtual/clientset/versioned/doc.go b/generated/1.19/client/supervisor/virtual/clientset/versioned/doc.go new file mode 100644 index 00000000..5dc02e6e --- /dev/null +++ b/generated/1.19/client/supervisor/virtual/clientset/versioned/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated clientset. +package versioned diff --git a/generated/1.19/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go b/generated/1.19/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go new file mode 100644 index 00000000..3686b807 --- /dev/null +++ b/generated/1.19/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go @@ -0,0 +1,69 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + clientset "go.pinniped.dev/generated/1.19/client/supervisor/virtual/clientset/versioned" + oauthv1alpha1 "go.pinniped.dev/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" + fakeoauthv1alpha1 "go.pinniped.dev/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/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" +) + +// NewSimpleClientset returns a clientset that will respond with the provided objects. +// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, +// without applying any validations and/or defaults. It shouldn't be considered a replacement +// for a real clientset and is mostly useful in simple unit tests. +func NewSimpleClientset(objects ...runtime.Object) *Clientset { + o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) + for _, obj := range objects { + if err := o.Add(obj); err != nil { + panic(err) + } + } + + cs := &Clientset{tracker: o} + cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} + cs.AddReactor("*", "*", testing.ObjectReaction(o)) + cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { + gvr := action.GetResource() + ns := action.GetNamespace() + watch, err := o.Watch(gvr, ns) + if err != nil { + return false, nil, err + } + return true, watch, nil + }) + + return cs +} + +// Clientset implements clientset.Interface. Meant to be embedded into a +// struct to get a default implementation. This makes faking out just the method +// you want to test easier. +type Clientset struct { + testing.Fake + discovery *fakediscovery.FakeDiscovery + tracker testing.ObjectTracker +} + +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + return c.discovery +} + +func (c *Clientset) Tracker() testing.ObjectTracker { + return c.tracker +} + +var _ clientset.Interface = &Clientset{} + +// OauthV1alpha1 retrieves the OauthV1alpha1Client +func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { + return &fakeoauthv1alpha1.FakeOauthV1alpha1{Fake: &c.Fake} +} diff --git a/generated/1.19/client/supervisor/virtual/clientset/versioned/fake/doc.go b/generated/1.19/client/supervisor/virtual/clientset/versioned/fake/doc.go new file mode 100644 index 00000000..7c9538fd --- /dev/null +++ b/generated/1.19/client/supervisor/virtual/clientset/versioned/fake/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated fake clientset. +package fake diff --git a/generated/1.19/client/supervisor/virtual/clientset/versioned/fake/register.go b/generated/1.19/client/supervisor/virtual/clientset/versioned/fake/register.go new file mode 100644 index 00000000..bec66892 --- /dev/null +++ b/generated/1.19/client/supervisor/virtual/clientset/versioned/fake/register.go @@ -0,0 +1,43 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + oauthv1alpha1 "go.pinniped.dev/generated/1.19/apis/supervisor/virtual/oauth/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" +) + +var scheme = runtime.NewScheme() +var codecs = serializer.NewCodecFactory(scheme) + +var localSchemeBuilder = runtime.SchemeBuilder{ + oauthv1alpha1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(scheme)) +} diff --git a/generated/1.19/client/supervisor/virtual/clientset/versioned/scheme/doc.go b/generated/1.19/client/supervisor/virtual/clientset/versioned/scheme/doc.go new file mode 100644 index 00000000..cc02f1d3 --- /dev/null +++ b/generated/1.19/client/supervisor/virtual/clientset/versioned/scheme/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// This package contains the scheme of the automatically generated clientset. +package scheme diff --git a/generated/1.19/client/supervisor/virtual/clientset/versioned/scheme/register.go b/generated/1.19/client/supervisor/virtual/clientset/versioned/scheme/register.go new file mode 100644 index 00000000..da92b144 --- /dev/null +++ b/generated/1.19/client/supervisor/virtual/clientset/versioned/scheme/register.go @@ -0,0 +1,43 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package scheme + +import ( + oauthv1alpha1 "go.pinniped.dev/generated/1.19/apis/supervisor/virtual/oauth/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" +) + +var Scheme = runtime.NewScheme() +var Codecs = serializer.NewCodecFactory(Scheme) +var ParameterCodec = runtime.NewParameterCodec(Scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + oauthv1alpha1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(Scheme)) +} diff --git a/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go b/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go new file mode 100644 index 00000000..e7a470b6 --- /dev/null +++ b/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1alpha1 diff --git a/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go b/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go new file mode 100644 index 00000000..7906901b --- /dev/null +++ b/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go b/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go new file mode 100644 index 00000000..0220e89e --- /dev/null +++ b/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go @@ -0,0 +1,27 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1alpha1 "go.pinniped.dev/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeOauthV1alpha1 struct { + *testing.Fake +} + +func (c *FakeOauthV1alpha1) OIDCClientSecretRequests(namespace string) v1alpha1.OIDCClientSecretRequestInterface { + return &FakeOIDCClientSecretRequests{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeOauthV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go b/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go new file mode 100644 index 00000000..6560769b --- /dev/null +++ b/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go @@ -0,0 +1,36 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "go.pinniped.dev/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + schema "k8s.io/apimachinery/pkg/runtime/schema" + testing "k8s.io/client-go/testing" +) + +// FakeOIDCClientSecretRequests implements OIDCClientSecretRequestInterface +type FakeOIDCClientSecretRequests struct { + Fake *FakeOauthV1alpha1 + ns string +} + +var oidcclientsecretrequestsResource = schema.GroupVersionResource{Group: "oauth.virtual.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclientsecretrequests"} + +var oidcclientsecretrequestsKind = schema.GroupVersionKind{Group: "oauth.virtual.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClientSecretRequest"} + +// Create takes the representation of a oIDCClientSecretRequest and creates it. Returns the server's representation of the oIDCClientSecretRequest, and an error, if there is any. +func (c *FakeOIDCClientSecretRequests) Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (result *v1alpha1.OIDCClientSecretRequest, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(oidcclientsecretrequestsResource, c.ns, oIDCClientSecretRequest), &v1alpha1.OIDCClientSecretRequest{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.OIDCClientSecretRequest), err +} diff --git a/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go b/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go new file mode 100644 index 00000000..427a2ad8 --- /dev/null +++ b/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go @@ -0,0 +1,8 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +type OIDCClientSecretRequestExpansion interface{} diff --git a/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go b/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go new file mode 100644 index 00000000..f0d93b95 --- /dev/null +++ b/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go @@ -0,0 +1,76 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "go.pinniped.dev/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1" + "go.pinniped.dev/generated/1.19/client/supervisor/virtual/clientset/versioned/scheme" + rest "k8s.io/client-go/rest" +) + +type OauthV1alpha1Interface interface { + RESTClient() rest.Interface + OIDCClientSecretRequestsGetter +} + +// OauthV1alpha1Client is used to interact with features provided by the oauth.virtual.supervisor.pinniped.dev group. +type OauthV1alpha1Client struct { + restClient rest.Interface +} + +func (c *OauthV1alpha1Client) OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface { + return newOIDCClientSecretRequests(c, namespace) +} + +// NewForConfig creates a new OauthV1alpha1Client for the given config. +func NewForConfig(c *rest.Config) (*OauthV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &OauthV1alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new OauthV1alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *OauthV1alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new OauthV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *OauthV1alpha1Client { + return &OauthV1alpha1Client{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 *OauthV1alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go b/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go new file mode 100644 index 00000000..160ae6da --- /dev/null +++ b/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go @@ -0,0 +1,54 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + + v1alpha1 "go.pinniped.dev/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1" + scheme "go.pinniped.dev/generated/1.19/client/supervisor/virtual/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + rest "k8s.io/client-go/rest" +) + +// OIDCClientSecretRequestsGetter has a method to return a OIDCClientSecretRequestInterface. +// A group's client should implement this interface. +type OIDCClientSecretRequestsGetter interface { + OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface +} + +// OIDCClientSecretRequestInterface has methods to work with OIDCClientSecretRequest resources. +type OIDCClientSecretRequestInterface interface { + Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (*v1alpha1.OIDCClientSecretRequest, error) + OIDCClientSecretRequestExpansion +} + +// oIDCClientSecretRequests implements OIDCClientSecretRequestInterface +type oIDCClientSecretRequests struct { + client rest.Interface + ns string +} + +// newOIDCClientSecretRequests returns a OIDCClientSecretRequests +func newOIDCClientSecretRequests(c *OauthV1alpha1Client, namespace string) *oIDCClientSecretRequests { + return &oIDCClientSecretRequests{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Create takes the representation of a oIDCClientSecretRequest and creates it. Returns the server's representation of the oIDCClientSecretRequest, and an error, if there is any. +func (c *oIDCClientSecretRequests) Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (result *v1alpha1.OIDCClientSecretRequest, err error) { + result = &v1alpha1.OIDCClientSecretRequest{} + err = c.client.Post(). + Namespace(c.ns). + Resource("oidcclientsecretrequests"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(oIDCClientSecretRequest). + Do(ctx). + Into(result) + return +} diff --git a/generated/1.20/README.adoc b/generated/1.20/README.adoc index 1c559c9e..f58d5ad8 100644 --- a/generated/1.20/README.adoc +++ b/generated/1.20/README.adoc @@ -13,6 +13,8 @@ - xref:{anchor_prefix}-idp-supervisor-pinniped-dev-v1alpha1[$$idp.supervisor.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-login-concierge-pinniped-dev-v1alpha1[$$login.concierge.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-oauth-supervisor-pinniped-dev-v1alpha1[$$oauth.supervisor.pinniped.dev/v1alpha1$$] +- xref:{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-oauth[$$oauth.virtual.supervisor.pinniped.dev/oauth$$] +- xref:{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-v1alpha1[$$oauth.virtual.supervisor.pinniped.dev/v1alpha1$$] [id="{anchor_prefix}-authentication-concierge-pinniped-dev-v1alpha1"] @@ -1386,3 +1388,95 @@ OIDCClientSpec is a struct that describes an OIDC Client. + +[id="{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-oauth"] +=== oauth.virtual.supervisor.pinniped.dev/oauth + +Package oauth is the internal version of the Pinniped virtual oauth API. + + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-virtual-oauth-oidcclientsecretrequestspec"] +==== OIDCClientSecretRequestSpec + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-virtual-oauth-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generateNewSecret`* __boolean__ | +| *`revokeOldSecrets`* __boolean__ | +|=== + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-virtual-oauth-oidcclientsecretrequeststatus"] +==== OIDCClientSecretRequestStatus + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-virtual-oauth-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generatedSecret`* __string__ | +| *`totalClientSecrets`* __integer__ | +|=== + + + +[id="{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-v1alpha1"] +=== oauth.virtual.supervisor.pinniped.dev/v1alpha1 + +Package v1alpha1 is the v1alpha1 version of the Pinniped virtual oauth API. + + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequestspec"] +==== OIDCClientSecretRequestSpec + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generateNewSecret`* __boolean__ | +| *`revokeOldSecrets`* __boolean__ | +|=== + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequeststatus"] +==== OIDCClientSecretRequestStatus + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generatedSecret`* __string__ | +| *`totalClientSecrets`* __integer__ | +|=== + + diff --git a/generated/1.20/apis/supervisor/virtual/oauth/doc.go b/generated/1.20/apis/supervisor/virtual/oauth/doc.go new file mode 100644 index 00000000..ca4e9a63 --- /dev/null +++ b/generated/1.20/apis/supervisor/virtual/oauth/doc.go @@ -0,0 +1,8 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// +k8s:deepcopy-gen=package +// +groupName=oauth.virtual.supervisor.pinniped.dev + +// Package oauth is the internal version of the Pinniped virtual oauth API. +package oauth diff --git a/generated/1.20/apis/supervisor/virtual/oauth/register.go b/generated/1.20/apis/supervisor/virtual/oauth/register.go new file mode 100644 index 00000000..a238d85f --- /dev/null +++ b/generated/1.20/apis/supervisor/virtual/oauth/register.go @@ -0,0 +1,37 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package oauth + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +const GroupName = "oauth.virtual.supervisor.pinniped.dev" + +// SchemeGroupVersion is group version used to register these objects. +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} + +// Kind takes an unqualified kind and returns back a Group qualified GroupKind. +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Resource takes an unqualified resource and returns back a Group qualified GroupResource. +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + AddToScheme = SchemeBuilder.AddToScheme +) + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &OIDCClientSecretRequest{}, + ) + return nil +} diff --git a/generated/1.20/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go b/generated/1.20/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go new file mode 100644 index 00000000..ac54a93c --- /dev/null +++ b/generated/1.20/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go @@ -0,0 +1,25 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package oauth + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +type OIDCClientSecretRequestSpec struct { + GenerateNewSecret bool `json:"generateNewSecret"` + RevokeOldSecrets bool `json:"revokeOldSecrets"` +} + +type OIDCClientSecretRequestStatus struct { + GeneratedSecret string `json:"generatedSecret,omitempty"` + TotalClientSecrets int `json:"totalClientSecrets"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequest struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` // metadata.name must be set to the client ID + + Spec OIDCClientSecretRequestSpec `json:"spec"` + Status OIDCClientSecretRequestStatus `json:"status"` +} diff --git a/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/conversion.go b/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/conversion.go new file mode 100644 index 00000000..fcf4e82f --- /dev/null +++ b/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/conversion.go @@ -0,0 +1,4 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 diff --git a/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/defaults.go b/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/defaults.go new file mode 100644 index 00000000..d4f5a9e8 --- /dev/null +++ b/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/defaults.go @@ -0,0 +1,12 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/runtime" +) + +func addDefaultingFuncs(scheme *runtime.Scheme) error { + return RegisterDefaults(scheme) +} diff --git a/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/doc.go b/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/doc.go new file mode 100644 index 00000000..009dec5a --- /dev/null +++ b/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/doc.go @@ -0,0 +1,11 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen=package +// +k8s:conversion-gen=go.pinniped.dev/generated/1.20/apis/supervisor/virtual/oauth +// +k8s:defaulter-gen=TypeMeta +// +groupName=oauth.virtual.supervisor.pinniped.dev + +// Package v1alpha1 is the v1alpha1 version of the Pinniped virtual oauth API. +package v1alpha1 diff --git a/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/register.go b/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/register.go new file mode 100644 index 00000000..ecc75a08 --- /dev/null +++ b/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/register.go @@ -0,0 +1,42 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +const GroupName = "oauth.virtual.supervisor.pinniped.dev" + +// SchemeGroupVersion is group version used to register these objects. +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} + +var ( + SchemeBuilder runtime.SchemeBuilder + localSchemeBuilder = &SchemeBuilder + AddToScheme = SchemeBuilder.AddToScheme +) + +func init() { + // We only register manually written functions here. The registration of the + // generated functions takes place in the generated files. The separation + // makes the code compile even when the generated files are missing. + localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs) +} + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &OIDCClientSecretRequest{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} + +// Resource takes an unqualified resource and returns back a Group qualified GroupResource. +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} diff --git a/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go b/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go new file mode 100644 index 00000000..dda2f3bb --- /dev/null +++ b/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go @@ -0,0 +1,28 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +type OIDCClientSecretRequestSpec struct { + GenerateNewSecret bool `json:"generateNewSecret"` + RevokeOldSecrets bool `json:"revokeOldSecrets"` +} + +type OIDCClientSecretRequestStatus struct { + GeneratedSecret string `json:"generatedSecret,omitempty"` + TotalClientSecrets int `json:"totalClientSecrets"` +} + +// +genclient +// +genclient:onlyVerbs=create +// +kubebuilder:subresource:status +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequest struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` // metadata.name must be set to the client ID + + Spec OIDCClientSecretRequestSpec `json:"spec"` + Status OIDCClientSecretRequestStatus `json:"status"` +} diff --git a/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go b/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go new file mode 100644 index 00000000..b98d6b36 --- /dev/null +++ b/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go @@ -0,0 +1,131 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + oauth "go.pinniped.dev/generated/1.20/apis/supervisor/virtual/oauth" + 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((*OIDCClientSecretRequest)(nil), (*oauth.OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(a.(*OIDCClientSecretRequest), b.(*oauth.OIDCClientSecretRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequest)(nil), (*OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(a.(*oauth.OIDCClientSecretRequest), b.(*OIDCClientSecretRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestSpec)(nil), (*oauth.OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(a.(*OIDCClientSecretRequestSpec), b.(*oauth.OIDCClientSecretRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequestSpec)(nil), (*OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(a.(*oauth.OIDCClientSecretRequestSpec), b.(*OIDCClientSecretRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestStatus)(nil), (*oauth.OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(a.(*OIDCClientSecretRequestStatus), b.(*oauth.OIDCClientSecretRequestStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequestStatus)(nil), (*OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(a.(*oauth.OIDCClientSecretRequestStatus), b.(*OIDCClientSecretRequestStatus), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *oauth.OIDCClientSecretRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *oauth.OIDCClientSecretRequest, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in, out, s) +} + +func autoConvert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *oauth.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest is an autogenerated conversion function. +func Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *oauth.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { + return autoConvert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in, out, s) +} + +func autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *oauth.OIDCClientSecretRequestSpec, s conversion.Scope) error { + out.GenerateNewSecret = in.GenerateNewSecret + out.RevokeOldSecrets = in.RevokeOldSecrets + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *oauth.OIDCClientSecretRequestSpec, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in, out, s) +} + +func autoConvert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *oauth.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { + out.GenerateNewSecret = in.GenerateNewSecret + out.RevokeOldSecrets = in.RevokeOldSecrets + return nil +} + +// Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec is an autogenerated conversion function. +func Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *oauth.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { + return autoConvert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in, out, s) +} + +func autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *oauth.OIDCClientSecretRequestStatus, s conversion.Scope) error { + out.GeneratedSecret = in.GeneratedSecret + out.TotalClientSecrets = in.TotalClientSecrets + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *oauth.OIDCClientSecretRequestStatus, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in, out, s) +} + +func autoConvert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *oauth.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { + out.GeneratedSecret = in.GeneratedSecret + out.TotalClientSecrets = in.TotalClientSecrets + return nil +} + +// Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus is an autogenerated conversion function. +func Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *oauth.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { + return autoConvert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in, out, s) +} diff --git a/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go b/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 00000000..e4fce842 --- /dev/null +++ b/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,73 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequest) DeepCopyInto(out *OIDCClientSecretRequest) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequest. +func (in *OIDCClientSecretRequest) DeepCopy() *OIDCClientSecretRequest { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestSpec. +func (in *OIDCClientSecretRequestSpec) DeepCopy() *OIDCClientSecretRequestSpec { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestStatus) DeepCopyInto(out *OIDCClientSecretRequestStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestStatus. +func (in *OIDCClientSecretRequestStatus) DeepCopy() *OIDCClientSecretRequestStatus { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestStatus) + in.DeepCopyInto(out) + return out +} diff --git a/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go b/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go new file mode 100644 index 00000000..9097a935 --- /dev/null +++ b/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go @@ -0,0 +1,20 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/generated/1.20/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go b/generated/1.20/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go new file mode 100644 index 00000000..24b58e7b --- /dev/null +++ b/generated/1.20/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go @@ -0,0 +1,73 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package oauth + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequest) DeepCopyInto(out *OIDCClientSecretRequest) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequest. +func (in *OIDCClientSecretRequest) DeepCopy() *OIDCClientSecretRequest { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestSpec. +func (in *OIDCClientSecretRequestSpec) DeepCopy() *OIDCClientSecretRequestSpec { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestStatus) DeepCopyInto(out *OIDCClientSecretRequestStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestStatus. +func (in *OIDCClientSecretRequestStatus) DeepCopy() *OIDCClientSecretRequestStatus { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestStatus) + in.DeepCopyInto(out) + return out +} diff --git a/generated/1.20/client/supervisor/virtual/clientset/versioned/clientset.go b/generated/1.20/client/supervisor/virtual/clientset/versioned/clientset.go new file mode 100644 index 00000000..3bcc6c36 --- /dev/null +++ b/generated/1.20/client/supervisor/virtual/clientset/versioned/clientset.go @@ -0,0 +1,84 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package versioned + +import ( + "fmt" + + oauthv1alpha1 "go.pinniped.dev/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" + discovery "k8s.io/client-go/discovery" + rest "k8s.io/client-go/rest" + flowcontrol "k8s.io/client-go/util/flowcontrol" +) + +type Interface interface { + Discovery() discovery.DiscoveryInterface + OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface +} + +// Clientset contains the clients for groups. Each group has exactly one +// version included in a Clientset. +type Clientset struct { + *discovery.DiscoveryClient + oauthV1alpha1 *oauthv1alpha1.OauthV1alpha1Client +} + +// OauthV1alpha1 retrieves the OauthV1alpha1Client +func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { + return c.oauthV1alpha1 +} + +// Discovery retrieves the DiscoveryClient +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + if c == nil { + return nil + } + return c.DiscoveryClient +} + +// NewForConfig creates a new Clientset for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewForConfig will generate a rate-limiter in configShallowCopy. +func NewForConfig(c *rest.Config) (*Clientset, error) { + configShallowCopy := *c + if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { + if configShallowCopy.Burst <= 0 { + return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + } + configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) + } + var cs Clientset + var err error + cs.oauthV1alpha1, err = oauthv1alpha1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + + cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + return &cs, nil +} + +// NewForConfigOrDie creates a new Clientset for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *Clientset { + var cs Clientset + cs.oauthV1alpha1 = oauthv1alpha1.NewForConfigOrDie(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) + return &cs +} + +// New creates a new Clientset for the given RESTClient. +func New(c rest.Interface) *Clientset { + var cs Clientset + cs.oauthV1alpha1 = oauthv1alpha1.New(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClient(c) + return &cs +} diff --git a/generated/1.20/client/supervisor/virtual/clientset/versioned/doc.go b/generated/1.20/client/supervisor/virtual/clientset/versioned/doc.go new file mode 100644 index 00000000..5dc02e6e --- /dev/null +++ b/generated/1.20/client/supervisor/virtual/clientset/versioned/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated clientset. +package versioned diff --git a/generated/1.20/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go b/generated/1.20/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go new file mode 100644 index 00000000..4bf17f6c --- /dev/null +++ b/generated/1.20/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go @@ -0,0 +1,69 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + clientset "go.pinniped.dev/generated/1.20/client/supervisor/virtual/clientset/versioned" + oauthv1alpha1 "go.pinniped.dev/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" + fakeoauthv1alpha1 "go.pinniped.dev/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/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" +) + +// NewSimpleClientset returns a clientset that will respond with the provided objects. +// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, +// without applying any validations and/or defaults. It shouldn't be considered a replacement +// for a real clientset and is mostly useful in simple unit tests. +func NewSimpleClientset(objects ...runtime.Object) *Clientset { + o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) + for _, obj := range objects { + if err := o.Add(obj); err != nil { + panic(err) + } + } + + cs := &Clientset{tracker: o} + cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} + cs.AddReactor("*", "*", testing.ObjectReaction(o)) + cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { + gvr := action.GetResource() + ns := action.GetNamespace() + watch, err := o.Watch(gvr, ns) + if err != nil { + return false, nil, err + } + return true, watch, nil + }) + + return cs +} + +// Clientset implements clientset.Interface. Meant to be embedded into a +// struct to get a default implementation. This makes faking out just the method +// you want to test easier. +type Clientset struct { + testing.Fake + discovery *fakediscovery.FakeDiscovery + tracker testing.ObjectTracker +} + +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + return c.discovery +} + +func (c *Clientset) Tracker() testing.ObjectTracker { + return c.tracker +} + +var _ clientset.Interface = &Clientset{} + +// OauthV1alpha1 retrieves the OauthV1alpha1Client +func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { + return &fakeoauthv1alpha1.FakeOauthV1alpha1{Fake: &c.Fake} +} diff --git a/generated/1.20/client/supervisor/virtual/clientset/versioned/fake/doc.go b/generated/1.20/client/supervisor/virtual/clientset/versioned/fake/doc.go new file mode 100644 index 00000000..7c9538fd --- /dev/null +++ b/generated/1.20/client/supervisor/virtual/clientset/versioned/fake/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated fake clientset. +package fake diff --git a/generated/1.20/client/supervisor/virtual/clientset/versioned/fake/register.go b/generated/1.20/client/supervisor/virtual/clientset/versioned/fake/register.go new file mode 100644 index 00000000..089583bd --- /dev/null +++ b/generated/1.20/client/supervisor/virtual/clientset/versioned/fake/register.go @@ -0,0 +1,43 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + oauthv1alpha1 "go.pinniped.dev/generated/1.20/apis/supervisor/virtual/oauth/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" +) + +var scheme = runtime.NewScheme() +var codecs = serializer.NewCodecFactory(scheme) + +var localSchemeBuilder = runtime.SchemeBuilder{ + oauthv1alpha1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(scheme)) +} diff --git a/generated/1.20/client/supervisor/virtual/clientset/versioned/scheme/doc.go b/generated/1.20/client/supervisor/virtual/clientset/versioned/scheme/doc.go new file mode 100644 index 00000000..cc02f1d3 --- /dev/null +++ b/generated/1.20/client/supervisor/virtual/clientset/versioned/scheme/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// This package contains the scheme of the automatically generated clientset. +package scheme diff --git a/generated/1.20/client/supervisor/virtual/clientset/versioned/scheme/register.go b/generated/1.20/client/supervisor/virtual/clientset/versioned/scheme/register.go new file mode 100644 index 00000000..913e9c9a --- /dev/null +++ b/generated/1.20/client/supervisor/virtual/clientset/versioned/scheme/register.go @@ -0,0 +1,43 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package scheme + +import ( + oauthv1alpha1 "go.pinniped.dev/generated/1.20/apis/supervisor/virtual/oauth/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" +) + +var Scheme = runtime.NewScheme() +var Codecs = serializer.NewCodecFactory(Scheme) +var ParameterCodec = runtime.NewParameterCodec(Scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + oauthv1alpha1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(Scheme)) +} diff --git a/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go b/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go new file mode 100644 index 00000000..e7a470b6 --- /dev/null +++ b/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1alpha1 diff --git a/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go b/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go new file mode 100644 index 00000000..7906901b --- /dev/null +++ b/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go b/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go new file mode 100644 index 00000000..d6e9ee9a --- /dev/null +++ b/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go @@ -0,0 +1,27 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1alpha1 "go.pinniped.dev/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeOauthV1alpha1 struct { + *testing.Fake +} + +func (c *FakeOauthV1alpha1) OIDCClientSecretRequests(namespace string) v1alpha1.OIDCClientSecretRequestInterface { + return &FakeOIDCClientSecretRequests{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeOauthV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go b/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go new file mode 100644 index 00000000..6c7a7829 --- /dev/null +++ b/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go @@ -0,0 +1,36 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "go.pinniped.dev/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + schema "k8s.io/apimachinery/pkg/runtime/schema" + testing "k8s.io/client-go/testing" +) + +// FakeOIDCClientSecretRequests implements OIDCClientSecretRequestInterface +type FakeOIDCClientSecretRequests struct { + Fake *FakeOauthV1alpha1 + ns string +} + +var oidcclientsecretrequestsResource = schema.GroupVersionResource{Group: "oauth.virtual.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclientsecretrequests"} + +var oidcclientsecretrequestsKind = schema.GroupVersionKind{Group: "oauth.virtual.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClientSecretRequest"} + +// Create takes the representation of a oIDCClientSecretRequest and creates it. Returns the server's representation of the oIDCClientSecretRequest, and an error, if there is any. +func (c *FakeOIDCClientSecretRequests) Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (result *v1alpha1.OIDCClientSecretRequest, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(oidcclientsecretrequestsResource, c.ns, oIDCClientSecretRequest), &v1alpha1.OIDCClientSecretRequest{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.OIDCClientSecretRequest), err +} diff --git a/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go b/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go new file mode 100644 index 00000000..427a2ad8 --- /dev/null +++ b/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go @@ -0,0 +1,8 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +type OIDCClientSecretRequestExpansion interface{} diff --git a/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go b/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go new file mode 100644 index 00000000..8141d975 --- /dev/null +++ b/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go @@ -0,0 +1,76 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "go.pinniped.dev/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1" + "go.pinniped.dev/generated/1.20/client/supervisor/virtual/clientset/versioned/scheme" + rest "k8s.io/client-go/rest" +) + +type OauthV1alpha1Interface interface { + RESTClient() rest.Interface + OIDCClientSecretRequestsGetter +} + +// OauthV1alpha1Client is used to interact with features provided by the oauth.virtual.supervisor.pinniped.dev group. +type OauthV1alpha1Client struct { + restClient rest.Interface +} + +func (c *OauthV1alpha1Client) OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface { + return newOIDCClientSecretRequests(c, namespace) +} + +// NewForConfig creates a new OauthV1alpha1Client for the given config. +func NewForConfig(c *rest.Config) (*OauthV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &OauthV1alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new OauthV1alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *OauthV1alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new OauthV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *OauthV1alpha1Client { + return &OauthV1alpha1Client{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 *OauthV1alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go b/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go new file mode 100644 index 00000000..c9e5804d --- /dev/null +++ b/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go @@ -0,0 +1,54 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + + v1alpha1 "go.pinniped.dev/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1" + scheme "go.pinniped.dev/generated/1.20/client/supervisor/virtual/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + rest "k8s.io/client-go/rest" +) + +// OIDCClientSecretRequestsGetter has a method to return a OIDCClientSecretRequestInterface. +// A group's client should implement this interface. +type OIDCClientSecretRequestsGetter interface { + OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface +} + +// OIDCClientSecretRequestInterface has methods to work with OIDCClientSecretRequest resources. +type OIDCClientSecretRequestInterface interface { + Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (*v1alpha1.OIDCClientSecretRequest, error) + OIDCClientSecretRequestExpansion +} + +// oIDCClientSecretRequests implements OIDCClientSecretRequestInterface +type oIDCClientSecretRequests struct { + client rest.Interface + ns string +} + +// newOIDCClientSecretRequests returns a OIDCClientSecretRequests +func newOIDCClientSecretRequests(c *OauthV1alpha1Client, namespace string) *oIDCClientSecretRequests { + return &oIDCClientSecretRequests{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Create takes the representation of a oIDCClientSecretRequest and creates it. Returns the server's representation of the oIDCClientSecretRequest, and an error, if there is any. +func (c *oIDCClientSecretRequests) Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (result *v1alpha1.OIDCClientSecretRequest, err error) { + result = &v1alpha1.OIDCClientSecretRequest{} + err = c.client.Post(). + Namespace(c.ns). + Resource("oidcclientsecretrequests"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(oIDCClientSecretRequest). + Do(ctx). + Into(result) + return +} diff --git a/generated/1.21/README.adoc b/generated/1.21/README.adoc index 2a9ca757..e83a59ea 100644 --- a/generated/1.21/README.adoc +++ b/generated/1.21/README.adoc @@ -13,6 +13,8 @@ - xref:{anchor_prefix}-idp-supervisor-pinniped-dev-v1alpha1[$$idp.supervisor.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-login-concierge-pinniped-dev-v1alpha1[$$login.concierge.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-oauth-supervisor-pinniped-dev-v1alpha1[$$oauth.supervisor.pinniped.dev/v1alpha1$$] +- xref:{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-oauth[$$oauth.virtual.supervisor.pinniped.dev/oauth$$] +- xref:{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-v1alpha1[$$oauth.virtual.supervisor.pinniped.dev/v1alpha1$$] [id="{anchor_prefix}-authentication-concierge-pinniped-dev-v1alpha1"] @@ -1386,3 +1388,95 @@ OIDCClientSpec is a struct that describes an OIDC Client. + +[id="{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-oauth"] +=== oauth.virtual.supervisor.pinniped.dev/oauth + +Package oauth is the internal version of the Pinniped virtual oauth API. + + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-virtual-oauth-oidcclientsecretrequestspec"] +==== OIDCClientSecretRequestSpec + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-virtual-oauth-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generateNewSecret`* __boolean__ | +| *`revokeOldSecrets`* __boolean__ | +|=== + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-virtual-oauth-oidcclientsecretrequeststatus"] +==== OIDCClientSecretRequestStatus + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-virtual-oauth-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generatedSecret`* __string__ | +| *`totalClientSecrets`* __integer__ | +|=== + + + +[id="{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-v1alpha1"] +=== oauth.virtual.supervisor.pinniped.dev/v1alpha1 + +Package v1alpha1 is the v1alpha1 version of the Pinniped virtual oauth API. + + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequestspec"] +==== OIDCClientSecretRequestSpec + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generateNewSecret`* __boolean__ | +| *`revokeOldSecrets`* __boolean__ | +|=== + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequeststatus"] +==== OIDCClientSecretRequestStatus + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generatedSecret`* __string__ | +| *`totalClientSecrets`* __integer__ | +|=== + + diff --git a/generated/1.21/apis/supervisor/virtual/oauth/doc.go b/generated/1.21/apis/supervisor/virtual/oauth/doc.go new file mode 100644 index 00000000..ca4e9a63 --- /dev/null +++ b/generated/1.21/apis/supervisor/virtual/oauth/doc.go @@ -0,0 +1,8 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// +k8s:deepcopy-gen=package +// +groupName=oauth.virtual.supervisor.pinniped.dev + +// Package oauth is the internal version of the Pinniped virtual oauth API. +package oauth diff --git a/generated/1.21/apis/supervisor/virtual/oauth/register.go b/generated/1.21/apis/supervisor/virtual/oauth/register.go new file mode 100644 index 00000000..a238d85f --- /dev/null +++ b/generated/1.21/apis/supervisor/virtual/oauth/register.go @@ -0,0 +1,37 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package oauth + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +const GroupName = "oauth.virtual.supervisor.pinniped.dev" + +// SchemeGroupVersion is group version used to register these objects. +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} + +// Kind takes an unqualified kind and returns back a Group qualified GroupKind. +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Resource takes an unqualified resource and returns back a Group qualified GroupResource. +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + AddToScheme = SchemeBuilder.AddToScheme +) + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &OIDCClientSecretRequest{}, + ) + return nil +} diff --git a/generated/1.21/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go b/generated/1.21/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go new file mode 100644 index 00000000..ac54a93c --- /dev/null +++ b/generated/1.21/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go @@ -0,0 +1,25 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package oauth + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +type OIDCClientSecretRequestSpec struct { + GenerateNewSecret bool `json:"generateNewSecret"` + RevokeOldSecrets bool `json:"revokeOldSecrets"` +} + +type OIDCClientSecretRequestStatus struct { + GeneratedSecret string `json:"generatedSecret,omitempty"` + TotalClientSecrets int `json:"totalClientSecrets"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequest struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` // metadata.name must be set to the client ID + + Spec OIDCClientSecretRequestSpec `json:"spec"` + Status OIDCClientSecretRequestStatus `json:"status"` +} diff --git a/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/conversion.go b/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/conversion.go new file mode 100644 index 00000000..fcf4e82f --- /dev/null +++ b/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/conversion.go @@ -0,0 +1,4 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 diff --git a/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/defaults.go b/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/defaults.go new file mode 100644 index 00000000..d4f5a9e8 --- /dev/null +++ b/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/defaults.go @@ -0,0 +1,12 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/runtime" +) + +func addDefaultingFuncs(scheme *runtime.Scheme) error { + return RegisterDefaults(scheme) +} diff --git a/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/doc.go b/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/doc.go new file mode 100644 index 00000000..b3cb2440 --- /dev/null +++ b/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/doc.go @@ -0,0 +1,11 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen=package +// +k8s:conversion-gen=go.pinniped.dev/generated/1.21/apis/supervisor/virtual/oauth +// +k8s:defaulter-gen=TypeMeta +// +groupName=oauth.virtual.supervisor.pinniped.dev + +// Package v1alpha1 is the v1alpha1 version of the Pinniped virtual oauth API. +package v1alpha1 diff --git a/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/register.go b/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/register.go new file mode 100644 index 00000000..ecc75a08 --- /dev/null +++ b/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/register.go @@ -0,0 +1,42 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +const GroupName = "oauth.virtual.supervisor.pinniped.dev" + +// SchemeGroupVersion is group version used to register these objects. +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} + +var ( + SchemeBuilder runtime.SchemeBuilder + localSchemeBuilder = &SchemeBuilder + AddToScheme = SchemeBuilder.AddToScheme +) + +func init() { + // We only register manually written functions here. The registration of the + // generated functions takes place in the generated files. The separation + // makes the code compile even when the generated files are missing. + localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs) +} + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &OIDCClientSecretRequest{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} + +// Resource takes an unqualified resource and returns back a Group qualified GroupResource. +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} diff --git a/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go b/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go new file mode 100644 index 00000000..dda2f3bb --- /dev/null +++ b/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go @@ -0,0 +1,28 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +type OIDCClientSecretRequestSpec struct { + GenerateNewSecret bool `json:"generateNewSecret"` + RevokeOldSecrets bool `json:"revokeOldSecrets"` +} + +type OIDCClientSecretRequestStatus struct { + GeneratedSecret string `json:"generatedSecret,omitempty"` + TotalClientSecrets int `json:"totalClientSecrets"` +} + +// +genclient +// +genclient:onlyVerbs=create +// +kubebuilder:subresource:status +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequest struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` // metadata.name must be set to the client ID + + Spec OIDCClientSecretRequestSpec `json:"spec"` + Status OIDCClientSecretRequestStatus `json:"status"` +} diff --git a/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go b/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go new file mode 100644 index 00000000..384717d0 --- /dev/null +++ b/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go @@ -0,0 +1,131 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + oauth "go.pinniped.dev/generated/1.21/apis/supervisor/virtual/oauth" + 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((*OIDCClientSecretRequest)(nil), (*oauth.OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(a.(*OIDCClientSecretRequest), b.(*oauth.OIDCClientSecretRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequest)(nil), (*OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(a.(*oauth.OIDCClientSecretRequest), b.(*OIDCClientSecretRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestSpec)(nil), (*oauth.OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(a.(*OIDCClientSecretRequestSpec), b.(*oauth.OIDCClientSecretRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequestSpec)(nil), (*OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(a.(*oauth.OIDCClientSecretRequestSpec), b.(*OIDCClientSecretRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestStatus)(nil), (*oauth.OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(a.(*OIDCClientSecretRequestStatus), b.(*oauth.OIDCClientSecretRequestStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequestStatus)(nil), (*OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(a.(*oauth.OIDCClientSecretRequestStatus), b.(*OIDCClientSecretRequestStatus), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *oauth.OIDCClientSecretRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *oauth.OIDCClientSecretRequest, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in, out, s) +} + +func autoConvert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *oauth.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest is an autogenerated conversion function. +func Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *oauth.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { + return autoConvert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in, out, s) +} + +func autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *oauth.OIDCClientSecretRequestSpec, s conversion.Scope) error { + out.GenerateNewSecret = in.GenerateNewSecret + out.RevokeOldSecrets = in.RevokeOldSecrets + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *oauth.OIDCClientSecretRequestSpec, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in, out, s) +} + +func autoConvert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *oauth.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { + out.GenerateNewSecret = in.GenerateNewSecret + out.RevokeOldSecrets = in.RevokeOldSecrets + return nil +} + +// Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec is an autogenerated conversion function. +func Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *oauth.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { + return autoConvert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in, out, s) +} + +func autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *oauth.OIDCClientSecretRequestStatus, s conversion.Scope) error { + out.GeneratedSecret = in.GeneratedSecret + out.TotalClientSecrets = in.TotalClientSecrets + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *oauth.OIDCClientSecretRequestStatus, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in, out, s) +} + +func autoConvert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *oauth.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { + out.GeneratedSecret = in.GeneratedSecret + out.TotalClientSecrets = in.TotalClientSecrets + return nil +} + +// Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus is an autogenerated conversion function. +func Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *oauth.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { + return autoConvert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in, out, s) +} diff --git a/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go b/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 00000000..e4fce842 --- /dev/null +++ b/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,73 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequest) DeepCopyInto(out *OIDCClientSecretRequest) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequest. +func (in *OIDCClientSecretRequest) DeepCopy() *OIDCClientSecretRequest { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestSpec. +func (in *OIDCClientSecretRequestSpec) DeepCopy() *OIDCClientSecretRequestSpec { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestStatus) DeepCopyInto(out *OIDCClientSecretRequestStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestStatus. +func (in *OIDCClientSecretRequestStatus) DeepCopy() *OIDCClientSecretRequestStatus { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestStatus) + in.DeepCopyInto(out) + return out +} diff --git a/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go b/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go new file mode 100644 index 00000000..9097a935 --- /dev/null +++ b/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go @@ -0,0 +1,20 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/generated/1.21/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go b/generated/1.21/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go new file mode 100644 index 00000000..24b58e7b --- /dev/null +++ b/generated/1.21/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go @@ -0,0 +1,73 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package oauth + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequest) DeepCopyInto(out *OIDCClientSecretRequest) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequest. +func (in *OIDCClientSecretRequest) DeepCopy() *OIDCClientSecretRequest { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestSpec. +func (in *OIDCClientSecretRequestSpec) DeepCopy() *OIDCClientSecretRequestSpec { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestStatus) DeepCopyInto(out *OIDCClientSecretRequestStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestStatus. +func (in *OIDCClientSecretRequestStatus) DeepCopy() *OIDCClientSecretRequestStatus { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestStatus) + in.DeepCopyInto(out) + return out +} diff --git a/generated/1.21/client/supervisor/virtual/clientset/versioned/clientset.go b/generated/1.21/client/supervisor/virtual/clientset/versioned/clientset.go new file mode 100644 index 00000000..93a539cc --- /dev/null +++ b/generated/1.21/client/supervisor/virtual/clientset/versioned/clientset.go @@ -0,0 +1,84 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package versioned + +import ( + "fmt" + + oauthv1alpha1 "go.pinniped.dev/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" + discovery "k8s.io/client-go/discovery" + rest "k8s.io/client-go/rest" + flowcontrol "k8s.io/client-go/util/flowcontrol" +) + +type Interface interface { + Discovery() discovery.DiscoveryInterface + OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface +} + +// Clientset contains the clients for groups. Each group has exactly one +// version included in a Clientset. +type Clientset struct { + *discovery.DiscoveryClient + oauthV1alpha1 *oauthv1alpha1.OauthV1alpha1Client +} + +// OauthV1alpha1 retrieves the OauthV1alpha1Client +func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { + return c.oauthV1alpha1 +} + +// Discovery retrieves the DiscoveryClient +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + if c == nil { + return nil + } + return c.DiscoveryClient +} + +// NewForConfig creates a new Clientset for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewForConfig will generate a rate-limiter in configShallowCopy. +func NewForConfig(c *rest.Config) (*Clientset, error) { + configShallowCopy := *c + if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { + if configShallowCopy.Burst <= 0 { + return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + } + configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) + } + var cs Clientset + var err error + cs.oauthV1alpha1, err = oauthv1alpha1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + + cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + return &cs, nil +} + +// NewForConfigOrDie creates a new Clientset for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *Clientset { + var cs Clientset + cs.oauthV1alpha1 = oauthv1alpha1.NewForConfigOrDie(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) + return &cs +} + +// New creates a new Clientset for the given RESTClient. +func New(c rest.Interface) *Clientset { + var cs Clientset + cs.oauthV1alpha1 = oauthv1alpha1.New(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClient(c) + return &cs +} diff --git a/generated/1.21/client/supervisor/virtual/clientset/versioned/doc.go b/generated/1.21/client/supervisor/virtual/clientset/versioned/doc.go new file mode 100644 index 00000000..5dc02e6e --- /dev/null +++ b/generated/1.21/client/supervisor/virtual/clientset/versioned/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated clientset. +package versioned diff --git a/generated/1.21/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go b/generated/1.21/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go new file mode 100644 index 00000000..fcf86e29 --- /dev/null +++ b/generated/1.21/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go @@ -0,0 +1,69 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + clientset "go.pinniped.dev/generated/1.21/client/supervisor/virtual/clientset/versioned" + oauthv1alpha1 "go.pinniped.dev/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" + fakeoauthv1alpha1 "go.pinniped.dev/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/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" +) + +// NewSimpleClientset returns a clientset that will respond with the provided objects. +// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, +// without applying any validations and/or defaults. It shouldn't be considered a replacement +// for a real clientset and is mostly useful in simple unit tests. +func NewSimpleClientset(objects ...runtime.Object) *Clientset { + o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) + for _, obj := range objects { + if err := o.Add(obj); err != nil { + panic(err) + } + } + + cs := &Clientset{tracker: o} + cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} + cs.AddReactor("*", "*", testing.ObjectReaction(o)) + cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { + gvr := action.GetResource() + ns := action.GetNamespace() + watch, err := o.Watch(gvr, ns) + if err != nil { + return false, nil, err + } + return true, watch, nil + }) + + return cs +} + +// Clientset implements clientset.Interface. Meant to be embedded into a +// struct to get a default implementation. This makes faking out just the method +// you want to test easier. +type Clientset struct { + testing.Fake + discovery *fakediscovery.FakeDiscovery + tracker testing.ObjectTracker +} + +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + return c.discovery +} + +func (c *Clientset) Tracker() testing.ObjectTracker { + return c.tracker +} + +var _ clientset.Interface = &Clientset{} + +// OauthV1alpha1 retrieves the OauthV1alpha1Client +func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { + return &fakeoauthv1alpha1.FakeOauthV1alpha1{Fake: &c.Fake} +} diff --git a/generated/1.21/client/supervisor/virtual/clientset/versioned/fake/doc.go b/generated/1.21/client/supervisor/virtual/clientset/versioned/fake/doc.go new file mode 100644 index 00000000..7c9538fd --- /dev/null +++ b/generated/1.21/client/supervisor/virtual/clientset/versioned/fake/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated fake clientset. +package fake diff --git a/generated/1.21/client/supervisor/virtual/clientset/versioned/fake/register.go b/generated/1.21/client/supervisor/virtual/clientset/versioned/fake/register.go new file mode 100644 index 00000000..c7b66d2c --- /dev/null +++ b/generated/1.21/client/supervisor/virtual/clientset/versioned/fake/register.go @@ -0,0 +1,43 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + oauthv1alpha1 "go.pinniped.dev/generated/1.21/apis/supervisor/virtual/oauth/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" +) + +var scheme = runtime.NewScheme() +var codecs = serializer.NewCodecFactory(scheme) + +var localSchemeBuilder = runtime.SchemeBuilder{ + oauthv1alpha1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(scheme)) +} diff --git a/generated/1.21/client/supervisor/virtual/clientset/versioned/scheme/doc.go b/generated/1.21/client/supervisor/virtual/clientset/versioned/scheme/doc.go new file mode 100644 index 00000000..cc02f1d3 --- /dev/null +++ b/generated/1.21/client/supervisor/virtual/clientset/versioned/scheme/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// This package contains the scheme of the automatically generated clientset. +package scheme diff --git a/generated/1.21/client/supervisor/virtual/clientset/versioned/scheme/register.go b/generated/1.21/client/supervisor/virtual/clientset/versioned/scheme/register.go new file mode 100644 index 00000000..3afd089b --- /dev/null +++ b/generated/1.21/client/supervisor/virtual/clientset/versioned/scheme/register.go @@ -0,0 +1,43 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package scheme + +import ( + oauthv1alpha1 "go.pinniped.dev/generated/1.21/apis/supervisor/virtual/oauth/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" +) + +var Scheme = runtime.NewScheme() +var Codecs = serializer.NewCodecFactory(Scheme) +var ParameterCodec = runtime.NewParameterCodec(Scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + oauthv1alpha1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(Scheme)) +} diff --git a/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go b/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go new file mode 100644 index 00000000..e7a470b6 --- /dev/null +++ b/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1alpha1 diff --git a/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go b/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go new file mode 100644 index 00000000..7906901b --- /dev/null +++ b/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go b/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go new file mode 100644 index 00000000..341e6495 --- /dev/null +++ b/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go @@ -0,0 +1,27 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1alpha1 "go.pinniped.dev/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeOauthV1alpha1 struct { + *testing.Fake +} + +func (c *FakeOauthV1alpha1) OIDCClientSecretRequests(namespace string) v1alpha1.OIDCClientSecretRequestInterface { + return &FakeOIDCClientSecretRequests{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeOauthV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go b/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go new file mode 100644 index 00000000..28997757 --- /dev/null +++ b/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go @@ -0,0 +1,36 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "go.pinniped.dev/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + schema "k8s.io/apimachinery/pkg/runtime/schema" + testing "k8s.io/client-go/testing" +) + +// FakeOIDCClientSecretRequests implements OIDCClientSecretRequestInterface +type FakeOIDCClientSecretRequests struct { + Fake *FakeOauthV1alpha1 + ns string +} + +var oidcclientsecretrequestsResource = schema.GroupVersionResource{Group: "oauth.virtual.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclientsecretrequests"} + +var oidcclientsecretrequestsKind = schema.GroupVersionKind{Group: "oauth.virtual.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClientSecretRequest"} + +// Create takes the representation of a oIDCClientSecretRequest and creates it. Returns the server's representation of the oIDCClientSecretRequest, and an error, if there is any. +func (c *FakeOIDCClientSecretRequests) Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (result *v1alpha1.OIDCClientSecretRequest, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(oidcclientsecretrequestsResource, c.ns, oIDCClientSecretRequest), &v1alpha1.OIDCClientSecretRequest{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.OIDCClientSecretRequest), err +} diff --git a/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go b/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go new file mode 100644 index 00000000..427a2ad8 --- /dev/null +++ b/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go @@ -0,0 +1,8 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +type OIDCClientSecretRequestExpansion interface{} diff --git a/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go b/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go new file mode 100644 index 00000000..8d4fc39d --- /dev/null +++ b/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go @@ -0,0 +1,76 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "go.pinniped.dev/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1" + "go.pinniped.dev/generated/1.21/client/supervisor/virtual/clientset/versioned/scheme" + rest "k8s.io/client-go/rest" +) + +type OauthV1alpha1Interface interface { + RESTClient() rest.Interface + OIDCClientSecretRequestsGetter +} + +// OauthV1alpha1Client is used to interact with features provided by the oauth.virtual.supervisor.pinniped.dev group. +type OauthV1alpha1Client struct { + restClient rest.Interface +} + +func (c *OauthV1alpha1Client) OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface { + return newOIDCClientSecretRequests(c, namespace) +} + +// NewForConfig creates a new OauthV1alpha1Client for the given config. +func NewForConfig(c *rest.Config) (*OauthV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &OauthV1alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new OauthV1alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *OauthV1alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new OauthV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *OauthV1alpha1Client { + return &OauthV1alpha1Client{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 *OauthV1alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go b/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go new file mode 100644 index 00000000..3b8b2f84 --- /dev/null +++ b/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go @@ -0,0 +1,54 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + + v1alpha1 "go.pinniped.dev/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1" + scheme "go.pinniped.dev/generated/1.21/client/supervisor/virtual/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + rest "k8s.io/client-go/rest" +) + +// OIDCClientSecretRequestsGetter has a method to return a OIDCClientSecretRequestInterface. +// A group's client should implement this interface. +type OIDCClientSecretRequestsGetter interface { + OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface +} + +// OIDCClientSecretRequestInterface has methods to work with OIDCClientSecretRequest resources. +type OIDCClientSecretRequestInterface interface { + Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (*v1alpha1.OIDCClientSecretRequest, error) + OIDCClientSecretRequestExpansion +} + +// oIDCClientSecretRequests implements OIDCClientSecretRequestInterface +type oIDCClientSecretRequests struct { + client rest.Interface + ns string +} + +// newOIDCClientSecretRequests returns a OIDCClientSecretRequests +func newOIDCClientSecretRequests(c *OauthV1alpha1Client, namespace string) *oIDCClientSecretRequests { + return &oIDCClientSecretRequests{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Create takes the representation of a oIDCClientSecretRequest and creates it. Returns the server's representation of the oIDCClientSecretRequest, and an error, if there is any. +func (c *oIDCClientSecretRequests) Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (result *v1alpha1.OIDCClientSecretRequest, err error) { + result = &v1alpha1.OIDCClientSecretRequest{} + err = c.client.Post(). + Namespace(c.ns). + Resource("oidcclientsecretrequests"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(oIDCClientSecretRequest). + Do(ctx). + Into(result) + return +} diff --git a/generated/1.22/README.adoc b/generated/1.22/README.adoc index 78e1cd46..55db1f5b 100644 --- a/generated/1.22/README.adoc +++ b/generated/1.22/README.adoc @@ -13,6 +13,8 @@ - xref:{anchor_prefix}-idp-supervisor-pinniped-dev-v1alpha1[$$idp.supervisor.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-login-concierge-pinniped-dev-v1alpha1[$$login.concierge.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-oauth-supervisor-pinniped-dev-v1alpha1[$$oauth.supervisor.pinniped.dev/v1alpha1$$] +- xref:{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-oauth[$$oauth.virtual.supervisor.pinniped.dev/oauth$$] +- xref:{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-v1alpha1[$$oauth.virtual.supervisor.pinniped.dev/v1alpha1$$] [id="{anchor_prefix}-authentication-concierge-pinniped-dev-v1alpha1"] @@ -1386,3 +1388,95 @@ OIDCClientSpec is a struct that describes an OIDC Client. + +[id="{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-oauth"] +=== oauth.virtual.supervisor.pinniped.dev/oauth + +Package oauth is the internal version of the Pinniped virtual oauth API. + + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-virtual-oauth-oidcclientsecretrequestspec"] +==== OIDCClientSecretRequestSpec + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-virtual-oauth-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generateNewSecret`* __boolean__ | +| *`revokeOldSecrets`* __boolean__ | +|=== + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-virtual-oauth-oidcclientsecretrequeststatus"] +==== OIDCClientSecretRequestStatus + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-virtual-oauth-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generatedSecret`* __string__ | +| *`totalClientSecrets`* __integer__ | +|=== + + + +[id="{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-v1alpha1"] +=== oauth.virtual.supervisor.pinniped.dev/v1alpha1 + +Package v1alpha1 is the v1alpha1 version of the Pinniped virtual oauth API. + + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequestspec"] +==== OIDCClientSecretRequestSpec + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generateNewSecret`* __boolean__ | +| *`revokeOldSecrets`* __boolean__ | +|=== + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequeststatus"] +==== OIDCClientSecretRequestStatus + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generatedSecret`* __string__ | +| *`totalClientSecrets`* __integer__ | +|=== + + diff --git a/generated/1.22/apis/supervisor/virtual/oauth/doc.go b/generated/1.22/apis/supervisor/virtual/oauth/doc.go new file mode 100644 index 00000000..ca4e9a63 --- /dev/null +++ b/generated/1.22/apis/supervisor/virtual/oauth/doc.go @@ -0,0 +1,8 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// +k8s:deepcopy-gen=package +// +groupName=oauth.virtual.supervisor.pinniped.dev + +// Package oauth is the internal version of the Pinniped virtual oauth API. +package oauth diff --git a/generated/1.22/apis/supervisor/virtual/oauth/register.go b/generated/1.22/apis/supervisor/virtual/oauth/register.go new file mode 100644 index 00000000..a238d85f --- /dev/null +++ b/generated/1.22/apis/supervisor/virtual/oauth/register.go @@ -0,0 +1,37 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package oauth + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +const GroupName = "oauth.virtual.supervisor.pinniped.dev" + +// SchemeGroupVersion is group version used to register these objects. +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} + +// Kind takes an unqualified kind and returns back a Group qualified GroupKind. +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Resource takes an unqualified resource and returns back a Group qualified GroupResource. +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + AddToScheme = SchemeBuilder.AddToScheme +) + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &OIDCClientSecretRequest{}, + ) + return nil +} diff --git a/generated/1.22/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go b/generated/1.22/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go new file mode 100644 index 00000000..ac54a93c --- /dev/null +++ b/generated/1.22/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go @@ -0,0 +1,25 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package oauth + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +type OIDCClientSecretRequestSpec struct { + GenerateNewSecret bool `json:"generateNewSecret"` + RevokeOldSecrets bool `json:"revokeOldSecrets"` +} + +type OIDCClientSecretRequestStatus struct { + GeneratedSecret string `json:"generatedSecret,omitempty"` + TotalClientSecrets int `json:"totalClientSecrets"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequest struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` // metadata.name must be set to the client ID + + Spec OIDCClientSecretRequestSpec `json:"spec"` + Status OIDCClientSecretRequestStatus `json:"status"` +} diff --git a/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/conversion.go b/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/conversion.go new file mode 100644 index 00000000..fcf4e82f --- /dev/null +++ b/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/conversion.go @@ -0,0 +1,4 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 diff --git a/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/defaults.go b/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/defaults.go new file mode 100644 index 00000000..d4f5a9e8 --- /dev/null +++ b/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/defaults.go @@ -0,0 +1,12 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/runtime" +) + +func addDefaultingFuncs(scheme *runtime.Scheme) error { + return RegisterDefaults(scheme) +} diff --git a/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/doc.go b/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/doc.go new file mode 100644 index 00000000..2529f68c --- /dev/null +++ b/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/doc.go @@ -0,0 +1,11 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen=package +// +k8s:conversion-gen=go.pinniped.dev/generated/1.22/apis/supervisor/virtual/oauth +// +k8s:defaulter-gen=TypeMeta +// +groupName=oauth.virtual.supervisor.pinniped.dev + +// Package v1alpha1 is the v1alpha1 version of the Pinniped virtual oauth API. +package v1alpha1 diff --git a/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/register.go b/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/register.go new file mode 100644 index 00000000..ecc75a08 --- /dev/null +++ b/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/register.go @@ -0,0 +1,42 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +const GroupName = "oauth.virtual.supervisor.pinniped.dev" + +// SchemeGroupVersion is group version used to register these objects. +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} + +var ( + SchemeBuilder runtime.SchemeBuilder + localSchemeBuilder = &SchemeBuilder + AddToScheme = SchemeBuilder.AddToScheme +) + +func init() { + // We only register manually written functions here. The registration of the + // generated functions takes place in the generated files. The separation + // makes the code compile even when the generated files are missing. + localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs) +} + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &OIDCClientSecretRequest{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} + +// Resource takes an unqualified resource and returns back a Group qualified GroupResource. +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} diff --git a/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go b/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go new file mode 100644 index 00000000..dda2f3bb --- /dev/null +++ b/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go @@ -0,0 +1,28 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +type OIDCClientSecretRequestSpec struct { + GenerateNewSecret bool `json:"generateNewSecret"` + RevokeOldSecrets bool `json:"revokeOldSecrets"` +} + +type OIDCClientSecretRequestStatus struct { + GeneratedSecret string `json:"generatedSecret,omitempty"` + TotalClientSecrets int `json:"totalClientSecrets"` +} + +// +genclient +// +genclient:onlyVerbs=create +// +kubebuilder:subresource:status +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequest struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` // metadata.name must be set to the client ID + + Spec OIDCClientSecretRequestSpec `json:"spec"` + Status OIDCClientSecretRequestStatus `json:"status"` +} diff --git a/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go b/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go new file mode 100644 index 00000000..a0866234 --- /dev/null +++ b/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go @@ -0,0 +1,131 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + oauth "go.pinniped.dev/generated/1.22/apis/supervisor/virtual/oauth" + 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((*OIDCClientSecretRequest)(nil), (*oauth.OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(a.(*OIDCClientSecretRequest), b.(*oauth.OIDCClientSecretRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequest)(nil), (*OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(a.(*oauth.OIDCClientSecretRequest), b.(*OIDCClientSecretRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestSpec)(nil), (*oauth.OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(a.(*OIDCClientSecretRequestSpec), b.(*oauth.OIDCClientSecretRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequestSpec)(nil), (*OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(a.(*oauth.OIDCClientSecretRequestSpec), b.(*OIDCClientSecretRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestStatus)(nil), (*oauth.OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(a.(*OIDCClientSecretRequestStatus), b.(*oauth.OIDCClientSecretRequestStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequestStatus)(nil), (*OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(a.(*oauth.OIDCClientSecretRequestStatus), b.(*OIDCClientSecretRequestStatus), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *oauth.OIDCClientSecretRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *oauth.OIDCClientSecretRequest, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in, out, s) +} + +func autoConvert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *oauth.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest is an autogenerated conversion function. +func Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *oauth.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { + return autoConvert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in, out, s) +} + +func autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *oauth.OIDCClientSecretRequestSpec, s conversion.Scope) error { + out.GenerateNewSecret = in.GenerateNewSecret + out.RevokeOldSecrets = in.RevokeOldSecrets + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *oauth.OIDCClientSecretRequestSpec, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in, out, s) +} + +func autoConvert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *oauth.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { + out.GenerateNewSecret = in.GenerateNewSecret + out.RevokeOldSecrets = in.RevokeOldSecrets + return nil +} + +// Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec is an autogenerated conversion function. +func Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *oauth.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { + return autoConvert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in, out, s) +} + +func autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *oauth.OIDCClientSecretRequestStatus, s conversion.Scope) error { + out.GeneratedSecret = in.GeneratedSecret + out.TotalClientSecrets = in.TotalClientSecrets + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *oauth.OIDCClientSecretRequestStatus, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in, out, s) +} + +func autoConvert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *oauth.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { + out.GeneratedSecret = in.GeneratedSecret + out.TotalClientSecrets = in.TotalClientSecrets + return nil +} + +// Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus is an autogenerated conversion function. +func Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *oauth.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { + return autoConvert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in, out, s) +} diff --git a/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go b/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 00000000..e4fce842 --- /dev/null +++ b/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,73 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequest) DeepCopyInto(out *OIDCClientSecretRequest) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequest. +func (in *OIDCClientSecretRequest) DeepCopy() *OIDCClientSecretRequest { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestSpec. +func (in *OIDCClientSecretRequestSpec) DeepCopy() *OIDCClientSecretRequestSpec { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestStatus) DeepCopyInto(out *OIDCClientSecretRequestStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestStatus. +func (in *OIDCClientSecretRequestStatus) DeepCopy() *OIDCClientSecretRequestStatus { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestStatus) + in.DeepCopyInto(out) + return out +} diff --git a/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go b/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go new file mode 100644 index 00000000..9097a935 --- /dev/null +++ b/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go @@ -0,0 +1,20 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/generated/1.22/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go b/generated/1.22/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go new file mode 100644 index 00000000..24b58e7b --- /dev/null +++ b/generated/1.22/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go @@ -0,0 +1,73 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package oauth + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequest) DeepCopyInto(out *OIDCClientSecretRequest) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequest. +func (in *OIDCClientSecretRequest) DeepCopy() *OIDCClientSecretRequest { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestSpec. +func (in *OIDCClientSecretRequestSpec) DeepCopy() *OIDCClientSecretRequestSpec { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestStatus) DeepCopyInto(out *OIDCClientSecretRequestStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestStatus. +func (in *OIDCClientSecretRequestStatus) DeepCopy() *OIDCClientSecretRequestStatus { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestStatus) + in.DeepCopyInto(out) + return out +} diff --git a/generated/1.22/client/supervisor/virtual/clientset/versioned/clientset.go b/generated/1.22/client/supervisor/virtual/clientset/versioned/clientset.go new file mode 100644 index 00000000..c9c89465 --- /dev/null +++ b/generated/1.22/client/supervisor/virtual/clientset/versioned/clientset.go @@ -0,0 +1,84 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package versioned + +import ( + "fmt" + + oauthv1alpha1 "go.pinniped.dev/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" + discovery "k8s.io/client-go/discovery" + rest "k8s.io/client-go/rest" + flowcontrol "k8s.io/client-go/util/flowcontrol" +) + +type Interface interface { + Discovery() discovery.DiscoveryInterface + OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface +} + +// Clientset contains the clients for groups. Each group has exactly one +// version included in a Clientset. +type Clientset struct { + *discovery.DiscoveryClient + oauthV1alpha1 *oauthv1alpha1.OauthV1alpha1Client +} + +// OauthV1alpha1 retrieves the OauthV1alpha1Client +func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { + return c.oauthV1alpha1 +} + +// Discovery retrieves the DiscoveryClient +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + if c == nil { + return nil + } + return c.DiscoveryClient +} + +// NewForConfig creates a new Clientset for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewForConfig will generate a rate-limiter in configShallowCopy. +func NewForConfig(c *rest.Config) (*Clientset, error) { + configShallowCopy := *c + if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { + if configShallowCopy.Burst <= 0 { + return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + } + configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) + } + var cs Clientset + var err error + cs.oauthV1alpha1, err = oauthv1alpha1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + + cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + return &cs, nil +} + +// NewForConfigOrDie creates a new Clientset for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *Clientset { + var cs Clientset + cs.oauthV1alpha1 = oauthv1alpha1.NewForConfigOrDie(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) + return &cs +} + +// New creates a new Clientset for the given RESTClient. +func New(c rest.Interface) *Clientset { + var cs Clientset + cs.oauthV1alpha1 = oauthv1alpha1.New(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClient(c) + return &cs +} diff --git a/generated/1.22/client/supervisor/virtual/clientset/versioned/doc.go b/generated/1.22/client/supervisor/virtual/clientset/versioned/doc.go new file mode 100644 index 00000000..5dc02e6e --- /dev/null +++ b/generated/1.22/client/supervisor/virtual/clientset/versioned/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated clientset. +package versioned diff --git a/generated/1.22/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go b/generated/1.22/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go new file mode 100644 index 00000000..5cb64013 --- /dev/null +++ b/generated/1.22/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go @@ -0,0 +1,72 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + clientset "go.pinniped.dev/generated/1.22/client/supervisor/virtual/clientset/versioned" + oauthv1alpha1 "go.pinniped.dev/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" + fakeoauthv1alpha1 "go.pinniped.dev/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/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" +) + +// NewSimpleClientset returns a clientset that will respond with the provided objects. +// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, +// without applying any validations and/or defaults. It shouldn't be considered a replacement +// for a real clientset and is mostly useful in simple unit tests. +func NewSimpleClientset(objects ...runtime.Object) *Clientset { + o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) + for _, obj := range objects { + if err := o.Add(obj); err != nil { + panic(err) + } + } + + cs := &Clientset{tracker: o} + cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} + cs.AddReactor("*", "*", testing.ObjectReaction(o)) + cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { + gvr := action.GetResource() + ns := action.GetNamespace() + watch, err := o.Watch(gvr, ns) + if err != nil { + return false, nil, err + } + return true, watch, nil + }) + + return cs +} + +// Clientset implements clientset.Interface. Meant to be embedded into a +// struct to get a default implementation. This makes faking out just the method +// you want to test easier. +type Clientset struct { + testing.Fake + discovery *fakediscovery.FakeDiscovery + tracker testing.ObjectTracker +} + +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + return c.discovery +} + +func (c *Clientset) Tracker() testing.ObjectTracker { + return c.tracker +} + +var ( + _ clientset.Interface = &Clientset{} + _ testing.FakeClient = &Clientset{} +) + +// OauthV1alpha1 retrieves the OauthV1alpha1Client +func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { + return &fakeoauthv1alpha1.FakeOauthV1alpha1{Fake: &c.Fake} +} diff --git a/generated/1.22/client/supervisor/virtual/clientset/versioned/fake/doc.go b/generated/1.22/client/supervisor/virtual/clientset/versioned/fake/doc.go new file mode 100644 index 00000000..7c9538fd --- /dev/null +++ b/generated/1.22/client/supervisor/virtual/clientset/versioned/fake/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated fake clientset. +package fake diff --git a/generated/1.22/client/supervisor/virtual/clientset/versioned/fake/register.go b/generated/1.22/client/supervisor/virtual/clientset/versioned/fake/register.go new file mode 100644 index 00000000..87de2f5a --- /dev/null +++ b/generated/1.22/client/supervisor/virtual/clientset/versioned/fake/register.go @@ -0,0 +1,43 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + oauthv1alpha1 "go.pinniped.dev/generated/1.22/apis/supervisor/virtual/oauth/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" +) + +var scheme = runtime.NewScheme() +var codecs = serializer.NewCodecFactory(scheme) + +var localSchemeBuilder = runtime.SchemeBuilder{ + oauthv1alpha1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(scheme)) +} diff --git a/generated/1.22/client/supervisor/virtual/clientset/versioned/scheme/doc.go b/generated/1.22/client/supervisor/virtual/clientset/versioned/scheme/doc.go new file mode 100644 index 00000000..cc02f1d3 --- /dev/null +++ b/generated/1.22/client/supervisor/virtual/clientset/versioned/scheme/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// This package contains the scheme of the automatically generated clientset. +package scheme diff --git a/generated/1.22/client/supervisor/virtual/clientset/versioned/scheme/register.go b/generated/1.22/client/supervisor/virtual/clientset/versioned/scheme/register.go new file mode 100644 index 00000000..4fcfd7d8 --- /dev/null +++ b/generated/1.22/client/supervisor/virtual/clientset/versioned/scheme/register.go @@ -0,0 +1,43 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package scheme + +import ( + oauthv1alpha1 "go.pinniped.dev/generated/1.22/apis/supervisor/virtual/oauth/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" +) + +var Scheme = runtime.NewScheme() +var Codecs = serializer.NewCodecFactory(Scheme) +var ParameterCodec = runtime.NewParameterCodec(Scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + oauthv1alpha1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(Scheme)) +} diff --git a/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go b/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go new file mode 100644 index 00000000..e7a470b6 --- /dev/null +++ b/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1alpha1 diff --git a/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go b/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go new file mode 100644 index 00000000..7906901b --- /dev/null +++ b/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go b/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go new file mode 100644 index 00000000..26dd6706 --- /dev/null +++ b/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go @@ -0,0 +1,27 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1alpha1 "go.pinniped.dev/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeOauthV1alpha1 struct { + *testing.Fake +} + +func (c *FakeOauthV1alpha1) OIDCClientSecretRequests(namespace string) v1alpha1.OIDCClientSecretRequestInterface { + return &FakeOIDCClientSecretRequests{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeOauthV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go b/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go new file mode 100644 index 00000000..1fadc80c --- /dev/null +++ b/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go @@ -0,0 +1,36 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "go.pinniped.dev/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + schema "k8s.io/apimachinery/pkg/runtime/schema" + testing "k8s.io/client-go/testing" +) + +// FakeOIDCClientSecretRequests implements OIDCClientSecretRequestInterface +type FakeOIDCClientSecretRequests struct { + Fake *FakeOauthV1alpha1 + ns string +} + +var oidcclientsecretrequestsResource = schema.GroupVersionResource{Group: "oauth.virtual.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclientsecretrequests"} + +var oidcclientsecretrequestsKind = schema.GroupVersionKind{Group: "oauth.virtual.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClientSecretRequest"} + +// Create takes the representation of a oIDCClientSecretRequest and creates it. Returns the server's representation of the oIDCClientSecretRequest, and an error, if there is any. +func (c *FakeOIDCClientSecretRequests) Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (result *v1alpha1.OIDCClientSecretRequest, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(oidcclientsecretrequestsResource, c.ns, oIDCClientSecretRequest), &v1alpha1.OIDCClientSecretRequest{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.OIDCClientSecretRequest), err +} diff --git a/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go b/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go new file mode 100644 index 00000000..427a2ad8 --- /dev/null +++ b/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go @@ -0,0 +1,8 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +type OIDCClientSecretRequestExpansion interface{} diff --git a/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go b/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go new file mode 100644 index 00000000..cfb00d3a --- /dev/null +++ b/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go @@ -0,0 +1,76 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "go.pinniped.dev/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1" + "go.pinniped.dev/generated/1.22/client/supervisor/virtual/clientset/versioned/scheme" + rest "k8s.io/client-go/rest" +) + +type OauthV1alpha1Interface interface { + RESTClient() rest.Interface + OIDCClientSecretRequestsGetter +} + +// OauthV1alpha1Client is used to interact with features provided by the oauth.virtual.supervisor.pinniped.dev group. +type OauthV1alpha1Client struct { + restClient rest.Interface +} + +func (c *OauthV1alpha1Client) OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface { + return newOIDCClientSecretRequests(c, namespace) +} + +// NewForConfig creates a new OauthV1alpha1Client for the given config. +func NewForConfig(c *rest.Config) (*OauthV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &OauthV1alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new OauthV1alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *OauthV1alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new OauthV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *OauthV1alpha1Client { + return &OauthV1alpha1Client{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 *OauthV1alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go b/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go new file mode 100644 index 00000000..995eb80e --- /dev/null +++ b/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go @@ -0,0 +1,54 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + + v1alpha1 "go.pinniped.dev/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1" + scheme "go.pinniped.dev/generated/1.22/client/supervisor/virtual/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + rest "k8s.io/client-go/rest" +) + +// OIDCClientSecretRequestsGetter has a method to return a OIDCClientSecretRequestInterface. +// A group's client should implement this interface. +type OIDCClientSecretRequestsGetter interface { + OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface +} + +// OIDCClientSecretRequestInterface has methods to work with OIDCClientSecretRequest resources. +type OIDCClientSecretRequestInterface interface { + Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (*v1alpha1.OIDCClientSecretRequest, error) + OIDCClientSecretRequestExpansion +} + +// oIDCClientSecretRequests implements OIDCClientSecretRequestInterface +type oIDCClientSecretRequests struct { + client rest.Interface + ns string +} + +// newOIDCClientSecretRequests returns a OIDCClientSecretRequests +func newOIDCClientSecretRequests(c *OauthV1alpha1Client, namespace string) *oIDCClientSecretRequests { + return &oIDCClientSecretRequests{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Create takes the representation of a oIDCClientSecretRequest and creates it. Returns the server's representation of the oIDCClientSecretRequest, and an error, if there is any. +func (c *oIDCClientSecretRequests) Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (result *v1alpha1.OIDCClientSecretRequest, err error) { + result = &v1alpha1.OIDCClientSecretRequest{} + err = c.client.Post(). + Namespace(c.ns). + Resource("oidcclientsecretrequests"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(oIDCClientSecretRequest). + Do(ctx). + Into(result) + return +} diff --git a/generated/1.23/README.adoc b/generated/1.23/README.adoc index d858f07a..d078f60c 100644 --- a/generated/1.23/README.adoc +++ b/generated/1.23/README.adoc @@ -13,6 +13,8 @@ - xref:{anchor_prefix}-idp-supervisor-pinniped-dev-v1alpha1[$$idp.supervisor.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-login-concierge-pinniped-dev-v1alpha1[$$login.concierge.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-oauth-supervisor-pinniped-dev-v1alpha1[$$oauth.supervisor.pinniped.dev/v1alpha1$$] +- xref:{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-oauth[$$oauth.virtual.supervisor.pinniped.dev/oauth$$] +- xref:{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-v1alpha1[$$oauth.virtual.supervisor.pinniped.dev/v1alpha1$$] [id="{anchor_prefix}-authentication-concierge-pinniped-dev-v1alpha1"] @@ -1386,3 +1388,95 @@ OIDCClientSpec is a struct that describes an OIDC Client. + +[id="{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-oauth"] +=== oauth.virtual.supervisor.pinniped.dev/oauth + +Package oauth is the internal version of the Pinniped virtual oauth API. + + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-virtual-oauth-oidcclientsecretrequestspec"] +==== OIDCClientSecretRequestSpec + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-virtual-oauth-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generateNewSecret`* __boolean__ | +| *`revokeOldSecrets`* __boolean__ | +|=== + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-virtual-oauth-oidcclientsecretrequeststatus"] +==== OIDCClientSecretRequestStatus + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-virtual-oauth-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generatedSecret`* __string__ | +| *`totalClientSecrets`* __integer__ | +|=== + + + +[id="{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-v1alpha1"] +=== oauth.virtual.supervisor.pinniped.dev/v1alpha1 + +Package v1alpha1 is the v1alpha1 version of the Pinniped virtual oauth API. + + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequestspec"] +==== OIDCClientSecretRequestSpec + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generateNewSecret`* __boolean__ | +| *`revokeOldSecrets`* __boolean__ | +|=== + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequeststatus"] +==== OIDCClientSecretRequestStatus + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generatedSecret`* __string__ | +| *`totalClientSecrets`* __integer__ | +|=== + + diff --git a/generated/1.23/apis/supervisor/virtual/oauth/doc.go b/generated/1.23/apis/supervisor/virtual/oauth/doc.go new file mode 100644 index 00000000..ca4e9a63 --- /dev/null +++ b/generated/1.23/apis/supervisor/virtual/oauth/doc.go @@ -0,0 +1,8 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// +k8s:deepcopy-gen=package +// +groupName=oauth.virtual.supervisor.pinniped.dev + +// Package oauth is the internal version of the Pinniped virtual oauth API. +package oauth diff --git a/generated/1.23/apis/supervisor/virtual/oauth/register.go b/generated/1.23/apis/supervisor/virtual/oauth/register.go new file mode 100644 index 00000000..a238d85f --- /dev/null +++ b/generated/1.23/apis/supervisor/virtual/oauth/register.go @@ -0,0 +1,37 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package oauth + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +const GroupName = "oauth.virtual.supervisor.pinniped.dev" + +// SchemeGroupVersion is group version used to register these objects. +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} + +// Kind takes an unqualified kind and returns back a Group qualified GroupKind. +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Resource takes an unqualified resource and returns back a Group qualified GroupResource. +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + AddToScheme = SchemeBuilder.AddToScheme +) + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &OIDCClientSecretRequest{}, + ) + return nil +} diff --git a/generated/1.23/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go b/generated/1.23/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go new file mode 100644 index 00000000..ac54a93c --- /dev/null +++ b/generated/1.23/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go @@ -0,0 +1,25 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package oauth + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +type OIDCClientSecretRequestSpec struct { + GenerateNewSecret bool `json:"generateNewSecret"` + RevokeOldSecrets bool `json:"revokeOldSecrets"` +} + +type OIDCClientSecretRequestStatus struct { + GeneratedSecret string `json:"generatedSecret,omitempty"` + TotalClientSecrets int `json:"totalClientSecrets"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequest struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` // metadata.name must be set to the client ID + + Spec OIDCClientSecretRequestSpec `json:"spec"` + Status OIDCClientSecretRequestStatus `json:"status"` +} diff --git a/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/conversion.go b/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/conversion.go new file mode 100644 index 00000000..fcf4e82f --- /dev/null +++ b/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/conversion.go @@ -0,0 +1,4 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 diff --git a/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/defaults.go b/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/defaults.go new file mode 100644 index 00000000..d4f5a9e8 --- /dev/null +++ b/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/defaults.go @@ -0,0 +1,12 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/runtime" +) + +func addDefaultingFuncs(scheme *runtime.Scheme) error { + return RegisterDefaults(scheme) +} diff --git a/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/doc.go b/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/doc.go new file mode 100644 index 00000000..dd351ef9 --- /dev/null +++ b/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/doc.go @@ -0,0 +1,11 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen=package +// +k8s:conversion-gen=go.pinniped.dev/generated/1.23/apis/supervisor/virtual/oauth +// +k8s:defaulter-gen=TypeMeta +// +groupName=oauth.virtual.supervisor.pinniped.dev + +// Package v1alpha1 is the v1alpha1 version of the Pinniped virtual oauth API. +package v1alpha1 diff --git a/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/register.go b/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/register.go new file mode 100644 index 00000000..ecc75a08 --- /dev/null +++ b/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/register.go @@ -0,0 +1,42 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +const GroupName = "oauth.virtual.supervisor.pinniped.dev" + +// SchemeGroupVersion is group version used to register these objects. +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} + +var ( + SchemeBuilder runtime.SchemeBuilder + localSchemeBuilder = &SchemeBuilder + AddToScheme = SchemeBuilder.AddToScheme +) + +func init() { + // We only register manually written functions here. The registration of the + // generated functions takes place in the generated files. The separation + // makes the code compile even when the generated files are missing. + localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs) +} + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &OIDCClientSecretRequest{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} + +// Resource takes an unqualified resource and returns back a Group qualified GroupResource. +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} diff --git a/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go b/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go new file mode 100644 index 00000000..dda2f3bb --- /dev/null +++ b/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go @@ -0,0 +1,28 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +type OIDCClientSecretRequestSpec struct { + GenerateNewSecret bool `json:"generateNewSecret"` + RevokeOldSecrets bool `json:"revokeOldSecrets"` +} + +type OIDCClientSecretRequestStatus struct { + GeneratedSecret string `json:"generatedSecret,omitempty"` + TotalClientSecrets int `json:"totalClientSecrets"` +} + +// +genclient +// +genclient:onlyVerbs=create +// +kubebuilder:subresource:status +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequest struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` // metadata.name must be set to the client ID + + Spec OIDCClientSecretRequestSpec `json:"spec"` + Status OIDCClientSecretRequestStatus `json:"status"` +} diff --git a/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go b/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go new file mode 100644 index 00000000..300b394f --- /dev/null +++ b/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go @@ -0,0 +1,131 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + oauth "go.pinniped.dev/generated/1.23/apis/supervisor/virtual/oauth" + 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((*OIDCClientSecretRequest)(nil), (*oauth.OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(a.(*OIDCClientSecretRequest), b.(*oauth.OIDCClientSecretRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequest)(nil), (*OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(a.(*oauth.OIDCClientSecretRequest), b.(*OIDCClientSecretRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestSpec)(nil), (*oauth.OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(a.(*OIDCClientSecretRequestSpec), b.(*oauth.OIDCClientSecretRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequestSpec)(nil), (*OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(a.(*oauth.OIDCClientSecretRequestSpec), b.(*OIDCClientSecretRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestStatus)(nil), (*oauth.OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(a.(*OIDCClientSecretRequestStatus), b.(*oauth.OIDCClientSecretRequestStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequestStatus)(nil), (*OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(a.(*oauth.OIDCClientSecretRequestStatus), b.(*OIDCClientSecretRequestStatus), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *oauth.OIDCClientSecretRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *oauth.OIDCClientSecretRequest, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in, out, s) +} + +func autoConvert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *oauth.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest is an autogenerated conversion function. +func Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *oauth.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { + return autoConvert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in, out, s) +} + +func autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *oauth.OIDCClientSecretRequestSpec, s conversion.Scope) error { + out.GenerateNewSecret = in.GenerateNewSecret + out.RevokeOldSecrets = in.RevokeOldSecrets + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *oauth.OIDCClientSecretRequestSpec, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in, out, s) +} + +func autoConvert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *oauth.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { + out.GenerateNewSecret = in.GenerateNewSecret + out.RevokeOldSecrets = in.RevokeOldSecrets + return nil +} + +// Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec is an autogenerated conversion function. +func Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *oauth.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { + return autoConvert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in, out, s) +} + +func autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *oauth.OIDCClientSecretRequestStatus, s conversion.Scope) error { + out.GeneratedSecret = in.GeneratedSecret + out.TotalClientSecrets = in.TotalClientSecrets + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *oauth.OIDCClientSecretRequestStatus, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in, out, s) +} + +func autoConvert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *oauth.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { + out.GeneratedSecret = in.GeneratedSecret + out.TotalClientSecrets = in.TotalClientSecrets + return nil +} + +// Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus is an autogenerated conversion function. +func Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *oauth.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { + return autoConvert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in, out, s) +} diff --git a/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go b/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 00000000..e4fce842 --- /dev/null +++ b/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,73 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequest) DeepCopyInto(out *OIDCClientSecretRequest) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequest. +func (in *OIDCClientSecretRequest) DeepCopy() *OIDCClientSecretRequest { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestSpec. +func (in *OIDCClientSecretRequestSpec) DeepCopy() *OIDCClientSecretRequestSpec { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestStatus) DeepCopyInto(out *OIDCClientSecretRequestStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestStatus. +func (in *OIDCClientSecretRequestStatus) DeepCopy() *OIDCClientSecretRequestStatus { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestStatus) + in.DeepCopyInto(out) + return out +} diff --git a/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go b/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go new file mode 100644 index 00000000..9097a935 --- /dev/null +++ b/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go @@ -0,0 +1,20 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/generated/1.23/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go b/generated/1.23/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go new file mode 100644 index 00000000..24b58e7b --- /dev/null +++ b/generated/1.23/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go @@ -0,0 +1,73 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package oauth + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequest) DeepCopyInto(out *OIDCClientSecretRequest) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequest. +func (in *OIDCClientSecretRequest) DeepCopy() *OIDCClientSecretRequest { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestSpec. +func (in *OIDCClientSecretRequestSpec) DeepCopy() *OIDCClientSecretRequestSpec { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestStatus) DeepCopyInto(out *OIDCClientSecretRequestStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestStatus. +func (in *OIDCClientSecretRequestStatus) DeepCopy() *OIDCClientSecretRequestStatus { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestStatus) + in.DeepCopyInto(out) + return out +} diff --git a/generated/1.23/client/supervisor/virtual/clientset/versioned/clientset.go b/generated/1.23/client/supervisor/virtual/clientset/versioned/clientset.go new file mode 100644 index 00000000..ef665be8 --- /dev/null +++ b/generated/1.23/client/supervisor/virtual/clientset/versioned/clientset.go @@ -0,0 +1,104 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package versioned + +import ( + "fmt" + "net/http" + + oauthv1alpha1 "go.pinniped.dev/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" + discovery "k8s.io/client-go/discovery" + rest "k8s.io/client-go/rest" + flowcontrol "k8s.io/client-go/util/flowcontrol" +) + +type Interface interface { + Discovery() discovery.DiscoveryInterface + OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface +} + +// Clientset contains the clients for groups. Each group has exactly one +// version included in a Clientset. +type Clientset struct { + *discovery.DiscoveryClient + oauthV1alpha1 *oauthv1alpha1.OauthV1alpha1Client +} + +// OauthV1alpha1 retrieves the OauthV1alpha1Client +func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { + return c.oauthV1alpha1 +} + +// Discovery retrieves the DiscoveryClient +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + if c == nil { + return nil + } + return c.DiscoveryClient +} + +// NewForConfig creates a new Clientset for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewForConfig will generate a rate-limiter in configShallowCopy. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). +func NewForConfig(c *rest.Config) (*Clientset, error) { + configShallowCopy := *c + + // share the transport between all clients + httpClient, err := rest.HTTPClientFor(&configShallowCopy) + if err != nil { + return nil, err + } + + return NewForConfigAndClient(&configShallowCopy, httpClient) +} + +// NewForConfigAndClient creates a new Clientset for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewForConfigAndClient will generate a rate-limiter in configShallowCopy. +func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, error) { + configShallowCopy := *c + if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { + if configShallowCopy.Burst <= 0 { + return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + } + configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) + } + + var cs Clientset + var err error + cs.oauthV1alpha1, err = oauthv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } + + cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } + return &cs, nil +} + +// NewForConfigOrDie creates a new Clientset for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *Clientset { + cs, err := NewForConfig(c) + if err != nil { + panic(err) + } + return cs +} + +// New creates a new Clientset for the given RESTClient. +func New(c rest.Interface) *Clientset { + var cs Clientset + cs.oauthV1alpha1 = oauthv1alpha1.New(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClient(c) + return &cs +} diff --git a/generated/1.23/client/supervisor/virtual/clientset/versioned/doc.go b/generated/1.23/client/supervisor/virtual/clientset/versioned/doc.go new file mode 100644 index 00000000..5dc02e6e --- /dev/null +++ b/generated/1.23/client/supervisor/virtual/clientset/versioned/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated clientset. +package versioned diff --git a/generated/1.23/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go b/generated/1.23/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go new file mode 100644 index 00000000..43398825 --- /dev/null +++ b/generated/1.23/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go @@ -0,0 +1,72 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + clientset "go.pinniped.dev/generated/1.23/client/supervisor/virtual/clientset/versioned" + oauthv1alpha1 "go.pinniped.dev/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" + fakeoauthv1alpha1 "go.pinniped.dev/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/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" +) + +// NewSimpleClientset returns a clientset that will respond with the provided objects. +// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, +// without applying any validations and/or defaults. It shouldn't be considered a replacement +// for a real clientset and is mostly useful in simple unit tests. +func NewSimpleClientset(objects ...runtime.Object) *Clientset { + o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) + for _, obj := range objects { + if err := o.Add(obj); err != nil { + panic(err) + } + } + + cs := &Clientset{tracker: o} + cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} + cs.AddReactor("*", "*", testing.ObjectReaction(o)) + cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { + gvr := action.GetResource() + ns := action.GetNamespace() + watch, err := o.Watch(gvr, ns) + if err != nil { + return false, nil, err + } + return true, watch, nil + }) + + return cs +} + +// Clientset implements clientset.Interface. Meant to be embedded into a +// struct to get a default implementation. This makes faking out just the method +// you want to test easier. +type Clientset struct { + testing.Fake + discovery *fakediscovery.FakeDiscovery + tracker testing.ObjectTracker +} + +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + return c.discovery +} + +func (c *Clientset) Tracker() testing.ObjectTracker { + return c.tracker +} + +var ( + _ clientset.Interface = &Clientset{} + _ testing.FakeClient = &Clientset{} +) + +// OauthV1alpha1 retrieves the OauthV1alpha1Client +func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { + return &fakeoauthv1alpha1.FakeOauthV1alpha1{Fake: &c.Fake} +} diff --git a/generated/1.23/client/supervisor/virtual/clientset/versioned/fake/doc.go b/generated/1.23/client/supervisor/virtual/clientset/versioned/fake/doc.go new file mode 100644 index 00000000..7c9538fd --- /dev/null +++ b/generated/1.23/client/supervisor/virtual/clientset/versioned/fake/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated fake clientset. +package fake diff --git a/generated/1.23/client/supervisor/virtual/clientset/versioned/fake/register.go b/generated/1.23/client/supervisor/virtual/clientset/versioned/fake/register.go new file mode 100644 index 00000000..4657e60e --- /dev/null +++ b/generated/1.23/client/supervisor/virtual/clientset/versioned/fake/register.go @@ -0,0 +1,43 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + oauthv1alpha1 "go.pinniped.dev/generated/1.23/apis/supervisor/virtual/oauth/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" +) + +var scheme = runtime.NewScheme() +var codecs = serializer.NewCodecFactory(scheme) + +var localSchemeBuilder = runtime.SchemeBuilder{ + oauthv1alpha1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(scheme)) +} diff --git a/generated/1.23/client/supervisor/virtual/clientset/versioned/scheme/doc.go b/generated/1.23/client/supervisor/virtual/clientset/versioned/scheme/doc.go new file mode 100644 index 00000000..cc02f1d3 --- /dev/null +++ b/generated/1.23/client/supervisor/virtual/clientset/versioned/scheme/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// This package contains the scheme of the automatically generated clientset. +package scheme diff --git a/generated/1.23/client/supervisor/virtual/clientset/versioned/scheme/register.go b/generated/1.23/client/supervisor/virtual/clientset/versioned/scheme/register.go new file mode 100644 index 00000000..c101730c --- /dev/null +++ b/generated/1.23/client/supervisor/virtual/clientset/versioned/scheme/register.go @@ -0,0 +1,43 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package scheme + +import ( + oauthv1alpha1 "go.pinniped.dev/generated/1.23/apis/supervisor/virtual/oauth/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" +) + +var Scheme = runtime.NewScheme() +var Codecs = serializer.NewCodecFactory(Scheme) +var ParameterCodec = runtime.NewParameterCodec(Scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + oauthv1alpha1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(Scheme)) +} diff --git a/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go b/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go new file mode 100644 index 00000000..e7a470b6 --- /dev/null +++ b/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1alpha1 diff --git a/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go b/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go new file mode 100644 index 00000000..7906901b --- /dev/null +++ b/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go b/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go new file mode 100644 index 00000000..ef926450 --- /dev/null +++ b/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go @@ -0,0 +1,27 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1alpha1 "go.pinniped.dev/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeOauthV1alpha1 struct { + *testing.Fake +} + +func (c *FakeOauthV1alpha1) OIDCClientSecretRequests(namespace string) v1alpha1.OIDCClientSecretRequestInterface { + return &FakeOIDCClientSecretRequests{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeOauthV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go b/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go new file mode 100644 index 00000000..7fbadd7f --- /dev/null +++ b/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go @@ -0,0 +1,36 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "go.pinniped.dev/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + schema "k8s.io/apimachinery/pkg/runtime/schema" + testing "k8s.io/client-go/testing" +) + +// FakeOIDCClientSecretRequests implements OIDCClientSecretRequestInterface +type FakeOIDCClientSecretRequests struct { + Fake *FakeOauthV1alpha1 + ns string +} + +var oidcclientsecretrequestsResource = schema.GroupVersionResource{Group: "oauth.virtual.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclientsecretrequests"} + +var oidcclientsecretrequestsKind = schema.GroupVersionKind{Group: "oauth.virtual.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClientSecretRequest"} + +// Create takes the representation of a oIDCClientSecretRequest and creates it. Returns the server's representation of the oIDCClientSecretRequest, and an error, if there is any. +func (c *FakeOIDCClientSecretRequests) Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (result *v1alpha1.OIDCClientSecretRequest, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(oidcclientsecretrequestsResource, c.ns, oIDCClientSecretRequest), &v1alpha1.OIDCClientSecretRequest{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.OIDCClientSecretRequest), err +} diff --git a/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go b/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go new file mode 100644 index 00000000..427a2ad8 --- /dev/null +++ b/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go @@ -0,0 +1,8 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +type OIDCClientSecretRequestExpansion interface{} diff --git a/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go b/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go new file mode 100644 index 00000000..c55f2a47 --- /dev/null +++ b/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go @@ -0,0 +1,94 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "net/http" + + v1alpha1 "go.pinniped.dev/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1" + "go.pinniped.dev/generated/1.23/client/supervisor/virtual/clientset/versioned/scheme" + rest "k8s.io/client-go/rest" +) + +type OauthV1alpha1Interface interface { + RESTClient() rest.Interface + OIDCClientSecretRequestsGetter +} + +// OauthV1alpha1Client is used to interact with features provided by the oauth.virtual.supervisor.pinniped.dev group. +type OauthV1alpha1Client struct { + restClient rest.Interface +} + +func (c *OauthV1alpha1Client) OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface { + return newOIDCClientSecretRequests(c, namespace) +} + +// NewForConfig creates a new OauthV1alpha1Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). +func NewForConfig(c *rest.Config) (*OauthV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new OauthV1alpha1Client for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*OauthV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientForConfigAndClient(&config, h) + if err != nil { + return nil, err + } + return &OauthV1alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new OauthV1alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *OauthV1alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new OauthV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *OauthV1alpha1Client { + return &OauthV1alpha1Client{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 *OauthV1alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go b/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go new file mode 100644 index 00000000..073ea69b --- /dev/null +++ b/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go @@ -0,0 +1,54 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + + v1alpha1 "go.pinniped.dev/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1" + scheme "go.pinniped.dev/generated/1.23/client/supervisor/virtual/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + rest "k8s.io/client-go/rest" +) + +// OIDCClientSecretRequestsGetter has a method to return a OIDCClientSecretRequestInterface. +// A group's client should implement this interface. +type OIDCClientSecretRequestsGetter interface { + OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface +} + +// OIDCClientSecretRequestInterface has methods to work with OIDCClientSecretRequest resources. +type OIDCClientSecretRequestInterface interface { + Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (*v1alpha1.OIDCClientSecretRequest, error) + OIDCClientSecretRequestExpansion +} + +// oIDCClientSecretRequests implements OIDCClientSecretRequestInterface +type oIDCClientSecretRequests struct { + client rest.Interface + ns string +} + +// newOIDCClientSecretRequests returns a OIDCClientSecretRequests +func newOIDCClientSecretRequests(c *OauthV1alpha1Client, namespace string) *oIDCClientSecretRequests { + return &oIDCClientSecretRequests{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Create takes the representation of a oIDCClientSecretRequest and creates it. Returns the server's representation of the oIDCClientSecretRequest, and an error, if there is any. +func (c *oIDCClientSecretRequests) Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (result *v1alpha1.OIDCClientSecretRequest, err error) { + result = &v1alpha1.OIDCClientSecretRequest{} + err = c.client.Post(). + Namespace(c.ns). + Resource("oidcclientsecretrequests"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(oIDCClientSecretRequest). + Do(ctx). + Into(result) + return +} diff --git a/generated/latest/apis/supervisor/virtual/oauth/doc.go b/generated/latest/apis/supervisor/virtual/oauth/doc.go new file mode 100644 index 00000000..ca4e9a63 --- /dev/null +++ b/generated/latest/apis/supervisor/virtual/oauth/doc.go @@ -0,0 +1,8 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// +k8s:deepcopy-gen=package +// +groupName=oauth.virtual.supervisor.pinniped.dev + +// Package oauth is the internal version of the Pinniped virtual oauth API. +package oauth diff --git a/generated/latest/apis/supervisor/virtual/oauth/register.go b/generated/latest/apis/supervisor/virtual/oauth/register.go new file mode 100644 index 00000000..a238d85f --- /dev/null +++ b/generated/latest/apis/supervisor/virtual/oauth/register.go @@ -0,0 +1,37 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package oauth + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +const GroupName = "oauth.virtual.supervisor.pinniped.dev" + +// SchemeGroupVersion is group version used to register these objects. +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} + +// Kind takes an unqualified kind and returns back a Group qualified GroupKind. +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Resource takes an unqualified resource and returns back a Group qualified GroupResource. +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + AddToScheme = SchemeBuilder.AddToScheme +) + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &OIDCClientSecretRequest{}, + ) + return nil +} diff --git a/generated/latest/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go b/generated/latest/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go new file mode 100644 index 00000000..ac54a93c --- /dev/null +++ b/generated/latest/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go @@ -0,0 +1,25 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package oauth + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +type OIDCClientSecretRequestSpec struct { + GenerateNewSecret bool `json:"generateNewSecret"` + RevokeOldSecrets bool `json:"revokeOldSecrets"` +} + +type OIDCClientSecretRequestStatus struct { + GeneratedSecret string `json:"generatedSecret,omitempty"` + TotalClientSecrets int `json:"totalClientSecrets"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequest struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` // metadata.name must be set to the client ID + + Spec OIDCClientSecretRequestSpec `json:"spec"` + Status OIDCClientSecretRequestStatus `json:"status"` +} diff --git a/generated/latest/apis/supervisor/virtual/oauth/v1alpha1/conversion.go b/generated/latest/apis/supervisor/virtual/oauth/v1alpha1/conversion.go new file mode 100644 index 00000000..fcf4e82f --- /dev/null +++ b/generated/latest/apis/supervisor/virtual/oauth/v1alpha1/conversion.go @@ -0,0 +1,4 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 diff --git a/generated/latest/apis/supervisor/virtual/oauth/v1alpha1/defaults.go b/generated/latest/apis/supervisor/virtual/oauth/v1alpha1/defaults.go new file mode 100644 index 00000000..d4f5a9e8 --- /dev/null +++ b/generated/latest/apis/supervisor/virtual/oauth/v1alpha1/defaults.go @@ -0,0 +1,12 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/runtime" +) + +func addDefaultingFuncs(scheme *runtime.Scheme) error { + return RegisterDefaults(scheme) +} diff --git a/generated/latest/apis/supervisor/virtual/oauth/v1alpha1/doc.go b/generated/latest/apis/supervisor/virtual/oauth/v1alpha1/doc.go new file mode 100644 index 00000000..8aaf4d21 --- /dev/null +++ b/generated/latest/apis/supervisor/virtual/oauth/v1alpha1/doc.go @@ -0,0 +1,11 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen=package +// +k8s:conversion-gen=go.pinniped.dev/generated/latest/apis/supervisor/virtual/oauth +// +k8s:defaulter-gen=TypeMeta +// +groupName=oauth.virtual.supervisor.pinniped.dev + +// Package v1alpha1 is the v1alpha1 version of the Pinniped virtual oauth API. +package v1alpha1 diff --git a/generated/latest/apis/supervisor/virtual/oauth/v1alpha1/register.go b/generated/latest/apis/supervisor/virtual/oauth/v1alpha1/register.go new file mode 100644 index 00000000..ecc75a08 --- /dev/null +++ b/generated/latest/apis/supervisor/virtual/oauth/v1alpha1/register.go @@ -0,0 +1,42 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +const GroupName = "oauth.virtual.supervisor.pinniped.dev" + +// SchemeGroupVersion is group version used to register these objects. +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} + +var ( + SchemeBuilder runtime.SchemeBuilder + localSchemeBuilder = &SchemeBuilder + AddToScheme = SchemeBuilder.AddToScheme +) + +func init() { + // We only register manually written functions here. The registration of the + // generated functions takes place in the generated files. The separation + // makes the code compile even when the generated files are missing. + localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs) +} + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &OIDCClientSecretRequest{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} + +// Resource takes an unqualified resource and returns back a Group qualified GroupResource. +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} diff --git a/generated/latest/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go b/generated/latest/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go new file mode 100644 index 00000000..dda2f3bb --- /dev/null +++ b/generated/latest/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go @@ -0,0 +1,28 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +type OIDCClientSecretRequestSpec struct { + GenerateNewSecret bool `json:"generateNewSecret"` + RevokeOldSecrets bool `json:"revokeOldSecrets"` +} + +type OIDCClientSecretRequestStatus struct { + GeneratedSecret string `json:"generatedSecret,omitempty"` + TotalClientSecrets int `json:"totalClientSecrets"` +} + +// +genclient +// +genclient:onlyVerbs=create +// +kubebuilder:subresource:status +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequest struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` // metadata.name must be set to the client ID + + Spec OIDCClientSecretRequestSpec `json:"spec"` + Status OIDCClientSecretRequestStatus `json:"status"` +} diff --git a/generated/latest/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go b/generated/latest/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go new file mode 100644 index 00000000..aebfa30d --- /dev/null +++ b/generated/latest/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go @@ -0,0 +1,131 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + oauth "go.pinniped.dev/generated/latest/apis/supervisor/virtual/oauth" + 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((*OIDCClientSecretRequest)(nil), (*oauth.OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(a.(*OIDCClientSecretRequest), b.(*oauth.OIDCClientSecretRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequest)(nil), (*OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(a.(*oauth.OIDCClientSecretRequest), b.(*OIDCClientSecretRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestSpec)(nil), (*oauth.OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(a.(*OIDCClientSecretRequestSpec), b.(*oauth.OIDCClientSecretRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequestSpec)(nil), (*OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(a.(*oauth.OIDCClientSecretRequestSpec), b.(*OIDCClientSecretRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestStatus)(nil), (*oauth.OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(a.(*OIDCClientSecretRequestStatus), b.(*oauth.OIDCClientSecretRequestStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequestStatus)(nil), (*OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(a.(*oauth.OIDCClientSecretRequestStatus), b.(*OIDCClientSecretRequestStatus), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *oauth.OIDCClientSecretRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *oauth.OIDCClientSecretRequest, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in, out, s) +} + +func autoConvert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *oauth.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest is an autogenerated conversion function. +func Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *oauth.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { + return autoConvert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in, out, s) +} + +func autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *oauth.OIDCClientSecretRequestSpec, s conversion.Scope) error { + out.GenerateNewSecret = in.GenerateNewSecret + out.RevokeOldSecrets = in.RevokeOldSecrets + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *oauth.OIDCClientSecretRequestSpec, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in, out, s) +} + +func autoConvert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *oauth.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { + out.GenerateNewSecret = in.GenerateNewSecret + out.RevokeOldSecrets = in.RevokeOldSecrets + return nil +} + +// Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec is an autogenerated conversion function. +func Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *oauth.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { + return autoConvert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in, out, s) +} + +func autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *oauth.OIDCClientSecretRequestStatus, s conversion.Scope) error { + out.GeneratedSecret = in.GeneratedSecret + out.TotalClientSecrets = in.TotalClientSecrets + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *oauth.OIDCClientSecretRequestStatus, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in, out, s) +} + +func autoConvert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *oauth.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { + out.GeneratedSecret = in.GeneratedSecret + out.TotalClientSecrets = in.TotalClientSecrets + return nil +} + +// Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus is an autogenerated conversion function. +func Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *oauth.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { + return autoConvert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in, out, s) +} diff --git a/generated/latest/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go b/generated/latest/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 00000000..e4fce842 --- /dev/null +++ b/generated/latest/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,73 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequest) DeepCopyInto(out *OIDCClientSecretRequest) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequest. +func (in *OIDCClientSecretRequest) DeepCopy() *OIDCClientSecretRequest { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestSpec. +func (in *OIDCClientSecretRequestSpec) DeepCopy() *OIDCClientSecretRequestSpec { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestStatus) DeepCopyInto(out *OIDCClientSecretRequestStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestStatus. +func (in *OIDCClientSecretRequestStatus) DeepCopy() *OIDCClientSecretRequestStatus { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestStatus) + in.DeepCopyInto(out) + return out +} diff --git a/generated/latest/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go b/generated/latest/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go new file mode 100644 index 00000000..9097a935 --- /dev/null +++ b/generated/latest/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go @@ -0,0 +1,20 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/generated/latest/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go b/generated/latest/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go new file mode 100644 index 00000000..24b58e7b --- /dev/null +++ b/generated/latest/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go @@ -0,0 +1,73 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package oauth + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequest) DeepCopyInto(out *OIDCClientSecretRequest) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequest. +func (in *OIDCClientSecretRequest) DeepCopy() *OIDCClientSecretRequest { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestSpec. +func (in *OIDCClientSecretRequestSpec) DeepCopy() *OIDCClientSecretRequestSpec { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestStatus) DeepCopyInto(out *OIDCClientSecretRequestStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestStatus. +func (in *OIDCClientSecretRequestStatus) DeepCopy() *OIDCClientSecretRequestStatus { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestStatus) + in.DeepCopyInto(out) + return out +} diff --git a/generated/latest/client/supervisor/virtual/clientset/versioned/clientset.go b/generated/latest/client/supervisor/virtual/clientset/versioned/clientset.go new file mode 100644 index 00000000..09131c84 --- /dev/null +++ b/generated/latest/client/supervisor/virtual/clientset/versioned/clientset.go @@ -0,0 +1,104 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package versioned + +import ( + "fmt" + "net/http" + + oauthv1alpha1 "go.pinniped.dev/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" + discovery "k8s.io/client-go/discovery" + rest "k8s.io/client-go/rest" + flowcontrol "k8s.io/client-go/util/flowcontrol" +) + +type Interface interface { + Discovery() discovery.DiscoveryInterface + OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface +} + +// Clientset contains the clients for groups. Each group has exactly one +// version included in a Clientset. +type Clientset struct { + *discovery.DiscoveryClient + oauthV1alpha1 *oauthv1alpha1.OauthV1alpha1Client +} + +// OauthV1alpha1 retrieves the OauthV1alpha1Client +func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { + return c.oauthV1alpha1 +} + +// Discovery retrieves the DiscoveryClient +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + if c == nil { + return nil + } + return c.DiscoveryClient +} + +// NewForConfig creates a new Clientset for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewForConfig will generate a rate-limiter in configShallowCopy. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). +func NewForConfig(c *rest.Config) (*Clientset, error) { + configShallowCopy := *c + + // share the transport between all clients + httpClient, err := rest.HTTPClientFor(&configShallowCopy) + if err != nil { + return nil, err + } + + return NewForConfigAndClient(&configShallowCopy, httpClient) +} + +// NewForConfigAndClient creates a new Clientset for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewForConfigAndClient will generate a rate-limiter in configShallowCopy. +func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, error) { + configShallowCopy := *c + if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { + if configShallowCopy.Burst <= 0 { + return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + } + configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) + } + + var cs Clientset + var err error + cs.oauthV1alpha1, err = oauthv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } + + cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } + return &cs, nil +} + +// NewForConfigOrDie creates a new Clientset for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *Clientset { + cs, err := NewForConfig(c) + if err != nil { + panic(err) + } + return cs +} + +// New creates a new Clientset for the given RESTClient. +func New(c rest.Interface) *Clientset { + var cs Clientset + cs.oauthV1alpha1 = oauthv1alpha1.New(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClient(c) + return &cs +} diff --git a/generated/latest/client/supervisor/virtual/clientset/versioned/doc.go b/generated/latest/client/supervisor/virtual/clientset/versioned/doc.go new file mode 100644 index 00000000..5dc02e6e --- /dev/null +++ b/generated/latest/client/supervisor/virtual/clientset/versioned/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated clientset. +package versioned diff --git a/generated/latest/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go b/generated/latest/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go new file mode 100644 index 00000000..a0552547 --- /dev/null +++ b/generated/latest/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go @@ -0,0 +1,72 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + clientset "go.pinniped.dev/generated/latest/client/supervisor/virtual/clientset/versioned" + oauthv1alpha1 "go.pinniped.dev/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" + fakeoauthv1alpha1 "go.pinniped.dev/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/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" +) + +// NewSimpleClientset returns a clientset that will respond with the provided objects. +// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, +// without applying any validations and/or defaults. It shouldn't be considered a replacement +// for a real clientset and is mostly useful in simple unit tests. +func NewSimpleClientset(objects ...runtime.Object) *Clientset { + o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) + for _, obj := range objects { + if err := o.Add(obj); err != nil { + panic(err) + } + } + + cs := &Clientset{tracker: o} + cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} + cs.AddReactor("*", "*", testing.ObjectReaction(o)) + cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { + gvr := action.GetResource() + ns := action.GetNamespace() + watch, err := o.Watch(gvr, ns) + if err != nil { + return false, nil, err + } + return true, watch, nil + }) + + return cs +} + +// Clientset implements clientset.Interface. Meant to be embedded into a +// struct to get a default implementation. This makes faking out just the method +// you want to test easier. +type Clientset struct { + testing.Fake + discovery *fakediscovery.FakeDiscovery + tracker testing.ObjectTracker +} + +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + return c.discovery +} + +func (c *Clientset) Tracker() testing.ObjectTracker { + return c.tracker +} + +var ( + _ clientset.Interface = &Clientset{} + _ testing.FakeClient = &Clientset{} +) + +// OauthV1alpha1 retrieves the OauthV1alpha1Client +func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { + return &fakeoauthv1alpha1.FakeOauthV1alpha1{Fake: &c.Fake} +} diff --git a/generated/latest/client/supervisor/virtual/clientset/versioned/fake/doc.go b/generated/latest/client/supervisor/virtual/clientset/versioned/fake/doc.go new file mode 100644 index 00000000..7c9538fd --- /dev/null +++ b/generated/latest/client/supervisor/virtual/clientset/versioned/fake/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated fake clientset. +package fake diff --git a/generated/latest/client/supervisor/virtual/clientset/versioned/fake/register.go b/generated/latest/client/supervisor/virtual/clientset/versioned/fake/register.go new file mode 100644 index 00000000..895e8126 --- /dev/null +++ b/generated/latest/client/supervisor/virtual/clientset/versioned/fake/register.go @@ -0,0 +1,43 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + oauthv1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/virtual/oauth/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" +) + +var scheme = runtime.NewScheme() +var codecs = serializer.NewCodecFactory(scheme) + +var localSchemeBuilder = runtime.SchemeBuilder{ + oauthv1alpha1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(scheme)) +} diff --git a/generated/latest/client/supervisor/virtual/clientset/versioned/scheme/doc.go b/generated/latest/client/supervisor/virtual/clientset/versioned/scheme/doc.go new file mode 100644 index 00000000..cc02f1d3 --- /dev/null +++ b/generated/latest/client/supervisor/virtual/clientset/versioned/scheme/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// This package contains the scheme of the automatically generated clientset. +package scheme diff --git a/generated/latest/client/supervisor/virtual/clientset/versioned/scheme/register.go b/generated/latest/client/supervisor/virtual/clientset/versioned/scheme/register.go new file mode 100644 index 00000000..a842d03d --- /dev/null +++ b/generated/latest/client/supervisor/virtual/clientset/versioned/scheme/register.go @@ -0,0 +1,43 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package scheme + +import ( + oauthv1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/virtual/oauth/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" +) + +var Scheme = runtime.NewScheme() +var Codecs = serializer.NewCodecFactory(Scheme) +var ParameterCodec = runtime.NewParameterCodec(Scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + oauthv1alpha1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(Scheme)) +} diff --git a/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go b/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go new file mode 100644 index 00000000..e7a470b6 --- /dev/null +++ b/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1alpha1 diff --git a/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go b/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go new file mode 100644 index 00000000..7906901b --- /dev/null +++ b/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go b/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go new file mode 100644 index 00000000..c73da3da --- /dev/null +++ b/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go @@ -0,0 +1,27 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1alpha1 "go.pinniped.dev/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeOauthV1alpha1 struct { + *testing.Fake +} + +func (c *FakeOauthV1alpha1) OIDCClientSecretRequests(namespace string) v1alpha1.OIDCClientSecretRequestInterface { + return &FakeOIDCClientSecretRequests{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeOauthV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go b/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go new file mode 100644 index 00000000..8220bcc7 --- /dev/null +++ b/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go @@ -0,0 +1,36 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/virtual/oauth/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + schema "k8s.io/apimachinery/pkg/runtime/schema" + testing "k8s.io/client-go/testing" +) + +// FakeOIDCClientSecretRequests implements OIDCClientSecretRequestInterface +type FakeOIDCClientSecretRequests struct { + Fake *FakeOauthV1alpha1 + ns string +} + +var oidcclientsecretrequestsResource = schema.GroupVersionResource{Group: "oauth.virtual.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclientsecretrequests"} + +var oidcclientsecretrequestsKind = schema.GroupVersionKind{Group: "oauth.virtual.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClientSecretRequest"} + +// Create takes the representation of a oIDCClientSecretRequest and creates it. Returns the server's representation of the oIDCClientSecretRequest, and an error, if there is any. +func (c *FakeOIDCClientSecretRequests) Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (result *v1alpha1.OIDCClientSecretRequest, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(oidcclientsecretrequestsResource, c.ns, oIDCClientSecretRequest), &v1alpha1.OIDCClientSecretRequest{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.OIDCClientSecretRequest), err +} diff --git a/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go b/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go new file mode 100644 index 00000000..427a2ad8 --- /dev/null +++ b/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go @@ -0,0 +1,8 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +type OIDCClientSecretRequestExpansion interface{} diff --git a/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go b/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go new file mode 100644 index 00000000..f5863aa1 --- /dev/null +++ b/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go @@ -0,0 +1,94 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "net/http" + + v1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/virtual/oauth/v1alpha1" + "go.pinniped.dev/generated/latest/client/supervisor/virtual/clientset/versioned/scheme" + rest "k8s.io/client-go/rest" +) + +type OauthV1alpha1Interface interface { + RESTClient() rest.Interface + OIDCClientSecretRequestsGetter +} + +// OauthV1alpha1Client is used to interact with features provided by the oauth.virtual.supervisor.pinniped.dev group. +type OauthV1alpha1Client struct { + restClient rest.Interface +} + +func (c *OauthV1alpha1Client) OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface { + return newOIDCClientSecretRequests(c, namespace) +} + +// NewForConfig creates a new OauthV1alpha1Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). +func NewForConfig(c *rest.Config) (*OauthV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new OauthV1alpha1Client for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*OauthV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientForConfigAndClient(&config, h) + if err != nil { + return nil, err + } + return &OauthV1alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new OauthV1alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *OauthV1alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new OauthV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *OauthV1alpha1Client { + return &OauthV1alpha1Client{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 *OauthV1alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go b/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go new file mode 100644 index 00000000..259bfbc9 --- /dev/null +++ b/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go @@ -0,0 +1,54 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + + v1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/virtual/oauth/v1alpha1" + scheme "go.pinniped.dev/generated/latest/client/supervisor/virtual/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + rest "k8s.io/client-go/rest" +) + +// OIDCClientSecretRequestsGetter has a method to return a OIDCClientSecretRequestInterface. +// A group's client should implement this interface. +type OIDCClientSecretRequestsGetter interface { + OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface +} + +// OIDCClientSecretRequestInterface has methods to work with OIDCClientSecretRequest resources. +type OIDCClientSecretRequestInterface interface { + Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (*v1alpha1.OIDCClientSecretRequest, error) + OIDCClientSecretRequestExpansion +} + +// oIDCClientSecretRequests implements OIDCClientSecretRequestInterface +type oIDCClientSecretRequests struct { + client rest.Interface + ns string +} + +// newOIDCClientSecretRequests returns a OIDCClientSecretRequests +func newOIDCClientSecretRequests(c *OauthV1alpha1Client, namespace string) *oIDCClientSecretRequests { + return &oIDCClientSecretRequests{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Create takes the representation of a oIDCClientSecretRequest and creates it. Returns the server's representation of the oIDCClientSecretRequest, and an error, if there is any. +func (c *oIDCClientSecretRequests) Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (result *v1alpha1.OIDCClientSecretRequest, err error) { + result = &v1alpha1.OIDCClientSecretRequest{} + err = c.client.Post(). + Namespace(c.ns). + Resource("oidcclientsecretrequests"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(oIDCClientSecretRequest). + Do(ctx). + Into(result) + return +} diff --git a/hack/lib/update-codegen.sh b/hack/lib/update-codegen.sh index a31a38d7..81f27cf2 100755 --- a/hack/lib/update-codegen.sh +++ b/hack/lib/update-codegen.sh @@ -123,7 +123,7 @@ echo "generating API-related code for our public API groups..." "deepcopy" \ "${BASE_PKG}/generated/${KUBE_MINOR_VERSION}/apis" \ "${BASE_PKG}/generated/${KUBE_MINOR_VERSION}/apis" \ - "supervisor/config:v1alpha1 supervisor/idp:v1alpha1 supervisor/oauth:v1alpha1 concierge/config:v1alpha1 concierge/authentication:v1alpha1 concierge/login:v1alpha1 concierge/identity:v1alpha1" \ + "supervisor/config:v1alpha1 supervisor/idp:v1alpha1 supervisor/oauth:v1alpha1 supervisor/virtual/oauth:v1alpha1 concierge/config:v1alpha1 concierge/authentication:v1alpha1 concierge/login:v1alpha1 concierge/identity:v1alpha1" \ --go-header-file "${ROOT}/hack/boilerplate.go.txt" -v "$debug_level" 2>&1 | sed "s|^|gen-api > |" ) @@ -135,7 +135,7 @@ echo "generating API-related code for our internal API groups..." "${BASE_PKG}/generated/${KUBE_MINOR_VERSION}/client/concierge" \ "${BASE_PKG}/generated/${KUBE_MINOR_VERSION}/apis" \ "${BASE_PKG}/generated/${KUBE_MINOR_VERSION}/apis" \ - "concierge/login:v1alpha1 concierge/identity:v1alpha1" \ + "concierge/login:v1alpha1 concierge/identity:v1alpha1 supervisor/virtual/oauth:v1alpha1" \ --go-header-file "${ROOT}/hack/boilerplate.go.txt" -v "$debug_level" 2>&1 | sed "s|^|gen-int-api > |" ) @@ -162,6 +162,15 @@ echo "generating client code for our public API groups..." "supervisor/config:v1alpha1 supervisor/idp:v1alpha1 supervisor/oauth:v1alpha1" \ --go-header-file "${ROOT}/hack/boilerplate.go.txt" -v "$debug_level" 2>&1 | sed "s|^|gen-client > |" ) +(cd client && + bash "${GOPATH}/src/k8s.io/code-generator/generate-groups.sh" \ + "client,lister,informer" \ + "${BASE_PKG}/generated/${KUBE_MINOR_VERSION}/client/supervisor/virtual" \ + "${BASE_PKG}/generated/${KUBE_MINOR_VERSION}/apis" \ + "supervisor/virtual/oauth:v1alpha1" \ + --go-header-file "${ROOT}/hack/boilerplate.go.txt" -v "$debug_level" 2>&1 | sed "s|^|gen-client > |" +) + # Tidy up the .../client module echo "tidying ${OUTPUT_DIR}/client/go.mod..." diff --git a/internal/config/supervisor/types.go b/internal/config/supervisor/types.go index 147845fb..edef3ce7 100644 --- a/internal/config/supervisor/types.go +++ b/internal/config/supervisor/types.go @@ -24,6 +24,7 @@ type Config struct { // NamesConfigSpec configures the names of some Kubernetes resources for the Supervisor. type NamesConfigSpec struct { DefaultTLSCertificateSecret string `json:"defaultTLSCertificateSecret"` + APIService string `json:"apiService"` } type Endpoints struct { diff --git a/internal/groupsuffix/groupdata.go b/internal/groupsuffix/groupdata.go index bac7ee4c..b2c20e1e 100644 --- a/internal/groupsuffix/groupdata.go +++ b/internal/groupsuffix/groupdata.go @@ -1,4 +1,4 @@ -// Copyright 2021 the Pinniped contributors. All Rights Reserved. +// Copyright 2021-2022 the Pinniped contributors. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package groupsuffix @@ -8,6 +8,7 @@ import ( identityv1alpha1 "go.pinniped.dev/generated/latest/apis/concierge/identity/v1alpha1" loginv1alpha1 "go.pinniped.dev/generated/latest/apis/concierge/login/v1alpha1" + oauthv1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/virtual/oauth/v1alpha1" ) type GroupData schema.GroupVersion @@ -32,3 +33,16 @@ func ConciergeAggregatedGroups(apiGroupSuffix string) (login, identity GroupData Version: identityv1alpha1.SchemeGroupVersion.Version, } } + +func SupervisorAggregatedGroups(apiGroupSuffix string) (oauth GroupData) { + oauthVirtualSupervisorAPIGroup, ok1 := Replace(oauthv1alpha1.GroupName, apiGroupSuffix) + + if !ok1 { + panic("static group input is invalid") + } + + return GroupData{ + Group: oauthVirtualSupervisorAPIGroup, + Version: oauthv1alpha1.SchemeGroupVersion.Version, + } +} diff --git a/internal/registry/clientsecretrequest/rest.go b/internal/registry/clientsecretrequest/rest.go new file mode 100644 index 00000000..cf01c18d --- /dev/null +++ b/internal/registry/clientsecretrequest/rest.go @@ -0,0 +1,83 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Package clientsecretrequest provides REST functionality for the CredentialRequest resource. +package clientsecretrequest + +import ( + "context" + "fmt" + + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apiserver/pkg/registry/rest" + "k8s.io/utils/trace" + + oauthapi "go.pinniped.dev/generated/latest/apis/supervisor/virtual/oauth" +) + +func NewREST() *REST { + return &REST{} +} + +type REST struct { +} + +// Assert that our *REST implements all the optional interfaces that we expect it to implement. +var _ interface { + rest.Creater + rest.NamespaceScopedStrategy + rest.Scoper + rest.Storage +} = (*REST)(nil) + +func (*REST) New() runtime.Object { + return &oauthapi.OIDCClientSecretRequest{} +} + +func (*REST) NamespaceScoped() bool { + return true +} + +func (*REST) Categories() []string { + // because we haven't implemented lister, adding it to categories breaks things. + return []string{} +} + +func (r *REST) Create(ctx context.Context, obj runtime.Object, createValidation rest.ValidateObjectFunc, options *metav1.CreateOptions) (runtime.Object, error) { + t := trace.FromContext(ctx).Nest("create", trace.Field{ + Key: "kind", + Value: "OIDCClientSecretRequest", + }) + defer t.Log() + + _, err := validateRequest(obj, t) + if err != nil { + return nil, err + } + + return &oauthapi.OIDCClientSecretRequest{ + Status: oauthapi.OIDCClientSecretRequestStatus{ + GeneratedSecret: "not-a-real-secret", + TotalClientSecrets: 20, + }, + }, nil +} + +func validateRequest(obj runtime.Object, t *trace.Trace) (*oauthapi.OIDCClientSecretRequest, error) { + clientSecretRequest, ok := obj.(*oauthapi.OIDCClientSecretRequest) + if !ok { + traceValidationFailure(t, "not an OIDCClientSecretRequest") + return nil, apierrors.NewBadRequest(fmt.Sprintf("not an OIDCClientSecretRequest: %#v", obj)) + } + + return clientSecretRequest, nil +} + +func traceValidationFailure(t *trace.Trace, msg string) { + t.Step("failure", + trace.Field{Key: "failureType", Value: "request validation"}, + trace.Field{Key: "msg", Value: msg}, + ) +} diff --git a/internal/supervisor/apiserver/apiserver.go b/internal/supervisor/apiserver/apiserver.go new file mode 100644 index 00000000..21c620e3 --- /dev/null +++ b/internal/supervisor/apiserver/apiserver.go @@ -0,0 +1,139 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package apiserver + +import ( + "context" + "fmt" + "sync" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/errors" + "k8s.io/apiserver/pkg/registry/rest" + genericapiserver "k8s.io/apiserver/pkg/server" + "k8s.io/client-go/pkg/version" + + "go.pinniped.dev/internal/controllerinit" + "go.pinniped.dev/internal/plog" + "go.pinniped.dev/internal/registry/clientsecretrequest" +) + +type Config struct { + GenericConfig *genericapiserver.RecommendedConfig + ExtraConfig ExtraConfig +} + +type ExtraConfig struct { + BuildControllersPostStartHook controllerinit.RunnerBuilder + Scheme *runtime.Scheme + NegotiatedSerializer runtime.NegotiatedSerializer + OauthVirtualSupervisorGroupVersion schema.GroupVersion +} + +type PinnipedServer struct { + GenericAPIServer *genericapiserver.GenericAPIServer +} + +type completedConfig struct { + GenericConfig genericapiserver.CompletedConfig + ExtraConfig *ExtraConfig +} + +type CompletedConfig struct { + // Embed a private pointer that cannot be instantiated outside of this package. + *completedConfig +} + +// Complete fills in any fields not set that are required to have valid data. It's mutating the receiver. +func (c *Config) Complete() CompletedConfig { + completedCfg := completedConfig{ + c.GenericConfig.Complete(), + &c.ExtraConfig, + } + + versionInfo := version.Get() + completedCfg.GenericConfig.Version = &versionInfo + + return CompletedConfig{completedConfig: &completedCfg} +} + +// New returns a new instance of AdmissionServer from the given config. +func (c completedConfig) New() (*PinnipedServer, error) { + genericServer, err := c.GenericConfig.New("pinniped-supervisor", 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 := &PinnipedServer{ + GenericAPIServer: genericServer, + } + + var errs []error //nolint: prealloc + for _, f := range []func() (schema.GroupVersionResource, rest.Storage){ + func() (schema.GroupVersionResource, rest.Storage) { + clientSecretReqGVR := c.ExtraConfig.OauthVirtualSupervisorGroupVersion.WithResource("oidcclientsecretrequests") + clientSecretReqStorage := clientsecretrequest.NewREST() + return clientSecretReqGVR, clientSecretReqStorage + }, + } { + gvr, storage := f() + errs = append(errs, + s.GenericAPIServer.InstallAPIGroup( + &genericapiserver.APIGroupInfo{ + PrioritizedVersions: []schema.GroupVersion{gvr.GroupVersion()}, + VersionedResourcesStorageMap: map[string]map[string]rest.Storage{gvr.Version: {gvr.Resource: storage}}, + OptionsExternalVersion: &schema.GroupVersion{Version: "v1"}, + Scheme: c.ExtraConfig.Scheme, + ParameterCodec: metav1.ParameterCodec, + NegotiatedSerializer: c.ExtraConfig.NegotiatedSerializer, + }, + ), + ) + } + if err := errors.NewAggregate(errs); err != nil { + return nil, fmt.Errorf("could not install API groups: %w", err) + } + + shutdown := &sync.WaitGroup{} + s.GenericAPIServer.AddPostStartHookOrDie("start-controllers", + func(postStartContext genericapiserver.PostStartHookContext) error { + plog.Debug("start-controllers post start hook starting") + + ctx, cancel := context.WithCancel(context.Background()) + go func() { + defer cancel() + + <-postStartContext.StopCh + }() + + runControllers, err := c.ExtraConfig.BuildControllersPostStartHook(ctx) + if err != nil { + return fmt.Errorf("cannot create run controller func: %w", err) + } + + shutdown.Add(1) + go func() { + defer shutdown.Done() + + runControllers(ctx) + }() + + return nil + }, + ) + s.GenericAPIServer.AddPreShutdownHookOrDie("stop-controllers", + func() error { + plog.Debug("stop-controllers pre shutdown hook starting") + defer plog.Debug("stop-controllers pre shutdown hook completed") + + shutdown.Wait() + + return nil + }, + ) + + return s, nil +} diff --git a/internal/supervisor/scheme/scheme.go b/internal/supervisor/scheme/scheme.go new file mode 100644 index 00000000..6179040e --- /dev/null +++ b/internal/supervisor/scheme/scheme.go @@ -0,0 +1,91 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Package scheme contains code to construct a proper runtime.Scheme for the Concierge aggregated +// API. +package scheme + +import ( + "fmt" + + oauthapi "go.pinniped.dev/generated/latest/apis/supervisor/virtual/oauth" + oauthv1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/virtual/oauth/v1alpha1" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + + "go.pinniped.dev/internal/groupsuffix" +) + +// New returns a runtime.Scheme for use by the Supervisor aggregated API running with the provided +// apiGroupSuffix. +func New(apiGroupSuffix string) (_ *runtime.Scheme, oauth schema.GroupVersion) { + // standard set up of the server side scheme + scheme := runtime.NewScheme() + + // add the options to empty v1 + metav1.AddToGroupVersion(scheme, metav1.Unversioned) + + // nothing fancy is required if using the standard group suffix + if apiGroupSuffix == groupsuffix.PinnipedDefaultSuffix { + schemeBuilder := runtime.NewSchemeBuilder( + oauthv1alpha1.AddToScheme, + oauthapi.AddToScheme, + ) + utilruntime.Must(schemeBuilder.AddToScheme(scheme)) + return scheme, oauthv1alpha1.SchemeGroupVersion + } + + oauthVirtualSupervisorGroupData := groupsuffix.SupervisorAggregatedGroups(apiGroupSuffix) + + addToSchemeAtNewGroup(scheme, oauthv1alpha1.GroupName, oauthVirtualSupervisorGroupData.Group, oauthv1alpha1.AddToScheme, oauthapi.AddToScheme) + + // manually register conversions and defaulting into the correct scheme since we cannot directly call AddToScheme + schemeBuilder := runtime.NewSchemeBuilder( + oauthv1alpha1.RegisterConversions, + oauthv1alpha1.RegisterDefaults, + ) + utilruntime.Must(schemeBuilder.AddToScheme(scheme)) + + // we do not have any defaulting functions for *loginv1alpha1.OIDCClientSecretRequest + // today, but we may have some in the future. Calling AddTypeDefaultingFunc overwrites + // any previously registered defaulting function. Thus to make sure that we catch + // a situation where we add a defaulting func, we attempt to call it here with a nil + // *oauthv1alpha1.OIDCClientSecretRequest. This will do nothing when there is no + // defaulting func registered, but it will almost certainly panic if one is added. + scheme.Default((*oauthv1alpha1.OIDCClientSecretRequest)(nil)) + + return scheme, schema.GroupVersion(oauthVirtualSupervisorGroupData) +} + +func addToSchemeAtNewGroup(scheme *runtime.Scheme, oldGroup, newGroup string, funcs ...func(*runtime.Scheme) error) { + // we need a temporary place to register our types to avoid double registering them + tmpScheme := runtime.NewScheme() + schemeBuilder := runtime.NewSchemeBuilder(funcs...) + utilruntime.Must(schemeBuilder.AddToScheme(tmpScheme)) + + for gvk := range tmpScheme.AllKnownTypes() { + if gvk.GroupVersion() == metav1.Unversioned { + continue // metav1.AddToGroupVersion registers types outside of our aggregated API group that we need to ignore + } + + if gvk.Group != oldGroup { + panic(fmt.Errorf("tmp scheme has type not in the old aggregated API group %s: %s", oldGroup, gvk)) // programmer error + } + + obj, err := tmpScheme.New(gvk) + if err != nil { + panic(err) // programmer error, scheme internal code is broken + } + newGVK := schema.GroupVersionKind{ + Group: newGroup, + Version: gvk.Version, + Kind: gvk.Kind, + } + + // register the existing type but with the new group in the correct scheme + scheme.AddKnownTypeWithName(newGVK, obj) + } +} diff --git a/internal/supervisor/scheme/scheme_test.go b/internal/supervisor/scheme/scheme_test.go new file mode 100644 index 00000000..80d1e1f8 --- /dev/null +++ b/internal/supervisor/scheme/scheme_test.go @@ -0,0 +1,139 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package scheme + +import ( + "reflect" + "testing" + + "github.com/stretchr/testify/require" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + + oauthapi "go.pinniped.dev/generated/latest/apis/supervisor/virtual/oauth" + oauthv1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/virtual/oauth/v1alpha1" +) + +func TestNew(t *testing.T) { + // the standard group + regularOAuthGV := schema.GroupVersion{ + Group: "oauth.virtual.supervisor.pinniped.dev", + Version: "v1alpha1", + } + regularOAuthGVInternal := schema.GroupVersion{ + Group: "oauth.virtual.supervisor.pinniped.dev", + Version: runtime.APIVersionInternal, + } + + // the canonical other group + otherOAuthGV := schema.GroupVersion{ + Group: "oauth.virtual.supervisor.walrus.tld", + Version: "v1alpha1", + } + otherOAuthGVInternal := schema.GroupVersion{ + Group: "oauth.virtual.supervisor.walrus.tld", + Version: runtime.APIVersionInternal, + } + + // kube's core internal + internalGV := schema.GroupVersion{ + Group: "", + Version: runtime.APIVersionInternal, + } + + tests := []struct { + name string + apiGroupSuffix string + want map[schema.GroupVersionKind]reflect.Type + wantOAuthGroupVersion schema.GroupVersion + }{ + { + name: "regular api group", + apiGroupSuffix: "pinniped.dev", + want: map[schema.GroupVersionKind]reflect.Type{ + // all the types that are in the aggregated API group + + regularOAuthGV.WithKind("OIDCClientSecretRequest"): reflect.TypeOf(&oauthv1alpha1.OIDCClientSecretRequest{}).Elem(), + + regularOAuthGVInternal.WithKind("OIDCClientSecretRequest"): reflect.TypeOf(&oauthapi.OIDCClientSecretRequest{}).Elem(), + + regularOAuthGV.WithKind("CreateOptions"): reflect.TypeOf(&metav1.CreateOptions{}).Elem(), + regularOAuthGV.WithKind("DeleteOptions"): reflect.TypeOf(&metav1.DeleteOptions{}).Elem(), + regularOAuthGV.WithKind("GetOptions"): reflect.TypeOf(&metav1.GetOptions{}).Elem(), + regularOAuthGV.WithKind("ListOptions"): reflect.TypeOf(&metav1.ListOptions{}).Elem(), + regularOAuthGV.WithKind("PatchOptions"): reflect.TypeOf(&metav1.PatchOptions{}).Elem(), + regularOAuthGV.WithKind("UpdateOptions"): reflect.TypeOf(&metav1.UpdateOptions{}).Elem(), + regularOAuthGV.WithKind("WatchEvent"): reflect.TypeOf(&metav1.WatchEvent{}).Elem(), + + regularOAuthGVInternal.WithKind("WatchEvent"): reflect.TypeOf(&metav1.InternalEvent{}).Elem(), + + // the types below this line do not really matter to us because they are in the core group + + internalGV.WithKind("WatchEvent"): reflect.TypeOf(&metav1.InternalEvent{}).Elem(), + + metav1.Unversioned.WithKind("APIGroup"): reflect.TypeOf(&metav1.APIGroup{}).Elem(), + metav1.Unversioned.WithKind("APIGroupList"): reflect.TypeOf(&metav1.APIGroupList{}).Elem(), + metav1.Unversioned.WithKind("APIResourceList"): reflect.TypeOf(&metav1.APIResourceList{}).Elem(), + metav1.Unversioned.WithKind("APIVersions"): reflect.TypeOf(&metav1.APIVersions{}).Elem(), + metav1.Unversioned.WithKind("CreateOptions"): reflect.TypeOf(&metav1.CreateOptions{}).Elem(), + metav1.Unversioned.WithKind("DeleteOptions"): reflect.TypeOf(&metav1.DeleteOptions{}).Elem(), + metav1.Unversioned.WithKind("GetOptions"): reflect.TypeOf(&metav1.GetOptions{}).Elem(), + metav1.Unversioned.WithKind("ListOptions"): reflect.TypeOf(&metav1.ListOptions{}).Elem(), + metav1.Unversioned.WithKind("PatchOptions"): reflect.TypeOf(&metav1.PatchOptions{}).Elem(), + metav1.Unversioned.WithKind("Status"): reflect.TypeOf(&metav1.Status{}).Elem(), + metav1.Unversioned.WithKind("UpdateOptions"): reflect.TypeOf(&metav1.UpdateOptions{}).Elem(), + metav1.Unversioned.WithKind("WatchEvent"): reflect.TypeOf(&metav1.WatchEvent{}).Elem(), + }, + wantOAuthGroupVersion: regularOAuthGV, + }, + { + name: "other api group", + apiGroupSuffix: "walrus.tld", + want: map[schema.GroupVersionKind]reflect.Type{ + // all the types that are in the aggregated API group + + otherOAuthGV.WithKind("OIDCClientSecretRequest"): reflect.TypeOf(&oauthv1alpha1.OIDCClientSecretRequest{}).Elem(), + + otherOAuthGVInternal.WithKind("OIDCClientSecretRequest"): reflect.TypeOf(&oauthapi.OIDCClientSecretRequest{}).Elem(), + + otherOAuthGV.WithKind("CreateOptions"): reflect.TypeOf(&metav1.CreateOptions{}).Elem(), + otherOAuthGV.WithKind("DeleteOptions"): reflect.TypeOf(&metav1.DeleteOptions{}).Elem(), + otherOAuthGV.WithKind("GetOptions"): reflect.TypeOf(&metav1.GetOptions{}).Elem(), + otherOAuthGV.WithKind("ListOptions"): reflect.TypeOf(&metav1.ListOptions{}).Elem(), + otherOAuthGV.WithKind("PatchOptions"): reflect.TypeOf(&metav1.PatchOptions{}).Elem(), + otherOAuthGV.WithKind("UpdateOptions"): reflect.TypeOf(&metav1.UpdateOptions{}).Elem(), + otherOAuthGV.WithKind("WatchEvent"): reflect.TypeOf(&metav1.WatchEvent{}).Elem(), + + otherOAuthGVInternal.WithKind("WatchEvent"): reflect.TypeOf(&metav1.InternalEvent{}).Elem(), + + // the types below this line do not really matter to us because they are in the core group + + internalGV.WithKind("WatchEvent"): reflect.TypeOf(&metav1.InternalEvent{}).Elem(), + + metav1.Unversioned.WithKind("APIGroup"): reflect.TypeOf(&metav1.APIGroup{}).Elem(), + metav1.Unversioned.WithKind("APIGroupList"): reflect.TypeOf(&metav1.APIGroupList{}).Elem(), + metav1.Unversioned.WithKind("APIResourceList"): reflect.TypeOf(&metav1.APIResourceList{}).Elem(), + metav1.Unversioned.WithKind("APIVersions"): reflect.TypeOf(&metav1.APIVersions{}).Elem(), + metav1.Unversioned.WithKind("CreateOptions"): reflect.TypeOf(&metav1.CreateOptions{}).Elem(), + metav1.Unversioned.WithKind("DeleteOptions"): reflect.TypeOf(&metav1.DeleteOptions{}).Elem(), + metav1.Unversioned.WithKind("GetOptions"): reflect.TypeOf(&metav1.GetOptions{}).Elem(), + metav1.Unversioned.WithKind("ListOptions"): reflect.TypeOf(&metav1.ListOptions{}).Elem(), + metav1.Unversioned.WithKind("PatchOptions"): reflect.TypeOf(&metav1.PatchOptions{}).Elem(), + metav1.Unversioned.WithKind("Status"): reflect.TypeOf(&metav1.Status{}).Elem(), + metav1.Unversioned.WithKind("UpdateOptions"): reflect.TypeOf(&metav1.UpdateOptions{}).Elem(), + metav1.Unversioned.WithKind("WatchEvent"): reflect.TypeOf(&metav1.WatchEvent{}).Elem(), + }, + wantOAuthGroupVersion: otherOAuthGV, + }, + } + for _, tt := range tests { + tt := tt + t.Run(tt.name, func(t *testing.T) { + scheme, oauthGV := New(tt.apiGroupSuffix) + require.Equal(t, tt.want, scheme.AllKnownTypes()) + require.Equal(t, tt.wantOAuthGroupVersion, oauthGV) + }) + } +} diff --git a/internal/supervisor/server/server.go b/internal/supervisor/server/server.go index 772f0f5a..d4320091 100644 --- a/internal/supervisor/server/server.go +++ b/internal/supervisor/server/server.go @@ -22,18 +22,26 @@ import ( "github.com/joshlf/go-acl" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer" apimachineryversion "k8s.io/apimachinery/pkg/version" genericapifilters "k8s.io/apiserver/pkg/endpoints/filters" + genericapiserver "k8s.io/apiserver/pkg/server" + genericoptions "k8s.io/apiserver/pkg/server/options" kubeinformers "k8s.io/client-go/informers" "k8s.io/client-go/kubernetes" "k8s.io/client-go/pkg/version" "k8s.io/client-go/rest" + aggregatorclient "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset" "k8s.io/utils/clock" configv1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/config/v1alpha1" pinnipedclientset "go.pinniped.dev/generated/latest/client/supervisor/clientset/versioned" pinnipedinformers "go.pinniped.dev/generated/latest/client/supervisor/informers/externalversions" + "go.pinniped.dev/internal/apiserviceref" "go.pinniped.dev/internal/config/supervisor" + "go.pinniped.dev/internal/controller/apicerts" "go.pinniped.dev/internal/controller/supervisorconfig" "go.pinniped.dev/internal/controller/supervisorconfig/activedirectoryupstreamwatcher" "go.pinniped.dev/internal/controller/supervisorconfig/generator" @@ -45,6 +53,7 @@ import ( "go.pinniped.dev/internal/crypto/ptls" "go.pinniped.dev/internal/deploymentref" "go.pinniped.dev/internal/downward" + "go.pinniped.dev/internal/dynamiccert" "go.pinniped.dev/internal/groupsuffix" "go.pinniped.dev/internal/kubeclient" "go.pinniped.dev/internal/leaderelection" @@ -53,6 +62,8 @@ import ( "go.pinniped.dev/internal/oidc/provider/manager" "go.pinniped.dev/internal/plog" "go.pinniped.dev/internal/secret" + "go.pinniped.dev/internal/supervisor/apiserver" + supervisorscheme "go.pinniped.dev/internal/supervisor/scheme" ) const ( @@ -116,14 +127,18 @@ func prepareControllers( dynamicJWKSProvider jwks.DynamicJWKSProvider, dynamicTLSCertProvider provider.DynamicTLSCertProvider, dynamicUpstreamIDPProvider provider.DynamicUpstreamIDPProvider, + dynamicServingCertProvider dynamiccert.Private, secretCache *secret.Cache, supervisorDeployment *appsv1.Deployment, kubeClient kubernetes.Interface, pinnipedClient pinnipedclientset.Interface, + aggregatorClient aggregatorclient.Interface, kubeInformers kubeinformers.SharedInformerFactory, pinnipedInformers pinnipedinformers.SharedInformerFactory, leaderElector controllerinit.RunnerWrapper, + podInfo *downward.PodInfo, ) controllerinit.RunnerBuilder { + oauthSupervisorGroupData := groupsuffix.SupervisorAggregatedGroups(*cfg.APIGroupSuffix) federationDomainInformer := pinnipedInformers.Config().V1alpha1().FederationDomains() secretInformer := kubeInformers.Core().V1().Secrets() @@ -291,30 +306,69 @@ func prepareControllers( secretInformer, controllerlib.WithInformer, ), - singletonWorker) + singletonWorker). + WithController( + apicerts.NewCertsManagerController( + podInfo.Namespace, + "pinniped-supervisor-api-tls-serving-certificate", + cfg.Labels, + kubeClient, + secretInformer, + controllerlib.WithInformer, + controllerlib.WithInitialEvent, + 31536000*time.Second, + "Pinniped Aggregation CA", + cfg.NamesConfig.APIService, + ), + singletonWorker, + ). + WithController( + apicerts.NewAPIServiceUpdaterController( + podInfo.Namespace, + "pinniped-supervisor-api-tls-serving-certificate", + oauthSupervisorGroupData.APIServiceName(), + aggregatorClient, + secretInformer, + controllerlib.WithInformer, + ), + singletonWorker, + ). + WithController( + apicerts.NewCertsObserverController( + podInfo.Namespace, + "pinniped-supervisor-api-tls-serving-certificate", + dynamicServingCertProvider, + secretInformer, + controllerlib.WithInformer, + ), + singletonWorker, + ). + WithController( + apicerts.NewCertsExpirerController( + podInfo.Namespace, + "pinniped-supervisor-api-tls-serving-certificate", + kubeClient, + secretInformer, + controllerlib.WithInformer, + 23328000*time.Second, + apicerts.TLSCertificateChainSecretKey, + plog.New(), + ), + singletonWorker, + ) return controllerinit.Prepare(controllerManager.Start, leaderElector, kubeInformers, pinnipedInformers) } -func startControllers(ctx context.Context, shutdown *sync.WaitGroup, buildControllers controllerinit.RunnerBuilder) error { - runControllers, err := buildControllers(ctx) - if err != nil { - return fmt.Errorf("cannot create run controller func: %w", err) - } - - shutdown.Add(1) - go func() { - defer shutdown.Done() - - runControllers(ctx) - }() - - return nil -} - //nolint:funlen func runSupervisor(ctx context.Context, podInfo *downward.PodInfo, cfg *supervisor.Config) error { serverInstallationNamespace := podInfo.Namespace + oauthSupervisorGroupData := groupsuffix.SupervisorAggregatedGroups(*cfg.APIGroupSuffix) + + apiServiceRef, err := apiserviceref.New(oauthSupervisorGroupData.APIServiceName()) + if err != nil { + return fmt.Errorf("cannot create API service ref: %w", err) + } dref, supervisorDeployment, supervisorPod, err := deploymentref.New(podInfo) if err != nil { @@ -323,6 +377,7 @@ func runSupervisor(ctx context.Context, podInfo *downward.PodInfo, cfg *supervis opts := []kubeclient.Option{ dref, + apiServiceRef, kubeclient.WithMiddleware(groupsuffix.New(*cfg.APIGroupSuffix)), } @@ -358,6 +413,8 @@ func runSupervisor(ctx context.Context, podInfo *downward.PodInfo, cfg *supervis _, _ = writer.Write([]byte("ok")) })) + dynamicServingCertProvider := dynamiccert.NewServingCert("supervisor-serving-cert") + dynamicJWKSProvider := jwks.NewDynamicJWKSProvider() dynamicTLSCertProvider := provider.NewDynamicTLSCertProvider() dynamicUpstreamIDPProvider := provider.NewDynamicUpstreamIDPProvider() @@ -372,25 +429,47 @@ func runSupervisor(ctx context.Context, podInfo *downward.PodInfo, cfg *supervis clientWithoutLeaderElection.Kubernetes.CoreV1().Secrets(serverInstallationNamespace), // writes to kube storage are allowed for non-leaders ) + // Get the "real" name of the oauth virtual supervisor API group (i.e., the API group name with the + // injected suffix). + scheme, oauthGV := supervisorscheme.New(*cfg.APIGroupSuffix) + buildControllersFunc := prepareControllers( cfg, oidProvidersManager, dynamicJWKSProvider, dynamicTLSCertProvider, dynamicUpstreamIDPProvider, + dynamicServingCertProvider, &secretCache, supervisorDeployment, client.Kubernetes, client.PinnipedSupervisor, + client.Aggregation, kubeInformers, pinnipedInformers, leaderElector, + podInfo, ) shutdown := &sync.WaitGroup{} - if err := startControllers(ctx, shutdown, buildControllersFunc); err != nil { - return err + // Get the aggregated API server config. + aggregatedAPIServerConfig, err := getAggregatedAPIServerConfig( + dynamicServingCertProvider, + buildControllersFunc, + *cfg.APIGroupSuffix, + 10250, + scheme, + oauthGV, + ) + if err != nil { + return fmt.Errorf("could not configure aggregated API server: %w", err) + } + + // Complete the aggregated API server config and make a server instance. + server, err := aggregatedAPIServerConfig.Complete().New() + if err != nil { + return fmt.Errorf("could not create aggregated API server: %w", err) } if e := cfg.Endpoints.HTTP; e.Network != supervisor.NetworkDisabled { @@ -465,11 +544,73 @@ func runSupervisor(ctx context.Context, podInfo *downward.PodInfo, cfg *supervis plog.Debug("supervisor started") defer plog.Debug("supervisor exiting") + // Run the server. Its post-start hook will start the controllers. + err = server.GenericAPIServer.PrepareRun().Run(ctx.Done()) + if err != nil { + return err + } shutdown.Wait() return nil } +// Create a configuration for the aggregated API server. +func getAggregatedAPIServerConfig( + dynamicCertProvider dynamiccert.Private, + buildControllers controllerinit.RunnerBuilder, + apiGroupSuffix string, + aggregatedAPIServerPort int64, + scheme *runtime.Scheme, + oauthVirtualSupervisorGroupVersion schema.GroupVersion, +) (*apiserver.Config, error) { + codecs := serializer.NewCodecFactory(scheme) + + // this is unused for now but it is a safe value that we could use in the future + defaultEtcdPathPrefix := fmt.Sprintf("/pinniped-concierge-registry/%s", apiGroupSuffix) + + recommendedOptions := genericoptions.NewRecommendedOptions( + defaultEtcdPathPrefix, + codecs.LegacyCodec(oauthVirtualSupervisorGroupVersion), + ) + recommendedOptions.Etcd = nil // turn off etcd storage because we don't need it yet + recommendedOptions.SecureServing.ServerCert.GeneratedCert = dynamicCertProvider + + // This port is configurable. It should be safe to cast because the config reader already validated it. + recommendedOptions.SecureServing.BindPort = int(aggregatedAPIServerPort) + + // secure TLS for connections coming from and going to the Kube API server + // this is best effort because not all options provide the right hooks to override TLS config + // since our only client is the Kube API server, this uses the most secure TLS config + if err := ptls.SecureRecommendedOptions(recommendedOptions, kubeclient.Secure); err != nil { + return nil, fmt.Errorf("failed to secure recommended options: %w", err) + } + + serverConfig := genericapiserver.NewRecommendedConfig(codecs) + // Note that among other things, this ApplyTo() function copies + // `recommendedOptions.SecureServing.ServerCert.GeneratedCert` into + // `serverConfig.SecureServing.Cert` thus making `dynamicCertProvider` + // the cert provider for the running server. The provider will be called + // by the API machinery periodically. When the provider returns nil certs, + // the API server will return "the server is currently unable to + // handle the request" error responses for all incoming requests. + // If the provider later starts returning certs, then the API server + // will use them to handle the incoming requests successfully. + if err := recommendedOptions.ApplyTo(serverConfig); err != nil { + return nil, fmt.Errorf("failed to apply recommended options: %w", err) + } + + apiServerConfig := &apiserver.Config{ + GenericConfig: serverConfig, + ExtraConfig: apiserver.ExtraConfig{ + BuildControllersPostStartHook: buildControllers, + Scheme: scheme, + NegotiatedSerializer: codecs, + OauthVirtualSupervisorGroupVersion: oauthVirtualSupervisorGroupVersion, + }, + } + return apiServerConfig, nil +} + func maybeSetupUnixPerms(endpoint *supervisor.Endpoint, pod *corev1.Pod) func() error { if endpoint.Network != supervisor.NetworkUnix { return func() error { return nil } diff --git a/test/integration/kube_api_discovery_test.go b/test/integration/kube_api_discovery_test.go index c0d243cf..835dcf0a 100644 --- a/test/integration/kube_api_discovery_test.go +++ b/test/integration/kube_api_discovery_test.go @@ -54,6 +54,7 @@ func TestGetAPIResourceList(t *testing.T) { idpSupervisorGV := makeGV("idp", "supervisor") configSupervisorGV := makeGV("config", "supervisor") oauthSupervisorGV := makeGV("oauth", "supervisor") + oauthVirtualSupervisorGV := makeGV("oauth.virtual", "supervisor") tests := []struct { group metav1.APIGroup @@ -111,6 +112,32 @@ func TestGetAPIResourceList(t *testing.T) { }, }, }, + { + group: metav1.APIGroup{ + Name: oauthVirtualSupervisorGV.Group, + Versions: []metav1.GroupVersionForDiscovery{ + { + GroupVersion: oauthVirtualSupervisorGV.String(), + Version: oauthVirtualSupervisorGV.Version, + }, + }, + PreferredVersion: metav1.GroupVersionForDiscovery{ + GroupVersion: oauthVirtualSupervisorGV.String(), + Version: oauthVirtualSupervisorGV.Version, + }, + }, + resourceByVersion: map[string][]metav1.APIResource{ + oauthVirtualSupervisorGV.String(): { + { + Name: "oidcclientsecretrequests", + Kind: "OIDCClientSecretRequest", + Verbs: []string{"create"}, + Namespaced: true, + Categories: nil, + }, + }, + }, + }, { group: metav1.APIGroup{ Name: configSupervisorGV.Group, @@ -347,6 +374,11 @@ func TestGetAPIResourceList(t *testing.T) { if strings.HasSuffix(a.Name, "/status") { continue } + if a.Name == "oidcclientsecretrequests" { + // OIDCClientSecretRequest does not implement list, + // so it doesn't make sense for it to belong to a category. + continue + } assert.Containsf(t, a.Categories, "pinniped", "expected resource %q to be in the 'pinniped' category", a.Name) assert.NotContainsf(t, a.Categories, "all", "expected resource %q not to be in the 'all' category", a.Name) } @@ -373,7 +405,7 @@ func TestGetAPIResourceList(t *testing.T) { t.Run("every API has a status subresource", func(t *testing.T) { t.Parallel() - aggregatedAPIs := sets.NewString("tokencredentialrequests", "whoamirequests") + aggregatedAPIs := sets.NewString("tokencredentialrequests", "whoamirequests", "oidcclientsecretrequests") var regular, status []string From 37884e7015692188627b9ad214ee481da237d994 Mon Sep 17 00:00:00 2001 From: Margo Crawford Date: Thu, 9 Jun 2022 14:39:06 -0700 Subject: [PATCH 02/11] reran update.sh to get the codegen up to date Signed-off-by: Margo Crawford --- generated/1.17/README.adoc | 4 ++-- generated/1.18/README.adoc | 4 ++-- generated/1.19/README.adoc | 4 ++-- generated/1.20/README.adoc | 4 ++-- generated/1.21/README.adoc | 4 ++-- generated/1.22/README.adoc | 4 ++-- generated/1.23/README.adoc | 4 ++-- .../1.23/client/concierge/clientset/versioned/clientset.go | 4 ---- .../1.23/client/supervisor/clientset/versioned/clientset.go | 4 ---- 9 files changed, 14 insertions(+), 22 deletions(-) diff --git a/generated/1.17/README.adoc b/generated/1.17/README.adoc index 0b90292d..5e679530 100644 --- a/generated/1.17/README.adoc +++ b/generated/1.17/README.adoc @@ -1380,9 +1380,9 @@ OIDCClientSpec is a struct that describes an OIDC Client. | Field | Description | *`allowedRedirectURIs`* __string array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be https, unless it is a loopback. | *`allowedGrantTypes`* __GrantType array__ | allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. + Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. | *`allowedScopes`* __Scope array__ | allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. + Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. |=== diff --git a/generated/1.18/README.adoc b/generated/1.18/README.adoc index db96bb48..0d78ed03 100644 --- a/generated/1.18/README.adoc +++ b/generated/1.18/README.adoc @@ -1380,9 +1380,9 @@ OIDCClientSpec is a struct that describes an OIDC Client. | Field | Description | *`allowedRedirectURIs`* __string array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be https, unless it is a loopback. | *`allowedGrantTypes`* __GrantType array__ | allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. + Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. | *`allowedScopes`* __Scope array__ | allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. + Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. |=== diff --git a/generated/1.19/README.adoc b/generated/1.19/README.adoc index 29d52abb..5bb2e556 100644 --- a/generated/1.19/README.adoc +++ b/generated/1.19/README.adoc @@ -1380,9 +1380,9 @@ OIDCClientSpec is a struct that describes an OIDC Client. | Field | Description | *`allowedRedirectURIs`* __string array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be https, unless it is a loopback. | *`allowedGrantTypes`* __GrantType array__ | allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. + Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. | *`allowedScopes`* __Scope array__ | allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. + Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. |=== diff --git a/generated/1.20/README.adoc b/generated/1.20/README.adoc index f58d5ad8..61422b6e 100644 --- a/generated/1.20/README.adoc +++ b/generated/1.20/README.adoc @@ -1380,9 +1380,9 @@ OIDCClientSpec is a struct that describes an OIDC Client. | Field | Description | *`allowedRedirectURIs`* __string array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be https, unless it is a loopback. | *`allowedGrantTypes`* __GrantType array__ | allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. + Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. | *`allowedScopes`* __Scope array__ | allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. + Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. |=== diff --git a/generated/1.21/README.adoc b/generated/1.21/README.adoc index e83a59ea..1c16381d 100644 --- a/generated/1.21/README.adoc +++ b/generated/1.21/README.adoc @@ -1380,9 +1380,9 @@ OIDCClientSpec is a struct that describes an OIDC Client. | Field | Description | *`allowedRedirectURIs`* __string array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be https, unless it is a loopback. | *`allowedGrantTypes`* __GrantType array__ | allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. + Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. | *`allowedScopes`* __Scope array__ | allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. + Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. |=== diff --git a/generated/1.22/README.adoc b/generated/1.22/README.adoc index 55db1f5b..26125e76 100644 --- a/generated/1.22/README.adoc +++ b/generated/1.22/README.adoc @@ -1380,9 +1380,9 @@ OIDCClientSpec is a struct that describes an OIDC Client. | Field | Description | *`allowedRedirectURIs`* __string array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be https, unless it is a loopback. | *`allowedGrantTypes`* __GrantType array__ | allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. + Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. | *`allowedScopes`* __Scope array__ | allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. + Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. |=== diff --git a/generated/1.23/README.adoc b/generated/1.23/README.adoc index d078f60c..c6cbd149 100644 --- a/generated/1.23/README.adoc +++ b/generated/1.23/README.adoc @@ -1380,9 +1380,9 @@ OIDCClientSpec is a struct that describes an OIDC Client. | Field | Description | *`allowedRedirectURIs`* __string array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be https, unless it is a loopback. | *`allowedGrantTypes`* __GrantType array__ | allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. + Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. | *`allowedScopes`* __Scope array__ | allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. + Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. |=== diff --git a/generated/1.23/client/concierge/clientset/versioned/clientset.go b/generated/1.23/client/concierge/clientset/versioned/clientset.go index e026c5f0..ba3cb60b 100644 --- a/generated/1.23/client/concierge/clientset/versioned/clientset.go +++ b/generated/1.23/client/concierge/clientset/versioned/clientset.go @@ -72,10 +72,6 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c - if configShallowCopy.UserAgent == "" { - configShallowCopy.UserAgent = rest.DefaultKubernetesUserAgent() - } - // share the transport between all clients httpClient, err := rest.HTTPClientFor(&configShallowCopy) if err != nil { diff --git a/generated/1.23/client/supervisor/clientset/versioned/clientset.go b/generated/1.23/client/supervisor/clientset/versioned/clientset.go index 0347d1bb..b0f81c08 100644 --- a/generated/1.23/client/supervisor/clientset/versioned/clientset.go +++ b/generated/1.23/client/supervisor/clientset/versioned/clientset.go @@ -64,10 +64,6 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c - if configShallowCopy.UserAgent == "" { - configShallowCopy.UserAgent = rest.DefaultKubernetesUserAgent() - } - // share the transport between all clients httpClient, err := rest.HTTPClientFor(&configShallowCopy) if err != nil { From 157b5a70796fec7d28c3044caa40ffe00be1d5d5 Mon Sep 17 00:00:00 2001 From: Margo Crawford Date: Fri, 10 Jun 2022 07:55:46 -0700 Subject: [PATCH 03/11] Update 1.24 codegen Signed-off-by: Margo Crawford --- generated/1.24/README.adoc | 94 +++++++++++++ .../1.24/apis/supervisor/virtual/oauth/doc.go | 8 ++ .../apis/supervisor/virtual/oauth/register.go | 37 +++++ .../oauth/types_oidcclientsecretrequest.go | 25 ++++ .../virtual/oauth/v1alpha1/conversion.go | 4 + .../virtual/oauth/v1alpha1/defaults.go | 12 ++ .../supervisor/virtual/oauth/v1alpha1/doc.go | 11 ++ .../virtual/oauth/v1alpha1/register.go | 42 ++++++ .../v1alpha1/types_oidcclientsecretrequest.go | 28 ++++ .../oauth/v1alpha1/zz_generated.conversion.go | 131 ++++++++++++++++++ .../oauth/v1alpha1/zz_generated.deepcopy.go | 73 ++++++++++ .../oauth/v1alpha1/zz_generated.defaults.go | 20 +++ .../virtual/oauth/zz_generated.deepcopy.go | 73 ++++++++++ .../virtual/clientset/versioned/clientset.go | 108 +++++++++++++++ .../virtual/clientset/versioned/doc.go | 7 + .../versioned/fake/clientset_generated.go | 72 ++++++++++ .../virtual/clientset/versioned/fake/doc.go | 7 + .../clientset/versioned/fake/register.go | 43 ++++++ .../virtual/clientset/versioned/scheme/doc.go | 7 + .../clientset/versioned/scheme/register.go | 43 ++++++ .../versioned/typed/oauth/v1alpha1/doc.go | 7 + .../typed/oauth/v1alpha1/fake/doc.go | 7 + .../oauth/v1alpha1/fake/fake_oauth_client.go | 27 ++++ .../fake/fake_oidcclientsecretrequest.go | 36 +++++ .../oauth/v1alpha1/generated_expansion.go | 8 ++ .../typed/oauth/v1alpha1/oauth_client.go | 94 +++++++++++++ .../oauth/v1alpha1/oidcclientsecretrequest.go | 54 ++++++++ .../virtual/clientset/versioned/clientset.go | 4 + 28 files changed, 1082 insertions(+) create mode 100644 generated/1.24/apis/supervisor/virtual/oauth/doc.go create mode 100644 generated/1.24/apis/supervisor/virtual/oauth/register.go create mode 100644 generated/1.24/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go create mode 100644 generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/conversion.go create mode 100644 generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/defaults.go create mode 100644 generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/doc.go create mode 100644 generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/register.go create mode 100644 generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go create mode 100644 generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go create mode 100644 generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go create mode 100644 generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go create mode 100644 generated/1.24/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go create mode 100644 generated/1.24/client/supervisor/virtual/clientset/versioned/clientset.go create mode 100644 generated/1.24/client/supervisor/virtual/clientset/versioned/doc.go create mode 100644 generated/1.24/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go create mode 100644 generated/1.24/client/supervisor/virtual/clientset/versioned/fake/doc.go create mode 100644 generated/1.24/client/supervisor/virtual/clientset/versioned/fake/register.go create mode 100644 generated/1.24/client/supervisor/virtual/clientset/versioned/scheme/doc.go create mode 100644 generated/1.24/client/supervisor/virtual/clientset/versioned/scheme/register.go create mode 100644 generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go create mode 100644 generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go create mode 100644 generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go create mode 100644 generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go create mode 100644 generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go create mode 100644 generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go create mode 100644 generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go diff --git a/generated/1.24/README.adoc b/generated/1.24/README.adoc index 381b2f7e..d1eff286 100644 --- a/generated/1.24/README.adoc +++ b/generated/1.24/README.adoc @@ -13,6 +13,8 @@ - xref:{anchor_prefix}-idp-supervisor-pinniped-dev-v1alpha1[$$idp.supervisor.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-login-concierge-pinniped-dev-v1alpha1[$$login.concierge.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-oauth-supervisor-pinniped-dev-v1alpha1[$$oauth.supervisor.pinniped.dev/v1alpha1$$] +- xref:{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-oauth[$$oauth.virtual.supervisor.pinniped.dev/oauth$$] +- xref:{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-v1alpha1[$$oauth.virtual.supervisor.pinniped.dev/v1alpha1$$] [id="{anchor_prefix}-authentication-concierge-pinniped-dev-v1alpha1"] @@ -1386,3 +1388,95 @@ OIDCClientSpec is a struct that describes an OIDC Client. + +[id="{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-oauth"] +=== oauth.virtual.supervisor.pinniped.dev/oauth + +Package oauth is the internal version of the Pinniped virtual oauth API. + + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-virtual-oauth-oidcclientsecretrequestspec"] +==== OIDCClientSecretRequestSpec + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-virtual-oauth-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generateNewSecret`* __boolean__ | +| *`revokeOldSecrets`* __boolean__ | +|=== + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-virtual-oauth-oidcclientsecretrequeststatus"] +==== OIDCClientSecretRequestStatus + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-virtual-oauth-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generatedSecret`* __string__ | +| *`totalClientSecrets`* __integer__ | +|=== + + + +[id="{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-v1alpha1"] +=== oauth.virtual.supervisor.pinniped.dev/v1alpha1 + +Package v1alpha1 is the v1alpha1 version of the Pinniped virtual oauth API. + + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequestspec"] +==== OIDCClientSecretRequestSpec + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generateNewSecret`* __boolean__ | +| *`revokeOldSecrets`* __boolean__ | +|=== + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequeststatus"] +==== OIDCClientSecretRequestStatus + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generatedSecret`* __string__ | +| *`totalClientSecrets`* __integer__ | +|=== + + diff --git a/generated/1.24/apis/supervisor/virtual/oauth/doc.go b/generated/1.24/apis/supervisor/virtual/oauth/doc.go new file mode 100644 index 00000000..ca4e9a63 --- /dev/null +++ b/generated/1.24/apis/supervisor/virtual/oauth/doc.go @@ -0,0 +1,8 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// +k8s:deepcopy-gen=package +// +groupName=oauth.virtual.supervisor.pinniped.dev + +// Package oauth is the internal version of the Pinniped virtual oauth API. +package oauth diff --git a/generated/1.24/apis/supervisor/virtual/oauth/register.go b/generated/1.24/apis/supervisor/virtual/oauth/register.go new file mode 100644 index 00000000..a238d85f --- /dev/null +++ b/generated/1.24/apis/supervisor/virtual/oauth/register.go @@ -0,0 +1,37 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package oauth + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +const GroupName = "oauth.virtual.supervisor.pinniped.dev" + +// SchemeGroupVersion is group version used to register these objects. +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} + +// Kind takes an unqualified kind and returns back a Group qualified GroupKind. +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Resource takes an unqualified resource and returns back a Group qualified GroupResource. +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + AddToScheme = SchemeBuilder.AddToScheme +) + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &OIDCClientSecretRequest{}, + ) + return nil +} diff --git a/generated/1.24/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go b/generated/1.24/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go new file mode 100644 index 00000000..ac54a93c --- /dev/null +++ b/generated/1.24/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go @@ -0,0 +1,25 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package oauth + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +type OIDCClientSecretRequestSpec struct { + GenerateNewSecret bool `json:"generateNewSecret"` + RevokeOldSecrets bool `json:"revokeOldSecrets"` +} + +type OIDCClientSecretRequestStatus struct { + GeneratedSecret string `json:"generatedSecret,omitempty"` + TotalClientSecrets int `json:"totalClientSecrets"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequest struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` // metadata.name must be set to the client ID + + Spec OIDCClientSecretRequestSpec `json:"spec"` + Status OIDCClientSecretRequestStatus `json:"status"` +} diff --git a/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/conversion.go b/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/conversion.go new file mode 100644 index 00000000..fcf4e82f --- /dev/null +++ b/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/conversion.go @@ -0,0 +1,4 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 diff --git a/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/defaults.go b/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/defaults.go new file mode 100644 index 00000000..d4f5a9e8 --- /dev/null +++ b/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/defaults.go @@ -0,0 +1,12 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/runtime" +) + +func addDefaultingFuncs(scheme *runtime.Scheme) error { + return RegisterDefaults(scheme) +} diff --git a/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/doc.go b/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/doc.go new file mode 100644 index 00000000..e41fce90 --- /dev/null +++ b/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/doc.go @@ -0,0 +1,11 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen=package +// +k8s:conversion-gen=go.pinniped.dev/generated/1.24/apis/supervisor/virtual/oauth +// +k8s:defaulter-gen=TypeMeta +// +groupName=oauth.virtual.supervisor.pinniped.dev + +// Package v1alpha1 is the v1alpha1 version of the Pinniped virtual oauth API. +package v1alpha1 diff --git a/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/register.go b/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/register.go new file mode 100644 index 00000000..ecc75a08 --- /dev/null +++ b/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/register.go @@ -0,0 +1,42 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +const GroupName = "oauth.virtual.supervisor.pinniped.dev" + +// SchemeGroupVersion is group version used to register these objects. +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} + +var ( + SchemeBuilder runtime.SchemeBuilder + localSchemeBuilder = &SchemeBuilder + AddToScheme = SchemeBuilder.AddToScheme +) + +func init() { + // We only register manually written functions here. The registration of the + // generated functions takes place in the generated files. The separation + // makes the code compile even when the generated files are missing. + localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs) +} + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &OIDCClientSecretRequest{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} + +// Resource takes an unqualified resource and returns back a Group qualified GroupResource. +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} diff --git a/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go b/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go new file mode 100644 index 00000000..dda2f3bb --- /dev/null +++ b/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go @@ -0,0 +1,28 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +type OIDCClientSecretRequestSpec struct { + GenerateNewSecret bool `json:"generateNewSecret"` + RevokeOldSecrets bool `json:"revokeOldSecrets"` +} + +type OIDCClientSecretRequestStatus struct { + GeneratedSecret string `json:"generatedSecret,omitempty"` + TotalClientSecrets int `json:"totalClientSecrets"` +} + +// +genclient +// +genclient:onlyVerbs=create +// +kubebuilder:subresource:status +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequest struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` // metadata.name must be set to the client ID + + Spec OIDCClientSecretRequestSpec `json:"spec"` + Status OIDCClientSecretRequestStatus `json:"status"` +} diff --git a/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go b/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go new file mode 100644 index 00000000..35815fbe --- /dev/null +++ b/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go @@ -0,0 +1,131 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + oauth "go.pinniped.dev/generated/1.24/apis/supervisor/virtual/oauth" + 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((*OIDCClientSecretRequest)(nil), (*oauth.OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(a.(*OIDCClientSecretRequest), b.(*oauth.OIDCClientSecretRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequest)(nil), (*OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(a.(*oauth.OIDCClientSecretRequest), b.(*OIDCClientSecretRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestSpec)(nil), (*oauth.OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(a.(*OIDCClientSecretRequestSpec), b.(*oauth.OIDCClientSecretRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequestSpec)(nil), (*OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(a.(*oauth.OIDCClientSecretRequestSpec), b.(*OIDCClientSecretRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestStatus)(nil), (*oauth.OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(a.(*OIDCClientSecretRequestStatus), b.(*oauth.OIDCClientSecretRequestStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequestStatus)(nil), (*OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(a.(*oauth.OIDCClientSecretRequestStatus), b.(*OIDCClientSecretRequestStatus), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *oauth.OIDCClientSecretRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *oauth.OIDCClientSecretRequest, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in, out, s) +} + +func autoConvert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *oauth.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest is an autogenerated conversion function. +func Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *oauth.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { + return autoConvert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in, out, s) +} + +func autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *oauth.OIDCClientSecretRequestSpec, s conversion.Scope) error { + out.GenerateNewSecret = in.GenerateNewSecret + out.RevokeOldSecrets = in.RevokeOldSecrets + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *oauth.OIDCClientSecretRequestSpec, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in, out, s) +} + +func autoConvert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *oauth.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { + out.GenerateNewSecret = in.GenerateNewSecret + out.RevokeOldSecrets = in.RevokeOldSecrets + return nil +} + +// Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec is an autogenerated conversion function. +func Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *oauth.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { + return autoConvert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in, out, s) +} + +func autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *oauth.OIDCClientSecretRequestStatus, s conversion.Scope) error { + out.GeneratedSecret = in.GeneratedSecret + out.TotalClientSecrets = in.TotalClientSecrets + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *oauth.OIDCClientSecretRequestStatus, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in, out, s) +} + +func autoConvert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *oauth.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { + out.GeneratedSecret = in.GeneratedSecret + out.TotalClientSecrets = in.TotalClientSecrets + return nil +} + +// Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus is an autogenerated conversion function. +func Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *oauth.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { + return autoConvert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in, out, s) +} diff --git a/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go b/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 00000000..e4fce842 --- /dev/null +++ b/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,73 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequest) DeepCopyInto(out *OIDCClientSecretRequest) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequest. +func (in *OIDCClientSecretRequest) DeepCopy() *OIDCClientSecretRequest { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestSpec. +func (in *OIDCClientSecretRequestSpec) DeepCopy() *OIDCClientSecretRequestSpec { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestStatus) DeepCopyInto(out *OIDCClientSecretRequestStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestStatus. +func (in *OIDCClientSecretRequestStatus) DeepCopy() *OIDCClientSecretRequestStatus { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestStatus) + in.DeepCopyInto(out) + return out +} diff --git a/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go b/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go new file mode 100644 index 00000000..9097a935 --- /dev/null +++ b/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go @@ -0,0 +1,20 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/generated/1.24/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go b/generated/1.24/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go new file mode 100644 index 00000000..24b58e7b --- /dev/null +++ b/generated/1.24/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go @@ -0,0 +1,73 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package oauth + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequest) DeepCopyInto(out *OIDCClientSecretRequest) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequest. +func (in *OIDCClientSecretRequest) DeepCopy() *OIDCClientSecretRequest { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestSpec. +func (in *OIDCClientSecretRequestSpec) DeepCopy() *OIDCClientSecretRequestSpec { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestStatus) DeepCopyInto(out *OIDCClientSecretRequestStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestStatus. +func (in *OIDCClientSecretRequestStatus) DeepCopy() *OIDCClientSecretRequestStatus { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestStatus) + in.DeepCopyInto(out) + return out +} diff --git a/generated/1.24/client/supervisor/virtual/clientset/versioned/clientset.go b/generated/1.24/client/supervisor/virtual/clientset/versioned/clientset.go new file mode 100644 index 00000000..bc5111f5 --- /dev/null +++ b/generated/1.24/client/supervisor/virtual/clientset/versioned/clientset.go @@ -0,0 +1,108 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package versioned + +import ( + "fmt" + "net/http" + + oauthv1alpha1 "go.pinniped.dev/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" + discovery "k8s.io/client-go/discovery" + rest "k8s.io/client-go/rest" + flowcontrol "k8s.io/client-go/util/flowcontrol" +) + +type Interface interface { + Discovery() discovery.DiscoveryInterface + OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface +} + +// Clientset contains the clients for groups. Each group has exactly one +// version included in a Clientset. +type Clientset struct { + *discovery.DiscoveryClient + oauthV1alpha1 *oauthv1alpha1.OauthV1alpha1Client +} + +// OauthV1alpha1 retrieves the OauthV1alpha1Client +func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { + return c.oauthV1alpha1 +} + +// Discovery retrieves the DiscoveryClient +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + if c == nil { + return nil + } + return c.DiscoveryClient +} + +// NewForConfig creates a new Clientset for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewForConfig will generate a rate-limiter in configShallowCopy. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). +func NewForConfig(c *rest.Config) (*Clientset, error) { + configShallowCopy := *c + + if configShallowCopy.UserAgent == "" { + configShallowCopy.UserAgent = rest.DefaultKubernetesUserAgent() + } + + // share the transport between all clients + httpClient, err := rest.HTTPClientFor(&configShallowCopy) + if err != nil { + return nil, err + } + + return NewForConfigAndClient(&configShallowCopy, httpClient) +} + +// NewForConfigAndClient creates a new Clientset for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewForConfigAndClient will generate a rate-limiter in configShallowCopy. +func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, error) { + configShallowCopy := *c + if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { + if configShallowCopy.Burst <= 0 { + return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + } + configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) + } + + var cs Clientset + var err error + cs.oauthV1alpha1, err = oauthv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } + + cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } + return &cs, nil +} + +// NewForConfigOrDie creates a new Clientset for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *Clientset { + cs, err := NewForConfig(c) + if err != nil { + panic(err) + } + return cs +} + +// New creates a new Clientset for the given RESTClient. +func New(c rest.Interface) *Clientset { + var cs Clientset + cs.oauthV1alpha1 = oauthv1alpha1.New(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClient(c) + return &cs +} diff --git a/generated/1.24/client/supervisor/virtual/clientset/versioned/doc.go b/generated/1.24/client/supervisor/virtual/clientset/versioned/doc.go new file mode 100644 index 00000000..5dc02e6e --- /dev/null +++ b/generated/1.24/client/supervisor/virtual/clientset/versioned/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated clientset. +package versioned diff --git a/generated/1.24/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go b/generated/1.24/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go new file mode 100644 index 00000000..ad40c879 --- /dev/null +++ b/generated/1.24/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go @@ -0,0 +1,72 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + clientset "go.pinniped.dev/generated/1.24/client/supervisor/virtual/clientset/versioned" + oauthv1alpha1 "go.pinniped.dev/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" + fakeoauthv1alpha1 "go.pinniped.dev/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/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" +) + +// NewSimpleClientset returns a clientset that will respond with the provided objects. +// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, +// without applying any validations and/or defaults. It shouldn't be considered a replacement +// for a real clientset and is mostly useful in simple unit tests. +func NewSimpleClientset(objects ...runtime.Object) *Clientset { + o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) + for _, obj := range objects { + if err := o.Add(obj); err != nil { + panic(err) + } + } + + cs := &Clientset{tracker: o} + cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} + cs.AddReactor("*", "*", testing.ObjectReaction(o)) + cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { + gvr := action.GetResource() + ns := action.GetNamespace() + watch, err := o.Watch(gvr, ns) + if err != nil { + return false, nil, err + } + return true, watch, nil + }) + + return cs +} + +// Clientset implements clientset.Interface. Meant to be embedded into a +// struct to get a default implementation. This makes faking out just the method +// you want to test easier. +type Clientset struct { + testing.Fake + discovery *fakediscovery.FakeDiscovery + tracker testing.ObjectTracker +} + +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + return c.discovery +} + +func (c *Clientset) Tracker() testing.ObjectTracker { + return c.tracker +} + +var ( + _ clientset.Interface = &Clientset{} + _ testing.FakeClient = &Clientset{} +) + +// OauthV1alpha1 retrieves the OauthV1alpha1Client +func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { + return &fakeoauthv1alpha1.FakeOauthV1alpha1{Fake: &c.Fake} +} diff --git a/generated/1.24/client/supervisor/virtual/clientset/versioned/fake/doc.go b/generated/1.24/client/supervisor/virtual/clientset/versioned/fake/doc.go new file mode 100644 index 00000000..7c9538fd --- /dev/null +++ b/generated/1.24/client/supervisor/virtual/clientset/versioned/fake/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated fake clientset. +package fake diff --git a/generated/1.24/client/supervisor/virtual/clientset/versioned/fake/register.go b/generated/1.24/client/supervisor/virtual/clientset/versioned/fake/register.go new file mode 100644 index 00000000..fcc85a4d --- /dev/null +++ b/generated/1.24/client/supervisor/virtual/clientset/versioned/fake/register.go @@ -0,0 +1,43 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + oauthv1alpha1 "go.pinniped.dev/generated/1.24/apis/supervisor/virtual/oauth/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" +) + +var scheme = runtime.NewScheme() +var codecs = serializer.NewCodecFactory(scheme) + +var localSchemeBuilder = runtime.SchemeBuilder{ + oauthv1alpha1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(scheme)) +} diff --git a/generated/1.24/client/supervisor/virtual/clientset/versioned/scheme/doc.go b/generated/1.24/client/supervisor/virtual/clientset/versioned/scheme/doc.go new file mode 100644 index 00000000..cc02f1d3 --- /dev/null +++ b/generated/1.24/client/supervisor/virtual/clientset/versioned/scheme/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// This package contains the scheme of the automatically generated clientset. +package scheme diff --git a/generated/1.24/client/supervisor/virtual/clientset/versioned/scheme/register.go b/generated/1.24/client/supervisor/virtual/clientset/versioned/scheme/register.go new file mode 100644 index 00000000..4c7d2651 --- /dev/null +++ b/generated/1.24/client/supervisor/virtual/clientset/versioned/scheme/register.go @@ -0,0 +1,43 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package scheme + +import ( + oauthv1alpha1 "go.pinniped.dev/generated/1.24/apis/supervisor/virtual/oauth/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" +) + +var Scheme = runtime.NewScheme() +var Codecs = serializer.NewCodecFactory(Scheme) +var ParameterCodec = runtime.NewParameterCodec(Scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + oauthv1alpha1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(Scheme)) +} diff --git a/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go b/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go new file mode 100644 index 00000000..e7a470b6 --- /dev/null +++ b/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1alpha1 diff --git a/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go b/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go new file mode 100644 index 00000000..7906901b --- /dev/null +++ b/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go @@ -0,0 +1,7 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go b/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go new file mode 100644 index 00000000..487cc65b --- /dev/null +++ b/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go @@ -0,0 +1,27 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1alpha1 "go.pinniped.dev/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeOauthV1alpha1 struct { + *testing.Fake +} + +func (c *FakeOauthV1alpha1) OIDCClientSecretRequests(namespace string) v1alpha1.OIDCClientSecretRequestInterface { + return &FakeOIDCClientSecretRequests{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeOauthV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go b/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go new file mode 100644 index 00000000..fc821273 --- /dev/null +++ b/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go @@ -0,0 +1,36 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "go.pinniped.dev/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + schema "k8s.io/apimachinery/pkg/runtime/schema" + testing "k8s.io/client-go/testing" +) + +// FakeOIDCClientSecretRequests implements OIDCClientSecretRequestInterface +type FakeOIDCClientSecretRequests struct { + Fake *FakeOauthV1alpha1 + ns string +} + +var oidcclientsecretrequestsResource = schema.GroupVersionResource{Group: "oauth.virtual.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclientsecretrequests"} + +var oidcclientsecretrequestsKind = schema.GroupVersionKind{Group: "oauth.virtual.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClientSecretRequest"} + +// Create takes the representation of a oIDCClientSecretRequest and creates it. Returns the server's representation of the oIDCClientSecretRequest, and an error, if there is any. +func (c *FakeOIDCClientSecretRequests) Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (result *v1alpha1.OIDCClientSecretRequest, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(oidcclientsecretrequestsResource, c.ns, oIDCClientSecretRequest), &v1alpha1.OIDCClientSecretRequest{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.OIDCClientSecretRequest), err +} diff --git a/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go b/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go new file mode 100644 index 00000000..427a2ad8 --- /dev/null +++ b/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go @@ -0,0 +1,8 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +type OIDCClientSecretRequestExpansion interface{} diff --git a/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go b/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go new file mode 100644 index 00000000..aa4521a2 --- /dev/null +++ b/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go @@ -0,0 +1,94 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "net/http" + + v1alpha1 "go.pinniped.dev/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1" + "go.pinniped.dev/generated/1.24/client/supervisor/virtual/clientset/versioned/scheme" + rest "k8s.io/client-go/rest" +) + +type OauthV1alpha1Interface interface { + RESTClient() rest.Interface + OIDCClientSecretRequestsGetter +} + +// OauthV1alpha1Client is used to interact with features provided by the oauth.virtual.supervisor.pinniped.dev group. +type OauthV1alpha1Client struct { + restClient rest.Interface +} + +func (c *OauthV1alpha1Client) OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface { + return newOIDCClientSecretRequests(c, namespace) +} + +// NewForConfig creates a new OauthV1alpha1Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). +func NewForConfig(c *rest.Config) (*OauthV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new OauthV1alpha1Client for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*OauthV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientForConfigAndClient(&config, h) + if err != nil { + return nil, err + } + return &OauthV1alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new OauthV1alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *OauthV1alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new OauthV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *OauthV1alpha1Client { + return &OauthV1alpha1Client{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 *OauthV1alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go b/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go new file mode 100644 index 00000000..ed4b8949 --- /dev/null +++ b/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go @@ -0,0 +1,54 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + + v1alpha1 "go.pinniped.dev/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1" + scheme "go.pinniped.dev/generated/1.24/client/supervisor/virtual/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + rest "k8s.io/client-go/rest" +) + +// OIDCClientSecretRequestsGetter has a method to return a OIDCClientSecretRequestInterface. +// A group's client should implement this interface. +type OIDCClientSecretRequestsGetter interface { + OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface +} + +// OIDCClientSecretRequestInterface has methods to work with OIDCClientSecretRequest resources. +type OIDCClientSecretRequestInterface interface { + Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (*v1alpha1.OIDCClientSecretRequest, error) + OIDCClientSecretRequestExpansion +} + +// oIDCClientSecretRequests implements OIDCClientSecretRequestInterface +type oIDCClientSecretRequests struct { + client rest.Interface + ns string +} + +// newOIDCClientSecretRequests returns a OIDCClientSecretRequests +func newOIDCClientSecretRequests(c *OauthV1alpha1Client, namespace string) *oIDCClientSecretRequests { + return &oIDCClientSecretRequests{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Create takes the representation of a oIDCClientSecretRequest and creates it. Returns the server's representation of the oIDCClientSecretRequest, and an error, if there is any. +func (c *oIDCClientSecretRequests) Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (result *v1alpha1.OIDCClientSecretRequest, err error) { + result = &v1alpha1.OIDCClientSecretRequest{} + err = c.client.Post(). + Namespace(c.ns). + Resource("oidcclientsecretrequests"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(oIDCClientSecretRequest). + Do(ctx). + Into(result) + return +} diff --git a/generated/latest/client/supervisor/virtual/clientset/versioned/clientset.go b/generated/latest/client/supervisor/virtual/clientset/versioned/clientset.go index 09131c84..87726aee 100644 --- a/generated/latest/client/supervisor/virtual/clientset/versioned/clientset.go +++ b/generated/latest/client/supervisor/virtual/clientset/versioned/clientset.go @@ -48,6 +48,10 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c + if configShallowCopy.UserAgent == "" { + configShallowCopy.UserAgent = rest.DefaultKubernetesUserAgent() + } + // share the transport between all clients httpClient, err := rest.HTTPClientFor(&configShallowCopy) if err != nil { From 479b6c421daec83cc96c3cfbd1b90cf5cadc5b83 Mon Sep 17 00:00:00 2001 From: Margo Crawford Date: Fri, 10 Jun 2022 09:51:37 -0700 Subject: [PATCH 04/11] fix out of date codegen images Signed-off-by: Margo Crawford --- generated/1.17/README.adoc | 4 ++-- generated/1.18/README.adoc | 4 ++-- generated/1.19/README.adoc | 4 ++-- generated/1.20/README.adoc | 4 ++-- generated/1.21/README.adoc | 4 ++-- generated/1.22/README.adoc | 4 ++-- generated/1.23/README.adoc | 4 ++-- .../1.23/client/concierge/clientset/versioned/clientset.go | 4 ++++ .../1.23/client/supervisor/clientset/versioned/clientset.go | 4 ++++ .../supervisor/virtual/clientset/versioned/clientset.go | 4 ++++ 10 files changed, 26 insertions(+), 14 deletions(-) diff --git a/generated/1.17/README.adoc b/generated/1.17/README.adoc index 5e679530..0b90292d 100644 --- a/generated/1.17/README.adoc +++ b/generated/1.17/README.adoc @@ -1380,9 +1380,9 @@ OIDCClientSpec is a struct that describes an OIDC Client. | Field | Description | *`allowedRedirectURIs`* __string array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be https, unless it is a loopback. | *`allowedGrantTypes`* __GrantType array__ | allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. + Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. | *`allowedScopes`* __Scope array__ | allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. + Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. |=== diff --git a/generated/1.18/README.adoc b/generated/1.18/README.adoc index 0d78ed03..db96bb48 100644 --- a/generated/1.18/README.adoc +++ b/generated/1.18/README.adoc @@ -1380,9 +1380,9 @@ OIDCClientSpec is a struct that describes an OIDC Client. | Field | Description | *`allowedRedirectURIs`* __string array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be https, unless it is a loopback. | *`allowedGrantTypes`* __GrantType array__ | allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. + Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. | *`allowedScopes`* __Scope array__ | allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. + Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. |=== diff --git a/generated/1.19/README.adoc b/generated/1.19/README.adoc index 5bb2e556..29d52abb 100644 --- a/generated/1.19/README.adoc +++ b/generated/1.19/README.adoc @@ -1380,9 +1380,9 @@ OIDCClientSpec is a struct that describes an OIDC Client. | Field | Description | *`allowedRedirectURIs`* __string array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be https, unless it is a loopback. | *`allowedGrantTypes`* __GrantType array__ | allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. + Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. | *`allowedScopes`* __Scope array__ | allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. + Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. |=== diff --git a/generated/1.20/README.adoc b/generated/1.20/README.adoc index 61422b6e..f58d5ad8 100644 --- a/generated/1.20/README.adoc +++ b/generated/1.20/README.adoc @@ -1380,9 +1380,9 @@ OIDCClientSpec is a struct that describes an OIDC Client. | Field | Description | *`allowedRedirectURIs`* __string array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be https, unless it is a loopback. | *`allowedGrantTypes`* __GrantType array__ | allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. + Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. | *`allowedScopes`* __Scope array__ | allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. + Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. |=== diff --git a/generated/1.21/README.adoc b/generated/1.21/README.adoc index 1c16381d..e83a59ea 100644 --- a/generated/1.21/README.adoc +++ b/generated/1.21/README.adoc @@ -1380,9 +1380,9 @@ OIDCClientSpec is a struct that describes an OIDC Client. | Field | Description | *`allowedRedirectURIs`* __string array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be https, unless it is a loopback. | *`allowedGrantTypes`* __GrantType array__ | allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. + Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. | *`allowedScopes`* __Scope array__ | allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. + Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. |=== diff --git a/generated/1.22/README.adoc b/generated/1.22/README.adoc index 26125e76..55db1f5b 100644 --- a/generated/1.22/README.adoc +++ b/generated/1.22/README.adoc @@ -1380,9 +1380,9 @@ OIDCClientSpec is a struct that describes an OIDC Client. | Field | Description | *`allowedRedirectURIs`* __string array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be https, unless it is a loopback. | *`allowedGrantTypes`* __GrantType array__ | allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. + Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. | *`allowedScopes`* __Scope array__ | allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. + Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. |=== diff --git a/generated/1.23/README.adoc b/generated/1.23/README.adoc index c6cbd149..d078f60c 100644 --- a/generated/1.23/README.adoc +++ b/generated/1.23/README.adoc @@ -1380,9 +1380,9 @@ OIDCClientSpec is a struct that describes an OIDC Client. | Field | Description | *`allowedRedirectURIs`* __string array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be https, unless it is a loopback. | *`allowedGrantTypes`* __GrantType array__ | allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. + Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. | *`allowedScopes`* __Scope array__ | allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. + Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. |=== diff --git a/generated/1.23/client/concierge/clientset/versioned/clientset.go b/generated/1.23/client/concierge/clientset/versioned/clientset.go index ba3cb60b..e026c5f0 100644 --- a/generated/1.23/client/concierge/clientset/versioned/clientset.go +++ b/generated/1.23/client/concierge/clientset/versioned/clientset.go @@ -72,6 +72,10 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c + if configShallowCopy.UserAgent == "" { + configShallowCopy.UserAgent = rest.DefaultKubernetesUserAgent() + } + // share the transport between all clients httpClient, err := rest.HTTPClientFor(&configShallowCopy) if err != nil { diff --git a/generated/1.23/client/supervisor/clientset/versioned/clientset.go b/generated/1.23/client/supervisor/clientset/versioned/clientset.go index b0f81c08..0347d1bb 100644 --- a/generated/1.23/client/supervisor/clientset/versioned/clientset.go +++ b/generated/1.23/client/supervisor/clientset/versioned/clientset.go @@ -64,6 +64,10 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c + if configShallowCopy.UserAgent == "" { + configShallowCopy.UserAgent = rest.DefaultKubernetesUserAgent() + } + // share the transport between all clients httpClient, err := rest.HTTPClientFor(&configShallowCopy) if err != nil { diff --git a/generated/1.23/client/supervisor/virtual/clientset/versioned/clientset.go b/generated/1.23/client/supervisor/virtual/clientset/versioned/clientset.go index ef665be8..e3386a25 100644 --- a/generated/1.23/client/supervisor/virtual/clientset/versioned/clientset.go +++ b/generated/1.23/client/supervisor/virtual/clientset/versioned/clientset.go @@ -48,6 +48,10 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c + if configShallowCopy.UserAgent == "" { + configShallowCopy.UserAgent = rest.DefaultKubernetesUserAgent() + } + // share the transport between all clients httpClient, err := rest.HTTPClientFor(&configShallowCopy) if err != nil { From ba371423d98243ea57f2029c74cfbb85faf04ab5 Mon Sep 17 00:00:00 2001 From: Margo Crawford Date: Fri, 10 Jun 2022 13:56:15 -0700 Subject: [PATCH 05/11] Add integration test for OIDCClientSecretRequest Signed-off-by: Margo Crawford --- internal/kubeclient/kubeclient.go | 25 ++++++--- .../supervisor_oidcclientsecret_test.go | 54 +++++++++++++++++++ test/testlib/client.go | 15 +++++- 3 files changed, 85 insertions(+), 9 deletions(-) create mode 100644 test/integration/supervisor_oidcclientsecret_test.go diff --git a/internal/kubeclient/kubeclient.go b/internal/kubeclient/kubeclient.go index 98d0b7f6..6a9d4eb5 100644 --- a/internal/kubeclient/kubeclient.go +++ b/internal/kubeclient/kubeclient.go @@ -23,14 +23,17 @@ import ( pinnipedconciergeclientsetscheme "go.pinniped.dev/generated/latest/client/concierge/clientset/versioned/scheme" pinnipedsupervisorclientset "go.pinniped.dev/generated/latest/client/supervisor/clientset/versioned" pinnipedsupervisorclientsetscheme "go.pinniped.dev/generated/latest/client/supervisor/clientset/versioned/scheme" + pinnipedsupervisorvirtualclientset "go.pinniped.dev/generated/latest/client/supervisor/virtual/clientset/versioned" + pinnipedsupervisorvirtualclientsetscheme "go.pinniped.dev/generated/latest/client/supervisor/virtual/clientset/versioned/scheme" "go.pinniped.dev/internal/crypto/ptls" ) type Client struct { - Kubernetes kubernetes.Interface - Aggregation aggregatorclient.Interface - PinnipedConcierge pinnipedconciergeclientset.Interface - PinnipedSupervisor pinnipedsupervisorclientset.Interface + Kubernetes kubernetes.Interface + Aggregation aggregatorclient.Interface + PinnipedConcierge pinnipedconciergeclientset.Interface + PinnipedSupervisor pinnipedsupervisorclientset.Interface + PinnipedSupervisorVirtual pinnipedsupervisorvirtualclientset.Interface JSONConfig, ProtoConfig *restclient.Config } @@ -90,11 +93,17 @@ func New(opts ...Option) (*Client, error) { return nil, fmt.Errorf("could not initialize pinniped client: %w", err) } + // Connect to the pinniped supervisor aggregated API. + pinnipedSupervisorVirtualClient, err := pinnipedsupervisorvirtualclientset.NewForConfig(configWithWrapper(jsonKubeConfig, pinnipedsupervisorvirtualclientsetscheme.Scheme, pinnipedsupervisorvirtualclientsetscheme.Codecs, c.middlewares, c.transportWrapper)) + if err != nil { + return nil, fmt.Errorf("could not initialize pinniped client: %w", err) + } return &Client{ - Kubernetes: k8sClient, - Aggregation: aggregatorClient, - PinnipedConcierge: pinnipedConciergeClient, - PinnipedSupervisor: pinnipedSupervisorClient, + Kubernetes: k8sClient, + Aggregation: aggregatorClient, + PinnipedConcierge: pinnipedConciergeClient, + PinnipedSupervisor: pinnipedSupervisorClient, + PinnipedSupervisorVirtual: pinnipedSupervisorVirtualClient, JSONConfig: jsonKubeConfig, ProtoConfig: protoKubeConfig, diff --git a/test/integration/supervisor_oidcclientsecret_test.go b/test/integration/supervisor_oidcclientsecret_test.go new file mode 100644 index 00000000..9133f0c7 --- /dev/null +++ b/test/integration/supervisor_oidcclientsecret_test.go @@ -0,0 +1,54 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package integration + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "go.pinniped.dev/generated/latest/apis/supervisor/virtual/oauth/v1alpha1" + "go.pinniped.dev/test/testlib" +) + +func TestOIDCClientSecretRequest_HappyPath_Parallel(t *testing.T) { + env := testlib.IntegrationEnv(t) + + ctx, cancel := context.WithTimeout(context.Background(), time.Minute) + defer cancel() + + client := testlib.NewVirtualSupervisorClientset(t) + + response, err := client.OauthV1alpha1().OIDCClientSecretRequests(env.SupervisorNamespace).Create(ctx, + &v1alpha1.OIDCClientSecretRequest{ + Spec: v1alpha1.OIDCClientSecretRequestSpec{ + GenerateNewSecret: true, + }, + }, metav1.CreateOptions{}) + require.NoError(t, err) + // the hardcoded values from the nonfunctional request + require.Equal(t, response.Status.TotalClientSecrets, 20) + require.Equal(t, response.Status.GeneratedSecret, "not-a-real-secret") +} + +func TestOIDCClientSecretRequest_Unauthenticated_Parallel(t *testing.T) { + env := testlib.IntegrationEnv(t) + + ctx, cancel := context.WithTimeout(context.Background(), time.Minute) + defer cancel() + + client := testlib.NewAnonymousVirtualSupervisorClientset(t) + + _, err := client.OauthV1alpha1().OIDCClientSecretRequests(env.SupervisorNamespace).Create(ctx, + &v1alpha1.OIDCClientSecretRequest{ + Spec: v1alpha1.OIDCClientSecretRequestSpec{ + GenerateNewSecret: true, + }, + }, metav1.CreateOptions{}) + require.Error(t, err) + require.Contains(t, err.Error(), "User \"system:anonymous\" cannot create resource \"oidcclientsecretrequests\"") +} diff --git a/test/testlib/client.go b/test/testlib/client.go index c5e96339..376e1462 100644 --- a/test/testlib/client.go +++ b/test/testlib/client.go @@ -1,4 +1,4 @@ -// Copyright 2020-2021 the Pinniped contributors. All Rights Reserved. +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package testlib @@ -34,6 +34,7 @@ import ( idpv1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/idp/v1alpha1" conciergeclientset "go.pinniped.dev/generated/latest/client/concierge/clientset/versioned" supervisorclientset "go.pinniped.dev/generated/latest/client/supervisor/clientset/versioned" + virtualsupervisorclientset "go.pinniped.dev/generated/latest/client/supervisor/virtual/clientset/versioned" "go.pinniped.dev/internal/groupsuffix" "go.pinniped.dev/internal/kubeclient" @@ -86,6 +87,18 @@ func NewSupervisorClientset(t *testing.T) supervisorclientset.Interface { return NewKubeclient(t, NewClientConfig(t)).PinnipedSupervisor } +func NewAnonymousVirtualSupervisorClientset(t *testing.T) virtualsupervisorclientset.Interface { + t.Helper() + + return NewKubeclient(t, NewAnonymousClientRestConfig(t)).PinnipedSupervisorVirtual +} + +func NewVirtualSupervisorClientset(t *testing.T) virtualsupervisorclientset.Interface { + t.Helper() + + return NewKubeclient(t, NewClientConfig(t)).PinnipedSupervisorVirtual +} + func NewConciergeClientset(t *testing.T) conciergeclientset.Interface { t.Helper() From 8f4285dbff43fb470c5745e42b34946ca299a143 Mon Sep 17 00:00:00 2001 From: Margo Crawford Date: Mon, 13 Jun 2022 14:28:05 -0700 Subject: [PATCH 06/11] Change group names Signed-off-by: Margo Crawford --- apis/supervisor/clientsecret/doc.go.tmpl | 8 + .../oauth => clientsecret}/register.go.tmpl | 4 +- .../types_oidcclientsecretrequest.go.tmpl | 2 +- .../v1alpha1/conversion.go.tmpl | 0 .../v1alpha1/defaults.go.tmpl | 0 .../v1alpha1/doc.go.tmpl | 6 +- .../v1alpha1/register.go.tmpl | 2 +- .../types_oidcclientsecretrequest.go.tmpl | 0 .../config/v1alpha1/register.go.tmpl | 2 + .../v1alpha1/types_oidcclient.go.tmpl | 0 apis/supervisor/oauth/v1alpha1/doc.go.tmpl | 10 - .../oauth/v1alpha1/register.go.tmpl | 43 --- apis/supervisor/virtual/oauth/doc.go.tmpl | 8 - ....supervisor.pinniped.dev_oidcclients.yaml} | 4 +- deploy/supervisor/deployment.yaml | 4 +- deploy/supervisor/z0_crd_overlay.yaml | 6 +- generated/1.17/README.adoc | 287 +++++++++--------- .../1.17/apis/supervisor/clientsecret/doc.go | 8 + .../apis/supervisor/clientsecret}/register.go | 4 +- .../types_oidcclientsecretrequest.go | 2 +- .../v1alpha1/conversion.go | 0 .../v1alpha1/defaults.go | 0 .../oauth => clientsecret}/v1alpha1/doc.go | 6 +- .../clientsecret}/v1alpha1/register.go | 2 +- .../v1alpha1/types_oidcclientsecretrequest.go | 0 .../v1alpha1/zz_generated.conversion.go | 131 ++++++++ .../v1alpha1/zz_generated.deepcopy.go | 0 .../v1alpha1/zz_generated.defaults.go | 0 .../clientsecret}/zz_generated.deepcopy.go | 2 +- .../supervisor/config/v1alpha1/register.go | 2 + .../v1alpha1/types_oidcclient.go | 0 .../config/v1alpha1/zz_generated.deepcopy.go | 108 +++++++ .../apis/supervisor/oauth/v1alpha1/doc.go | 10 - .../supervisor/oauth/v1alpha1/register.go | 43 --- .../oauth/v1alpha1/zz_generated.deepcopy.go | 121 -------- .../1.17/apis/supervisor/virtual/oauth/doc.go | 8 - .../oauth/v1alpha1/zz_generated.conversion.go | 131 -------- .../clientset/versioned/clientset.go | 32 +- .../versioned/fake/clientset_generated.go | 14 +- .../clientset/versioned/fake/register.go | 4 +- .../clientset/versioned/scheme/register.go | 4 +- .../v1alpha1/clientsecret_client.go} | 30 +- .../{oauth => clientsecret}/v1alpha1/doc.go | 0 .../v1alpha1/fake/doc.go | 0 .../fake/fake_clientsecret_client.go} | 10 +- .../fake/fake_oidcclientsecretrequest.go | 8 +- .../v1alpha1/generated_expansion.go | 0 .../v1alpha1/oidcclientsecretrequest.go | 4 +- .../typed/config/v1alpha1/config_client.go | 5 + .../v1alpha1/fake/fake_config_client.go | 4 + .../v1alpha1/fake/fake_oidcclient.go | 8 +- .../config/v1alpha1/generated_expansion.go | 2 + .../{oauth => config}/v1alpha1/oidcclient.go | 4 +- .../oauth/v1alpha1/generated_expansion.go | 8 - .../typed/oauth/v1alpha1/oauth_client.go | 76 ----- .../config/v1alpha1/interface.go | 7 + .../{oauth => config}/v1alpha1/oidcclient.go | 12 +- .../informers/externalversions/factory.go | 6 - .../informers/externalversions/generic.go | 7 +- .../externalversions/oauth/interface.go | 33 -- .../oauth/v1alpha1/interface.go | 32 -- .../config/v1alpha1/expansion_generated.go | 8 + .../listers/config}/v1alpha1/oidcclient.go | 2 +- .../oauth/v1alpha1/expansion_generated.go | 14 - .../virtual/clientset/versioned/clientset.go | 84 ----- .../virtual/clientset/versioned/doc.go | 7 - .../versioned/fake/clientset_generated.go | 69 ----- .../virtual/clientset/versioned/fake/doc.go | 7 - .../clientset/versioned/fake/register.go | 43 --- .../virtual/clientset/versioned/scheme/doc.go | 7 - .../clientset/versioned/scheme/register.go | 43 --- .../oauth/v1alpha1/fake/fake_oauth_client.go | 27 -- ....supervisor.pinniped.dev_oidcclients.yaml} | 4 +- generated/1.18/README.adoc | 287 +++++++++--------- .../1.18/apis/supervisor/clientsecret/doc.go | 8 + .../apis/supervisor/clientsecret}/register.go | 4 +- .../types_oidcclientsecretrequest.go | 2 +- .../v1alpha1/conversion.go | 0 .../v1alpha1/defaults.go | 0 .../oauth => clientsecret}/v1alpha1/doc.go | 6 +- .../v1alpha1/register.go | 2 +- .../v1alpha1/types_oidcclientsecretrequest.go | 0 .../v1alpha1/zz_generated.conversion.go | 131 ++++++++ .../v1alpha1/zz_generated.deepcopy.go | 0 .../v1alpha1/zz_generated.defaults.go | 0 .../clientsecret}/zz_generated.deepcopy.go | 2 +- .../supervisor/config/v1alpha1/register.go | 2 + .../v1alpha1/types_oidcclient.go | 0 .../config/v1alpha1/zz_generated.deepcopy.go | 108 +++++++ .../apis/supervisor/oauth/v1alpha1/doc.go | 10 - .../supervisor/oauth/v1alpha1/register.go | 43 --- .../oauth/v1alpha1/zz_generated.deepcopy.go | 121 -------- .../1.18/apis/supervisor/virtual/oauth/doc.go | 8 - .../oauth/v1alpha1/zz_generated.conversion.go | 131 -------- .../clientset/versioned/clientset.go | 32 +- .../versioned/fake/clientset_generated.go | 14 +- .../clientset/versioned/fake/register.go | 4 +- .../clientset/versioned/scheme/register.go | 4 +- .../v1alpha1/clientsecret_client.go} | 30 +- .../typed/clientsecret}/v1alpha1/doc.go | 0 .../typed/clientsecret}/v1alpha1/fake/doc.go | 0 .../fake/fake_clientsecret_client.go} | 10 +- .../fake/fake_oidcclientsecretrequest.go | 8 +- .../v1alpha1/generated_expansion.go | 0 .../v1alpha1/oidcclientsecretrequest.go | 6 +- .../typed/config/v1alpha1/config_client.go | 5 + .../v1alpha1/fake/fake_config_client.go | 4 + .../config}/v1alpha1/fake/fake_oidcclient.go | 8 +- .../config/v1alpha1/generated_expansion.go | 2 + .../{oauth => config}/v1alpha1/oidcclient.go | 4 +- .../oauth/v1alpha1/generated_expansion.go | 8 - .../typed/oauth/v1alpha1/oauth_client.go | 76 ----- .../config/v1alpha1/interface.go | 7 + .../{oauth => config}/v1alpha1/oidcclient.go | 12 +- .../informers/externalversions/factory.go | 6 - .../informers/externalversions/generic.go | 7 +- .../externalversions/oauth/interface.go | 33 -- .../oauth/v1alpha1/interface.go | 32 -- .../config/v1alpha1/expansion_generated.go | 8 + .../listers/config}/v1alpha1/oidcclient.go | 2 +- .../oauth/v1alpha1/expansion_generated.go | 14 - .../virtual/clientset/versioned/clientset.go | 84 ----- .../virtual/clientset/versioned/doc.go | 7 - .../versioned/fake/clientset_generated.go | 69 ----- .../virtual/clientset/versioned/fake/doc.go | 7 - .../clientset/versioned/fake/register.go | 43 --- .../virtual/clientset/versioned/scheme/doc.go | 7 - .../clientset/versioned/scheme/register.go | 43 --- .../oauth/v1alpha1/fake/fake_oauth_client.go | 27 -- ....supervisor.pinniped.dev_oidcclients.yaml} | 4 +- generated/1.19/README.adoc | 287 +++++++++--------- .../1.19/apis/supervisor/clientsecret/doc.go | 8 + .../oauth => clientsecret}/register.go | 4 +- .../types_oidcclientsecretrequest.go | 2 +- .../v1alpha1/conversion.go | 0 .../v1alpha1/defaults.go | 0 .../oauth => clientsecret}/v1alpha1/doc.go | 6 +- .../v1alpha1/register.go | 2 +- .../v1alpha1/types_oidcclientsecretrequest.go | 0 .../v1alpha1/zz_generated.conversion.go | 131 ++++++++ .../v1alpha1/zz_generated.deepcopy.go | 0 .../v1alpha1/zz_generated.defaults.go | 0 .../clientsecret}/zz_generated.deepcopy.go | 2 +- .../supervisor/config/v1alpha1/register.go | 2 + .../v1alpha1/types_oidcclient.go | 0 .../config/v1alpha1/zz_generated.deepcopy.go | 108 +++++++ .../apis/supervisor/oauth/v1alpha1/doc.go | 10 - .../supervisor/oauth/v1alpha1/register.go | 43 --- .../oauth/v1alpha1/zz_generated.deepcopy.go | 121 -------- .../1.19/apis/supervisor/virtual/oauth/doc.go | 8 - .../oauth/v1alpha1/zz_generated.conversion.go | 131 -------- .../clientset/versioned/clientset.go | 32 +- .../versioned/fake/clientset_generated.go | 14 +- .../clientset/versioned/fake/register.go | 4 +- .../clientset/versioned/scheme/register.go | 4 +- .../v1alpha1/clientsecret_client.go} | 30 +- .../typed/clientsecret}/v1alpha1/doc.go | 0 .../typed/clientsecret}/v1alpha1/fake/doc.go | 0 .../fake/fake_clientsecret_client.go} | 10 +- .../fake/fake_oidcclientsecretrequest.go | 8 +- .../v1alpha1/generated_expansion.go | 0 .../v1alpha1/oidcclientsecretrequest.go | 6 +- .../typed/config/v1alpha1/config_client.go | 5 + .../v1alpha1/fake/fake_config_client.go | 4 + .../config}/v1alpha1/fake/fake_oidcclient.go | 8 +- .../config/v1alpha1/generated_expansion.go | 2 + .../{oauth => config}/v1alpha1/oidcclient.go | 4 +- .../oauth/v1alpha1/generated_expansion.go | 8 - .../typed/oauth/v1alpha1/oauth_client.go | 76 ----- .../config/v1alpha1/interface.go | 7 + .../{oauth => config}/v1alpha1/oidcclient.go | 12 +- .../informers/externalversions/factory.go | 6 - .../informers/externalversions/generic.go | 7 +- .../externalversions/oauth/interface.go | 33 -- .../oauth/v1alpha1/interface.go | 32 -- .../config/v1alpha1/expansion_generated.go | 8 + .../listers/config}/v1alpha1/oidcclient.go | 2 +- .../oauth/v1alpha1/expansion_generated.go | 14 - .../virtual/clientset/versioned/clientset.go | 84 ----- .../virtual/clientset/versioned/doc.go | 7 - .../versioned/fake/clientset_generated.go | 69 ----- .../virtual/clientset/versioned/fake/doc.go | 7 - .../clientset/versioned/fake/register.go | 43 --- .../virtual/clientset/versioned/scheme/doc.go | 7 - .../clientset/versioned/scheme/register.go | 43 --- .../oauth/v1alpha1/fake/fake_oauth_client.go | 27 -- ....supervisor.pinniped.dev_oidcclients.yaml} | 4 +- generated/1.20/README.adoc | 287 +++++++++--------- .../1.20/apis/supervisor/clientsecret/doc.go | 8 + .../oauth => clientsecret}/register.go | 4 +- .../types_oidcclientsecretrequest.go | 2 +- .../v1alpha1/conversion.go | 0 .../v1alpha1/defaults.go | 0 .../oauth => clientsecret}/v1alpha1/doc.go | 6 +- .../clientsecret}/v1alpha1/register.go | 2 +- .../v1alpha1/types_oidcclientsecretrequest.go | 0 .../v1alpha1/zz_generated.conversion.go | 131 ++++++++ .../v1alpha1/zz_generated.deepcopy.go | 0 .../v1alpha1/zz_generated.defaults.go | 0 .../clientsecret}/zz_generated.deepcopy.go | 2 +- .../supervisor/config/v1alpha1/register.go | 2 + .../v1alpha1/types_oidcclient.go | 0 .../config/v1alpha1/zz_generated.deepcopy.go | 108 +++++++ .../apis/supervisor/oauth/v1alpha1/doc.go | 10 - .../supervisor/oauth/v1alpha1/register.go | 43 --- .../oauth/v1alpha1/zz_generated.deepcopy.go | 121 -------- .../1.20/apis/supervisor/virtual/oauth/doc.go | 8 - .../oauth/v1alpha1/zz_generated.conversion.go | 131 -------- .../clientset/versioned/clientset.go | 32 +- .../versioned/fake/clientset_generated.go | 14 +- .../clientset/versioned/fake/register.go | 4 +- .../clientset/versioned/scheme/register.go | 4 +- .../v1alpha1/clientsecret_client.go} | 30 +- .../typed/clientsecret}/v1alpha1/doc.go | 0 .../typed/clientsecret}/v1alpha1/fake/doc.go | 0 .../fake/fake_clientsecret_client.go} | 10 +- .../fake/fake_oidcclientsecretrequest.go | 8 +- .../v1alpha1/generated_expansion.go | 0 .../v1alpha1/oidcclientsecretrequest.go | 6 +- .../typed/config/v1alpha1/config_client.go | 5 + .../v1alpha1/fake/fake_config_client.go | 4 + .../config}/v1alpha1/fake/fake_oidcclient.go | 8 +- .../config/v1alpha1/generated_expansion.go | 2 + .../{oauth => config}/v1alpha1/oidcclient.go | 4 +- .../oauth/v1alpha1/generated_expansion.go | 8 - .../typed/oauth/v1alpha1/oauth_client.go | 76 ----- .../config/v1alpha1/interface.go | 7 + .../{oauth => config}/v1alpha1/oidcclient.go | 12 +- .../informers/externalversions/factory.go | 6 - .../informers/externalversions/generic.go | 7 +- .../externalversions/oauth/interface.go | 33 -- .../oauth/v1alpha1/interface.go | 32 -- .../config/v1alpha1/expansion_generated.go | 8 + .../listers/config}/v1alpha1/oidcclient.go | 2 +- .../oauth/v1alpha1/expansion_generated.go | 14 - .../virtual/clientset/versioned/clientset.go | 84 ----- .../virtual/clientset/versioned/doc.go | 7 - .../versioned/fake/clientset_generated.go | 69 ----- .../virtual/clientset/versioned/fake/doc.go | 7 - .../clientset/versioned/fake/register.go | 43 --- .../virtual/clientset/versioned/scheme/doc.go | 7 - .../clientset/versioned/scheme/register.go | 43 --- .../oauth/v1alpha1/fake/fake_oauth_client.go | 27 -- ...g.supervisor.pinniped.dev_oidcclients.yaml | 125 ++++++++ ...h.supervisor.pinniped.dev_oidcclients.yaml | 125 -------- generated/1.21/README.adoc | 287 +++++++++--------- .../1.21/apis/supervisor/clientsecret/doc.go | 8 + .../apis/supervisor/clientsecret/register.go | 37 +++ .../types_oidcclientsecretrequest.go | 25 ++ .../v1alpha1/conversion.go | 0 .../v1alpha1/defaults.go | 0 .../oauth => clientsecret}/v1alpha1/doc.go | 6 +- .../clientsecret/v1alpha1/register.go | 42 +++ .../v1alpha1/types_oidcclientsecretrequest.go | 0 .../v1alpha1/zz_generated.conversion.go | 131 ++++++++ .../v1alpha1/zz_generated.deepcopy.go | 0 .../v1alpha1/zz_generated.defaults.go | 0 .../clientsecret/zz_generated.deepcopy.go | 73 +++++ .../supervisor/config/v1alpha1/register.go | 2 + .../v1alpha1/types_oidcclient.go | 0 .../config/v1alpha1/zz_generated.deepcopy.go | 108 +++++++ .../apis/supervisor/oauth/v1alpha1/doc.go | 10 - .../supervisor/oauth/v1alpha1/register.go | 43 --- .../oauth/v1alpha1/zz_generated.deepcopy.go | 121 -------- .../1.21/apis/supervisor/virtual/oauth/doc.go | 8 - .../apis/supervisor/virtual/oauth/register.go | 37 --- .../oauth/types_oidcclientsecretrequest.go | 25 -- .../virtual/oauth/v1alpha1/register.go | 42 --- .../oauth/v1alpha1/zz_generated.conversion.go | 131 -------- .../virtual/oauth/zz_generated.deepcopy.go | 73 ----- .../clientset/versioned/clientset.go | 32 +- .../versioned/fake/clientset_generated.go | 14 +- .../clientset/versioned/fake/register.go | 4 +- .../clientset/versioned/scheme/register.go | 4 +- .../v1alpha1/clientsecret_client.go | 76 +++++ .../typed/clientsecret}/v1alpha1/doc.go | 0 .../typed/clientsecret}/v1alpha1/fake/doc.go | 0 .../fake/fake_clientsecret_client.go} | 10 +- .../fake/fake_oidcclientsecretrequest.go | 8 +- .../v1alpha1/generated_expansion.go | 0 .../v1alpha1/oidcclientsecretrequest.go | 6 +- .../typed/config/v1alpha1/config_client.go | 5 + .../v1alpha1/fake/fake_config_client.go | 4 + .../config}/v1alpha1/fake/fake_oidcclient.go | 8 +- .../config/v1alpha1/generated_expansion.go | 2 + .../{oauth => config}/v1alpha1/oidcclient.go | 4 +- .../oauth/v1alpha1/generated_expansion.go | 8 - .../typed/oauth/v1alpha1/oauth_client.go | 76 ----- .../config/v1alpha1/interface.go | 7 + .../{oauth => config}/v1alpha1/oidcclient.go | 12 +- .../informers/externalversions/factory.go | 6 - .../informers/externalversions/generic.go | 7 +- .../externalversions/oauth/interface.go | 33 -- .../oauth/v1alpha1/interface.go | 32 -- .../config/v1alpha1/expansion_generated.go | 8 + .../listers/config}/v1alpha1/oidcclient.go | 2 +- .../oauth/v1alpha1/expansion_generated.go | 14 - .../virtual/clientset/versioned/clientset.go | 84 ----- .../virtual/clientset/versioned/doc.go | 7 - .../versioned/fake/clientset_generated.go | 69 ----- .../virtual/clientset/versioned/fake/doc.go | 7 - .../clientset/versioned/fake/register.go | 43 --- .../virtual/clientset/versioned/scheme/doc.go | 7 - .../clientset/versioned/scheme/register.go | 43 --- .../versioned/typed/oauth/v1alpha1/doc.go | 7 - .../typed/oauth/v1alpha1/fake/doc.go | 7 - .../oauth/v1alpha1/fake/fake_oauth_client.go | 27 -- .../typed/oauth/v1alpha1/oauth_client.go | 76 ----- ...g.supervisor.pinniped.dev_oidcclients.yaml | 125 ++++++++ ...h.supervisor.pinniped.dev_oidcclients.yaml | 125 -------- generated/1.22/README.adoc | 287 +++++++++--------- .../1.22/apis/supervisor/clientsecret/doc.go | 8 + .../apis/supervisor/clientsecret/register.go | 37 +++ .../types_oidcclientsecretrequest.go | 25 ++ .../v1alpha1/conversion.go | 0 .../v1alpha1/defaults.go | 0 .../oauth => clientsecret}/v1alpha1/doc.go | 6 +- .../clientsecret/v1alpha1/register.go | 42 +++ .../v1alpha1/types_oidcclientsecretrequest.go | 0 .../v1alpha1/zz_generated.conversion.go | 131 ++++++++ .../v1alpha1/zz_generated.deepcopy.go | 0 .../v1alpha1/zz_generated.defaults.go | 0 .../clientsecret/zz_generated.deepcopy.go | 73 +++++ .../supervisor/config/v1alpha1/register.go | 2 + .../v1alpha1/types_oidcclient.go | 0 .../config/v1alpha1/zz_generated.deepcopy.go | 108 +++++++ .../apis/supervisor/oauth/v1alpha1/doc.go | 10 - .../supervisor/oauth/v1alpha1/register.go | 43 --- .../oauth/v1alpha1/zz_generated.deepcopy.go | 121 -------- .../1.22/apis/supervisor/virtual/oauth/doc.go | 8 - .../apis/supervisor/virtual/oauth/register.go | 37 --- .../oauth/types_oidcclientsecretrequest.go | 25 -- .../virtual/oauth/v1alpha1/register.go | 42 --- .../oauth/v1alpha1/zz_generated.conversion.go | 131 -------- .../virtual/oauth/zz_generated.deepcopy.go | 73 ----- .../clientset/versioned/clientset.go | 32 +- .../versioned/fake/clientset_generated.go | 14 +- .../clientset/versioned/fake/register.go | 4 +- .../clientset/versioned/scheme/register.go | 4 +- .../v1alpha1/clientsecret_client.go | 76 +++++ .../typed/clientsecret}/v1alpha1/doc.go | 0 .../typed/clientsecret}/v1alpha1/fake/doc.go | 0 .../fake/fake_clientsecret_client.go} | 10 +- .../fake/fake_oidcclientsecretrequest.go | 36 +++ .../v1alpha1/generated_expansion.go | 0 .../v1alpha1/oidcclientsecretrequest.go | 54 ++++ .../typed/config/v1alpha1/config_client.go | 5 + .../v1alpha1/fake/fake_config_client.go | 4 + .../config/v1alpha1/fake/fake_oidcclient.go | 129 ++++++++ .../config/v1alpha1/generated_expansion.go | 2 + .../{oauth => config}/v1alpha1/oidcclient.go | 4 +- .../versioned/typed/oauth/v1alpha1/doc.go | 7 - .../typed/oauth/v1alpha1/fake/doc.go | 7 - .../oauth/v1alpha1/fake/fake_oidcclient.go | 129 -------- .../oauth/v1alpha1/generated_expansion.go | 8 - .../typed/oauth/v1alpha1/oauth_client.go | 76 ----- .../config/v1alpha1/interface.go | 7 + .../{oauth => config}/v1alpha1/oidcclient.go | 12 +- .../informers/externalversions/factory.go | 6 - .../informers/externalversions/generic.go | 7 +- .../externalversions/oauth/interface.go | 33 -- .../oauth/v1alpha1/interface.go | 32 -- .../config/v1alpha1/expansion_generated.go | 8 + .../listers/config}/v1alpha1/oidcclient.go | 2 +- .../oauth/v1alpha1/expansion_generated.go | 14 - .../virtual/clientset/versioned/clientset.go | 84 ----- .../virtual/clientset/versioned/doc.go | 7 - .../versioned/fake/clientset_generated.go | 72 ----- .../virtual/clientset/versioned/fake/doc.go | 7 - .../clientset/versioned/fake/register.go | 43 --- .../virtual/clientset/versioned/scheme/doc.go | 7 - .../clientset/versioned/scheme/register.go | 43 --- .../versioned/typed/oauth/v1alpha1/doc.go | 7 - .../typed/oauth/v1alpha1/fake/doc.go | 7 - .../oauth/v1alpha1/fake/fake_oauth_client.go | 27 -- .../fake/fake_oidcclientsecretrequest.go | 36 --- .../typed/oauth/v1alpha1/oauth_client.go | 76 ----- .../oauth/v1alpha1/oidcclientsecretrequest.go | 54 ---- ...g.supervisor.pinniped.dev_oidcclients.yaml | 125 ++++++++ ...h.supervisor.pinniped.dev_oidcclients.yaml | 125 -------- generated/1.23/README.adoc | 287 +++++++++--------- .../1.23/apis/supervisor/clientsecret/doc.go | 8 + .../apis/supervisor/clientsecret/register.go | 37 +++ .../types_oidcclientsecretrequest.go | 25 ++ .../v1alpha1/conversion.go | 0 .../v1alpha1/defaults.go | 0 .../oauth => clientsecret}/v1alpha1/doc.go | 6 +- .../clientsecret/v1alpha1/register.go | 42 +++ .../v1alpha1/types_oidcclientsecretrequest.go | 0 .../v1alpha1/zz_generated.conversion.go | 131 ++++++++ .../v1alpha1/zz_generated.deepcopy.go | 0 .../v1alpha1/zz_generated.defaults.go | 0 .../clientsecret/zz_generated.deepcopy.go | 73 +++++ .../supervisor/config/v1alpha1/register.go | 2 + .../v1alpha1/types_oidcclient.go | 0 .../config/v1alpha1/zz_generated.deepcopy.go | 108 +++++++ .../apis/supervisor/oauth/v1alpha1/doc.go | 10 - .../supervisor/oauth/v1alpha1/register.go | 43 --- .../oauth/v1alpha1/zz_generated.deepcopy.go | 121 -------- .../1.23/apis/supervisor/virtual/oauth/doc.go | 8 - .../apis/supervisor/virtual/oauth/register.go | 37 --- .../oauth/types_oidcclientsecretrequest.go | 25 -- .../virtual/oauth/v1alpha1/register.go | 42 --- .../oauth/v1alpha1/zz_generated.conversion.go | 131 -------- .../virtual/oauth/zz_generated.deepcopy.go | 73 ----- .../clientset/versioned/clientset.go | 30 +- .../versioned/fake/clientset_generated.go | 14 +- .../clientset/versioned/fake/register.go | 4 +- .../clientset/versioned/scheme/register.go | 4 +- .../v1alpha1/clientsecret_client.go} | 34 +-- .../typed/clientsecret}/v1alpha1/doc.go | 0 .../typed/clientsecret}/v1alpha1/fake/doc.go | 0 .../fake/fake_clientsecret_client.go} | 10 +- .../fake/fake_oidcclientsecretrequest.go | 36 +++ .../v1alpha1/generated_expansion.go | 0 .../v1alpha1/oidcclientsecretrequest.go | 54 ++++ .../typed/config/v1alpha1/config_client.go | 5 + .../v1alpha1/fake/fake_config_client.go | 4 + .../v1alpha1/fake/fake_oidcclient.go | 8 +- .../config/v1alpha1/generated_expansion.go | 2 + .../{oauth => config}/v1alpha1/oidcclient.go | 4 +- .../versioned/typed/oauth/v1alpha1/doc.go | 7 - .../typed/oauth/v1alpha1/fake/doc.go | 7 - .../oauth/v1alpha1/generated_expansion.go | 8 - .../typed/oauth/v1alpha1/oauth_client.go | 94 ------ .../config/v1alpha1/interface.go | 7 + .../{oauth => config}/v1alpha1/oidcclient.go | 12 +- .../informers/externalversions/factory.go | 6 - .../informers/externalversions/generic.go | 7 +- .../externalversions/oauth/interface.go | 33 -- .../oauth/v1alpha1/interface.go | 32 -- .../config/v1alpha1/expansion_generated.go | 8 + .../listers/config/v1alpha1/oidcclient.go | 86 ++++++ .../oauth/v1alpha1/expansion_generated.go | 14 - .../listers/oauth/v1alpha1/oidcclient.go | 86 ------ .../virtual/clientset/versioned/clientset.go | 108 ------- .../virtual/clientset/versioned/doc.go | 7 - .../versioned/fake/clientset_generated.go | 72 ----- .../virtual/clientset/versioned/fake/doc.go | 7 - .../clientset/versioned/fake/register.go | 43 --- .../virtual/clientset/versioned/scheme/doc.go | 7 - .../clientset/versioned/scheme/register.go | 43 --- .../versioned/typed/oauth/v1alpha1/doc.go | 7 - .../typed/oauth/v1alpha1/fake/doc.go | 7 - .../oauth/v1alpha1/fake/fake_oauth_client.go | 27 -- .../fake/fake_oidcclientsecretrequest.go | 36 --- .../oauth/v1alpha1/oidcclientsecretrequest.go | 54 ---- ...g.supervisor.pinniped.dev_oidcclients.yaml | 125 ++++++++ ...h.supervisor.pinniped.dev_oidcclients.yaml | 125 -------- generated/1.24/README.adoc | 287 +++++++++--------- .../1.24/apis/supervisor/clientsecret/doc.go | 8 + .../apis/supervisor/clientsecret/register.go | 37 +++ .../types_oidcclientsecretrequest.go | 25 ++ .../v1alpha1/conversion.go | 0 .../v1alpha1/defaults.go | 0 .../oauth => clientsecret}/v1alpha1/doc.go | 6 +- .../clientsecret/v1alpha1/register.go | 42 +++ .../v1alpha1/types_oidcclientsecretrequest.go | 0 .../v1alpha1/zz_generated.conversion.go | 131 ++++++++ .../v1alpha1/zz_generated.deepcopy.go | 0 .../v1alpha1/zz_generated.defaults.go | 0 .../clientsecret/zz_generated.deepcopy.go | 73 +++++ .../supervisor/config/v1alpha1/register.go | 2 + .../v1alpha1/types_oidcclient.go | 0 .../config/v1alpha1/zz_generated.deepcopy.go | 108 +++++++ .../apis/supervisor/oauth/v1alpha1/doc.go | 10 - .../supervisor/oauth/v1alpha1/register.go | 43 --- .../oauth/v1alpha1/zz_generated.deepcopy.go | 121 -------- .../1.24/apis/supervisor/virtual/oauth/doc.go | 8 - .../apis/supervisor/virtual/oauth/register.go | 37 --- .../oauth/types_oidcclientsecretrequest.go | 25 -- .../virtual/oauth/v1alpha1/register.go | 42 --- .../oauth/v1alpha1/zz_generated.conversion.go | 131 -------- .../virtual/oauth/zz_generated.deepcopy.go | 73 ----- .../clientset/versioned/clientset.go | 30 +- .../versioned/fake/clientset_generated.go | 14 +- .../clientset/versioned/fake/register.go | 4 +- .../clientset/versioned/scheme/register.go | 4 +- .../v1alpha1/clientsecret_client.go} | 34 +-- .../typed/clientsecret}/v1alpha1/doc.go | 0 .../typed/clientsecret}/v1alpha1/fake/doc.go | 0 .../fake/fake_clientsecret_client.go} | 10 +- .../fake/fake_oidcclientsecretrequest.go | 36 +++ .../v1alpha1/generated_expansion.go | 0 .../v1alpha1/oidcclientsecretrequest.go | 54 ++++ .../typed/config/v1alpha1/config_client.go | 5 + .../v1alpha1/fake/fake_config_client.go | 4 + .../v1alpha1/fake/fake_oidcclient.go | 8 +- .../config/v1alpha1/generated_expansion.go | 2 + .../{oauth => config}/v1alpha1/oidcclient.go | 4 +- .../versioned/typed/oauth/v1alpha1/doc.go | 7 - .../typed/oauth/v1alpha1/fake/doc.go | 7 - .../oauth/v1alpha1/generated_expansion.go | 8 - .../typed/oauth/v1alpha1/oauth_client.go | 94 ------ .../config/v1alpha1/interface.go | 7 + .../{oauth => config}/v1alpha1/oidcclient.go | 12 +- .../informers/externalversions/factory.go | 6 - .../informers/externalversions/generic.go | 7 +- .../externalversions/oauth/interface.go | 33 -- .../oauth/v1alpha1/interface.go | 32 -- .../config/v1alpha1/expansion_generated.go | 8 + .../listers/config/v1alpha1/oidcclient.go | 86 ++++++ .../oauth/v1alpha1/expansion_generated.go | 14 - .../listers/oauth/v1alpha1/oidcclient.go | 86 ------ .../virtual/clientset/versioned/clientset.go | 108 ------- .../virtual/clientset/versioned/doc.go | 7 - .../versioned/fake/clientset_generated.go | 72 ----- .../virtual/clientset/versioned/fake/doc.go | 7 - .../clientset/versioned/fake/register.go | 43 --- .../virtual/clientset/versioned/scheme/doc.go | 7 - .../clientset/versioned/scheme/register.go | 43 --- .../versioned/typed/oauth/v1alpha1/doc.go | 7 - .../typed/oauth/v1alpha1/fake/doc.go | 7 - .../oauth/v1alpha1/fake/fake_oauth_client.go | 27 -- .../fake/fake_oidcclientsecretrequest.go | 36 --- .../oauth/v1alpha1/oidcclientsecretrequest.go | 54 ---- ...g.supervisor.pinniped.dev_oidcclients.yaml | 125 ++++++++ ...h.supervisor.pinniped.dev_oidcclients.yaml | 125 -------- .../apis/supervisor/clientsecret/doc.go | 8 + .../apis/supervisor/clientsecret/register.go | 37 +++ .../types_oidcclientsecretrequest.go | 25 ++ .../v1alpha1/conversion.go | 0 .../v1alpha1/defaults.go | 0 .../oauth => clientsecret}/v1alpha1/doc.go | 6 +- .../clientsecret/v1alpha1/register.go | 42 +++ .../v1alpha1/types_oidcclientsecretrequest.go | 0 .../v1alpha1/zz_generated.conversion.go | 131 ++++++++ .../v1alpha1/zz_generated.deepcopy.go | 0 .../v1alpha1/zz_generated.defaults.go | 0 .../clientsecret/zz_generated.deepcopy.go | 73 +++++ .../supervisor/config/v1alpha1/register.go | 2 + .../v1alpha1/types_oidcclient.go | 0 .../config/v1alpha1/zz_generated.deepcopy.go | 108 +++++++ .../apis/supervisor/oauth/v1alpha1/doc.go | 10 - .../supervisor/oauth/v1alpha1/register.go | 43 --- .../oauth/v1alpha1/zz_generated.deepcopy.go | 121 -------- .../apis/supervisor/virtual/oauth/doc.go | 8 - .../apis/supervisor/virtual/oauth/register.go | 37 --- .../oauth/types_oidcclientsecretrequest.go | 25 -- .../virtual/oauth/v1alpha1/register.go | 42 --- .../oauth/v1alpha1/zz_generated.conversion.go | 131 -------- .../virtual/oauth/zz_generated.deepcopy.go | 73 ----- .../clientset/versioned/clientset.go | 30 +- .../versioned/fake/clientset_generated.go | 14 +- .../clientset/versioned/fake/register.go | 4 +- .../clientset/versioned/scheme/register.go | 4 +- .../v1alpha1/clientsecret_client.go} | 34 +-- .../typed/clientsecret}/v1alpha1/doc.go | 0 .../typed/clientsecret}/v1alpha1/fake/doc.go | 0 .../fake/fake_clientsecret_client.go} | 10 +- .../fake/fake_oidcclientsecretrequest.go | 36 +++ .../v1alpha1/generated_expansion.go | 0 .../v1alpha1/oidcclientsecretrequest.go | 54 ++++ .../typed/config/v1alpha1/config_client.go | 5 + .../v1alpha1/fake/fake_config_client.go | 4 + .../v1alpha1/fake/fake_oidcclient.go | 8 +- .../config/v1alpha1/generated_expansion.go | 2 + .../{oauth => config}/v1alpha1/oidcclient.go | 4 +- .../versioned/typed/oauth/v1alpha1/doc.go | 7 - .../typed/oauth/v1alpha1/fake/doc.go | 7 - .../oauth/v1alpha1/generated_expansion.go | 8 - .../typed/oauth/v1alpha1/oauth_client.go | 94 ------ .../config/v1alpha1/interface.go | 7 + .../{oauth => config}/v1alpha1/oidcclient.go | 12 +- .../informers/externalversions/factory.go | 6 - .../informers/externalversions/generic.go | 7 +- .../externalversions/oauth/interface.go | 33 -- .../oauth/v1alpha1/interface.go | 32 -- .../config/v1alpha1/expansion_generated.go | 8 + .../listers/config/v1alpha1/oidcclient.go | 86 ++++++ .../oauth/v1alpha1/expansion_generated.go | 14 - .../listers/oauth/v1alpha1/oidcclient.go | 86 ------ .../virtual/clientset/versioned/clientset.go | 108 ------- .../virtual/clientset/versioned/doc.go | 7 - .../versioned/fake/clientset_generated.go | 72 ----- .../virtual/clientset/versioned/fake/doc.go | 7 - .../clientset/versioned/fake/register.go | 43 --- .../virtual/clientset/versioned/scheme/doc.go | 7 - .../clientset/versioned/scheme/register.go | 43 --- .../versioned/typed/oauth/v1alpha1/doc.go | 7 - .../typed/oauth/v1alpha1/fake/doc.go | 7 - .../oauth/v1alpha1/fake/fake_oauth_client.go | 27 -- .../fake/fake_oidcclientsecretrequest.go | 36 --- .../oauth/v1alpha1/oidcclientsecretrequest.go | 54 ---- hack/lib/update-codegen.sh | 16 +- internal/groupsuffix/groupdata.go | 10 +- internal/kubeclient/kubeclient.go | 25 +- internal/registry/clientsecretrequest/rest.go | 12 +- internal/supervisor/scheme/scheme.go | 20 +- internal/supervisor/scheme/scheme_test.go | 64 ++-- test/integration/kube_api_discovery_test.go | 24 +- .../supervisor_oidcclientsecret_test.go | 10 +- test/testlib/client.go | 11 +- 593 files changed, 6704 insertions(+), 11610 deletions(-) create mode 100644 apis/supervisor/clientsecret/doc.go.tmpl rename apis/supervisor/{virtual/oauth => clientsecret}/register.go.tmpl (93%) rename apis/supervisor/{virtual/oauth => clientsecret}/types_oidcclientsecretrequest.go.tmpl (97%) rename apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/conversion.go.tmpl (100%) rename apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/defaults.go.tmpl (100%) rename apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/doc.go.tmpl (64%) rename apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/register.go.tmpl (95%) rename apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/types_oidcclientsecretrequest.go.tmpl (100%) rename apis/supervisor/{oauth => config}/v1alpha1/types_oidcclient.go.tmpl (100%) delete mode 100644 apis/supervisor/oauth/v1alpha1/doc.go.tmpl delete mode 100644 apis/supervisor/oauth/v1alpha1/register.go.tmpl delete mode 100644 apis/supervisor/virtual/oauth/doc.go.tmpl rename deploy/supervisor/{oauth.supervisor.pinniped.dev_oidcclients.yaml => config.supervisor.pinniped.dev_oidcclients.yaml} (98%) create mode 100644 generated/1.17/apis/supervisor/clientsecret/doc.go rename generated/{1.18/apis/supervisor/virtual/oauth => 1.17/apis/supervisor/clientsecret}/register.go (93%) rename generated/{1.19/apis/supervisor/virtual/oauth => 1.17/apis/supervisor/clientsecret}/types_oidcclientsecretrequest.go (97%) rename generated/1.17/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/conversion.go (100%) rename generated/1.17/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/defaults.go (100%) rename generated/1.17/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/doc.go (64%) rename generated/{1.20/apis/supervisor/virtual/oauth => 1.17/apis/supervisor/clientsecret}/v1alpha1/register.go (95%) rename generated/1.17/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/types_oidcclientsecretrequest.go (100%) create mode 100644 generated/1.17/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go rename generated/1.17/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/zz_generated.deepcopy.go (100%) rename generated/1.17/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/zz_generated.defaults.go (100%) rename generated/{1.19/apis/supervisor/virtual/oauth => 1.17/apis/supervisor/clientsecret}/zz_generated.deepcopy.go (99%) rename generated/1.17/apis/supervisor/{oauth => config}/v1alpha1/types_oidcclient.go (100%) delete mode 100644 generated/1.17/apis/supervisor/oauth/v1alpha1/doc.go delete mode 100644 generated/1.17/apis/supervisor/oauth/v1alpha1/register.go delete mode 100644 generated/1.17/apis/supervisor/oauth/v1alpha1/zz_generated.deepcopy.go delete mode 100644 generated/1.17/apis/supervisor/virtual/oauth/doc.go delete mode 100644 generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go rename generated/1.17/client/supervisor/{virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go => clientset/versioned/typed/clientsecret/v1alpha1/clientsecret_client.go} (51%) rename generated/1.17/client/supervisor/clientset/versioned/typed/{oauth => clientsecret}/v1alpha1/doc.go (100%) rename generated/1.17/client/supervisor/clientset/versioned/typed/{oauth => clientsecret}/v1alpha1/fake/doc.go (100%) rename generated/1.17/client/supervisor/clientset/versioned/typed/{oauth/v1alpha1/fake/fake_oauth_client.go => clientsecret/v1alpha1/fake/fake_clientsecret_client.go} (60%) rename generated/1.17/client/supervisor/{virtual/clientset/versioned/typed/oauth => clientset/versioned/typed/clientsecret}/v1alpha1/fake/fake_oidcclientsecretrequest.go (77%) rename generated/1.17/client/supervisor/{virtual/clientset/versioned/typed/oauth => clientset/versioned/typed/clientsecret}/v1alpha1/generated_expansion.go (100%) rename generated/1.17/client/supervisor/{virtual/clientset/versioned/typed/oauth => clientset/versioned/typed/clientsecret}/v1alpha1/oidcclientsecretrequest.go (89%) rename generated/1.17/client/supervisor/clientset/versioned/typed/{oauth => config}/v1alpha1/fake/fake_oidcclient.go (92%) rename generated/1.17/client/supervisor/clientset/versioned/typed/{oauth => config}/v1alpha1/oidcclient.go (97%) delete mode 100644 generated/1.17/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go delete mode 100644 generated/1.17/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go rename generated/1.17/client/supervisor/informers/externalversions/{oauth => config}/v1alpha1/oidcclient.go (89%) delete mode 100644 generated/1.17/client/supervisor/informers/externalversions/oauth/interface.go delete mode 100644 generated/1.17/client/supervisor/informers/externalversions/oauth/v1alpha1/interface.go rename generated/{1.18/client/supervisor/listers/oauth => 1.17/client/supervisor/listers/config}/v1alpha1/oidcclient.go (97%) delete mode 100644 generated/1.17/client/supervisor/listers/oauth/v1alpha1/expansion_generated.go delete mode 100644 generated/1.17/client/supervisor/virtual/clientset/versioned/clientset.go delete mode 100644 generated/1.17/client/supervisor/virtual/clientset/versioned/doc.go delete mode 100644 generated/1.17/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go delete mode 100644 generated/1.17/client/supervisor/virtual/clientset/versioned/fake/doc.go delete mode 100644 generated/1.17/client/supervisor/virtual/clientset/versioned/fake/register.go delete mode 100644 generated/1.17/client/supervisor/virtual/clientset/versioned/scheme/doc.go delete mode 100644 generated/1.17/client/supervisor/virtual/clientset/versioned/scheme/register.go delete mode 100644 generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go rename generated/1.17/crds/{oauth.supervisor.pinniped.dev_oidcclients.yaml => config.supervisor.pinniped.dev_oidcclients.yaml} (98%) create mode 100644 generated/1.18/apis/supervisor/clientsecret/doc.go rename generated/{1.17/apis/supervisor/virtual/oauth => 1.18/apis/supervisor/clientsecret}/register.go (93%) rename generated/{1.20/apis/supervisor/virtual/oauth => 1.18/apis/supervisor/clientsecret}/types_oidcclientsecretrequest.go (97%) rename generated/1.18/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/conversion.go (100%) rename generated/1.18/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/defaults.go (100%) rename generated/1.18/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/doc.go (64%) rename generated/1.18/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/register.go (95%) rename generated/1.18/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/types_oidcclientsecretrequest.go (100%) create mode 100644 generated/1.18/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go rename generated/1.18/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/zz_generated.deepcopy.go (100%) rename generated/1.18/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/zz_generated.defaults.go (100%) rename generated/{1.17/apis/supervisor/virtual/oauth => 1.18/apis/supervisor/clientsecret}/zz_generated.deepcopy.go (99%) rename generated/1.18/apis/supervisor/{oauth => config}/v1alpha1/types_oidcclient.go (100%) delete mode 100644 generated/1.18/apis/supervisor/oauth/v1alpha1/doc.go delete mode 100644 generated/1.18/apis/supervisor/oauth/v1alpha1/register.go delete mode 100644 generated/1.18/apis/supervisor/oauth/v1alpha1/zz_generated.deepcopy.go delete mode 100644 generated/1.18/apis/supervisor/virtual/oauth/doc.go delete mode 100644 generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go rename generated/{1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go => 1.18/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/clientsecret_client.go} (51%) rename generated/{1.17/client/supervisor/virtual/clientset/versioned/typed/oauth => 1.18/client/supervisor/clientset/versioned/typed/clientsecret}/v1alpha1/doc.go (100%) rename generated/{1.17/client/supervisor/virtual/clientset/versioned/typed/oauth => 1.18/client/supervisor/clientset/versioned/typed/clientsecret}/v1alpha1/fake/doc.go (100%) rename generated/1.18/client/supervisor/clientset/versioned/typed/{oauth/v1alpha1/fake/fake_oauth_client.go => clientsecret/v1alpha1/fake/fake_clientsecret_client.go} (60%) rename generated/1.18/client/supervisor/{virtual/clientset/versioned/typed/oauth => clientset/versioned/typed/clientsecret}/v1alpha1/fake/fake_oidcclientsecretrequest.go (79%) rename generated/1.18/client/supervisor/{virtual/clientset/versioned/typed/oauth => clientset/versioned/typed/clientsecret}/v1alpha1/generated_expansion.go (100%) rename generated/{1.19/client/supervisor/virtual/clientset/versioned/typed/oauth => 1.18/client/supervisor/clientset/versioned/typed/clientsecret}/v1alpha1/oidcclientsecretrequest.go (86%) rename generated/{1.19/client/supervisor/clientset/versioned/typed/oauth => 1.18/client/supervisor/clientset/versioned/typed/config}/v1alpha1/fake/fake_oidcclient.go (92%) rename generated/1.18/client/supervisor/clientset/versioned/typed/{oauth => config}/v1alpha1/oidcclient.go (97%) delete mode 100644 generated/1.18/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go delete mode 100644 generated/1.18/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go rename generated/1.18/client/supervisor/informers/externalversions/{oauth => config}/v1alpha1/oidcclient.go (88%) delete mode 100644 generated/1.18/client/supervisor/informers/externalversions/oauth/interface.go delete mode 100644 generated/1.18/client/supervisor/informers/externalversions/oauth/v1alpha1/interface.go rename generated/{1.17/client/supervisor/listers/oauth => 1.18/client/supervisor/listers/config}/v1alpha1/oidcclient.go (97%) delete mode 100644 generated/1.18/client/supervisor/listers/oauth/v1alpha1/expansion_generated.go delete mode 100644 generated/1.18/client/supervisor/virtual/clientset/versioned/clientset.go delete mode 100644 generated/1.18/client/supervisor/virtual/clientset/versioned/doc.go delete mode 100644 generated/1.18/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go delete mode 100644 generated/1.18/client/supervisor/virtual/clientset/versioned/fake/doc.go delete mode 100644 generated/1.18/client/supervisor/virtual/clientset/versioned/fake/register.go delete mode 100644 generated/1.18/client/supervisor/virtual/clientset/versioned/scheme/doc.go delete mode 100644 generated/1.18/client/supervisor/virtual/clientset/versioned/scheme/register.go delete mode 100644 generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go rename generated/1.18/crds/{oauth.supervisor.pinniped.dev_oidcclients.yaml => config.supervisor.pinniped.dev_oidcclients.yaml} (98%) create mode 100644 generated/1.19/apis/supervisor/clientsecret/doc.go rename generated/1.19/apis/supervisor/{virtual/oauth => clientsecret}/register.go (93%) rename generated/{1.17/apis/supervisor/virtual/oauth => 1.19/apis/supervisor/clientsecret}/types_oidcclientsecretrequest.go (97%) rename generated/1.19/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/conversion.go (100%) rename generated/1.19/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/defaults.go (100%) rename generated/1.19/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/doc.go (64%) rename generated/1.19/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/register.go (95%) rename generated/1.19/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/types_oidcclientsecretrequest.go (100%) create mode 100644 generated/1.19/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go rename generated/1.19/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/zz_generated.deepcopy.go (100%) rename generated/1.19/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/zz_generated.defaults.go (100%) rename generated/{1.20/apis/supervisor/virtual/oauth => 1.19/apis/supervisor/clientsecret}/zz_generated.deepcopy.go (99%) rename generated/1.19/apis/supervisor/{oauth => config}/v1alpha1/types_oidcclient.go (100%) delete mode 100644 generated/1.19/apis/supervisor/oauth/v1alpha1/doc.go delete mode 100644 generated/1.19/apis/supervisor/oauth/v1alpha1/register.go delete mode 100644 generated/1.19/apis/supervisor/oauth/v1alpha1/zz_generated.deepcopy.go delete mode 100644 generated/1.19/apis/supervisor/virtual/oauth/doc.go delete mode 100644 generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go rename generated/{1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go => 1.19/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/clientsecret_client.go} (51%) rename generated/{1.18/client/supervisor/clientset/versioned/typed/oauth => 1.19/client/supervisor/clientset/versioned/typed/clientsecret}/v1alpha1/doc.go (100%) rename generated/{1.18/client/supervisor/clientset/versioned/typed/oauth => 1.19/client/supervisor/clientset/versioned/typed/clientsecret}/v1alpha1/fake/doc.go (100%) rename generated/1.19/client/supervisor/clientset/versioned/typed/{oauth/v1alpha1/fake/fake_oauth_client.go => clientsecret/v1alpha1/fake/fake_clientsecret_client.go} (60%) rename generated/{1.21/client/supervisor/virtual/clientset/versioned/typed/oauth => 1.19/client/supervisor/clientset/versioned/typed/clientsecret}/v1alpha1/fake/fake_oidcclientsecretrequest.go (79%) rename generated/1.19/client/supervisor/{virtual/clientset/versioned/typed/oauth => clientset/versioned/typed/clientsecret}/v1alpha1/generated_expansion.go (100%) rename generated/{1.18/client/supervisor/virtual/clientset/versioned/typed/oauth => 1.19/client/supervisor/clientset/versioned/typed/clientsecret}/v1alpha1/oidcclientsecretrequest.go (86%) rename generated/{1.18/client/supervisor/clientset/versioned/typed/oauth => 1.19/client/supervisor/clientset/versioned/typed/config}/v1alpha1/fake/fake_oidcclient.go (92%) rename generated/1.19/client/supervisor/clientset/versioned/typed/{oauth => config}/v1alpha1/oidcclient.go (97%) delete mode 100644 generated/1.19/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go delete mode 100644 generated/1.19/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go rename generated/1.19/client/supervisor/informers/externalversions/{oauth => config}/v1alpha1/oidcclient.go (88%) delete mode 100644 generated/1.19/client/supervisor/informers/externalversions/oauth/interface.go delete mode 100644 generated/1.19/client/supervisor/informers/externalversions/oauth/v1alpha1/interface.go rename generated/{1.21/client/supervisor/listers/oauth => 1.19/client/supervisor/listers/config}/v1alpha1/oidcclient.go (97%) delete mode 100644 generated/1.19/client/supervisor/listers/oauth/v1alpha1/expansion_generated.go delete mode 100644 generated/1.19/client/supervisor/virtual/clientset/versioned/clientset.go delete mode 100644 generated/1.19/client/supervisor/virtual/clientset/versioned/doc.go delete mode 100644 generated/1.19/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go delete mode 100644 generated/1.19/client/supervisor/virtual/clientset/versioned/fake/doc.go delete mode 100644 generated/1.19/client/supervisor/virtual/clientset/versioned/fake/register.go delete mode 100644 generated/1.19/client/supervisor/virtual/clientset/versioned/scheme/doc.go delete mode 100644 generated/1.19/client/supervisor/virtual/clientset/versioned/scheme/register.go delete mode 100644 generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go rename generated/1.19/crds/{oauth.supervisor.pinniped.dev_oidcclients.yaml => config.supervisor.pinniped.dev_oidcclients.yaml} (98%) create mode 100644 generated/1.20/apis/supervisor/clientsecret/doc.go rename generated/1.20/apis/supervisor/{virtual/oauth => clientsecret}/register.go (93%) rename generated/{1.18/apis/supervisor/virtual/oauth => 1.20/apis/supervisor/clientsecret}/types_oidcclientsecretrequest.go (97%) rename generated/1.20/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/conversion.go (100%) rename generated/1.20/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/defaults.go (100%) rename generated/1.20/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/doc.go (64%) rename generated/{1.17/apis/supervisor/virtual/oauth => 1.20/apis/supervisor/clientsecret}/v1alpha1/register.go (95%) rename generated/1.20/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/types_oidcclientsecretrequest.go (100%) create mode 100644 generated/1.20/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go rename generated/1.20/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/zz_generated.deepcopy.go (100%) rename generated/1.20/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/zz_generated.defaults.go (100%) rename generated/{1.18/apis/supervisor/virtual/oauth => 1.20/apis/supervisor/clientsecret}/zz_generated.deepcopy.go (99%) rename generated/1.20/apis/supervisor/{oauth => config}/v1alpha1/types_oidcclient.go (100%) delete mode 100644 generated/1.20/apis/supervisor/oauth/v1alpha1/doc.go delete mode 100644 generated/1.20/apis/supervisor/oauth/v1alpha1/register.go delete mode 100644 generated/1.20/apis/supervisor/oauth/v1alpha1/zz_generated.deepcopy.go delete mode 100644 generated/1.20/apis/supervisor/virtual/oauth/doc.go delete mode 100644 generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go rename generated/{1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go => 1.20/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/clientsecret_client.go} (51%) rename generated/{1.18/client/supervisor/virtual/clientset/versioned/typed/oauth => 1.20/client/supervisor/clientset/versioned/typed/clientsecret}/v1alpha1/doc.go (100%) rename generated/{1.18/client/supervisor/virtual/clientset/versioned/typed/oauth => 1.20/client/supervisor/clientset/versioned/typed/clientsecret}/v1alpha1/fake/doc.go (100%) rename generated/1.20/client/supervisor/clientset/versioned/typed/{oauth/v1alpha1/fake/fake_oauth_client.go => clientsecret/v1alpha1/fake/fake_clientsecret_client.go} (60%) rename generated/1.20/client/supervisor/{virtual/clientset/versioned/typed/oauth => clientset/versioned/typed/clientsecret}/v1alpha1/fake/fake_oidcclientsecretrequest.go (79%) rename generated/1.20/client/supervisor/{virtual/clientset/versioned/typed/oauth => clientset/versioned/typed/clientsecret}/v1alpha1/generated_expansion.go (100%) rename generated/1.20/client/supervisor/{virtual/clientset/versioned/typed/oauth => clientset/versioned/typed/clientsecret}/v1alpha1/oidcclientsecretrequest.go (86%) rename generated/{1.21/client/supervisor/clientset/versioned/typed/oauth => 1.20/client/supervisor/clientset/versioned/typed/config}/v1alpha1/fake/fake_oidcclient.go (92%) rename generated/1.20/client/supervisor/clientset/versioned/typed/{oauth => config}/v1alpha1/oidcclient.go (97%) delete mode 100644 generated/1.20/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go delete mode 100644 generated/1.20/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go rename generated/1.20/client/supervisor/informers/externalversions/{oauth => config}/v1alpha1/oidcclient.go (88%) delete mode 100644 generated/1.20/client/supervisor/informers/externalversions/oauth/interface.go delete mode 100644 generated/1.20/client/supervisor/informers/externalversions/oauth/v1alpha1/interface.go rename generated/{1.22/client/supervisor/listers/oauth => 1.20/client/supervisor/listers/config}/v1alpha1/oidcclient.go (97%) delete mode 100644 generated/1.20/client/supervisor/listers/oauth/v1alpha1/expansion_generated.go delete mode 100644 generated/1.20/client/supervisor/virtual/clientset/versioned/clientset.go delete mode 100644 generated/1.20/client/supervisor/virtual/clientset/versioned/doc.go delete mode 100644 generated/1.20/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go delete mode 100644 generated/1.20/client/supervisor/virtual/clientset/versioned/fake/doc.go delete mode 100644 generated/1.20/client/supervisor/virtual/clientset/versioned/fake/register.go delete mode 100644 generated/1.20/client/supervisor/virtual/clientset/versioned/scheme/doc.go delete mode 100644 generated/1.20/client/supervisor/virtual/clientset/versioned/scheme/register.go delete mode 100644 generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go create mode 100644 generated/1.20/crds/config.supervisor.pinniped.dev_oidcclients.yaml delete mode 100644 generated/1.20/crds/oauth.supervisor.pinniped.dev_oidcclients.yaml create mode 100644 generated/1.21/apis/supervisor/clientsecret/doc.go create mode 100644 generated/1.21/apis/supervisor/clientsecret/register.go create mode 100644 generated/1.21/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go rename generated/1.21/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/conversion.go (100%) rename generated/1.21/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/defaults.go (100%) rename generated/1.21/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/doc.go (64%) create mode 100644 generated/1.21/apis/supervisor/clientsecret/v1alpha1/register.go rename generated/1.21/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/types_oidcclientsecretrequest.go (100%) create mode 100644 generated/1.21/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go rename generated/1.21/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/zz_generated.deepcopy.go (100%) rename generated/1.21/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/zz_generated.defaults.go (100%) create mode 100644 generated/1.21/apis/supervisor/clientsecret/zz_generated.deepcopy.go rename generated/1.21/apis/supervisor/{oauth => config}/v1alpha1/types_oidcclient.go (100%) delete mode 100644 generated/1.21/apis/supervisor/oauth/v1alpha1/doc.go delete mode 100644 generated/1.21/apis/supervisor/oauth/v1alpha1/register.go delete mode 100644 generated/1.21/apis/supervisor/oauth/v1alpha1/zz_generated.deepcopy.go delete mode 100644 generated/1.21/apis/supervisor/virtual/oauth/doc.go delete mode 100644 generated/1.21/apis/supervisor/virtual/oauth/register.go delete mode 100644 generated/1.21/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go delete mode 100644 generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/register.go delete mode 100644 generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go delete mode 100644 generated/1.21/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go create mode 100644 generated/1.21/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/clientsecret_client.go rename generated/{1.19/client/supervisor/clientset/versioned/typed/oauth => 1.21/client/supervisor/clientset/versioned/typed/clientsecret}/v1alpha1/doc.go (100%) rename generated/{1.19/client/supervisor/clientset/versioned/typed/oauth => 1.21/client/supervisor/clientset/versioned/typed/clientsecret}/v1alpha1/fake/doc.go (100%) rename generated/1.21/client/supervisor/clientset/versioned/typed/{oauth/v1alpha1/fake/fake_oauth_client.go => clientsecret/v1alpha1/fake/fake_clientsecret_client.go} (60%) rename generated/{1.19/client/supervisor/virtual/clientset/versioned/typed/oauth => 1.21/client/supervisor/clientset/versioned/typed/clientsecret}/v1alpha1/fake/fake_oidcclientsecretrequest.go (79%) rename generated/1.21/client/supervisor/{virtual/clientset/versioned/typed/oauth => clientset/versioned/typed/clientsecret}/v1alpha1/generated_expansion.go (100%) rename generated/1.21/client/supervisor/{virtual/clientset/versioned/typed/oauth => clientset/versioned/typed/clientsecret}/v1alpha1/oidcclientsecretrequest.go (86%) rename generated/{1.20/client/supervisor/clientset/versioned/typed/oauth => 1.21/client/supervisor/clientset/versioned/typed/config}/v1alpha1/fake/fake_oidcclient.go (92%) rename generated/1.21/client/supervisor/clientset/versioned/typed/{oauth => config}/v1alpha1/oidcclient.go (97%) delete mode 100644 generated/1.21/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go delete mode 100644 generated/1.21/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go rename generated/1.21/client/supervisor/informers/externalversions/{oauth => config}/v1alpha1/oidcclient.go (88%) delete mode 100644 generated/1.21/client/supervisor/informers/externalversions/oauth/interface.go delete mode 100644 generated/1.21/client/supervisor/informers/externalversions/oauth/v1alpha1/interface.go rename generated/{1.19/client/supervisor/listers/oauth => 1.21/client/supervisor/listers/config}/v1alpha1/oidcclient.go (97%) delete mode 100644 generated/1.21/client/supervisor/listers/oauth/v1alpha1/expansion_generated.go delete mode 100644 generated/1.21/client/supervisor/virtual/clientset/versioned/clientset.go delete mode 100644 generated/1.21/client/supervisor/virtual/clientset/versioned/doc.go delete mode 100644 generated/1.21/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go delete mode 100644 generated/1.21/client/supervisor/virtual/clientset/versioned/fake/doc.go delete mode 100644 generated/1.21/client/supervisor/virtual/clientset/versioned/fake/register.go delete mode 100644 generated/1.21/client/supervisor/virtual/clientset/versioned/scheme/doc.go delete mode 100644 generated/1.21/client/supervisor/virtual/clientset/versioned/scheme/register.go delete mode 100644 generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go delete mode 100644 generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go delete mode 100644 generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go delete mode 100644 generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go create mode 100644 generated/1.21/crds/config.supervisor.pinniped.dev_oidcclients.yaml delete mode 100644 generated/1.21/crds/oauth.supervisor.pinniped.dev_oidcclients.yaml create mode 100644 generated/1.22/apis/supervisor/clientsecret/doc.go create mode 100644 generated/1.22/apis/supervisor/clientsecret/register.go create mode 100644 generated/1.22/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go rename generated/1.22/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/conversion.go (100%) rename generated/1.22/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/defaults.go (100%) rename generated/1.22/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/doc.go (64%) create mode 100644 generated/1.22/apis/supervisor/clientsecret/v1alpha1/register.go rename generated/1.22/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/types_oidcclientsecretrequest.go (100%) create mode 100644 generated/1.22/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go rename generated/1.22/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/zz_generated.deepcopy.go (100%) rename generated/1.22/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/zz_generated.defaults.go (100%) create mode 100644 generated/1.22/apis/supervisor/clientsecret/zz_generated.deepcopy.go rename generated/1.22/apis/supervisor/{oauth => config}/v1alpha1/types_oidcclient.go (100%) delete mode 100644 generated/1.22/apis/supervisor/oauth/v1alpha1/doc.go delete mode 100644 generated/1.22/apis/supervisor/oauth/v1alpha1/register.go delete mode 100644 generated/1.22/apis/supervisor/oauth/v1alpha1/zz_generated.deepcopy.go delete mode 100644 generated/1.22/apis/supervisor/virtual/oauth/doc.go delete mode 100644 generated/1.22/apis/supervisor/virtual/oauth/register.go delete mode 100644 generated/1.22/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go delete mode 100644 generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/register.go delete mode 100644 generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go delete mode 100644 generated/1.22/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go create mode 100644 generated/1.22/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/clientsecret_client.go rename generated/{1.19/client/supervisor/virtual/clientset/versioned/typed/oauth => 1.22/client/supervisor/clientset/versioned/typed/clientsecret}/v1alpha1/doc.go (100%) rename generated/{1.19/client/supervisor/virtual/clientset/versioned/typed/oauth => 1.22/client/supervisor/clientset/versioned/typed/clientsecret}/v1alpha1/fake/doc.go (100%) rename generated/1.22/client/supervisor/clientset/versioned/typed/{oauth/v1alpha1/fake/fake_oauth_client.go => clientsecret/v1alpha1/fake/fake_clientsecret_client.go} (60%) create mode 100644 generated/1.22/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_oidcclientsecretrequest.go rename generated/1.22/client/supervisor/{virtual/clientset/versioned/typed/oauth => clientset/versioned/typed/clientsecret}/v1alpha1/generated_expansion.go (100%) create mode 100644 generated/1.22/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/oidcclientsecretrequest.go create mode 100644 generated/1.22/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_oidcclient.go rename generated/1.22/client/supervisor/clientset/versioned/typed/{oauth => config}/v1alpha1/oidcclient.go (97%) delete mode 100644 generated/1.22/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/doc.go delete mode 100644 generated/1.22/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go delete mode 100644 generated/1.22/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclient.go delete mode 100644 generated/1.22/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go delete mode 100644 generated/1.22/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go rename generated/1.22/client/supervisor/informers/externalversions/{oauth => config}/v1alpha1/oidcclient.go (88%) delete mode 100644 generated/1.22/client/supervisor/informers/externalversions/oauth/interface.go delete mode 100644 generated/1.22/client/supervisor/informers/externalversions/oauth/v1alpha1/interface.go rename generated/{1.20/client/supervisor/listers/oauth => 1.22/client/supervisor/listers/config}/v1alpha1/oidcclient.go (97%) delete mode 100644 generated/1.22/client/supervisor/listers/oauth/v1alpha1/expansion_generated.go delete mode 100644 generated/1.22/client/supervisor/virtual/clientset/versioned/clientset.go delete mode 100644 generated/1.22/client/supervisor/virtual/clientset/versioned/doc.go delete mode 100644 generated/1.22/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go delete mode 100644 generated/1.22/client/supervisor/virtual/clientset/versioned/fake/doc.go delete mode 100644 generated/1.22/client/supervisor/virtual/clientset/versioned/fake/register.go delete mode 100644 generated/1.22/client/supervisor/virtual/clientset/versioned/scheme/doc.go delete mode 100644 generated/1.22/client/supervisor/virtual/clientset/versioned/scheme/register.go delete mode 100644 generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go delete mode 100644 generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go delete mode 100644 generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go delete mode 100644 generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go delete mode 100644 generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go delete mode 100644 generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go create mode 100644 generated/1.22/crds/config.supervisor.pinniped.dev_oidcclients.yaml delete mode 100644 generated/1.22/crds/oauth.supervisor.pinniped.dev_oidcclients.yaml create mode 100644 generated/1.23/apis/supervisor/clientsecret/doc.go create mode 100644 generated/1.23/apis/supervisor/clientsecret/register.go create mode 100644 generated/1.23/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go rename generated/1.23/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/conversion.go (100%) rename generated/1.23/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/defaults.go (100%) rename generated/1.23/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/doc.go (64%) create mode 100644 generated/1.23/apis/supervisor/clientsecret/v1alpha1/register.go rename generated/1.23/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/types_oidcclientsecretrequest.go (100%) create mode 100644 generated/1.23/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go rename generated/1.23/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/zz_generated.deepcopy.go (100%) rename generated/1.23/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/zz_generated.defaults.go (100%) create mode 100644 generated/1.23/apis/supervisor/clientsecret/zz_generated.deepcopy.go rename generated/1.23/apis/supervisor/{oauth => config}/v1alpha1/types_oidcclient.go (100%) delete mode 100644 generated/1.23/apis/supervisor/oauth/v1alpha1/doc.go delete mode 100644 generated/1.23/apis/supervisor/oauth/v1alpha1/register.go delete mode 100644 generated/1.23/apis/supervisor/oauth/v1alpha1/zz_generated.deepcopy.go delete mode 100644 generated/1.23/apis/supervisor/virtual/oauth/doc.go delete mode 100644 generated/1.23/apis/supervisor/virtual/oauth/register.go delete mode 100644 generated/1.23/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go delete mode 100644 generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/register.go delete mode 100644 generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go delete mode 100644 generated/1.23/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go rename generated/1.23/client/supervisor/{virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go => clientset/versioned/typed/clientsecret/v1alpha1/clientsecret_client.go} (55%) rename generated/{1.20/client/supervisor/clientset/versioned/typed/oauth => 1.23/client/supervisor/clientset/versioned/typed/clientsecret}/v1alpha1/doc.go (100%) rename generated/{1.20/client/supervisor/clientset/versioned/typed/oauth => 1.23/client/supervisor/clientset/versioned/typed/clientsecret}/v1alpha1/fake/doc.go (100%) rename generated/1.23/client/supervisor/clientset/versioned/typed/{oauth/v1alpha1/fake/fake_oauth_client.go => clientsecret/v1alpha1/fake/fake_clientsecret_client.go} (60%) create mode 100644 generated/1.23/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_oidcclientsecretrequest.go rename generated/1.23/client/supervisor/{virtual/clientset/versioned/typed/oauth => clientset/versioned/typed/clientsecret}/v1alpha1/generated_expansion.go (100%) create mode 100644 generated/1.23/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/oidcclientsecretrequest.go rename generated/1.23/client/supervisor/clientset/versioned/typed/{oauth => config}/v1alpha1/fake/fake_oidcclient.go (92%) rename generated/1.23/client/supervisor/clientset/versioned/typed/{oauth => config}/v1alpha1/oidcclient.go (97%) delete mode 100644 generated/1.23/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/doc.go delete mode 100644 generated/1.23/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go delete mode 100644 generated/1.23/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go delete mode 100644 generated/1.23/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go rename generated/1.23/client/supervisor/informers/externalversions/{oauth => config}/v1alpha1/oidcclient.go (88%) delete mode 100644 generated/1.23/client/supervisor/informers/externalversions/oauth/interface.go delete mode 100644 generated/1.23/client/supervisor/informers/externalversions/oauth/v1alpha1/interface.go create mode 100644 generated/1.23/client/supervisor/listers/config/v1alpha1/oidcclient.go delete mode 100644 generated/1.23/client/supervisor/listers/oauth/v1alpha1/expansion_generated.go delete mode 100644 generated/1.23/client/supervisor/listers/oauth/v1alpha1/oidcclient.go delete mode 100644 generated/1.23/client/supervisor/virtual/clientset/versioned/clientset.go delete mode 100644 generated/1.23/client/supervisor/virtual/clientset/versioned/doc.go delete mode 100644 generated/1.23/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go delete mode 100644 generated/1.23/client/supervisor/virtual/clientset/versioned/fake/doc.go delete mode 100644 generated/1.23/client/supervisor/virtual/clientset/versioned/fake/register.go delete mode 100644 generated/1.23/client/supervisor/virtual/clientset/versioned/scheme/doc.go delete mode 100644 generated/1.23/client/supervisor/virtual/clientset/versioned/scheme/register.go delete mode 100644 generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go delete mode 100644 generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go delete mode 100644 generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go delete mode 100644 generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go delete mode 100644 generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go create mode 100644 generated/1.23/crds/config.supervisor.pinniped.dev_oidcclients.yaml delete mode 100644 generated/1.23/crds/oauth.supervisor.pinniped.dev_oidcclients.yaml create mode 100644 generated/1.24/apis/supervisor/clientsecret/doc.go create mode 100644 generated/1.24/apis/supervisor/clientsecret/register.go create mode 100644 generated/1.24/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go rename generated/1.24/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/conversion.go (100%) rename generated/1.24/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/defaults.go (100%) rename generated/1.24/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/doc.go (64%) create mode 100644 generated/1.24/apis/supervisor/clientsecret/v1alpha1/register.go rename generated/1.24/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/types_oidcclientsecretrequest.go (100%) create mode 100644 generated/1.24/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go rename generated/1.24/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/zz_generated.deepcopy.go (100%) rename generated/1.24/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/zz_generated.defaults.go (100%) create mode 100644 generated/1.24/apis/supervisor/clientsecret/zz_generated.deepcopy.go rename generated/1.24/apis/supervisor/{oauth => config}/v1alpha1/types_oidcclient.go (100%) delete mode 100644 generated/1.24/apis/supervisor/oauth/v1alpha1/doc.go delete mode 100644 generated/1.24/apis/supervisor/oauth/v1alpha1/register.go delete mode 100644 generated/1.24/apis/supervisor/oauth/v1alpha1/zz_generated.deepcopy.go delete mode 100644 generated/1.24/apis/supervisor/virtual/oauth/doc.go delete mode 100644 generated/1.24/apis/supervisor/virtual/oauth/register.go delete mode 100644 generated/1.24/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go delete mode 100644 generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/register.go delete mode 100644 generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go delete mode 100644 generated/1.24/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go rename generated/{latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go => 1.24/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/clientsecret_client.go} (55%) rename generated/{1.20/client/supervisor/virtual/clientset/versioned/typed/oauth => 1.24/client/supervisor/clientset/versioned/typed/clientsecret}/v1alpha1/doc.go (100%) rename generated/{1.20/client/supervisor/virtual/clientset/versioned/typed/oauth => 1.24/client/supervisor/clientset/versioned/typed/clientsecret}/v1alpha1/fake/doc.go (100%) rename generated/1.24/client/supervisor/clientset/versioned/typed/{oauth/v1alpha1/fake/fake_oauth_client.go => clientsecret/v1alpha1/fake/fake_clientsecret_client.go} (60%) create mode 100644 generated/1.24/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_oidcclientsecretrequest.go rename generated/1.24/client/supervisor/{virtual/clientset/versioned/typed/oauth => clientset/versioned/typed/clientsecret}/v1alpha1/generated_expansion.go (100%) create mode 100644 generated/1.24/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/oidcclientsecretrequest.go rename generated/1.24/client/supervisor/clientset/versioned/typed/{oauth => config}/v1alpha1/fake/fake_oidcclient.go (92%) rename generated/1.24/client/supervisor/clientset/versioned/typed/{oauth => config}/v1alpha1/oidcclient.go (97%) delete mode 100644 generated/1.24/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/doc.go delete mode 100644 generated/1.24/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go delete mode 100644 generated/1.24/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go delete mode 100644 generated/1.24/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go rename generated/1.24/client/supervisor/informers/externalversions/{oauth => config}/v1alpha1/oidcclient.go (88%) delete mode 100644 generated/1.24/client/supervisor/informers/externalversions/oauth/interface.go delete mode 100644 generated/1.24/client/supervisor/informers/externalversions/oauth/v1alpha1/interface.go create mode 100644 generated/1.24/client/supervisor/listers/config/v1alpha1/oidcclient.go delete mode 100644 generated/1.24/client/supervisor/listers/oauth/v1alpha1/expansion_generated.go delete mode 100644 generated/1.24/client/supervisor/listers/oauth/v1alpha1/oidcclient.go delete mode 100644 generated/1.24/client/supervisor/virtual/clientset/versioned/clientset.go delete mode 100644 generated/1.24/client/supervisor/virtual/clientset/versioned/doc.go delete mode 100644 generated/1.24/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go delete mode 100644 generated/1.24/client/supervisor/virtual/clientset/versioned/fake/doc.go delete mode 100644 generated/1.24/client/supervisor/virtual/clientset/versioned/fake/register.go delete mode 100644 generated/1.24/client/supervisor/virtual/clientset/versioned/scheme/doc.go delete mode 100644 generated/1.24/client/supervisor/virtual/clientset/versioned/scheme/register.go delete mode 100644 generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go delete mode 100644 generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go delete mode 100644 generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go delete mode 100644 generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go delete mode 100644 generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go create mode 100644 generated/1.24/crds/config.supervisor.pinniped.dev_oidcclients.yaml delete mode 100644 generated/1.24/crds/oauth.supervisor.pinniped.dev_oidcclients.yaml create mode 100644 generated/latest/apis/supervisor/clientsecret/doc.go create mode 100644 generated/latest/apis/supervisor/clientsecret/register.go create mode 100644 generated/latest/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go rename generated/latest/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/conversion.go (100%) rename generated/latest/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/defaults.go (100%) rename generated/latest/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/doc.go (64%) create mode 100644 generated/latest/apis/supervisor/clientsecret/v1alpha1/register.go rename generated/latest/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/types_oidcclientsecretrequest.go (100%) create mode 100644 generated/latest/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go rename generated/latest/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/zz_generated.deepcopy.go (100%) rename generated/latest/apis/supervisor/{virtual/oauth => clientsecret}/v1alpha1/zz_generated.defaults.go (100%) create mode 100644 generated/latest/apis/supervisor/clientsecret/zz_generated.deepcopy.go rename generated/latest/apis/supervisor/{oauth => config}/v1alpha1/types_oidcclient.go (100%) delete mode 100644 generated/latest/apis/supervisor/oauth/v1alpha1/doc.go delete mode 100644 generated/latest/apis/supervisor/oauth/v1alpha1/register.go delete mode 100644 generated/latest/apis/supervisor/oauth/v1alpha1/zz_generated.deepcopy.go delete mode 100644 generated/latest/apis/supervisor/virtual/oauth/doc.go delete mode 100644 generated/latest/apis/supervisor/virtual/oauth/register.go delete mode 100644 generated/latest/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go delete mode 100644 generated/latest/apis/supervisor/virtual/oauth/v1alpha1/register.go delete mode 100644 generated/latest/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go delete mode 100644 generated/latest/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go rename generated/{1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go => latest/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/clientsecret_client.go} (55%) rename generated/{1.21/client/supervisor/clientset/versioned/typed/oauth => latest/client/supervisor/clientset/versioned/typed/clientsecret}/v1alpha1/doc.go (100%) rename generated/{1.21/client/supervisor/clientset/versioned/typed/oauth => latest/client/supervisor/clientset/versioned/typed/clientsecret}/v1alpha1/fake/doc.go (100%) rename generated/latest/client/supervisor/clientset/versioned/typed/{oauth/v1alpha1/fake/fake_oauth_client.go => clientsecret/v1alpha1/fake/fake_clientsecret_client.go} (60%) create mode 100644 generated/latest/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_oidcclientsecretrequest.go rename generated/latest/client/supervisor/{virtual/clientset/versioned/typed/oauth => clientset/versioned/typed/clientsecret}/v1alpha1/generated_expansion.go (100%) create mode 100644 generated/latest/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/oidcclientsecretrequest.go rename generated/latest/client/supervisor/clientset/versioned/typed/{oauth => config}/v1alpha1/fake/fake_oidcclient.go (92%) rename generated/latest/client/supervisor/clientset/versioned/typed/{oauth => config}/v1alpha1/oidcclient.go (97%) delete mode 100644 generated/latest/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/doc.go delete mode 100644 generated/latest/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go delete mode 100644 generated/latest/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go delete mode 100644 generated/latest/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go rename generated/latest/client/supervisor/informers/externalversions/{oauth => config}/v1alpha1/oidcclient.go (88%) delete mode 100644 generated/latest/client/supervisor/informers/externalversions/oauth/interface.go delete mode 100644 generated/latest/client/supervisor/informers/externalversions/oauth/v1alpha1/interface.go create mode 100644 generated/latest/client/supervisor/listers/config/v1alpha1/oidcclient.go delete mode 100644 generated/latest/client/supervisor/listers/oauth/v1alpha1/expansion_generated.go delete mode 100644 generated/latest/client/supervisor/listers/oauth/v1alpha1/oidcclient.go delete mode 100644 generated/latest/client/supervisor/virtual/clientset/versioned/clientset.go delete mode 100644 generated/latest/client/supervisor/virtual/clientset/versioned/doc.go delete mode 100644 generated/latest/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go delete mode 100644 generated/latest/client/supervisor/virtual/clientset/versioned/fake/doc.go delete mode 100644 generated/latest/client/supervisor/virtual/clientset/versioned/fake/register.go delete mode 100644 generated/latest/client/supervisor/virtual/clientset/versioned/scheme/doc.go delete mode 100644 generated/latest/client/supervisor/virtual/clientset/versioned/scheme/register.go delete mode 100644 generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go delete mode 100644 generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go delete mode 100644 generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go delete mode 100644 generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go delete mode 100644 generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go diff --git a/apis/supervisor/clientsecret/doc.go.tmpl b/apis/supervisor/clientsecret/doc.go.tmpl new file mode 100644 index 00000000..c536bc75 --- /dev/null +++ b/apis/supervisor/clientsecret/doc.go.tmpl @@ -0,0 +1,8 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// +k8s:deepcopy-gen=package +// +groupName=clientsecret.supervisor.pinniped.dev + +// Package clientsecret is the internal version of the Pinniped client secret API. +package clientsecret diff --git a/apis/supervisor/virtual/oauth/register.go.tmpl b/apis/supervisor/clientsecret/register.go.tmpl similarity index 93% rename from apis/supervisor/virtual/oauth/register.go.tmpl rename to apis/supervisor/clientsecret/register.go.tmpl index a238d85f..4a1c0173 100644 --- a/apis/supervisor/virtual/oauth/register.go.tmpl +++ b/apis/supervisor/clientsecret/register.go.tmpl @@ -1,14 +1,14 @@ // Copyright 2022 the Pinniped contributors. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -package oauth +package clientsecret import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) -const GroupName = "oauth.virtual.supervisor.pinniped.dev" +const GroupName = "clientsecret.supervisor.pinniped.dev" // SchemeGroupVersion is group version used to register these objects. var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} diff --git a/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go.tmpl b/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go.tmpl similarity index 97% rename from apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go.tmpl rename to apis/supervisor/clientsecret/types_oidcclientsecretrequest.go.tmpl index ac54a93c..7fd1eb65 100644 --- a/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go.tmpl +++ b/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go.tmpl @@ -1,7 +1,7 @@ // Copyright 2022 the Pinniped contributors. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -package oauth +package clientsecret import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/apis/supervisor/virtual/oauth/v1alpha1/conversion.go.tmpl b/apis/supervisor/clientsecret/v1alpha1/conversion.go.tmpl similarity index 100% rename from apis/supervisor/virtual/oauth/v1alpha1/conversion.go.tmpl rename to apis/supervisor/clientsecret/v1alpha1/conversion.go.tmpl diff --git a/apis/supervisor/virtual/oauth/v1alpha1/defaults.go.tmpl b/apis/supervisor/clientsecret/v1alpha1/defaults.go.tmpl similarity index 100% rename from apis/supervisor/virtual/oauth/v1alpha1/defaults.go.tmpl rename to apis/supervisor/clientsecret/v1alpha1/defaults.go.tmpl diff --git a/apis/supervisor/virtual/oauth/v1alpha1/doc.go.tmpl b/apis/supervisor/clientsecret/v1alpha1/doc.go.tmpl similarity index 64% rename from apis/supervisor/virtual/oauth/v1alpha1/doc.go.tmpl rename to apis/supervisor/clientsecret/v1alpha1/doc.go.tmpl index c94cc7b7..68beee50 100644 --- a/apis/supervisor/virtual/oauth/v1alpha1/doc.go.tmpl +++ b/apis/supervisor/clientsecret/v1alpha1/doc.go.tmpl @@ -3,9 +3,9 @@ // +k8s:openapi-gen=true // +k8s:deepcopy-gen=package -// +k8s:conversion-gen=go.pinniped.dev/GENERATED_PKG/apis/supervisor/virtual/oauth +// +k8s:conversion-gen=go.pinniped.dev/GENERATED_PKG/apis/supervisor/clientsecret // +k8s:defaulter-gen=TypeMeta -// +groupName=oauth.virtual.supervisor.pinniped.dev +// +groupName=clientsecret.supervisor.pinniped.dev -// Package v1alpha1 is the v1alpha1 version of the Pinniped virtual oauth API. +// Package v1alpha1 is the v1alpha1 version of the Pinniped client secret API. package v1alpha1 diff --git a/apis/supervisor/virtual/oauth/v1alpha1/register.go.tmpl b/apis/supervisor/clientsecret/v1alpha1/register.go.tmpl similarity index 95% rename from apis/supervisor/virtual/oauth/v1alpha1/register.go.tmpl rename to apis/supervisor/clientsecret/v1alpha1/register.go.tmpl index ecc75a08..49602125 100644 --- a/apis/supervisor/virtual/oauth/v1alpha1/register.go.tmpl +++ b/apis/supervisor/clientsecret/v1alpha1/register.go.tmpl @@ -9,7 +9,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" ) -const GroupName = "oauth.virtual.supervisor.pinniped.dev" +const GroupName = "clientsecret.supervisor.pinniped.dev" // SchemeGroupVersion is group version used to register these objects. var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} diff --git a/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go.tmpl b/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go.tmpl similarity index 100% rename from apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go.tmpl rename to apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go.tmpl diff --git a/apis/supervisor/config/v1alpha1/register.go.tmpl b/apis/supervisor/config/v1alpha1/register.go.tmpl index 69045298..54c51699 100644 --- a/apis/supervisor/config/v1alpha1/register.go.tmpl +++ b/apis/supervisor/config/v1alpha1/register.go.tmpl @@ -32,6 +32,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &FederationDomain{}, &FederationDomainList{}, + &OIDCClient{}, + &OIDCClientList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/apis/supervisor/oauth/v1alpha1/types_oidcclient.go.tmpl b/apis/supervisor/config/v1alpha1/types_oidcclient.go.tmpl similarity index 100% rename from apis/supervisor/oauth/v1alpha1/types_oidcclient.go.tmpl rename to apis/supervisor/config/v1alpha1/types_oidcclient.go.tmpl diff --git a/apis/supervisor/oauth/v1alpha1/doc.go.tmpl b/apis/supervisor/oauth/v1alpha1/doc.go.tmpl deleted file mode 100644 index 75580481..00000000 --- a/apis/supervisor/oauth/v1alpha1/doc.go.tmpl +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package -// +k8s:defaulter-gen=TypeMeta -// +groupName=oauth.supervisor.pinniped.dev - -// Package v1alpha1 is the v1alpha1 version of the Pinniped supervisor oauth API. -package v1alpha1 diff --git a/apis/supervisor/oauth/v1alpha1/register.go.tmpl b/apis/supervisor/oauth/v1alpha1/register.go.tmpl deleted file mode 100644 index 37ae1fbf..00000000 --- a/apis/supervisor/oauth/v1alpha1/register.go.tmpl +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const GroupName = "oauth.supervisor.pinniped.dev" - -// SchemeGroupVersion is group version used to register these objects. -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} - -var ( - SchemeBuilder runtime.SchemeBuilder - localSchemeBuilder = &SchemeBuilder - AddToScheme = localSchemeBuilder.AddToScheme -) - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addKnownTypes) -} - -// Adds the list of known types to the given scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &OIDCClient{}, - &OIDCClientList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} - -// Resource takes an unqualified resource and returns a Group qualified GroupResource. -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} diff --git a/apis/supervisor/virtual/oauth/doc.go.tmpl b/apis/supervisor/virtual/oauth/doc.go.tmpl deleted file mode 100644 index ca4e9a63..00000000 --- a/apis/supervisor/virtual/oauth/doc.go.tmpl +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// +k8s:deepcopy-gen=package -// +groupName=oauth.virtual.supervisor.pinniped.dev - -// Package oauth is the internal version of the Pinniped virtual oauth API. -package oauth diff --git a/deploy/supervisor/oauth.supervisor.pinniped.dev_oidcclients.yaml b/deploy/supervisor/config.supervisor.pinniped.dev_oidcclients.yaml similarity index 98% rename from deploy/supervisor/oauth.supervisor.pinniped.dev_oidcclients.yaml rename to deploy/supervisor/config.supervisor.pinniped.dev_oidcclients.yaml index 589a9154..4efa445e 100644 --- a/deploy/supervisor/oauth.supervisor.pinniped.dev_oidcclients.yaml +++ b/deploy/supervisor/config.supervisor.pinniped.dev_oidcclients.yaml @@ -5,9 +5,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null - name: oidcclients.oauth.supervisor.pinniped.dev + name: oidcclients.config.supervisor.pinniped.dev spec: - group: oauth.supervisor.pinniped.dev + group: config.supervisor.pinniped.dev names: categories: - pinniped diff --git a/deploy/supervisor/deployment.yaml b/deploy/supervisor/deployment.yaml index e125771a..e693dd62 100644 --- a/deploy/supervisor/deployment.yaml +++ b/deploy/supervisor/deployment.yaml @@ -197,11 +197,11 @@ spec: apiVersion: apiregistration.k8s.io/v1 kind: APIService metadata: - name: #@ pinnipedDevAPIGroupWithPrefix("v1alpha1.oauth.virtual.supervisor") + name: #@ pinnipedDevAPIGroupWithPrefix("v1alpha1.clientsecret.supervisor") labels: #@ labels() spec: version: v1alpha1 - group: #@ pinnipedDevAPIGroupWithPrefix("oauth.virtual.supervisor") + group: #@ pinnipedDevAPIGroupWithPrefix("clientsecret.supervisor") groupPriorityMinimum: 9900 versionPriority: 15 #! caBundle: Do not include this key here. Starts out null, will be updated/owned by the golang code. diff --git a/deploy/supervisor/z0_crd_overlay.yaml b/deploy/supervisor/z0_crd_overlay.yaml index 130f780d..a658091b 100644 --- a/deploy/supervisor/z0_crd_overlay.yaml +++ b/deploy/supervisor/z0_crd_overlay.yaml @@ -41,11 +41,11 @@ metadata: spec: group: #@ pinnipedDevAPIGroupWithPrefix("idp.supervisor") -#@overlay/match by=overlay.subset({"kind": "CustomResourceDefinition", "metadata":{"name":"oidcclients.oauth.supervisor.pinniped.dev"}}), expects=1 +#@overlay/match by=overlay.subset({"kind": "CustomResourceDefinition", "metadata":{"name":"oidcclients.config.supervisor.pinniped.dev"}}), expects=1 --- metadata: #@overlay/match missing_ok=True labels: #@ labels() - name: #@ pinnipedDevAPIGroupWithPrefix("oidcclients.oauth.supervisor") + name: #@ pinnipedDevAPIGroupWithPrefix("oidcclients.config.supervisor") spec: - group: #@ pinnipedDevAPIGroupWithPrefix("oauth.supervisor") + group: #@ pinnipedDevAPIGroupWithPrefix("config.supervisor") diff --git a/generated/1.17/README.adoc b/generated/1.17/README.adoc index 0b90292d..739a669e 100644 --- a/generated/1.17/README.adoc +++ b/generated/1.17/README.adoc @@ -6,15 +6,14 @@ .Packages - xref:{anchor_prefix}-authentication-concierge-pinniped-dev-v1alpha1[$$authentication.concierge.pinniped.dev/v1alpha1$$] +- xref:{anchor_prefix}-clientsecret-supervisor-pinniped-dev-clientsecret[$$clientsecret.supervisor.pinniped.dev/clientsecret$$] +- xref:{anchor_prefix}-clientsecret-supervisor-pinniped-dev-v1alpha1[$$clientsecret.supervisor.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-config-concierge-pinniped-dev-v1alpha1[$$config.concierge.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-config-supervisor-pinniped-dev-v1alpha1[$$config.supervisor.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-identity-concierge-pinniped-dev-identity[$$identity.concierge.pinniped.dev/identity$$] - xref:{anchor_prefix}-identity-concierge-pinniped-dev-v1alpha1[$$identity.concierge.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-idp-supervisor-pinniped-dev-v1alpha1[$$idp.supervisor.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-login-concierge-pinniped-dev-v1alpha1[$$login.concierge.pinniped.dev/v1alpha1$$] -- xref:{anchor_prefix}-oauth-supervisor-pinniped-dev-v1alpha1[$$oauth.supervisor.pinniped.dev/v1alpha1$$] -- xref:{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-oauth[$$oauth.virtual.supervisor.pinniped.dev/oauth$$] -- xref:{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-v1alpha1[$$oauth.virtual.supervisor.pinniped.dev/v1alpha1$$] [id="{anchor_prefix}-authentication-concierge-pinniped-dev-v1alpha1"] @@ -213,6 +212,98 @@ Status of a webhook authenticator. +[id="{anchor_prefix}-clientsecret-supervisor-pinniped-dev-clientsecret"] +=== clientsecret.supervisor.pinniped.dev/clientsecret + +Package clientsecret is the internal version of the Pinniped client secret API. + + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-clientsecret-oidcclientsecretrequestspec"] +==== OIDCClientSecretRequestSpec + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-clientsecret-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generateNewSecret`* __boolean__ | +| *`revokeOldSecrets`* __boolean__ | +|=== + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-clientsecret-oidcclientsecretrequeststatus"] +==== OIDCClientSecretRequestStatus + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-clientsecret-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generatedSecret`* __string__ | +| *`totalClientSecrets`* __integer__ | +|=== + + + +[id="{anchor_prefix}-clientsecret-supervisor-pinniped-dev-v1alpha1"] +=== clientsecret.supervisor.pinniped.dev/v1alpha1 + +Package v1alpha1 is the v1alpha1 version of the Pinniped client secret API. + + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequestspec"] +==== OIDCClientSecretRequestSpec + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generateNewSecret`* __boolean__ | +| *`revokeOldSecrets`* __boolean__ | +|=== + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequeststatus"] +==== OIDCClientSecretRequestStatus + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generatedSecret`* __string__ | +| *`totalClientSecrets`* __integer__ | +|=== + + + [id="{anchor_prefix}-config-concierge-pinniped-dev-v1alpha1"] === config.concierge.pinniped.dev/v1alpha1 @@ -546,6 +637,51 @@ FederationDomainTLSSpec is a struct that describes the TLS configuration for an |=== +[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-config-v1alpha1-oidcclient"] +==== OIDCClient + +OIDCClient describes the configuration of an OIDC client. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-config-v1alpha1-oidcclientlist[$$OIDCClientList$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#objectmeta-v1-meta[$$ObjectMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. + +| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-config-v1alpha1-oidcclientspec[$$OIDCClientSpec$$]__ | Spec of the OIDC client. +| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-config-v1alpha1-oidcclientstatus[$$OIDCClientStatus$$]__ | Status of the OIDC client. +|=== + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-config-v1alpha1-oidcclientspec"] +==== OIDCClientSpec + +OIDCClientSpec is a struct that describes an OIDC Client. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-config-v1alpha1-oidcclient[$$OIDCClient$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`allowedRedirectURIs`* __string array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be https, unless it is a loopback. +| *`allowedGrantTypes`* __GrantType array__ | allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this client. + Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. +| *`allowedScopes`* __Scope array__ | allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. + Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. +|=== + + + + [id="{anchor_prefix}-identity-concierge-pinniped-dev-identity"] === identity.concierge.pinniped.dev/identity @@ -1335,148 +1471,3 @@ TokenCredentialRequestStatus is the status of a TokenCredentialRequest, returned |=== - -[id="{anchor_prefix}-oauth-supervisor-pinniped-dev-v1alpha1"] -=== oauth.supervisor.pinniped.dev/v1alpha1 - -Package v1alpha1 is the v1alpha1 version of the Pinniped supervisor oauth API. - - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-oauth-v1alpha1-oidcclient"] -==== OIDCClient - -OIDCClient describes the configuration of an OIDC client. - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-oauth-v1alpha1-oidcclientlist[$$OIDCClientList$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#objectmeta-v1-meta[$$ObjectMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. - -| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-oauth-v1alpha1-oidcclientspec[$$OIDCClientSpec$$]__ | Spec of the OIDC client. -| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-oauth-v1alpha1-oidcclientstatus[$$OIDCClientStatus$$]__ | Status of the OIDC client. -|=== - - - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-oauth-v1alpha1-oidcclientspec"] -==== OIDCClientSpec - -OIDCClientSpec is a struct that describes an OIDC Client. - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-oauth-v1alpha1-oidcclient[$$OIDCClient$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`allowedRedirectURIs`* __string array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be https, unless it is a loopback. -| *`allowedGrantTypes`* __GrantType array__ | allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. -| *`allowedScopes`* __Scope array__ | allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. -|=== - - - - - -[id="{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-oauth"] -=== oauth.virtual.supervisor.pinniped.dev/oauth - -Package oauth is the internal version of the Pinniped virtual oauth API. - - - - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-virtual-oauth-oidcclientsecretrequestspec"] -==== OIDCClientSecretRequestSpec - - - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-virtual-oauth-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`generateNewSecret`* __boolean__ | -| *`revokeOldSecrets`* __boolean__ | -|=== - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-virtual-oauth-oidcclientsecretrequeststatus"] -==== OIDCClientSecretRequestStatus - - - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-virtual-oauth-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`generatedSecret`* __string__ | -| *`totalClientSecrets`* __integer__ | -|=== - - - -[id="{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-v1alpha1"] -=== oauth.virtual.supervisor.pinniped.dev/v1alpha1 - -Package v1alpha1 is the v1alpha1 version of the Pinniped virtual oauth API. - - - - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequestspec"] -==== OIDCClientSecretRequestSpec - - - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`generateNewSecret`* __boolean__ | -| *`revokeOldSecrets`* __boolean__ | -|=== - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequeststatus"] -==== OIDCClientSecretRequestStatus - - - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`generatedSecret`* __string__ | -| *`totalClientSecrets`* __integer__ | -|=== - - diff --git a/generated/1.17/apis/supervisor/clientsecret/doc.go b/generated/1.17/apis/supervisor/clientsecret/doc.go new file mode 100644 index 00000000..c536bc75 --- /dev/null +++ b/generated/1.17/apis/supervisor/clientsecret/doc.go @@ -0,0 +1,8 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// +k8s:deepcopy-gen=package +// +groupName=clientsecret.supervisor.pinniped.dev + +// Package clientsecret is the internal version of the Pinniped client secret API. +package clientsecret diff --git a/generated/1.18/apis/supervisor/virtual/oauth/register.go b/generated/1.17/apis/supervisor/clientsecret/register.go similarity index 93% rename from generated/1.18/apis/supervisor/virtual/oauth/register.go rename to generated/1.17/apis/supervisor/clientsecret/register.go index a238d85f..4a1c0173 100644 --- a/generated/1.18/apis/supervisor/virtual/oauth/register.go +++ b/generated/1.17/apis/supervisor/clientsecret/register.go @@ -1,14 +1,14 @@ // Copyright 2022 the Pinniped contributors. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -package oauth +package clientsecret import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) -const GroupName = "oauth.virtual.supervisor.pinniped.dev" +const GroupName = "clientsecret.supervisor.pinniped.dev" // SchemeGroupVersion is group version used to register these objects. var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} diff --git a/generated/1.19/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go b/generated/1.17/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go similarity index 97% rename from generated/1.19/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go rename to generated/1.17/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go index ac54a93c..7fd1eb65 100644 --- a/generated/1.19/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go +++ b/generated/1.17/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go @@ -1,7 +1,7 @@ // Copyright 2022 the Pinniped contributors. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -package oauth +package clientsecret import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/conversion.go b/generated/1.17/apis/supervisor/clientsecret/v1alpha1/conversion.go similarity index 100% rename from generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/conversion.go rename to generated/1.17/apis/supervisor/clientsecret/v1alpha1/conversion.go diff --git a/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/defaults.go b/generated/1.17/apis/supervisor/clientsecret/v1alpha1/defaults.go similarity index 100% rename from generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/defaults.go rename to generated/1.17/apis/supervisor/clientsecret/v1alpha1/defaults.go diff --git a/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/doc.go b/generated/1.17/apis/supervisor/clientsecret/v1alpha1/doc.go similarity index 64% rename from generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/doc.go rename to generated/1.17/apis/supervisor/clientsecret/v1alpha1/doc.go index 6437db4d..f008eec0 100644 --- a/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/doc.go +++ b/generated/1.17/apis/supervisor/clientsecret/v1alpha1/doc.go @@ -3,9 +3,9 @@ // +k8s:openapi-gen=true // +k8s:deepcopy-gen=package -// +k8s:conversion-gen=go.pinniped.dev/generated/1.17/apis/supervisor/virtual/oauth +// +k8s:conversion-gen=go.pinniped.dev/generated/1.17/apis/supervisor/clientsecret // +k8s:defaulter-gen=TypeMeta -// +groupName=oauth.virtual.supervisor.pinniped.dev +// +groupName=clientsecret.supervisor.pinniped.dev -// Package v1alpha1 is the v1alpha1 version of the Pinniped virtual oauth API. +// Package v1alpha1 is the v1alpha1 version of the Pinniped client secret API. package v1alpha1 diff --git a/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/register.go b/generated/1.17/apis/supervisor/clientsecret/v1alpha1/register.go similarity index 95% rename from generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/register.go rename to generated/1.17/apis/supervisor/clientsecret/v1alpha1/register.go index ecc75a08..49602125 100644 --- a/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/register.go +++ b/generated/1.17/apis/supervisor/clientsecret/v1alpha1/register.go @@ -9,7 +9,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" ) -const GroupName = "oauth.virtual.supervisor.pinniped.dev" +const GroupName = "clientsecret.supervisor.pinniped.dev" // SchemeGroupVersion is group version used to register these objects. var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} diff --git a/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go b/generated/1.17/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go similarity index 100% rename from generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go rename to generated/1.17/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go diff --git a/generated/1.17/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go b/generated/1.17/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go new file mode 100644 index 00000000..c559d1c2 --- /dev/null +++ b/generated/1.17/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go @@ -0,0 +1,131 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + clientsecret "go.pinniped.dev/generated/1.17/apis/supervisor/clientsecret" + 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((*OIDCClientSecretRequest)(nil), (*clientsecret.OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest(a.(*OIDCClientSecretRequest), b.(*clientsecret.OIDCClientSecretRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientsecret.OIDCClientSecretRequest)(nil), (*OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(a.(*clientsecret.OIDCClientSecretRequest), b.(*OIDCClientSecretRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestSpec)(nil), (*clientsecret.OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(a.(*OIDCClientSecretRequestSpec), b.(*clientsecret.OIDCClientSecretRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientsecret.OIDCClientSecretRequestSpec)(nil), (*OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(a.(*clientsecret.OIDCClientSecretRequestSpec), b.(*OIDCClientSecretRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestStatus)(nil), (*clientsecret.OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(a.(*OIDCClientSecretRequestStatus), b.(*clientsecret.OIDCClientSecretRequestStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientsecret.OIDCClientSecretRequestStatus)(nil), (*OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(a.(*clientsecret.OIDCClientSecretRequestStatus), b.(*OIDCClientSecretRequestStatus), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *clientsecret.OIDCClientSecretRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *clientsecret.OIDCClientSecretRequest, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest(in, out, s) +} + +func autoConvert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *clientsecret.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest is an autogenerated conversion function. +func Convert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *clientsecret.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { + return autoConvert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in, out, s) +} + +func autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *clientsecret.OIDCClientSecretRequestSpec, s conversion.Scope) error { + out.GenerateNewSecret = in.GenerateNewSecret + out.RevokeOldSecrets = in.RevokeOldSecrets + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *clientsecret.OIDCClientSecretRequestSpec, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(in, out, s) +} + +func autoConvert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *clientsecret.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { + out.GenerateNewSecret = in.GenerateNewSecret + out.RevokeOldSecrets = in.RevokeOldSecrets + return nil +} + +// Convert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec is an autogenerated conversion function. +func Convert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *clientsecret.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { + return autoConvert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in, out, s) +} + +func autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *clientsecret.OIDCClientSecretRequestStatus, s conversion.Scope) error { + out.GeneratedSecret = in.GeneratedSecret + out.TotalClientSecrets = in.TotalClientSecrets + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *clientsecret.OIDCClientSecretRequestStatus, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(in, out, s) +} + +func autoConvert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *clientsecret.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { + out.GeneratedSecret = in.GeneratedSecret + out.TotalClientSecrets = in.TotalClientSecrets + return nil +} + +// Convert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus is an autogenerated conversion function. +func Convert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *clientsecret.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { + return autoConvert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in, out, s) +} diff --git a/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go b/generated/1.17/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go similarity index 100% rename from generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go rename to generated/1.17/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go diff --git a/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go b/generated/1.17/apis/supervisor/clientsecret/v1alpha1/zz_generated.defaults.go similarity index 100% rename from generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go rename to generated/1.17/apis/supervisor/clientsecret/v1alpha1/zz_generated.defaults.go diff --git a/generated/1.19/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go b/generated/1.17/apis/supervisor/clientsecret/zz_generated.deepcopy.go similarity index 99% rename from generated/1.19/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go rename to generated/1.17/apis/supervisor/clientsecret/zz_generated.deepcopy.go index 24b58e7b..e0dc7d68 100644 --- a/generated/1.19/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go +++ b/generated/1.17/apis/supervisor/clientsecret/zz_generated.deepcopy.go @@ -6,7 +6,7 @@ // Code generated by deepcopy-gen. DO NOT EDIT. -package oauth +package clientsecret import ( runtime "k8s.io/apimachinery/pkg/runtime" diff --git a/generated/1.17/apis/supervisor/config/v1alpha1/register.go b/generated/1.17/apis/supervisor/config/v1alpha1/register.go index 69045298..54c51699 100644 --- a/generated/1.17/apis/supervisor/config/v1alpha1/register.go +++ b/generated/1.17/apis/supervisor/config/v1alpha1/register.go @@ -32,6 +32,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &FederationDomain{}, &FederationDomainList{}, + &OIDCClient{}, + &OIDCClientList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/generated/1.17/apis/supervisor/oauth/v1alpha1/types_oidcclient.go b/generated/1.17/apis/supervisor/config/v1alpha1/types_oidcclient.go similarity index 100% rename from generated/1.17/apis/supervisor/oauth/v1alpha1/types_oidcclient.go rename to generated/1.17/apis/supervisor/config/v1alpha1/types_oidcclient.go diff --git a/generated/1.17/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go b/generated/1.17/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go index 856b8988..a55d88e7 100644 --- a/generated/1.17/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go +++ b/generated/1.17/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go @@ -150,3 +150,111 @@ func (in *FederationDomainTLSSpec) DeepCopy() *FederationDomainTLSSpec { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClient) DeepCopyInto(out *OIDCClient) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClient. +func (in *OIDCClient) DeepCopy() *OIDCClient { + if in == nil { + return nil + } + out := new(OIDCClient) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClient) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientList) DeepCopyInto(out *OIDCClientList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OIDCClient, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientList. +func (in *OIDCClientList) DeepCopy() *OIDCClientList { + if in == nil { + return nil + } + out := new(OIDCClientList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSpec) DeepCopyInto(out *OIDCClientSpec) { + *out = *in + if in.AllowedRedirectURIs != nil { + in, out := &in.AllowedRedirectURIs, &out.AllowedRedirectURIs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.AllowedGrantTypes != nil { + in, out := &in.AllowedGrantTypes, &out.AllowedGrantTypes + *out = make([]GrantType, len(*in)) + copy(*out, *in) + } + if in.AllowedScopes != nil { + in, out := &in.AllowedScopes, &out.AllowedScopes + *out = make([]Scope, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSpec. +func (in *OIDCClientSpec) DeepCopy() *OIDCClientSpec { + if in == nil { + return nil + } + out := new(OIDCClientSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientStatus) DeepCopyInto(out *OIDCClientStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientStatus. +func (in *OIDCClientStatus) DeepCopy() *OIDCClientStatus { + if in == nil { + return nil + } + out := new(OIDCClientStatus) + in.DeepCopyInto(out) + return out +} diff --git a/generated/1.17/apis/supervisor/oauth/v1alpha1/doc.go b/generated/1.17/apis/supervisor/oauth/v1alpha1/doc.go deleted file mode 100644 index 75580481..00000000 --- a/generated/1.17/apis/supervisor/oauth/v1alpha1/doc.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package -// +k8s:defaulter-gen=TypeMeta -// +groupName=oauth.supervisor.pinniped.dev - -// Package v1alpha1 is the v1alpha1 version of the Pinniped supervisor oauth API. -package v1alpha1 diff --git a/generated/1.17/apis/supervisor/oauth/v1alpha1/register.go b/generated/1.17/apis/supervisor/oauth/v1alpha1/register.go deleted file mode 100644 index 37ae1fbf..00000000 --- a/generated/1.17/apis/supervisor/oauth/v1alpha1/register.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const GroupName = "oauth.supervisor.pinniped.dev" - -// SchemeGroupVersion is group version used to register these objects. -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} - -var ( - SchemeBuilder runtime.SchemeBuilder - localSchemeBuilder = &SchemeBuilder - AddToScheme = localSchemeBuilder.AddToScheme -) - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addKnownTypes) -} - -// Adds the list of known types to the given scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &OIDCClient{}, - &OIDCClientList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} - -// Resource takes an unqualified resource and returns a Group qualified GroupResource. -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} diff --git a/generated/1.17/apis/supervisor/oauth/v1alpha1/zz_generated.deepcopy.go b/generated/1.17/apis/supervisor/oauth/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index 1aba8aea..00000000 --- a/generated/1.17/apis/supervisor/oauth/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,121 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClient) DeepCopyInto(out *OIDCClient) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClient. -func (in *OIDCClient) DeepCopy() *OIDCClient { - if in == nil { - return nil - } - out := new(OIDCClient) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OIDCClient) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientList) DeepCopyInto(out *OIDCClientList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]OIDCClient, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientList. -func (in *OIDCClientList) DeepCopy() *OIDCClientList { - if in == nil { - return nil - } - out := new(OIDCClientList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OIDCClientList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientSpec) DeepCopyInto(out *OIDCClientSpec) { - *out = *in - if in.AllowedRedirectURIs != nil { - in, out := &in.AllowedRedirectURIs, &out.AllowedRedirectURIs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.AllowedGrantTypes != nil { - in, out := &in.AllowedGrantTypes, &out.AllowedGrantTypes - *out = make([]GrantType, len(*in)) - copy(*out, *in) - } - if in.AllowedScopes != nil { - in, out := &in.AllowedScopes, &out.AllowedScopes - *out = make([]Scope, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSpec. -func (in *OIDCClientSpec) DeepCopy() *OIDCClientSpec { - if in == nil { - return nil - } - out := new(OIDCClientSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientStatus) DeepCopyInto(out *OIDCClientStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientStatus. -func (in *OIDCClientStatus) DeepCopy() *OIDCClientStatus { - if in == nil { - return nil - } - out := new(OIDCClientStatus) - in.DeepCopyInto(out) - return out -} diff --git a/generated/1.17/apis/supervisor/virtual/oauth/doc.go b/generated/1.17/apis/supervisor/virtual/oauth/doc.go deleted file mode 100644 index ca4e9a63..00000000 --- a/generated/1.17/apis/supervisor/virtual/oauth/doc.go +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// +k8s:deepcopy-gen=package -// +groupName=oauth.virtual.supervisor.pinniped.dev - -// Package oauth is the internal version of the Pinniped virtual oauth API. -package oauth diff --git a/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go b/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go deleted file mode 100644 index b4f28183..00000000 --- a/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go +++ /dev/null @@ -1,131 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by conversion-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - oauth "go.pinniped.dev/generated/1.17/apis/supervisor/virtual/oauth" - 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((*OIDCClientSecretRequest)(nil), (*oauth.OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(a.(*OIDCClientSecretRequest), b.(*oauth.OIDCClientSecretRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequest)(nil), (*OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(a.(*oauth.OIDCClientSecretRequest), b.(*OIDCClientSecretRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestSpec)(nil), (*oauth.OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(a.(*OIDCClientSecretRequestSpec), b.(*oauth.OIDCClientSecretRequestSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequestSpec)(nil), (*OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(a.(*oauth.OIDCClientSecretRequestSpec), b.(*OIDCClientSecretRequestSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestStatus)(nil), (*oauth.OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(a.(*OIDCClientSecretRequestStatus), b.(*oauth.OIDCClientSecretRequestStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequestStatus)(nil), (*OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(a.(*oauth.OIDCClientSecretRequestStatus), b.(*OIDCClientSecretRequestStatus), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *oauth.OIDCClientSecretRequest, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest is an autogenerated conversion function. -func Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *oauth.OIDCClientSecretRequest, s conversion.Scope) error { - return autoConvert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in, out, s) -} - -func autoConvert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *oauth.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest is an autogenerated conversion function. -func Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *oauth.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { - return autoConvert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in, out, s) -} - -func autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *oauth.OIDCClientSecretRequestSpec, s conversion.Scope) error { - out.GenerateNewSecret = in.GenerateNewSecret - out.RevokeOldSecrets = in.RevokeOldSecrets - return nil -} - -// Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec is an autogenerated conversion function. -func Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *oauth.OIDCClientSecretRequestSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in, out, s) -} - -func autoConvert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *oauth.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { - out.GenerateNewSecret = in.GenerateNewSecret - out.RevokeOldSecrets = in.RevokeOldSecrets - return nil -} - -// Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec is an autogenerated conversion function. -func Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *oauth.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { - return autoConvert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in, out, s) -} - -func autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *oauth.OIDCClientSecretRequestStatus, s conversion.Scope) error { - out.GeneratedSecret = in.GeneratedSecret - out.TotalClientSecrets = in.TotalClientSecrets - return nil -} - -// Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus is an autogenerated conversion function. -func Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *oauth.OIDCClientSecretRequestStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in, out, s) -} - -func autoConvert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *oauth.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { - out.GeneratedSecret = in.GeneratedSecret - out.TotalClientSecrets = in.TotalClientSecrets - return nil -} - -// Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus is an autogenerated conversion function. -func Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *oauth.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { - return autoConvert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in, out, s) -} diff --git a/generated/1.17/client/supervisor/clientset/versioned/clientset.go b/generated/1.17/client/supervisor/clientset/versioned/clientset.go index c51ef35e..bcd6f61e 100644 --- a/generated/1.17/client/supervisor/clientset/versioned/clientset.go +++ b/generated/1.17/client/supervisor/clientset/versioned/clientset.go @@ -8,9 +8,9 @@ package versioned import ( "fmt" + clientsecretv1alpha1 "go.pinniped.dev/generated/1.17/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1" configv1alpha1 "go.pinniped.dev/generated/1.17/client/supervisor/clientset/versioned/typed/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.17/client/supervisor/clientset/versioned/typed/idp/v1alpha1" - oauthv1alpha1 "go.pinniped.dev/generated/1.17/client/supervisor/clientset/versioned/typed/oauth/v1alpha1" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" flowcontrol "k8s.io/client-go/util/flowcontrol" @@ -18,18 +18,23 @@ import ( type Interface interface { Discovery() discovery.DiscoveryInterface + ClientsecretV1alpha1() clientsecretv1alpha1.ClientsecretV1alpha1Interface ConfigV1alpha1() configv1alpha1.ConfigV1alpha1Interface IDPV1alpha1() idpv1alpha1.IDPV1alpha1Interface - OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface } // Clientset contains the clients for groups. Each group has exactly one // version included in a Clientset. type Clientset struct { *discovery.DiscoveryClient - configV1alpha1 *configv1alpha1.ConfigV1alpha1Client - iDPV1alpha1 *idpv1alpha1.IDPV1alpha1Client - oauthV1alpha1 *oauthv1alpha1.OauthV1alpha1Client + clientsecretV1alpha1 *clientsecretv1alpha1.ClientsecretV1alpha1Client + configV1alpha1 *configv1alpha1.ConfigV1alpha1Client + iDPV1alpha1 *idpv1alpha1.IDPV1alpha1Client +} + +// ClientsecretV1alpha1 retrieves the ClientsecretV1alpha1Client +func (c *Clientset) ClientsecretV1alpha1() clientsecretv1alpha1.ClientsecretV1alpha1Interface { + return c.clientsecretV1alpha1 } // ConfigV1alpha1 retrieves the ConfigV1alpha1Client @@ -42,11 +47,6 @@ func (c *Clientset) IDPV1alpha1() idpv1alpha1.IDPV1alpha1Interface { return c.iDPV1alpha1 } -// OauthV1alpha1 retrieves the OauthV1alpha1Client -func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { - return c.oauthV1alpha1 -} - // Discovery retrieves the DiscoveryClient func (c *Clientset) Discovery() discovery.DiscoveryInterface { if c == nil { @@ -68,6 +68,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { } var cs Clientset var err error + cs.clientsecretV1alpha1, err = clientsecretv1alpha1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } cs.configV1alpha1, err = configv1alpha1.NewForConfig(&configShallowCopy) if err != nil { return nil, err @@ -76,10 +80,6 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { if err != nil { return nil, err } - cs.oauthV1alpha1, err = oauthv1alpha1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) if err != nil { @@ -92,9 +92,9 @@ 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.clientsecretV1alpha1 = clientsecretv1alpha1.NewForConfigOrDie(c) cs.configV1alpha1 = configv1alpha1.NewForConfigOrDie(c) cs.iDPV1alpha1 = idpv1alpha1.NewForConfigOrDie(c) - cs.oauthV1alpha1 = oauthv1alpha1.NewForConfigOrDie(c) cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) return &cs @@ -103,9 +103,9 @@ 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.clientsecretV1alpha1 = clientsecretv1alpha1.New(c) cs.configV1alpha1 = configv1alpha1.New(c) cs.iDPV1alpha1 = idpv1alpha1.New(c) - cs.oauthV1alpha1 = oauthv1alpha1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) return &cs diff --git a/generated/1.17/client/supervisor/clientset/versioned/fake/clientset_generated.go b/generated/1.17/client/supervisor/clientset/versioned/fake/clientset_generated.go index 7139764c..045c1e4c 100644 --- a/generated/1.17/client/supervisor/clientset/versioned/fake/clientset_generated.go +++ b/generated/1.17/client/supervisor/clientset/versioned/fake/clientset_generated.go @@ -7,12 +7,12 @@ package fake import ( clientset "go.pinniped.dev/generated/1.17/client/supervisor/clientset/versioned" + clientsecretv1alpha1 "go.pinniped.dev/generated/1.17/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1" + fakeclientsecretv1alpha1 "go.pinniped.dev/generated/1.17/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake" configv1alpha1 "go.pinniped.dev/generated/1.17/client/supervisor/clientset/versioned/typed/config/v1alpha1" fakeconfigv1alpha1 "go.pinniped.dev/generated/1.17/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake" idpv1alpha1 "go.pinniped.dev/generated/1.17/client/supervisor/clientset/versioned/typed/idp/v1alpha1" fakeidpv1alpha1 "go.pinniped.dev/generated/1.17/client/supervisor/clientset/versioned/typed/idp/v1alpha1/fake" - oauthv1alpha1 "go.pinniped.dev/generated/1.17/client/supervisor/clientset/versioned/typed/oauth/v1alpha1" - fakeoauthv1alpha1 "go.pinniped.dev/generated/1.17/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/discovery" @@ -67,6 +67,11 @@ func (c *Clientset) Tracker() testing.ObjectTracker { var _ clientset.Interface = &Clientset{} +// ClientsecretV1alpha1 retrieves the ClientsecretV1alpha1Client +func (c *Clientset) ClientsecretV1alpha1() clientsecretv1alpha1.ClientsecretV1alpha1Interface { + return &fakeclientsecretv1alpha1.FakeClientsecretV1alpha1{Fake: &c.Fake} +} + // ConfigV1alpha1 retrieves the ConfigV1alpha1Client func (c *Clientset) ConfigV1alpha1() configv1alpha1.ConfigV1alpha1Interface { return &fakeconfigv1alpha1.FakeConfigV1alpha1{Fake: &c.Fake} @@ -76,8 +81,3 @@ func (c *Clientset) ConfigV1alpha1() configv1alpha1.ConfigV1alpha1Interface { func (c *Clientset) IDPV1alpha1() idpv1alpha1.IDPV1alpha1Interface { return &fakeidpv1alpha1.FakeIDPV1alpha1{Fake: &c.Fake} } - -// OauthV1alpha1 retrieves the OauthV1alpha1Client -func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { - return &fakeoauthv1alpha1.FakeOauthV1alpha1{Fake: &c.Fake} -} diff --git a/generated/1.17/client/supervisor/clientset/versioned/fake/register.go b/generated/1.17/client/supervisor/clientset/versioned/fake/register.go index 980ce98f..fce7627c 100644 --- a/generated/1.17/client/supervisor/clientset/versioned/fake/register.go +++ b/generated/1.17/client/supervisor/clientset/versioned/fake/register.go @@ -6,9 +6,9 @@ package fake import ( + clientsecretv1alpha1 "go.pinniped.dev/generated/1.17/apis/supervisor/clientsecret/v1alpha1" configv1alpha1 "go.pinniped.dev/generated/1.17/apis/supervisor/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.17/apis/supervisor/idp/v1alpha1" - oauthv1alpha1 "go.pinniped.dev/generated/1.17/apis/supervisor/oauth/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -20,9 +20,9 @@ var scheme = runtime.NewScheme() var codecs = serializer.NewCodecFactory(scheme) var parameterCodec = runtime.NewParameterCodec(scheme) var localSchemeBuilder = runtime.SchemeBuilder{ + clientsecretv1alpha1.AddToScheme, configv1alpha1.AddToScheme, idpv1alpha1.AddToScheme, - oauthv1alpha1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/generated/1.17/client/supervisor/clientset/versioned/scheme/register.go b/generated/1.17/client/supervisor/clientset/versioned/scheme/register.go index 676b0aae..ceb48b35 100644 --- a/generated/1.17/client/supervisor/clientset/versioned/scheme/register.go +++ b/generated/1.17/client/supervisor/clientset/versioned/scheme/register.go @@ -6,9 +6,9 @@ package scheme import ( + clientsecretv1alpha1 "go.pinniped.dev/generated/1.17/apis/supervisor/clientsecret/v1alpha1" configv1alpha1 "go.pinniped.dev/generated/1.17/apis/supervisor/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.17/apis/supervisor/idp/v1alpha1" - oauthv1alpha1 "go.pinniped.dev/generated/1.17/apis/supervisor/oauth/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -20,9 +20,9 @@ var Scheme = runtime.NewScheme() var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) var localSchemeBuilder = runtime.SchemeBuilder{ + clientsecretv1alpha1.AddToScheme, configv1alpha1.AddToScheme, idpv1alpha1.AddToScheme, - oauthv1alpha1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go b/generated/1.17/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/clientsecret_client.go similarity index 51% rename from generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go rename to generated/1.17/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/clientsecret_client.go index b3a80cae..30ba79b9 100644 --- a/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go +++ b/generated/1.17/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/clientsecret_client.go @@ -6,27 +6,27 @@ package v1alpha1 import ( - v1alpha1 "go.pinniped.dev/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1" - "go.pinniped.dev/generated/1.17/client/supervisor/virtual/clientset/versioned/scheme" + v1alpha1 "go.pinniped.dev/generated/1.17/apis/supervisor/clientsecret/v1alpha1" + "go.pinniped.dev/generated/1.17/client/supervisor/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) -type OauthV1alpha1Interface interface { +type ClientsecretV1alpha1Interface interface { RESTClient() rest.Interface OIDCClientSecretRequestsGetter } -// OauthV1alpha1Client is used to interact with features provided by the oauth.virtual.supervisor.pinniped.dev group. -type OauthV1alpha1Client struct { +// ClientsecretV1alpha1Client is used to interact with features provided by the clientsecret.supervisor.pinniped.dev group. +type ClientsecretV1alpha1Client struct { restClient rest.Interface } -func (c *OauthV1alpha1Client) OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface { +func (c *ClientsecretV1alpha1Client) OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface { return newOIDCClientSecretRequests(c, namespace) } -// NewForConfig creates a new OauthV1alpha1Client for the given config. -func NewForConfig(c *rest.Config) (*OauthV1alpha1Client, error) { +// NewForConfig creates a new ClientsecretV1alpha1Client for the given config. +func NewForConfig(c *rest.Config) (*ClientsecretV1alpha1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err @@ -35,12 +35,12 @@ func NewForConfig(c *rest.Config) (*OauthV1alpha1Client, error) { if err != nil { return nil, err } - return &OauthV1alpha1Client{client}, nil + return &ClientsecretV1alpha1Client{client}, nil } -// NewForConfigOrDie creates a new OauthV1alpha1Client for the given config and +// NewForConfigOrDie creates a new ClientsecretV1alpha1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *OauthV1alpha1Client { +func NewForConfigOrDie(c *rest.Config) *ClientsecretV1alpha1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -48,9 +48,9 @@ func NewForConfigOrDie(c *rest.Config) *OauthV1alpha1Client { return client } -// New creates a new OauthV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *OauthV1alpha1Client { - return &OauthV1alpha1Client{c} +// New creates a new ClientsecretV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *ClientsecretV1alpha1Client { + return &ClientsecretV1alpha1Client{c} } func setConfigDefaults(config *rest.Config) error { @@ -68,7 +68,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 *OauthV1alpha1Client) RESTClient() rest.Interface { +func (c *ClientsecretV1alpha1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/generated/1.17/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/doc.go b/generated/1.17/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/doc.go similarity index 100% rename from generated/1.17/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/doc.go rename to generated/1.17/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/doc.go diff --git a/generated/1.17/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go b/generated/1.17/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/doc.go similarity index 100% rename from generated/1.17/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go rename to generated/1.17/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/doc.go diff --git a/generated/1.17/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go b/generated/1.17/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_clientsecret_client.go similarity index 60% rename from generated/1.17/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go rename to generated/1.17/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_clientsecret_client.go index 1625045c..1d464f9d 100644 --- a/generated/1.17/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go +++ b/generated/1.17/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_clientsecret_client.go @@ -6,22 +6,22 @@ package fake import ( - v1alpha1 "go.pinniped.dev/generated/1.17/client/supervisor/clientset/versioned/typed/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.17/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1" rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" ) -type FakeOauthV1alpha1 struct { +type FakeClientsecretV1alpha1 struct { *testing.Fake } -func (c *FakeOauthV1alpha1) OIDCClients(namespace string) v1alpha1.OIDCClientInterface { - return &FakeOIDCClients{c, namespace} +func (c *FakeClientsecretV1alpha1) OIDCClientSecretRequests(namespace string) v1alpha1.OIDCClientSecretRequestInterface { + return &FakeOIDCClientSecretRequests{c, namespace} } // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeOauthV1alpha1) RESTClient() rest.Interface { +func (c *FakeClientsecretV1alpha1) RESTClient() rest.Interface { var ret *rest.RESTClient return ret } diff --git a/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go b/generated/1.17/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_oidcclientsecretrequest.go similarity index 77% rename from generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go rename to generated/1.17/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_oidcclientsecretrequest.go index f2450f9b..2538b264 100644 --- a/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go +++ b/generated/1.17/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_oidcclientsecretrequest.go @@ -6,20 +6,20 @@ package fake import ( - v1alpha1 "go.pinniped.dev/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.17/apis/supervisor/clientsecret/v1alpha1" schema "k8s.io/apimachinery/pkg/runtime/schema" testing "k8s.io/client-go/testing" ) // FakeOIDCClientSecretRequests implements OIDCClientSecretRequestInterface type FakeOIDCClientSecretRequests struct { - Fake *FakeOauthV1alpha1 + Fake *FakeClientsecretV1alpha1 ns string } -var oidcclientsecretrequestsResource = schema.GroupVersionResource{Group: "oauth.virtual.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclientsecretrequests"} +var oidcclientsecretrequestsResource = schema.GroupVersionResource{Group: "clientsecret.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclientsecretrequests"} -var oidcclientsecretrequestsKind = schema.GroupVersionKind{Group: "oauth.virtual.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClientSecretRequest"} +var oidcclientsecretrequestsKind = schema.GroupVersionKind{Group: "clientsecret.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClientSecretRequest"} // Create takes the representation of a oIDCClientSecretRequest and creates it. Returns the server's representation of the oIDCClientSecretRequest, and an error, if there is any. func (c *FakeOIDCClientSecretRequests) Create(oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest) (result *v1alpha1.OIDCClientSecretRequest, err error) { diff --git a/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go b/generated/1.17/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/generated_expansion.go similarity index 100% rename from generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go rename to generated/1.17/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/generated_expansion.go diff --git a/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go b/generated/1.17/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/oidcclientsecretrequest.go similarity index 89% rename from generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go rename to generated/1.17/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/oidcclientsecretrequest.go index 97031447..431919f9 100644 --- a/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go +++ b/generated/1.17/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/oidcclientsecretrequest.go @@ -6,7 +6,7 @@ package v1alpha1 import ( - v1alpha1 "go.pinniped.dev/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.17/apis/supervisor/clientsecret/v1alpha1" rest "k8s.io/client-go/rest" ) @@ -29,7 +29,7 @@ type oIDCClientSecretRequests struct { } // newOIDCClientSecretRequests returns a OIDCClientSecretRequests -func newOIDCClientSecretRequests(c *OauthV1alpha1Client, namespace string) *oIDCClientSecretRequests { +func newOIDCClientSecretRequests(c *ClientsecretV1alpha1Client, namespace string) *oIDCClientSecretRequests { return &oIDCClientSecretRequests{ client: c.RESTClient(), ns: namespace, diff --git a/generated/1.17/client/supervisor/clientset/versioned/typed/config/v1alpha1/config_client.go b/generated/1.17/client/supervisor/clientset/versioned/typed/config/v1alpha1/config_client.go index f5c35bf5..49fcccef 100644 --- a/generated/1.17/client/supervisor/clientset/versioned/typed/config/v1alpha1/config_client.go +++ b/generated/1.17/client/supervisor/clientset/versioned/typed/config/v1alpha1/config_client.go @@ -14,6 +14,7 @@ import ( type ConfigV1alpha1Interface interface { RESTClient() rest.Interface FederationDomainsGetter + OIDCClientsGetter } // ConfigV1alpha1Client is used to interact with features provided by the config.supervisor.pinniped.dev group. @@ -25,6 +26,10 @@ func (c *ConfigV1alpha1Client) FederationDomains(namespace string) FederationDom return newFederationDomains(c, namespace) } +func (c *ConfigV1alpha1Client) OIDCClients(namespace string) OIDCClientInterface { + return newOIDCClients(c, namespace) +} + // NewForConfig creates a new ConfigV1alpha1Client for the given config. func NewForConfig(c *rest.Config) (*ConfigV1alpha1Client, error) { config := *c diff --git a/generated/1.17/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go b/generated/1.17/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go index 406fcd8c..2a586f92 100644 --- a/generated/1.17/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go +++ b/generated/1.17/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go @@ -19,6 +19,10 @@ func (c *FakeConfigV1alpha1) FederationDomains(namespace string) v1alpha1.Federa return &FakeFederationDomains{c, namespace} } +func (c *FakeConfigV1alpha1) OIDCClients(namespace string) v1alpha1.OIDCClientInterface { + return &FakeOIDCClients{c, namespace} +} + // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. func (c *FakeConfigV1alpha1) RESTClient() rest.Interface { diff --git a/generated/1.17/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclient.go b/generated/1.17/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_oidcclient.go similarity index 92% rename from generated/1.17/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclient.go rename to generated/1.17/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_oidcclient.go index 69c8555d..8acb613c 100644 --- a/generated/1.17/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclient.go +++ b/generated/1.17/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_oidcclient.go @@ -6,7 +6,7 @@ package fake import ( - v1alpha1 "go.pinniped.dev/generated/1.17/apis/supervisor/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.17/apis/supervisor/config/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -17,13 +17,13 @@ import ( // FakeOIDCClients implements OIDCClientInterface type FakeOIDCClients struct { - Fake *FakeOauthV1alpha1 + Fake *FakeConfigV1alpha1 ns string } -var oidcclientsResource = schema.GroupVersionResource{Group: "oauth.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclients"} +var oidcclientsResource = schema.GroupVersionResource{Group: "config.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclients"} -var oidcclientsKind = schema.GroupVersionKind{Group: "oauth.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClient"} +var oidcclientsKind = schema.GroupVersionKind{Group: "config.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClient"} // Get takes name of the oIDCClient, and returns the corresponding oIDCClient object, and an error if there is any. func (c *FakeOIDCClients) Get(name string, options v1.GetOptions) (result *v1alpha1.OIDCClient, err error) { diff --git a/generated/1.17/client/supervisor/clientset/versioned/typed/config/v1alpha1/generated_expansion.go b/generated/1.17/client/supervisor/clientset/versioned/typed/config/v1alpha1/generated_expansion.go index ba9c9173..35b9ee3d 100644 --- a/generated/1.17/client/supervisor/clientset/versioned/typed/config/v1alpha1/generated_expansion.go +++ b/generated/1.17/client/supervisor/clientset/versioned/typed/config/v1alpha1/generated_expansion.go @@ -6,3 +6,5 @@ package v1alpha1 type FederationDomainExpansion interface{} + +type OIDCClientExpansion interface{} diff --git a/generated/1.17/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oidcclient.go b/generated/1.17/client/supervisor/clientset/versioned/typed/config/v1alpha1/oidcclient.go similarity index 97% rename from generated/1.17/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oidcclient.go rename to generated/1.17/client/supervisor/clientset/versioned/typed/config/v1alpha1/oidcclient.go index 322bcb9d..95c4ebfb 100644 --- a/generated/1.17/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oidcclient.go +++ b/generated/1.17/client/supervisor/clientset/versioned/typed/config/v1alpha1/oidcclient.go @@ -8,7 +8,7 @@ package v1alpha1 import ( "time" - v1alpha1 "go.pinniped.dev/generated/1.17/apis/supervisor/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.17/apis/supervisor/config/v1alpha1" scheme "go.pinniped.dev/generated/1.17/client/supervisor/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -43,7 +43,7 @@ type oIDCClients struct { } // newOIDCClients returns a OIDCClients -func newOIDCClients(c *OauthV1alpha1Client, namespace string) *oIDCClients { +func newOIDCClients(c *ConfigV1alpha1Client, namespace string) *oIDCClients { return &oIDCClients{ client: c.RESTClient(), ns: namespace, diff --git a/generated/1.17/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go b/generated/1.17/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go deleted file mode 100644 index 87d22ea9..00000000 --- a/generated/1.17/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -type OIDCClientExpansion interface{} diff --git a/generated/1.17/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go b/generated/1.17/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go deleted file mode 100644 index 32dae26a..00000000 --- a/generated/1.17/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1alpha1 "go.pinniped.dev/generated/1.17/apis/supervisor/oauth/v1alpha1" - "go.pinniped.dev/generated/1.17/client/supervisor/clientset/versioned/scheme" - rest "k8s.io/client-go/rest" -) - -type OauthV1alpha1Interface interface { - RESTClient() rest.Interface - OIDCClientsGetter -} - -// OauthV1alpha1Client is used to interact with features provided by the oauth.supervisor.pinniped.dev group. -type OauthV1alpha1Client struct { - restClient rest.Interface -} - -func (c *OauthV1alpha1Client) OIDCClients(namespace string) OIDCClientInterface { - return newOIDCClients(c, namespace) -} - -// NewForConfig creates a new OauthV1alpha1Client for the given config. -func NewForConfig(c *rest.Config) (*OauthV1alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &OauthV1alpha1Client{client}, nil -} - -// NewForConfigOrDie creates a new OauthV1alpha1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *OauthV1alpha1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new OauthV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *OauthV1alpha1Client { - return &OauthV1alpha1Client{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 *OauthV1alpha1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/generated/1.17/client/supervisor/informers/externalversions/config/v1alpha1/interface.go b/generated/1.17/client/supervisor/informers/externalversions/config/v1alpha1/interface.go index ae8561df..33ffbf70 100644 --- a/generated/1.17/client/supervisor/informers/externalversions/config/v1alpha1/interface.go +++ b/generated/1.17/client/supervisor/informers/externalversions/config/v1alpha1/interface.go @@ -13,6 +13,8 @@ import ( type Interface interface { // FederationDomains returns a FederationDomainInformer. FederationDomains() FederationDomainInformer + // OIDCClients returns a OIDCClientInformer. + OIDCClients() OIDCClientInformer } type version struct { @@ -30,3 +32,8 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList func (v *version) FederationDomains() FederationDomainInformer { return &federationDomainInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } + +// OIDCClients returns a OIDCClientInformer. +func (v *version) OIDCClients() OIDCClientInformer { + return &oIDCClientInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} diff --git a/generated/1.17/client/supervisor/informers/externalversions/oauth/v1alpha1/oidcclient.go b/generated/1.17/client/supervisor/informers/externalversions/config/v1alpha1/oidcclient.go similarity index 89% rename from generated/1.17/client/supervisor/informers/externalversions/oauth/v1alpha1/oidcclient.go rename to generated/1.17/client/supervisor/informers/externalversions/config/v1alpha1/oidcclient.go index 1996f202..c6e9344f 100644 --- a/generated/1.17/client/supervisor/informers/externalversions/oauth/v1alpha1/oidcclient.go +++ b/generated/1.17/client/supervisor/informers/externalversions/config/v1alpha1/oidcclient.go @@ -8,10 +8,10 @@ package v1alpha1 import ( time "time" - oauthv1alpha1 "go.pinniped.dev/generated/1.17/apis/supervisor/oauth/v1alpha1" + configv1alpha1 "go.pinniped.dev/generated/1.17/apis/supervisor/config/v1alpha1" versioned "go.pinniped.dev/generated/1.17/client/supervisor/clientset/versioned" internalinterfaces "go.pinniped.dev/generated/1.17/client/supervisor/informers/externalversions/internalinterfaces" - v1alpha1 "go.pinniped.dev/generated/1.17/client/supervisor/listers/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.17/client/supervisor/listers/config/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -48,16 +48,16 @@ func NewFilteredOIDCClientInformer(client versioned.Interface, namespace string, if tweakListOptions != nil { tweakListOptions(&options) } - return client.OauthV1alpha1().OIDCClients(namespace).List(options) + return client.ConfigV1alpha1().OIDCClients(namespace).List(options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.OauthV1alpha1().OIDCClients(namespace).Watch(options) + return client.ConfigV1alpha1().OIDCClients(namespace).Watch(options) }, }, - &oauthv1alpha1.OIDCClient{}, + &configv1alpha1.OIDCClient{}, resyncPeriod, indexers, ) @@ -68,7 +68,7 @@ func (f *oIDCClientInformer) defaultInformer(client versioned.Interface, resyncP } func (f *oIDCClientInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&oauthv1alpha1.OIDCClient{}, f.defaultInformer) + return f.factory.InformerFor(&configv1alpha1.OIDCClient{}, f.defaultInformer) } func (f *oIDCClientInformer) Lister() v1alpha1.OIDCClientLister { diff --git a/generated/1.17/client/supervisor/informers/externalversions/factory.go b/generated/1.17/client/supervisor/informers/externalversions/factory.go index ac94e186..10a7bf92 100644 --- a/generated/1.17/client/supervisor/informers/externalversions/factory.go +++ b/generated/1.17/client/supervisor/informers/externalversions/factory.go @@ -14,7 +14,6 @@ import ( config "go.pinniped.dev/generated/1.17/client/supervisor/informers/externalversions/config" idp "go.pinniped.dev/generated/1.17/client/supervisor/informers/externalversions/idp" internalinterfaces "go.pinniped.dev/generated/1.17/client/supervisor/informers/externalversions/internalinterfaces" - oauth "go.pinniped.dev/generated/1.17/client/supervisor/informers/externalversions/oauth" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -163,7 +162,6 @@ type SharedInformerFactory interface { Config() config.Interface IDP() idp.Interface - Oauth() oauth.Interface } func (f *sharedInformerFactory) Config() config.Interface { @@ -173,7 +171,3 @@ func (f *sharedInformerFactory) Config() config.Interface { func (f *sharedInformerFactory) IDP() idp.Interface { return idp.New(f, f.namespace, f.tweakListOptions) } - -func (f *sharedInformerFactory) Oauth() oauth.Interface { - return oauth.New(f, f.namespace, f.tweakListOptions) -} diff --git a/generated/1.17/client/supervisor/informers/externalversions/generic.go b/generated/1.17/client/supervisor/informers/externalversions/generic.go index 4f5c74e4..befa67ca 100644 --- a/generated/1.17/client/supervisor/informers/externalversions/generic.go +++ b/generated/1.17/client/supervisor/informers/externalversions/generic.go @@ -10,7 +10,6 @@ import ( v1alpha1 "go.pinniped.dev/generated/1.17/apis/supervisor/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.17/apis/supervisor/idp/v1alpha1" - oauthv1alpha1 "go.pinniped.dev/generated/1.17/apis/supervisor/oauth/v1alpha1" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" ) @@ -44,6 +43,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource // Group=config.supervisor.pinniped.dev, Version=v1alpha1 case v1alpha1.SchemeGroupVersion.WithResource("federationdomains"): return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1alpha1().FederationDomains().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("oidcclients"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1alpha1().OIDCClients().Informer()}, nil // Group=idp.supervisor.pinniped.dev, Version=v1alpha1 case idpv1alpha1.SchemeGroupVersion.WithResource("activedirectoryidentityproviders"): @@ -53,10 +54,6 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource case idpv1alpha1.SchemeGroupVersion.WithResource("oidcidentityproviders"): return &genericInformer{resource: resource.GroupResource(), informer: f.IDP().V1alpha1().OIDCIdentityProviders().Informer()}, nil - // Group=oauth.supervisor.pinniped.dev, Version=v1alpha1 - case oauthv1alpha1.SchemeGroupVersion.WithResource("oidcclients"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Oauth().V1alpha1().OIDCClients().Informer()}, nil - } return nil, fmt.Errorf("no informer found for %v", resource) diff --git a/generated/1.17/client/supervisor/informers/externalversions/oauth/interface.go b/generated/1.17/client/supervisor/informers/externalversions/oauth/interface.go deleted file mode 100644 index 06b9370b..00000000 --- a/generated/1.17/client/supervisor/informers/externalversions/oauth/interface.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by informer-gen. DO NOT EDIT. - -package oauth - -import ( - internalinterfaces "go.pinniped.dev/generated/1.17/client/supervisor/informers/externalversions/internalinterfaces" - v1alpha1 "go.pinniped.dev/generated/1.17/client/supervisor/informers/externalversions/oauth/v1alpha1" -) - -// Interface provides access to each of this group's versions. -type Interface interface { - // V1alpha1 provides access to shared informers for resources in V1alpha1. - V1alpha1() v1alpha1.Interface -} - -type group struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// V1alpha1 returns a new v1alpha1.Interface. -func (g *group) V1alpha1() v1alpha1.Interface { - return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) -} diff --git a/generated/1.17/client/supervisor/informers/externalversions/oauth/v1alpha1/interface.go b/generated/1.17/client/supervisor/informers/externalversions/oauth/v1alpha1/interface.go deleted file mode 100644 index 46d19a40..00000000 --- a/generated/1.17/client/supervisor/informers/externalversions/oauth/v1alpha1/interface.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - internalinterfaces "go.pinniped.dev/generated/1.17/client/supervisor/informers/externalversions/internalinterfaces" -) - -// Interface provides access to all the informers in this group version. -type Interface interface { - // OIDCClients returns a OIDCClientInformer. - OIDCClients() OIDCClientInformer -} - -type version struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// OIDCClients returns a OIDCClientInformer. -func (v *version) OIDCClients() OIDCClientInformer { - return &oIDCClientInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} diff --git a/generated/1.17/client/supervisor/listers/config/v1alpha1/expansion_generated.go b/generated/1.17/client/supervisor/listers/config/v1alpha1/expansion_generated.go index d59892c4..bda2f20e 100644 --- a/generated/1.17/client/supervisor/listers/config/v1alpha1/expansion_generated.go +++ b/generated/1.17/client/supervisor/listers/config/v1alpha1/expansion_generated.go @@ -12,3 +12,11 @@ type FederationDomainListerExpansion interface{} // FederationDomainNamespaceListerExpansion allows custom methods to be added to // FederationDomainNamespaceLister. type FederationDomainNamespaceListerExpansion interface{} + +// OIDCClientListerExpansion allows custom methods to be added to +// OIDCClientLister. +type OIDCClientListerExpansion interface{} + +// OIDCClientNamespaceListerExpansion allows custom methods to be added to +// OIDCClientNamespaceLister. +type OIDCClientNamespaceListerExpansion interface{} diff --git a/generated/1.18/client/supervisor/listers/oauth/v1alpha1/oidcclient.go b/generated/1.17/client/supervisor/listers/config/v1alpha1/oidcclient.go similarity index 97% rename from generated/1.18/client/supervisor/listers/oauth/v1alpha1/oidcclient.go rename to generated/1.17/client/supervisor/listers/config/v1alpha1/oidcclient.go index 77d38f1e..08c2ab25 100644 --- a/generated/1.18/client/supervisor/listers/oauth/v1alpha1/oidcclient.go +++ b/generated/1.17/client/supervisor/listers/config/v1alpha1/oidcclient.go @@ -6,7 +6,7 @@ package v1alpha1 import ( - v1alpha1 "go.pinniped.dev/generated/1.18/apis/supervisor/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.17/apis/supervisor/config/v1alpha1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" diff --git a/generated/1.17/client/supervisor/listers/oauth/v1alpha1/expansion_generated.go b/generated/1.17/client/supervisor/listers/oauth/v1alpha1/expansion_generated.go deleted file mode 100644 index c19310da..00000000 --- a/generated/1.17/client/supervisor/listers/oauth/v1alpha1/expansion_generated.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha1 - -// OIDCClientListerExpansion allows custom methods to be added to -// OIDCClientLister. -type OIDCClientListerExpansion interface{} - -// OIDCClientNamespaceListerExpansion allows custom methods to be added to -// OIDCClientNamespaceLister. -type OIDCClientNamespaceListerExpansion interface{} diff --git a/generated/1.17/client/supervisor/virtual/clientset/versioned/clientset.go b/generated/1.17/client/supervisor/virtual/clientset/versioned/clientset.go deleted file mode 100644 index 61281edb..00000000 --- a/generated/1.17/client/supervisor/virtual/clientset/versioned/clientset.go +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package versioned - -import ( - "fmt" - - oauthv1alpha1 "go.pinniped.dev/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" - discovery "k8s.io/client-go/discovery" - rest "k8s.io/client-go/rest" - flowcontrol "k8s.io/client-go/util/flowcontrol" -) - -type Interface interface { - Discovery() discovery.DiscoveryInterface - OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface -} - -// Clientset contains the clients for groups. Each group has exactly one -// version included in a Clientset. -type Clientset struct { - *discovery.DiscoveryClient - oauthV1alpha1 *oauthv1alpha1.OauthV1alpha1Client -} - -// OauthV1alpha1 retrieves the OauthV1alpha1Client -func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { - return c.oauthV1alpha1 -} - -// Discovery retrieves the DiscoveryClient -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - if c == nil { - return nil - } - return c.DiscoveryClient -} - -// NewForConfig creates a new Clientset for the given config. -// If config's RateLimiter is not set and QPS and Burst are acceptable, -// NewForConfig will generate a rate-limiter in configShallowCopy. -func NewForConfig(c *rest.Config) (*Clientset, error) { - configShallowCopy := *c - if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { - if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("Burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") - } - configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) - } - var cs Clientset - var err error - cs.oauthV1alpha1, err = oauthv1alpha1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - - cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - return &cs, nil -} - -// NewForConfigOrDie creates a new Clientset for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *Clientset { - var cs Clientset - cs.oauthV1alpha1 = oauthv1alpha1.NewForConfigOrDie(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) - return &cs -} - -// New creates a new Clientset for the given RESTClient. -func New(c rest.Interface) *Clientset { - var cs Clientset - cs.oauthV1alpha1 = oauthv1alpha1.New(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClient(c) - return &cs -} diff --git a/generated/1.17/client/supervisor/virtual/clientset/versioned/doc.go b/generated/1.17/client/supervisor/virtual/clientset/versioned/doc.go deleted file mode 100644 index 5dc02e6e..00000000 --- a/generated/1.17/client/supervisor/virtual/clientset/versioned/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated clientset. -package versioned diff --git a/generated/1.17/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go b/generated/1.17/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go deleted file mode 100644 index 40b8c342..00000000 --- a/generated/1.17/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - clientset "go.pinniped.dev/generated/1.17/client/supervisor/virtual/clientset/versioned" - oauthv1alpha1 "go.pinniped.dev/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" - fakeoauthv1alpha1 "go.pinniped.dev/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/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" -) - -// NewSimpleClientset returns a clientset that will respond with the provided objects. -// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, -// without applying any validations and/or defaults. It shouldn't be considered a replacement -// for a real clientset and is mostly useful in simple unit tests. -func NewSimpleClientset(objects ...runtime.Object) *Clientset { - o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) - for _, obj := range objects { - if err := o.Add(obj); err != nil { - panic(err) - } - } - - cs := &Clientset{tracker: o} - cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} - cs.AddReactor("*", "*", testing.ObjectReaction(o)) - cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { - gvr := action.GetResource() - ns := action.GetNamespace() - watch, err := o.Watch(gvr, ns) - if err != nil { - return false, nil, err - } - return true, watch, nil - }) - - return cs -} - -// Clientset implements clientset.Interface. Meant to be embedded into a -// struct to get a default implementation. This makes faking out just the method -// you want to test easier. -type Clientset struct { - testing.Fake - discovery *fakediscovery.FakeDiscovery - tracker testing.ObjectTracker -} - -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - return c.discovery -} - -func (c *Clientset) Tracker() testing.ObjectTracker { - return c.tracker -} - -var _ clientset.Interface = &Clientset{} - -// OauthV1alpha1 retrieves the OauthV1alpha1Client -func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { - return &fakeoauthv1alpha1.FakeOauthV1alpha1{Fake: &c.Fake} -} diff --git a/generated/1.17/client/supervisor/virtual/clientset/versioned/fake/doc.go b/generated/1.17/client/supervisor/virtual/clientset/versioned/fake/doc.go deleted file mode 100644 index 7c9538fd..00000000 --- a/generated/1.17/client/supervisor/virtual/clientset/versioned/fake/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated fake clientset. -package fake diff --git a/generated/1.17/client/supervisor/virtual/clientset/versioned/fake/register.go b/generated/1.17/client/supervisor/virtual/clientset/versioned/fake/register.go deleted file mode 100644 index 675d744f..00000000 --- a/generated/1.17/client/supervisor/virtual/clientset/versioned/fake/register.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - oauthv1alpha1 "go.pinniped.dev/generated/1.17/apis/supervisor/virtual/oauth/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" -) - -var scheme = runtime.NewScheme() -var codecs = serializer.NewCodecFactory(scheme) -var parameterCodec = runtime.NewParameterCodec(scheme) -var localSchemeBuilder = runtime.SchemeBuilder{ - oauthv1alpha1.AddToScheme, -} - -// AddToScheme adds all types of this clientset into the given scheme. This allows composition -// of clientsets, like in: -// -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) -// -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) -// -// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types -// correctly. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(scheme)) -} diff --git a/generated/1.17/client/supervisor/virtual/clientset/versioned/scheme/doc.go b/generated/1.17/client/supervisor/virtual/clientset/versioned/scheme/doc.go deleted file mode 100644 index cc02f1d3..00000000 --- a/generated/1.17/client/supervisor/virtual/clientset/versioned/scheme/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// This package contains the scheme of the automatically generated clientset. -package scheme diff --git a/generated/1.17/client/supervisor/virtual/clientset/versioned/scheme/register.go b/generated/1.17/client/supervisor/virtual/clientset/versioned/scheme/register.go deleted file mode 100644 index f027d173..00000000 --- a/generated/1.17/client/supervisor/virtual/clientset/versioned/scheme/register.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package scheme - -import ( - oauthv1alpha1 "go.pinniped.dev/generated/1.17/apis/supervisor/virtual/oauth/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" -) - -var Scheme = runtime.NewScheme() -var Codecs = serializer.NewCodecFactory(Scheme) -var ParameterCodec = runtime.NewParameterCodec(Scheme) -var localSchemeBuilder = runtime.SchemeBuilder{ - oauthv1alpha1.AddToScheme, -} - -// AddToScheme adds all types of this clientset into the given scheme. This allows composition -// of clientsets, like in: -// -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) -// -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) -// -// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types -// correctly. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(Scheme)) -} diff --git a/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go b/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go deleted file mode 100644 index 97afc436..00000000 --- a/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1alpha1 "go.pinniped.dev/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" -) - -type FakeOauthV1alpha1 struct { - *testing.Fake -} - -func (c *FakeOauthV1alpha1) OIDCClientSecretRequests(namespace string) v1alpha1.OIDCClientSecretRequestInterface { - return &FakeOIDCClientSecretRequests{c, namespace} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeOauthV1alpha1) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/generated/1.17/crds/oauth.supervisor.pinniped.dev_oidcclients.yaml b/generated/1.17/crds/config.supervisor.pinniped.dev_oidcclients.yaml similarity index 98% rename from generated/1.17/crds/oauth.supervisor.pinniped.dev_oidcclients.yaml rename to generated/1.17/crds/config.supervisor.pinniped.dev_oidcclients.yaml index 589a9154..4efa445e 100644 --- a/generated/1.17/crds/oauth.supervisor.pinniped.dev_oidcclients.yaml +++ b/generated/1.17/crds/config.supervisor.pinniped.dev_oidcclients.yaml @@ -5,9 +5,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null - name: oidcclients.oauth.supervisor.pinniped.dev + name: oidcclients.config.supervisor.pinniped.dev spec: - group: oauth.supervisor.pinniped.dev + group: config.supervisor.pinniped.dev names: categories: - pinniped diff --git a/generated/1.18/README.adoc b/generated/1.18/README.adoc index db96bb48..21512761 100644 --- a/generated/1.18/README.adoc +++ b/generated/1.18/README.adoc @@ -6,15 +6,14 @@ .Packages - xref:{anchor_prefix}-authentication-concierge-pinniped-dev-v1alpha1[$$authentication.concierge.pinniped.dev/v1alpha1$$] +- xref:{anchor_prefix}-clientsecret-supervisor-pinniped-dev-clientsecret[$$clientsecret.supervisor.pinniped.dev/clientsecret$$] +- xref:{anchor_prefix}-clientsecret-supervisor-pinniped-dev-v1alpha1[$$clientsecret.supervisor.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-config-concierge-pinniped-dev-v1alpha1[$$config.concierge.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-config-supervisor-pinniped-dev-v1alpha1[$$config.supervisor.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-identity-concierge-pinniped-dev-identity[$$identity.concierge.pinniped.dev/identity$$] - xref:{anchor_prefix}-identity-concierge-pinniped-dev-v1alpha1[$$identity.concierge.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-idp-supervisor-pinniped-dev-v1alpha1[$$idp.supervisor.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-login-concierge-pinniped-dev-v1alpha1[$$login.concierge.pinniped.dev/v1alpha1$$] -- xref:{anchor_prefix}-oauth-supervisor-pinniped-dev-v1alpha1[$$oauth.supervisor.pinniped.dev/v1alpha1$$] -- xref:{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-oauth[$$oauth.virtual.supervisor.pinniped.dev/oauth$$] -- xref:{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-v1alpha1[$$oauth.virtual.supervisor.pinniped.dev/v1alpha1$$] [id="{anchor_prefix}-authentication-concierge-pinniped-dev-v1alpha1"] @@ -213,6 +212,98 @@ Status of a webhook authenticator. +[id="{anchor_prefix}-clientsecret-supervisor-pinniped-dev-clientsecret"] +=== clientsecret.supervisor.pinniped.dev/clientsecret + +Package clientsecret is the internal version of the Pinniped client secret API. + + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-clientsecret-oidcclientsecretrequestspec"] +==== OIDCClientSecretRequestSpec + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-clientsecret-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generateNewSecret`* __boolean__ | +| *`revokeOldSecrets`* __boolean__ | +|=== + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-clientsecret-oidcclientsecretrequeststatus"] +==== OIDCClientSecretRequestStatus + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-clientsecret-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generatedSecret`* __string__ | +| *`totalClientSecrets`* __integer__ | +|=== + + + +[id="{anchor_prefix}-clientsecret-supervisor-pinniped-dev-v1alpha1"] +=== clientsecret.supervisor.pinniped.dev/v1alpha1 + +Package v1alpha1 is the v1alpha1 version of the Pinniped client secret API. + + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequestspec"] +==== OIDCClientSecretRequestSpec + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generateNewSecret`* __boolean__ | +| *`revokeOldSecrets`* __boolean__ | +|=== + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequeststatus"] +==== OIDCClientSecretRequestStatus + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generatedSecret`* __string__ | +| *`totalClientSecrets`* __integer__ | +|=== + + + [id="{anchor_prefix}-config-concierge-pinniped-dev-v1alpha1"] === config.concierge.pinniped.dev/v1alpha1 @@ -546,6 +637,51 @@ FederationDomainTLSSpec is a struct that describes the TLS configuration for an |=== +[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-config-v1alpha1-oidcclient"] +==== OIDCClient + +OIDCClient describes the configuration of an OIDC client. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-config-v1alpha1-oidcclientlist[$$OIDCClientList$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#objectmeta-v1-meta[$$ObjectMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. + +| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-config-v1alpha1-oidcclientspec[$$OIDCClientSpec$$]__ | Spec of the OIDC client. +| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-config-v1alpha1-oidcclientstatus[$$OIDCClientStatus$$]__ | Status of the OIDC client. +|=== + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-config-v1alpha1-oidcclientspec"] +==== OIDCClientSpec + +OIDCClientSpec is a struct that describes an OIDC Client. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-config-v1alpha1-oidcclient[$$OIDCClient$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`allowedRedirectURIs`* __string array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be https, unless it is a loopback. +| *`allowedGrantTypes`* __GrantType array__ | allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this client. + Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. +| *`allowedScopes`* __Scope array__ | allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. + Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. +|=== + + + + [id="{anchor_prefix}-identity-concierge-pinniped-dev-identity"] === identity.concierge.pinniped.dev/identity @@ -1335,148 +1471,3 @@ TokenCredentialRequestStatus is the status of a TokenCredentialRequest, returned |=== - -[id="{anchor_prefix}-oauth-supervisor-pinniped-dev-v1alpha1"] -=== oauth.supervisor.pinniped.dev/v1alpha1 - -Package v1alpha1 is the v1alpha1 version of the Pinniped supervisor oauth API. - - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-oauth-v1alpha1-oidcclient"] -==== OIDCClient - -OIDCClient describes the configuration of an OIDC client. - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-oauth-v1alpha1-oidcclientlist[$$OIDCClientList$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#objectmeta-v1-meta[$$ObjectMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. - -| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-oauth-v1alpha1-oidcclientspec[$$OIDCClientSpec$$]__ | Spec of the OIDC client. -| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-oauth-v1alpha1-oidcclientstatus[$$OIDCClientStatus$$]__ | Status of the OIDC client. -|=== - - - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-oauth-v1alpha1-oidcclientspec"] -==== OIDCClientSpec - -OIDCClientSpec is a struct that describes an OIDC Client. - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-oauth-v1alpha1-oidcclient[$$OIDCClient$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`allowedRedirectURIs`* __string array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be https, unless it is a loopback. -| *`allowedGrantTypes`* __GrantType array__ | allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. -| *`allowedScopes`* __Scope array__ | allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. -|=== - - - - - -[id="{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-oauth"] -=== oauth.virtual.supervisor.pinniped.dev/oauth - -Package oauth is the internal version of the Pinniped virtual oauth API. - - - - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-virtual-oauth-oidcclientsecretrequestspec"] -==== OIDCClientSecretRequestSpec - - - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-virtual-oauth-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`generateNewSecret`* __boolean__ | -| *`revokeOldSecrets`* __boolean__ | -|=== - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-virtual-oauth-oidcclientsecretrequeststatus"] -==== OIDCClientSecretRequestStatus - - - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-virtual-oauth-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`generatedSecret`* __string__ | -| *`totalClientSecrets`* __integer__ | -|=== - - - -[id="{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-v1alpha1"] -=== oauth.virtual.supervisor.pinniped.dev/v1alpha1 - -Package v1alpha1 is the v1alpha1 version of the Pinniped virtual oauth API. - - - - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequestspec"] -==== OIDCClientSecretRequestSpec - - - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`generateNewSecret`* __boolean__ | -| *`revokeOldSecrets`* __boolean__ | -|=== - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequeststatus"] -==== OIDCClientSecretRequestStatus - - - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`generatedSecret`* __string__ | -| *`totalClientSecrets`* __integer__ | -|=== - - diff --git a/generated/1.18/apis/supervisor/clientsecret/doc.go b/generated/1.18/apis/supervisor/clientsecret/doc.go new file mode 100644 index 00000000..c536bc75 --- /dev/null +++ b/generated/1.18/apis/supervisor/clientsecret/doc.go @@ -0,0 +1,8 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// +k8s:deepcopy-gen=package +// +groupName=clientsecret.supervisor.pinniped.dev + +// Package clientsecret is the internal version of the Pinniped client secret API. +package clientsecret diff --git a/generated/1.17/apis/supervisor/virtual/oauth/register.go b/generated/1.18/apis/supervisor/clientsecret/register.go similarity index 93% rename from generated/1.17/apis/supervisor/virtual/oauth/register.go rename to generated/1.18/apis/supervisor/clientsecret/register.go index a238d85f..4a1c0173 100644 --- a/generated/1.17/apis/supervisor/virtual/oauth/register.go +++ b/generated/1.18/apis/supervisor/clientsecret/register.go @@ -1,14 +1,14 @@ // Copyright 2022 the Pinniped contributors. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -package oauth +package clientsecret import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) -const GroupName = "oauth.virtual.supervisor.pinniped.dev" +const GroupName = "clientsecret.supervisor.pinniped.dev" // SchemeGroupVersion is group version used to register these objects. var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} diff --git a/generated/1.20/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go b/generated/1.18/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go similarity index 97% rename from generated/1.20/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go rename to generated/1.18/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go index ac54a93c..7fd1eb65 100644 --- a/generated/1.20/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go +++ b/generated/1.18/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go @@ -1,7 +1,7 @@ // Copyright 2022 the Pinniped contributors. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -package oauth +package clientsecret import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/conversion.go b/generated/1.18/apis/supervisor/clientsecret/v1alpha1/conversion.go similarity index 100% rename from generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/conversion.go rename to generated/1.18/apis/supervisor/clientsecret/v1alpha1/conversion.go diff --git a/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/defaults.go b/generated/1.18/apis/supervisor/clientsecret/v1alpha1/defaults.go similarity index 100% rename from generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/defaults.go rename to generated/1.18/apis/supervisor/clientsecret/v1alpha1/defaults.go diff --git a/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/doc.go b/generated/1.18/apis/supervisor/clientsecret/v1alpha1/doc.go similarity index 64% rename from generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/doc.go rename to generated/1.18/apis/supervisor/clientsecret/v1alpha1/doc.go index 215e4edf..9347ef46 100644 --- a/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/doc.go +++ b/generated/1.18/apis/supervisor/clientsecret/v1alpha1/doc.go @@ -3,9 +3,9 @@ // +k8s:openapi-gen=true // +k8s:deepcopy-gen=package -// +k8s:conversion-gen=go.pinniped.dev/generated/1.18/apis/supervisor/virtual/oauth +// +k8s:conversion-gen=go.pinniped.dev/generated/1.18/apis/supervisor/clientsecret // +k8s:defaulter-gen=TypeMeta -// +groupName=oauth.virtual.supervisor.pinniped.dev +// +groupName=clientsecret.supervisor.pinniped.dev -// Package v1alpha1 is the v1alpha1 version of the Pinniped virtual oauth API. +// Package v1alpha1 is the v1alpha1 version of the Pinniped client secret API. package v1alpha1 diff --git a/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/register.go b/generated/1.18/apis/supervisor/clientsecret/v1alpha1/register.go similarity index 95% rename from generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/register.go rename to generated/1.18/apis/supervisor/clientsecret/v1alpha1/register.go index ecc75a08..49602125 100644 --- a/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/register.go +++ b/generated/1.18/apis/supervisor/clientsecret/v1alpha1/register.go @@ -9,7 +9,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" ) -const GroupName = "oauth.virtual.supervisor.pinniped.dev" +const GroupName = "clientsecret.supervisor.pinniped.dev" // SchemeGroupVersion is group version used to register these objects. var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} diff --git a/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go b/generated/1.18/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go similarity index 100% rename from generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go rename to generated/1.18/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go diff --git a/generated/1.18/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go b/generated/1.18/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go new file mode 100644 index 00000000..990c4deb --- /dev/null +++ b/generated/1.18/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go @@ -0,0 +1,131 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + clientsecret "go.pinniped.dev/generated/1.18/apis/supervisor/clientsecret" + 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((*OIDCClientSecretRequest)(nil), (*clientsecret.OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest(a.(*OIDCClientSecretRequest), b.(*clientsecret.OIDCClientSecretRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientsecret.OIDCClientSecretRequest)(nil), (*OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(a.(*clientsecret.OIDCClientSecretRequest), b.(*OIDCClientSecretRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestSpec)(nil), (*clientsecret.OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(a.(*OIDCClientSecretRequestSpec), b.(*clientsecret.OIDCClientSecretRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientsecret.OIDCClientSecretRequestSpec)(nil), (*OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(a.(*clientsecret.OIDCClientSecretRequestSpec), b.(*OIDCClientSecretRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestStatus)(nil), (*clientsecret.OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(a.(*OIDCClientSecretRequestStatus), b.(*clientsecret.OIDCClientSecretRequestStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientsecret.OIDCClientSecretRequestStatus)(nil), (*OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(a.(*clientsecret.OIDCClientSecretRequestStatus), b.(*OIDCClientSecretRequestStatus), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *clientsecret.OIDCClientSecretRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *clientsecret.OIDCClientSecretRequest, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest(in, out, s) +} + +func autoConvert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *clientsecret.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest is an autogenerated conversion function. +func Convert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *clientsecret.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { + return autoConvert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in, out, s) +} + +func autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *clientsecret.OIDCClientSecretRequestSpec, s conversion.Scope) error { + out.GenerateNewSecret = in.GenerateNewSecret + out.RevokeOldSecrets = in.RevokeOldSecrets + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *clientsecret.OIDCClientSecretRequestSpec, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(in, out, s) +} + +func autoConvert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *clientsecret.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { + out.GenerateNewSecret = in.GenerateNewSecret + out.RevokeOldSecrets = in.RevokeOldSecrets + return nil +} + +// Convert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec is an autogenerated conversion function. +func Convert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *clientsecret.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { + return autoConvert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in, out, s) +} + +func autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *clientsecret.OIDCClientSecretRequestStatus, s conversion.Scope) error { + out.GeneratedSecret = in.GeneratedSecret + out.TotalClientSecrets = in.TotalClientSecrets + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *clientsecret.OIDCClientSecretRequestStatus, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(in, out, s) +} + +func autoConvert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *clientsecret.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { + out.GeneratedSecret = in.GeneratedSecret + out.TotalClientSecrets = in.TotalClientSecrets + return nil +} + +// Convert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus is an autogenerated conversion function. +func Convert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *clientsecret.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { + return autoConvert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in, out, s) +} diff --git a/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go b/generated/1.18/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go similarity index 100% rename from generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go rename to generated/1.18/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go diff --git a/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go b/generated/1.18/apis/supervisor/clientsecret/v1alpha1/zz_generated.defaults.go similarity index 100% rename from generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go rename to generated/1.18/apis/supervisor/clientsecret/v1alpha1/zz_generated.defaults.go diff --git a/generated/1.17/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go b/generated/1.18/apis/supervisor/clientsecret/zz_generated.deepcopy.go similarity index 99% rename from generated/1.17/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go rename to generated/1.18/apis/supervisor/clientsecret/zz_generated.deepcopy.go index 24b58e7b..e0dc7d68 100644 --- a/generated/1.17/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go +++ b/generated/1.18/apis/supervisor/clientsecret/zz_generated.deepcopy.go @@ -6,7 +6,7 @@ // Code generated by deepcopy-gen. DO NOT EDIT. -package oauth +package clientsecret import ( runtime "k8s.io/apimachinery/pkg/runtime" diff --git a/generated/1.18/apis/supervisor/config/v1alpha1/register.go b/generated/1.18/apis/supervisor/config/v1alpha1/register.go index 69045298..54c51699 100644 --- a/generated/1.18/apis/supervisor/config/v1alpha1/register.go +++ b/generated/1.18/apis/supervisor/config/v1alpha1/register.go @@ -32,6 +32,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &FederationDomain{}, &FederationDomainList{}, + &OIDCClient{}, + &OIDCClientList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/generated/1.18/apis/supervisor/oauth/v1alpha1/types_oidcclient.go b/generated/1.18/apis/supervisor/config/v1alpha1/types_oidcclient.go similarity index 100% rename from generated/1.18/apis/supervisor/oauth/v1alpha1/types_oidcclient.go rename to generated/1.18/apis/supervisor/config/v1alpha1/types_oidcclient.go diff --git a/generated/1.18/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go b/generated/1.18/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go index 856b8988..a55d88e7 100644 --- a/generated/1.18/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go +++ b/generated/1.18/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go @@ -150,3 +150,111 @@ func (in *FederationDomainTLSSpec) DeepCopy() *FederationDomainTLSSpec { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClient) DeepCopyInto(out *OIDCClient) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClient. +func (in *OIDCClient) DeepCopy() *OIDCClient { + if in == nil { + return nil + } + out := new(OIDCClient) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClient) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientList) DeepCopyInto(out *OIDCClientList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OIDCClient, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientList. +func (in *OIDCClientList) DeepCopy() *OIDCClientList { + if in == nil { + return nil + } + out := new(OIDCClientList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSpec) DeepCopyInto(out *OIDCClientSpec) { + *out = *in + if in.AllowedRedirectURIs != nil { + in, out := &in.AllowedRedirectURIs, &out.AllowedRedirectURIs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.AllowedGrantTypes != nil { + in, out := &in.AllowedGrantTypes, &out.AllowedGrantTypes + *out = make([]GrantType, len(*in)) + copy(*out, *in) + } + if in.AllowedScopes != nil { + in, out := &in.AllowedScopes, &out.AllowedScopes + *out = make([]Scope, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSpec. +func (in *OIDCClientSpec) DeepCopy() *OIDCClientSpec { + if in == nil { + return nil + } + out := new(OIDCClientSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientStatus) DeepCopyInto(out *OIDCClientStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientStatus. +func (in *OIDCClientStatus) DeepCopy() *OIDCClientStatus { + if in == nil { + return nil + } + out := new(OIDCClientStatus) + in.DeepCopyInto(out) + return out +} diff --git a/generated/1.18/apis/supervisor/oauth/v1alpha1/doc.go b/generated/1.18/apis/supervisor/oauth/v1alpha1/doc.go deleted file mode 100644 index 75580481..00000000 --- a/generated/1.18/apis/supervisor/oauth/v1alpha1/doc.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package -// +k8s:defaulter-gen=TypeMeta -// +groupName=oauth.supervisor.pinniped.dev - -// Package v1alpha1 is the v1alpha1 version of the Pinniped supervisor oauth API. -package v1alpha1 diff --git a/generated/1.18/apis/supervisor/oauth/v1alpha1/register.go b/generated/1.18/apis/supervisor/oauth/v1alpha1/register.go deleted file mode 100644 index 37ae1fbf..00000000 --- a/generated/1.18/apis/supervisor/oauth/v1alpha1/register.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const GroupName = "oauth.supervisor.pinniped.dev" - -// SchemeGroupVersion is group version used to register these objects. -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} - -var ( - SchemeBuilder runtime.SchemeBuilder - localSchemeBuilder = &SchemeBuilder - AddToScheme = localSchemeBuilder.AddToScheme -) - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addKnownTypes) -} - -// Adds the list of known types to the given scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &OIDCClient{}, - &OIDCClientList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} - -// Resource takes an unqualified resource and returns a Group qualified GroupResource. -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} diff --git a/generated/1.18/apis/supervisor/oauth/v1alpha1/zz_generated.deepcopy.go b/generated/1.18/apis/supervisor/oauth/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index 1aba8aea..00000000 --- a/generated/1.18/apis/supervisor/oauth/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,121 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClient) DeepCopyInto(out *OIDCClient) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClient. -func (in *OIDCClient) DeepCopy() *OIDCClient { - if in == nil { - return nil - } - out := new(OIDCClient) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OIDCClient) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientList) DeepCopyInto(out *OIDCClientList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]OIDCClient, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientList. -func (in *OIDCClientList) DeepCopy() *OIDCClientList { - if in == nil { - return nil - } - out := new(OIDCClientList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OIDCClientList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientSpec) DeepCopyInto(out *OIDCClientSpec) { - *out = *in - if in.AllowedRedirectURIs != nil { - in, out := &in.AllowedRedirectURIs, &out.AllowedRedirectURIs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.AllowedGrantTypes != nil { - in, out := &in.AllowedGrantTypes, &out.AllowedGrantTypes - *out = make([]GrantType, len(*in)) - copy(*out, *in) - } - if in.AllowedScopes != nil { - in, out := &in.AllowedScopes, &out.AllowedScopes - *out = make([]Scope, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSpec. -func (in *OIDCClientSpec) DeepCopy() *OIDCClientSpec { - if in == nil { - return nil - } - out := new(OIDCClientSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientStatus) DeepCopyInto(out *OIDCClientStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientStatus. -func (in *OIDCClientStatus) DeepCopy() *OIDCClientStatus { - if in == nil { - return nil - } - out := new(OIDCClientStatus) - in.DeepCopyInto(out) - return out -} diff --git a/generated/1.18/apis/supervisor/virtual/oauth/doc.go b/generated/1.18/apis/supervisor/virtual/oauth/doc.go deleted file mode 100644 index ca4e9a63..00000000 --- a/generated/1.18/apis/supervisor/virtual/oauth/doc.go +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// +k8s:deepcopy-gen=package -// +groupName=oauth.virtual.supervisor.pinniped.dev - -// Package oauth is the internal version of the Pinniped virtual oauth API. -package oauth diff --git a/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go b/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go deleted file mode 100644 index d71f1e76..00000000 --- a/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go +++ /dev/null @@ -1,131 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by conversion-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - oauth "go.pinniped.dev/generated/1.18/apis/supervisor/virtual/oauth" - 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((*OIDCClientSecretRequest)(nil), (*oauth.OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(a.(*OIDCClientSecretRequest), b.(*oauth.OIDCClientSecretRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequest)(nil), (*OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(a.(*oauth.OIDCClientSecretRequest), b.(*OIDCClientSecretRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestSpec)(nil), (*oauth.OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(a.(*OIDCClientSecretRequestSpec), b.(*oauth.OIDCClientSecretRequestSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequestSpec)(nil), (*OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(a.(*oauth.OIDCClientSecretRequestSpec), b.(*OIDCClientSecretRequestSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestStatus)(nil), (*oauth.OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(a.(*OIDCClientSecretRequestStatus), b.(*oauth.OIDCClientSecretRequestStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequestStatus)(nil), (*OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(a.(*oauth.OIDCClientSecretRequestStatus), b.(*OIDCClientSecretRequestStatus), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *oauth.OIDCClientSecretRequest, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest is an autogenerated conversion function. -func Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *oauth.OIDCClientSecretRequest, s conversion.Scope) error { - return autoConvert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in, out, s) -} - -func autoConvert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *oauth.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest is an autogenerated conversion function. -func Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *oauth.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { - return autoConvert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in, out, s) -} - -func autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *oauth.OIDCClientSecretRequestSpec, s conversion.Scope) error { - out.GenerateNewSecret = in.GenerateNewSecret - out.RevokeOldSecrets = in.RevokeOldSecrets - return nil -} - -// Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec is an autogenerated conversion function. -func Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *oauth.OIDCClientSecretRequestSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in, out, s) -} - -func autoConvert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *oauth.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { - out.GenerateNewSecret = in.GenerateNewSecret - out.RevokeOldSecrets = in.RevokeOldSecrets - return nil -} - -// Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec is an autogenerated conversion function. -func Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *oauth.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { - return autoConvert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in, out, s) -} - -func autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *oauth.OIDCClientSecretRequestStatus, s conversion.Scope) error { - out.GeneratedSecret = in.GeneratedSecret - out.TotalClientSecrets = in.TotalClientSecrets - return nil -} - -// Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus is an autogenerated conversion function. -func Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *oauth.OIDCClientSecretRequestStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in, out, s) -} - -func autoConvert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *oauth.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { - out.GeneratedSecret = in.GeneratedSecret - out.TotalClientSecrets = in.TotalClientSecrets - return nil -} - -// Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus is an autogenerated conversion function. -func Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *oauth.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { - return autoConvert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in, out, s) -} diff --git a/generated/1.18/client/supervisor/clientset/versioned/clientset.go b/generated/1.18/client/supervisor/clientset/versioned/clientset.go index d9bb8ce9..efa026f9 100644 --- a/generated/1.18/client/supervisor/clientset/versioned/clientset.go +++ b/generated/1.18/client/supervisor/clientset/versioned/clientset.go @@ -8,9 +8,9 @@ package versioned import ( "fmt" + clientsecretv1alpha1 "go.pinniped.dev/generated/1.18/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1" configv1alpha1 "go.pinniped.dev/generated/1.18/client/supervisor/clientset/versioned/typed/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.18/client/supervisor/clientset/versioned/typed/idp/v1alpha1" - oauthv1alpha1 "go.pinniped.dev/generated/1.18/client/supervisor/clientset/versioned/typed/oauth/v1alpha1" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" flowcontrol "k8s.io/client-go/util/flowcontrol" @@ -18,18 +18,23 @@ import ( type Interface interface { Discovery() discovery.DiscoveryInterface + ClientsecretV1alpha1() clientsecretv1alpha1.ClientsecretV1alpha1Interface ConfigV1alpha1() configv1alpha1.ConfigV1alpha1Interface IDPV1alpha1() idpv1alpha1.IDPV1alpha1Interface - OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface } // Clientset contains the clients for groups. Each group has exactly one // version included in a Clientset. type Clientset struct { *discovery.DiscoveryClient - configV1alpha1 *configv1alpha1.ConfigV1alpha1Client - iDPV1alpha1 *idpv1alpha1.IDPV1alpha1Client - oauthV1alpha1 *oauthv1alpha1.OauthV1alpha1Client + clientsecretV1alpha1 *clientsecretv1alpha1.ClientsecretV1alpha1Client + configV1alpha1 *configv1alpha1.ConfigV1alpha1Client + iDPV1alpha1 *idpv1alpha1.IDPV1alpha1Client +} + +// ClientsecretV1alpha1 retrieves the ClientsecretV1alpha1Client +func (c *Clientset) ClientsecretV1alpha1() clientsecretv1alpha1.ClientsecretV1alpha1Interface { + return c.clientsecretV1alpha1 } // ConfigV1alpha1 retrieves the ConfigV1alpha1Client @@ -42,11 +47,6 @@ func (c *Clientset) IDPV1alpha1() idpv1alpha1.IDPV1alpha1Interface { return c.iDPV1alpha1 } -// OauthV1alpha1 retrieves the OauthV1alpha1Client -func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { - return c.oauthV1alpha1 -} - // Discovery retrieves the DiscoveryClient func (c *Clientset) Discovery() discovery.DiscoveryInterface { if c == nil { @@ -68,6 +68,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { } var cs Clientset var err error + cs.clientsecretV1alpha1, err = clientsecretv1alpha1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } cs.configV1alpha1, err = configv1alpha1.NewForConfig(&configShallowCopy) if err != nil { return nil, err @@ -76,10 +80,6 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { if err != nil { return nil, err } - cs.oauthV1alpha1, err = oauthv1alpha1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) if err != nil { @@ -92,9 +92,9 @@ 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.clientsecretV1alpha1 = clientsecretv1alpha1.NewForConfigOrDie(c) cs.configV1alpha1 = configv1alpha1.NewForConfigOrDie(c) cs.iDPV1alpha1 = idpv1alpha1.NewForConfigOrDie(c) - cs.oauthV1alpha1 = oauthv1alpha1.NewForConfigOrDie(c) cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) return &cs @@ -103,9 +103,9 @@ 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.clientsecretV1alpha1 = clientsecretv1alpha1.New(c) cs.configV1alpha1 = configv1alpha1.New(c) cs.iDPV1alpha1 = idpv1alpha1.New(c) - cs.oauthV1alpha1 = oauthv1alpha1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) return &cs diff --git a/generated/1.18/client/supervisor/clientset/versioned/fake/clientset_generated.go b/generated/1.18/client/supervisor/clientset/versioned/fake/clientset_generated.go index be0ba580..5245f5ae 100644 --- a/generated/1.18/client/supervisor/clientset/versioned/fake/clientset_generated.go +++ b/generated/1.18/client/supervisor/clientset/versioned/fake/clientset_generated.go @@ -7,12 +7,12 @@ package fake import ( clientset "go.pinniped.dev/generated/1.18/client/supervisor/clientset/versioned" + clientsecretv1alpha1 "go.pinniped.dev/generated/1.18/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1" + fakeclientsecretv1alpha1 "go.pinniped.dev/generated/1.18/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake" configv1alpha1 "go.pinniped.dev/generated/1.18/client/supervisor/clientset/versioned/typed/config/v1alpha1" fakeconfigv1alpha1 "go.pinniped.dev/generated/1.18/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake" idpv1alpha1 "go.pinniped.dev/generated/1.18/client/supervisor/clientset/versioned/typed/idp/v1alpha1" fakeidpv1alpha1 "go.pinniped.dev/generated/1.18/client/supervisor/clientset/versioned/typed/idp/v1alpha1/fake" - oauthv1alpha1 "go.pinniped.dev/generated/1.18/client/supervisor/clientset/versioned/typed/oauth/v1alpha1" - fakeoauthv1alpha1 "go.pinniped.dev/generated/1.18/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/discovery" @@ -67,6 +67,11 @@ func (c *Clientset) Tracker() testing.ObjectTracker { var _ clientset.Interface = &Clientset{} +// ClientsecretV1alpha1 retrieves the ClientsecretV1alpha1Client +func (c *Clientset) ClientsecretV1alpha1() clientsecretv1alpha1.ClientsecretV1alpha1Interface { + return &fakeclientsecretv1alpha1.FakeClientsecretV1alpha1{Fake: &c.Fake} +} + // ConfigV1alpha1 retrieves the ConfigV1alpha1Client func (c *Clientset) ConfigV1alpha1() configv1alpha1.ConfigV1alpha1Interface { return &fakeconfigv1alpha1.FakeConfigV1alpha1{Fake: &c.Fake} @@ -76,8 +81,3 @@ func (c *Clientset) ConfigV1alpha1() configv1alpha1.ConfigV1alpha1Interface { func (c *Clientset) IDPV1alpha1() idpv1alpha1.IDPV1alpha1Interface { return &fakeidpv1alpha1.FakeIDPV1alpha1{Fake: &c.Fake} } - -// OauthV1alpha1 retrieves the OauthV1alpha1Client -func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { - return &fakeoauthv1alpha1.FakeOauthV1alpha1{Fake: &c.Fake} -} diff --git a/generated/1.18/client/supervisor/clientset/versioned/fake/register.go b/generated/1.18/client/supervisor/clientset/versioned/fake/register.go index 9a64a8a9..33d9c9bb 100644 --- a/generated/1.18/client/supervisor/clientset/versioned/fake/register.go +++ b/generated/1.18/client/supervisor/clientset/versioned/fake/register.go @@ -6,9 +6,9 @@ package fake import ( + clientsecretv1alpha1 "go.pinniped.dev/generated/1.18/apis/supervisor/clientsecret/v1alpha1" configv1alpha1 "go.pinniped.dev/generated/1.18/apis/supervisor/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.18/apis/supervisor/idp/v1alpha1" - oauthv1alpha1 "go.pinniped.dev/generated/1.18/apis/supervisor/oauth/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -20,9 +20,9 @@ var scheme = runtime.NewScheme() var codecs = serializer.NewCodecFactory(scheme) var parameterCodec = runtime.NewParameterCodec(scheme) var localSchemeBuilder = runtime.SchemeBuilder{ + clientsecretv1alpha1.AddToScheme, configv1alpha1.AddToScheme, idpv1alpha1.AddToScheme, - oauthv1alpha1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/generated/1.18/client/supervisor/clientset/versioned/scheme/register.go b/generated/1.18/client/supervisor/clientset/versioned/scheme/register.go index 1de4c05d..cfb2a59f 100644 --- a/generated/1.18/client/supervisor/clientset/versioned/scheme/register.go +++ b/generated/1.18/client/supervisor/clientset/versioned/scheme/register.go @@ -6,9 +6,9 @@ package scheme import ( + clientsecretv1alpha1 "go.pinniped.dev/generated/1.18/apis/supervisor/clientsecret/v1alpha1" configv1alpha1 "go.pinniped.dev/generated/1.18/apis/supervisor/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.18/apis/supervisor/idp/v1alpha1" - oauthv1alpha1 "go.pinniped.dev/generated/1.18/apis/supervisor/oauth/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -20,9 +20,9 @@ var Scheme = runtime.NewScheme() var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) var localSchemeBuilder = runtime.SchemeBuilder{ + clientsecretv1alpha1.AddToScheme, configv1alpha1.AddToScheme, idpv1alpha1.AddToScheme, - oauthv1alpha1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go b/generated/1.18/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/clientsecret_client.go similarity index 51% rename from generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go rename to generated/1.18/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/clientsecret_client.go index f0d93b95..300b26e4 100644 --- a/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go +++ b/generated/1.18/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/clientsecret_client.go @@ -6,27 +6,27 @@ package v1alpha1 import ( - v1alpha1 "go.pinniped.dev/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1" - "go.pinniped.dev/generated/1.19/client/supervisor/virtual/clientset/versioned/scheme" + v1alpha1 "go.pinniped.dev/generated/1.18/apis/supervisor/clientsecret/v1alpha1" + "go.pinniped.dev/generated/1.18/client/supervisor/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) -type OauthV1alpha1Interface interface { +type ClientsecretV1alpha1Interface interface { RESTClient() rest.Interface OIDCClientSecretRequestsGetter } -// OauthV1alpha1Client is used to interact with features provided by the oauth.virtual.supervisor.pinniped.dev group. -type OauthV1alpha1Client struct { +// ClientsecretV1alpha1Client is used to interact with features provided by the clientsecret.supervisor.pinniped.dev group. +type ClientsecretV1alpha1Client struct { restClient rest.Interface } -func (c *OauthV1alpha1Client) OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface { +func (c *ClientsecretV1alpha1Client) OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface { return newOIDCClientSecretRequests(c, namespace) } -// NewForConfig creates a new OauthV1alpha1Client for the given config. -func NewForConfig(c *rest.Config) (*OauthV1alpha1Client, error) { +// NewForConfig creates a new ClientsecretV1alpha1Client for the given config. +func NewForConfig(c *rest.Config) (*ClientsecretV1alpha1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err @@ -35,12 +35,12 @@ func NewForConfig(c *rest.Config) (*OauthV1alpha1Client, error) { if err != nil { return nil, err } - return &OauthV1alpha1Client{client}, nil + return &ClientsecretV1alpha1Client{client}, nil } -// NewForConfigOrDie creates a new OauthV1alpha1Client for the given config and +// NewForConfigOrDie creates a new ClientsecretV1alpha1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *OauthV1alpha1Client { +func NewForConfigOrDie(c *rest.Config) *ClientsecretV1alpha1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -48,9 +48,9 @@ func NewForConfigOrDie(c *rest.Config) *OauthV1alpha1Client { return client } -// New creates a new OauthV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *OauthV1alpha1Client { - return &OauthV1alpha1Client{c} +// New creates a new ClientsecretV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *ClientsecretV1alpha1Client { + return &ClientsecretV1alpha1Client{c} } func setConfigDefaults(config *rest.Config) error { @@ -68,7 +68,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 *OauthV1alpha1Client) RESTClient() rest.Interface { +func (c *ClientsecretV1alpha1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go b/generated/1.18/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/doc.go similarity index 100% rename from generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go rename to generated/1.18/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/doc.go diff --git a/generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go b/generated/1.18/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/doc.go similarity index 100% rename from generated/1.17/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go rename to generated/1.18/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/doc.go diff --git a/generated/1.18/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go b/generated/1.18/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_clientsecret_client.go similarity index 60% rename from generated/1.18/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go rename to generated/1.18/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_clientsecret_client.go index 0483f163..db5d3099 100644 --- a/generated/1.18/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go +++ b/generated/1.18/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_clientsecret_client.go @@ -6,22 +6,22 @@ package fake import ( - v1alpha1 "go.pinniped.dev/generated/1.18/client/supervisor/clientset/versioned/typed/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.18/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1" rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" ) -type FakeOauthV1alpha1 struct { +type FakeClientsecretV1alpha1 struct { *testing.Fake } -func (c *FakeOauthV1alpha1) OIDCClients(namespace string) v1alpha1.OIDCClientInterface { - return &FakeOIDCClients{c, namespace} +func (c *FakeClientsecretV1alpha1) OIDCClientSecretRequests(namespace string) v1alpha1.OIDCClientSecretRequestInterface { + return &FakeOIDCClientSecretRequests{c, namespace} } // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeOauthV1alpha1) RESTClient() rest.Interface { +func (c *FakeClientsecretV1alpha1) RESTClient() rest.Interface { var ret *rest.RESTClient return ret } diff --git a/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go b/generated/1.18/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_oidcclientsecretrequest.go similarity index 79% rename from generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go rename to generated/1.18/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_oidcclientsecretrequest.go index 8094fcf0..55a4c288 100644 --- a/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go +++ b/generated/1.18/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_oidcclientsecretrequest.go @@ -8,7 +8,7 @@ package fake import ( "context" - v1alpha1 "go.pinniped.dev/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.18/apis/supervisor/clientsecret/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" testing "k8s.io/client-go/testing" @@ -16,13 +16,13 @@ import ( // FakeOIDCClientSecretRequests implements OIDCClientSecretRequestInterface type FakeOIDCClientSecretRequests struct { - Fake *FakeOauthV1alpha1 + Fake *FakeClientsecretV1alpha1 ns string } -var oidcclientsecretrequestsResource = schema.GroupVersionResource{Group: "oauth.virtual.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclientsecretrequests"} +var oidcclientsecretrequestsResource = schema.GroupVersionResource{Group: "clientsecret.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclientsecretrequests"} -var oidcclientsecretrequestsKind = schema.GroupVersionKind{Group: "oauth.virtual.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClientSecretRequest"} +var oidcclientsecretrequestsKind = schema.GroupVersionKind{Group: "clientsecret.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClientSecretRequest"} // Create takes the representation of a oIDCClientSecretRequest and creates it. Returns the server's representation of the oIDCClientSecretRequest, and an error, if there is any. func (c *FakeOIDCClientSecretRequests) Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (result *v1alpha1.OIDCClientSecretRequest, err error) { diff --git a/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go b/generated/1.18/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/generated_expansion.go similarity index 100% rename from generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go rename to generated/1.18/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/generated_expansion.go diff --git a/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go b/generated/1.18/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/oidcclientsecretrequest.go similarity index 86% rename from generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go rename to generated/1.18/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/oidcclientsecretrequest.go index 160ae6da..28ba2721 100644 --- a/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go +++ b/generated/1.18/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/oidcclientsecretrequest.go @@ -8,8 +8,8 @@ package v1alpha1 import ( "context" - v1alpha1 "go.pinniped.dev/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1" - scheme "go.pinniped.dev/generated/1.19/client/supervisor/virtual/clientset/versioned/scheme" + v1alpha1 "go.pinniped.dev/generated/1.18/apis/supervisor/clientsecret/v1alpha1" + scheme "go.pinniped.dev/generated/1.18/client/supervisor/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" rest "k8s.io/client-go/rest" ) @@ -33,7 +33,7 @@ type oIDCClientSecretRequests struct { } // newOIDCClientSecretRequests returns a OIDCClientSecretRequests -func newOIDCClientSecretRequests(c *OauthV1alpha1Client, namespace string) *oIDCClientSecretRequests { +func newOIDCClientSecretRequests(c *ClientsecretV1alpha1Client, namespace string) *oIDCClientSecretRequests { return &oIDCClientSecretRequests{ client: c.RESTClient(), ns: namespace, diff --git a/generated/1.18/client/supervisor/clientset/versioned/typed/config/v1alpha1/config_client.go b/generated/1.18/client/supervisor/clientset/versioned/typed/config/v1alpha1/config_client.go index 1bdb3362..24c1c6bf 100644 --- a/generated/1.18/client/supervisor/clientset/versioned/typed/config/v1alpha1/config_client.go +++ b/generated/1.18/client/supervisor/clientset/versioned/typed/config/v1alpha1/config_client.go @@ -14,6 +14,7 @@ import ( type ConfigV1alpha1Interface interface { RESTClient() rest.Interface FederationDomainsGetter + OIDCClientsGetter } // ConfigV1alpha1Client is used to interact with features provided by the config.supervisor.pinniped.dev group. @@ -25,6 +26,10 @@ func (c *ConfigV1alpha1Client) FederationDomains(namespace string) FederationDom return newFederationDomains(c, namespace) } +func (c *ConfigV1alpha1Client) OIDCClients(namespace string) OIDCClientInterface { + return newOIDCClients(c, namespace) +} + // NewForConfig creates a new ConfigV1alpha1Client for the given config. func NewForConfig(c *rest.Config) (*ConfigV1alpha1Client, error) { config := *c diff --git a/generated/1.18/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go b/generated/1.18/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go index 0aeb5048..a653b66e 100644 --- a/generated/1.18/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go +++ b/generated/1.18/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go @@ -19,6 +19,10 @@ func (c *FakeConfigV1alpha1) FederationDomains(namespace string) v1alpha1.Federa return &FakeFederationDomains{c, namespace} } +func (c *FakeConfigV1alpha1) OIDCClients(namespace string) v1alpha1.OIDCClientInterface { + return &FakeOIDCClients{c, namespace} +} + // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. func (c *FakeConfigV1alpha1) RESTClient() rest.Interface { diff --git a/generated/1.19/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclient.go b/generated/1.18/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_oidcclient.go similarity index 92% rename from generated/1.19/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclient.go rename to generated/1.18/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_oidcclient.go index 078ab176..f04ffb6d 100644 --- a/generated/1.19/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclient.go +++ b/generated/1.18/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_oidcclient.go @@ -8,7 +8,7 @@ package fake import ( "context" - v1alpha1 "go.pinniped.dev/generated/1.19/apis/supervisor/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.18/apis/supervisor/config/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -19,13 +19,13 @@ import ( // FakeOIDCClients implements OIDCClientInterface type FakeOIDCClients struct { - Fake *FakeOauthV1alpha1 + Fake *FakeConfigV1alpha1 ns string } -var oidcclientsResource = schema.GroupVersionResource{Group: "oauth.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclients"} +var oidcclientsResource = schema.GroupVersionResource{Group: "config.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclients"} -var oidcclientsKind = schema.GroupVersionKind{Group: "oauth.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClient"} +var oidcclientsKind = schema.GroupVersionKind{Group: "config.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClient"} // Get takes name of the oIDCClient, and returns the corresponding oIDCClient object, and an error if there is any. func (c *FakeOIDCClients) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.OIDCClient, err error) { diff --git a/generated/1.18/client/supervisor/clientset/versioned/typed/config/v1alpha1/generated_expansion.go b/generated/1.18/client/supervisor/clientset/versioned/typed/config/v1alpha1/generated_expansion.go index ba9c9173..35b9ee3d 100644 --- a/generated/1.18/client/supervisor/clientset/versioned/typed/config/v1alpha1/generated_expansion.go +++ b/generated/1.18/client/supervisor/clientset/versioned/typed/config/v1alpha1/generated_expansion.go @@ -6,3 +6,5 @@ package v1alpha1 type FederationDomainExpansion interface{} + +type OIDCClientExpansion interface{} diff --git a/generated/1.18/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oidcclient.go b/generated/1.18/client/supervisor/clientset/versioned/typed/config/v1alpha1/oidcclient.go similarity index 97% rename from generated/1.18/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oidcclient.go rename to generated/1.18/client/supervisor/clientset/versioned/typed/config/v1alpha1/oidcclient.go index 26026924..1e65bfbf 100644 --- a/generated/1.18/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oidcclient.go +++ b/generated/1.18/client/supervisor/clientset/versioned/typed/config/v1alpha1/oidcclient.go @@ -9,7 +9,7 @@ import ( "context" "time" - v1alpha1 "go.pinniped.dev/generated/1.18/apis/supervisor/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.18/apis/supervisor/config/v1alpha1" scheme "go.pinniped.dev/generated/1.18/client/supervisor/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -44,7 +44,7 @@ type oIDCClients struct { } // newOIDCClients returns a OIDCClients -func newOIDCClients(c *OauthV1alpha1Client, namespace string) *oIDCClients { +func newOIDCClients(c *ConfigV1alpha1Client, namespace string) *oIDCClients { return &oIDCClients{ client: c.RESTClient(), ns: namespace, diff --git a/generated/1.18/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go b/generated/1.18/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go deleted file mode 100644 index 87d22ea9..00000000 --- a/generated/1.18/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -type OIDCClientExpansion interface{} diff --git a/generated/1.18/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go b/generated/1.18/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go deleted file mode 100644 index 17d59cf4..00000000 --- a/generated/1.18/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1alpha1 "go.pinniped.dev/generated/1.18/apis/supervisor/oauth/v1alpha1" - "go.pinniped.dev/generated/1.18/client/supervisor/clientset/versioned/scheme" - rest "k8s.io/client-go/rest" -) - -type OauthV1alpha1Interface interface { - RESTClient() rest.Interface - OIDCClientsGetter -} - -// OauthV1alpha1Client is used to interact with features provided by the oauth.supervisor.pinniped.dev group. -type OauthV1alpha1Client struct { - restClient rest.Interface -} - -func (c *OauthV1alpha1Client) OIDCClients(namespace string) OIDCClientInterface { - return newOIDCClients(c, namespace) -} - -// NewForConfig creates a new OauthV1alpha1Client for the given config. -func NewForConfig(c *rest.Config) (*OauthV1alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &OauthV1alpha1Client{client}, nil -} - -// NewForConfigOrDie creates a new OauthV1alpha1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *OauthV1alpha1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new OauthV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *OauthV1alpha1Client { - return &OauthV1alpha1Client{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 *OauthV1alpha1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/generated/1.18/client/supervisor/informers/externalversions/config/v1alpha1/interface.go b/generated/1.18/client/supervisor/informers/externalversions/config/v1alpha1/interface.go index 54d42593..af4b30aa 100644 --- a/generated/1.18/client/supervisor/informers/externalversions/config/v1alpha1/interface.go +++ b/generated/1.18/client/supervisor/informers/externalversions/config/v1alpha1/interface.go @@ -13,6 +13,8 @@ import ( type Interface interface { // FederationDomains returns a FederationDomainInformer. FederationDomains() FederationDomainInformer + // OIDCClients returns a OIDCClientInformer. + OIDCClients() OIDCClientInformer } type version struct { @@ -30,3 +32,8 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList func (v *version) FederationDomains() FederationDomainInformer { return &federationDomainInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } + +// OIDCClients returns a OIDCClientInformer. +func (v *version) OIDCClients() OIDCClientInformer { + return &oIDCClientInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} diff --git a/generated/1.18/client/supervisor/informers/externalversions/oauth/v1alpha1/oidcclient.go b/generated/1.18/client/supervisor/informers/externalversions/config/v1alpha1/oidcclient.go similarity index 88% rename from generated/1.18/client/supervisor/informers/externalversions/oauth/v1alpha1/oidcclient.go rename to generated/1.18/client/supervisor/informers/externalversions/config/v1alpha1/oidcclient.go index c5869b86..bf495ab0 100644 --- a/generated/1.18/client/supervisor/informers/externalversions/oauth/v1alpha1/oidcclient.go +++ b/generated/1.18/client/supervisor/informers/externalversions/config/v1alpha1/oidcclient.go @@ -9,10 +9,10 @@ import ( "context" time "time" - oauthv1alpha1 "go.pinniped.dev/generated/1.18/apis/supervisor/oauth/v1alpha1" + configv1alpha1 "go.pinniped.dev/generated/1.18/apis/supervisor/config/v1alpha1" versioned "go.pinniped.dev/generated/1.18/client/supervisor/clientset/versioned" internalinterfaces "go.pinniped.dev/generated/1.18/client/supervisor/informers/externalversions/internalinterfaces" - v1alpha1 "go.pinniped.dev/generated/1.18/client/supervisor/listers/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.18/client/supervisor/listers/config/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -49,16 +49,16 @@ func NewFilteredOIDCClientInformer(client versioned.Interface, namespace string, if tweakListOptions != nil { tweakListOptions(&options) } - return client.OauthV1alpha1().OIDCClients(namespace).List(context.TODO(), options) + return client.ConfigV1alpha1().OIDCClients(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.OauthV1alpha1().OIDCClients(namespace).Watch(context.TODO(), options) + return client.ConfigV1alpha1().OIDCClients(namespace).Watch(context.TODO(), options) }, }, - &oauthv1alpha1.OIDCClient{}, + &configv1alpha1.OIDCClient{}, resyncPeriod, indexers, ) @@ -69,7 +69,7 @@ func (f *oIDCClientInformer) defaultInformer(client versioned.Interface, resyncP } func (f *oIDCClientInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&oauthv1alpha1.OIDCClient{}, f.defaultInformer) + return f.factory.InformerFor(&configv1alpha1.OIDCClient{}, f.defaultInformer) } func (f *oIDCClientInformer) Lister() v1alpha1.OIDCClientLister { diff --git a/generated/1.18/client/supervisor/informers/externalversions/factory.go b/generated/1.18/client/supervisor/informers/externalversions/factory.go index 158fded5..997de893 100644 --- a/generated/1.18/client/supervisor/informers/externalversions/factory.go +++ b/generated/1.18/client/supervisor/informers/externalversions/factory.go @@ -14,7 +14,6 @@ import ( config "go.pinniped.dev/generated/1.18/client/supervisor/informers/externalversions/config" idp "go.pinniped.dev/generated/1.18/client/supervisor/informers/externalversions/idp" internalinterfaces "go.pinniped.dev/generated/1.18/client/supervisor/informers/externalversions/internalinterfaces" - oauth "go.pinniped.dev/generated/1.18/client/supervisor/informers/externalversions/oauth" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -163,7 +162,6 @@ type SharedInformerFactory interface { Config() config.Interface IDP() idp.Interface - Oauth() oauth.Interface } func (f *sharedInformerFactory) Config() config.Interface { @@ -173,7 +171,3 @@ func (f *sharedInformerFactory) Config() config.Interface { func (f *sharedInformerFactory) IDP() idp.Interface { return idp.New(f, f.namespace, f.tweakListOptions) } - -func (f *sharedInformerFactory) Oauth() oauth.Interface { - return oauth.New(f, f.namespace, f.tweakListOptions) -} diff --git a/generated/1.18/client/supervisor/informers/externalversions/generic.go b/generated/1.18/client/supervisor/informers/externalversions/generic.go index 43579b43..395cc6a8 100644 --- a/generated/1.18/client/supervisor/informers/externalversions/generic.go +++ b/generated/1.18/client/supervisor/informers/externalversions/generic.go @@ -10,7 +10,6 @@ import ( v1alpha1 "go.pinniped.dev/generated/1.18/apis/supervisor/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.18/apis/supervisor/idp/v1alpha1" - oauthv1alpha1 "go.pinniped.dev/generated/1.18/apis/supervisor/oauth/v1alpha1" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" ) @@ -44,6 +43,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource // Group=config.supervisor.pinniped.dev, Version=v1alpha1 case v1alpha1.SchemeGroupVersion.WithResource("federationdomains"): return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1alpha1().FederationDomains().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("oidcclients"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1alpha1().OIDCClients().Informer()}, nil // Group=idp.supervisor.pinniped.dev, Version=v1alpha1 case idpv1alpha1.SchemeGroupVersion.WithResource("activedirectoryidentityproviders"): @@ -53,10 +54,6 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource case idpv1alpha1.SchemeGroupVersion.WithResource("oidcidentityproviders"): return &genericInformer{resource: resource.GroupResource(), informer: f.IDP().V1alpha1().OIDCIdentityProviders().Informer()}, nil - // Group=oauth.supervisor.pinniped.dev, Version=v1alpha1 - case oauthv1alpha1.SchemeGroupVersion.WithResource("oidcclients"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Oauth().V1alpha1().OIDCClients().Informer()}, nil - } return nil, fmt.Errorf("no informer found for %v", resource) diff --git a/generated/1.18/client/supervisor/informers/externalversions/oauth/interface.go b/generated/1.18/client/supervisor/informers/externalversions/oauth/interface.go deleted file mode 100644 index 7a2b6531..00000000 --- a/generated/1.18/client/supervisor/informers/externalversions/oauth/interface.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by informer-gen. DO NOT EDIT. - -package oauth - -import ( - internalinterfaces "go.pinniped.dev/generated/1.18/client/supervisor/informers/externalversions/internalinterfaces" - v1alpha1 "go.pinniped.dev/generated/1.18/client/supervisor/informers/externalversions/oauth/v1alpha1" -) - -// Interface provides access to each of this group's versions. -type Interface interface { - // V1alpha1 provides access to shared informers for resources in V1alpha1. - V1alpha1() v1alpha1.Interface -} - -type group struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// V1alpha1 returns a new v1alpha1.Interface. -func (g *group) V1alpha1() v1alpha1.Interface { - return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) -} diff --git a/generated/1.18/client/supervisor/informers/externalversions/oauth/v1alpha1/interface.go b/generated/1.18/client/supervisor/informers/externalversions/oauth/v1alpha1/interface.go deleted file mode 100644 index 86b4efd0..00000000 --- a/generated/1.18/client/supervisor/informers/externalversions/oauth/v1alpha1/interface.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - internalinterfaces "go.pinniped.dev/generated/1.18/client/supervisor/informers/externalversions/internalinterfaces" -) - -// Interface provides access to all the informers in this group version. -type Interface interface { - // OIDCClients returns a OIDCClientInformer. - OIDCClients() OIDCClientInformer -} - -type version struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// OIDCClients returns a OIDCClientInformer. -func (v *version) OIDCClients() OIDCClientInformer { - return &oIDCClientInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} diff --git a/generated/1.18/client/supervisor/listers/config/v1alpha1/expansion_generated.go b/generated/1.18/client/supervisor/listers/config/v1alpha1/expansion_generated.go index d59892c4..bda2f20e 100644 --- a/generated/1.18/client/supervisor/listers/config/v1alpha1/expansion_generated.go +++ b/generated/1.18/client/supervisor/listers/config/v1alpha1/expansion_generated.go @@ -12,3 +12,11 @@ type FederationDomainListerExpansion interface{} // FederationDomainNamespaceListerExpansion allows custom methods to be added to // FederationDomainNamespaceLister. type FederationDomainNamespaceListerExpansion interface{} + +// OIDCClientListerExpansion allows custom methods to be added to +// OIDCClientLister. +type OIDCClientListerExpansion interface{} + +// OIDCClientNamespaceListerExpansion allows custom methods to be added to +// OIDCClientNamespaceLister. +type OIDCClientNamespaceListerExpansion interface{} diff --git a/generated/1.17/client/supervisor/listers/oauth/v1alpha1/oidcclient.go b/generated/1.18/client/supervisor/listers/config/v1alpha1/oidcclient.go similarity index 97% rename from generated/1.17/client/supervisor/listers/oauth/v1alpha1/oidcclient.go rename to generated/1.18/client/supervisor/listers/config/v1alpha1/oidcclient.go index 8395809f..79278890 100644 --- a/generated/1.17/client/supervisor/listers/oauth/v1alpha1/oidcclient.go +++ b/generated/1.18/client/supervisor/listers/config/v1alpha1/oidcclient.go @@ -6,7 +6,7 @@ package v1alpha1 import ( - v1alpha1 "go.pinniped.dev/generated/1.17/apis/supervisor/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.18/apis/supervisor/config/v1alpha1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" diff --git a/generated/1.18/client/supervisor/listers/oauth/v1alpha1/expansion_generated.go b/generated/1.18/client/supervisor/listers/oauth/v1alpha1/expansion_generated.go deleted file mode 100644 index c19310da..00000000 --- a/generated/1.18/client/supervisor/listers/oauth/v1alpha1/expansion_generated.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha1 - -// OIDCClientListerExpansion allows custom methods to be added to -// OIDCClientLister. -type OIDCClientListerExpansion interface{} - -// OIDCClientNamespaceListerExpansion allows custom methods to be added to -// OIDCClientNamespaceLister. -type OIDCClientNamespaceListerExpansion interface{} diff --git a/generated/1.18/client/supervisor/virtual/clientset/versioned/clientset.go b/generated/1.18/client/supervisor/virtual/clientset/versioned/clientset.go deleted file mode 100644 index f5038211..00000000 --- a/generated/1.18/client/supervisor/virtual/clientset/versioned/clientset.go +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package versioned - -import ( - "fmt" - - oauthv1alpha1 "go.pinniped.dev/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" - discovery "k8s.io/client-go/discovery" - rest "k8s.io/client-go/rest" - flowcontrol "k8s.io/client-go/util/flowcontrol" -) - -type Interface interface { - Discovery() discovery.DiscoveryInterface - OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface -} - -// Clientset contains the clients for groups. Each group has exactly one -// version included in a Clientset. -type Clientset struct { - *discovery.DiscoveryClient - oauthV1alpha1 *oauthv1alpha1.OauthV1alpha1Client -} - -// OauthV1alpha1 retrieves the OauthV1alpha1Client -func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { - return c.oauthV1alpha1 -} - -// Discovery retrieves the DiscoveryClient -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - if c == nil { - return nil - } - return c.DiscoveryClient -} - -// NewForConfig creates a new Clientset for the given config. -// If config's RateLimiter is not set and QPS and Burst are acceptable, -// NewForConfig will generate a rate-limiter in configShallowCopy. -func NewForConfig(c *rest.Config) (*Clientset, error) { - configShallowCopy := *c - if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { - if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") - } - configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) - } - var cs Clientset - var err error - cs.oauthV1alpha1, err = oauthv1alpha1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - - cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - return &cs, nil -} - -// NewForConfigOrDie creates a new Clientset for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *Clientset { - var cs Clientset - cs.oauthV1alpha1 = oauthv1alpha1.NewForConfigOrDie(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) - return &cs -} - -// New creates a new Clientset for the given RESTClient. -func New(c rest.Interface) *Clientset { - var cs Clientset - cs.oauthV1alpha1 = oauthv1alpha1.New(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClient(c) - return &cs -} diff --git a/generated/1.18/client/supervisor/virtual/clientset/versioned/doc.go b/generated/1.18/client/supervisor/virtual/clientset/versioned/doc.go deleted file mode 100644 index 5dc02e6e..00000000 --- a/generated/1.18/client/supervisor/virtual/clientset/versioned/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated clientset. -package versioned diff --git a/generated/1.18/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go b/generated/1.18/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go deleted file mode 100644 index 11c90feb..00000000 --- a/generated/1.18/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - clientset "go.pinniped.dev/generated/1.18/client/supervisor/virtual/clientset/versioned" - oauthv1alpha1 "go.pinniped.dev/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" - fakeoauthv1alpha1 "go.pinniped.dev/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/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" -) - -// NewSimpleClientset returns a clientset that will respond with the provided objects. -// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, -// without applying any validations and/or defaults. It shouldn't be considered a replacement -// for a real clientset and is mostly useful in simple unit tests. -func NewSimpleClientset(objects ...runtime.Object) *Clientset { - o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) - for _, obj := range objects { - if err := o.Add(obj); err != nil { - panic(err) - } - } - - cs := &Clientset{tracker: o} - cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} - cs.AddReactor("*", "*", testing.ObjectReaction(o)) - cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { - gvr := action.GetResource() - ns := action.GetNamespace() - watch, err := o.Watch(gvr, ns) - if err != nil { - return false, nil, err - } - return true, watch, nil - }) - - return cs -} - -// Clientset implements clientset.Interface. Meant to be embedded into a -// struct to get a default implementation. This makes faking out just the method -// you want to test easier. -type Clientset struct { - testing.Fake - discovery *fakediscovery.FakeDiscovery - tracker testing.ObjectTracker -} - -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - return c.discovery -} - -func (c *Clientset) Tracker() testing.ObjectTracker { - return c.tracker -} - -var _ clientset.Interface = &Clientset{} - -// OauthV1alpha1 retrieves the OauthV1alpha1Client -func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { - return &fakeoauthv1alpha1.FakeOauthV1alpha1{Fake: &c.Fake} -} diff --git a/generated/1.18/client/supervisor/virtual/clientset/versioned/fake/doc.go b/generated/1.18/client/supervisor/virtual/clientset/versioned/fake/doc.go deleted file mode 100644 index 7c9538fd..00000000 --- a/generated/1.18/client/supervisor/virtual/clientset/versioned/fake/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated fake clientset. -package fake diff --git a/generated/1.18/client/supervisor/virtual/clientset/versioned/fake/register.go b/generated/1.18/client/supervisor/virtual/clientset/versioned/fake/register.go deleted file mode 100644 index 5a912824..00000000 --- a/generated/1.18/client/supervisor/virtual/clientset/versioned/fake/register.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - oauthv1alpha1 "go.pinniped.dev/generated/1.18/apis/supervisor/virtual/oauth/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" -) - -var scheme = runtime.NewScheme() -var codecs = serializer.NewCodecFactory(scheme) -var parameterCodec = runtime.NewParameterCodec(scheme) -var localSchemeBuilder = runtime.SchemeBuilder{ - oauthv1alpha1.AddToScheme, -} - -// AddToScheme adds all types of this clientset into the given scheme. This allows composition -// of clientsets, like in: -// -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) -// -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) -// -// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types -// correctly. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(scheme)) -} diff --git a/generated/1.18/client/supervisor/virtual/clientset/versioned/scheme/doc.go b/generated/1.18/client/supervisor/virtual/clientset/versioned/scheme/doc.go deleted file mode 100644 index cc02f1d3..00000000 --- a/generated/1.18/client/supervisor/virtual/clientset/versioned/scheme/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// This package contains the scheme of the automatically generated clientset. -package scheme diff --git a/generated/1.18/client/supervisor/virtual/clientset/versioned/scheme/register.go b/generated/1.18/client/supervisor/virtual/clientset/versioned/scheme/register.go deleted file mode 100644 index 81e95f84..00000000 --- a/generated/1.18/client/supervisor/virtual/clientset/versioned/scheme/register.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package scheme - -import ( - oauthv1alpha1 "go.pinniped.dev/generated/1.18/apis/supervisor/virtual/oauth/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" -) - -var Scheme = runtime.NewScheme() -var Codecs = serializer.NewCodecFactory(Scheme) -var ParameterCodec = runtime.NewParameterCodec(Scheme) -var localSchemeBuilder = runtime.SchemeBuilder{ - oauthv1alpha1.AddToScheme, -} - -// AddToScheme adds all types of this clientset into the given scheme. This allows composition -// of clientsets, like in: -// -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) -// -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) -// -// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types -// correctly. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(Scheme)) -} diff --git a/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go b/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go deleted file mode 100644 index 99987eec..00000000 --- a/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1alpha1 "go.pinniped.dev/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" -) - -type FakeOauthV1alpha1 struct { - *testing.Fake -} - -func (c *FakeOauthV1alpha1) OIDCClientSecretRequests(namespace string) v1alpha1.OIDCClientSecretRequestInterface { - return &FakeOIDCClientSecretRequests{c, namespace} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeOauthV1alpha1) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/generated/1.18/crds/oauth.supervisor.pinniped.dev_oidcclients.yaml b/generated/1.18/crds/config.supervisor.pinniped.dev_oidcclients.yaml similarity index 98% rename from generated/1.18/crds/oauth.supervisor.pinniped.dev_oidcclients.yaml rename to generated/1.18/crds/config.supervisor.pinniped.dev_oidcclients.yaml index 589a9154..4efa445e 100644 --- a/generated/1.18/crds/oauth.supervisor.pinniped.dev_oidcclients.yaml +++ b/generated/1.18/crds/config.supervisor.pinniped.dev_oidcclients.yaml @@ -5,9 +5,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null - name: oidcclients.oauth.supervisor.pinniped.dev + name: oidcclients.config.supervisor.pinniped.dev spec: - group: oauth.supervisor.pinniped.dev + group: config.supervisor.pinniped.dev names: categories: - pinniped diff --git a/generated/1.19/README.adoc b/generated/1.19/README.adoc index 29d52abb..bdba4347 100644 --- a/generated/1.19/README.adoc +++ b/generated/1.19/README.adoc @@ -6,15 +6,14 @@ .Packages - xref:{anchor_prefix}-authentication-concierge-pinniped-dev-v1alpha1[$$authentication.concierge.pinniped.dev/v1alpha1$$] +- xref:{anchor_prefix}-clientsecret-supervisor-pinniped-dev-clientsecret[$$clientsecret.supervisor.pinniped.dev/clientsecret$$] +- xref:{anchor_prefix}-clientsecret-supervisor-pinniped-dev-v1alpha1[$$clientsecret.supervisor.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-config-concierge-pinniped-dev-v1alpha1[$$config.concierge.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-config-supervisor-pinniped-dev-v1alpha1[$$config.supervisor.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-identity-concierge-pinniped-dev-identity[$$identity.concierge.pinniped.dev/identity$$] - xref:{anchor_prefix}-identity-concierge-pinniped-dev-v1alpha1[$$identity.concierge.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-idp-supervisor-pinniped-dev-v1alpha1[$$idp.supervisor.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-login-concierge-pinniped-dev-v1alpha1[$$login.concierge.pinniped.dev/v1alpha1$$] -- xref:{anchor_prefix}-oauth-supervisor-pinniped-dev-v1alpha1[$$oauth.supervisor.pinniped.dev/v1alpha1$$] -- xref:{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-oauth[$$oauth.virtual.supervisor.pinniped.dev/oauth$$] -- xref:{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-v1alpha1[$$oauth.virtual.supervisor.pinniped.dev/v1alpha1$$] [id="{anchor_prefix}-authentication-concierge-pinniped-dev-v1alpha1"] @@ -213,6 +212,98 @@ Status of a webhook authenticator. +[id="{anchor_prefix}-clientsecret-supervisor-pinniped-dev-clientsecret"] +=== clientsecret.supervisor.pinniped.dev/clientsecret + +Package clientsecret is the internal version of the Pinniped client secret API. + + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-clientsecret-oidcclientsecretrequestspec"] +==== OIDCClientSecretRequestSpec + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-clientsecret-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generateNewSecret`* __boolean__ | +| *`revokeOldSecrets`* __boolean__ | +|=== + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-clientsecret-oidcclientsecretrequeststatus"] +==== OIDCClientSecretRequestStatus + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-clientsecret-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generatedSecret`* __string__ | +| *`totalClientSecrets`* __integer__ | +|=== + + + +[id="{anchor_prefix}-clientsecret-supervisor-pinniped-dev-v1alpha1"] +=== clientsecret.supervisor.pinniped.dev/v1alpha1 + +Package v1alpha1 is the v1alpha1 version of the Pinniped client secret API. + + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequestspec"] +==== OIDCClientSecretRequestSpec + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generateNewSecret`* __boolean__ | +| *`revokeOldSecrets`* __boolean__ | +|=== + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequeststatus"] +==== OIDCClientSecretRequestStatus + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generatedSecret`* __string__ | +| *`totalClientSecrets`* __integer__ | +|=== + + + [id="{anchor_prefix}-config-concierge-pinniped-dev-v1alpha1"] === config.concierge.pinniped.dev/v1alpha1 @@ -546,6 +637,51 @@ FederationDomainTLSSpec is a struct that describes the TLS configuration for an |=== +[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-config-v1alpha1-oidcclient"] +==== OIDCClient + +OIDCClient describes the configuration of an OIDC client. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-config-v1alpha1-oidcclientlist[$$OIDCClientList$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#objectmeta-v1-meta[$$ObjectMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. + +| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-config-v1alpha1-oidcclientspec[$$OIDCClientSpec$$]__ | Spec of the OIDC client. +| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-config-v1alpha1-oidcclientstatus[$$OIDCClientStatus$$]__ | Status of the OIDC client. +|=== + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-config-v1alpha1-oidcclientspec"] +==== OIDCClientSpec + +OIDCClientSpec is a struct that describes an OIDC Client. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-config-v1alpha1-oidcclient[$$OIDCClient$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`allowedRedirectURIs`* __string array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be https, unless it is a loopback. +| *`allowedGrantTypes`* __GrantType array__ | allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this client. + Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. +| *`allowedScopes`* __Scope array__ | allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. + Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. +|=== + + + + [id="{anchor_prefix}-identity-concierge-pinniped-dev-identity"] === identity.concierge.pinniped.dev/identity @@ -1335,148 +1471,3 @@ TokenCredentialRequestStatus is the status of a TokenCredentialRequest, returned |=== - -[id="{anchor_prefix}-oauth-supervisor-pinniped-dev-v1alpha1"] -=== oauth.supervisor.pinniped.dev/v1alpha1 - -Package v1alpha1 is the v1alpha1 version of the Pinniped supervisor oauth API. - - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-oauth-v1alpha1-oidcclient"] -==== OIDCClient - -OIDCClient describes the configuration of an OIDC client. - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-oauth-v1alpha1-oidcclientlist[$$OIDCClientList$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#objectmeta-v1-meta[$$ObjectMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. - -| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-oauth-v1alpha1-oidcclientspec[$$OIDCClientSpec$$]__ | Spec of the OIDC client. -| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-oauth-v1alpha1-oidcclientstatus[$$OIDCClientStatus$$]__ | Status of the OIDC client. -|=== - - - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-oauth-v1alpha1-oidcclientspec"] -==== OIDCClientSpec - -OIDCClientSpec is a struct that describes an OIDC Client. - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-oauth-v1alpha1-oidcclient[$$OIDCClient$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`allowedRedirectURIs`* __string array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be https, unless it is a loopback. -| *`allowedGrantTypes`* __GrantType array__ | allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. -| *`allowedScopes`* __Scope array__ | allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. -|=== - - - - - -[id="{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-oauth"] -=== oauth.virtual.supervisor.pinniped.dev/oauth - -Package oauth is the internal version of the Pinniped virtual oauth API. - - - - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-virtual-oauth-oidcclientsecretrequestspec"] -==== OIDCClientSecretRequestSpec - - - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-virtual-oauth-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`generateNewSecret`* __boolean__ | -| *`revokeOldSecrets`* __boolean__ | -|=== - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-virtual-oauth-oidcclientsecretrequeststatus"] -==== OIDCClientSecretRequestStatus - - - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-virtual-oauth-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`generatedSecret`* __string__ | -| *`totalClientSecrets`* __integer__ | -|=== - - - -[id="{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-v1alpha1"] -=== oauth.virtual.supervisor.pinniped.dev/v1alpha1 - -Package v1alpha1 is the v1alpha1 version of the Pinniped virtual oauth API. - - - - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequestspec"] -==== OIDCClientSecretRequestSpec - - - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`generateNewSecret`* __boolean__ | -| *`revokeOldSecrets`* __boolean__ | -|=== - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequeststatus"] -==== OIDCClientSecretRequestStatus - - - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`generatedSecret`* __string__ | -| *`totalClientSecrets`* __integer__ | -|=== - - diff --git a/generated/1.19/apis/supervisor/clientsecret/doc.go b/generated/1.19/apis/supervisor/clientsecret/doc.go new file mode 100644 index 00000000..c536bc75 --- /dev/null +++ b/generated/1.19/apis/supervisor/clientsecret/doc.go @@ -0,0 +1,8 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// +k8s:deepcopy-gen=package +// +groupName=clientsecret.supervisor.pinniped.dev + +// Package clientsecret is the internal version of the Pinniped client secret API. +package clientsecret diff --git a/generated/1.19/apis/supervisor/virtual/oauth/register.go b/generated/1.19/apis/supervisor/clientsecret/register.go similarity index 93% rename from generated/1.19/apis/supervisor/virtual/oauth/register.go rename to generated/1.19/apis/supervisor/clientsecret/register.go index a238d85f..4a1c0173 100644 --- a/generated/1.19/apis/supervisor/virtual/oauth/register.go +++ b/generated/1.19/apis/supervisor/clientsecret/register.go @@ -1,14 +1,14 @@ // Copyright 2022 the Pinniped contributors. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -package oauth +package clientsecret import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) -const GroupName = "oauth.virtual.supervisor.pinniped.dev" +const GroupName = "clientsecret.supervisor.pinniped.dev" // SchemeGroupVersion is group version used to register these objects. var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} diff --git a/generated/1.17/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go b/generated/1.19/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go similarity index 97% rename from generated/1.17/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go rename to generated/1.19/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go index ac54a93c..7fd1eb65 100644 --- a/generated/1.17/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go +++ b/generated/1.19/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go @@ -1,7 +1,7 @@ // Copyright 2022 the Pinniped contributors. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -package oauth +package clientsecret import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/conversion.go b/generated/1.19/apis/supervisor/clientsecret/v1alpha1/conversion.go similarity index 100% rename from generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/conversion.go rename to generated/1.19/apis/supervisor/clientsecret/v1alpha1/conversion.go diff --git a/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/defaults.go b/generated/1.19/apis/supervisor/clientsecret/v1alpha1/defaults.go similarity index 100% rename from generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/defaults.go rename to generated/1.19/apis/supervisor/clientsecret/v1alpha1/defaults.go diff --git a/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/doc.go b/generated/1.19/apis/supervisor/clientsecret/v1alpha1/doc.go similarity index 64% rename from generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/doc.go rename to generated/1.19/apis/supervisor/clientsecret/v1alpha1/doc.go index 49c85a15..c87d92c7 100644 --- a/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/doc.go +++ b/generated/1.19/apis/supervisor/clientsecret/v1alpha1/doc.go @@ -3,9 +3,9 @@ // +k8s:openapi-gen=true // +k8s:deepcopy-gen=package -// +k8s:conversion-gen=go.pinniped.dev/generated/1.19/apis/supervisor/virtual/oauth +// +k8s:conversion-gen=go.pinniped.dev/generated/1.19/apis/supervisor/clientsecret // +k8s:defaulter-gen=TypeMeta -// +groupName=oauth.virtual.supervisor.pinniped.dev +// +groupName=clientsecret.supervisor.pinniped.dev -// Package v1alpha1 is the v1alpha1 version of the Pinniped virtual oauth API. +// Package v1alpha1 is the v1alpha1 version of the Pinniped client secret API. package v1alpha1 diff --git a/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/register.go b/generated/1.19/apis/supervisor/clientsecret/v1alpha1/register.go similarity index 95% rename from generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/register.go rename to generated/1.19/apis/supervisor/clientsecret/v1alpha1/register.go index ecc75a08..49602125 100644 --- a/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/register.go +++ b/generated/1.19/apis/supervisor/clientsecret/v1alpha1/register.go @@ -9,7 +9,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" ) -const GroupName = "oauth.virtual.supervisor.pinniped.dev" +const GroupName = "clientsecret.supervisor.pinniped.dev" // SchemeGroupVersion is group version used to register these objects. var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} diff --git a/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go b/generated/1.19/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go similarity index 100% rename from generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go rename to generated/1.19/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go diff --git a/generated/1.19/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go b/generated/1.19/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go new file mode 100644 index 00000000..bf34cde1 --- /dev/null +++ b/generated/1.19/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go @@ -0,0 +1,131 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + clientsecret "go.pinniped.dev/generated/1.19/apis/supervisor/clientsecret" + 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((*OIDCClientSecretRequest)(nil), (*clientsecret.OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest(a.(*OIDCClientSecretRequest), b.(*clientsecret.OIDCClientSecretRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientsecret.OIDCClientSecretRequest)(nil), (*OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(a.(*clientsecret.OIDCClientSecretRequest), b.(*OIDCClientSecretRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestSpec)(nil), (*clientsecret.OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(a.(*OIDCClientSecretRequestSpec), b.(*clientsecret.OIDCClientSecretRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientsecret.OIDCClientSecretRequestSpec)(nil), (*OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(a.(*clientsecret.OIDCClientSecretRequestSpec), b.(*OIDCClientSecretRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestStatus)(nil), (*clientsecret.OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(a.(*OIDCClientSecretRequestStatus), b.(*clientsecret.OIDCClientSecretRequestStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientsecret.OIDCClientSecretRequestStatus)(nil), (*OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(a.(*clientsecret.OIDCClientSecretRequestStatus), b.(*OIDCClientSecretRequestStatus), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *clientsecret.OIDCClientSecretRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *clientsecret.OIDCClientSecretRequest, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest(in, out, s) +} + +func autoConvert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *clientsecret.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest is an autogenerated conversion function. +func Convert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *clientsecret.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { + return autoConvert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in, out, s) +} + +func autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *clientsecret.OIDCClientSecretRequestSpec, s conversion.Scope) error { + out.GenerateNewSecret = in.GenerateNewSecret + out.RevokeOldSecrets = in.RevokeOldSecrets + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *clientsecret.OIDCClientSecretRequestSpec, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(in, out, s) +} + +func autoConvert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *clientsecret.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { + out.GenerateNewSecret = in.GenerateNewSecret + out.RevokeOldSecrets = in.RevokeOldSecrets + return nil +} + +// Convert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec is an autogenerated conversion function. +func Convert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *clientsecret.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { + return autoConvert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in, out, s) +} + +func autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *clientsecret.OIDCClientSecretRequestStatus, s conversion.Scope) error { + out.GeneratedSecret = in.GeneratedSecret + out.TotalClientSecrets = in.TotalClientSecrets + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *clientsecret.OIDCClientSecretRequestStatus, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(in, out, s) +} + +func autoConvert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *clientsecret.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { + out.GeneratedSecret = in.GeneratedSecret + out.TotalClientSecrets = in.TotalClientSecrets + return nil +} + +// Convert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus is an autogenerated conversion function. +func Convert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *clientsecret.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { + return autoConvert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in, out, s) +} diff --git a/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go b/generated/1.19/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go similarity index 100% rename from generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go rename to generated/1.19/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go diff --git a/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go b/generated/1.19/apis/supervisor/clientsecret/v1alpha1/zz_generated.defaults.go similarity index 100% rename from generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go rename to generated/1.19/apis/supervisor/clientsecret/v1alpha1/zz_generated.defaults.go diff --git a/generated/1.20/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go b/generated/1.19/apis/supervisor/clientsecret/zz_generated.deepcopy.go similarity index 99% rename from generated/1.20/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go rename to generated/1.19/apis/supervisor/clientsecret/zz_generated.deepcopy.go index 24b58e7b..e0dc7d68 100644 --- a/generated/1.20/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go +++ b/generated/1.19/apis/supervisor/clientsecret/zz_generated.deepcopy.go @@ -6,7 +6,7 @@ // Code generated by deepcopy-gen. DO NOT EDIT. -package oauth +package clientsecret import ( runtime "k8s.io/apimachinery/pkg/runtime" diff --git a/generated/1.19/apis/supervisor/config/v1alpha1/register.go b/generated/1.19/apis/supervisor/config/v1alpha1/register.go index 69045298..54c51699 100644 --- a/generated/1.19/apis/supervisor/config/v1alpha1/register.go +++ b/generated/1.19/apis/supervisor/config/v1alpha1/register.go @@ -32,6 +32,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &FederationDomain{}, &FederationDomainList{}, + &OIDCClient{}, + &OIDCClientList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/generated/1.19/apis/supervisor/oauth/v1alpha1/types_oidcclient.go b/generated/1.19/apis/supervisor/config/v1alpha1/types_oidcclient.go similarity index 100% rename from generated/1.19/apis/supervisor/oauth/v1alpha1/types_oidcclient.go rename to generated/1.19/apis/supervisor/config/v1alpha1/types_oidcclient.go diff --git a/generated/1.19/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go b/generated/1.19/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go index 856b8988..a55d88e7 100644 --- a/generated/1.19/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go +++ b/generated/1.19/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go @@ -150,3 +150,111 @@ func (in *FederationDomainTLSSpec) DeepCopy() *FederationDomainTLSSpec { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClient) DeepCopyInto(out *OIDCClient) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClient. +func (in *OIDCClient) DeepCopy() *OIDCClient { + if in == nil { + return nil + } + out := new(OIDCClient) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClient) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientList) DeepCopyInto(out *OIDCClientList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OIDCClient, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientList. +func (in *OIDCClientList) DeepCopy() *OIDCClientList { + if in == nil { + return nil + } + out := new(OIDCClientList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSpec) DeepCopyInto(out *OIDCClientSpec) { + *out = *in + if in.AllowedRedirectURIs != nil { + in, out := &in.AllowedRedirectURIs, &out.AllowedRedirectURIs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.AllowedGrantTypes != nil { + in, out := &in.AllowedGrantTypes, &out.AllowedGrantTypes + *out = make([]GrantType, len(*in)) + copy(*out, *in) + } + if in.AllowedScopes != nil { + in, out := &in.AllowedScopes, &out.AllowedScopes + *out = make([]Scope, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSpec. +func (in *OIDCClientSpec) DeepCopy() *OIDCClientSpec { + if in == nil { + return nil + } + out := new(OIDCClientSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientStatus) DeepCopyInto(out *OIDCClientStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientStatus. +func (in *OIDCClientStatus) DeepCopy() *OIDCClientStatus { + if in == nil { + return nil + } + out := new(OIDCClientStatus) + in.DeepCopyInto(out) + return out +} diff --git a/generated/1.19/apis/supervisor/oauth/v1alpha1/doc.go b/generated/1.19/apis/supervisor/oauth/v1alpha1/doc.go deleted file mode 100644 index 75580481..00000000 --- a/generated/1.19/apis/supervisor/oauth/v1alpha1/doc.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package -// +k8s:defaulter-gen=TypeMeta -// +groupName=oauth.supervisor.pinniped.dev - -// Package v1alpha1 is the v1alpha1 version of the Pinniped supervisor oauth API. -package v1alpha1 diff --git a/generated/1.19/apis/supervisor/oauth/v1alpha1/register.go b/generated/1.19/apis/supervisor/oauth/v1alpha1/register.go deleted file mode 100644 index 37ae1fbf..00000000 --- a/generated/1.19/apis/supervisor/oauth/v1alpha1/register.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const GroupName = "oauth.supervisor.pinniped.dev" - -// SchemeGroupVersion is group version used to register these objects. -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} - -var ( - SchemeBuilder runtime.SchemeBuilder - localSchemeBuilder = &SchemeBuilder - AddToScheme = localSchemeBuilder.AddToScheme -) - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addKnownTypes) -} - -// Adds the list of known types to the given scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &OIDCClient{}, - &OIDCClientList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} - -// Resource takes an unqualified resource and returns a Group qualified GroupResource. -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} diff --git a/generated/1.19/apis/supervisor/oauth/v1alpha1/zz_generated.deepcopy.go b/generated/1.19/apis/supervisor/oauth/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index 1aba8aea..00000000 --- a/generated/1.19/apis/supervisor/oauth/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,121 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClient) DeepCopyInto(out *OIDCClient) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClient. -func (in *OIDCClient) DeepCopy() *OIDCClient { - if in == nil { - return nil - } - out := new(OIDCClient) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OIDCClient) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientList) DeepCopyInto(out *OIDCClientList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]OIDCClient, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientList. -func (in *OIDCClientList) DeepCopy() *OIDCClientList { - if in == nil { - return nil - } - out := new(OIDCClientList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OIDCClientList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientSpec) DeepCopyInto(out *OIDCClientSpec) { - *out = *in - if in.AllowedRedirectURIs != nil { - in, out := &in.AllowedRedirectURIs, &out.AllowedRedirectURIs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.AllowedGrantTypes != nil { - in, out := &in.AllowedGrantTypes, &out.AllowedGrantTypes - *out = make([]GrantType, len(*in)) - copy(*out, *in) - } - if in.AllowedScopes != nil { - in, out := &in.AllowedScopes, &out.AllowedScopes - *out = make([]Scope, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSpec. -func (in *OIDCClientSpec) DeepCopy() *OIDCClientSpec { - if in == nil { - return nil - } - out := new(OIDCClientSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientStatus) DeepCopyInto(out *OIDCClientStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientStatus. -func (in *OIDCClientStatus) DeepCopy() *OIDCClientStatus { - if in == nil { - return nil - } - out := new(OIDCClientStatus) - in.DeepCopyInto(out) - return out -} diff --git a/generated/1.19/apis/supervisor/virtual/oauth/doc.go b/generated/1.19/apis/supervisor/virtual/oauth/doc.go deleted file mode 100644 index ca4e9a63..00000000 --- a/generated/1.19/apis/supervisor/virtual/oauth/doc.go +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// +k8s:deepcopy-gen=package -// +groupName=oauth.virtual.supervisor.pinniped.dev - -// Package oauth is the internal version of the Pinniped virtual oauth API. -package oauth diff --git a/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go b/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go deleted file mode 100644 index ae93108c..00000000 --- a/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go +++ /dev/null @@ -1,131 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by conversion-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - oauth "go.pinniped.dev/generated/1.19/apis/supervisor/virtual/oauth" - 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((*OIDCClientSecretRequest)(nil), (*oauth.OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(a.(*OIDCClientSecretRequest), b.(*oauth.OIDCClientSecretRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequest)(nil), (*OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(a.(*oauth.OIDCClientSecretRequest), b.(*OIDCClientSecretRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestSpec)(nil), (*oauth.OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(a.(*OIDCClientSecretRequestSpec), b.(*oauth.OIDCClientSecretRequestSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequestSpec)(nil), (*OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(a.(*oauth.OIDCClientSecretRequestSpec), b.(*OIDCClientSecretRequestSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestStatus)(nil), (*oauth.OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(a.(*OIDCClientSecretRequestStatus), b.(*oauth.OIDCClientSecretRequestStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequestStatus)(nil), (*OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(a.(*oauth.OIDCClientSecretRequestStatus), b.(*OIDCClientSecretRequestStatus), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *oauth.OIDCClientSecretRequest, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest is an autogenerated conversion function. -func Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *oauth.OIDCClientSecretRequest, s conversion.Scope) error { - return autoConvert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in, out, s) -} - -func autoConvert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *oauth.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest is an autogenerated conversion function. -func Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *oauth.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { - return autoConvert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in, out, s) -} - -func autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *oauth.OIDCClientSecretRequestSpec, s conversion.Scope) error { - out.GenerateNewSecret = in.GenerateNewSecret - out.RevokeOldSecrets = in.RevokeOldSecrets - return nil -} - -// Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec is an autogenerated conversion function. -func Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *oauth.OIDCClientSecretRequestSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in, out, s) -} - -func autoConvert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *oauth.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { - out.GenerateNewSecret = in.GenerateNewSecret - out.RevokeOldSecrets = in.RevokeOldSecrets - return nil -} - -// Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec is an autogenerated conversion function. -func Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *oauth.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { - return autoConvert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in, out, s) -} - -func autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *oauth.OIDCClientSecretRequestStatus, s conversion.Scope) error { - out.GeneratedSecret = in.GeneratedSecret - out.TotalClientSecrets = in.TotalClientSecrets - return nil -} - -// Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus is an autogenerated conversion function. -func Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *oauth.OIDCClientSecretRequestStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in, out, s) -} - -func autoConvert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *oauth.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { - out.GeneratedSecret = in.GeneratedSecret - out.TotalClientSecrets = in.TotalClientSecrets - return nil -} - -// Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus is an autogenerated conversion function. -func Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *oauth.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { - return autoConvert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in, out, s) -} diff --git a/generated/1.19/client/supervisor/clientset/versioned/clientset.go b/generated/1.19/client/supervisor/clientset/versioned/clientset.go index 09f209c0..c163069e 100644 --- a/generated/1.19/client/supervisor/clientset/versioned/clientset.go +++ b/generated/1.19/client/supervisor/clientset/versioned/clientset.go @@ -8,9 +8,9 @@ package versioned import ( "fmt" + clientsecretv1alpha1 "go.pinniped.dev/generated/1.19/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1" configv1alpha1 "go.pinniped.dev/generated/1.19/client/supervisor/clientset/versioned/typed/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.19/client/supervisor/clientset/versioned/typed/idp/v1alpha1" - oauthv1alpha1 "go.pinniped.dev/generated/1.19/client/supervisor/clientset/versioned/typed/oauth/v1alpha1" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" flowcontrol "k8s.io/client-go/util/flowcontrol" @@ -18,18 +18,23 @@ import ( type Interface interface { Discovery() discovery.DiscoveryInterface + ClientsecretV1alpha1() clientsecretv1alpha1.ClientsecretV1alpha1Interface ConfigV1alpha1() configv1alpha1.ConfigV1alpha1Interface IDPV1alpha1() idpv1alpha1.IDPV1alpha1Interface - OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface } // Clientset contains the clients for groups. Each group has exactly one // version included in a Clientset. type Clientset struct { *discovery.DiscoveryClient - configV1alpha1 *configv1alpha1.ConfigV1alpha1Client - iDPV1alpha1 *idpv1alpha1.IDPV1alpha1Client - oauthV1alpha1 *oauthv1alpha1.OauthV1alpha1Client + clientsecretV1alpha1 *clientsecretv1alpha1.ClientsecretV1alpha1Client + configV1alpha1 *configv1alpha1.ConfigV1alpha1Client + iDPV1alpha1 *idpv1alpha1.IDPV1alpha1Client +} + +// ClientsecretV1alpha1 retrieves the ClientsecretV1alpha1Client +func (c *Clientset) ClientsecretV1alpha1() clientsecretv1alpha1.ClientsecretV1alpha1Interface { + return c.clientsecretV1alpha1 } // ConfigV1alpha1 retrieves the ConfigV1alpha1Client @@ -42,11 +47,6 @@ func (c *Clientset) IDPV1alpha1() idpv1alpha1.IDPV1alpha1Interface { return c.iDPV1alpha1 } -// OauthV1alpha1 retrieves the OauthV1alpha1Client -func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { - return c.oauthV1alpha1 -} - // Discovery retrieves the DiscoveryClient func (c *Clientset) Discovery() discovery.DiscoveryInterface { if c == nil { @@ -68,6 +68,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { } var cs Clientset var err error + cs.clientsecretV1alpha1, err = clientsecretv1alpha1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } cs.configV1alpha1, err = configv1alpha1.NewForConfig(&configShallowCopy) if err != nil { return nil, err @@ -76,10 +80,6 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { if err != nil { return nil, err } - cs.oauthV1alpha1, err = oauthv1alpha1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) if err != nil { @@ -92,9 +92,9 @@ 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.clientsecretV1alpha1 = clientsecretv1alpha1.NewForConfigOrDie(c) cs.configV1alpha1 = configv1alpha1.NewForConfigOrDie(c) cs.iDPV1alpha1 = idpv1alpha1.NewForConfigOrDie(c) - cs.oauthV1alpha1 = oauthv1alpha1.NewForConfigOrDie(c) cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) return &cs @@ -103,9 +103,9 @@ 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.clientsecretV1alpha1 = clientsecretv1alpha1.New(c) cs.configV1alpha1 = configv1alpha1.New(c) cs.iDPV1alpha1 = idpv1alpha1.New(c) - cs.oauthV1alpha1 = oauthv1alpha1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) return &cs diff --git a/generated/1.19/client/supervisor/clientset/versioned/fake/clientset_generated.go b/generated/1.19/client/supervisor/clientset/versioned/fake/clientset_generated.go index cc7334de..18e8b09d 100644 --- a/generated/1.19/client/supervisor/clientset/versioned/fake/clientset_generated.go +++ b/generated/1.19/client/supervisor/clientset/versioned/fake/clientset_generated.go @@ -7,12 +7,12 @@ package fake import ( clientset "go.pinniped.dev/generated/1.19/client/supervisor/clientset/versioned" + clientsecretv1alpha1 "go.pinniped.dev/generated/1.19/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1" + fakeclientsecretv1alpha1 "go.pinniped.dev/generated/1.19/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake" configv1alpha1 "go.pinniped.dev/generated/1.19/client/supervisor/clientset/versioned/typed/config/v1alpha1" fakeconfigv1alpha1 "go.pinniped.dev/generated/1.19/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake" idpv1alpha1 "go.pinniped.dev/generated/1.19/client/supervisor/clientset/versioned/typed/idp/v1alpha1" fakeidpv1alpha1 "go.pinniped.dev/generated/1.19/client/supervisor/clientset/versioned/typed/idp/v1alpha1/fake" - oauthv1alpha1 "go.pinniped.dev/generated/1.19/client/supervisor/clientset/versioned/typed/oauth/v1alpha1" - fakeoauthv1alpha1 "go.pinniped.dev/generated/1.19/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/discovery" @@ -67,6 +67,11 @@ func (c *Clientset) Tracker() testing.ObjectTracker { var _ clientset.Interface = &Clientset{} +// ClientsecretV1alpha1 retrieves the ClientsecretV1alpha1Client +func (c *Clientset) ClientsecretV1alpha1() clientsecretv1alpha1.ClientsecretV1alpha1Interface { + return &fakeclientsecretv1alpha1.FakeClientsecretV1alpha1{Fake: &c.Fake} +} + // ConfigV1alpha1 retrieves the ConfigV1alpha1Client func (c *Clientset) ConfigV1alpha1() configv1alpha1.ConfigV1alpha1Interface { return &fakeconfigv1alpha1.FakeConfigV1alpha1{Fake: &c.Fake} @@ -76,8 +81,3 @@ func (c *Clientset) ConfigV1alpha1() configv1alpha1.ConfigV1alpha1Interface { func (c *Clientset) IDPV1alpha1() idpv1alpha1.IDPV1alpha1Interface { return &fakeidpv1alpha1.FakeIDPV1alpha1{Fake: &c.Fake} } - -// OauthV1alpha1 retrieves the OauthV1alpha1Client -func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { - return &fakeoauthv1alpha1.FakeOauthV1alpha1{Fake: &c.Fake} -} diff --git a/generated/1.19/client/supervisor/clientset/versioned/fake/register.go b/generated/1.19/client/supervisor/clientset/versioned/fake/register.go index 31bd0f0b..639af836 100644 --- a/generated/1.19/client/supervisor/clientset/versioned/fake/register.go +++ b/generated/1.19/client/supervisor/clientset/versioned/fake/register.go @@ -6,9 +6,9 @@ package fake import ( + clientsecretv1alpha1 "go.pinniped.dev/generated/1.19/apis/supervisor/clientsecret/v1alpha1" configv1alpha1 "go.pinniped.dev/generated/1.19/apis/supervisor/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.19/apis/supervisor/idp/v1alpha1" - oauthv1alpha1 "go.pinniped.dev/generated/1.19/apis/supervisor/oauth/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -20,9 +20,9 @@ var scheme = runtime.NewScheme() var codecs = serializer.NewCodecFactory(scheme) var localSchemeBuilder = runtime.SchemeBuilder{ + clientsecretv1alpha1.AddToScheme, configv1alpha1.AddToScheme, idpv1alpha1.AddToScheme, - oauthv1alpha1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/generated/1.19/client/supervisor/clientset/versioned/scheme/register.go b/generated/1.19/client/supervisor/clientset/versioned/scheme/register.go index bd2ef62e..59c7435f 100644 --- a/generated/1.19/client/supervisor/clientset/versioned/scheme/register.go +++ b/generated/1.19/client/supervisor/clientset/versioned/scheme/register.go @@ -6,9 +6,9 @@ package scheme import ( + clientsecretv1alpha1 "go.pinniped.dev/generated/1.19/apis/supervisor/clientsecret/v1alpha1" configv1alpha1 "go.pinniped.dev/generated/1.19/apis/supervisor/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.19/apis/supervisor/idp/v1alpha1" - oauthv1alpha1 "go.pinniped.dev/generated/1.19/apis/supervisor/oauth/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -20,9 +20,9 @@ var Scheme = runtime.NewScheme() var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) var localSchemeBuilder = runtime.SchemeBuilder{ + clientsecretv1alpha1.AddToScheme, configv1alpha1.AddToScheme, idpv1alpha1.AddToScheme, - oauthv1alpha1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go b/generated/1.19/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/clientsecret_client.go similarity index 51% rename from generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go rename to generated/1.19/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/clientsecret_client.go index 8141d975..dc1749cf 100644 --- a/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go +++ b/generated/1.19/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/clientsecret_client.go @@ -6,27 +6,27 @@ package v1alpha1 import ( - v1alpha1 "go.pinniped.dev/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1" - "go.pinniped.dev/generated/1.20/client/supervisor/virtual/clientset/versioned/scheme" + v1alpha1 "go.pinniped.dev/generated/1.19/apis/supervisor/clientsecret/v1alpha1" + "go.pinniped.dev/generated/1.19/client/supervisor/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) -type OauthV1alpha1Interface interface { +type ClientsecretV1alpha1Interface interface { RESTClient() rest.Interface OIDCClientSecretRequestsGetter } -// OauthV1alpha1Client is used to interact with features provided by the oauth.virtual.supervisor.pinniped.dev group. -type OauthV1alpha1Client struct { +// ClientsecretV1alpha1Client is used to interact with features provided by the clientsecret.supervisor.pinniped.dev group. +type ClientsecretV1alpha1Client struct { restClient rest.Interface } -func (c *OauthV1alpha1Client) OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface { +func (c *ClientsecretV1alpha1Client) OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface { return newOIDCClientSecretRequests(c, namespace) } -// NewForConfig creates a new OauthV1alpha1Client for the given config. -func NewForConfig(c *rest.Config) (*OauthV1alpha1Client, error) { +// NewForConfig creates a new ClientsecretV1alpha1Client for the given config. +func NewForConfig(c *rest.Config) (*ClientsecretV1alpha1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err @@ -35,12 +35,12 @@ func NewForConfig(c *rest.Config) (*OauthV1alpha1Client, error) { if err != nil { return nil, err } - return &OauthV1alpha1Client{client}, nil + return &ClientsecretV1alpha1Client{client}, nil } -// NewForConfigOrDie creates a new OauthV1alpha1Client for the given config and +// NewForConfigOrDie creates a new ClientsecretV1alpha1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *OauthV1alpha1Client { +func NewForConfigOrDie(c *rest.Config) *ClientsecretV1alpha1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -48,9 +48,9 @@ func NewForConfigOrDie(c *rest.Config) *OauthV1alpha1Client { return client } -// New creates a new OauthV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *OauthV1alpha1Client { - return &OauthV1alpha1Client{c} +// New creates a new ClientsecretV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *ClientsecretV1alpha1Client { + return &ClientsecretV1alpha1Client{c} } func setConfigDefaults(config *rest.Config) error { @@ -68,7 +68,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 *OauthV1alpha1Client) RESTClient() rest.Interface { +func (c *ClientsecretV1alpha1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/generated/1.18/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/doc.go b/generated/1.19/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/doc.go similarity index 100% rename from generated/1.18/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/doc.go rename to generated/1.19/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/doc.go diff --git a/generated/1.18/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go b/generated/1.19/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/doc.go similarity index 100% rename from generated/1.18/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go rename to generated/1.19/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/doc.go diff --git a/generated/1.19/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go b/generated/1.19/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_clientsecret_client.go similarity index 60% rename from generated/1.19/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go rename to generated/1.19/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_clientsecret_client.go index 9430b71b..3a526ea6 100644 --- a/generated/1.19/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go +++ b/generated/1.19/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_clientsecret_client.go @@ -6,22 +6,22 @@ package fake import ( - v1alpha1 "go.pinniped.dev/generated/1.19/client/supervisor/clientset/versioned/typed/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.19/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1" rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" ) -type FakeOauthV1alpha1 struct { +type FakeClientsecretV1alpha1 struct { *testing.Fake } -func (c *FakeOauthV1alpha1) OIDCClients(namespace string) v1alpha1.OIDCClientInterface { - return &FakeOIDCClients{c, namespace} +func (c *FakeClientsecretV1alpha1) OIDCClientSecretRequests(namespace string) v1alpha1.OIDCClientSecretRequestInterface { + return &FakeOIDCClientSecretRequests{c, namespace} } // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeOauthV1alpha1) RESTClient() rest.Interface { +func (c *FakeClientsecretV1alpha1) RESTClient() rest.Interface { var ret *rest.RESTClient return ret } diff --git a/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go b/generated/1.19/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_oidcclientsecretrequest.go similarity index 79% rename from generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go rename to generated/1.19/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_oidcclientsecretrequest.go index 28997757..1fbf5f2c 100644 --- a/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go +++ b/generated/1.19/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_oidcclientsecretrequest.go @@ -8,7 +8,7 @@ package fake import ( "context" - v1alpha1 "go.pinniped.dev/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.19/apis/supervisor/clientsecret/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" testing "k8s.io/client-go/testing" @@ -16,13 +16,13 @@ import ( // FakeOIDCClientSecretRequests implements OIDCClientSecretRequestInterface type FakeOIDCClientSecretRequests struct { - Fake *FakeOauthV1alpha1 + Fake *FakeClientsecretV1alpha1 ns string } -var oidcclientsecretrequestsResource = schema.GroupVersionResource{Group: "oauth.virtual.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclientsecretrequests"} +var oidcclientsecretrequestsResource = schema.GroupVersionResource{Group: "clientsecret.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclientsecretrequests"} -var oidcclientsecretrequestsKind = schema.GroupVersionKind{Group: "oauth.virtual.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClientSecretRequest"} +var oidcclientsecretrequestsKind = schema.GroupVersionKind{Group: "clientsecret.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClientSecretRequest"} // Create takes the representation of a oIDCClientSecretRequest and creates it. Returns the server's representation of the oIDCClientSecretRequest, and an error, if there is any. func (c *FakeOIDCClientSecretRequests) Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (result *v1alpha1.OIDCClientSecretRequest, err error) { diff --git a/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go b/generated/1.19/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/generated_expansion.go similarity index 100% rename from generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go rename to generated/1.19/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/generated_expansion.go diff --git a/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go b/generated/1.19/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/oidcclientsecretrequest.go similarity index 86% rename from generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go rename to generated/1.19/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/oidcclientsecretrequest.go index c4382045..2487d180 100644 --- a/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go +++ b/generated/1.19/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/oidcclientsecretrequest.go @@ -8,8 +8,8 @@ package v1alpha1 import ( "context" - v1alpha1 "go.pinniped.dev/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1" - scheme "go.pinniped.dev/generated/1.18/client/supervisor/virtual/clientset/versioned/scheme" + v1alpha1 "go.pinniped.dev/generated/1.19/apis/supervisor/clientsecret/v1alpha1" + scheme "go.pinniped.dev/generated/1.19/client/supervisor/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" rest "k8s.io/client-go/rest" ) @@ -33,7 +33,7 @@ type oIDCClientSecretRequests struct { } // newOIDCClientSecretRequests returns a OIDCClientSecretRequests -func newOIDCClientSecretRequests(c *OauthV1alpha1Client, namespace string) *oIDCClientSecretRequests { +func newOIDCClientSecretRequests(c *ClientsecretV1alpha1Client, namespace string) *oIDCClientSecretRequests { return &oIDCClientSecretRequests{ client: c.RESTClient(), ns: namespace, diff --git a/generated/1.19/client/supervisor/clientset/versioned/typed/config/v1alpha1/config_client.go b/generated/1.19/client/supervisor/clientset/versioned/typed/config/v1alpha1/config_client.go index ecfa976c..b34ed0d7 100644 --- a/generated/1.19/client/supervisor/clientset/versioned/typed/config/v1alpha1/config_client.go +++ b/generated/1.19/client/supervisor/clientset/versioned/typed/config/v1alpha1/config_client.go @@ -14,6 +14,7 @@ import ( type ConfigV1alpha1Interface interface { RESTClient() rest.Interface FederationDomainsGetter + OIDCClientsGetter } // ConfigV1alpha1Client is used to interact with features provided by the config.supervisor.pinniped.dev group. @@ -25,6 +26,10 @@ func (c *ConfigV1alpha1Client) FederationDomains(namespace string) FederationDom return newFederationDomains(c, namespace) } +func (c *ConfigV1alpha1Client) OIDCClients(namespace string) OIDCClientInterface { + return newOIDCClients(c, namespace) +} + // NewForConfig creates a new ConfigV1alpha1Client for the given config. func NewForConfig(c *rest.Config) (*ConfigV1alpha1Client, error) { config := *c diff --git a/generated/1.19/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go b/generated/1.19/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go index c725f508..eb035c6e 100644 --- a/generated/1.19/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go +++ b/generated/1.19/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go @@ -19,6 +19,10 @@ func (c *FakeConfigV1alpha1) FederationDomains(namespace string) v1alpha1.Federa return &FakeFederationDomains{c, namespace} } +func (c *FakeConfigV1alpha1) OIDCClients(namespace string) v1alpha1.OIDCClientInterface { + return &FakeOIDCClients{c, namespace} +} + // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. func (c *FakeConfigV1alpha1) RESTClient() rest.Interface { diff --git a/generated/1.18/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclient.go b/generated/1.19/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_oidcclient.go similarity index 92% rename from generated/1.18/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclient.go rename to generated/1.19/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_oidcclient.go index a177ce4a..ce4d4348 100644 --- a/generated/1.18/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclient.go +++ b/generated/1.19/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_oidcclient.go @@ -8,7 +8,7 @@ package fake import ( "context" - v1alpha1 "go.pinniped.dev/generated/1.18/apis/supervisor/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.19/apis/supervisor/config/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -19,13 +19,13 @@ import ( // FakeOIDCClients implements OIDCClientInterface type FakeOIDCClients struct { - Fake *FakeOauthV1alpha1 + Fake *FakeConfigV1alpha1 ns string } -var oidcclientsResource = schema.GroupVersionResource{Group: "oauth.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclients"} +var oidcclientsResource = schema.GroupVersionResource{Group: "config.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclients"} -var oidcclientsKind = schema.GroupVersionKind{Group: "oauth.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClient"} +var oidcclientsKind = schema.GroupVersionKind{Group: "config.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClient"} // Get takes name of the oIDCClient, and returns the corresponding oIDCClient object, and an error if there is any. func (c *FakeOIDCClients) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.OIDCClient, err error) { diff --git a/generated/1.19/client/supervisor/clientset/versioned/typed/config/v1alpha1/generated_expansion.go b/generated/1.19/client/supervisor/clientset/versioned/typed/config/v1alpha1/generated_expansion.go index ba9c9173..35b9ee3d 100644 --- a/generated/1.19/client/supervisor/clientset/versioned/typed/config/v1alpha1/generated_expansion.go +++ b/generated/1.19/client/supervisor/clientset/versioned/typed/config/v1alpha1/generated_expansion.go @@ -6,3 +6,5 @@ package v1alpha1 type FederationDomainExpansion interface{} + +type OIDCClientExpansion interface{} diff --git a/generated/1.19/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oidcclient.go b/generated/1.19/client/supervisor/clientset/versioned/typed/config/v1alpha1/oidcclient.go similarity index 97% rename from generated/1.19/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oidcclient.go rename to generated/1.19/client/supervisor/clientset/versioned/typed/config/v1alpha1/oidcclient.go index 93cd5805..eff0aae4 100644 --- a/generated/1.19/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oidcclient.go +++ b/generated/1.19/client/supervisor/clientset/versioned/typed/config/v1alpha1/oidcclient.go @@ -9,7 +9,7 @@ import ( "context" "time" - v1alpha1 "go.pinniped.dev/generated/1.19/apis/supervisor/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.19/apis/supervisor/config/v1alpha1" scheme "go.pinniped.dev/generated/1.19/client/supervisor/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -44,7 +44,7 @@ type oIDCClients struct { } // newOIDCClients returns a OIDCClients -func newOIDCClients(c *OauthV1alpha1Client, namespace string) *oIDCClients { +func newOIDCClients(c *ConfigV1alpha1Client, namespace string) *oIDCClients { return &oIDCClients{ client: c.RESTClient(), ns: namespace, diff --git a/generated/1.19/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go b/generated/1.19/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go deleted file mode 100644 index 87d22ea9..00000000 --- a/generated/1.19/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -type OIDCClientExpansion interface{} diff --git a/generated/1.19/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go b/generated/1.19/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go deleted file mode 100644 index 0e347f19..00000000 --- a/generated/1.19/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1alpha1 "go.pinniped.dev/generated/1.19/apis/supervisor/oauth/v1alpha1" - "go.pinniped.dev/generated/1.19/client/supervisor/clientset/versioned/scheme" - rest "k8s.io/client-go/rest" -) - -type OauthV1alpha1Interface interface { - RESTClient() rest.Interface - OIDCClientsGetter -} - -// OauthV1alpha1Client is used to interact with features provided by the oauth.supervisor.pinniped.dev group. -type OauthV1alpha1Client struct { - restClient rest.Interface -} - -func (c *OauthV1alpha1Client) OIDCClients(namespace string) OIDCClientInterface { - return newOIDCClients(c, namespace) -} - -// NewForConfig creates a new OauthV1alpha1Client for the given config. -func NewForConfig(c *rest.Config) (*OauthV1alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &OauthV1alpha1Client{client}, nil -} - -// NewForConfigOrDie creates a new OauthV1alpha1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *OauthV1alpha1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new OauthV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *OauthV1alpha1Client { - return &OauthV1alpha1Client{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 *OauthV1alpha1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/generated/1.19/client/supervisor/informers/externalversions/config/v1alpha1/interface.go b/generated/1.19/client/supervisor/informers/externalversions/config/v1alpha1/interface.go index 33b72e12..76ca860c 100644 --- a/generated/1.19/client/supervisor/informers/externalversions/config/v1alpha1/interface.go +++ b/generated/1.19/client/supervisor/informers/externalversions/config/v1alpha1/interface.go @@ -13,6 +13,8 @@ import ( type Interface interface { // FederationDomains returns a FederationDomainInformer. FederationDomains() FederationDomainInformer + // OIDCClients returns a OIDCClientInformer. + OIDCClients() OIDCClientInformer } type version struct { @@ -30,3 +32,8 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList func (v *version) FederationDomains() FederationDomainInformer { return &federationDomainInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } + +// OIDCClients returns a OIDCClientInformer. +func (v *version) OIDCClients() OIDCClientInformer { + return &oIDCClientInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} diff --git a/generated/1.19/client/supervisor/informers/externalversions/oauth/v1alpha1/oidcclient.go b/generated/1.19/client/supervisor/informers/externalversions/config/v1alpha1/oidcclient.go similarity index 88% rename from generated/1.19/client/supervisor/informers/externalversions/oauth/v1alpha1/oidcclient.go rename to generated/1.19/client/supervisor/informers/externalversions/config/v1alpha1/oidcclient.go index 749b0977..f1e4d5b9 100644 --- a/generated/1.19/client/supervisor/informers/externalversions/oauth/v1alpha1/oidcclient.go +++ b/generated/1.19/client/supervisor/informers/externalversions/config/v1alpha1/oidcclient.go @@ -9,10 +9,10 @@ import ( "context" time "time" - oauthv1alpha1 "go.pinniped.dev/generated/1.19/apis/supervisor/oauth/v1alpha1" + configv1alpha1 "go.pinniped.dev/generated/1.19/apis/supervisor/config/v1alpha1" versioned "go.pinniped.dev/generated/1.19/client/supervisor/clientset/versioned" internalinterfaces "go.pinniped.dev/generated/1.19/client/supervisor/informers/externalversions/internalinterfaces" - v1alpha1 "go.pinniped.dev/generated/1.19/client/supervisor/listers/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.19/client/supervisor/listers/config/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -49,16 +49,16 @@ func NewFilteredOIDCClientInformer(client versioned.Interface, namespace string, if tweakListOptions != nil { tweakListOptions(&options) } - return client.OauthV1alpha1().OIDCClients(namespace).List(context.TODO(), options) + return client.ConfigV1alpha1().OIDCClients(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.OauthV1alpha1().OIDCClients(namespace).Watch(context.TODO(), options) + return client.ConfigV1alpha1().OIDCClients(namespace).Watch(context.TODO(), options) }, }, - &oauthv1alpha1.OIDCClient{}, + &configv1alpha1.OIDCClient{}, resyncPeriod, indexers, ) @@ -69,7 +69,7 @@ func (f *oIDCClientInformer) defaultInformer(client versioned.Interface, resyncP } func (f *oIDCClientInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&oauthv1alpha1.OIDCClient{}, f.defaultInformer) + return f.factory.InformerFor(&configv1alpha1.OIDCClient{}, f.defaultInformer) } func (f *oIDCClientInformer) Lister() v1alpha1.OIDCClientLister { diff --git a/generated/1.19/client/supervisor/informers/externalversions/factory.go b/generated/1.19/client/supervisor/informers/externalversions/factory.go index 90fff5ef..0ad18aae 100644 --- a/generated/1.19/client/supervisor/informers/externalversions/factory.go +++ b/generated/1.19/client/supervisor/informers/externalversions/factory.go @@ -14,7 +14,6 @@ import ( config "go.pinniped.dev/generated/1.19/client/supervisor/informers/externalversions/config" idp "go.pinniped.dev/generated/1.19/client/supervisor/informers/externalversions/idp" internalinterfaces "go.pinniped.dev/generated/1.19/client/supervisor/informers/externalversions/internalinterfaces" - oauth "go.pinniped.dev/generated/1.19/client/supervisor/informers/externalversions/oauth" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -163,7 +162,6 @@ type SharedInformerFactory interface { Config() config.Interface IDP() idp.Interface - Oauth() oauth.Interface } func (f *sharedInformerFactory) Config() config.Interface { @@ -173,7 +171,3 @@ func (f *sharedInformerFactory) Config() config.Interface { func (f *sharedInformerFactory) IDP() idp.Interface { return idp.New(f, f.namespace, f.tweakListOptions) } - -func (f *sharedInformerFactory) Oauth() oauth.Interface { - return oauth.New(f, f.namespace, f.tweakListOptions) -} diff --git a/generated/1.19/client/supervisor/informers/externalversions/generic.go b/generated/1.19/client/supervisor/informers/externalversions/generic.go index ffc852ca..6b246a62 100644 --- a/generated/1.19/client/supervisor/informers/externalversions/generic.go +++ b/generated/1.19/client/supervisor/informers/externalversions/generic.go @@ -10,7 +10,6 @@ import ( v1alpha1 "go.pinniped.dev/generated/1.19/apis/supervisor/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.19/apis/supervisor/idp/v1alpha1" - oauthv1alpha1 "go.pinniped.dev/generated/1.19/apis/supervisor/oauth/v1alpha1" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" ) @@ -44,6 +43,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource // Group=config.supervisor.pinniped.dev, Version=v1alpha1 case v1alpha1.SchemeGroupVersion.WithResource("federationdomains"): return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1alpha1().FederationDomains().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("oidcclients"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1alpha1().OIDCClients().Informer()}, nil // Group=idp.supervisor.pinniped.dev, Version=v1alpha1 case idpv1alpha1.SchemeGroupVersion.WithResource("activedirectoryidentityproviders"): @@ -53,10 +54,6 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource case idpv1alpha1.SchemeGroupVersion.WithResource("oidcidentityproviders"): return &genericInformer{resource: resource.GroupResource(), informer: f.IDP().V1alpha1().OIDCIdentityProviders().Informer()}, nil - // Group=oauth.supervisor.pinniped.dev, Version=v1alpha1 - case oauthv1alpha1.SchemeGroupVersion.WithResource("oidcclients"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Oauth().V1alpha1().OIDCClients().Informer()}, nil - } return nil, fmt.Errorf("no informer found for %v", resource) diff --git a/generated/1.19/client/supervisor/informers/externalversions/oauth/interface.go b/generated/1.19/client/supervisor/informers/externalversions/oauth/interface.go deleted file mode 100644 index 2b6d2943..00000000 --- a/generated/1.19/client/supervisor/informers/externalversions/oauth/interface.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by informer-gen. DO NOT EDIT. - -package oauth - -import ( - internalinterfaces "go.pinniped.dev/generated/1.19/client/supervisor/informers/externalversions/internalinterfaces" - v1alpha1 "go.pinniped.dev/generated/1.19/client/supervisor/informers/externalversions/oauth/v1alpha1" -) - -// Interface provides access to each of this group's versions. -type Interface interface { - // V1alpha1 provides access to shared informers for resources in V1alpha1. - V1alpha1() v1alpha1.Interface -} - -type group struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// V1alpha1 returns a new v1alpha1.Interface. -func (g *group) V1alpha1() v1alpha1.Interface { - return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) -} diff --git a/generated/1.19/client/supervisor/informers/externalversions/oauth/v1alpha1/interface.go b/generated/1.19/client/supervisor/informers/externalversions/oauth/v1alpha1/interface.go deleted file mode 100644 index 3db762a4..00000000 --- a/generated/1.19/client/supervisor/informers/externalversions/oauth/v1alpha1/interface.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - internalinterfaces "go.pinniped.dev/generated/1.19/client/supervisor/informers/externalversions/internalinterfaces" -) - -// Interface provides access to all the informers in this group version. -type Interface interface { - // OIDCClients returns a OIDCClientInformer. - OIDCClients() OIDCClientInformer -} - -type version struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// OIDCClients returns a OIDCClientInformer. -func (v *version) OIDCClients() OIDCClientInformer { - return &oIDCClientInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} diff --git a/generated/1.19/client/supervisor/listers/config/v1alpha1/expansion_generated.go b/generated/1.19/client/supervisor/listers/config/v1alpha1/expansion_generated.go index d59892c4..bda2f20e 100644 --- a/generated/1.19/client/supervisor/listers/config/v1alpha1/expansion_generated.go +++ b/generated/1.19/client/supervisor/listers/config/v1alpha1/expansion_generated.go @@ -12,3 +12,11 @@ type FederationDomainListerExpansion interface{} // FederationDomainNamespaceListerExpansion allows custom methods to be added to // FederationDomainNamespaceLister. type FederationDomainNamespaceListerExpansion interface{} + +// OIDCClientListerExpansion allows custom methods to be added to +// OIDCClientLister. +type OIDCClientListerExpansion interface{} + +// OIDCClientNamespaceListerExpansion allows custom methods to be added to +// OIDCClientNamespaceLister. +type OIDCClientNamespaceListerExpansion interface{} diff --git a/generated/1.21/client/supervisor/listers/oauth/v1alpha1/oidcclient.go b/generated/1.19/client/supervisor/listers/config/v1alpha1/oidcclient.go similarity index 97% rename from generated/1.21/client/supervisor/listers/oauth/v1alpha1/oidcclient.go rename to generated/1.19/client/supervisor/listers/config/v1alpha1/oidcclient.go index ac6047cd..db99f57c 100644 --- a/generated/1.21/client/supervisor/listers/oauth/v1alpha1/oidcclient.go +++ b/generated/1.19/client/supervisor/listers/config/v1alpha1/oidcclient.go @@ -6,7 +6,7 @@ package v1alpha1 import ( - v1alpha1 "go.pinniped.dev/generated/1.21/apis/supervisor/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.19/apis/supervisor/config/v1alpha1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" diff --git a/generated/1.19/client/supervisor/listers/oauth/v1alpha1/expansion_generated.go b/generated/1.19/client/supervisor/listers/oauth/v1alpha1/expansion_generated.go deleted file mode 100644 index c19310da..00000000 --- a/generated/1.19/client/supervisor/listers/oauth/v1alpha1/expansion_generated.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha1 - -// OIDCClientListerExpansion allows custom methods to be added to -// OIDCClientLister. -type OIDCClientListerExpansion interface{} - -// OIDCClientNamespaceListerExpansion allows custom methods to be added to -// OIDCClientNamespaceLister. -type OIDCClientNamespaceListerExpansion interface{} diff --git a/generated/1.19/client/supervisor/virtual/clientset/versioned/clientset.go b/generated/1.19/client/supervisor/virtual/clientset/versioned/clientset.go deleted file mode 100644 index b4890903..00000000 --- a/generated/1.19/client/supervisor/virtual/clientset/versioned/clientset.go +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package versioned - -import ( - "fmt" - - oauthv1alpha1 "go.pinniped.dev/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" - discovery "k8s.io/client-go/discovery" - rest "k8s.io/client-go/rest" - flowcontrol "k8s.io/client-go/util/flowcontrol" -) - -type Interface interface { - Discovery() discovery.DiscoveryInterface - OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface -} - -// Clientset contains the clients for groups. Each group has exactly one -// version included in a Clientset. -type Clientset struct { - *discovery.DiscoveryClient - oauthV1alpha1 *oauthv1alpha1.OauthV1alpha1Client -} - -// OauthV1alpha1 retrieves the OauthV1alpha1Client -func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { - return c.oauthV1alpha1 -} - -// Discovery retrieves the DiscoveryClient -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - if c == nil { - return nil - } - return c.DiscoveryClient -} - -// NewForConfig creates a new Clientset for the given config. -// If config's RateLimiter is not set and QPS and Burst are acceptable, -// NewForConfig will generate a rate-limiter in configShallowCopy. -func NewForConfig(c *rest.Config) (*Clientset, error) { - configShallowCopy := *c - if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { - if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") - } - configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) - } - var cs Clientset - var err error - cs.oauthV1alpha1, err = oauthv1alpha1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - - cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - return &cs, nil -} - -// NewForConfigOrDie creates a new Clientset for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *Clientset { - var cs Clientset - cs.oauthV1alpha1 = oauthv1alpha1.NewForConfigOrDie(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) - return &cs -} - -// New creates a new Clientset for the given RESTClient. -func New(c rest.Interface) *Clientset { - var cs Clientset - cs.oauthV1alpha1 = oauthv1alpha1.New(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClient(c) - return &cs -} diff --git a/generated/1.19/client/supervisor/virtual/clientset/versioned/doc.go b/generated/1.19/client/supervisor/virtual/clientset/versioned/doc.go deleted file mode 100644 index 5dc02e6e..00000000 --- a/generated/1.19/client/supervisor/virtual/clientset/versioned/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated clientset. -package versioned diff --git a/generated/1.19/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go b/generated/1.19/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go deleted file mode 100644 index 3686b807..00000000 --- a/generated/1.19/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - clientset "go.pinniped.dev/generated/1.19/client/supervisor/virtual/clientset/versioned" - oauthv1alpha1 "go.pinniped.dev/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" - fakeoauthv1alpha1 "go.pinniped.dev/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/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" -) - -// NewSimpleClientset returns a clientset that will respond with the provided objects. -// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, -// without applying any validations and/or defaults. It shouldn't be considered a replacement -// for a real clientset and is mostly useful in simple unit tests. -func NewSimpleClientset(objects ...runtime.Object) *Clientset { - o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) - for _, obj := range objects { - if err := o.Add(obj); err != nil { - panic(err) - } - } - - cs := &Clientset{tracker: o} - cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} - cs.AddReactor("*", "*", testing.ObjectReaction(o)) - cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { - gvr := action.GetResource() - ns := action.GetNamespace() - watch, err := o.Watch(gvr, ns) - if err != nil { - return false, nil, err - } - return true, watch, nil - }) - - return cs -} - -// Clientset implements clientset.Interface. Meant to be embedded into a -// struct to get a default implementation. This makes faking out just the method -// you want to test easier. -type Clientset struct { - testing.Fake - discovery *fakediscovery.FakeDiscovery - tracker testing.ObjectTracker -} - -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - return c.discovery -} - -func (c *Clientset) Tracker() testing.ObjectTracker { - return c.tracker -} - -var _ clientset.Interface = &Clientset{} - -// OauthV1alpha1 retrieves the OauthV1alpha1Client -func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { - return &fakeoauthv1alpha1.FakeOauthV1alpha1{Fake: &c.Fake} -} diff --git a/generated/1.19/client/supervisor/virtual/clientset/versioned/fake/doc.go b/generated/1.19/client/supervisor/virtual/clientset/versioned/fake/doc.go deleted file mode 100644 index 7c9538fd..00000000 --- a/generated/1.19/client/supervisor/virtual/clientset/versioned/fake/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated fake clientset. -package fake diff --git a/generated/1.19/client/supervisor/virtual/clientset/versioned/fake/register.go b/generated/1.19/client/supervisor/virtual/clientset/versioned/fake/register.go deleted file mode 100644 index bec66892..00000000 --- a/generated/1.19/client/supervisor/virtual/clientset/versioned/fake/register.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - oauthv1alpha1 "go.pinniped.dev/generated/1.19/apis/supervisor/virtual/oauth/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" -) - -var scheme = runtime.NewScheme() -var codecs = serializer.NewCodecFactory(scheme) - -var localSchemeBuilder = runtime.SchemeBuilder{ - oauthv1alpha1.AddToScheme, -} - -// AddToScheme adds all types of this clientset into the given scheme. This allows composition -// of clientsets, like in: -// -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) -// -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) -// -// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types -// correctly. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(scheme)) -} diff --git a/generated/1.19/client/supervisor/virtual/clientset/versioned/scheme/doc.go b/generated/1.19/client/supervisor/virtual/clientset/versioned/scheme/doc.go deleted file mode 100644 index cc02f1d3..00000000 --- a/generated/1.19/client/supervisor/virtual/clientset/versioned/scheme/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// This package contains the scheme of the automatically generated clientset. -package scheme diff --git a/generated/1.19/client/supervisor/virtual/clientset/versioned/scheme/register.go b/generated/1.19/client/supervisor/virtual/clientset/versioned/scheme/register.go deleted file mode 100644 index da92b144..00000000 --- a/generated/1.19/client/supervisor/virtual/clientset/versioned/scheme/register.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package scheme - -import ( - oauthv1alpha1 "go.pinniped.dev/generated/1.19/apis/supervisor/virtual/oauth/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" -) - -var Scheme = runtime.NewScheme() -var Codecs = serializer.NewCodecFactory(Scheme) -var ParameterCodec = runtime.NewParameterCodec(Scheme) -var localSchemeBuilder = runtime.SchemeBuilder{ - oauthv1alpha1.AddToScheme, -} - -// AddToScheme adds all types of this clientset into the given scheme. This allows composition -// of clientsets, like in: -// -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) -// -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) -// -// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types -// correctly. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(Scheme)) -} diff --git a/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go b/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go deleted file mode 100644 index 0220e89e..00000000 --- a/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1alpha1 "go.pinniped.dev/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" -) - -type FakeOauthV1alpha1 struct { - *testing.Fake -} - -func (c *FakeOauthV1alpha1) OIDCClientSecretRequests(namespace string) v1alpha1.OIDCClientSecretRequestInterface { - return &FakeOIDCClientSecretRequests{c, namespace} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeOauthV1alpha1) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/generated/1.19/crds/oauth.supervisor.pinniped.dev_oidcclients.yaml b/generated/1.19/crds/config.supervisor.pinniped.dev_oidcclients.yaml similarity index 98% rename from generated/1.19/crds/oauth.supervisor.pinniped.dev_oidcclients.yaml rename to generated/1.19/crds/config.supervisor.pinniped.dev_oidcclients.yaml index 589a9154..4efa445e 100644 --- a/generated/1.19/crds/oauth.supervisor.pinniped.dev_oidcclients.yaml +++ b/generated/1.19/crds/config.supervisor.pinniped.dev_oidcclients.yaml @@ -5,9 +5,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null - name: oidcclients.oauth.supervisor.pinniped.dev + name: oidcclients.config.supervisor.pinniped.dev spec: - group: oauth.supervisor.pinniped.dev + group: config.supervisor.pinniped.dev names: categories: - pinniped diff --git a/generated/1.20/README.adoc b/generated/1.20/README.adoc index f58d5ad8..958b952c 100644 --- a/generated/1.20/README.adoc +++ b/generated/1.20/README.adoc @@ -6,15 +6,14 @@ .Packages - xref:{anchor_prefix}-authentication-concierge-pinniped-dev-v1alpha1[$$authentication.concierge.pinniped.dev/v1alpha1$$] +- xref:{anchor_prefix}-clientsecret-supervisor-pinniped-dev-clientsecret[$$clientsecret.supervisor.pinniped.dev/clientsecret$$] +- xref:{anchor_prefix}-clientsecret-supervisor-pinniped-dev-v1alpha1[$$clientsecret.supervisor.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-config-concierge-pinniped-dev-v1alpha1[$$config.concierge.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-config-supervisor-pinniped-dev-v1alpha1[$$config.supervisor.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-identity-concierge-pinniped-dev-identity[$$identity.concierge.pinniped.dev/identity$$] - xref:{anchor_prefix}-identity-concierge-pinniped-dev-v1alpha1[$$identity.concierge.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-idp-supervisor-pinniped-dev-v1alpha1[$$idp.supervisor.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-login-concierge-pinniped-dev-v1alpha1[$$login.concierge.pinniped.dev/v1alpha1$$] -- xref:{anchor_prefix}-oauth-supervisor-pinniped-dev-v1alpha1[$$oauth.supervisor.pinniped.dev/v1alpha1$$] -- xref:{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-oauth[$$oauth.virtual.supervisor.pinniped.dev/oauth$$] -- xref:{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-v1alpha1[$$oauth.virtual.supervisor.pinniped.dev/v1alpha1$$] [id="{anchor_prefix}-authentication-concierge-pinniped-dev-v1alpha1"] @@ -213,6 +212,98 @@ Status of a webhook authenticator. +[id="{anchor_prefix}-clientsecret-supervisor-pinniped-dev-clientsecret"] +=== clientsecret.supervisor.pinniped.dev/clientsecret + +Package clientsecret is the internal version of the Pinniped client secret API. + + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-clientsecret-oidcclientsecretrequestspec"] +==== OIDCClientSecretRequestSpec + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-clientsecret-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generateNewSecret`* __boolean__ | +| *`revokeOldSecrets`* __boolean__ | +|=== + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-clientsecret-oidcclientsecretrequeststatus"] +==== OIDCClientSecretRequestStatus + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-clientsecret-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generatedSecret`* __string__ | +| *`totalClientSecrets`* __integer__ | +|=== + + + +[id="{anchor_prefix}-clientsecret-supervisor-pinniped-dev-v1alpha1"] +=== clientsecret.supervisor.pinniped.dev/v1alpha1 + +Package v1alpha1 is the v1alpha1 version of the Pinniped client secret API. + + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequestspec"] +==== OIDCClientSecretRequestSpec + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generateNewSecret`* __boolean__ | +| *`revokeOldSecrets`* __boolean__ | +|=== + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequeststatus"] +==== OIDCClientSecretRequestStatus + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generatedSecret`* __string__ | +| *`totalClientSecrets`* __integer__ | +|=== + + + [id="{anchor_prefix}-config-concierge-pinniped-dev-v1alpha1"] === config.concierge.pinniped.dev/v1alpha1 @@ -546,6 +637,51 @@ FederationDomainTLSSpec is a struct that describes the TLS configuration for an |=== +[id="{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-config-v1alpha1-oidcclient"] +==== OIDCClient + +OIDCClient describes the configuration of an OIDC client. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-config-v1alpha1-oidcclientlist[$$OIDCClientList$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.2/#objectmeta-v1-meta[$$ObjectMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. + +| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-config-v1alpha1-oidcclientspec[$$OIDCClientSpec$$]__ | Spec of the OIDC client. +| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-config-v1alpha1-oidcclientstatus[$$OIDCClientStatus$$]__ | Status of the OIDC client. +|=== + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-config-v1alpha1-oidcclientspec"] +==== OIDCClientSpec + +OIDCClientSpec is a struct that describes an OIDC Client. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-config-v1alpha1-oidcclient[$$OIDCClient$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`allowedRedirectURIs`* __string array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be https, unless it is a loopback. +| *`allowedGrantTypes`* __GrantType array__ | allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this client. + Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. +| *`allowedScopes`* __Scope array__ | allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. + Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. +|=== + + + + [id="{anchor_prefix}-identity-concierge-pinniped-dev-identity"] === identity.concierge.pinniped.dev/identity @@ -1335,148 +1471,3 @@ TokenCredentialRequestStatus is the status of a TokenCredentialRequest, returned |=== - -[id="{anchor_prefix}-oauth-supervisor-pinniped-dev-v1alpha1"] -=== oauth.supervisor.pinniped.dev/v1alpha1 - -Package v1alpha1 is the v1alpha1 version of the Pinniped supervisor oauth API. - - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-oauth-v1alpha1-oidcclient"] -==== OIDCClient - -OIDCClient describes the configuration of an OIDC client. - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-oauth-v1alpha1-oidcclientlist[$$OIDCClientList$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.2/#objectmeta-v1-meta[$$ObjectMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. - -| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-oauth-v1alpha1-oidcclientspec[$$OIDCClientSpec$$]__ | Spec of the OIDC client. -| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-oauth-v1alpha1-oidcclientstatus[$$OIDCClientStatus$$]__ | Status of the OIDC client. -|=== - - - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-oauth-v1alpha1-oidcclientspec"] -==== OIDCClientSpec - -OIDCClientSpec is a struct that describes an OIDC Client. - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-oauth-v1alpha1-oidcclient[$$OIDCClient$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`allowedRedirectURIs`* __string array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be https, unless it is a loopback. -| *`allowedGrantTypes`* __GrantType array__ | allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. -| *`allowedScopes`* __Scope array__ | allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. -|=== - - - - - -[id="{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-oauth"] -=== oauth.virtual.supervisor.pinniped.dev/oauth - -Package oauth is the internal version of the Pinniped virtual oauth API. - - - - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-virtual-oauth-oidcclientsecretrequestspec"] -==== OIDCClientSecretRequestSpec - - - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-virtual-oauth-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`generateNewSecret`* __boolean__ | -| *`revokeOldSecrets`* __boolean__ | -|=== - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-virtual-oauth-oidcclientsecretrequeststatus"] -==== OIDCClientSecretRequestStatus - - - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-virtual-oauth-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`generatedSecret`* __string__ | -| *`totalClientSecrets`* __integer__ | -|=== - - - -[id="{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-v1alpha1"] -=== oauth.virtual.supervisor.pinniped.dev/v1alpha1 - -Package v1alpha1 is the v1alpha1 version of the Pinniped virtual oauth API. - - - - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequestspec"] -==== OIDCClientSecretRequestSpec - - - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`generateNewSecret`* __boolean__ | -| *`revokeOldSecrets`* __boolean__ | -|=== - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequeststatus"] -==== OIDCClientSecretRequestStatus - - - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`generatedSecret`* __string__ | -| *`totalClientSecrets`* __integer__ | -|=== - - diff --git a/generated/1.20/apis/supervisor/clientsecret/doc.go b/generated/1.20/apis/supervisor/clientsecret/doc.go new file mode 100644 index 00000000..c536bc75 --- /dev/null +++ b/generated/1.20/apis/supervisor/clientsecret/doc.go @@ -0,0 +1,8 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// +k8s:deepcopy-gen=package +// +groupName=clientsecret.supervisor.pinniped.dev + +// Package clientsecret is the internal version of the Pinniped client secret API. +package clientsecret diff --git a/generated/1.20/apis/supervisor/virtual/oauth/register.go b/generated/1.20/apis/supervisor/clientsecret/register.go similarity index 93% rename from generated/1.20/apis/supervisor/virtual/oauth/register.go rename to generated/1.20/apis/supervisor/clientsecret/register.go index a238d85f..4a1c0173 100644 --- a/generated/1.20/apis/supervisor/virtual/oauth/register.go +++ b/generated/1.20/apis/supervisor/clientsecret/register.go @@ -1,14 +1,14 @@ // Copyright 2022 the Pinniped contributors. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -package oauth +package clientsecret import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) -const GroupName = "oauth.virtual.supervisor.pinniped.dev" +const GroupName = "clientsecret.supervisor.pinniped.dev" // SchemeGroupVersion is group version used to register these objects. var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} diff --git a/generated/1.18/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go b/generated/1.20/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go similarity index 97% rename from generated/1.18/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go rename to generated/1.20/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go index ac54a93c..7fd1eb65 100644 --- a/generated/1.18/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go +++ b/generated/1.20/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go @@ -1,7 +1,7 @@ // Copyright 2022 the Pinniped contributors. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 -package oauth +package clientsecret import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/conversion.go b/generated/1.20/apis/supervisor/clientsecret/v1alpha1/conversion.go similarity index 100% rename from generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/conversion.go rename to generated/1.20/apis/supervisor/clientsecret/v1alpha1/conversion.go diff --git a/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/defaults.go b/generated/1.20/apis/supervisor/clientsecret/v1alpha1/defaults.go similarity index 100% rename from generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/defaults.go rename to generated/1.20/apis/supervisor/clientsecret/v1alpha1/defaults.go diff --git a/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/doc.go b/generated/1.20/apis/supervisor/clientsecret/v1alpha1/doc.go similarity index 64% rename from generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/doc.go rename to generated/1.20/apis/supervisor/clientsecret/v1alpha1/doc.go index 009dec5a..2c270252 100644 --- a/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/doc.go +++ b/generated/1.20/apis/supervisor/clientsecret/v1alpha1/doc.go @@ -3,9 +3,9 @@ // +k8s:openapi-gen=true // +k8s:deepcopy-gen=package -// +k8s:conversion-gen=go.pinniped.dev/generated/1.20/apis/supervisor/virtual/oauth +// +k8s:conversion-gen=go.pinniped.dev/generated/1.20/apis/supervisor/clientsecret // +k8s:defaulter-gen=TypeMeta -// +groupName=oauth.virtual.supervisor.pinniped.dev +// +groupName=clientsecret.supervisor.pinniped.dev -// Package v1alpha1 is the v1alpha1 version of the Pinniped virtual oauth API. +// Package v1alpha1 is the v1alpha1 version of the Pinniped client secret API. package v1alpha1 diff --git a/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/register.go b/generated/1.20/apis/supervisor/clientsecret/v1alpha1/register.go similarity index 95% rename from generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/register.go rename to generated/1.20/apis/supervisor/clientsecret/v1alpha1/register.go index ecc75a08..49602125 100644 --- a/generated/1.17/apis/supervisor/virtual/oauth/v1alpha1/register.go +++ b/generated/1.20/apis/supervisor/clientsecret/v1alpha1/register.go @@ -9,7 +9,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" ) -const GroupName = "oauth.virtual.supervisor.pinniped.dev" +const GroupName = "clientsecret.supervisor.pinniped.dev" // SchemeGroupVersion is group version used to register these objects. var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} diff --git a/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go b/generated/1.20/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go similarity index 100% rename from generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go rename to generated/1.20/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go diff --git a/generated/1.20/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go b/generated/1.20/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go new file mode 100644 index 00000000..f33c9a56 --- /dev/null +++ b/generated/1.20/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go @@ -0,0 +1,131 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + clientsecret "go.pinniped.dev/generated/1.20/apis/supervisor/clientsecret" + 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((*OIDCClientSecretRequest)(nil), (*clientsecret.OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest(a.(*OIDCClientSecretRequest), b.(*clientsecret.OIDCClientSecretRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientsecret.OIDCClientSecretRequest)(nil), (*OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(a.(*clientsecret.OIDCClientSecretRequest), b.(*OIDCClientSecretRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestSpec)(nil), (*clientsecret.OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(a.(*OIDCClientSecretRequestSpec), b.(*clientsecret.OIDCClientSecretRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientsecret.OIDCClientSecretRequestSpec)(nil), (*OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(a.(*clientsecret.OIDCClientSecretRequestSpec), b.(*OIDCClientSecretRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestStatus)(nil), (*clientsecret.OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(a.(*OIDCClientSecretRequestStatus), b.(*clientsecret.OIDCClientSecretRequestStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientsecret.OIDCClientSecretRequestStatus)(nil), (*OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(a.(*clientsecret.OIDCClientSecretRequestStatus), b.(*OIDCClientSecretRequestStatus), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *clientsecret.OIDCClientSecretRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *clientsecret.OIDCClientSecretRequest, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest(in, out, s) +} + +func autoConvert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *clientsecret.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest is an autogenerated conversion function. +func Convert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *clientsecret.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { + return autoConvert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in, out, s) +} + +func autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *clientsecret.OIDCClientSecretRequestSpec, s conversion.Scope) error { + out.GenerateNewSecret = in.GenerateNewSecret + out.RevokeOldSecrets = in.RevokeOldSecrets + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *clientsecret.OIDCClientSecretRequestSpec, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(in, out, s) +} + +func autoConvert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *clientsecret.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { + out.GenerateNewSecret = in.GenerateNewSecret + out.RevokeOldSecrets = in.RevokeOldSecrets + return nil +} + +// Convert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec is an autogenerated conversion function. +func Convert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *clientsecret.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { + return autoConvert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in, out, s) +} + +func autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *clientsecret.OIDCClientSecretRequestStatus, s conversion.Scope) error { + out.GeneratedSecret = in.GeneratedSecret + out.TotalClientSecrets = in.TotalClientSecrets + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *clientsecret.OIDCClientSecretRequestStatus, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(in, out, s) +} + +func autoConvert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *clientsecret.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { + out.GeneratedSecret = in.GeneratedSecret + out.TotalClientSecrets = in.TotalClientSecrets + return nil +} + +// Convert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus is an autogenerated conversion function. +func Convert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *clientsecret.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { + return autoConvert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in, out, s) +} diff --git a/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go b/generated/1.20/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go similarity index 100% rename from generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go rename to generated/1.20/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go diff --git a/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go b/generated/1.20/apis/supervisor/clientsecret/v1alpha1/zz_generated.defaults.go similarity index 100% rename from generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go rename to generated/1.20/apis/supervisor/clientsecret/v1alpha1/zz_generated.defaults.go diff --git a/generated/1.18/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go b/generated/1.20/apis/supervisor/clientsecret/zz_generated.deepcopy.go similarity index 99% rename from generated/1.18/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go rename to generated/1.20/apis/supervisor/clientsecret/zz_generated.deepcopy.go index 24b58e7b..e0dc7d68 100644 --- a/generated/1.18/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go +++ b/generated/1.20/apis/supervisor/clientsecret/zz_generated.deepcopy.go @@ -6,7 +6,7 @@ // Code generated by deepcopy-gen. DO NOT EDIT. -package oauth +package clientsecret import ( runtime "k8s.io/apimachinery/pkg/runtime" diff --git a/generated/1.20/apis/supervisor/config/v1alpha1/register.go b/generated/1.20/apis/supervisor/config/v1alpha1/register.go index 69045298..54c51699 100644 --- a/generated/1.20/apis/supervisor/config/v1alpha1/register.go +++ b/generated/1.20/apis/supervisor/config/v1alpha1/register.go @@ -32,6 +32,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &FederationDomain{}, &FederationDomainList{}, + &OIDCClient{}, + &OIDCClientList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/generated/1.20/apis/supervisor/oauth/v1alpha1/types_oidcclient.go b/generated/1.20/apis/supervisor/config/v1alpha1/types_oidcclient.go similarity index 100% rename from generated/1.20/apis/supervisor/oauth/v1alpha1/types_oidcclient.go rename to generated/1.20/apis/supervisor/config/v1alpha1/types_oidcclient.go diff --git a/generated/1.20/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go b/generated/1.20/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go index 856b8988..a55d88e7 100644 --- a/generated/1.20/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go +++ b/generated/1.20/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go @@ -150,3 +150,111 @@ func (in *FederationDomainTLSSpec) DeepCopy() *FederationDomainTLSSpec { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClient) DeepCopyInto(out *OIDCClient) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClient. +func (in *OIDCClient) DeepCopy() *OIDCClient { + if in == nil { + return nil + } + out := new(OIDCClient) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClient) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientList) DeepCopyInto(out *OIDCClientList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OIDCClient, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientList. +func (in *OIDCClientList) DeepCopy() *OIDCClientList { + if in == nil { + return nil + } + out := new(OIDCClientList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSpec) DeepCopyInto(out *OIDCClientSpec) { + *out = *in + if in.AllowedRedirectURIs != nil { + in, out := &in.AllowedRedirectURIs, &out.AllowedRedirectURIs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.AllowedGrantTypes != nil { + in, out := &in.AllowedGrantTypes, &out.AllowedGrantTypes + *out = make([]GrantType, len(*in)) + copy(*out, *in) + } + if in.AllowedScopes != nil { + in, out := &in.AllowedScopes, &out.AllowedScopes + *out = make([]Scope, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSpec. +func (in *OIDCClientSpec) DeepCopy() *OIDCClientSpec { + if in == nil { + return nil + } + out := new(OIDCClientSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientStatus) DeepCopyInto(out *OIDCClientStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientStatus. +func (in *OIDCClientStatus) DeepCopy() *OIDCClientStatus { + if in == nil { + return nil + } + out := new(OIDCClientStatus) + in.DeepCopyInto(out) + return out +} diff --git a/generated/1.20/apis/supervisor/oauth/v1alpha1/doc.go b/generated/1.20/apis/supervisor/oauth/v1alpha1/doc.go deleted file mode 100644 index 75580481..00000000 --- a/generated/1.20/apis/supervisor/oauth/v1alpha1/doc.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package -// +k8s:defaulter-gen=TypeMeta -// +groupName=oauth.supervisor.pinniped.dev - -// Package v1alpha1 is the v1alpha1 version of the Pinniped supervisor oauth API. -package v1alpha1 diff --git a/generated/1.20/apis/supervisor/oauth/v1alpha1/register.go b/generated/1.20/apis/supervisor/oauth/v1alpha1/register.go deleted file mode 100644 index 37ae1fbf..00000000 --- a/generated/1.20/apis/supervisor/oauth/v1alpha1/register.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const GroupName = "oauth.supervisor.pinniped.dev" - -// SchemeGroupVersion is group version used to register these objects. -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} - -var ( - SchemeBuilder runtime.SchemeBuilder - localSchemeBuilder = &SchemeBuilder - AddToScheme = localSchemeBuilder.AddToScheme -) - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addKnownTypes) -} - -// Adds the list of known types to the given scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &OIDCClient{}, - &OIDCClientList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} - -// Resource takes an unqualified resource and returns a Group qualified GroupResource. -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} diff --git a/generated/1.20/apis/supervisor/oauth/v1alpha1/zz_generated.deepcopy.go b/generated/1.20/apis/supervisor/oauth/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index 1aba8aea..00000000 --- a/generated/1.20/apis/supervisor/oauth/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,121 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClient) DeepCopyInto(out *OIDCClient) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClient. -func (in *OIDCClient) DeepCopy() *OIDCClient { - if in == nil { - return nil - } - out := new(OIDCClient) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OIDCClient) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientList) DeepCopyInto(out *OIDCClientList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]OIDCClient, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientList. -func (in *OIDCClientList) DeepCopy() *OIDCClientList { - if in == nil { - return nil - } - out := new(OIDCClientList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OIDCClientList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientSpec) DeepCopyInto(out *OIDCClientSpec) { - *out = *in - if in.AllowedRedirectURIs != nil { - in, out := &in.AllowedRedirectURIs, &out.AllowedRedirectURIs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.AllowedGrantTypes != nil { - in, out := &in.AllowedGrantTypes, &out.AllowedGrantTypes - *out = make([]GrantType, len(*in)) - copy(*out, *in) - } - if in.AllowedScopes != nil { - in, out := &in.AllowedScopes, &out.AllowedScopes - *out = make([]Scope, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSpec. -func (in *OIDCClientSpec) DeepCopy() *OIDCClientSpec { - if in == nil { - return nil - } - out := new(OIDCClientSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientStatus) DeepCopyInto(out *OIDCClientStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientStatus. -func (in *OIDCClientStatus) DeepCopy() *OIDCClientStatus { - if in == nil { - return nil - } - out := new(OIDCClientStatus) - in.DeepCopyInto(out) - return out -} diff --git a/generated/1.20/apis/supervisor/virtual/oauth/doc.go b/generated/1.20/apis/supervisor/virtual/oauth/doc.go deleted file mode 100644 index ca4e9a63..00000000 --- a/generated/1.20/apis/supervisor/virtual/oauth/doc.go +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// +k8s:deepcopy-gen=package -// +groupName=oauth.virtual.supervisor.pinniped.dev - -// Package oauth is the internal version of the Pinniped virtual oauth API. -package oauth diff --git a/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go b/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go deleted file mode 100644 index b98d6b36..00000000 --- a/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go +++ /dev/null @@ -1,131 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by conversion-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - oauth "go.pinniped.dev/generated/1.20/apis/supervisor/virtual/oauth" - 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((*OIDCClientSecretRequest)(nil), (*oauth.OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(a.(*OIDCClientSecretRequest), b.(*oauth.OIDCClientSecretRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequest)(nil), (*OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(a.(*oauth.OIDCClientSecretRequest), b.(*OIDCClientSecretRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestSpec)(nil), (*oauth.OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(a.(*OIDCClientSecretRequestSpec), b.(*oauth.OIDCClientSecretRequestSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequestSpec)(nil), (*OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(a.(*oauth.OIDCClientSecretRequestSpec), b.(*OIDCClientSecretRequestSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestStatus)(nil), (*oauth.OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(a.(*OIDCClientSecretRequestStatus), b.(*oauth.OIDCClientSecretRequestStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequestStatus)(nil), (*OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(a.(*oauth.OIDCClientSecretRequestStatus), b.(*OIDCClientSecretRequestStatus), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *oauth.OIDCClientSecretRequest, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest is an autogenerated conversion function. -func Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *oauth.OIDCClientSecretRequest, s conversion.Scope) error { - return autoConvert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in, out, s) -} - -func autoConvert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *oauth.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest is an autogenerated conversion function. -func Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *oauth.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { - return autoConvert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in, out, s) -} - -func autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *oauth.OIDCClientSecretRequestSpec, s conversion.Scope) error { - out.GenerateNewSecret = in.GenerateNewSecret - out.RevokeOldSecrets = in.RevokeOldSecrets - return nil -} - -// Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec is an autogenerated conversion function. -func Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *oauth.OIDCClientSecretRequestSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in, out, s) -} - -func autoConvert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *oauth.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { - out.GenerateNewSecret = in.GenerateNewSecret - out.RevokeOldSecrets = in.RevokeOldSecrets - return nil -} - -// Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec is an autogenerated conversion function. -func Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *oauth.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { - return autoConvert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in, out, s) -} - -func autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *oauth.OIDCClientSecretRequestStatus, s conversion.Scope) error { - out.GeneratedSecret = in.GeneratedSecret - out.TotalClientSecrets = in.TotalClientSecrets - return nil -} - -// Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus is an autogenerated conversion function. -func Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *oauth.OIDCClientSecretRequestStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in, out, s) -} - -func autoConvert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *oauth.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { - out.GeneratedSecret = in.GeneratedSecret - out.TotalClientSecrets = in.TotalClientSecrets - return nil -} - -// Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus is an autogenerated conversion function. -func Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *oauth.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { - return autoConvert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in, out, s) -} diff --git a/generated/1.20/client/supervisor/clientset/versioned/clientset.go b/generated/1.20/client/supervisor/clientset/versioned/clientset.go index ec78cd88..15281108 100644 --- a/generated/1.20/client/supervisor/clientset/versioned/clientset.go +++ b/generated/1.20/client/supervisor/clientset/versioned/clientset.go @@ -8,9 +8,9 @@ package versioned import ( "fmt" + clientsecretv1alpha1 "go.pinniped.dev/generated/1.20/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1" configv1alpha1 "go.pinniped.dev/generated/1.20/client/supervisor/clientset/versioned/typed/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.20/client/supervisor/clientset/versioned/typed/idp/v1alpha1" - oauthv1alpha1 "go.pinniped.dev/generated/1.20/client/supervisor/clientset/versioned/typed/oauth/v1alpha1" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" flowcontrol "k8s.io/client-go/util/flowcontrol" @@ -18,18 +18,23 @@ import ( type Interface interface { Discovery() discovery.DiscoveryInterface + ClientsecretV1alpha1() clientsecretv1alpha1.ClientsecretV1alpha1Interface ConfigV1alpha1() configv1alpha1.ConfigV1alpha1Interface IDPV1alpha1() idpv1alpha1.IDPV1alpha1Interface - OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface } // Clientset contains the clients for groups. Each group has exactly one // version included in a Clientset. type Clientset struct { *discovery.DiscoveryClient - configV1alpha1 *configv1alpha1.ConfigV1alpha1Client - iDPV1alpha1 *idpv1alpha1.IDPV1alpha1Client - oauthV1alpha1 *oauthv1alpha1.OauthV1alpha1Client + clientsecretV1alpha1 *clientsecretv1alpha1.ClientsecretV1alpha1Client + configV1alpha1 *configv1alpha1.ConfigV1alpha1Client + iDPV1alpha1 *idpv1alpha1.IDPV1alpha1Client +} + +// ClientsecretV1alpha1 retrieves the ClientsecretV1alpha1Client +func (c *Clientset) ClientsecretV1alpha1() clientsecretv1alpha1.ClientsecretV1alpha1Interface { + return c.clientsecretV1alpha1 } // ConfigV1alpha1 retrieves the ConfigV1alpha1Client @@ -42,11 +47,6 @@ func (c *Clientset) IDPV1alpha1() idpv1alpha1.IDPV1alpha1Interface { return c.iDPV1alpha1 } -// OauthV1alpha1 retrieves the OauthV1alpha1Client -func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { - return c.oauthV1alpha1 -} - // Discovery retrieves the DiscoveryClient func (c *Clientset) Discovery() discovery.DiscoveryInterface { if c == nil { @@ -68,6 +68,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { } var cs Clientset var err error + cs.clientsecretV1alpha1, err = clientsecretv1alpha1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } cs.configV1alpha1, err = configv1alpha1.NewForConfig(&configShallowCopy) if err != nil { return nil, err @@ -76,10 +80,6 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { if err != nil { return nil, err } - cs.oauthV1alpha1, err = oauthv1alpha1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) if err != nil { @@ -92,9 +92,9 @@ 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.clientsecretV1alpha1 = clientsecretv1alpha1.NewForConfigOrDie(c) cs.configV1alpha1 = configv1alpha1.NewForConfigOrDie(c) cs.iDPV1alpha1 = idpv1alpha1.NewForConfigOrDie(c) - cs.oauthV1alpha1 = oauthv1alpha1.NewForConfigOrDie(c) cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) return &cs @@ -103,9 +103,9 @@ 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.clientsecretV1alpha1 = clientsecretv1alpha1.New(c) cs.configV1alpha1 = configv1alpha1.New(c) cs.iDPV1alpha1 = idpv1alpha1.New(c) - cs.oauthV1alpha1 = oauthv1alpha1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) return &cs diff --git a/generated/1.20/client/supervisor/clientset/versioned/fake/clientset_generated.go b/generated/1.20/client/supervisor/clientset/versioned/fake/clientset_generated.go index cee1ca0d..50219e6d 100644 --- a/generated/1.20/client/supervisor/clientset/versioned/fake/clientset_generated.go +++ b/generated/1.20/client/supervisor/clientset/versioned/fake/clientset_generated.go @@ -7,12 +7,12 @@ package fake import ( clientset "go.pinniped.dev/generated/1.20/client/supervisor/clientset/versioned" + clientsecretv1alpha1 "go.pinniped.dev/generated/1.20/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1" + fakeclientsecretv1alpha1 "go.pinniped.dev/generated/1.20/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake" configv1alpha1 "go.pinniped.dev/generated/1.20/client/supervisor/clientset/versioned/typed/config/v1alpha1" fakeconfigv1alpha1 "go.pinniped.dev/generated/1.20/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake" idpv1alpha1 "go.pinniped.dev/generated/1.20/client/supervisor/clientset/versioned/typed/idp/v1alpha1" fakeidpv1alpha1 "go.pinniped.dev/generated/1.20/client/supervisor/clientset/versioned/typed/idp/v1alpha1/fake" - oauthv1alpha1 "go.pinniped.dev/generated/1.20/client/supervisor/clientset/versioned/typed/oauth/v1alpha1" - fakeoauthv1alpha1 "go.pinniped.dev/generated/1.20/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/discovery" @@ -67,6 +67,11 @@ func (c *Clientset) Tracker() testing.ObjectTracker { var _ clientset.Interface = &Clientset{} +// ClientsecretV1alpha1 retrieves the ClientsecretV1alpha1Client +func (c *Clientset) ClientsecretV1alpha1() clientsecretv1alpha1.ClientsecretV1alpha1Interface { + return &fakeclientsecretv1alpha1.FakeClientsecretV1alpha1{Fake: &c.Fake} +} + // ConfigV1alpha1 retrieves the ConfigV1alpha1Client func (c *Clientset) ConfigV1alpha1() configv1alpha1.ConfigV1alpha1Interface { return &fakeconfigv1alpha1.FakeConfigV1alpha1{Fake: &c.Fake} @@ -76,8 +81,3 @@ func (c *Clientset) ConfigV1alpha1() configv1alpha1.ConfigV1alpha1Interface { func (c *Clientset) IDPV1alpha1() idpv1alpha1.IDPV1alpha1Interface { return &fakeidpv1alpha1.FakeIDPV1alpha1{Fake: &c.Fake} } - -// OauthV1alpha1 retrieves the OauthV1alpha1Client -func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { - return &fakeoauthv1alpha1.FakeOauthV1alpha1{Fake: &c.Fake} -} diff --git a/generated/1.20/client/supervisor/clientset/versioned/fake/register.go b/generated/1.20/client/supervisor/clientset/versioned/fake/register.go index b9ea3ea8..5d95dc5d 100644 --- a/generated/1.20/client/supervisor/clientset/versioned/fake/register.go +++ b/generated/1.20/client/supervisor/clientset/versioned/fake/register.go @@ -6,9 +6,9 @@ package fake import ( + clientsecretv1alpha1 "go.pinniped.dev/generated/1.20/apis/supervisor/clientsecret/v1alpha1" configv1alpha1 "go.pinniped.dev/generated/1.20/apis/supervisor/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.20/apis/supervisor/idp/v1alpha1" - oauthv1alpha1 "go.pinniped.dev/generated/1.20/apis/supervisor/oauth/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -20,9 +20,9 @@ var scheme = runtime.NewScheme() var codecs = serializer.NewCodecFactory(scheme) var localSchemeBuilder = runtime.SchemeBuilder{ + clientsecretv1alpha1.AddToScheme, configv1alpha1.AddToScheme, idpv1alpha1.AddToScheme, - oauthv1alpha1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/generated/1.20/client/supervisor/clientset/versioned/scheme/register.go b/generated/1.20/client/supervisor/clientset/versioned/scheme/register.go index cd769223..bf02ac0a 100644 --- a/generated/1.20/client/supervisor/clientset/versioned/scheme/register.go +++ b/generated/1.20/client/supervisor/clientset/versioned/scheme/register.go @@ -6,9 +6,9 @@ package scheme import ( + clientsecretv1alpha1 "go.pinniped.dev/generated/1.20/apis/supervisor/clientsecret/v1alpha1" configv1alpha1 "go.pinniped.dev/generated/1.20/apis/supervisor/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.20/apis/supervisor/idp/v1alpha1" - oauthv1alpha1 "go.pinniped.dev/generated/1.20/apis/supervisor/oauth/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -20,9 +20,9 @@ var Scheme = runtime.NewScheme() var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) var localSchemeBuilder = runtime.SchemeBuilder{ + clientsecretv1alpha1.AddToScheme, configv1alpha1.AddToScheme, idpv1alpha1.AddToScheme, - oauthv1alpha1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go b/generated/1.20/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/clientsecret_client.go similarity index 51% rename from generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go rename to generated/1.20/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/clientsecret_client.go index 9d839dfb..388cfe1d 100644 --- a/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go +++ b/generated/1.20/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/clientsecret_client.go @@ -6,27 +6,27 @@ package v1alpha1 import ( - v1alpha1 "go.pinniped.dev/generated/1.18/apis/supervisor/virtual/oauth/v1alpha1" - "go.pinniped.dev/generated/1.18/client/supervisor/virtual/clientset/versioned/scheme" + v1alpha1 "go.pinniped.dev/generated/1.20/apis/supervisor/clientsecret/v1alpha1" + "go.pinniped.dev/generated/1.20/client/supervisor/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) -type OauthV1alpha1Interface interface { +type ClientsecretV1alpha1Interface interface { RESTClient() rest.Interface OIDCClientSecretRequestsGetter } -// OauthV1alpha1Client is used to interact with features provided by the oauth.virtual.supervisor.pinniped.dev group. -type OauthV1alpha1Client struct { +// ClientsecretV1alpha1Client is used to interact with features provided by the clientsecret.supervisor.pinniped.dev group. +type ClientsecretV1alpha1Client struct { restClient rest.Interface } -func (c *OauthV1alpha1Client) OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface { +func (c *ClientsecretV1alpha1Client) OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface { return newOIDCClientSecretRequests(c, namespace) } -// NewForConfig creates a new OauthV1alpha1Client for the given config. -func NewForConfig(c *rest.Config) (*OauthV1alpha1Client, error) { +// NewForConfig creates a new ClientsecretV1alpha1Client for the given config. +func NewForConfig(c *rest.Config) (*ClientsecretV1alpha1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err @@ -35,12 +35,12 @@ func NewForConfig(c *rest.Config) (*OauthV1alpha1Client, error) { if err != nil { return nil, err } - return &OauthV1alpha1Client{client}, nil + return &ClientsecretV1alpha1Client{client}, nil } -// NewForConfigOrDie creates a new OauthV1alpha1Client for the given config and +// NewForConfigOrDie creates a new ClientsecretV1alpha1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *OauthV1alpha1Client { +func NewForConfigOrDie(c *rest.Config) *ClientsecretV1alpha1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -48,9 +48,9 @@ func NewForConfigOrDie(c *rest.Config) *OauthV1alpha1Client { return client } -// New creates a new OauthV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *OauthV1alpha1Client { - return &OauthV1alpha1Client{c} +// New creates a new ClientsecretV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *ClientsecretV1alpha1Client { + return &ClientsecretV1alpha1Client{c} } func setConfigDefaults(config *rest.Config) error { @@ -68,7 +68,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 *OauthV1alpha1Client) RESTClient() rest.Interface { +func (c *ClientsecretV1alpha1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go b/generated/1.20/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/doc.go similarity index 100% rename from generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go rename to generated/1.20/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/doc.go diff --git a/generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go b/generated/1.20/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/doc.go similarity index 100% rename from generated/1.18/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go rename to generated/1.20/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/doc.go diff --git a/generated/1.20/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go b/generated/1.20/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_clientsecret_client.go similarity index 60% rename from generated/1.20/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go rename to generated/1.20/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_clientsecret_client.go index 3bc1da70..60d8b02b 100644 --- a/generated/1.20/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go +++ b/generated/1.20/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_clientsecret_client.go @@ -6,22 +6,22 @@ package fake import ( - v1alpha1 "go.pinniped.dev/generated/1.20/client/supervisor/clientset/versioned/typed/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.20/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1" rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" ) -type FakeOauthV1alpha1 struct { +type FakeClientsecretV1alpha1 struct { *testing.Fake } -func (c *FakeOauthV1alpha1) OIDCClients(namespace string) v1alpha1.OIDCClientInterface { - return &FakeOIDCClients{c, namespace} +func (c *FakeClientsecretV1alpha1) OIDCClientSecretRequests(namespace string) v1alpha1.OIDCClientSecretRequestInterface { + return &FakeOIDCClientSecretRequests{c, namespace} } // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeOauthV1alpha1) RESTClient() rest.Interface { +func (c *FakeClientsecretV1alpha1) RESTClient() rest.Interface { var ret *rest.RESTClient return ret } diff --git a/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go b/generated/1.20/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_oidcclientsecretrequest.go similarity index 79% rename from generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go rename to generated/1.20/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_oidcclientsecretrequest.go index 6c7a7829..2ee6bebc 100644 --- a/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go +++ b/generated/1.20/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_oidcclientsecretrequest.go @@ -8,7 +8,7 @@ package fake import ( "context" - v1alpha1 "go.pinniped.dev/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.20/apis/supervisor/clientsecret/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" testing "k8s.io/client-go/testing" @@ -16,13 +16,13 @@ import ( // FakeOIDCClientSecretRequests implements OIDCClientSecretRequestInterface type FakeOIDCClientSecretRequests struct { - Fake *FakeOauthV1alpha1 + Fake *FakeClientsecretV1alpha1 ns string } -var oidcclientsecretrequestsResource = schema.GroupVersionResource{Group: "oauth.virtual.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclientsecretrequests"} +var oidcclientsecretrequestsResource = schema.GroupVersionResource{Group: "clientsecret.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclientsecretrequests"} -var oidcclientsecretrequestsKind = schema.GroupVersionKind{Group: "oauth.virtual.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClientSecretRequest"} +var oidcclientsecretrequestsKind = schema.GroupVersionKind{Group: "clientsecret.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClientSecretRequest"} // Create takes the representation of a oIDCClientSecretRequest and creates it. Returns the server's representation of the oIDCClientSecretRequest, and an error, if there is any. func (c *FakeOIDCClientSecretRequests) Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (result *v1alpha1.OIDCClientSecretRequest, err error) { diff --git a/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go b/generated/1.20/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/generated_expansion.go similarity index 100% rename from generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go rename to generated/1.20/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/generated_expansion.go diff --git a/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go b/generated/1.20/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/oidcclientsecretrequest.go similarity index 86% rename from generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go rename to generated/1.20/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/oidcclientsecretrequest.go index c9e5804d..fc774da6 100644 --- a/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go +++ b/generated/1.20/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/oidcclientsecretrequest.go @@ -8,8 +8,8 @@ package v1alpha1 import ( "context" - v1alpha1 "go.pinniped.dev/generated/1.20/apis/supervisor/virtual/oauth/v1alpha1" - scheme "go.pinniped.dev/generated/1.20/client/supervisor/virtual/clientset/versioned/scheme" + v1alpha1 "go.pinniped.dev/generated/1.20/apis/supervisor/clientsecret/v1alpha1" + scheme "go.pinniped.dev/generated/1.20/client/supervisor/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" rest "k8s.io/client-go/rest" ) @@ -33,7 +33,7 @@ type oIDCClientSecretRequests struct { } // newOIDCClientSecretRequests returns a OIDCClientSecretRequests -func newOIDCClientSecretRequests(c *OauthV1alpha1Client, namespace string) *oIDCClientSecretRequests { +func newOIDCClientSecretRequests(c *ClientsecretV1alpha1Client, namespace string) *oIDCClientSecretRequests { return &oIDCClientSecretRequests{ client: c.RESTClient(), ns: namespace, diff --git a/generated/1.20/client/supervisor/clientset/versioned/typed/config/v1alpha1/config_client.go b/generated/1.20/client/supervisor/clientset/versioned/typed/config/v1alpha1/config_client.go index 5baa9401..0af8db5d 100644 --- a/generated/1.20/client/supervisor/clientset/versioned/typed/config/v1alpha1/config_client.go +++ b/generated/1.20/client/supervisor/clientset/versioned/typed/config/v1alpha1/config_client.go @@ -14,6 +14,7 @@ import ( type ConfigV1alpha1Interface interface { RESTClient() rest.Interface FederationDomainsGetter + OIDCClientsGetter } // ConfigV1alpha1Client is used to interact with features provided by the config.supervisor.pinniped.dev group. @@ -25,6 +26,10 @@ func (c *ConfigV1alpha1Client) FederationDomains(namespace string) FederationDom return newFederationDomains(c, namespace) } +func (c *ConfigV1alpha1Client) OIDCClients(namespace string) OIDCClientInterface { + return newOIDCClients(c, namespace) +} + // NewForConfig creates a new ConfigV1alpha1Client for the given config. func NewForConfig(c *rest.Config) (*ConfigV1alpha1Client, error) { config := *c diff --git a/generated/1.20/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go b/generated/1.20/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go index 67628cf9..68debe9b 100644 --- a/generated/1.20/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go +++ b/generated/1.20/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go @@ -19,6 +19,10 @@ func (c *FakeConfigV1alpha1) FederationDomains(namespace string) v1alpha1.Federa return &FakeFederationDomains{c, namespace} } +func (c *FakeConfigV1alpha1) OIDCClients(namespace string) v1alpha1.OIDCClientInterface { + return &FakeOIDCClients{c, namespace} +} + // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. func (c *FakeConfigV1alpha1) RESTClient() rest.Interface { diff --git a/generated/1.21/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclient.go b/generated/1.20/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_oidcclient.go similarity index 92% rename from generated/1.21/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclient.go rename to generated/1.20/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_oidcclient.go index cdd06d71..b481c9ec 100644 --- a/generated/1.21/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclient.go +++ b/generated/1.20/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_oidcclient.go @@ -8,7 +8,7 @@ package fake import ( "context" - v1alpha1 "go.pinniped.dev/generated/1.21/apis/supervisor/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.20/apis/supervisor/config/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -19,13 +19,13 @@ import ( // FakeOIDCClients implements OIDCClientInterface type FakeOIDCClients struct { - Fake *FakeOauthV1alpha1 + Fake *FakeConfigV1alpha1 ns string } -var oidcclientsResource = schema.GroupVersionResource{Group: "oauth.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclients"} +var oidcclientsResource = schema.GroupVersionResource{Group: "config.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclients"} -var oidcclientsKind = schema.GroupVersionKind{Group: "oauth.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClient"} +var oidcclientsKind = schema.GroupVersionKind{Group: "config.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClient"} // Get takes name of the oIDCClient, and returns the corresponding oIDCClient object, and an error if there is any. func (c *FakeOIDCClients) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.OIDCClient, err error) { diff --git a/generated/1.20/client/supervisor/clientset/versioned/typed/config/v1alpha1/generated_expansion.go b/generated/1.20/client/supervisor/clientset/versioned/typed/config/v1alpha1/generated_expansion.go index ba9c9173..35b9ee3d 100644 --- a/generated/1.20/client/supervisor/clientset/versioned/typed/config/v1alpha1/generated_expansion.go +++ b/generated/1.20/client/supervisor/clientset/versioned/typed/config/v1alpha1/generated_expansion.go @@ -6,3 +6,5 @@ package v1alpha1 type FederationDomainExpansion interface{} + +type OIDCClientExpansion interface{} diff --git a/generated/1.20/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oidcclient.go b/generated/1.20/client/supervisor/clientset/versioned/typed/config/v1alpha1/oidcclient.go similarity index 97% rename from generated/1.20/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oidcclient.go rename to generated/1.20/client/supervisor/clientset/versioned/typed/config/v1alpha1/oidcclient.go index 32503911..2b2e4e9e 100644 --- a/generated/1.20/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oidcclient.go +++ b/generated/1.20/client/supervisor/clientset/versioned/typed/config/v1alpha1/oidcclient.go @@ -9,7 +9,7 @@ import ( "context" "time" - v1alpha1 "go.pinniped.dev/generated/1.20/apis/supervisor/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.20/apis/supervisor/config/v1alpha1" scheme "go.pinniped.dev/generated/1.20/client/supervisor/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -44,7 +44,7 @@ type oIDCClients struct { } // newOIDCClients returns a OIDCClients -func newOIDCClients(c *OauthV1alpha1Client, namespace string) *oIDCClients { +func newOIDCClients(c *ConfigV1alpha1Client, namespace string) *oIDCClients { return &oIDCClients{ client: c.RESTClient(), ns: namespace, diff --git a/generated/1.20/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go b/generated/1.20/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go deleted file mode 100644 index 87d22ea9..00000000 --- a/generated/1.20/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -type OIDCClientExpansion interface{} diff --git a/generated/1.20/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go b/generated/1.20/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go deleted file mode 100644 index ca9d2cf5..00000000 --- a/generated/1.20/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1alpha1 "go.pinniped.dev/generated/1.20/apis/supervisor/oauth/v1alpha1" - "go.pinniped.dev/generated/1.20/client/supervisor/clientset/versioned/scheme" - rest "k8s.io/client-go/rest" -) - -type OauthV1alpha1Interface interface { - RESTClient() rest.Interface - OIDCClientsGetter -} - -// OauthV1alpha1Client is used to interact with features provided by the oauth.supervisor.pinniped.dev group. -type OauthV1alpha1Client struct { - restClient rest.Interface -} - -func (c *OauthV1alpha1Client) OIDCClients(namespace string) OIDCClientInterface { - return newOIDCClients(c, namespace) -} - -// NewForConfig creates a new OauthV1alpha1Client for the given config. -func NewForConfig(c *rest.Config) (*OauthV1alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &OauthV1alpha1Client{client}, nil -} - -// NewForConfigOrDie creates a new OauthV1alpha1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *OauthV1alpha1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new OauthV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *OauthV1alpha1Client { - return &OauthV1alpha1Client{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 *OauthV1alpha1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/generated/1.20/client/supervisor/informers/externalversions/config/v1alpha1/interface.go b/generated/1.20/client/supervisor/informers/externalversions/config/v1alpha1/interface.go index 399bc958..37340c6b 100644 --- a/generated/1.20/client/supervisor/informers/externalversions/config/v1alpha1/interface.go +++ b/generated/1.20/client/supervisor/informers/externalversions/config/v1alpha1/interface.go @@ -13,6 +13,8 @@ import ( type Interface interface { // FederationDomains returns a FederationDomainInformer. FederationDomains() FederationDomainInformer + // OIDCClients returns a OIDCClientInformer. + OIDCClients() OIDCClientInformer } type version struct { @@ -30,3 +32,8 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList func (v *version) FederationDomains() FederationDomainInformer { return &federationDomainInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } + +// OIDCClients returns a OIDCClientInformer. +func (v *version) OIDCClients() OIDCClientInformer { + return &oIDCClientInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} diff --git a/generated/1.20/client/supervisor/informers/externalversions/oauth/v1alpha1/oidcclient.go b/generated/1.20/client/supervisor/informers/externalversions/config/v1alpha1/oidcclient.go similarity index 88% rename from generated/1.20/client/supervisor/informers/externalversions/oauth/v1alpha1/oidcclient.go rename to generated/1.20/client/supervisor/informers/externalversions/config/v1alpha1/oidcclient.go index 37efa298..0ebc789f 100644 --- a/generated/1.20/client/supervisor/informers/externalversions/oauth/v1alpha1/oidcclient.go +++ b/generated/1.20/client/supervisor/informers/externalversions/config/v1alpha1/oidcclient.go @@ -9,10 +9,10 @@ import ( "context" time "time" - oauthv1alpha1 "go.pinniped.dev/generated/1.20/apis/supervisor/oauth/v1alpha1" + configv1alpha1 "go.pinniped.dev/generated/1.20/apis/supervisor/config/v1alpha1" versioned "go.pinniped.dev/generated/1.20/client/supervisor/clientset/versioned" internalinterfaces "go.pinniped.dev/generated/1.20/client/supervisor/informers/externalversions/internalinterfaces" - v1alpha1 "go.pinniped.dev/generated/1.20/client/supervisor/listers/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.20/client/supervisor/listers/config/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -49,16 +49,16 @@ func NewFilteredOIDCClientInformer(client versioned.Interface, namespace string, if tweakListOptions != nil { tweakListOptions(&options) } - return client.OauthV1alpha1().OIDCClients(namespace).List(context.TODO(), options) + return client.ConfigV1alpha1().OIDCClients(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.OauthV1alpha1().OIDCClients(namespace).Watch(context.TODO(), options) + return client.ConfigV1alpha1().OIDCClients(namespace).Watch(context.TODO(), options) }, }, - &oauthv1alpha1.OIDCClient{}, + &configv1alpha1.OIDCClient{}, resyncPeriod, indexers, ) @@ -69,7 +69,7 @@ func (f *oIDCClientInformer) defaultInformer(client versioned.Interface, resyncP } func (f *oIDCClientInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&oauthv1alpha1.OIDCClient{}, f.defaultInformer) + return f.factory.InformerFor(&configv1alpha1.OIDCClient{}, f.defaultInformer) } func (f *oIDCClientInformer) Lister() v1alpha1.OIDCClientLister { diff --git a/generated/1.20/client/supervisor/informers/externalversions/factory.go b/generated/1.20/client/supervisor/informers/externalversions/factory.go index 6e6fffaa..60395f1f 100644 --- a/generated/1.20/client/supervisor/informers/externalversions/factory.go +++ b/generated/1.20/client/supervisor/informers/externalversions/factory.go @@ -14,7 +14,6 @@ import ( config "go.pinniped.dev/generated/1.20/client/supervisor/informers/externalversions/config" idp "go.pinniped.dev/generated/1.20/client/supervisor/informers/externalversions/idp" internalinterfaces "go.pinniped.dev/generated/1.20/client/supervisor/informers/externalversions/internalinterfaces" - oauth "go.pinniped.dev/generated/1.20/client/supervisor/informers/externalversions/oauth" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -163,7 +162,6 @@ type SharedInformerFactory interface { Config() config.Interface IDP() idp.Interface - Oauth() oauth.Interface } func (f *sharedInformerFactory) Config() config.Interface { @@ -173,7 +171,3 @@ func (f *sharedInformerFactory) Config() config.Interface { func (f *sharedInformerFactory) IDP() idp.Interface { return idp.New(f, f.namespace, f.tweakListOptions) } - -func (f *sharedInformerFactory) Oauth() oauth.Interface { - return oauth.New(f, f.namespace, f.tweakListOptions) -} diff --git a/generated/1.20/client/supervisor/informers/externalversions/generic.go b/generated/1.20/client/supervisor/informers/externalversions/generic.go index d541574e..d063878c 100644 --- a/generated/1.20/client/supervisor/informers/externalversions/generic.go +++ b/generated/1.20/client/supervisor/informers/externalversions/generic.go @@ -10,7 +10,6 @@ import ( v1alpha1 "go.pinniped.dev/generated/1.20/apis/supervisor/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.20/apis/supervisor/idp/v1alpha1" - oauthv1alpha1 "go.pinniped.dev/generated/1.20/apis/supervisor/oauth/v1alpha1" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" ) @@ -44,6 +43,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource // Group=config.supervisor.pinniped.dev, Version=v1alpha1 case v1alpha1.SchemeGroupVersion.WithResource("federationdomains"): return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1alpha1().FederationDomains().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("oidcclients"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1alpha1().OIDCClients().Informer()}, nil // Group=idp.supervisor.pinniped.dev, Version=v1alpha1 case idpv1alpha1.SchemeGroupVersion.WithResource("activedirectoryidentityproviders"): @@ -53,10 +54,6 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource case idpv1alpha1.SchemeGroupVersion.WithResource("oidcidentityproviders"): return &genericInformer{resource: resource.GroupResource(), informer: f.IDP().V1alpha1().OIDCIdentityProviders().Informer()}, nil - // Group=oauth.supervisor.pinniped.dev, Version=v1alpha1 - case oauthv1alpha1.SchemeGroupVersion.WithResource("oidcclients"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Oauth().V1alpha1().OIDCClients().Informer()}, nil - } return nil, fmt.Errorf("no informer found for %v", resource) diff --git a/generated/1.20/client/supervisor/informers/externalversions/oauth/interface.go b/generated/1.20/client/supervisor/informers/externalversions/oauth/interface.go deleted file mode 100644 index b4cc533e..00000000 --- a/generated/1.20/client/supervisor/informers/externalversions/oauth/interface.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by informer-gen. DO NOT EDIT. - -package oauth - -import ( - internalinterfaces "go.pinniped.dev/generated/1.20/client/supervisor/informers/externalversions/internalinterfaces" - v1alpha1 "go.pinniped.dev/generated/1.20/client/supervisor/informers/externalversions/oauth/v1alpha1" -) - -// Interface provides access to each of this group's versions. -type Interface interface { - // V1alpha1 provides access to shared informers for resources in V1alpha1. - V1alpha1() v1alpha1.Interface -} - -type group struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// V1alpha1 returns a new v1alpha1.Interface. -func (g *group) V1alpha1() v1alpha1.Interface { - return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) -} diff --git a/generated/1.20/client/supervisor/informers/externalversions/oauth/v1alpha1/interface.go b/generated/1.20/client/supervisor/informers/externalversions/oauth/v1alpha1/interface.go deleted file mode 100644 index ed7eacf5..00000000 --- a/generated/1.20/client/supervisor/informers/externalversions/oauth/v1alpha1/interface.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - internalinterfaces "go.pinniped.dev/generated/1.20/client/supervisor/informers/externalversions/internalinterfaces" -) - -// Interface provides access to all the informers in this group version. -type Interface interface { - // OIDCClients returns a OIDCClientInformer. - OIDCClients() OIDCClientInformer -} - -type version struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// OIDCClients returns a OIDCClientInformer. -func (v *version) OIDCClients() OIDCClientInformer { - return &oIDCClientInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} diff --git a/generated/1.20/client/supervisor/listers/config/v1alpha1/expansion_generated.go b/generated/1.20/client/supervisor/listers/config/v1alpha1/expansion_generated.go index d59892c4..bda2f20e 100644 --- a/generated/1.20/client/supervisor/listers/config/v1alpha1/expansion_generated.go +++ b/generated/1.20/client/supervisor/listers/config/v1alpha1/expansion_generated.go @@ -12,3 +12,11 @@ type FederationDomainListerExpansion interface{} // FederationDomainNamespaceListerExpansion allows custom methods to be added to // FederationDomainNamespaceLister. type FederationDomainNamespaceListerExpansion interface{} + +// OIDCClientListerExpansion allows custom methods to be added to +// OIDCClientLister. +type OIDCClientListerExpansion interface{} + +// OIDCClientNamespaceListerExpansion allows custom methods to be added to +// OIDCClientNamespaceLister. +type OIDCClientNamespaceListerExpansion interface{} diff --git a/generated/1.22/client/supervisor/listers/oauth/v1alpha1/oidcclient.go b/generated/1.20/client/supervisor/listers/config/v1alpha1/oidcclient.go similarity index 97% rename from generated/1.22/client/supervisor/listers/oauth/v1alpha1/oidcclient.go rename to generated/1.20/client/supervisor/listers/config/v1alpha1/oidcclient.go index e73a2114..d3e12885 100644 --- a/generated/1.22/client/supervisor/listers/oauth/v1alpha1/oidcclient.go +++ b/generated/1.20/client/supervisor/listers/config/v1alpha1/oidcclient.go @@ -6,7 +6,7 @@ package v1alpha1 import ( - v1alpha1 "go.pinniped.dev/generated/1.22/apis/supervisor/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.20/apis/supervisor/config/v1alpha1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" diff --git a/generated/1.20/client/supervisor/listers/oauth/v1alpha1/expansion_generated.go b/generated/1.20/client/supervisor/listers/oauth/v1alpha1/expansion_generated.go deleted file mode 100644 index c19310da..00000000 --- a/generated/1.20/client/supervisor/listers/oauth/v1alpha1/expansion_generated.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha1 - -// OIDCClientListerExpansion allows custom methods to be added to -// OIDCClientLister. -type OIDCClientListerExpansion interface{} - -// OIDCClientNamespaceListerExpansion allows custom methods to be added to -// OIDCClientNamespaceLister. -type OIDCClientNamespaceListerExpansion interface{} diff --git a/generated/1.20/client/supervisor/virtual/clientset/versioned/clientset.go b/generated/1.20/client/supervisor/virtual/clientset/versioned/clientset.go deleted file mode 100644 index 3bcc6c36..00000000 --- a/generated/1.20/client/supervisor/virtual/clientset/versioned/clientset.go +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package versioned - -import ( - "fmt" - - oauthv1alpha1 "go.pinniped.dev/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" - discovery "k8s.io/client-go/discovery" - rest "k8s.io/client-go/rest" - flowcontrol "k8s.io/client-go/util/flowcontrol" -) - -type Interface interface { - Discovery() discovery.DiscoveryInterface - OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface -} - -// Clientset contains the clients for groups. Each group has exactly one -// version included in a Clientset. -type Clientset struct { - *discovery.DiscoveryClient - oauthV1alpha1 *oauthv1alpha1.OauthV1alpha1Client -} - -// OauthV1alpha1 retrieves the OauthV1alpha1Client -func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { - return c.oauthV1alpha1 -} - -// Discovery retrieves the DiscoveryClient -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - if c == nil { - return nil - } - return c.DiscoveryClient -} - -// NewForConfig creates a new Clientset for the given config. -// If config's RateLimiter is not set and QPS and Burst are acceptable, -// NewForConfig will generate a rate-limiter in configShallowCopy. -func NewForConfig(c *rest.Config) (*Clientset, error) { - configShallowCopy := *c - if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { - if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") - } - configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) - } - var cs Clientset - var err error - cs.oauthV1alpha1, err = oauthv1alpha1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - - cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - return &cs, nil -} - -// NewForConfigOrDie creates a new Clientset for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *Clientset { - var cs Clientset - cs.oauthV1alpha1 = oauthv1alpha1.NewForConfigOrDie(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) - return &cs -} - -// New creates a new Clientset for the given RESTClient. -func New(c rest.Interface) *Clientset { - var cs Clientset - cs.oauthV1alpha1 = oauthv1alpha1.New(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClient(c) - return &cs -} diff --git a/generated/1.20/client/supervisor/virtual/clientset/versioned/doc.go b/generated/1.20/client/supervisor/virtual/clientset/versioned/doc.go deleted file mode 100644 index 5dc02e6e..00000000 --- a/generated/1.20/client/supervisor/virtual/clientset/versioned/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated clientset. -package versioned diff --git a/generated/1.20/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go b/generated/1.20/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go deleted file mode 100644 index 4bf17f6c..00000000 --- a/generated/1.20/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - clientset "go.pinniped.dev/generated/1.20/client/supervisor/virtual/clientset/versioned" - oauthv1alpha1 "go.pinniped.dev/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" - fakeoauthv1alpha1 "go.pinniped.dev/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/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" -) - -// NewSimpleClientset returns a clientset that will respond with the provided objects. -// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, -// without applying any validations and/or defaults. It shouldn't be considered a replacement -// for a real clientset and is mostly useful in simple unit tests. -func NewSimpleClientset(objects ...runtime.Object) *Clientset { - o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) - for _, obj := range objects { - if err := o.Add(obj); err != nil { - panic(err) - } - } - - cs := &Clientset{tracker: o} - cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} - cs.AddReactor("*", "*", testing.ObjectReaction(o)) - cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { - gvr := action.GetResource() - ns := action.GetNamespace() - watch, err := o.Watch(gvr, ns) - if err != nil { - return false, nil, err - } - return true, watch, nil - }) - - return cs -} - -// Clientset implements clientset.Interface. Meant to be embedded into a -// struct to get a default implementation. This makes faking out just the method -// you want to test easier. -type Clientset struct { - testing.Fake - discovery *fakediscovery.FakeDiscovery - tracker testing.ObjectTracker -} - -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - return c.discovery -} - -func (c *Clientset) Tracker() testing.ObjectTracker { - return c.tracker -} - -var _ clientset.Interface = &Clientset{} - -// OauthV1alpha1 retrieves the OauthV1alpha1Client -func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { - return &fakeoauthv1alpha1.FakeOauthV1alpha1{Fake: &c.Fake} -} diff --git a/generated/1.20/client/supervisor/virtual/clientset/versioned/fake/doc.go b/generated/1.20/client/supervisor/virtual/clientset/versioned/fake/doc.go deleted file mode 100644 index 7c9538fd..00000000 --- a/generated/1.20/client/supervisor/virtual/clientset/versioned/fake/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated fake clientset. -package fake diff --git a/generated/1.20/client/supervisor/virtual/clientset/versioned/fake/register.go b/generated/1.20/client/supervisor/virtual/clientset/versioned/fake/register.go deleted file mode 100644 index 089583bd..00000000 --- a/generated/1.20/client/supervisor/virtual/clientset/versioned/fake/register.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - oauthv1alpha1 "go.pinniped.dev/generated/1.20/apis/supervisor/virtual/oauth/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" -) - -var scheme = runtime.NewScheme() -var codecs = serializer.NewCodecFactory(scheme) - -var localSchemeBuilder = runtime.SchemeBuilder{ - oauthv1alpha1.AddToScheme, -} - -// AddToScheme adds all types of this clientset into the given scheme. This allows composition -// of clientsets, like in: -// -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) -// -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) -// -// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types -// correctly. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(scheme)) -} diff --git a/generated/1.20/client/supervisor/virtual/clientset/versioned/scheme/doc.go b/generated/1.20/client/supervisor/virtual/clientset/versioned/scheme/doc.go deleted file mode 100644 index cc02f1d3..00000000 --- a/generated/1.20/client/supervisor/virtual/clientset/versioned/scheme/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// This package contains the scheme of the automatically generated clientset. -package scheme diff --git a/generated/1.20/client/supervisor/virtual/clientset/versioned/scheme/register.go b/generated/1.20/client/supervisor/virtual/clientset/versioned/scheme/register.go deleted file mode 100644 index 913e9c9a..00000000 --- a/generated/1.20/client/supervisor/virtual/clientset/versioned/scheme/register.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package scheme - -import ( - oauthv1alpha1 "go.pinniped.dev/generated/1.20/apis/supervisor/virtual/oauth/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" -) - -var Scheme = runtime.NewScheme() -var Codecs = serializer.NewCodecFactory(Scheme) -var ParameterCodec = runtime.NewParameterCodec(Scheme) -var localSchemeBuilder = runtime.SchemeBuilder{ - oauthv1alpha1.AddToScheme, -} - -// AddToScheme adds all types of this clientset into the given scheme. This allows composition -// of clientsets, like in: -// -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) -// -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) -// -// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types -// correctly. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(Scheme)) -} diff --git a/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go b/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go deleted file mode 100644 index d6e9ee9a..00000000 --- a/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1alpha1 "go.pinniped.dev/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" -) - -type FakeOauthV1alpha1 struct { - *testing.Fake -} - -func (c *FakeOauthV1alpha1) OIDCClientSecretRequests(namespace string) v1alpha1.OIDCClientSecretRequestInterface { - return &FakeOIDCClientSecretRequests{c, namespace} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeOauthV1alpha1) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/generated/1.20/crds/config.supervisor.pinniped.dev_oidcclients.yaml b/generated/1.20/crds/config.supervisor.pinniped.dev_oidcclients.yaml new file mode 100644 index 00000000..4efa445e --- /dev/null +++ b/generated/1.20/crds/config.supervisor.pinniped.dev_oidcclients.yaml @@ -0,0 +1,125 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.8.0 + creationTimestamp: null + name: oidcclients.config.supervisor.pinniped.dev +spec: + group: config.supervisor.pinniped.dev + names: + categories: + - pinniped + kind: OIDCClient + listKind: OIDCClientList + plural: oidcclients + singular: oidcclient + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: OIDCClient describes the configuration of an OIDC client. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: Spec of the OIDC client. + properties: + allowedGrantTypes: + description: "allowedGrantTypes is a list of the allowed grant_type + param values that should be accepted during OIDC flows with this + client. \n Must only contain the following values: - authorization_code: + allows the client to perform the authorization code grant flow, + i.e. allows the webapp to authenticate users. This grant must always + be listed. - refresh_token: allows the client to perform refresh + grants for the user to extend the user's session. This grant must + be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: + allows the client to perform RFC8693 token exchange, which is a + step in the process to be able to get a cluster credential for the + user. This grant must be listed if allowedScopes lists pinniped:request-audience." + items: + enum: + - authorization_code + - refresh_token + - urn:ietf:params:oauth:grant-type:token-exchange + type: string + minItems: 1 + type: array + allowedRedirectURIs: + description: allowedRedirectURIs is a list of the allowed redirect_uri + param values that should be accepted during OIDC flows with this + client. Any other uris will be rejected. Must be https, unless it + is a loopback. + items: + type: string + minItems: 1 + type: array + allowedScopes: + description: "allowedScopes is a list of the allowed scopes param + values that should be accepted during OIDC flows with this client. + \n Must only contain the following values: - openid: The client + is allowed to request ID tokens. ID tokens only include the required + claims by default (iss, sub, aud, exp, iat). This scope must always + be listed. - offline_access: The client is allowed to request an + initial refresh token during the authorization code grant flow. + This scope must be listed if allowedGrantTypes lists refresh_token. + - pinniped:request-audience: The client is allowed to request a + new audience value during a RFC8693 token exchange, which is a step + in the process to be able to get a cluster credential for the user. + openid, username and groups scopes must be listed when this scope + is present. This scope must be listed if allowedGrantTypes lists + urn:ietf:params:oauth:grant-type:token-exchange. - username: The + client is allowed to request that ID tokens contain the user's username. + Without the username scope being requested and allowed, the ID token + will not contain the user's username. - groups: The client is allowed + to request that ID tokens contain the user's group membership, if + their group membership is discoverable by the Supervisor. Without + the groups scope being requested and allowed, the ID token will + not contain groups." + items: + enum: + - openid + - offline_access + - username + - groups + - pinniped:request-audience + type: string + minItems: 1 + type: array + required: + - allowedGrantTypes + - allowedRedirectURIs + - allowedScopes + type: object + status: + description: Status of the OIDC client. + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/generated/1.20/crds/oauth.supervisor.pinniped.dev_oidcclients.yaml b/generated/1.20/crds/oauth.supervisor.pinniped.dev_oidcclients.yaml deleted file mode 100644 index 589a9154..00000000 --- a/generated/1.20/crds/oauth.supervisor.pinniped.dev_oidcclients.yaml +++ /dev/null @@ -1,125 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null - name: oidcclients.oauth.supervisor.pinniped.dev -spec: - group: oauth.supervisor.pinniped.dev - names: - categories: - - pinniped - kind: OIDCClient - listKind: OIDCClientList - plural: oidcclients - singular: oidcclient - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1alpha1 - schema: - openAPIV3Schema: - description: OIDCClient describes the configuration of an OIDC client. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: Spec of the OIDC client. - properties: - allowedGrantTypes: - description: "allowedGrantTypes is a list of the allowed grant_type - param values that should be accepted during OIDC flows with this - client. \n Must only contain the following values: - authorization_code: - allows the client to perform the authorization code grant flow, - i.e. allows the webapp to authenticate users. This grant must always - be listed. - refresh_token: allows the client to perform refresh - grants for the user to extend the user's session. This grant must - be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: - allows the client to perform RFC8693 token exchange, which is a - step in the process to be able to get a cluster credential for the - user. This grant must be listed if allowedScopes lists pinniped:request-audience." - items: - enum: - - authorization_code - - refresh_token - - urn:ietf:params:oauth:grant-type:token-exchange - type: string - minItems: 1 - type: array - allowedRedirectURIs: - description: allowedRedirectURIs is a list of the allowed redirect_uri - param values that should be accepted during OIDC flows with this - client. Any other uris will be rejected. Must be https, unless it - is a loopback. - items: - type: string - minItems: 1 - type: array - allowedScopes: - description: "allowedScopes is a list of the allowed scopes param - values that should be accepted during OIDC flows with this client. - \n Must only contain the following values: - openid: The client - is allowed to request ID tokens. ID tokens only include the required - claims by default (iss, sub, aud, exp, iat). This scope must always - be listed. - offline_access: The client is allowed to request an - initial refresh token during the authorization code grant flow. - This scope must be listed if allowedGrantTypes lists refresh_token. - - pinniped:request-audience: The client is allowed to request a - new audience value during a RFC8693 token exchange, which is a step - in the process to be able to get a cluster credential for the user. - openid, username and groups scopes must be listed when this scope - is present. This scope must be listed if allowedGrantTypes lists - urn:ietf:params:oauth:grant-type:token-exchange. - username: The - client is allowed to request that ID tokens contain the user's username. - Without the username scope being requested and allowed, the ID token - will not contain the user's username. - groups: The client is allowed - to request that ID tokens contain the user's group membership, if - their group membership is discoverable by the Supervisor. Without - the groups scope being requested and allowed, the ID token will - not contain groups." - items: - enum: - - openid - - offline_access - - username - - groups - - pinniped:request-audience - type: string - minItems: 1 - type: array - required: - - allowedGrantTypes - - allowedRedirectURIs - - allowedScopes - type: object - status: - description: Status of the OIDC client. - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/generated/1.21/README.adoc b/generated/1.21/README.adoc index e83a59ea..9eb23eb5 100644 --- a/generated/1.21/README.adoc +++ b/generated/1.21/README.adoc @@ -6,15 +6,14 @@ .Packages - xref:{anchor_prefix}-authentication-concierge-pinniped-dev-v1alpha1[$$authentication.concierge.pinniped.dev/v1alpha1$$] +- xref:{anchor_prefix}-clientsecret-supervisor-pinniped-dev-clientsecret[$$clientsecret.supervisor.pinniped.dev/clientsecret$$] +- xref:{anchor_prefix}-clientsecret-supervisor-pinniped-dev-v1alpha1[$$clientsecret.supervisor.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-config-concierge-pinniped-dev-v1alpha1[$$config.concierge.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-config-supervisor-pinniped-dev-v1alpha1[$$config.supervisor.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-identity-concierge-pinniped-dev-identity[$$identity.concierge.pinniped.dev/identity$$] - xref:{anchor_prefix}-identity-concierge-pinniped-dev-v1alpha1[$$identity.concierge.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-idp-supervisor-pinniped-dev-v1alpha1[$$idp.supervisor.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-login-concierge-pinniped-dev-v1alpha1[$$login.concierge.pinniped.dev/v1alpha1$$] -- xref:{anchor_prefix}-oauth-supervisor-pinniped-dev-v1alpha1[$$oauth.supervisor.pinniped.dev/v1alpha1$$] -- xref:{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-oauth[$$oauth.virtual.supervisor.pinniped.dev/oauth$$] -- xref:{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-v1alpha1[$$oauth.virtual.supervisor.pinniped.dev/v1alpha1$$] [id="{anchor_prefix}-authentication-concierge-pinniped-dev-v1alpha1"] @@ -213,6 +212,98 @@ Status of a webhook authenticator. +[id="{anchor_prefix}-clientsecret-supervisor-pinniped-dev-clientsecret"] +=== clientsecret.supervisor.pinniped.dev/clientsecret + +Package clientsecret is the internal version of the Pinniped client secret API. + + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-clientsecret-oidcclientsecretrequestspec"] +==== OIDCClientSecretRequestSpec + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-clientsecret-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generateNewSecret`* __boolean__ | +| *`revokeOldSecrets`* __boolean__ | +|=== + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-clientsecret-oidcclientsecretrequeststatus"] +==== OIDCClientSecretRequestStatus + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-clientsecret-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generatedSecret`* __string__ | +| *`totalClientSecrets`* __integer__ | +|=== + + + +[id="{anchor_prefix}-clientsecret-supervisor-pinniped-dev-v1alpha1"] +=== clientsecret.supervisor.pinniped.dev/v1alpha1 + +Package v1alpha1 is the v1alpha1 version of the Pinniped client secret API. + + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequestspec"] +==== OIDCClientSecretRequestSpec + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generateNewSecret`* __boolean__ | +| *`revokeOldSecrets`* __boolean__ | +|=== + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequeststatus"] +==== OIDCClientSecretRequestStatus + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generatedSecret`* __string__ | +| *`totalClientSecrets`* __integer__ | +|=== + + + [id="{anchor_prefix}-config-concierge-pinniped-dev-v1alpha1"] === config.concierge.pinniped.dev/v1alpha1 @@ -546,6 +637,51 @@ FederationDomainTLSSpec is a struct that describes the TLS configuration for an |=== +[id="{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-config-v1alpha1-oidcclient"] +==== OIDCClient + +OIDCClient describes the configuration of an OIDC client. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-config-v1alpha1-oidcclientlist[$$OIDCClientList$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#objectmeta-v1-meta[$$ObjectMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. + +| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-config-v1alpha1-oidcclientspec[$$OIDCClientSpec$$]__ | Spec of the OIDC client. +| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-config-v1alpha1-oidcclientstatus[$$OIDCClientStatus$$]__ | Status of the OIDC client. +|=== + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-config-v1alpha1-oidcclientspec"] +==== OIDCClientSpec + +OIDCClientSpec is a struct that describes an OIDC Client. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-config-v1alpha1-oidcclient[$$OIDCClient$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`allowedRedirectURIs`* __string array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be https, unless it is a loopback. +| *`allowedGrantTypes`* __GrantType array__ | allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this client. + Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. +| *`allowedScopes`* __Scope array__ | allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. + Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. +|=== + + + + [id="{anchor_prefix}-identity-concierge-pinniped-dev-identity"] === identity.concierge.pinniped.dev/identity @@ -1335,148 +1471,3 @@ TokenCredentialRequestStatus is the status of a TokenCredentialRequest, returned |=== - -[id="{anchor_prefix}-oauth-supervisor-pinniped-dev-v1alpha1"] -=== oauth.supervisor.pinniped.dev/v1alpha1 - -Package v1alpha1 is the v1alpha1 version of the Pinniped supervisor oauth API. - - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-oauth-v1alpha1-oidcclient"] -==== OIDCClient - -OIDCClient describes the configuration of an OIDC client. - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-oauth-v1alpha1-oidcclientlist[$$OIDCClientList$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#objectmeta-v1-meta[$$ObjectMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. - -| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-oauth-v1alpha1-oidcclientspec[$$OIDCClientSpec$$]__ | Spec of the OIDC client. -| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-oauth-v1alpha1-oidcclientstatus[$$OIDCClientStatus$$]__ | Status of the OIDC client. -|=== - - - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-oauth-v1alpha1-oidcclientspec"] -==== OIDCClientSpec - -OIDCClientSpec is a struct that describes an OIDC Client. - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-oauth-v1alpha1-oidcclient[$$OIDCClient$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`allowedRedirectURIs`* __string array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be https, unless it is a loopback. -| *`allowedGrantTypes`* __GrantType array__ | allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. -| *`allowedScopes`* __Scope array__ | allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. -|=== - - - - - -[id="{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-oauth"] -=== oauth.virtual.supervisor.pinniped.dev/oauth - -Package oauth is the internal version of the Pinniped virtual oauth API. - - - - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-virtual-oauth-oidcclientsecretrequestspec"] -==== OIDCClientSecretRequestSpec - - - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-virtual-oauth-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`generateNewSecret`* __boolean__ | -| *`revokeOldSecrets`* __boolean__ | -|=== - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-virtual-oauth-oidcclientsecretrequeststatus"] -==== OIDCClientSecretRequestStatus - - - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-virtual-oauth-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`generatedSecret`* __string__ | -| *`totalClientSecrets`* __integer__ | -|=== - - - -[id="{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-v1alpha1"] -=== oauth.virtual.supervisor.pinniped.dev/v1alpha1 - -Package v1alpha1 is the v1alpha1 version of the Pinniped virtual oauth API. - - - - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequestspec"] -==== OIDCClientSecretRequestSpec - - - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`generateNewSecret`* __boolean__ | -| *`revokeOldSecrets`* __boolean__ | -|=== - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequeststatus"] -==== OIDCClientSecretRequestStatus - - - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`generatedSecret`* __string__ | -| *`totalClientSecrets`* __integer__ | -|=== - - diff --git a/generated/1.21/apis/supervisor/clientsecret/doc.go b/generated/1.21/apis/supervisor/clientsecret/doc.go new file mode 100644 index 00000000..c536bc75 --- /dev/null +++ b/generated/1.21/apis/supervisor/clientsecret/doc.go @@ -0,0 +1,8 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// +k8s:deepcopy-gen=package +// +groupName=clientsecret.supervisor.pinniped.dev + +// Package clientsecret is the internal version of the Pinniped client secret API. +package clientsecret diff --git a/generated/1.21/apis/supervisor/clientsecret/register.go b/generated/1.21/apis/supervisor/clientsecret/register.go new file mode 100644 index 00000000..4a1c0173 --- /dev/null +++ b/generated/1.21/apis/supervisor/clientsecret/register.go @@ -0,0 +1,37 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package clientsecret + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +const GroupName = "clientsecret.supervisor.pinniped.dev" + +// SchemeGroupVersion is group version used to register these objects. +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} + +// Kind takes an unqualified kind and returns back a Group qualified GroupKind. +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Resource takes an unqualified resource and returns back a Group qualified GroupResource. +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + AddToScheme = SchemeBuilder.AddToScheme +) + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &OIDCClientSecretRequest{}, + ) + return nil +} diff --git a/generated/1.21/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go b/generated/1.21/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go new file mode 100644 index 00000000..7fd1eb65 --- /dev/null +++ b/generated/1.21/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go @@ -0,0 +1,25 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package clientsecret + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +type OIDCClientSecretRequestSpec struct { + GenerateNewSecret bool `json:"generateNewSecret"` + RevokeOldSecrets bool `json:"revokeOldSecrets"` +} + +type OIDCClientSecretRequestStatus struct { + GeneratedSecret string `json:"generatedSecret,omitempty"` + TotalClientSecrets int `json:"totalClientSecrets"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequest struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` // metadata.name must be set to the client ID + + Spec OIDCClientSecretRequestSpec `json:"spec"` + Status OIDCClientSecretRequestStatus `json:"status"` +} diff --git a/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/conversion.go b/generated/1.21/apis/supervisor/clientsecret/v1alpha1/conversion.go similarity index 100% rename from generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/conversion.go rename to generated/1.21/apis/supervisor/clientsecret/v1alpha1/conversion.go diff --git a/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/defaults.go b/generated/1.21/apis/supervisor/clientsecret/v1alpha1/defaults.go similarity index 100% rename from generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/defaults.go rename to generated/1.21/apis/supervisor/clientsecret/v1alpha1/defaults.go diff --git a/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/doc.go b/generated/1.21/apis/supervisor/clientsecret/v1alpha1/doc.go similarity index 64% rename from generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/doc.go rename to generated/1.21/apis/supervisor/clientsecret/v1alpha1/doc.go index b3cb2440..a8a2f252 100644 --- a/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/doc.go +++ b/generated/1.21/apis/supervisor/clientsecret/v1alpha1/doc.go @@ -3,9 +3,9 @@ // +k8s:openapi-gen=true // +k8s:deepcopy-gen=package -// +k8s:conversion-gen=go.pinniped.dev/generated/1.21/apis/supervisor/virtual/oauth +// +k8s:conversion-gen=go.pinniped.dev/generated/1.21/apis/supervisor/clientsecret // +k8s:defaulter-gen=TypeMeta -// +groupName=oauth.virtual.supervisor.pinniped.dev +// +groupName=clientsecret.supervisor.pinniped.dev -// Package v1alpha1 is the v1alpha1 version of the Pinniped virtual oauth API. +// Package v1alpha1 is the v1alpha1 version of the Pinniped client secret API. package v1alpha1 diff --git a/generated/1.21/apis/supervisor/clientsecret/v1alpha1/register.go b/generated/1.21/apis/supervisor/clientsecret/v1alpha1/register.go new file mode 100644 index 00000000..49602125 --- /dev/null +++ b/generated/1.21/apis/supervisor/clientsecret/v1alpha1/register.go @@ -0,0 +1,42 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +const GroupName = "clientsecret.supervisor.pinniped.dev" + +// SchemeGroupVersion is group version used to register these objects. +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} + +var ( + SchemeBuilder runtime.SchemeBuilder + localSchemeBuilder = &SchemeBuilder + AddToScheme = SchemeBuilder.AddToScheme +) + +func init() { + // We only register manually written functions here. The registration of the + // generated functions takes place in the generated files. The separation + // makes the code compile even when the generated files are missing. + localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs) +} + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &OIDCClientSecretRequest{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} + +// Resource takes an unqualified resource and returns back a Group qualified GroupResource. +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} diff --git a/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go b/generated/1.21/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go similarity index 100% rename from generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go rename to generated/1.21/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go diff --git a/generated/1.21/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go b/generated/1.21/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go new file mode 100644 index 00000000..a5fbb3bb --- /dev/null +++ b/generated/1.21/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go @@ -0,0 +1,131 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + clientsecret "go.pinniped.dev/generated/1.21/apis/supervisor/clientsecret" + 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((*OIDCClientSecretRequest)(nil), (*clientsecret.OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest(a.(*OIDCClientSecretRequest), b.(*clientsecret.OIDCClientSecretRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientsecret.OIDCClientSecretRequest)(nil), (*OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(a.(*clientsecret.OIDCClientSecretRequest), b.(*OIDCClientSecretRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestSpec)(nil), (*clientsecret.OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(a.(*OIDCClientSecretRequestSpec), b.(*clientsecret.OIDCClientSecretRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientsecret.OIDCClientSecretRequestSpec)(nil), (*OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(a.(*clientsecret.OIDCClientSecretRequestSpec), b.(*OIDCClientSecretRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestStatus)(nil), (*clientsecret.OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(a.(*OIDCClientSecretRequestStatus), b.(*clientsecret.OIDCClientSecretRequestStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientsecret.OIDCClientSecretRequestStatus)(nil), (*OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(a.(*clientsecret.OIDCClientSecretRequestStatus), b.(*OIDCClientSecretRequestStatus), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *clientsecret.OIDCClientSecretRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *clientsecret.OIDCClientSecretRequest, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest(in, out, s) +} + +func autoConvert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *clientsecret.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest is an autogenerated conversion function. +func Convert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *clientsecret.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { + return autoConvert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in, out, s) +} + +func autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *clientsecret.OIDCClientSecretRequestSpec, s conversion.Scope) error { + out.GenerateNewSecret = in.GenerateNewSecret + out.RevokeOldSecrets = in.RevokeOldSecrets + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *clientsecret.OIDCClientSecretRequestSpec, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(in, out, s) +} + +func autoConvert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *clientsecret.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { + out.GenerateNewSecret = in.GenerateNewSecret + out.RevokeOldSecrets = in.RevokeOldSecrets + return nil +} + +// Convert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec is an autogenerated conversion function. +func Convert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *clientsecret.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { + return autoConvert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in, out, s) +} + +func autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *clientsecret.OIDCClientSecretRequestStatus, s conversion.Scope) error { + out.GeneratedSecret = in.GeneratedSecret + out.TotalClientSecrets = in.TotalClientSecrets + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *clientsecret.OIDCClientSecretRequestStatus, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(in, out, s) +} + +func autoConvert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *clientsecret.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { + out.GeneratedSecret = in.GeneratedSecret + out.TotalClientSecrets = in.TotalClientSecrets + return nil +} + +// Convert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus is an autogenerated conversion function. +func Convert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *clientsecret.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { + return autoConvert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in, out, s) +} diff --git a/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go b/generated/1.21/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go similarity index 100% rename from generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go rename to generated/1.21/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go diff --git a/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go b/generated/1.21/apis/supervisor/clientsecret/v1alpha1/zz_generated.defaults.go similarity index 100% rename from generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go rename to generated/1.21/apis/supervisor/clientsecret/v1alpha1/zz_generated.defaults.go diff --git a/generated/1.21/apis/supervisor/clientsecret/zz_generated.deepcopy.go b/generated/1.21/apis/supervisor/clientsecret/zz_generated.deepcopy.go new file mode 100644 index 00000000..e0dc7d68 --- /dev/null +++ b/generated/1.21/apis/supervisor/clientsecret/zz_generated.deepcopy.go @@ -0,0 +1,73 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package clientsecret + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequest) DeepCopyInto(out *OIDCClientSecretRequest) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequest. +func (in *OIDCClientSecretRequest) DeepCopy() *OIDCClientSecretRequest { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestSpec. +func (in *OIDCClientSecretRequestSpec) DeepCopy() *OIDCClientSecretRequestSpec { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestStatus) DeepCopyInto(out *OIDCClientSecretRequestStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestStatus. +func (in *OIDCClientSecretRequestStatus) DeepCopy() *OIDCClientSecretRequestStatus { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestStatus) + in.DeepCopyInto(out) + return out +} diff --git a/generated/1.21/apis/supervisor/config/v1alpha1/register.go b/generated/1.21/apis/supervisor/config/v1alpha1/register.go index 69045298..54c51699 100644 --- a/generated/1.21/apis/supervisor/config/v1alpha1/register.go +++ b/generated/1.21/apis/supervisor/config/v1alpha1/register.go @@ -32,6 +32,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &FederationDomain{}, &FederationDomainList{}, + &OIDCClient{}, + &OIDCClientList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/generated/1.21/apis/supervisor/oauth/v1alpha1/types_oidcclient.go b/generated/1.21/apis/supervisor/config/v1alpha1/types_oidcclient.go similarity index 100% rename from generated/1.21/apis/supervisor/oauth/v1alpha1/types_oidcclient.go rename to generated/1.21/apis/supervisor/config/v1alpha1/types_oidcclient.go diff --git a/generated/1.21/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go b/generated/1.21/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go index 856b8988..a55d88e7 100644 --- a/generated/1.21/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go +++ b/generated/1.21/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go @@ -150,3 +150,111 @@ func (in *FederationDomainTLSSpec) DeepCopy() *FederationDomainTLSSpec { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClient) DeepCopyInto(out *OIDCClient) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClient. +func (in *OIDCClient) DeepCopy() *OIDCClient { + if in == nil { + return nil + } + out := new(OIDCClient) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClient) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientList) DeepCopyInto(out *OIDCClientList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OIDCClient, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientList. +func (in *OIDCClientList) DeepCopy() *OIDCClientList { + if in == nil { + return nil + } + out := new(OIDCClientList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSpec) DeepCopyInto(out *OIDCClientSpec) { + *out = *in + if in.AllowedRedirectURIs != nil { + in, out := &in.AllowedRedirectURIs, &out.AllowedRedirectURIs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.AllowedGrantTypes != nil { + in, out := &in.AllowedGrantTypes, &out.AllowedGrantTypes + *out = make([]GrantType, len(*in)) + copy(*out, *in) + } + if in.AllowedScopes != nil { + in, out := &in.AllowedScopes, &out.AllowedScopes + *out = make([]Scope, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSpec. +func (in *OIDCClientSpec) DeepCopy() *OIDCClientSpec { + if in == nil { + return nil + } + out := new(OIDCClientSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientStatus) DeepCopyInto(out *OIDCClientStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientStatus. +func (in *OIDCClientStatus) DeepCopy() *OIDCClientStatus { + if in == nil { + return nil + } + out := new(OIDCClientStatus) + in.DeepCopyInto(out) + return out +} diff --git a/generated/1.21/apis/supervisor/oauth/v1alpha1/doc.go b/generated/1.21/apis/supervisor/oauth/v1alpha1/doc.go deleted file mode 100644 index 75580481..00000000 --- a/generated/1.21/apis/supervisor/oauth/v1alpha1/doc.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package -// +k8s:defaulter-gen=TypeMeta -// +groupName=oauth.supervisor.pinniped.dev - -// Package v1alpha1 is the v1alpha1 version of the Pinniped supervisor oauth API. -package v1alpha1 diff --git a/generated/1.21/apis/supervisor/oauth/v1alpha1/register.go b/generated/1.21/apis/supervisor/oauth/v1alpha1/register.go deleted file mode 100644 index 37ae1fbf..00000000 --- a/generated/1.21/apis/supervisor/oauth/v1alpha1/register.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const GroupName = "oauth.supervisor.pinniped.dev" - -// SchemeGroupVersion is group version used to register these objects. -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} - -var ( - SchemeBuilder runtime.SchemeBuilder - localSchemeBuilder = &SchemeBuilder - AddToScheme = localSchemeBuilder.AddToScheme -) - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addKnownTypes) -} - -// Adds the list of known types to the given scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &OIDCClient{}, - &OIDCClientList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} - -// Resource takes an unqualified resource and returns a Group qualified GroupResource. -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} diff --git a/generated/1.21/apis/supervisor/oauth/v1alpha1/zz_generated.deepcopy.go b/generated/1.21/apis/supervisor/oauth/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index 1aba8aea..00000000 --- a/generated/1.21/apis/supervisor/oauth/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,121 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClient) DeepCopyInto(out *OIDCClient) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClient. -func (in *OIDCClient) DeepCopy() *OIDCClient { - if in == nil { - return nil - } - out := new(OIDCClient) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OIDCClient) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientList) DeepCopyInto(out *OIDCClientList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]OIDCClient, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientList. -func (in *OIDCClientList) DeepCopy() *OIDCClientList { - if in == nil { - return nil - } - out := new(OIDCClientList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OIDCClientList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientSpec) DeepCopyInto(out *OIDCClientSpec) { - *out = *in - if in.AllowedRedirectURIs != nil { - in, out := &in.AllowedRedirectURIs, &out.AllowedRedirectURIs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.AllowedGrantTypes != nil { - in, out := &in.AllowedGrantTypes, &out.AllowedGrantTypes - *out = make([]GrantType, len(*in)) - copy(*out, *in) - } - if in.AllowedScopes != nil { - in, out := &in.AllowedScopes, &out.AllowedScopes - *out = make([]Scope, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSpec. -func (in *OIDCClientSpec) DeepCopy() *OIDCClientSpec { - if in == nil { - return nil - } - out := new(OIDCClientSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientStatus) DeepCopyInto(out *OIDCClientStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientStatus. -func (in *OIDCClientStatus) DeepCopy() *OIDCClientStatus { - if in == nil { - return nil - } - out := new(OIDCClientStatus) - in.DeepCopyInto(out) - return out -} diff --git a/generated/1.21/apis/supervisor/virtual/oauth/doc.go b/generated/1.21/apis/supervisor/virtual/oauth/doc.go deleted file mode 100644 index ca4e9a63..00000000 --- a/generated/1.21/apis/supervisor/virtual/oauth/doc.go +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// +k8s:deepcopy-gen=package -// +groupName=oauth.virtual.supervisor.pinniped.dev - -// Package oauth is the internal version of the Pinniped virtual oauth API. -package oauth diff --git a/generated/1.21/apis/supervisor/virtual/oauth/register.go b/generated/1.21/apis/supervisor/virtual/oauth/register.go deleted file mode 100644 index a238d85f..00000000 --- a/generated/1.21/apis/supervisor/virtual/oauth/register.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package oauth - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const GroupName = "oauth.virtual.supervisor.pinniped.dev" - -// SchemeGroupVersion is group version used to register these objects. -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} - -// Kind takes an unqualified kind and returns back a Group qualified GroupKind. -func Kind(kind string) schema.GroupKind { - return SchemeGroupVersion.WithKind(kind).GroupKind() -} - -// Resource takes an unqualified resource and returns back a Group qualified GroupResource. -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -var ( - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - AddToScheme = SchemeBuilder.AddToScheme -) - -// Adds the list of known types to the given scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &OIDCClientSecretRequest{}, - ) - return nil -} diff --git a/generated/1.21/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go b/generated/1.21/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go deleted file mode 100644 index ac54a93c..00000000 --- a/generated/1.21/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package oauth - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -type OIDCClientSecretRequestSpec struct { - GenerateNewSecret bool `json:"generateNewSecret"` - RevokeOldSecrets bool `json:"revokeOldSecrets"` -} - -type OIDCClientSecretRequestStatus struct { - GeneratedSecret string `json:"generatedSecret,omitempty"` - TotalClientSecrets int `json:"totalClientSecrets"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type OIDCClientSecretRequest struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` // metadata.name must be set to the client ID - - Spec OIDCClientSecretRequestSpec `json:"spec"` - Status OIDCClientSecretRequestStatus `json:"status"` -} diff --git a/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/register.go b/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/register.go deleted file mode 100644 index ecc75a08..00000000 --- a/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/register.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const GroupName = "oauth.virtual.supervisor.pinniped.dev" - -// SchemeGroupVersion is group version used to register these objects. -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} - -var ( - SchemeBuilder runtime.SchemeBuilder - localSchemeBuilder = &SchemeBuilder - AddToScheme = SchemeBuilder.AddToScheme -) - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs) -} - -// Adds the list of known types to the given scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &OIDCClientSecretRequest{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} - -// Resource takes an unqualified resource and returns back a Group qualified GroupResource. -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} diff --git a/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go b/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go deleted file mode 100644 index 384717d0..00000000 --- a/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go +++ /dev/null @@ -1,131 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by conversion-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - oauth "go.pinniped.dev/generated/1.21/apis/supervisor/virtual/oauth" - 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((*OIDCClientSecretRequest)(nil), (*oauth.OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(a.(*OIDCClientSecretRequest), b.(*oauth.OIDCClientSecretRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequest)(nil), (*OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(a.(*oauth.OIDCClientSecretRequest), b.(*OIDCClientSecretRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestSpec)(nil), (*oauth.OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(a.(*OIDCClientSecretRequestSpec), b.(*oauth.OIDCClientSecretRequestSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequestSpec)(nil), (*OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(a.(*oauth.OIDCClientSecretRequestSpec), b.(*OIDCClientSecretRequestSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestStatus)(nil), (*oauth.OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(a.(*OIDCClientSecretRequestStatus), b.(*oauth.OIDCClientSecretRequestStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequestStatus)(nil), (*OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(a.(*oauth.OIDCClientSecretRequestStatus), b.(*OIDCClientSecretRequestStatus), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *oauth.OIDCClientSecretRequest, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest is an autogenerated conversion function. -func Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *oauth.OIDCClientSecretRequest, s conversion.Scope) error { - return autoConvert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in, out, s) -} - -func autoConvert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *oauth.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest is an autogenerated conversion function. -func Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *oauth.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { - return autoConvert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in, out, s) -} - -func autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *oauth.OIDCClientSecretRequestSpec, s conversion.Scope) error { - out.GenerateNewSecret = in.GenerateNewSecret - out.RevokeOldSecrets = in.RevokeOldSecrets - return nil -} - -// Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec is an autogenerated conversion function. -func Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *oauth.OIDCClientSecretRequestSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in, out, s) -} - -func autoConvert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *oauth.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { - out.GenerateNewSecret = in.GenerateNewSecret - out.RevokeOldSecrets = in.RevokeOldSecrets - return nil -} - -// Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec is an autogenerated conversion function. -func Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *oauth.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { - return autoConvert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in, out, s) -} - -func autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *oauth.OIDCClientSecretRequestStatus, s conversion.Scope) error { - out.GeneratedSecret = in.GeneratedSecret - out.TotalClientSecrets = in.TotalClientSecrets - return nil -} - -// Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus is an autogenerated conversion function. -func Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *oauth.OIDCClientSecretRequestStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in, out, s) -} - -func autoConvert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *oauth.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { - out.GeneratedSecret = in.GeneratedSecret - out.TotalClientSecrets = in.TotalClientSecrets - return nil -} - -// Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus is an autogenerated conversion function. -func Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *oauth.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { - return autoConvert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in, out, s) -} diff --git a/generated/1.21/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go b/generated/1.21/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go deleted file mode 100644 index 24b58e7b..00000000 --- a/generated/1.21/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go +++ /dev/null @@ -1,73 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package oauth - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientSecretRequest) DeepCopyInto(out *OIDCClientSecretRequest) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - out.Status = in.Status - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequest. -func (in *OIDCClientSecretRequest) DeepCopy() *OIDCClientSecretRequest { - if in == nil { - return nil - } - out := new(OIDCClientSecretRequest) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestSpec. -func (in *OIDCClientSecretRequestSpec) DeepCopy() *OIDCClientSecretRequestSpec { - if in == nil { - return nil - } - out := new(OIDCClientSecretRequestSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientSecretRequestStatus) DeepCopyInto(out *OIDCClientSecretRequestStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestStatus. -func (in *OIDCClientSecretRequestStatus) DeepCopy() *OIDCClientSecretRequestStatus { - if in == nil { - return nil - } - out := new(OIDCClientSecretRequestStatus) - in.DeepCopyInto(out) - return out -} diff --git a/generated/1.21/client/supervisor/clientset/versioned/clientset.go b/generated/1.21/client/supervisor/clientset/versioned/clientset.go index 23d76422..c4f6cd91 100644 --- a/generated/1.21/client/supervisor/clientset/versioned/clientset.go +++ b/generated/1.21/client/supervisor/clientset/versioned/clientset.go @@ -8,9 +8,9 @@ package versioned import ( "fmt" + clientsecretv1alpha1 "go.pinniped.dev/generated/1.21/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1" configv1alpha1 "go.pinniped.dev/generated/1.21/client/supervisor/clientset/versioned/typed/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.21/client/supervisor/clientset/versioned/typed/idp/v1alpha1" - oauthv1alpha1 "go.pinniped.dev/generated/1.21/client/supervisor/clientset/versioned/typed/oauth/v1alpha1" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" flowcontrol "k8s.io/client-go/util/flowcontrol" @@ -18,18 +18,23 @@ import ( type Interface interface { Discovery() discovery.DiscoveryInterface + ClientsecretV1alpha1() clientsecretv1alpha1.ClientsecretV1alpha1Interface ConfigV1alpha1() configv1alpha1.ConfigV1alpha1Interface IDPV1alpha1() idpv1alpha1.IDPV1alpha1Interface - OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface } // Clientset contains the clients for groups. Each group has exactly one // version included in a Clientset. type Clientset struct { *discovery.DiscoveryClient - configV1alpha1 *configv1alpha1.ConfigV1alpha1Client - iDPV1alpha1 *idpv1alpha1.IDPV1alpha1Client - oauthV1alpha1 *oauthv1alpha1.OauthV1alpha1Client + clientsecretV1alpha1 *clientsecretv1alpha1.ClientsecretV1alpha1Client + configV1alpha1 *configv1alpha1.ConfigV1alpha1Client + iDPV1alpha1 *idpv1alpha1.IDPV1alpha1Client +} + +// ClientsecretV1alpha1 retrieves the ClientsecretV1alpha1Client +func (c *Clientset) ClientsecretV1alpha1() clientsecretv1alpha1.ClientsecretV1alpha1Interface { + return c.clientsecretV1alpha1 } // ConfigV1alpha1 retrieves the ConfigV1alpha1Client @@ -42,11 +47,6 @@ func (c *Clientset) IDPV1alpha1() idpv1alpha1.IDPV1alpha1Interface { return c.iDPV1alpha1 } -// OauthV1alpha1 retrieves the OauthV1alpha1Client -func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { - return c.oauthV1alpha1 -} - // Discovery retrieves the DiscoveryClient func (c *Clientset) Discovery() discovery.DiscoveryInterface { if c == nil { @@ -68,6 +68,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { } var cs Clientset var err error + cs.clientsecretV1alpha1, err = clientsecretv1alpha1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } cs.configV1alpha1, err = configv1alpha1.NewForConfig(&configShallowCopy) if err != nil { return nil, err @@ -76,10 +80,6 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { if err != nil { return nil, err } - cs.oauthV1alpha1, err = oauthv1alpha1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) if err != nil { @@ -92,9 +92,9 @@ 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.clientsecretV1alpha1 = clientsecretv1alpha1.NewForConfigOrDie(c) cs.configV1alpha1 = configv1alpha1.NewForConfigOrDie(c) cs.iDPV1alpha1 = idpv1alpha1.NewForConfigOrDie(c) - cs.oauthV1alpha1 = oauthv1alpha1.NewForConfigOrDie(c) cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) return &cs @@ -103,9 +103,9 @@ 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.clientsecretV1alpha1 = clientsecretv1alpha1.New(c) cs.configV1alpha1 = configv1alpha1.New(c) cs.iDPV1alpha1 = idpv1alpha1.New(c) - cs.oauthV1alpha1 = oauthv1alpha1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) return &cs diff --git a/generated/1.21/client/supervisor/clientset/versioned/fake/clientset_generated.go b/generated/1.21/client/supervisor/clientset/versioned/fake/clientset_generated.go index 6a40aa3e..6d7f5f4b 100644 --- a/generated/1.21/client/supervisor/clientset/versioned/fake/clientset_generated.go +++ b/generated/1.21/client/supervisor/clientset/versioned/fake/clientset_generated.go @@ -7,12 +7,12 @@ package fake import ( clientset "go.pinniped.dev/generated/1.21/client/supervisor/clientset/versioned" + clientsecretv1alpha1 "go.pinniped.dev/generated/1.21/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1" + fakeclientsecretv1alpha1 "go.pinniped.dev/generated/1.21/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake" configv1alpha1 "go.pinniped.dev/generated/1.21/client/supervisor/clientset/versioned/typed/config/v1alpha1" fakeconfigv1alpha1 "go.pinniped.dev/generated/1.21/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake" idpv1alpha1 "go.pinniped.dev/generated/1.21/client/supervisor/clientset/versioned/typed/idp/v1alpha1" fakeidpv1alpha1 "go.pinniped.dev/generated/1.21/client/supervisor/clientset/versioned/typed/idp/v1alpha1/fake" - oauthv1alpha1 "go.pinniped.dev/generated/1.21/client/supervisor/clientset/versioned/typed/oauth/v1alpha1" - fakeoauthv1alpha1 "go.pinniped.dev/generated/1.21/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/discovery" @@ -67,6 +67,11 @@ func (c *Clientset) Tracker() testing.ObjectTracker { var _ clientset.Interface = &Clientset{} +// ClientsecretV1alpha1 retrieves the ClientsecretV1alpha1Client +func (c *Clientset) ClientsecretV1alpha1() clientsecretv1alpha1.ClientsecretV1alpha1Interface { + return &fakeclientsecretv1alpha1.FakeClientsecretV1alpha1{Fake: &c.Fake} +} + // ConfigV1alpha1 retrieves the ConfigV1alpha1Client func (c *Clientset) ConfigV1alpha1() configv1alpha1.ConfigV1alpha1Interface { return &fakeconfigv1alpha1.FakeConfigV1alpha1{Fake: &c.Fake} @@ -76,8 +81,3 @@ func (c *Clientset) ConfigV1alpha1() configv1alpha1.ConfigV1alpha1Interface { func (c *Clientset) IDPV1alpha1() idpv1alpha1.IDPV1alpha1Interface { return &fakeidpv1alpha1.FakeIDPV1alpha1{Fake: &c.Fake} } - -// OauthV1alpha1 retrieves the OauthV1alpha1Client -func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { - return &fakeoauthv1alpha1.FakeOauthV1alpha1{Fake: &c.Fake} -} diff --git a/generated/1.21/client/supervisor/clientset/versioned/fake/register.go b/generated/1.21/client/supervisor/clientset/versioned/fake/register.go index 8fb2f241..85bd10d3 100644 --- a/generated/1.21/client/supervisor/clientset/versioned/fake/register.go +++ b/generated/1.21/client/supervisor/clientset/versioned/fake/register.go @@ -6,9 +6,9 @@ package fake import ( + clientsecretv1alpha1 "go.pinniped.dev/generated/1.21/apis/supervisor/clientsecret/v1alpha1" configv1alpha1 "go.pinniped.dev/generated/1.21/apis/supervisor/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.21/apis/supervisor/idp/v1alpha1" - oauthv1alpha1 "go.pinniped.dev/generated/1.21/apis/supervisor/oauth/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -20,9 +20,9 @@ var scheme = runtime.NewScheme() var codecs = serializer.NewCodecFactory(scheme) var localSchemeBuilder = runtime.SchemeBuilder{ + clientsecretv1alpha1.AddToScheme, configv1alpha1.AddToScheme, idpv1alpha1.AddToScheme, - oauthv1alpha1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/generated/1.21/client/supervisor/clientset/versioned/scheme/register.go b/generated/1.21/client/supervisor/clientset/versioned/scheme/register.go index ca3c854a..304f3c6a 100644 --- a/generated/1.21/client/supervisor/clientset/versioned/scheme/register.go +++ b/generated/1.21/client/supervisor/clientset/versioned/scheme/register.go @@ -6,9 +6,9 @@ package scheme import ( + clientsecretv1alpha1 "go.pinniped.dev/generated/1.21/apis/supervisor/clientsecret/v1alpha1" configv1alpha1 "go.pinniped.dev/generated/1.21/apis/supervisor/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.21/apis/supervisor/idp/v1alpha1" - oauthv1alpha1 "go.pinniped.dev/generated/1.21/apis/supervisor/oauth/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -20,9 +20,9 @@ var Scheme = runtime.NewScheme() var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) var localSchemeBuilder = runtime.SchemeBuilder{ + clientsecretv1alpha1.AddToScheme, configv1alpha1.AddToScheme, idpv1alpha1.AddToScheme, - oauthv1alpha1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/generated/1.21/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/clientsecret_client.go b/generated/1.21/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/clientsecret_client.go new file mode 100644 index 00000000..d9db843c --- /dev/null +++ b/generated/1.21/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/clientsecret_client.go @@ -0,0 +1,76 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "go.pinniped.dev/generated/1.21/apis/supervisor/clientsecret/v1alpha1" + "go.pinniped.dev/generated/1.21/client/supervisor/clientset/versioned/scheme" + rest "k8s.io/client-go/rest" +) + +type ClientsecretV1alpha1Interface interface { + RESTClient() rest.Interface + OIDCClientSecretRequestsGetter +} + +// ClientsecretV1alpha1Client is used to interact with features provided by the clientsecret.supervisor.pinniped.dev group. +type ClientsecretV1alpha1Client struct { + restClient rest.Interface +} + +func (c *ClientsecretV1alpha1Client) OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface { + return newOIDCClientSecretRequests(c, namespace) +} + +// NewForConfig creates a new ClientsecretV1alpha1Client for the given config. +func NewForConfig(c *rest.Config) (*ClientsecretV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &ClientsecretV1alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new ClientsecretV1alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *ClientsecretV1alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new ClientsecretV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *ClientsecretV1alpha1Client { + return &ClientsecretV1alpha1Client{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 *ClientsecretV1alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/generated/1.19/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/doc.go b/generated/1.21/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/doc.go similarity index 100% rename from generated/1.19/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/doc.go rename to generated/1.21/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/doc.go diff --git a/generated/1.19/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go b/generated/1.21/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/doc.go similarity index 100% rename from generated/1.19/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go rename to generated/1.21/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/doc.go diff --git a/generated/1.21/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go b/generated/1.21/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_clientsecret_client.go similarity index 60% rename from generated/1.21/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go rename to generated/1.21/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_clientsecret_client.go index 8e56072b..b35b1015 100644 --- a/generated/1.21/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go +++ b/generated/1.21/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_clientsecret_client.go @@ -6,22 +6,22 @@ package fake import ( - v1alpha1 "go.pinniped.dev/generated/1.21/client/supervisor/clientset/versioned/typed/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.21/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1" rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" ) -type FakeOauthV1alpha1 struct { +type FakeClientsecretV1alpha1 struct { *testing.Fake } -func (c *FakeOauthV1alpha1) OIDCClients(namespace string) v1alpha1.OIDCClientInterface { - return &FakeOIDCClients{c, namespace} +func (c *FakeClientsecretV1alpha1) OIDCClientSecretRequests(namespace string) v1alpha1.OIDCClientSecretRequestInterface { + return &FakeOIDCClientSecretRequests{c, namespace} } // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeOauthV1alpha1) RESTClient() rest.Interface { +func (c *FakeClientsecretV1alpha1) RESTClient() rest.Interface { var ret *rest.RESTClient return ret } diff --git a/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go b/generated/1.21/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_oidcclientsecretrequest.go similarity index 79% rename from generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go rename to generated/1.21/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_oidcclientsecretrequest.go index 6560769b..adb64142 100644 --- a/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go +++ b/generated/1.21/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_oidcclientsecretrequest.go @@ -8,7 +8,7 @@ package fake import ( "context" - v1alpha1 "go.pinniped.dev/generated/1.19/apis/supervisor/virtual/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.21/apis/supervisor/clientsecret/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" testing "k8s.io/client-go/testing" @@ -16,13 +16,13 @@ import ( // FakeOIDCClientSecretRequests implements OIDCClientSecretRequestInterface type FakeOIDCClientSecretRequests struct { - Fake *FakeOauthV1alpha1 + Fake *FakeClientsecretV1alpha1 ns string } -var oidcclientsecretrequestsResource = schema.GroupVersionResource{Group: "oauth.virtual.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclientsecretrequests"} +var oidcclientsecretrequestsResource = schema.GroupVersionResource{Group: "clientsecret.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclientsecretrequests"} -var oidcclientsecretrequestsKind = schema.GroupVersionKind{Group: "oauth.virtual.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClientSecretRequest"} +var oidcclientsecretrequestsKind = schema.GroupVersionKind{Group: "clientsecret.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClientSecretRequest"} // Create takes the representation of a oIDCClientSecretRequest and creates it. Returns the server's representation of the oIDCClientSecretRequest, and an error, if there is any. func (c *FakeOIDCClientSecretRequests) Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (result *v1alpha1.OIDCClientSecretRequest, err error) { diff --git a/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go b/generated/1.21/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/generated_expansion.go similarity index 100% rename from generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go rename to generated/1.21/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/generated_expansion.go diff --git a/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go b/generated/1.21/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/oidcclientsecretrequest.go similarity index 86% rename from generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go rename to generated/1.21/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/oidcclientsecretrequest.go index 3b8b2f84..7fc447f4 100644 --- a/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go +++ b/generated/1.21/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/oidcclientsecretrequest.go @@ -8,8 +8,8 @@ package v1alpha1 import ( "context" - v1alpha1 "go.pinniped.dev/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1" - scheme "go.pinniped.dev/generated/1.21/client/supervisor/virtual/clientset/versioned/scheme" + v1alpha1 "go.pinniped.dev/generated/1.21/apis/supervisor/clientsecret/v1alpha1" + scheme "go.pinniped.dev/generated/1.21/client/supervisor/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" rest "k8s.io/client-go/rest" ) @@ -33,7 +33,7 @@ type oIDCClientSecretRequests struct { } // newOIDCClientSecretRequests returns a OIDCClientSecretRequests -func newOIDCClientSecretRequests(c *OauthV1alpha1Client, namespace string) *oIDCClientSecretRequests { +func newOIDCClientSecretRequests(c *ClientsecretV1alpha1Client, namespace string) *oIDCClientSecretRequests { return &oIDCClientSecretRequests{ client: c.RESTClient(), ns: namespace, diff --git a/generated/1.21/client/supervisor/clientset/versioned/typed/config/v1alpha1/config_client.go b/generated/1.21/client/supervisor/clientset/versioned/typed/config/v1alpha1/config_client.go index cdfc9c9a..d2b845f9 100644 --- a/generated/1.21/client/supervisor/clientset/versioned/typed/config/v1alpha1/config_client.go +++ b/generated/1.21/client/supervisor/clientset/versioned/typed/config/v1alpha1/config_client.go @@ -14,6 +14,7 @@ import ( type ConfigV1alpha1Interface interface { RESTClient() rest.Interface FederationDomainsGetter + OIDCClientsGetter } // ConfigV1alpha1Client is used to interact with features provided by the config.supervisor.pinniped.dev group. @@ -25,6 +26,10 @@ func (c *ConfigV1alpha1Client) FederationDomains(namespace string) FederationDom return newFederationDomains(c, namespace) } +func (c *ConfigV1alpha1Client) OIDCClients(namespace string) OIDCClientInterface { + return newOIDCClients(c, namespace) +} + // NewForConfig creates a new ConfigV1alpha1Client for the given config. func NewForConfig(c *rest.Config) (*ConfigV1alpha1Client, error) { config := *c diff --git a/generated/1.21/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go b/generated/1.21/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go index 8bf53fea..d8bf41b3 100644 --- a/generated/1.21/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go +++ b/generated/1.21/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go @@ -19,6 +19,10 @@ func (c *FakeConfigV1alpha1) FederationDomains(namespace string) v1alpha1.Federa return &FakeFederationDomains{c, namespace} } +func (c *FakeConfigV1alpha1) OIDCClients(namespace string) v1alpha1.OIDCClientInterface { + return &FakeOIDCClients{c, namespace} +} + // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. func (c *FakeConfigV1alpha1) RESTClient() rest.Interface { diff --git a/generated/1.20/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclient.go b/generated/1.21/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_oidcclient.go similarity index 92% rename from generated/1.20/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclient.go rename to generated/1.21/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_oidcclient.go index 38aac300..7dbc152b 100644 --- a/generated/1.20/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclient.go +++ b/generated/1.21/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_oidcclient.go @@ -8,7 +8,7 @@ package fake import ( "context" - v1alpha1 "go.pinniped.dev/generated/1.20/apis/supervisor/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.21/apis/supervisor/config/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -19,13 +19,13 @@ import ( // FakeOIDCClients implements OIDCClientInterface type FakeOIDCClients struct { - Fake *FakeOauthV1alpha1 + Fake *FakeConfigV1alpha1 ns string } -var oidcclientsResource = schema.GroupVersionResource{Group: "oauth.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclients"} +var oidcclientsResource = schema.GroupVersionResource{Group: "config.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclients"} -var oidcclientsKind = schema.GroupVersionKind{Group: "oauth.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClient"} +var oidcclientsKind = schema.GroupVersionKind{Group: "config.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClient"} // Get takes name of the oIDCClient, and returns the corresponding oIDCClient object, and an error if there is any. func (c *FakeOIDCClients) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.OIDCClient, err error) { diff --git a/generated/1.21/client/supervisor/clientset/versioned/typed/config/v1alpha1/generated_expansion.go b/generated/1.21/client/supervisor/clientset/versioned/typed/config/v1alpha1/generated_expansion.go index ba9c9173..35b9ee3d 100644 --- a/generated/1.21/client/supervisor/clientset/versioned/typed/config/v1alpha1/generated_expansion.go +++ b/generated/1.21/client/supervisor/clientset/versioned/typed/config/v1alpha1/generated_expansion.go @@ -6,3 +6,5 @@ package v1alpha1 type FederationDomainExpansion interface{} + +type OIDCClientExpansion interface{} diff --git a/generated/1.21/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oidcclient.go b/generated/1.21/client/supervisor/clientset/versioned/typed/config/v1alpha1/oidcclient.go similarity index 97% rename from generated/1.21/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oidcclient.go rename to generated/1.21/client/supervisor/clientset/versioned/typed/config/v1alpha1/oidcclient.go index c7e2f82b..10f97b4f 100644 --- a/generated/1.21/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oidcclient.go +++ b/generated/1.21/client/supervisor/clientset/versioned/typed/config/v1alpha1/oidcclient.go @@ -9,7 +9,7 @@ import ( "context" "time" - v1alpha1 "go.pinniped.dev/generated/1.21/apis/supervisor/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.21/apis/supervisor/config/v1alpha1" scheme "go.pinniped.dev/generated/1.21/client/supervisor/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -44,7 +44,7 @@ type oIDCClients struct { } // newOIDCClients returns a OIDCClients -func newOIDCClients(c *OauthV1alpha1Client, namespace string) *oIDCClients { +func newOIDCClients(c *ConfigV1alpha1Client, namespace string) *oIDCClients { return &oIDCClients{ client: c.RESTClient(), ns: namespace, diff --git a/generated/1.21/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go b/generated/1.21/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go deleted file mode 100644 index 87d22ea9..00000000 --- a/generated/1.21/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -type OIDCClientExpansion interface{} diff --git a/generated/1.21/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go b/generated/1.21/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go deleted file mode 100644 index 259f1b10..00000000 --- a/generated/1.21/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1alpha1 "go.pinniped.dev/generated/1.21/apis/supervisor/oauth/v1alpha1" - "go.pinniped.dev/generated/1.21/client/supervisor/clientset/versioned/scheme" - rest "k8s.io/client-go/rest" -) - -type OauthV1alpha1Interface interface { - RESTClient() rest.Interface - OIDCClientsGetter -} - -// OauthV1alpha1Client is used to interact with features provided by the oauth.supervisor.pinniped.dev group. -type OauthV1alpha1Client struct { - restClient rest.Interface -} - -func (c *OauthV1alpha1Client) OIDCClients(namespace string) OIDCClientInterface { - return newOIDCClients(c, namespace) -} - -// NewForConfig creates a new OauthV1alpha1Client for the given config. -func NewForConfig(c *rest.Config) (*OauthV1alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &OauthV1alpha1Client{client}, nil -} - -// NewForConfigOrDie creates a new OauthV1alpha1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *OauthV1alpha1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new OauthV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *OauthV1alpha1Client { - return &OauthV1alpha1Client{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 *OauthV1alpha1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/generated/1.21/client/supervisor/informers/externalversions/config/v1alpha1/interface.go b/generated/1.21/client/supervisor/informers/externalversions/config/v1alpha1/interface.go index e678f3e3..e3cf746d 100644 --- a/generated/1.21/client/supervisor/informers/externalversions/config/v1alpha1/interface.go +++ b/generated/1.21/client/supervisor/informers/externalversions/config/v1alpha1/interface.go @@ -13,6 +13,8 @@ import ( type Interface interface { // FederationDomains returns a FederationDomainInformer. FederationDomains() FederationDomainInformer + // OIDCClients returns a OIDCClientInformer. + OIDCClients() OIDCClientInformer } type version struct { @@ -30,3 +32,8 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList func (v *version) FederationDomains() FederationDomainInformer { return &federationDomainInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } + +// OIDCClients returns a OIDCClientInformer. +func (v *version) OIDCClients() OIDCClientInformer { + return &oIDCClientInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} diff --git a/generated/1.21/client/supervisor/informers/externalversions/oauth/v1alpha1/oidcclient.go b/generated/1.21/client/supervisor/informers/externalversions/config/v1alpha1/oidcclient.go similarity index 88% rename from generated/1.21/client/supervisor/informers/externalversions/oauth/v1alpha1/oidcclient.go rename to generated/1.21/client/supervisor/informers/externalversions/config/v1alpha1/oidcclient.go index f56b83db..dda5d6d3 100644 --- a/generated/1.21/client/supervisor/informers/externalversions/oauth/v1alpha1/oidcclient.go +++ b/generated/1.21/client/supervisor/informers/externalversions/config/v1alpha1/oidcclient.go @@ -9,10 +9,10 @@ import ( "context" time "time" - oauthv1alpha1 "go.pinniped.dev/generated/1.21/apis/supervisor/oauth/v1alpha1" + configv1alpha1 "go.pinniped.dev/generated/1.21/apis/supervisor/config/v1alpha1" versioned "go.pinniped.dev/generated/1.21/client/supervisor/clientset/versioned" internalinterfaces "go.pinniped.dev/generated/1.21/client/supervisor/informers/externalversions/internalinterfaces" - v1alpha1 "go.pinniped.dev/generated/1.21/client/supervisor/listers/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.21/client/supervisor/listers/config/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -49,16 +49,16 @@ func NewFilteredOIDCClientInformer(client versioned.Interface, namespace string, if tweakListOptions != nil { tweakListOptions(&options) } - return client.OauthV1alpha1().OIDCClients(namespace).List(context.TODO(), options) + return client.ConfigV1alpha1().OIDCClients(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.OauthV1alpha1().OIDCClients(namespace).Watch(context.TODO(), options) + return client.ConfigV1alpha1().OIDCClients(namespace).Watch(context.TODO(), options) }, }, - &oauthv1alpha1.OIDCClient{}, + &configv1alpha1.OIDCClient{}, resyncPeriod, indexers, ) @@ -69,7 +69,7 @@ func (f *oIDCClientInformer) defaultInformer(client versioned.Interface, resyncP } func (f *oIDCClientInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&oauthv1alpha1.OIDCClient{}, f.defaultInformer) + return f.factory.InformerFor(&configv1alpha1.OIDCClient{}, f.defaultInformer) } func (f *oIDCClientInformer) Lister() v1alpha1.OIDCClientLister { diff --git a/generated/1.21/client/supervisor/informers/externalversions/factory.go b/generated/1.21/client/supervisor/informers/externalversions/factory.go index 5f2301a2..09200fa1 100644 --- a/generated/1.21/client/supervisor/informers/externalversions/factory.go +++ b/generated/1.21/client/supervisor/informers/externalversions/factory.go @@ -14,7 +14,6 @@ import ( config "go.pinniped.dev/generated/1.21/client/supervisor/informers/externalversions/config" idp "go.pinniped.dev/generated/1.21/client/supervisor/informers/externalversions/idp" internalinterfaces "go.pinniped.dev/generated/1.21/client/supervisor/informers/externalversions/internalinterfaces" - oauth "go.pinniped.dev/generated/1.21/client/supervisor/informers/externalversions/oauth" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -163,7 +162,6 @@ type SharedInformerFactory interface { Config() config.Interface IDP() idp.Interface - Oauth() oauth.Interface } func (f *sharedInformerFactory) Config() config.Interface { @@ -173,7 +171,3 @@ func (f *sharedInformerFactory) Config() config.Interface { func (f *sharedInformerFactory) IDP() idp.Interface { return idp.New(f, f.namespace, f.tweakListOptions) } - -func (f *sharedInformerFactory) Oauth() oauth.Interface { - return oauth.New(f, f.namespace, f.tweakListOptions) -} diff --git a/generated/1.21/client/supervisor/informers/externalversions/generic.go b/generated/1.21/client/supervisor/informers/externalversions/generic.go index d08e96cf..7ea48934 100644 --- a/generated/1.21/client/supervisor/informers/externalversions/generic.go +++ b/generated/1.21/client/supervisor/informers/externalversions/generic.go @@ -10,7 +10,6 @@ import ( v1alpha1 "go.pinniped.dev/generated/1.21/apis/supervisor/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.21/apis/supervisor/idp/v1alpha1" - oauthv1alpha1 "go.pinniped.dev/generated/1.21/apis/supervisor/oauth/v1alpha1" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" ) @@ -44,6 +43,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource // Group=config.supervisor.pinniped.dev, Version=v1alpha1 case v1alpha1.SchemeGroupVersion.WithResource("federationdomains"): return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1alpha1().FederationDomains().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("oidcclients"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1alpha1().OIDCClients().Informer()}, nil // Group=idp.supervisor.pinniped.dev, Version=v1alpha1 case idpv1alpha1.SchemeGroupVersion.WithResource("activedirectoryidentityproviders"): @@ -53,10 +54,6 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource case idpv1alpha1.SchemeGroupVersion.WithResource("oidcidentityproviders"): return &genericInformer{resource: resource.GroupResource(), informer: f.IDP().V1alpha1().OIDCIdentityProviders().Informer()}, nil - // Group=oauth.supervisor.pinniped.dev, Version=v1alpha1 - case oauthv1alpha1.SchemeGroupVersion.WithResource("oidcclients"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Oauth().V1alpha1().OIDCClients().Informer()}, nil - } return nil, fmt.Errorf("no informer found for %v", resource) diff --git a/generated/1.21/client/supervisor/informers/externalversions/oauth/interface.go b/generated/1.21/client/supervisor/informers/externalversions/oauth/interface.go deleted file mode 100644 index d734d0d3..00000000 --- a/generated/1.21/client/supervisor/informers/externalversions/oauth/interface.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by informer-gen. DO NOT EDIT. - -package oauth - -import ( - internalinterfaces "go.pinniped.dev/generated/1.21/client/supervisor/informers/externalversions/internalinterfaces" - v1alpha1 "go.pinniped.dev/generated/1.21/client/supervisor/informers/externalversions/oauth/v1alpha1" -) - -// Interface provides access to each of this group's versions. -type Interface interface { - // V1alpha1 provides access to shared informers for resources in V1alpha1. - V1alpha1() v1alpha1.Interface -} - -type group struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// V1alpha1 returns a new v1alpha1.Interface. -func (g *group) V1alpha1() v1alpha1.Interface { - return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) -} diff --git a/generated/1.21/client/supervisor/informers/externalversions/oauth/v1alpha1/interface.go b/generated/1.21/client/supervisor/informers/externalversions/oauth/v1alpha1/interface.go deleted file mode 100644 index 05ad0a58..00000000 --- a/generated/1.21/client/supervisor/informers/externalversions/oauth/v1alpha1/interface.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - internalinterfaces "go.pinniped.dev/generated/1.21/client/supervisor/informers/externalversions/internalinterfaces" -) - -// Interface provides access to all the informers in this group version. -type Interface interface { - // OIDCClients returns a OIDCClientInformer. - OIDCClients() OIDCClientInformer -} - -type version struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// OIDCClients returns a OIDCClientInformer. -func (v *version) OIDCClients() OIDCClientInformer { - return &oIDCClientInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} diff --git a/generated/1.21/client/supervisor/listers/config/v1alpha1/expansion_generated.go b/generated/1.21/client/supervisor/listers/config/v1alpha1/expansion_generated.go index d59892c4..bda2f20e 100644 --- a/generated/1.21/client/supervisor/listers/config/v1alpha1/expansion_generated.go +++ b/generated/1.21/client/supervisor/listers/config/v1alpha1/expansion_generated.go @@ -12,3 +12,11 @@ type FederationDomainListerExpansion interface{} // FederationDomainNamespaceListerExpansion allows custom methods to be added to // FederationDomainNamespaceLister. type FederationDomainNamespaceListerExpansion interface{} + +// OIDCClientListerExpansion allows custom methods to be added to +// OIDCClientLister. +type OIDCClientListerExpansion interface{} + +// OIDCClientNamespaceListerExpansion allows custom methods to be added to +// OIDCClientNamespaceLister. +type OIDCClientNamespaceListerExpansion interface{} diff --git a/generated/1.19/client/supervisor/listers/oauth/v1alpha1/oidcclient.go b/generated/1.21/client/supervisor/listers/config/v1alpha1/oidcclient.go similarity index 97% rename from generated/1.19/client/supervisor/listers/oauth/v1alpha1/oidcclient.go rename to generated/1.21/client/supervisor/listers/config/v1alpha1/oidcclient.go index 7040f4c9..72abf61d 100644 --- a/generated/1.19/client/supervisor/listers/oauth/v1alpha1/oidcclient.go +++ b/generated/1.21/client/supervisor/listers/config/v1alpha1/oidcclient.go @@ -6,7 +6,7 @@ package v1alpha1 import ( - v1alpha1 "go.pinniped.dev/generated/1.19/apis/supervisor/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.21/apis/supervisor/config/v1alpha1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" diff --git a/generated/1.21/client/supervisor/listers/oauth/v1alpha1/expansion_generated.go b/generated/1.21/client/supervisor/listers/oauth/v1alpha1/expansion_generated.go deleted file mode 100644 index c19310da..00000000 --- a/generated/1.21/client/supervisor/listers/oauth/v1alpha1/expansion_generated.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha1 - -// OIDCClientListerExpansion allows custom methods to be added to -// OIDCClientLister. -type OIDCClientListerExpansion interface{} - -// OIDCClientNamespaceListerExpansion allows custom methods to be added to -// OIDCClientNamespaceLister. -type OIDCClientNamespaceListerExpansion interface{} diff --git a/generated/1.21/client/supervisor/virtual/clientset/versioned/clientset.go b/generated/1.21/client/supervisor/virtual/clientset/versioned/clientset.go deleted file mode 100644 index 93a539cc..00000000 --- a/generated/1.21/client/supervisor/virtual/clientset/versioned/clientset.go +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package versioned - -import ( - "fmt" - - oauthv1alpha1 "go.pinniped.dev/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" - discovery "k8s.io/client-go/discovery" - rest "k8s.io/client-go/rest" - flowcontrol "k8s.io/client-go/util/flowcontrol" -) - -type Interface interface { - Discovery() discovery.DiscoveryInterface - OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface -} - -// Clientset contains the clients for groups. Each group has exactly one -// version included in a Clientset. -type Clientset struct { - *discovery.DiscoveryClient - oauthV1alpha1 *oauthv1alpha1.OauthV1alpha1Client -} - -// OauthV1alpha1 retrieves the OauthV1alpha1Client -func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { - return c.oauthV1alpha1 -} - -// Discovery retrieves the DiscoveryClient -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - if c == nil { - return nil - } - return c.DiscoveryClient -} - -// NewForConfig creates a new Clientset for the given config. -// If config's RateLimiter is not set and QPS and Burst are acceptable, -// NewForConfig will generate a rate-limiter in configShallowCopy. -func NewForConfig(c *rest.Config) (*Clientset, error) { - configShallowCopy := *c - if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { - if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") - } - configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) - } - var cs Clientset - var err error - cs.oauthV1alpha1, err = oauthv1alpha1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - - cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - return &cs, nil -} - -// NewForConfigOrDie creates a new Clientset for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *Clientset { - var cs Clientset - cs.oauthV1alpha1 = oauthv1alpha1.NewForConfigOrDie(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) - return &cs -} - -// New creates a new Clientset for the given RESTClient. -func New(c rest.Interface) *Clientset { - var cs Clientset - cs.oauthV1alpha1 = oauthv1alpha1.New(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClient(c) - return &cs -} diff --git a/generated/1.21/client/supervisor/virtual/clientset/versioned/doc.go b/generated/1.21/client/supervisor/virtual/clientset/versioned/doc.go deleted file mode 100644 index 5dc02e6e..00000000 --- a/generated/1.21/client/supervisor/virtual/clientset/versioned/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated clientset. -package versioned diff --git a/generated/1.21/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go b/generated/1.21/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go deleted file mode 100644 index fcf86e29..00000000 --- a/generated/1.21/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - clientset "go.pinniped.dev/generated/1.21/client/supervisor/virtual/clientset/versioned" - oauthv1alpha1 "go.pinniped.dev/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" - fakeoauthv1alpha1 "go.pinniped.dev/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/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" -) - -// NewSimpleClientset returns a clientset that will respond with the provided objects. -// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, -// without applying any validations and/or defaults. It shouldn't be considered a replacement -// for a real clientset and is mostly useful in simple unit tests. -func NewSimpleClientset(objects ...runtime.Object) *Clientset { - o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) - for _, obj := range objects { - if err := o.Add(obj); err != nil { - panic(err) - } - } - - cs := &Clientset{tracker: o} - cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} - cs.AddReactor("*", "*", testing.ObjectReaction(o)) - cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { - gvr := action.GetResource() - ns := action.GetNamespace() - watch, err := o.Watch(gvr, ns) - if err != nil { - return false, nil, err - } - return true, watch, nil - }) - - return cs -} - -// Clientset implements clientset.Interface. Meant to be embedded into a -// struct to get a default implementation. This makes faking out just the method -// you want to test easier. -type Clientset struct { - testing.Fake - discovery *fakediscovery.FakeDiscovery - tracker testing.ObjectTracker -} - -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - return c.discovery -} - -func (c *Clientset) Tracker() testing.ObjectTracker { - return c.tracker -} - -var _ clientset.Interface = &Clientset{} - -// OauthV1alpha1 retrieves the OauthV1alpha1Client -func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { - return &fakeoauthv1alpha1.FakeOauthV1alpha1{Fake: &c.Fake} -} diff --git a/generated/1.21/client/supervisor/virtual/clientset/versioned/fake/doc.go b/generated/1.21/client/supervisor/virtual/clientset/versioned/fake/doc.go deleted file mode 100644 index 7c9538fd..00000000 --- a/generated/1.21/client/supervisor/virtual/clientset/versioned/fake/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated fake clientset. -package fake diff --git a/generated/1.21/client/supervisor/virtual/clientset/versioned/fake/register.go b/generated/1.21/client/supervisor/virtual/clientset/versioned/fake/register.go deleted file mode 100644 index c7b66d2c..00000000 --- a/generated/1.21/client/supervisor/virtual/clientset/versioned/fake/register.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - oauthv1alpha1 "go.pinniped.dev/generated/1.21/apis/supervisor/virtual/oauth/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" -) - -var scheme = runtime.NewScheme() -var codecs = serializer.NewCodecFactory(scheme) - -var localSchemeBuilder = runtime.SchemeBuilder{ - oauthv1alpha1.AddToScheme, -} - -// AddToScheme adds all types of this clientset into the given scheme. This allows composition -// of clientsets, like in: -// -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) -// -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) -// -// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types -// correctly. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(scheme)) -} diff --git a/generated/1.21/client/supervisor/virtual/clientset/versioned/scheme/doc.go b/generated/1.21/client/supervisor/virtual/clientset/versioned/scheme/doc.go deleted file mode 100644 index cc02f1d3..00000000 --- a/generated/1.21/client/supervisor/virtual/clientset/versioned/scheme/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// This package contains the scheme of the automatically generated clientset. -package scheme diff --git a/generated/1.21/client/supervisor/virtual/clientset/versioned/scheme/register.go b/generated/1.21/client/supervisor/virtual/clientset/versioned/scheme/register.go deleted file mode 100644 index 3afd089b..00000000 --- a/generated/1.21/client/supervisor/virtual/clientset/versioned/scheme/register.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package scheme - -import ( - oauthv1alpha1 "go.pinniped.dev/generated/1.21/apis/supervisor/virtual/oauth/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" -) - -var Scheme = runtime.NewScheme() -var Codecs = serializer.NewCodecFactory(Scheme) -var ParameterCodec = runtime.NewParameterCodec(Scheme) -var localSchemeBuilder = runtime.SchemeBuilder{ - oauthv1alpha1.AddToScheme, -} - -// AddToScheme adds all types of this clientset into the given scheme. This allows composition -// of clientsets, like in: -// -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) -// -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) -// -// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types -// correctly. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(Scheme)) -} diff --git a/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go b/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go deleted file mode 100644 index e7a470b6..00000000 --- a/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1alpha1 diff --git a/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go b/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go deleted file mode 100644 index 7906901b..00000000 --- a/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go b/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go deleted file mode 100644 index 341e6495..00000000 --- a/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1alpha1 "go.pinniped.dev/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" -) - -type FakeOauthV1alpha1 struct { - *testing.Fake -} - -func (c *FakeOauthV1alpha1) OIDCClientSecretRequests(namespace string) v1alpha1.OIDCClientSecretRequestInterface { - return &FakeOIDCClientSecretRequests{c, namespace} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeOauthV1alpha1) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go b/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go deleted file mode 100644 index 8d4fc39d..00000000 --- a/generated/1.21/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1alpha1 "go.pinniped.dev/generated/1.21/apis/supervisor/virtual/oauth/v1alpha1" - "go.pinniped.dev/generated/1.21/client/supervisor/virtual/clientset/versioned/scheme" - rest "k8s.io/client-go/rest" -) - -type OauthV1alpha1Interface interface { - RESTClient() rest.Interface - OIDCClientSecretRequestsGetter -} - -// OauthV1alpha1Client is used to interact with features provided by the oauth.virtual.supervisor.pinniped.dev group. -type OauthV1alpha1Client struct { - restClient rest.Interface -} - -func (c *OauthV1alpha1Client) OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface { - return newOIDCClientSecretRequests(c, namespace) -} - -// NewForConfig creates a new OauthV1alpha1Client for the given config. -func NewForConfig(c *rest.Config) (*OauthV1alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &OauthV1alpha1Client{client}, nil -} - -// NewForConfigOrDie creates a new OauthV1alpha1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *OauthV1alpha1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new OauthV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *OauthV1alpha1Client { - return &OauthV1alpha1Client{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 *OauthV1alpha1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/generated/1.21/crds/config.supervisor.pinniped.dev_oidcclients.yaml b/generated/1.21/crds/config.supervisor.pinniped.dev_oidcclients.yaml new file mode 100644 index 00000000..4efa445e --- /dev/null +++ b/generated/1.21/crds/config.supervisor.pinniped.dev_oidcclients.yaml @@ -0,0 +1,125 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.8.0 + creationTimestamp: null + name: oidcclients.config.supervisor.pinniped.dev +spec: + group: config.supervisor.pinniped.dev + names: + categories: + - pinniped + kind: OIDCClient + listKind: OIDCClientList + plural: oidcclients + singular: oidcclient + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: OIDCClient describes the configuration of an OIDC client. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: Spec of the OIDC client. + properties: + allowedGrantTypes: + description: "allowedGrantTypes is a list of the allowed grant_type + param values that should be accepted during OIDC flows with this + client. \n Must only contain the following values: - authorization_code: + allows the client to perform the authorization code grant flow, + i.e. allows the webapp to authenticate users. This grant must always + be listed. - refresh_token: allows the client to perform refresh + grants for the user to extend the user's session. This grant must + be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: + allows the client to perform RFC8693 token exchange, which is a + step in the process to be able to get a cluster credential for the + user. This grant must be listed if allowedScopes lists pinniped:request-audience." + items: + enum: + - authorization_code + - refresh_token + - urn:ietf:params:oauth:grant-type:token-exchange + type: string + minItems: 1 + type: array + allowedRedirectURIs: + description: allowedRedirectURIs is a list of the allowed redirect_uri + param values that should be accepted during OIDC flows with this + client. Any other uris will be rejected. Must be https, unless it + is a loopback. + items: + type: string + minItems: 1 + type: array + allowedScopes: + description: "allowedScopes is a list of the allowed scopes param + values that should be accepted during OIDC flows with this client. + \n Must only contain the following values: - openid: The client + is allowed to request ID tokens. ID tokens only include the required + claims by default (iss, sub, aud, exp, iat). This scope must always + be listed. - offline_access: The client is allowed to request an + initial refresh token during the authorization code grant flow. + This scope must be listed if allowedGrantTypes lists refresh_token. + - pinniped:request-audience: The client is allowed to request a + new audience value during a RFC8693 token exchange, which is a step + in the process to be able to get a cluster credential for the user. + openid, username and groups scopes must be listed when this scope + is present. This scope must be listed if allowedGrantTypes lists + urn:ietf:params:oauth:grant-type:token-exchange. - username: The + client is allowed to request that ID tokens contain the user's username. + Without the username scope being requested and allowed, the ID token + will not contain the user's username. - groups: The client is allowed + to request that ID tokens contain the user's group membership, if + their group membership is discoverable by the Supervisor. Without + the groups scope being requested and allowed, the ID token will + not contain groups." + items: + enum: + - openid + - offline_access + - username + - groups + - pinniped:request-audience + type: string + minItems: 1 + type: array + required: + - allowedGrantTypes + - allowedRedirectURIs + - allowedScopes + type: object + status: + description: Status of the OIDC client. + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/generated/1.21/crds/oauth.supervisor.pinniped.dev_oidcclients.yaml b/generated/1.21/crds/oauth.supervisor.pinniped.dev_oidcclients.yaml deleted file mode 100644 index 589a9154..00000000 --- a/generated/1.21/crds/oauth.supervisor.pinniped.dev_oidcclients.yaml +++ /dev/null @@ -1,125 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null - name: oidcclients.oauth.supervisor.pinniped.dev -spec: - group: oauth.supervisor.pinniped.dev - names: - categories: - - pinniped - kind: OIDCClient - listKind: OIDCClientList - plural: oidcclients - singular: oidcclient - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1alpha1 - schema: - openAPIV3Schema: - description: OIDCClient describes the configuration of an OIDC client. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: Spec of the OIDC client. - properties: - allowedGrantTypes: - description: "allowedGrantTypes is a list of the allowed grant_type - param values that should be accepted during OIDC flows with this - client. \n Must only contain the following values: - authorization_code: - allows the client to perform the authorization code grant flow, - i.e. allows the webapp to authenticate users. This grant must always - be listed. - refresh_token: allows the client to perform refresh - grants for the user to extend the user's session. This grant must - be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: - allows the client to perform RFC8693 token exchange, which is a - step in the process to be able to get a cluster credential for the - user. This grant must be listed if allowedScopes lists pinniped:request-audience." - items: - enum: - - authorization_code - - refresh_token - - urn:ietf:params:oauth:grant-type:token-exchange - type: string - minItems: 1 - type: array - allowedRedirectURIs: - description: allowedRedirectURIs is a list of the allowed redirect_uri - param values that should be accepted during OIDC flows with this - client. Any other uris will be rejected. Must be https, unless it - is a loopback. - items: - type: string - minItems: 1 - type: array - allowedScopes: - description: "allowedScopes is a list of the allowed scopes param - values that should be accepted during OIDC flows with this client. - \n Must only contain the following values: - openid: The client - is allowed to request ID tokens. ID tokens only include the required - claims by default (iss, sub, aud, exp, iat). This scope must always - be listed. - offline_access: The client is allowed to request an - initial refresh token during the authorization code grant flow. - This scope must be listed if allowedGrantTypes lists refresh_token. - - pinniped:request-audience: The client is allowed to request a - new audience value during a RFC8693 token exchange, which is a step - in the process to be able to get a cluster credential for the user. - openid, username and groups scopes must be listed when this scope - is present. This scope must be listed if allowedGrantTypes lists - urn:ietf:params:oauth:grant-type:token-exchange. - username: The - client is allowed to request that ID tokens contain the user's username. - Without the username scope being requested and allowed, the ID token - will not contain the user's username. - groups: The client is allowed - to request that ID tokens contain the user's group membership, if - their group membership is discoverable by the Supervisor. Without - the groups scope being requested and allowed, the ID token will - not contain groups." - items: - enum: - - openid - - offline_access - - username - - groups - - pinniped:request-audience - type: string - minItems: 1 - type: array - required: - - allowedGrantTypes - - allowedRedirectURIs - - allowedScopes - type: object - status: - description: Status of the OIDC client. - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/generated/1.22/README.adoc b/generated/1.22/README.adoc index 55db1f5b..0a4498b9 100644 --- a/generated/1.22/README.adoc +++ b/generated/1.22/README.adoc @@ -6,15 +6,14 @@ .Packages - xref:{anchor_prefix}-authentication-concierge-pinniped-dev-v1alpha1[$$authentication.concierge.pinniped.dev/v1alpha1$$] +- xref:{anchor_prefix}-clientsecret-supervisor-pinniped-dev-clientsecret[$$clientsecret.supervisor.pinniped.dev/clientsecret$$] +- xref:{anchor_prefix}-clientsecret-supervisor-pinniped-dev-v1alpha1[$$clientsecret.supervisor.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-config-concierge-pinniped-dev-v1alpha1[$$config.concierge.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-config-supervisor-pinniped-dev-v1alpha1[$$config.supervisor.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-identity-concierge-pinniped-dev-identity[$$identity.concierge.pinniped.dev/identity$$] - xref:{anchor_prefix}-identity-concierge-pinniped-dev-v1alpha1[$$identity.concierge.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-idp-supervisor-pinniped-dev-v1alpha1[$$idp.supervisor.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-login-concierge-pinniped-dev-v1alpha1[$$login.concierge.pinniped.dev/v1alpha1$$] -- xref:{anchor_prefix}-oauth-supervisor-pinniped-dev-v1alpha1[$$oauth.supervisor.pinniped.dev/v1alpha1$$] -- xref:{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-oauth[$$oauth.virtual.supervisor.pinniped.dev/oauth$$] -- xref:{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-v1alpha1[$$oauth.virtual.supervisor.pinniped.dev/v1alpha1$$] [id="{anchor_prefix}-authentication-concierge-pinniped-dev-v1alpha1"] @@ -213,6 +212,98 @@ Status of a webhook authenticator. +[id="{anchor_prefix}-clientsecret-supervisor-pinniped-dev-clientsecret"] +=== clientsecret.supervisor.pinniped.dev/clientsecret + +Package clientsecret is the internal version of the Pinniped client secret API. + + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-clientsecret-oidcclientsecretrequestspec"] +==== OIDCClientSecretRequestSpec + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-clientsecret-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generateNewSecret`* __boolean__ | +| *`revokeOldSecrets`* __boolean__ | +|=== + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-clientsecret-oidcclientsecretrequeststatus"] +==== OIDCClientSecretRequestStatus + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-clientsecret-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generatedSecret`* __string__ | +| *`totalClientSecrets`* __integer__ | +|=== + + + +[id="{anchor_prefix}-clientsecret-supervisor-pinniped-dev-v1alpha1"] +=== clientsecret.supervisor.pinniped.dev/v1alpha1 + +Package v1alpha1 is the v1alpha1 version of the Pinniped client secret API. + + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequestspec"] +==== OIDCClientSecretRequestSpec + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generateNewSecret`* __boolean__ | +| *`revokeOldSecrets`* __boolean__ | +|=== + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequeststatus"] +==== OIDCClientSecretRequestStatus + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generatedSecret`* __string__ | +| *`totalClientSecrets`* __integer__ | +|=== + + + [id="{anchor_prefix}-config-concierge-pinniped-dev-v1alpha1"] === config.concierge.pinniped.dev/v1alpha1 @@ -546,6 +637,51 @@ FederationDomainTLSSpec is a struct that describes the TLS configuration for an |=== +[id="{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-config-v1alpha1-oidcclient"] +==== OIDCClient + +OIDCClient describes the configuration of an OIDC client. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-config-v1alpha1-oidcclientlist[$$OIDCClientList$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.22/#objectmeta-v1-meta[$$ObjectMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. + +| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-config-v1alpha1-oidcclientspec[$$OIDCClientSpec$$]__ | Spec of the OIDC client. +| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-config-v1alpha1-oidcclientstatus[$$OIDCClientStatus$$]__ | Status of the OIDC client. +|=== + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-config-v1alpha1-oidcclientspec"] +==== OIDCClientSpec + +OIDCClientSpec is a struct that describes an OIDC Client. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-config-v1alpha1-oidcclient[$$OIDCClient$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`allowedRedirectURIs`* __string array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be https, unless it is a loopback. +| *`allowedGrantTypes`* __GrantType array__ | allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this client. + Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. +| *`allowedScopes`* __Scope array__ | allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. + Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. +|=== + + + + [id="{anchor_prefix}-identity-concierge-pinniped-dev-identity"] === identity.concierge.pinniped.dev/identity @@ -1335,148 +1471,3 @@ TokenCredentialRequestStatus is the status of a TokenCredentialRequest, returned |=== - -[id="{anchor_prefix}-oauth-supervisor-pinniped-dev-v1alpha1"] -=== oauth.supervisor.pinniped.dev/v1alpha1 - -Package v1alpha1 is the v1alpha1 version of the Pinniped supervisor oauth API. - - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-oauth-v1alpha1-oidcclient"] -==== OIDCClient - -OIDCClient describes the configuration of an OIDC client. - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-oauth-v1alpha1-oidcclientlist[$$OIDCClientList$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.22/#objectmeta-v1-meta[$$ObjectMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. - -| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-oauth-v1alpha1-oidcclientspec[$$OIDCClientSpec$$]__ | Spec of the OIDC client. -| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-oauth-v1alpha1-oidcclientstatus[$$OIDCClientStatus$$]__ | Status of the OIDC client. -|=== - - - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-oauth-v1alpha1-oidcclientspec"] -==== OIDCClientSpec - -OIDCClientSpec is a struct that describes an OIDC Client. - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-oauth-v1alpha1-oidcclient[$$OIDCClient$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`allowedRedirectURIs`* __string array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be https, unless it is a loopback. -| *`allowedGrantTypes`* __GrantType array__ | allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. -| *`allowedScopes`* __Scope array__ | allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. -|=== - - - - - -[id="{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-oauth"] -=== oauth.virtual.supervisor.pinniped.dev/oauth - -Package oauth is the internal version of the Pinniped virtual oauth API. - - - - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-virtual-oauth-oidcclientsecretrequestspec"] -==== OIDCClientSecretRequestSpec - - - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-virtual-oauth-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`generateNewSecret`* __boolean__ | -| *`revokeOldSecrets`* __boolean__ | -|=== - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-virtual-oauth-oidcclientsecretrequeststatus"] -==== OIDCClientSecretRequestStatus - - - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-virtual-oauth-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`generatedSecret`* __string__ | -| *`totalClientSecrets`* __integer__ | -|=== - - - -[id="{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-v1alpha1"] -=== oauth.virtual.supervisor.pinniped.dev/v1alpha1 - -Package v1alpha1 is the v1alpha1 version of the Pinniped virtual oauth API. - - - - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequestspec"] -==== OIDCClientSecretRequestSpec - - - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`generateNewSecret`* __boolean__ | -| *`revokeOldSecrets`* __boolean__ | -|=== - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequeststatus"] -==== OIDCClientSecretRequestStatus - - - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`generatedSecret`* __string__ | -| *`totalClientSecrets`* __integer__ | -|=== - - diff --git a/generated/1.22/apis/supervisor/clientsecret/doc.go b/generated/1.22/apis/supervisor/clientsecret/doc.go new file mode 100644 index 00000000..c536bc75 --- /dev/null +++ b/generated/1.22/apis/supervisor/clientsecret/doc.go @@ -0,0 +1,8 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// +k8s:deepcopy-gen=package +// +groupName=clientsecret.supervisor.pinniped.dev + +// Package clientsecret is the internal version of the Pinniped client secret API. +package clientsecret diff --git a/generated/1.22/apis/supervisor/clientsecret/register.go b/generated/1.22/apis/supervisor/clientsecret/register.go new file mode 100644 index 00000000..4a1c0173 --- /dev/null +++ b/generated/1.22/apis/supervisor/clientsecret/register.go @@ -0,0 +1,37 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package clientsecret + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +const GroupName = "clientsecret.supervisor.pinniped.dev" + +// SchemeGroupVersion is group version used to register these objects. +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} + +// Kind takes an unqualified kind and returns back a Group qualified GroupKind. +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Resource takes an unqualified resource and returns back a Group qualified GroupResource. +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + AddToScheme = SchemeBuilder.AddToScheme +) + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &OIDCClientSecretRequest{}, + ) + return nil +} diff --git a/generated/1.22/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go b/generated/1.22/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go new file mode 100644 index 00000000..7fd1eb65 --- /dev/null +++ b/generated/1.22/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go @@ -0,0 +1,25 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package clientsecret + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +type OIDCClientSecretRequestSpec struct { + GenerateNewSecret bool `json:"generateNewSecret"` + RevokeOldSecrets bool `json:"revokeOldSecrets"` +} + +type OIDCClientSecretRequestStatus struct { + GeneratedSecret string `json:"generatedSecret,omitempty"` + TotalClientSecrets int `json:"totalClientSecrets"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequest struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` // metadata.name must be set to the client ID + + Spec OIDCClientSecretRequestSpec `json:"spec"` + Status OIDCClientSecretRequestStatus `json:"status"` +} diff --git a/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/conversion.go b/generated/1.22/apis/supervisor/clientsecret/v1alpha1/conversion.go similarity index 100% rename from generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/conversion.go rename to generated/1.22/apis/supervisor/clientsecret/v1alpha1/conversion.go diff --git a/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/defaults.go b/generated/1.22/apis/supervisor/clientsecret/v1alpha1/defaults.go similarity index 100% rename from generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/defaults.go rename to generated/1.22/apis/supervisor/clientsecret/v1alpha1/defaults.go diff --git a/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/doc.go b/generated/1.22/apis/supervisor/clientsecret/v1alpha1/doc.go similarity index 64% rename from generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/doc.go rename to generated/1.22/apis/supervisor/clientsecret/v1alpha1/doc.go index 2529f68c..61920f32 100644 --- a/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/doc.go +++ b/generated/1.22/apis/supervisor/clientsecret/v1alpha1/doc.go @@ -3,9 +3,9 @@ // +k8s:openapi-gen=true // +k8s:deepcopy-gen=package -// +k8s:conversion-gen=go.pinniped.dev/generated/1.22/apis/supervisor/virtual/oauth +// +k8s:conversion-gen=go.pinniped.dev/generated/1.22/apis/supervisor/clientsecret // +k8s:defaulter-gen=TypeMeta -// +groupName=oauth.virtual.supervisor.pinniped.dev +// +groupName=clientsecret.supervisor.pinniped.dev -// Package v1alpha1 is the v1alpha1 version of the Pinniped virtual oauth API. +// Package v1alpha1 is the v1alpha1 version of the Pinniped client secret API. package v1alpha1 diff --git a/generated/1.22/apis/supervisor/clientsecret/v1alpha1/register.go b/generated/1.22/apis/supervisor/clientsecret/v1alpha1/register.go new file mode 100644 index 00000000..49602125 --- /dev/null +++ b/generated/1.22/apis/supervisor/clientsecret/v1alpha1/register.go @@ -0,0 +1,42 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +const GroupName = "clientsecret.supervisor.pinniped.dev" + +// SchemeGroupVersion is group version used to register these objects. +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} + +var ( + SchemeBuilder runtime.SchemeBuilder + localSchemeBuilder = &SchemeBuilder + AddToScheme = SchemeBuilder.AddToScheme +) + +func init() { + // We only register manually written functions here. The registration of the + // generated functions takes place in the generated files. The separation + // makes the code compile even when the generated files are missing. + localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs) +} + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &OIDCClientSecretRequest{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} + +// Resource takes an unqualified resource and returns back a Group qualified GroupResource. +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} diff --git a/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go b/generated/1.22/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go similarity index 100% rename from generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go rename to generated/1.22/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go diff --git a/generated/1.22/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go b/generated/1.22/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go new file mode 100644 index 00000000..4071a9d2 --- /dev/null +++ b/generated/1.22/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go @@ -0,0 +1,131 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + clientsecret "go.pinniped.dev/generated/1.22/apis/supervisor/clientsecret" + 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((*OIDCClientSecretRequest)(nil), (*clientsecret.OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest(a.(*OIDCClientSecretRequest), b.(*clientsecret.OIDCClientSecretRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientsecret.OIDCClientSecretRequest)(nil), (*OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(a.(*clientsecret.OIDCClientSecretRequest), b.(*OIDCClientSecretRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestSpec)(nil), (*clientsecret.OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(a.(*OIDCClientSecretRequestSpec), b.(*clientsecret.OIDCClientSecretRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientsecret.OIDCClientSecretRequestSpec)(nil), (*OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(a.(*clientsecret.OIDCClientSecretRequestSpec), b.(*OIDCClientSecretRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestStatus)(nil), (*clientsecret.OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(a.(*OIDCClientSecretRequestStatus), b.(*clientsecret.OIDCClientSecretRequestStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientsecret.OIDCClientSecretRequestStatus)(nil), (*OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(a.(*clientsecret.OIDCClientSecretRequestStatus), b.(*OIDCClientSecretRequestStatus), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *clientsecret.OIDCClientSecretRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *clientsecret.OIDCClientSecretRequest, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest(in, out, s) +} + +func autoConvert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *clientsecret.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest is an autogenerated conversion function. +func Convert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *clientsecret.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { + return autoConvert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in, out, s) +} + +func autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *clientsecret.OIDCClientSecretRequestSpec, s conversion.Scope) error { + out.GenerateNewSecret = in.GenerateNewSecret + out.RevokeOldSecrets = in.RevokeOldSecrets + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *clientsecret.OIDCClientSecretRequestSpec, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(in, out, s) +} + +func autoConvert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *clientsecret.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { + out.GenerateNewSecret = in.GenerateNewSecret + out.RevokeOldSecrets = in.RevokeOldSecrets + return nil +} + +// Convert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec is an autogenerated conversion function. +func Convert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *clientsecret.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { + return autoConvert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in, out, s) +} + +func autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *clientsecret.OIDCClientSecretRequestStatus, s conversion.Scope) error { + out.GeneratedSecret = in.GeneratedSecret + out.TotalClientSecrets = in.TotalClientSecrets + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *clientsecret.OIDCClientSecretRequestStatus, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(in, out, s) +} + +func autoConvert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *clientsecret.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { + out.GeneratedSecret = in.GeneratedSecret + out.TotalClientSecrets = in.TotalClientSecrets + return nil +} + +// Convert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus is an autogenerated conversion function. +func Convert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *clientsecret.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { + return autoConvert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in, out, s) +} diff --git a/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go b/generated/1.22/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go similarity index 100% rename from generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go rename to generated/1.22/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go diff --git a/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go b/generated/1.22/apis/supervisor/clientsecret/v1alpha1/zz_generated.defaults.go similarity index 100% rename from generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go rename to generated/1.22/apis/supervisor/clientsecret/v1alpha1/zz_generated.defaults.go diff --git a/generated/1.22/apis/supervisor/clientsecret/zz_generated.deepcopy.go b/generated/1.22/apis/supervisor/clientsecret/zz_generated.deepcopy.go new file mode 100644 index 00000000..e0dc7d68 --- /dev/null +++ b/generated/1.22/apis/supervisor/clientsecret/zz_generated.deepcopy.go @@ -0,0 +1,73 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package clientsecret + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequest) DeepCopyInto(out *OIDCClientSecretRequest) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequest. +func (in *OIDCClientSecretRequest) DeepCopy() *OIDCClientSecretRequest { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestSpec. +func (in *OIDCClientSecretRequestSpec) DeepCopy() *OIDCClientSecretRequestSpec { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestStatus) DeepCopyInto(out *OIDCClientSecretRequestStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestStatus. +func (in *OIDCClientSecretRequestStatus) DeepCopy() *OIDCClientSecretRequestStatus { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestStatus) + in.DeepCopyInto(out) + return out +} diff --git a/generated/1.22/apis/supervisor/config/v1alpha1/register.go b/generated/1.22/apis/supervisor/config/v1alpha1/register.go index 69045298..54c51699 100644 --- a/generated/1.22/apis/supervisor/config/v1alpha1/register.go +++ b/generated/1.22/apis/supervisor/config/v1alpha1/register.go @@ -32,6 +32,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &FederationDomain{}, &FederationDomainList{}, + &OIDCClient{}, + &OIDCClientList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/generated/1.22/apis/supervisor/oauth/v1alpha1/types_oidcclient.go b/generated/1.22/apis/supervisor/config/v1alpha1/types_oidcclient.go similarity index 100% rename from generated/1.22/apis/supervisor/oauth/v1alpha1/types_oidcclient.go rename to generated/1.22/apis/supervisor/config/v1alpha1/types_oidcclient.go diff --git a/generated/1.22/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go b/generated/1.22/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go index 856b8988..a55d88e7 100644 --- a/generated/1.22/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go +++ b/generated/1.22/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go @@ -150,3 +150,111 @@ func (in *FederationDomainTLSSpec) DeepCopy() *FederationDomainTLSSpec { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClient) DeepCopyInto(out *OIDCClient) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClient. +func (in *OIDCClient) DeepCopy() *OIDCClient { + if in == nil { + return nil + } + out := new(OIDCClient) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClient) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientList) DeepCopyInto(out *OIDCClientList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OIDCClient, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientList. +func (in *OIDCClientList) DeepCopy() *OIDCClientList { + if in == nil { + return nil + } + out := new(OIDCClientList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSpec) DeepCopyInto(out *OIDCClientSpec) { + *out = *in + if in.AllowedRedirectURIs != nil { + in, out := &in.AllowedRedirectURIs, &out.AllowedRedirectURIs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.AllowedGrantTypes != nil { + in, out := &in.AllowedGrantTypes, &out.AllowedGrantTypes + *out = make([]GrantType, len(*in)) + copy(*out, *in) + } + if in.AllowedScopes != nil { + in, out := &in.AllowedScopes, &out.AllowedScopes + *out = make([]Scope, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSpec. +func (in *OIDCClientSpec) DeepCopy() *OIDCClientSpec { + if in == nil { + return nil + } + out := new(OIDCClientSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientStatus) DeepCopyInto(out *OIDCClientStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientStatus. +func (in *OIDCClientStatus) DeepCopy() *OIDCClientStatus { + if in == nil { + return nil + } + out := new(OIDCClientStatus) + in.DeepCopyInto(out) + return out +} diff --git a/generated/1.22/apis/supervisor/oauth/v1alpha1/doc.go b/generated/1.22/apis/supervisor/oauth/v1alpha1/doc.go deleted file mode 100644 index 75580481..00000000 --- a/generated/1.22/apis/supervisor/oauth/v1alpha1/doc.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package -// +k8s:defaulter-gen=TypeMeta -// +groupName=oauth.supervisor.pinniped.dev - -// Package v1alpha1 is the v1alpha1 version of the Pinniped supervisor oauth API. -package v1alpha1 diff --git a/generated/1.22/apis/supervisor/oauth/v1alpha1/register.go b/generated/1.22/apis/supervisor/oauth/v1alpha1/register.go deleted file mode 100644 index 37ae1fbf..00000000 --- a/generated/1.22/apis/supervisor/oauth/v1alpha1/register.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const GroupName = "oauth.supervisor.pinniped.dev" - -// SchemeGroupVersion is group version used to register these objects. -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} - -var ( - SchemeBuilder runtime.SchemeBuilder - localSchemeBuilder = &SchemeBuilder - AddToScheme = localSchemeBuilder.AddToScheme -) - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addKnownTypes) -} - -// Adds the list of known types to the given scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &OIDCClient{}, - &OIDCClientList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} - -// Resource takes an unqualified resource and returns a Group qualified GroupResource. -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} diff --git a/generated/1.22/apis/supervisor/oauth/v1alpha1/zz_generated.deepcopy.go b/generated/1.22/apis/supervisor/oauth/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index 1aba8aea..00000000 --- a/generated/1.22/apis/supervisor/oauth/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,121 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClient) DeepCopyInto(out *OIDCClient) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClient. -func (in *OIDCClient) DeepCopy() *OIDCClient { - if in == nil { - return nil - } - out := new(OIDCClient) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OIDCClient) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientList) DeepCopyInto(out *OIDCClientList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]OIDCClient, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientList. -func (in *OIDCClientList) DeepCopy() *OIDCClientList { - if in == nil { - return nil - } - out := new(OIDCClientList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OIDCClientList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientSpec) DeepCopyInto(out *OIDCClientSpec) { - *out = *in - if in.AllowedRedirectURIs != nil { - in, out := &in.AllowedRedirectURIs, &out.AllowedRedirectURIs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.AllowedGrantTypes != nil { - in, out := &in.AllowedGrantTypes, &out.AllowedGrantTypes - *out = make([]GrantType, len(*in)) - copy(*out, *in) - } - if in.AllowedScopes != nil { - in, out := &in.AllowedScopes, &out.AllowedScopes - *out = make([]Scope, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSpec. -func (in *OIDCClientSpec) DeepCopy() *OIDCClientSpec { - if in == nil { - return nil - } - out := new(OIDCClientSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientStatus) DeepCopyInto(out *OIDCClientStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientStatus. -func (in *OIDCClientStatus) DeepCopy() *OIDCClientStatus { - if in == nil { - return nil - } - out := new(OIDCClientStatus) - in.DeepCopyInto(out) - return out -} diff --git a/generated/1.22/apis/supervisor/virtual/oauth/doc.go b/generated/1.22/apis/supervisor/virtual/oauth/doc.go deleted file mode 100644 index ca4e9a63..00000000 --- a/generated/1.22/apis/supervisor/virtual/oauth/doc.go +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// +k8s:deepcopy-gen=package -// +groupName=oauth.virtual.supervisor.pinniped.dev - -// Package oauth is the internal version of the Pinniped virtual oauth API. -package oauth diff --git a/generated/1.22/apis/supervisor/virtual/oauth/register.go b/generated/1.22/apis/supervisor/virtual/oauth/register.go deleted file mode 100644 index a238d85f..00000000 --- a/generated/1.22/apis/supervisor/virtual/oauth/register.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package oauth - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const GroupName = "oauth.virtual.supervisor.pinniped.dev" - -// SchemeGroupVersion is group version used to register these objects. -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} - -// Kind takes an unqualified kind and returns back a Group qualified GroupKind. -func Kind(kind string) schema.GroupKind { - return SchemeGroupVersion.WithKind(kind).GroupKind() -} - -// Resource takes an unqualified resource and returns back a Group qualified GroupResource. -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -var ( - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - AddToScheme = SchemeBuilder.AddToScheme -) - -// Adds the list of known types to the given scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &OIDCClientSecretRequest{}, - ) - return nil -} diff --git a/generated/1.22/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go b/generated/1.22/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go deleted file mode 100644 index ac54a93c..00000000 --- a/generated/1.22/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package oauth - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -type OIDCClientSecretRequestSpec struct { - GenerateNewSecret bool `json:"generateNewSecret"` - RevokeOldSecrets bool `json:"revokeOldSecrets"` -} - -type OIDCClientSecretRequestStatus struct { - GeneratedSecret string `json:"generatedSecret,omitempty"` - TotalClientSecrets int `json:"totalClientSecrets"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type OIDCClientSecretRequest struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` // metadata.name must be set to the client ID - - Spec OIDCClientSecretRequestSpec `json:"spec"` - Status OIDCClientSecretRequestStatus `json:"status"` -} diff --git a/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/register.go b/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/register.go deleted file mode 100644 index ecc75a08..00000000 --- a/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/register.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const GroupName = "oauth.virtual.supervisor.pinniped.dev" - -// SchemeGroupVersion is group version used to register these objects. -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} - -var ( - SchemeBuilder runtime.SchemeBuilder - localSchemeBuilder = &SchemeBuilder - AddToScheme = SchemeBuilder.AddToScheme -) - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs) -} - -// Adds the list of known types to the given scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &OIDCClientSecretRequest{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} - -// Resource takes an unqualified resource and returns back a Group qualified GroupResource. -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} diff --git a/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go b/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go deleted file mode 100644 index a0866234..00000000 --- a/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go +++ /dev/null @@ -1,131 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by conversion-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - oauth "go.pinniped.dev/generated/1.22/apis/supervisor/virtual/oauth" - 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((*OIDCClientSecretRequest)(nil), (*oauth.OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(a.(*OIDCClientSecretRequest), b.(*oauth.OIDCClientSecretRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequest)(nil), (*OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(a.(*oauth.OIDCClientSecretRequest), b.(*OIDCClientSecretRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestSpec)(nil), (*oauth.OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(a.(*OIDCClientSecretRequestSpec), b.(*oauth.OIDCClientSecretRequestSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequestSpec)(nil), (*OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(a.(*oauth.OIDCClientSecretRequestSpec), b.(*OIDCClientSecretRequestSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestStatus)(nil), (*oauth.OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(a.(*OIDCClientSecretRequestStatus), b.(*oauth.OIDCClientSecretRequestStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequestStatus)(nil), (*OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(a.(*oauth.OIDCClientSecretRequestStatus), b.(*OIDCClientSecretRequestStatus), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *oauth.OIDCClientSecretRequest, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest is an autogenerated conversion function. -func Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *oauth.OIDCClientSecretRequest, s conversion.Scope) error { - return autoConvert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in, out, s) -} - -func autoConvert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *oauth.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest is an autogenerated conversion function. -func Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *oauth.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { - return autoConvert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in, out, s) -} - -func autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *oauth.OIDCClientSecretRequestSpec, s conversion.Scope) error { - out.GenerateNewSecret = in.GenerateNewSecret - out.RevokeOldSecrets = in.RevokeOldSecrets - return nil -} - -// Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec is an autogenerated conversion function. -func Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *oauth.OIDCClientSecretRequestSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in, out, s) -} - -func autoConvert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *oauth.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { - out.GenerateNewSecret = in.GenerateNewSecret - out.RevokeOldSecrets = in.RevokeOldSecrets - return nil -} - -// Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec is an autogenerated conversion function. -func Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *oauth.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { - return autoConvert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in, out, s) -} - -func autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *oauth.OIDCClientSecretRequestStatus, s conversion.Scope) error { - out.GeneratedSecret = in.GeneratedSecret - out.TotalClientSecrets = in.TotalClientSecrets - return nil -} - -// Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus is an autogenerated conversion function. -func Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *oauth.OIDCClientSecretRequestStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in, out, s) -} - -func autoConvert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *oauth.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { - out.GeneratedSecret = in.GeneratedSecret - out.TotalClientSecrets = in.TotalClientSecrets - return nil -} - -// Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus is an autogenerated conversion function. -func Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *oauth.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { - return autoConvert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in, out, s) -} diff --git a/generated/1.22/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go b/generated/1.22/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go deleted file mode 100644 index 24b58e7b..00000000 --- a/generated/1.22/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go +++ /dev/null @@ -1,73 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package oauth - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientSecretRequest) DeepCopyInto(out *OIDCClientSecretRequest) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - out.Status = in.Status - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequest. -func (in *OIDCClientSecretRequest) DeepCopy() *OIDCClientSecretRequest { - if in == nil { - return nil - } - out := new(OIDCClientSecretRequest) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestSpec. -func (in *OIDCClientSecretRequestSpec) DeepCopy() *OIDCClientSecretRequestSpec { - if in == nil { - return nil - } - out := new(OIDCClientSecretRequestSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientSecretRequestStatus) DeepCopyInto(out *OIDCClientSecretRequestStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestStatus. -func (in *OIDCClientSecretRequestStatus) DeepCopy() *OIDCClientSecretRequestStatus { - if in == nil { - return nil - } - out := new(OIDCClientSecretRequestStatus) - in.DeepCopyInto(out) - return out -} diff --git a/generated/1.22/client/supervisor/clientset/versioned/clientset.go b/generated/1.22/client/supervisor/clientset/versioned/clientset.go index dcdcab22..a9de9109 100644 --- a/generated/1.22/client/supervisor/clientset/versioned/clientset.go +++ b/generated/1.22/client/supervisor/clientset/versioned/clientset.go @@ -8,9 +8,9 @@ package versioned import ( "fmt" + clientsecretv1alpha1 "go.pinniped.dev/generated/1.22/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1" configv1alpha1 "go.pinniped.dev/generated/1.22/client/supervisor/clientset/versioned/typed/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.22/client/supervisor/clientset/versioned/typed/idp/v1alpha1" - oauthv1alpha1 "go.pinniped.dev/generated/1.22/client/supervisor/clientset/versioned/typed/oauth/v1alpha1" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" flowcontrol "k8s.io/client-go/util/flowcontrol" @@ -18,18 +18,23 @@ import ( type Interface interface { Discovery() discovery.DiscoveryInterface + ClientsecretV1alpha1() clientsecretv1alpha1.ClientsecretV1alpha1Interface ConfigV1alpha1() configv1alpha1.ConfigV1alpha1Interface IDPV1alpha1() idpv1alpha1.IDPV1alpha1Interface - OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface } // Clientset contains the clients for groups. Each group has exactly one // version included in a Clientset. type Clientset struct { *discovery.DiscoveryClient - configV1alpha1 *configv1alpha1.ConfigV1alpha1Client - iDPV1alpha1 *idpv1alpha1.IDPV1alpha1Client - oauthV1alpha1 *oauthv1alpha1.OauthV1alpha1Client + clientsecretV1alpha1 *clientsecretv1alpha1.ClientsecretV1alpha1Client + configV1alpha1 *configv1alpha1.ConfigV1alpha1Client + iDPV1alpha1 *idpv1alpha1.IDPV1alpha1Client +} + +// ClientsecretV1alpha1 retrieves the ClientsecretV1alpha1Client +func (c *Clientset) ClientsecretV1alpha1() clientsecretv1alpha1.ClientsecretV1alpha1Interface { + return c.clientsecretV1alpha1 } // ConfigV1alpha1 retrieves the ConfigV1alpha1Client @@ -42,11 +47,6 @@ func (c *Clientset) IDPV1alpha1() idpv1alpha1.IDPV1alpha1Interface { return c.iDPV1alpha1 } -// OauthV1alpha1 retrieves the OauthV1alpha1Client -func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { - return c.oauthV1alpha1 -} - // Discovery retrieves the DiscoveryClient func (c *Clientset) Discovery() discovery.DiscoveryInterface { if c == nil { @@ -68,6 +68,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { } var cs Clientset var err error + cs.clientsecretV1alpha1, err = clientsecretv1alpha1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } cs.configV1alpha1, err = configv1alpha1.NewForConfig(&configShallowCopy) if err != nil { return nil, err @@ -76,10 +80,6 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { if err != nil { return nil, err } - cs.oauthV1alpha1, err = oauthv1alpha1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) if err != nil { @@ -92,9 +92,9 @@ 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.clientsecretV1alpha1 = clientsecretv1alpha1.NewForConfigOrDie(c) cs.configV1alpha1 = configv1alpha1.NewForConfigOrDie(c) cs.iDPV1alpha1 = idpv1alpha1.NewForConfigOrDie(c) - cs.oauthV1alpha1 = oauthv1alpha1.NewForConfigOrDie(c) cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) return &cs @@ -103,9 +103,9 @@ 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.clientsecretV1alpha1 = clientsecretv1alpha1.New(c) cs.configV1alpha1 = configv1alpha1.New(c) cs.iDPV1alpha1 = idpv1alpha1.New(c) - cs.oauthV1alpha1 = oauthv1alpha1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) return &cs diff --git a/generated/1.22/client/supervisor/clientset/versioned/fake/clientset_generated.go b/generated/1.22/client/supervisor/clientset/versioned/fake/clientset_generated.go index 492217cf..019ab12d 100644 --- a/generated/1.22/client/supervisor/clientset/versioned/fake/clientset_generated.go +++ b/generated/1.22/client/supervisor/clientset/versioned/fake/clientset_generated.go @@ -7,12 +7,12 @@ package fake import ( clientset "go.pinniped.dev/generated/1.22/client/supervisor/clientset/versioned" + clientsecretv1alpha1 "go.pinniped.dev/generated/1.22/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1" + fakeclientsecretv1alpha1 "go.pinniped.dev/generated/1.22/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake" configv1alpha1 "go.pinniped.dev/generated/1.22/client/supervisor/clientset/versioned/typed/config/v1alpha1" fakeconfigv1alpha1 "go.pinniped.dev/generated/1.22/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake" idpv1alpha1 "go.pinniped.dev/generated/1.22/client/supervisor/clientset/versioned/typed/idp/v1alpha1" fakeidpv1alpha1 "go.pinniped.dev/generated/1.22/client/supervisor/clientset/versioned/typed/idp/v1alpha1/fake" - oauthv1alpha1 "go.pinniped.dev/generated/1.22/client/supervisor/clientset/versioned/typed/oauth/v1alpha1" - fakeoauthv1alpha1 "go.pinniped.dev/generated/1.22/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/discovery" @@ -70,6 +70,11 @@ var ( _ testing.FakeClient = &Clientset{} ) +// ClientsecretV1alpha1 retrieves the ClientsecretV1alpha1Client +func (c *Clientset) ClientsecretV1alpha1() clientsecretv1alpha1.ClientsecretV1alpha1Interface { + return &fakeclientsecretv1alpha1.FakeClientsecretV1alpha1{Fake: &c.Fake} +} + // ConfigV1alpha1 retrieves the ConfigV1alpha1Client func (c *Clientset) ConfigV1alpha1() configv1alpha1.ConfigV1alpha1Interface { return &fakeconfigv1alpha1.FakeConfigV1alpha1{Fake: &c.Fake} @@ -79,8 +84,3 @@ func (c *Clientset) ConfigV1alpha1() configv1alpha1.ConfigV1alpha1Interface { func (c *Clientset) IDPV1alpha1() idpv1alpha1.IDPV1alpha1Interface { return &fakeidpv1alpha1.FakeIDPV1alpha1{Fake: &c.Fake} } - -// OauthV1alpha1 retrieves the OauthV1alpha1Client -func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { - return &fakeoauthv1alpha1.FakeOauthV1alpha1{Fake: &c.Fake} -} diff --git a/generated/1.22/client/supervisor/clientset/versioned/fake/register.go b/generated/1.22/client/supervisor/clientset/versioned/fake/register.go index 690d6ee3..bb341d36 100644 --- a/generated/1.22/client/supervisor/clientset/versioned/fake/register.go +++ b/generated/1.22/client/supervisor/clientset/versioned/fake/register.go @@ -6,9 +6,9 @@ package fake import ( + clientsecretv1alpha1 "go.pinniped.dev/generated/1.22/apis/supervisor/clientsecret/v1alpha1" configv1alpha1 "go.pinniped.dev/generated/1.22/apis/supervisor/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.22/apis/supervisor/idp/v1alpha1" - oauthv1alpha1 "go.pinniped.dev/generated/1.22/apis/supervisor/oauth/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -20,9 +20,9 @@ var scheme = runtime.NewScheme() var codecs = serializer.NewCodecFactory(scheme) var localSchemeBuilder = runtime.SchemeBuilder{ + clientsecretv1alpha1.AddToScheme, configv1alpha1.AddToScheme, idpv1alpha1.AddToScheme, - oauthv1alpha1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/generated/1.22/client/supervisor/clientset/versioned/scheme/register.go b/generated/1.22/client/supervisor/clientset/versioned/scheme/register.go index 99bafb85..4cd7f66b 100644 --- a/generated/1.22/client/supervisor/clientset/versioned/scheme/register.go +++ b/generated/1.22/client/supervisor/clientset/versioned/scheme/register.go @@ -6,9 +6,9 @@ package scheme import ( + clientsecretv1alpha1 "go.pinniped.dev/generated/1.22/apis/supervisor/clientsecret/v1alpha1" configv1alpha1 "go.pinniped.dev/generated/1.22/apis/supervisor/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.22/apis/supervisor/idp/v1alpha1" - oauthv1alpha1 "go.pinniped.dev/generated/1.22/apis/supervisor/oauth/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -20,9 +20,9 @@ var Scheme = runtime.NewScheme() var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) var localSchemeBuilder = runtime.SchemeBuilder{ + clientsecretv1alpha1.AddToScheme, configv1alpha1.AddToScheme, idpv1alpha1.AddToScheme, - oauthv1alpha1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/generated/1.22/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/clientsecret_client.go b/generated/1.22/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/clientsecret_client.go new file mode 100644 index 00000000..e73afeb8 --- /dev/null +++ b/generated/1.22/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/clientsecret_client.go @@ -0,0 +1,76 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "go.pinniped.dev/generated/1.22/apis/supervisor/clientsecret/v1alpha1" + "go.pinniped.dev/generated/1.22/client/supervisor/clientset/versioned/scheme" + rest "k8s.io/client-go/rest" +) + +type ClientsecretV1alpha1Interface interface { + RESTClient() rest.Interface + OIDCClientSecretRequestsGetter +} + +// ClientsecretV1alpha1Client is used to interact with features provided by the clientsecret.supervisor.pinniped.dev group. +type ClientsecretV1alpha1Client struct { + restClient rest.Interface +} + +func (c *ClientsecretV1alpha1Client) OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface { + return newOIDCClientSecretRequests(c, namespace) +} + +// NewForConfig creates a new ClientsecretV1alpha1Client for the given config. +func NewForConfig(c *rest.Config) (*ClientsecretV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &ClientsecretV1alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new ClientsecretV1alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *ClientsecretV1alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new ClientsecretV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *ClientsecretV1alpha1Client { + return &ClientsecretV1alpha1Client{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 *ClientsecretV1alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go b/generated/1.22/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/doc.go similarity index 100% rename from generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go rename to generated/1.22/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/doc.go diff --git a/generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go b/generated/1.22/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/doc.go similarity index 100% rename from generated/1.19/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go rename to generated/1.22/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/doc.go diff --git a/generated/1.22/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go b/generated/1.22/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_clientsecret_client.go similarity index 60% rename from generated/1.22/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go rename to generated/1.22/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_clientsecret_client.go index 7f7620ad..ecc67030 100644 --- a/generated/1.22/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go +++ b/generated/1.22/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_clientsecret_client.go @@ -6,22 +6,22 @@ package fake import ( - v1alpha1 "go.pinniped.dev/generated/1.22/client/supervisor/clientset/versioned/typed/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.22/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1" rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" ) -type FakeOauthV1alpha1 struct { +type FakeClientsecretV1alpha1 struct { *testing.Fake } -func (c *FakeOauthV1alpha1) OIDCClients(namespace string) v1alpha1.OIDCClientInterface { - return &FakeOIDCClients{c, namespace} +func (c *FakeClientsecretV1alpha1) OIDCClientSecretRequests(namespace string) v1alpha1.OIDCClientSecretRequestInterface { + return &FakeOIDCClientSecretRequests{c, namespace} } // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeOauthV1alpha1) RESTClient() rest.Interface { +func (c *FakeClientsecretV1alpha1) RESTClient() rest.Interface { var ret *rest.RESTClient return ret } diff --git a/generated/1.22/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_oidcclientsecretrequest.go b/generated/1.22/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_oidcclientsecretrequest.go new file mode 100644 index 00000000..5361ede1 --- /dev/null +++ b/generated/1.22/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_oidcclientsecretrequest.go @@ -0,0 +1,36 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "go.pinniped.dev/generated/1.22/apis/supervisor/clientsecret/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + schema "k8s.io/apimachinery/pkg/runtime/schema" + testing "k8s.io/client-go/testing" +) + +// FakeOIDCClientSecretRequests implements OIDCClientSecretRequestInterface +type FakeOIDCClientSecretRequests struct { + Fake *FakeClientsecretV1alpha1 + ns string +} + +var oidcclientsecretrequestsResource = schema.GroupVersionResource{Group: "clientsecret.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclientsecretrequests"} + +var oidcclientsecretrequestsKind = schema.GroupVersionKind{Group: "clientsecret.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClientSecretRequest"} + +// Create takes the representation of a oIDCClientSecretRequest and creates it. Returns the server's representation of the oIDCClientSecretRequest, and an error, if there is any. +func (c *FakeOIDCClientSecretRequests) Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (result *v1alpha1.OIDCClientSecretRequest, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(oidcclientsecretrequestsResource, c.ns, oIDCClientSecretRequest), &v1alpha1.OIDCClientSecretRequest{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.OIDCClientSecretRequest), err +} diff --git a/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go b/generated/1.22/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/generated_expansion.go similarity index 100% rename from generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go rename to generated/1.22/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/generated_expansion.go diff --git a/generated/1.22/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/oidcclientsecretrequest.go b/generated/1.22/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/oidcclientsecretrequest.go new file mode 100644 index 00000000..7b672a44 --- /dev/null +++ b/generated/1.22/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/oidcclientsecretrequest.go @@ -0,0 +1,54 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + + v1alpha1 "go.pinniped.dev/generated/1.22/apis/supervisor/clientsecret/v1alpha1" + scheme "go.pinniped.dev/generated/1.22/client/supervisor/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + rest "k8s.io/client-go/rest" +) + +// OIDCClientSecretRequestsGetter has a method to return a OIDCClientSecretRequestInterface. +// A group's client should implement this interface. +type OIDCClientSecretRequestsGetter interface { + OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface +} + +// OIDCClientSecretRequestInterface has methods to work with OIDCClientSecretRequest resources. +type OIDCClientSecretRequestInterface interface { + Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (*v1alpha1.OIDCClientSecretRequest, error) + OIDCClientSecretRequestExpansion +} + +// oIDCClientSecretRequests implements OIDCClientSecretRequestInterface +type oIDCClientSecretRequests struct { + client rest.Interface + ns string +} + +// newOIDCClientSecretRequests returns a OIDCClientSecretRequests +func newOIDCClientSecretRequests(c *ClientsecretV1alpha1Client, namespace string) *oIDCClientSecretRequests { + return &oIDCClientSecretRequests{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Create takes the representation of a oIDCClientSecretRequest and creates it. Returns the server's representation of the oIDCClientSecretRequest, and an error, if there is any. +func (c *oIDCClientSecretRequests) Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (result *v1alpha1.OIDCClientSecretRequest, err error) { + result = &v1alpha1.OIDCClientSecretRequest{} + err = c.client.Post(). + Namespace(c.ns). + Resource("oidcclientsecretrequests"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(oIDCClientSecretRequest). + Do(ctx). + Into(result) + return +} diff --git a/generated/1.22/client/supervisor/clientset/versioned/typed/config/v1alpha1/config_client.go b/generated/1.22/client/supervisor/clientset/versioned/typed/config/v1alpha1/config_client.go index 8b13c709..252b4962 100644 --- a/generated/1.22/client/supervisor/clientset/versioned/typed/config/v1alpha1/config_client.go +++ b/generated/1.22/client/supervisor/clientset/versioned/typed/config/v1alpha1/config_client.go @@ -14,6 +14,7 @@ import ( type ConfigV1alpha1Interface interface { RESTClient() rest.Interface FederationDomainsGetter + OIDCClientsGetter } // ConfigV1alpha1Client is used to interact with features provided by the config.supervisor.pinniped.dev group. @@ -25,6 +26,10 @@ func (c *ConfigV1alpha1Client) FederationDomains(namespace string) FederationDom return newFederationDomains(c, namespace) } +func (c *ConfigV1alpha1Client) OIDCClients(namespace string) OIDCClientInterface { + return newOIDCClients(c, namespace) +} + // NewForConfig creates a new ConfigV1alpha1Client for the given config. func NewForConfig(c *rest.Config) (*ConfigV1alpha1Client, error) { config := *c diff --git a/generated/1.22/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go b/generated/1.22/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go index 309e08b8..1ad242eb 100644 --- a/generated/1.22/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go +++ b/generated/1.22/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go @@ -19,6 +19,10 @@ func (c *FakeConfigV1alpha1) FederationDomains(namespace string) v1alpha1.Federa return &FakeFederationDomains{c, namespace} } +func (c *FakeConfigV1alpha1) OIDCClients(namespace string) v1alpha1.OIDCClientInterface { + return &FakeOIDCClients{c, namespace} +} + // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. func (c *FakeConfigV1alpha1) RESTClient() rest.Interface { diff --git a/generated/1.22/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_oidcclient.go b/generated/1.22/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_oidcclient.go new file mode 100644 index 00000000..49ce2584 --- /dev/null +++ b/generated/1.22/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_oidcclient.go @@ -0,0 +1,129 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "go.pinniped.dev/generated/1.22/apis/supervisor/config/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" +) + +// FakeOIDCClients implements OIDCClientInterface +type FakeOIDCClients struct { + Fake *FakeConfigV1alpha1 + ns string +} + +var oidcclientsResource = schema.GroupVersionResource{Group: "config.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclients"} + +var oidcclientsKind = schema.GroupVersionKind{Group: "config.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClient"} + +// Get takes name of the oIDCClient, and returns the corresponding oIDCClient object, and an error if there is any. +func (c *FakeOIDCClients) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.OIDCClient, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(oidcclientsResource, c.ns, name), &v1alpha1.OIDCClient{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.OIDCClient), err +} + +// List takes label and field selectors, and returns the list of OIDCClients that match those selectors. +func (c *FakeOIDCClients) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.OIDCClientList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(oidcclientsResource, oidcclientsKind, c.ns, opts), &v1alpha1.OIDCClientList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.OIDCClientList{ListMeta: obj.(*v1alpha1.OIDCClientList).ListMeta} + for _, item := range obj.(*v1alpha1.OIDCClientList).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 oIDCClients. +func (c *FakeOIDCClients) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(oidcclientsResource, c.ns, opts)) + +} + +// Create takes the representation of a oIDCClient and creates it. Returns the server's representation of the oIDCClient, and an error, if there is any. +func (c *FakeOIDCClients) Create(ctx context.Context, oIDCClient *v1alpha1.OIDCClient, opts v1.CreateOptions) (result *v1alpha1.OIDCClient, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(oidcclientsResource, c.ns, oIDCClient), &v1alpha1.OIDCClient{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.OIDCClient), err +} + +// Update takes the representation of a oIDCClient and updates it. Returns the server's representation of the oIDCClient, and an error, if there is any. +func (c *FakeOIDCClients) Update(ctx context.Context, oIDCClient *v1alpha1.OIDCClient, opts v1.UpdateOptions) (result *v1alpha1.OIDCClient, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(oidcclientsResource, c.ns, oIDCClient), &v1alpha1.OIDCClient{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.OIDCClient), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeOIDCClients) UpdateStatus(ctx context.Context, oIDCClient *v1alpha1.OIDCClient, opts v1.UpdateOptions) (*v1alpha1.OIDCClient, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(oidcclientsResource, "status", c.ns, oIDCClient), &v1alpha1.OIDCClient{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.OIDCClient), err +} + +// Delete takes name of the oIDCClient and deletes it. Returns an error if one occurs. +func (c *FakeOIDCClients) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(oidcclientsResource, c.ns, name), &v1alpha1.OIDCClient{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeOIDCClients) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(oidcclientsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.OIDCClientList{}) + return err +} + +// Patch applies the patch and returns the patched oIDCClient. +func (c *FakeOIDCClients) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.OIDCClient, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(oidcclientsResource, c.ns, name, pt, data, subresources...), &v1alpha1.OIDCClient{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.OIDCClient), err +} diff --git a/generated/1.22/client/supervisor/clientset/versioned/typed/config/v1alpha1/generated_expansion.go b/generated/1.22/client/supervisor/clientset/versioned/typed/config/v1alpha1/generated_expansion.go index ba9c9173..35b9ee3d 100644 --- a/generated/1.22/client/supervisor/clientset/versioned/typed/config/v1alpha1/generated_expansion.go +++ b/generated/1.22/client/supervisor/clientset/versioned/typed/config/v1alpha1/generated_expansion.go @@ -6,3 +6,5 @@ package v1alpha1 type FederationDomainExpansion interface{} + +type OIDCClientExpansion interface{} diff --git a/generated/1.22/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oidcclient.go b/generated/1.22/client/supervisor/clientset/versioned/typed/config/v1alpha1/oidcclient.go similarity index 97% rename from generated/1.22/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oidcclient.go rename to generated/1.22/client/supervisor/clientset/versioned/typed/config/v1alpha1/oidcclient.go index be9f6246..8d5bdab6 100644 --- a/generated/1.22/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oidcclient.go +++ b/generated/1.22/client/supervisor/clientset/versioned/typed/config/v1alpha1/oidcclient.go @@ -9,7 +9,7 @@ import ( "context" "time" - v1alpha1 "go.pinniped.dev/generated/1.22/apis/supervisor/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.22/apis/supervisor/config/v1alpha1" scheme "go.pinniped.dev/generated/1.22/client/supervisor/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -44,7 +44,7 @@ type oIDCClients struct { } // newOIDCClients returns a OIDCClients -func newOIDCClients(c *OauthV1alpha1Client, namespace string) *oIDCClients { +func newOIDCClients(c *ConfigV1alpha1Client, namespace string) *oIDCClients { return &oIDCClients{ client: c.RESTClient(), ns: namespace, diff --git a/generated/1.22/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/doc.go b/generated/1.22/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/doc.go deleted file mode 100644 index e7a470b6..00000000 --- a/generated/1.22/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1alpha1 diff --git a/generated/1.22/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go b/generated/1.22/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go deleted file mode 100644 index 7906901b..00000000 --- a/generated/1.22/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/generated/1.22/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclient.go b/generated/1.22/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclient.go deleted file mode 100644 index afddba32..00000000 --- a/generated/1.22/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclient.go +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v1alpha1 "go.pinniped.dev/generated/1.22/apis/supervisor/oauth/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" -) - -// FakeOIDCClients implements OIDCClientInterface -type FakeOIDCClients struct { - Fake *FakeOauthV1alpha1 - ns string -} - -var oidcclientsResource = schema.GroupVersionResource{Group: "oauth.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclients"} - -var oidcclientsKind = schema.GroupVersionKind{Group: "oauth.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClient"} - -// Get takes name of the oIDCClient, and returns the corresponding oIDCClient object, and an error if there is any. -func (c *FakeOIDCClients) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.OIDCClient, err error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(oidcclientsResource, c.ns, name), &v1alpha1.OIDCClient{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.OIDCClient), err -} - -// List takes label and field selectors, and returns the list of OIDCClients that match those selectors. -func (c *FakeOIDCClients) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.OIDCClientList, err error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(oidcclientsResource, oidcclientsKind, c.ns, opts), &v1alpha1.OIDCClientList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.OIDCClientList{ListMeta: obj.(*v1alpha1.OIDCClientList).ListMeta} - for _, item := range obj.(*v1alpha1.OIDCClientList).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 oIDCClients. -func (c *FakeOIDCClients) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(oidcclientsResource, c.ns, opts)) - -} - -// Create takes the representation of a oIDCClient and creates it. Returns the server's representation of the oIDCClient, and an error, if there is any. -func (c *FakeOIDCClients) Create(ctx context.Context, oIDCClient *v1alpha1.OIDCClient, opts v1.CreateOptions) (result *v1alpha1.OIDCClient, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(oidcclientsResource, c.ns, oIDCClient), &v1alpha1.OIDCClient{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.OIDCClient), err -} - -// Update takes the representation of a oIDCClient and updates it. Returns the server's representation of the oIDCClient, and an error, if there is any. -func (c *FakeOIDCClients) Update(ctx context.Context, oIDCClient *v1alpha1.OIDCClient, opts v1.UpdateOptions) (result *v1alpha1.OIDCClient, err error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(oidcclientsResource, c.ns, oIDCClient), &v1alpha1.OIDCClient{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.OIDCClient), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeOIDCClients) UpdateStatus(ctx context.Context, oIDCClient *v1alpha1.OIDCClient, opts v1.UpdateOptions) (*v1alpha1.OIDCClient, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(oidcclientsResource, "status", c.ns, oIDCClient), &v1alpha1.OIDCClient{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.OIDCClient), err -} - -// Delete takes name of the oIDCClient and deletes it. Returns an error if one occurs. -func (c *FakeOIDCClients) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(oidcclientsResource, c.ns, name), &v1alpha1.OIDCClient{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeOIDCClients) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(oidcclientsResource, c.ns, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha1.OIDCClientList{}) - return err -} - -// Patch applies the patch and returns the patched oIDCClient. -func (c *FakeOIDCClients) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.OIDCClient, err error) { - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(oidcclientsResource, c.ns, name, pt, data, subresources...), &v1alpha1.OIDCClient{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.OIDCClient), err -} diff --git a/generated/1.22/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go b/generated/1.22/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go deleted file mode 100644 index 87d22ea9..00000000 --- a/generated/1.22/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -type OIDCClientExpansion interface{} diff --git a/generated/1.22/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go b/generated/1.22/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go deleted file mode 100644 index 1bf4eb28..00000000 --- a/generated/1.22/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1alpha1 "go.pinniped.dev/generated/1.22/apis/supervisor/oauth/v1alpha1" - "go.pinniped.dev/generated/1.22/client/supervisor/clientset/versioned/scheme" - rest "k8s.io/client-go/rest" -) - -type OauthV1alpha1Interface interface { - RESTClient() rest.Interface - OIDCClientsGetter -} - -// OauthV1alpha1Client is used to interact with features provided by the oauth.supervisor.pinniped.dev group. -type OauthV1alpha1Client struct { - restClient rest.Interface -} - -func (c *OauthV1alpha1Client) OIDCClients(namespace string) OIDCClientInterface { - return newOIDCClients(c, namespace) -} - -// NewForConfig creates a new OauthV1alpha1Client for the given config. -func NewForConfig(c *rest.Config) (*OauthV1alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &OauthV1alpha1Client{client}, nil -} - -// NewForConfigOrDie creates a new OauthV1alpha1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *OauthV1alpha1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new OauthV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *OauthV1alpha1Client { - return &OauthV1alpha1Client{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 *OauthV1alpha1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/generated/1.22/client/supervisor/informers/externalversions/config/v1alpha1/interface.go b/generated/1.22/client/supervisor/informers/externalversions/config/v1alpha1/interface.go index f2d9a689..9659ea3a 100644 --- a/generated/1.22/client/supervisor/informers/externalversions/config/v1alpha1/interface.go +++ b/generated/1.22/client/supervisor/informers/externalversions/config/v1alpha1/interface.go @@ -13,6 +13,8 @@ import ( type Interface interface { // FederationDomains returns a FederationDomainInformer. FederationDomains() FederationDomainInformer + // OIDCClients returns a OIDCClientInformer. + OIDCClients() OIDCClientInformer } type version struct { @@ -30,3 +32,8 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList func (v *version) FederationDomains() FederationDomainInformer { return &federationDomainInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } + +// OIDCClients returns a OIDCClientInformer. +func (v *version) OIDCClients() OIDCClientInformer { + return &oIDCClientInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} diff --git a/generated/1.22/client/supervisor/informers/externalversions/oauth/v1alpha1/oidcclient.go b/generated/1.22/client/supervisor/informers/externalversions/config/v1alpha1/oidcclient.go similarity index 88% rename from generated/1.22/client/supervisor/informers/externalversions/oauth/v1alpha1/oidcclient.go rename to generated/1.22/client/supervisor/informers/externalversions/config/v1alpha1/oidcclient.go index 73fd8a10..a7d6ba7f 100644 --- a/generated/1.22/client/supervisor/informers/externalversions/oauth/v1alpha1/oidcclient.go +++ b/generated/1.22/client/supervisor/informers/externalversions/config/v1alpha1/oidcclient.go @@ -9,10 +9,10 @@ import ( "context" time "time" - oauthv1alpha1 "go.pinniped.dev/generated/1.22/apis/supervisor/oauth/v1alpha1" + configv1alpha1 "go.pinniped.dev/generated/1.22/apis/supervisor/config/v1alpha1" versioned "go.pinniped.dev/generated/1.22/client/supervisor/clientset/versioned" internalinterfaces "go.pinniped.dev/generated/1.22/client/supervisor/informers/externalversions/internalinterfaces" - v1alpha1 "go.pinniped.dev/generated/1.22/client/supervisor/listers/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.22/client/supervisor/listers/config/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -49,16 +49,16 @@ func NewFilteredOIDCClientInformer(client versioned.Interface, namespace string, if tweakListOptions != nil { tweakListOptions(&options) } - return client.OauthV1alpha1().OIDCClients(namespace).List(context.TODO(), options) + return client.ConfigV1alpha1().OIDCClients(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.OauthV1alpha1().OIDCClients(namespace).Watch(context.TODO(), options) + return client.ConfigV1alpha1().OIDCClients(namespace).Watch(context.TODO(), options) }, }, - &oauthv1alpha1.OIDCClient{}, + &configv1alpha1.OIDCClient{}, resyncPeriod, indexers, ) @@ -69,7 +69,7 @@ func (f *oIDCClientInformer) defaultInformer(client versioned.Interface, resyncP } func (f *oIDCClientInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&oauthv1alpha1.OIDCClient{}, f.defaultInformer) + return f.factory.InformerFor(&configv1alpha1.OIDCClient{}, f.defaultInformer) } func (f *oIDCClientInformer) Lister() v1alpha1.OIDCClientLister { diff --git a/generated/1.22/client/supervisor/informers/externalversions/factory.go b/generated/1.22/client/supervisor/informers/externalversions/factory.go index b1a59943..1686a18c 100644 --- a/generated/1.22/client/supervisor/informers/externalversions/factory.go +++ b/generated/1.22/client/supervisor/informers/externalversions/factory.go @@ -14,7 +14,6 @@ import ( config "go.pinniped.dev/generated/1.22/client/supervisor/informers/externalversions/config" idp "go.pinniped.dev/generated/1.22/client/supervisor/informers/externalversions/idp" internalinterfaces "go.pinniped.dev/generated/1.22/client/supervisor/informers/externalversions/internalinterfaces" - oauth "go.pinniped.dev/generated/1.22/client/supervisor/informers/externalversions/oauth" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -163,7 +162,6 @@ type SharedInformerFactory interface { Config() config.Interface IDP() idp.Interface - Oauth() oauth.Interface } func (f *sharedInformerFactory) Config() config.Interface { @@ -173,7 +171,3 @@ func (f *sharedInformerFactory) Config() config.Interface { func (f *sharedInformerFactory) IDP() idp.Interface { return idp.New(f, f.namespace, f.tweakListOptions) } - -func (f *sharedInformerFactory) Oauth() oauth.Interface { - return oauth.New(f, f.namespace, f.tweakListOptions) -} diff --git a/generated/1.22/client/supervisor/informers/externalversions/generic.go b/generated/1.22/client/supervisor/informers/externalversions/generic.go index 0380a5b8..9f22e409 100644 --- a/generated/1.22/client/supervisor/informers/externalversions/generic.go +++ b/generated/1.22/client/supervisor/informers/externalversions/generic.go @@ -10,7 +10,6 @@ import ( v1alpha1 "go.pinniped.dev/generated/1.22/apis/supervisor/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.22/apis/supervisor/idp/v1alpha1" - oauthv1alpha1 "go.pinniped.dev/generated/1.22/apis/supervisor/oauth/v1alpha1" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" ) @@ -44,6 +43,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource // Group=config.supervisor.pinniped.dev, Version=v1alpha1 case v1alpha1.SchemeGroupVersion.WithResource("federationdomains"): return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1alpha1().FederationDomains().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("oidcclients"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1alpha1().OIDCClients().Informer()}, nil // Group=idp.supervisor.pinniped.dev, Version=v1alpha1 case idpv1alpha1.SchemeGroupVersion.WithResource("activedirectoryidentityproviders"): @@ -53,10 +54,6 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource case idpv1alpha1.SchemeGroupVersion.WithResource("oidcidentityproviders"): return &genericInformer{resource: resource.GroupResource(), informer: f.IDP().V1alpha1().OIDCIdentityProviders().Informer()}, nil - // Group=oauth.supervisor.pinniped.dev, Version=v1alpha1 - case oauthv1alpha1.SchemeGroupVersion.WithResource("oidcclients"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Oauth().V1alpha1().OIDCClients().Informer()}, nil - } return nil, fmt.Errorf("no informer found for %v", resource) diff --git a/generated/1.22/client/supervisor/informers/externalversions/oauth/interface.go b/generated/1.22/client/supervisor/informers/externalversions/oauth/interface.go deleted file mode 100644 index 97090c7c..00000000 --- a/generated/1.22/client/supervisor/informers/externalversions/oauth/interface.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by informer-gen. DO NOT EDIT. - -package oauth - -import ( - internalinterfaces "go.pinniped.dev/generated/1.22/client/supervisor/informers/externalversions/internalinterfaces" - v1alpha1 "go.pinniped.dev/generated/1.22/client/supervisor/informers/externalversions/oauth/v1alpha1" -) - -// Interface provides access to each of this group's versions. -type Interface interface { - // V1alpha1 provides access to shared informers for resources in V1alpha1. - V1alpha1() v1alpha1.Interface -} - -type group struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// V1alpha1 returns a new v1alpha1.Interface. -func (g *group) V1alpha1() v1alpha1.Interface { - return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) -} diff --git a/generated/1.22/client/supervisor/informers/externalversions/oauth/v1alpha1/interface.go b/generated/1.22/client/supervisor/informers/externalversions/oauth/v1alpha1/interface.go deleted file mode 100644 index 19d5ccb1..00000000 --- a/generated/1.22/client/supervisor/informers/externalversions/oauth/v1alpha1/interface.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - internalinterfaces "go.pinniped.dev/generated/1.22/client/supervisor/informers/externalversions/internalinterfaces" -) - -// Interface provides access to all the informers in this group version. -type Interface interface { - // OIDCClients returns a OIDCClientInformer. - OIDCClients() OIDCClientInformer -} - -type version struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// OIDCClients returns a OIDCClientInformer. -func (v *version) OIDCClients() OIDCClientInformer { - return &oIDCClientInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} diff --git a/generated/1.22/client/supervisor/listers/config/v1alpha1/expansion_generated.go b/generated/1.22/client/supervisor/listers/config/v1alpha1/expansion_generated.go index d59892c4..bda2f20e 100644 --- a/generated/1.22/client/supervisor/listers/config/v1alpha1/expansion_generated.go +++ b/generated/1.22/client/supervisor/listers/config/v1alpha1/expansion_generated.go @@ -12,3 +12,11 @@ type FederationDomainListerExpansion interface{} // FederationDomainNamespaceListerExpansion allows custom methods to be added to // FederationDomainNamespaceLister. type FederationDomainNamespaceListerExpansion interface{} + +// OIDCClientListerExpansion allows custom methods to be added to +// OIDCClientLister. +type OIDCClientListerExpansion interface{} + +// OIDCClientNamespaceListerExpansion allows custom methods to be added to +// OIDCClientNamespaceLister. +type OIDCClientNamespaceListerExpansion interface{} diff --git a/generated/1.20/client/supervisor/listers/oauth/v1alpha1/oidcclient.go b/generated/1.22/client/supervisor/listers/config/v1alpha1/oidcclient.go similarity index 97% rename from generated/1.20/client/supervisor/listers/oauth/v1alpha1/oidcclient.go rename to generated/1.22/client/supervisor/listers/config/v1alpha1/oidcclient.go index 9cb0fe48..fe4943b0 100644 --- a/generated/1.20/client/supervisor/listers/oauth/v1alpha1/oidcclient.go +++ b/generated/1.22/client/supervisor/listers/config/v1alpha1/oidcclient.go @@ -6,7 +6,7 @@ package v1alpha1 import ( - v1alpha1 "go.pinniped.dev/generated/1.20/apis/supervisor/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.22/apis/supervisor/config/v1alpha1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" diff --git a/generated/1.22/client/supervisor/listers/oauth/v1alpha1/expansion_generated.go b/generated/1.22/client/supervisor/listers/oauth/v1alpha1/expansion_generated.go deleted file mode 100644 index c19310da..00000000 --- a/generated/1.22/client/supervisor/listers/oauth/v1alpha1/expansion_generated.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha1 - -// OIDCClientListerExpansion allows custom methods to be added to -// OIDCClientLister. -type OIDCClientListerExpansion interface{} - -// OIDCClientNamespaceListerExpansion allows custom methods to be added to -// OIDCClientNamespaceLister. -type OIDCClientNamespaceListerExpansion interface{} diff --git a/generated/1.22/client/supervisor/virtual/clientset/versioned/clientset.go b/generated/1.22/client/supervisor/virtual/clientset/versioned/clientset.go deleted file mode 100644 index c9c89465..00000000 --- a/generated/1.22/client/supervisor/virtual/clientset/versioned/clientset.go +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package versioned - -import ( - "fmt" - - oauthv1alpha1 "go.pinniped.dev/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" - discovery "k8s.io/client-go/discovery" - rest "k8s.io/client-go/rest" - flowcontrol "k8s.io/client-go/util/flowcontrol" -) - -type Interface interface { - Discovery() discovery.DiscoveryInterface - OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface -} - -// Clientset contains the clients for groups. Each group has exactly one -// version included in a Clientset. -type Clientset struct { - *discovery.DiscoveryClient - oauthV1alpha1 *oauthv1alpha1.OauthV1alpha1Client -} - -// OauthV1alpha1 retrieves the OauthV1alpha1Client -func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { - return c.oauthV1alpha1 -} - -// Discovery retrieves the DiscoveryClient -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - if c == nil { - return nil - } - return c.DiscoveryClient -} - -// NewForConfig creates a new Clientset for the given config. -// If config's RateLimiter is not set and QPS and Burst are acceptable, -// NewForConfig will generate a rate-limiter in configShallowCopy. -func NewForConfig(c *rest.Config) (*Clientset, error) { - configShallowCopy := *c - if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { - if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") - } - configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) - } - var cs Clientset - var err error - cs.oauthV1alpha1, err = oauthv1alpha1.NewForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - - cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) - if err != nil { - return nil, err - } - return &cs, nil -} - -// NewForConfigOrDie creates a new Clientset for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *Clientset { - var cs Clientset - cs.oauthV1alpha1 = oauthv1alpha1.NewForConfigOrDie(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) - return &cs -} - -// New creates a new Clientset for the given RESTClient. -func New(c rest.Interface) *Clientset { - var cs Clientset - cs.oauthV1alpha1 = oauthv1alpha1.New(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClient(c) - return &cs -} diff --git a/generated/1.22/client/supervisor/virtual/clientset/versioned/doc.go b/generated/1.22/client/supervisor/virtual/clientset/versioned/doc.go deleted file mode 100644 index 5dc02e6e..00000000 --- a/generated/1.22/client/supervisor/virtual/clientset/versioned/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated clientset. -package versioned diff --git a/generated/1.22/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go b/generated/1.22/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go deleted file mode 100644 index 5cb64013..00000000 --- a/generated/1.22/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - clientset "go.pinniped.dev/generated/1.22/client/supervisor/virtual/clientset/versioned" - oauthv1alpha1 "go.pinniped.dev/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" - fakeoauthv1alpha1 "go.pinniped.dev/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/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" -) - -// NewSimpleClientset returns a clientset that will respond with the provided objects. -// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, -// without applying any validations and/or defaults. It shouldn't be considered a replacement -// for a real clientset and is mostly useful in simple unit tests. -func NewSimpleClientset(objects ...runtime.Object) *Clientset { - o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) - for _, obj := range objects { - if err := o.Add(obj); err != nil { - panic(err) - } - } - - cs := &Clientset{tracker: o} - cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} - cs.AddReactor("*", "*", testing.ObjectReaction(o)) - cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { - gvr := action.GetResource() - ns := action.GetNamespace() - watch, err := o.Watch(gvr, ns) - if err != nil { - return false, nil, err - } - return true, watch, nil - }) - - return cs -} - -// Clientset implements clientset.Interface. Meant to be embedded into a -// struct to get a default implementation. This makes faking out just the method -// you want to test easier. -type Clientset struct { - testing.Fake - discovery *fakediscovery.FakeDiscovery - tracker testing.ObjectTracker -} - -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - return c.discovery -} - -func (c *Clientset) Tracker() testing.ObjectTracker { - return c.tracker -} - -var ( - _ clientset.Interface = &Clientset{} - _ testing.FakeClient = &Clientset{} -) - -// OauthV1alpha1 retrieves the OauthV1alpha1Client -func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { - return &fakeoauthv1alpha1.FakeOauthV1alpha1{Fake: &c.Fake} -} diff --git a/generated/1.22/client/supervisor/virtual/clientset/versioned/fake/doc.go b/generated/1.22/client/supervisor/virtual/clientset/versioned/fake/doc.go deleted file mode 100644 index 7c9538fd..00000000 --- a/generated/1.22/client/supervisor/virtual/clientset/versioned/fake/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated fake clientset. -package fake diff --git a/generated/1.22/client/supervisor/virtual/clientset/versioned/fake/register.go b/generated/1.22/client/supervisor/virtual/clientset/versioned/fake/register.go deleted file mode 100644 index 87de2f5a..00000000 --- a/generated/1.22/client/supervisor/virtual/clientset/versioned/fake/register.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - oauthv1alpha1 "go.pinniped.dev/generated/1.22/apis/supervisor/virtual/oauth/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" -) - -var scheme = runtime.NewScheme() -var codecs = serializer.NewCodecFactory(scheme) - -var localSchemeBuilder = runtime.SchemeBuilder{ - oauthv1alpha1.AddToScheme, -} - -// AddToScheme adds all types of this clientset into the given scheme. This allows composition -// of clientsets, like in: -// -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) -// -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) -// -// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types -// correctly. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(scheme)) -} diff --git a/generated/1.22/client/supervisor/virtual/clientset/versioned/scheme/doc.go b/generated/1.22/client/supervisor/virtual/clientset/versioned/scheme/doc.go deleted file mode 100644 index cc02f1d3..00000000 --- a/generated/1.22/client/supervisor/virtual/clientset/versioned/scheme/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// This package contains the scheme of the automatically generated clientset. -package scheme diff --git a/generated/1.22/client/supervisor/virtual/clientset/versioned/scheme/register.go b/generated/1.22/client/supervisor/virtual/clientset/versioned/scheme/register.go deleted file mode 100644 index 4fcfd7d8..00000000 --- a/generated/1.22/client/supervisor/virtual/clientset/versioned/scheme/register.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package scheme - -import ( - oauthv1alpha1 "go.pinniped.dev/generated/1.22/apis/supervisor/virtual/oauth/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" -) - -var Scheme = runtime.NewScheme() -var Codecs = serializer.NewCodecFactory(Scheme) -var ParameterCodec = runtime.NewParameterCodec(Scheme) -var localSchemeBuilder = runtime.SchemeBuilder{ - oauthv1alpha1.AddToScheme, -} - -// AddToScheme adds all types of this clientset into the given scheme. This allows composition -// of clientsets, like in: -// -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) -// -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) -// -// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types -// correctly. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(Scheme)) -} diff --git a/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go b/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go deleted file mode 100644 index e7a470b6..00000000 --- a/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1alpha1 diff --git a/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go b/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go deleted file mode 100644 index 7906901b..00000000 --- a/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go b/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go deleted file mode 100644 index 26dd6706..00000000 --- a/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1alpha1 "go.pinniped.dev/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" -) - -type FakeOauthV1alpha1 struct { - *testing.Fake -} - -func (c *FakeOauthV1alpha1) OIDCClientSecretRequests(namespace string) v1alpha1.OIDCClientSecretRequestInterface { - return &FakeOIDCClientSecretRequests{c, namespace} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeOauthV1alpha1) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go b/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go deleted file mode 100644 index 1fadc80c..00000000 --- a/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v1alpha1 "go.pinniped.dev/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - schema "k8s.io/apimachinery/pkg/runtime/schema" - testing "k8s.io/client-go/testing" -) - -// FakeOIDCClientSecretRequests implements OIDCClientSecretRequestInterface -type FakeOIDCClientSecretRequests struct { - Fake *FakeOauthV1alpha1 - ns string -} - -var oidcclientsecretrequestsResource = schema.GroupVersionResource{Group: "oauth.virtual.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclientsecretrequests"} - -var oidcclientsecretrequestsKind = schema.GroupVersionKind{Group: "oauth.virtual.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClientSecretRequest"} - -// Create takes the representation of a oIDCClientSecretRequest and creates it. Returns the server's representation of the oIDCClientSecretRequest, and an error, if there is any. -func (c *FakeOIDCClientSecretRequests) Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (result *v1alpha1.OIDCClientSecretRequest, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(oidcclientsecretrequestsResource, c.ns, oIDCClientSecretRequest), &v1alpha1.OIDCClientSecretRequest{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.OIDCClientSecretRequest), err -} diff --git a/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go b/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go deleted file mode 100644 index cfb00d3a..00000000 --- a/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1alpha1 "go.pinniped.dev/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1" - "go.pinniped.dev/generated/1.22/client/supervisor/virtual/clientset/versioned/scheme" - rest "k8s.io/client-go/rest" -) - -type OauthV1alpha1Interface interface { - RESTClient() rest.Interface - OIDCClientSecretRequestsGetter -} - -// OauthV1alpha1Client is used to interact with features provided by the oauth.virtual.supervisor.pinniped.dev group. -type OauthV1alpha1Client struct { - restClient rest.Interface -} - -func (c *OauthV1alpha1Client) OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface { - return newOIDCClientSecretRequests(c, namespace) -} - -// NewForConfig creates a new OauthV1alpha1Client for the given config. -func NewForConfig(c *rest.Config) (*OauthV1alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientFor(&config) - if err != nil { - return nil, err - } - return &OauthV1alpha1Client{client}, nil -} - -// NewForConfigOrDie creates a new OauthV1alpha1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *OauthV1alpha1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new OauthV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *OauthV1alpha1Client { - return &OauthV1alpha1Client{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 *OauthV1alpha1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go b/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go deleted file mode 100644 index 995eb80e..00000000 --- a/generated/1.22/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - - v1alpha1 "go.pinniped.dev/generated/1.22/apis/supervisor/virtual/oauth/v1alpha1" - scheme "go.pinniped.dev/generated/1.22/client/supervisor/virtual/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - rest "k8s.io/client-go/rest" -) - -// OIDCClientSecretRequestsGetter has a method to return a OIDCClientSecretRequestInterface. -// A group's client should implement this interface. -type OIDCClientSecretRequestsGetter interface { - OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface -} - -// OIDCClientSecretRequestInterface has methods to work with OIDCClientSecretRequest resources. -type OIDCClientSecretRequestInterface interface { - Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (*v1alpha1.OIDCClientSecretRequest, error) - OIDCClientSecretRequestExpansion -} - -// oIDCClientSecretRequests implements OIDCClientSecretRequestInterface -type oIDCClientSecretRequests struct { - client rest.Interface - ns string -} - -// newOIDCClientSecretRequests returns a OIDCClientSecretRequests -func newOIDCClientSecretRequests(c *OauthV1alpha1Client, namespace string) *oIDCClientSecretRequests { - return &oIDCClientSecretRequests{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Create takes the representation of a oIDCClientSecretRequest and creates it. Returns the server's representation of the oIDCClientSecretRequest, and an error, if there is any. -func (c *oIDCClientSecretRequests) Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (result *v1alpha1.OIDCClientSecretRequest, err error) { - result = &v1alpha1.OIDCClientSecretRequest{} - err = c.client.Post(). - Namespace(c.ns). - Resource("oidcclientsecretrequests"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(oIDCClientSecretRequest). - Do(ctx). - Into(result) - return -} diff --git a/generated/1.22/crds/config.supervisor.pinniped.dev_oidcclients.yaml b/generated/1.22/crds/config.supervisor.pinniped.dev_oidcclients.yaml new file mode 100644 index 00000000..4efa445e --- /dev/null +++ b/generated/1.22/crds/config.supervisor.pinniped.dev_oidcclients.yaml @@ -0,0 +1,125 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.8.0 + creationTimestamp: null + name: oidcclients.config.supervisor.pinniped.dev +spec: + group: config.supervisor.pinniped.dev + names: + categories: + - pinniped + kind: OIDCClient + listKind: OIDCClientList + plural: oidcclients + singular: oidcclient + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: OIDCClient describes the configuration of an OIDC client. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: Spec of the OIDC client. + properties: + allowedGrantTypes: + description: "allowedGrantTypes is a list of the allowed grant_type + param values that should be accepted during OIDC flows with this + client. \n Must only contain the following values: - authorization_code: + allows the client to perform the authorization code grant flow, + i.e. allows the webapp to authenticate users. This grant must always + be listed. - refresh_token: allows the client to perform refresh + grants for the user to extend the user's session. This grant must + be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: + allows the client to perform RFC8693 token exchange, which is a + step in the process to be able to get a cluster credential for the + user. This grant must be listed if allowedScopes lists pinniped:request-audience." + items: + enum: + - authorization_code + - refresh_token + - urn:ietf:params:oauth:grant-type:token-exchange + type: string + minItems: 1 + type: array + allowedRedirectURIs: + description: allowedRedirectURIs is a list of the allowed redirect_uri + param values that should be accepted during OIDC flows with this + client. Any other uris will be rejected. Must be https, unless it + is a loopback. + items: + type: string + minItems: 1 + type: array + allowedScopes: + description: "allowedScopes is a list of the allowed scopes param + values that should be accepted during OIDC flows with this client. + \n Must only contain the following values: - openid: The client + is allowed to request ID tokens. ID tokens only include the required + claims by default (iss, sub, aud, exp, iat). This scope must always + be listed. - offline_access: The client is allowed to request an + initial refresh token during the authorization code grant flow. + This scope must be listed if allowedGrantTypes lists refresh_token. + - pinniped:request-audience: The client is allowed to request a + new audience value during a RFC8693 token exchange, which is a step + in the process to be able to get a cluster credential for the user. + openid, username and groups scopes must be listed when this scope + is present. This scope must be listed if allowedGrantTypes lists + urn:ietf:params:oauth:grant-type:token-exchange. - username: The + client is allowed to request that ID tokens contain the user's username. + Without the username scope being requested and allowed, the ID token + will not contain the user's username. - groups: The client is allowed + to request that ID tokens contain the user's group membership, if + their group membership is discoverable by the Supervisor. Without + the groups scope being requested and allowed, the ID token will + not contain groups." + items: + enum: + - openid + - offline_access + - username + - groups + - pinniped:request-audience + type: string + minItems: 1 + type: array + required: + - allowedGrantTypes + - allowedRedirectURIs + - allowedScopes + type: object + status: + description: Status of the OIDC client. + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/generated/1.22/crds/oauth.supervisor.pinniped.dev_oidcclients.yaml b/generated/1.22/crds/oauth.supervisor.pinniped.dev_oidcclients.yaml deleted file mode 100644 index 589a9154..00000000 --- a/generated/1.22/crds/oauth.supervisor.pinniped.dev_oidcclients.yaml +++ /dev/null @@ -1,125 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null - name: oidcclients.oauth.supervisor.pinniped.dev -spec: - group: oauth.supervisor.pinniped.dev - names: - categories: - - pinniped - kind: OIDCClient - listKind: OIDCClientList - plural: oidcclients - singular: oidcclient - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1alpha1 - schema: - openAPIV3Schema: - description: OIDCClient describes the configuration of an OIDC client. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: Spec of the OIDC client. - properties: - allowedGrantTypes: - description: "allowedGrantTypes is a list of the allowed grant_type - param values that should be accepted during OIDC flows with this - client. \n Must only contain the following values: - authorization_code: - allows the client to perform the authorization code grant flow, - i.e. allows the webapp to authenticate users. This grant must always - be listed. - refresh_token: allows the client to perform refresh - grants for the user to extend the user's session. This grant must - be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: - allows the client to perform RFC8693 token exchange, which is a - step in the process to be able to get a cluster credential for the - user. This grant must be listed if allowedScopes lists pinniped:request-audience." - items: - enum: - - authorization_code - - refresh_token - - urn:ietf:params:oauth:grant-type:token-exchange - type: string - minItems: 1 - type: array - allowedRedirectURIs: - description: allowedRedirectURIs is a list of the allowed redirect_uri - param values that should be accepted during OIDC flows with this - client. Any other uris will be rejected. Must be https, unless it - is a loopback. - items: - type: string - minItems: 1 - type: array - allowedScopes: - description: "allowedScopes is a list of the allowed scopes param - values that should be accepted during OIDC flows with this client. - \n Must only contain the following values: - openid: The client - is allowed to request ID tokens. ID tokens only include the required - claims by default (iss, sub, aud, exp, iat). This scope must always - be listed. - offline_access: The client is allowed to request an - initial refresh token during the authorization code grant flow. - This scope must be listed if allowedGrantTypes lists refresh_token. - - pinniped:request-audience: The client is allowed to request a - new audience value during a RFC8693 token exchange, which is a step - in the process to be able to get a cluster credential for the user. - openid, username and groups scopes must be listed when this scope - is present. This scope must be listed if allowedGrantTypes lists - urn:ietf:params:oauth:grant-type:token-exchange. - username: The - client is allowed to request that ID tokens contain the user's username. - Without the username scope being requested and allowed, the ID token - will not contain the user's username. - groups: The client is allowed - to request that ID tokens contain the user's group membership, if - their group membership is discoverable by the Supervisor. Without - the groups scope being requested and allowed, the ID token will - not contain groups." - items: - enum: - - openid - - offline_access - - username - - groups - - pinniped:request-audience - type: string - minItems: 1 - type: array - required: - - allowedGrantTypes - - allowedRedirectURIs - - allowedScopes - type: object - status: - description: Status of the OIDC client. - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/generated/1.23/README.adoc b/generated/1.23/README.adoc index d078f60c..2e9fde69 100644 --- a/generated/1.23/README.adoc +++ b/generated/1.23/README.adoc @@ -6,15 +6,14 @@ .Packages - xref:{anchor_prefix}-authentication-concierge-pinniped-dev-v1alpha1[$$authentication.concierge.pinniped.dev/v1alpha1$$] +- xref:{anchor_prefix}-clientsecret-supervisor-pinniped-dev-clientsecret[$$clientsecret.supervisor.pinniped.dev/clientsecret$$] +- xref:{anchor_prefix}-clientsecret-supervisor-pinniped-dev-v1alpha1[$$clientsecret.supervisor.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-config-concierge-pinniped-dev-v1alpha1[$$config.concierge.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-config-supervisor-pinniped-dev-v1alpha1[$$config.supervisor.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-identity-concierge-pinniped-dev-identity[$$identity.concierge.pinniped.dev/identity$$] - xref:{anchor_prefix}-identity-concierge-pinniped-dev-v1alpha1[$$identity.concierge.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-idp-supervisor-pinniped-dev-v1alpha1[$$idp.supervisor.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-login-concierge-pinniped-dev-v1alpha1[$$login.concierge.pinniped.dev/v1alpha1$$] -- xref:{anchor_prefix}-oauth-supervisor-pinniped-dev-v1alpha1[$$oauth.supervisor.pinniped.dev/v1alpha1$$] -- xref:{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-oauth[$$oauth.virtual.supervisor.pinniped.dev/oauth$$] -- xref:{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-v1alpha1[$$oauth.virtual.supervisor.pinniped.dev/v1alpha1$$] [id="{anchor_prefix}-authentication-concierge-pinniped-dev-v1alpha1"] @@ -213,6 +212,98 @@ Status of a webhook authenticator. +[id="{anchor_prefix}-clientsecret-supervisor-pinniped-dev-clientsecret"] +=== clientsecret.supervisor.pinniped.dev/clientsecret + +Package clientsecret is the internal version of the Pinniped client secret API. + + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-clientsecret-oidcclientsecretrequestspec"] +==== OIDCClientSecretRequestSpec + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-clientsecret-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generateNewSecret`* __boolean__ | +| *`revokeOldSecrets`* __boolean__ | +|=== + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-clientsecret-oidcclientsecretrequeststatus"] +==== OIDCClientSecretRequestStatus + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-clientsecret-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generatedSecret`* __string__ | +| *`totalClientSecrets`* __integer__ | +|=== + + + +[id="{anchor_prefix}-clientsecret-supervisor-pinniped-dev-v1alpha1"] +=== clientsecret.supervisor.pinniped.dev/v1alpha1 + +Package v1alpha1 is the v1alpha1 version of the Pinniped client secret API. + + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequestspec"] +==== OIDCClientSecretRequestSpec + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generateNewSecret`* __boolean__ | +| *`revokeOldSecrets`* __boolean__ | +|=== + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequeststatus"] +==== OIDCClientSecretRequestStatus + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generatedSecret`* __string__ | +| *`totalClientSecrets`* __integer__ | +|=== + + + [id="{anchor_prefix}-config-concierge-pinniped-dev-v1alpha1"] === config.concierge.pinniped.dev/v1alpha1 @@ -546,6 +637,51 @@ FederationDomainTLSSpec is a struct that describes the TLS configuration for an |=== +[id="{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-config-v1alpha1-oidcclient"] +==== OIDCClient + +OIDCClient describes the configuration of an OIDC client. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-config-v1alpha1-oidcclientlist[$$OIDCClientList$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#objectmeta-v1-meta[$$ObjectMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. + +| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-config-v1alpha1-oidcclientspec[$$OIDCClientSpec$$]__ | Spec of the OIDC client. +| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-config-v1alpha1-oidcclientstatus[$$OIDCClientStatus$$]__ | Status of the OIDC client. +|=== + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-config-v1alpha1-oidcclientspec"] +==== OIDCClientSpec + +OIDCClientSpec is a struct that describes an OIDC Client. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-config-v1alpha1-oidcclient[$$OIDCClient$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`allowedRedirectURIs`* __string array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be https, unless it is a loopback. +| *`allowedGrantTypes`* __GrantType array__ | allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this client. + Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. +| *`allowedScopes`* __Scope array__ | allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. + Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. +|=== + + + + [id="{anchor_prefix}-identity-concierge-pinniped-dev-identity"] === identity.concierge.pinniped.dev/identity @@ -1335,148 +1471,3 @@ TokenCredentialRequestStatus is the status of a TokenCredentialRequest, returned |=== - -[id="{anchor_prefix}-oauth-supervisor-pinniped-dev-v1alpha1"] -=== oauth.supervisor.pinniped.dev/v1alpha1 - -Package v1alpha1 is the v1alpha1 version of the Pinniped supervisor oauth API. - - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-oauth-v1alpha1-oidcclient"] -==== OIDCClient - -OIDCClient describes the configuration of an OIDC client. - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-oauth-v1alpha1-oidcclientlist[$$OIDCClientList$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#objectmeta-v1-meta[$$ObjectMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. - -| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-oauth-v1alpha1-oidcclientspec[$$OIDCClientSpec$$]__ | Spec of the OIDC client. -| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-oauth-v1alpha1-oidcclientstatus[$$OIDCClientStatus$$]__ | Status of the OIDC client. -|=== - - - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-oauth-v1alpha1-oidcclientspec"] -==== OIDCClientSpec - -OIDCClientSpec is a struct that describes an OIDC Client. - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-oauth-v1alpha1-oidcclient[$$OIDCClient$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`allowedRedirectURIs`* __string array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be https, unless it is a loopback. -| *`allowedGrantTypes`* __GrantType array__ | allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. -| *`allowedScopes`* __Scope array__ | allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. -|=== - - - - - -[id="{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-oauth"] -=== oauth.virtual.supervisor.pinniped.dev/oauth - -Package oauth is the internal version of the Pinniped virtual oauth API. - - - - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-virtual-oauth-oidcclientsecretrequestspec"] -==== OIDCClientSecretRequestSpec - - - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-virtual-oauth-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`generateNewSecret`* __boolean__ | -| *`revokeOldSecrets`* __boolean__ | -|=== - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-virtual-oauth-oidcclientsecretrequeststatus"] -==== OIDCClientSecretRequestStatus - - - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-virtual-oauth-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`generatedSecret`* __string__ | -| *`totalClientSecrets`* __integer__ | -|=== - - - -[id="{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-v1alpha1"] -=== oauth.virtual.supervisor.pinniped.dev/v1alpha1 - -Package v1alpha1 is the v1alpha1 version of the Pinniped virtual oauth API. - - - - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequestspec"] -==== OIDCClientSecretRequestSpec - - - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`generateNewSecret`* __boolean__ | -| *`revokeOldSecrets`* __boolean__ | -|=== - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequeststatus"] -==== OIDCClientSecretRequestStatus - - - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`generatedSecret`* __string__ | -| *`totalClientSecrets`* __integer__ | -|=== - - diff --git a/generated/1.23/apis/supervisor/clientsecret/doc.go b/generated/1.23/apis/supervisor/clientsecret/doc.go new file mode 100644 index 00000000..c536bc75 --- /dev/null +++ b/generated/1.23/apis/supervisor/clientsecret/doc.go @@ -0,0 +1,8 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// +k8s:deepcopy-gen=package +// +groupName=clientsecret.supervisor.pinniped.dev + +// Package clientsecret is the internal version of the Pinniped client secret API. +package clientsecret diff --git a/generated/1.23/apis/supervisor/clientsecret/register.go b/generated/1.23/apis/supervisor/clientsecret/register.go new file mode 100644 index 00000000..4a1c0173 --- /dev/null +++ b/generated/1.23/apis/supervisor/clientsecret/register.go @@ -0,0 +1,37 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package clientsecret + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +const GroupName = "clientsecret.supervisor.pinniped.dev" + +// SchemeGroupVersion is group version used to register these objects. +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} + +// Kind takes an unqualified kind and returns back a Group qualified GroupKind. +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Resource takes an unqualified resource and returns back a Group qualified GroupResource. +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + AddToScheme = SchemeBuilder.AddToScheme +) + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &OIDCClientSecretRequest{}, + ) + return nil +} diff --git a/generated/1.23/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go b/generated/1.23/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go new file mode 100644 index 00000000..7fd1eb65 --- /dev/null +++ b/generated/1.23/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go @@ -0,0 +1,25 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package clientsecret + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +type OIDCClientSecretRequestSpec struct { + GenerateNewSecret bool `json:"generateNewSecret"` + RevokeOldSecrets bool `json:"revokeOldSecrets"` +} + +type OIDCClientSecretRequestStatus struct { + GeneratedSecret string `json:"generatedSecret,omitempty"` + TotalClientSecrets int `json:"totalClientSecrets"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequest struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` // metadata.name must be set to the client ID + + Spec OIDCClientSecretRequestSpec `json:"spec"` + Status OIDCClientSecretRequestStatus `json:"status"` +} diff --git a/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/conversion.go b/generated/1.23/apis/supervisor/clientsecret/v1alpha1/conversion.go similarity index 100% rename from generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/conversion.go rename to generated/1.23/apis/supervisor/clientsecret/v1alpha1/conversion.go diff --git a/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/defaults.go b/generated/1.23/apis/supervisor/clientsecret/v1alpha1/defaults.go similarity index 100% rename from generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/defaults.go rename to generated/1.23/apis/supervisor/clientsecret/v1alpha1/defaults.go diff --git a/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/doc.go b/generated/1.23/apis/supervisor/clientsecret/v1alpha1/doc.go similarity index 64% rename from generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/doc.go rename to generated/1.23/apis/supervisor/clientsecret/v1alpha1/doc.go index dd351ef9..f59e90ce 100644 --- a/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/doc.go +++ b/generated/1.23/apis/supervisor/clientsecret/v1alpha1/doc.go @@ -3,9 +3,9 @@ // +k8s:openapi-gen=true // +k8s:deepcopy-gen=package -// +k8s:conversion-gen=go.pinniped.dev/generated/1.23/apis/supervisor/virtual/oauth +// +k8s:conversion-gen=go.pinniped.dev/generated/1.23/apis/supervisor/clientsecret // +k8s:defaulter-gen=TypeMeta -// +groupName=oauth.virtual.supervisor.pinniped.dev +// +groupName=clientsecret.supervisor.pinniped.dev -// Package v1alpha1 is the v1alpha1 version of the Pinniped virtual oauth API. +// Package v1alpha1 is the v1alpha1 version of the Pinniped client secret API. package v1alpha1 diff --git a/generated/1.23/apis/supervisor/clientsecret/v1alpha1/register.go b/generated/1.23/apis/supervisor/clientsecret/v1alpha1/register.go new file mode 100644 index 00000000..49602125 --- /dev/null +++ b/generated/1.23/apis/supervisor/clientsecret/v1alpha1/register.go @@ -0,0 +1,42 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +const GroupName = "clientsecret.supervisor.pinniped.dev" + +// SchemeGroupVersion is group version used to register these objects. +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} + +var ( + SchemeBuilder runtime.SchemeBuilder + localSchemeBuilder = &SchemeBuilder + AddToScheme = SchemeBuilder.AddToScheme +) + +func init() { + // We only register manually written functions here. The registration of the + // generated functions takes place in the generated files. The separation + // makes the code compile even when the generated files are missing. + localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs) +} + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &OIDCClientSecretRequest{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} + +// Resource takes an unqualified resource and returns back a Group qualified GroupResource. +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} diff --git a/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go b/generated/1.23/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go similarity index 100% rename from generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go rename to generated/1.23/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go diff --git a/generated/1.23/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go b/generated/1.23/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go new file mode 100644 index 00000000..4b0bc6ae --- /dev/null +++ b/generated/1.23/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go @@ -0,0 +1,131 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + clientsecret "go.pinniped.dev/generated/1.23/apis/supervisor/clientsecret" + 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((*OIDCClientSecretRequest)(nil), (*clientsecret.OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest(a.(*OIDCClientSecretRequest), b.(*clientsecret.OIDCClientSecretRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientsecret.OIDCClientSecretRequest)(nil), (*OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(a.(*clientsecret.OIDCClientSecretRequest), b.(*OIDCClientSecretRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestSpec)(nil), (*clientsecret.OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(a.(*OIDCClientSecretRequestSpec), b.(*clientsecret.OIDCClientSecretRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientsecret.OIDCClientSecretRequestSpec)(nil), (*OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(a.(*clientsecret.OIDCClientSecretRequestSpec), b.(*OIDCClientSecretRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestStatus)(nil), (*clientsecret.OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(a.(*OIDCClientSecretRequestStatus), b.(*clientsecret.OIDCClientSecretRequestStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientsecret.OIDCClientSecretRequestStatus)(nil), (*OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(a.(*clientsecret.OIDCClientSecretRequestStatus), b.(*OIDCClientSecretRequestStatus), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *clientsecret.OIDCClientSecretRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *clientsecret.OIDCClientSecretRequest, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest(in, out, s) +} + +func autoConvert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *clientsecret.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest is an autogenerated conversion function. +func Convert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *clientsecret.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { + return autoConvert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in, out, s) +} + +func autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *clientsecret.OIDCClientSecretRequestSpec, s conversion.Scope) error { + out.GenerateNewSecret = in.GenerateNewSecret + out.RevokeOldSecrets = in.RevokeOldSecrets + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *clientsecret.OIDCClientSecretRequestSpec, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(in, out, s) +} + +func autoConvert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *clientsecret.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { + out.GenerateNewSecret = in.GenerateNewSecret + out.RevokeOldSecrets = in.RevokeOldSecrets + return nil +} + +// Convert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec is an autogenerated conversion function. +func Convert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *clientsecret.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { + return autoConvert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in, out, s) +} + +func autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *clientsecret.OIDCClientSecretRequestStatus, s conversion.Scope) error { + out.GeneratedSecret = in.GeneratedSecret + out.TotalClientSecrets = in.TotalClientSecrets + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *clientsecret.OIDCClientSecretRequestStatus, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(in, out, s) +} + +func autoConvert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *clientsecret.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { + out.GeneratedSecret = in.GeneratedSecret + out.TotalClientSecrets = in.TotalClientSecrets + return nil +} + +// Convert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus is an autogenerated conversion function. +func Convert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *clientsecret.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { + return autoConvert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in, out, s) +} diff --git a/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go b/generated/1.23/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go similarity index 100% rename from generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go rename to generated/1.23/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go diff --git a/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go b/generated/1.23/apis/supervisor/clientsecret/v1alpha1/zz_generated.defaults.go similarity index 100% rename from generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go rename to generated/1.23/apis/supervisor/clientsecret/v1alpha1/zz_generated.defaults.go diff --git a/generated/1.23/apis/supervisor/clientsecret/zz_generated.deepcopy.go b/generated/1.23/apis/supervisor/clientsecret/zz_generated.deepcopy.go new file mode 100644 index 00000000..e0dc7d68 --- /dev/null +++ b/generated/1.23/apis/supervisor/clientsecret/zz_generated.deepcopy.go @@ -0,0 +1,73 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package clientsecret + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequest) DeepCopyInto(out *OIDCClientSecretRequest) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequest. +func (in *OIDCClientSecretRequest) DeepCopy() *OIDCClientSecretRequest { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestSpec. +func (in *OIDCClientSecretRequestSpec) DeepCopy() *OIDCClientSecretRequestSpec { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestStatus) DeepCopyInto(out *OIDCClientSecretRequestStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestStatus. +func (in *OIDCClientSecretRequestStatus) DeepCopy() *OIDCClientSecretRequestStatus { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestStatus) + in.DeepCopyInto(out) + return out +} diff --git a/generated/1.23/apis/supervisor/config/v1alpha1/register.go b/generated/1.23/apis/supervisor/config/v1alpha1/register.go index 69045298..54c51699 100644 --- a/generated/1.23/apis/supervisor/config/v1alpha1/register.go +++ b/generated/1.23/apis/supervisor/config/v1alpha1/register.go @@ -32,6 +32,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &FederationDomain{}, &FederationDomainList{}, + &OIDCClient{}, + &OIDCClientList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/generated/1.23/apis/supervisor/oauth/v1alpha1/types_oidcclient.go b/generated/1.23/apis/supervisor/config/v1alpha1/types_oidcclient.go similarity index 100% rename from generated/1.23/apis/supervisor/oauth/v1alpha1/types_oidcclient.go rename to generated/1.23/apis/supervisor/config/v1alpha1/types_oidcclient.go diff --git a/generated/1.23/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go b/generated/1.23/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go index 856b8988..a55d88e7 100644 --- a/generated/1.23/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go +++ b/generated/1.23/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go @@ -150,3 +150,111 @@ func (in *FederationDomainTLSSpec) DeepCopy() *FederationDomainTLSSpec { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClient) DeepCopyInto(out *OIDCClient) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClient. +func (in *OIDCClient) DeepCopy() *OIDCClient { + if in == nil { + return nil + } + out := new(OIDCClient) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClient) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientList) DeepCopyInto(out *OIDCClientList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OIDCClient, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientList. +func (in *OIDCClientList) DeepCopy() *OIDCClientList { + if in == nil { + return nil + } + out := new(OIDCClientList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSpec) DeepCopyInto(out *OIDCClientSpec) { + *out = *in + if in.AllowedRedirectURIs != nil { + in, out := &in.AllowedRedirectURIs, &out.AllowedRedirectURIs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.AllowedGrantTypes != nil { + in, out := &in.AllowedGrantTypes, &out.AllowedGrantTypes + *out = make([]GrantType, len(*in)) + copy(*out, *in) + } + if in.AllowedScopes != nil { + in, out := &in.AllowedScopes, &out.AllowedScopes + *out = make([]Scope, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSpec. +func (in *OIDCClientSpec) DeepCopy() *OIDCClientSpec { + if in == nil { + return nil + } + out := new(OIDCClientSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientStatus) DeepCopyInto(out *OIDCClientStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientStatus. +func (in *OIDCClientStatus) DeepCopy() *OIDCClientStatus { + if in == nil { + return nil + } + out := new(OIDCClientStatus) + in.DeepCopyInto(out) + return out +} diff --git a/generated/1.23/apis/supervisor/oauth/v1alpha1/doc.go b/generated/1.23/apis/supervisor/oauth/v1alpha1/doc.go deleted file mode 100644 index 75580481..00000000 --- a/generated/1.23/apis/supervisor/oauth/v1alpha1/doc.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package -// +k8s:defaulter-gen=TypeMeta -// +groupName=oauth.supervisor.pinniped.dev - -// Package v1alpha1 is the v1alpha1 version of the Pinniped supervisor oauth API. -package v1alpha1 diff --git a/generated/1.23/apis/supervisor/oauth/v1alpha1/register.go b/generated/1.23/apis/supervisor/oauth/v1alpha1/register.go deleted file mode 100644 index 37ae1fbf..00000000 --- a/generated/1.23/apis/supervisor/oauth/v1alpha1/register.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const GroupName = "oauth.supervisor.pinniped.dev" - -// SchemeGroupVersion is group version used to register these objects. -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} - -var ( - SchemeBuilder runtime.SchemeBuilder - localSchemeBuilder = &SchemeBuilder - AddToScheme = localSchemeBuilder.AddToScheme -) - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addKnownTypes) -} - -// Adds the list of known types to the given scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &OIDCClient{}, - &OIDCClientList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} - -// Resource takes an unqualified resource and returns a Group qualified GroupResource. -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} diff --git a/generated/1.23/apis/supervisor/oauth/v1alpha1/zz_generated.deepcopy.go b/generated/1.23/apis/supervisor/oauth/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index 1aba8aea..00000000 --- a/generated/1.23/apis/supervisor/oauth/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,121 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClient) DeepCopyInto(out *OIDCClient) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClient. -func (in *OIDCClient) DeepCopy() *OIDCClient { - if in == nil { - return nil - } - out := new(OIDCClient) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OIDCClient) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientList) DeepCopyInto(out *OIDCClientList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]OIDCClient, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientList. -func (in *OIDCClientList) DeepCopy() *OIDCClientList { - if in == nil { - return nil - } - out := new(OIDCClientList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OIDCClientList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientSpec) DeepCopyInto(out *OIDCClientSpec) { - *out = *in - if in.AllowedRedirectURIs != nil { - in, out := &in.AllowedRedirectURIs, &out.AllowedRedirectURIs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.AllowedGrantTypes != nil { - in, out := &in.AllowedGrantTypes, &out.AllowedGrantTypes - *out = make([]GrantType, len(*in)) - copy(*out, *in) - } - if in.AllowedScopes != nil { - in, out := &in.AllowedScopes, &out.AllowedScopes - *out = make([]Scope, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSpec. -func (in *OIDCClientSpec) DeepCopy() *OIDCClientSpec { - if in == nil { - return nil - } - out := new(OIDCClientSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientStatus) DeepCopyInto(out *OIDCClientStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientStatus. -func (in *OIDCClientStatus) DeepCopy() *OIDCClientStatus { - if in == nil { - return nil - } - out := new(OIDCClientStatus) - in.DeepCopyInto(out) - return out -} diff --git a/generated/1.23/apis/supervisor/virtual/oauth/doc.go b/generated/1.23/apis/supervisor/virtual/oauth/doc.go deleted file mode 100644 index ca4e9a63..00000000 --- a/generated/1.23/apis/supervisor/virtual/oauth/doc.go +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// +k8s:deepcopy-gen=package -// +groupName=oauth.virtual.supervisor.pinniped.dev - -// Package oauth is the internal version of the Pinniped virtual oauth API. -package oauth diff --git a/generated/1.23/apis/supervisor/virtual/oauth/register.go b/generated/1.23/apis/supervisor/virtual/oauth/register.go deleted file mode 100644 index a238d85f..00000000 --- a/generated/1.23/apis/supervisor/virtual/oauth/register.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package oauth - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const GroupName = "oauth.virtual.supervisor.pinniped.dev" - -// SchemeGroupVersion is group version used to register these objects. -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} - -// Kind takes an unqualified kind and returns back a Group qualified GroupKind. -func Kind(kind string) schema.GroupKind { - return SchemeGroupVersion.WithKind(kind).GroupKind() -} - -// Resource takes an unqualified resource and returns back a Group qualified GroupResource. -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -var ( - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - AddToScheme = SchemeBuilder.AddToScheme -) - -// Adds the list of known types to the given scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &OIDCClientSecretRequest{}, - ) - return nil -} diff --git a/generated/1.23/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go b/generated/1.23/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go deleted file mode 100644 index ac54a93c..00000000 --- a/generated/1.23/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package oauth - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -type OIDCClientSecretRequestSpec struct { - GenerateNewSecret bool `json:"generateNewSecret"` - RevokeOldSecrets bool `json:"revokeOldSecrets"` -} - -type OIDCClientSecretRequestStatus struct { - GeneratedSecret string `json:"generatedSecret,omitempty"` - TotalClientSecrets int `json:"totalClientSecrets"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type OIDCClientSecretRequest struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` // metadata.name must be set to the client ID - - Spec OIDCClientSecretRequestSpec `json:"spec"` - Status OIDCClientSecretRequestStatus `json:"status"` -} diff --git a/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/register.go b/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/register.go deleted file mode 100644 index ecc75a08..00000000 --- a/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/register.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const GroupName = "oauth.virtual.supervisor.pinniped.dev" - -// SchemeGroupVersion is group version used to register these objects. -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} - -var ( - SchemeBuilder runtime.SchemeBuilder - localSchemeBuilder = &SchemeBuilder - AddToScheme = SchemeBuilder.AddToScheme -) - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs) -} - -// Adds the list of known types to the given scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &OIDCClientSecretRequest{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} - -// Resource takes an unqualified resource and returns back a Group qualified GroupResource. -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} diff --git a/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go b/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go deleted file mode 100644 index 300b394f..00000000 --- a/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go +++ /dev/null @@ -1,131 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by conversion-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - oauth "go.pinniped.dev/generated/1.23/apis/supervisor/virtual/oauth" - 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((*OIDCClientSecretRequest)(nil), (*oauth.OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(a.(*OIDCClientSecretRequest), b.(*oauth.OIDCClientSecretRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequest)(nil), (*OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(a.(*oauth.OIDCClientSecretRequest), b.(*OIDCClientSecretRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestSpec)(nil), (*oauth.OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(a.(*OIDCClientSecretRequestSpec), b.(*oauth.OIDCClientSecretRequestSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequestSpec)(nil), (*OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(a.(*oauth.OIDCClientSecretRequestSpec), b.(*OIDCClientSecretRequestSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestStatus)(nil), (*oauth.OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(a.(*OIDCClientSecretRequestStatus), b.(*oauth.OIDCClientSecretRequestStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequestStatus)(nil), (*OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(a.(*oauth.OIDCClientSecretRequestStatus), b.(*OIDCClientSecretRequestStatus), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *oauth.OIDCClientSecretRequest, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest is an autogenerated conversion function. -func Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *oauth.OIDCClientSecretRequest, s conversion.Scope) error { - return autoConvert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in, out, s) -} - -func autoConvert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *oauth.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest is an autogenerated conversion function. -func Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *oauth.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { - return autoConvert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in, out, s) -} - -func autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *oauth.OIDCClientSecretRequestSpec, s conversion.Scope) error { - out.GenerateNewSecret = in.GenerateNewSecret - out.RevokeOldSecrets = in.RevokeOldSecrets - return nil -} - -// Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec is an autogenerated conversion function. -func Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *oauth.OIDCClientSecretRequestSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in, out, s) -} - -func autoConvert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *oauth.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { - out.GenerateNewSecret = in.GenerateNewSecret - out.RevokeOldSecrets = in.RevokeOldSecrets - return nil -} - -// Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec is an autogenerated conversion function. -func Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *oauth.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { - return autoConvert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in, out, s) -} - -func autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *oauth.OIDCClientSecretRequestStatus, s conversion.Scope) error { - out.GeneratedSecret = in.GeneratedSecret - out.TotalClientSecrets = in.TotalClientSecrets - return nil -} - -// Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus is an autogenerated conversion function. -func Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *oauth.OIDCClientSecretRequestStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in, out, s) -} - -func autoConvert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *oauth.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { - out.GeneratedSecret = in.GeneratedSecret - out.TotalClientSecrets = in.TotalClientSecrets - return nil -} - -// Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus is an autogenerated conversion function. -func Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *oauth.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { - return autoConvert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in, out, s) -} diff --git a/generated/1.23/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go b/generated/1.23/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go deleted file mode 100644 index 24b58e7b..00000000 --- a/generated/1.23/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go +++ /dev/null @@ -1,73 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package oauth - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientSecretRequest) DeepCopyInto(out *OIDCClientSecretRequest) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - out.Status = in.Status - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequest. -func (in *OIDCClientSecretRequest) DeepCopy() *OIDCClientSecretRequest { - if in == nil { - return nil - } - out := new(OIDCClientSecretRequest) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestSpec. -func (in *OIDCClientSecretRequestSpec) DeepCopy() *OIDCClientSecretRequestSpec { - if in == nil { - return nil - } - out := new(OIDCClientSecretRequestSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientSecretRequestStatus) DeepCopyInto(out *OIDCClientSecretRequestStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestStatus. -func (in *OIDCClientSecretRequestStatus) DeepCopy() *OIDCClientSecretRequestStatus { - if in == nil { - return nil - } - out := new(OIDCClientSecretRequestStatus) - in.DeepCopyInto(out) - return out -} diff --git a/generated/1.23/client/supervisor/clientset/versioned/clientset.go b/generated/1.23/client/supervisor/clientset/versioned/clientset.go index 0347d1bb..ec9ff03c 100644 --- a/generated/1.23/client/supervisor/clientset/versioned/clientset.go +++ b/generated/1.23/client/supervisor/clientset/versioned/clientset.go @@ -9,9 +9,9 @@ import ( "fmt" "net/http" + clientsecretv1alpha1 "go.pinniped.dev/generated/1.23/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1" configv1alpha1 "go.pinniped.dev/generated/1.23/client/supervisor/clientset/versioned/typed/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.23/client/supervisor/clientset/versioned/typed/idp/v1alpha1" - oauthv1alpha1 "go.pinniped.dev/generated/1.23/client/supervisor/clientset/versioned/typed/oauth/v1alpha1" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" flowcontrol "k8s.io/client-go/util/flowcontrol" @@ -19,18 +19,23 @@ import ( type Interface interface { Discovery() discovery.DiscoveryInterface + ClientsecretV1alpha1() clientsecretv1alpha1.ClientsecretV1alpha1Interface ConfigV1alpha1() configv1alpha1.ConfigV1alpha1Interface IDPV1alpha1() idpv1alpha1.IDPV1alpha1Interface - OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface } // Clientset contains the clients for groups. Each group has exactly one // version included in a Clientset. type Clientset struct { *discovery.DiscoveryClient - configV1alpha1 *configv1alpha1.ConfigV1alpha1Client - iDPV1alpha1 *idpv1alpha1.IDPV1alpha1Client - oauthV1alpha1 *oauthv1alpha1.OauthV1alpha1Client + clientsecretV1alpha1 *clientsecretv1alpha1.ClientsecretV1alpha1Client + configV1alpha1 *configv1alpha1.ConfigV1alpha1Client + iDPV1alpha1 *idpv1alpha1.IDPV1alpha1Client +} + +// ClientsecretV1alpha1 retrieves the ClientsecretV1alpha1Client +func (c *Clientset) ClientsecretV1alpha1() clientsecretv1alpha1.ClientsecretV1alpha1Interface { + return c.clientsecretV1alpha1 } // ConfigV1alpha1 retrieves the ConfigV1alpha1Client @@ -43,11 +48,6 @@ func (c *Clientset) IDPV1alpha1() idpv1alpha1.IDPV1alpha1Interface { return c.iDPV1alpha1 } -// OauthV1alpha1 retrieves the OauthV1alpha1Client -func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { - return c.oauthV1alpha1 -} - // Discovery retrieves the DiscoveryClient func (c *Clientset) Discovery() discovery.DiscoveryInterface { if c == nil { @@ -92,6 +92,10 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, var cs Clientset var err error + cs.clientsecretV1alpha1, err = clientsecretv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } cs.configV1alpha1, err = configv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err @@ -100,10 +104,6 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, if err != nil { return nil, err } - cs.oauthV1alpha1, err = oauthv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) - if err != nil { - return nil, err - } cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfigAndClient(&configShallowCopy, httpClient) if err != nil { @@ -125,9 +125,9 @@ 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.clientsecretV1alpha1 = clientsecretv1alpha1.New(c) cs.configV1alpha1 = configv1alpha1.New(c) cs.iDPV1alpha1 = idpv1alpha1.New(c) - cs.oauthV1alpha1 = oauthv1alpha1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) return &cs diff --git a/generated/1.23/client/supervisor/clientset/versioned/fake/clientset_generated.go b/generated/1.23/client/supervisor/clientset/versioned/fake/clientset_generated.go index 26e5ff04..b356af4c 100644 --- a/generated/1.23/client/supervisor/clientset/versioned/fake/clientset_generated.go +++ b/generated/1.23/client/supervisor/clientset/versioned/fake/clientset_generated.go @@ -7,12 +7,12 @@ package fake import ( clientset "go.pinniped.dev/generated/1.23/client/supervisor/clientset/versioned" + clientsecretv1alpha1 "go.pinniped.dev/generated/1.23/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1" + fakeclientsecretv1alpha1 "go.pinniped.dev/generated/1.23/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake" configv1alpha1 "go.pinniped.dev/generated/1.23/client/supervisor/clientset/versioned/typed/config/v1alpha1" fakeconfigv1alpha1 "go.pinniped.dev/generated/1.23/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake" idpv1alpha1 "go.pinniped.dev/generated/1.23/client/supervisor/clientset/versioned/typed/idp/v1alpha1" fakeidpv1alpha1 "go.pinniped.dev/generated/1.23/client/supervisor/clientset/versioned/typed/idp/v1alpha1/fake" - oauthv1alpha1 "go.pinniped.dev/generated/1.23/client/supervisor/clientset/versioned/typed/oauth/v1alpha1" - fakeoauthv1alpha1 "go.pinniped.dev/generated/1.23/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/discovery" @@ -70,6 +70,11 @@ var ( _ testing.FakeClient = &Clientset{} ) +// ClientsecretV1alpha1 retrieves the ClientsecretV1alpha1Client +func (c *Clientset) ClientsecretV1alpha1() clientsecretv1alpha1.ClientsecretV1alpha1Interface { + return &fakeclientsecretv1alpha1.FakeClientsecretV1alpha1{Fake: &c.Fake} +} + // ConfigV1alpha1 retrieves the ConfigV1alpha1Client func (c *Clientset) ConfigV1alpha1() configv1alpha1.ConfigV1alpha1Interface { return &fakeconfigv1alpha1.FakeConfigV1alpha1{Fake: &c.Fake} @@ -79,8 +84,3 @@ func (c *Clientset) ConfigV1alpha1() configv1alpha1.ConfigV1alpha1Interface { func (c *Clientset) IDPV1alpha1() idpv1alpha1.IDPV1alpha1Interface { return &fakeidpv1alpha1.FakeIDPV1alpha1{Fake: &c.Fake} } - -// OauthV1alpha1 retrieves the OauthV1alpha1Client -func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { - return &fakeoauthv1alpha1.FakeOauthV1alpha1{Fake: &c.Fake} -} diff --git a/generated/1.23/client/supervisor/clientset/versioned/fake/register.go b/generated/1.23/client/supervisor/clientset/versioned/fake/register.go index 328aca4e..3047d642 100644 --- a/generated/1.23/client/supervisor/clientset/versioned/fake/register.go +++ b/generated/1.23/client/supervisor/clientset/versioned/fake/register.go @@ -6,9 +6,9 @@ package fake import ( + clientsecretv1alpha1 "go.pinniped.dev/generated/1.23/apis/supervisor/clientsecret/v1alpha1" configv1alpha1 "go.pinniped.dev/generated/1.23/apis/supervisor/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.23/apis/supervisor/idp/v1alpha1" - oauthv1alpha1 "go.pinniped.dev/generated/1.23/apis/supervisor/oauth/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -20,9 +20,9 @@ var scheme = runtime.NewScheme() var codecs = serializer.NewCodecFactory(scheme) var localSchemeBuilder = runtime.SchemeBuilder{ + clientsecretv1alpha1.AddToScheme, configv1alpha1.AddToScheme, idpv1alpha1.AddToScheme, - oauthv1alpha1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/generated/1.23/client/supervisor/clientset/versioned/scheme/register.go b/generated/1.23/client/supervisor/clientset/versioned/scheme/register.go index 5d908f2e..53d9a9dd 100644 --- a/generated/1.23/client/supervisor/clientset/versioned/scheme/register.go +++ b/generated/1.23/client/supervisor/clientset/versioned/scheme/register.go @@ -6,9 +6,9 @@ package scheme import ( + clientsecretv1alpha1 "go.pinniped.dev/generated/1.23/apis/supervisor/clientsecret/v1alpha1" configv1alpha1 "go.pinniped.dev/generated/1.23/apis/supervisor/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.23/apis/supervisor/idp/v1alpha1" - oauthv1alpha1 "go.pinniped.dev/generated/1.23/apis/supervisor/oauth/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -20,9 +20,9 @@ var Scheme = runtime.NewScheme() var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) var localSchemeBuilder = runtime.SchemeBuilder{ + clientsecretv1alpha1.AddToScheme, configv1alpha1.AddToScheme, idpv1alpha1.AddToScheme, - oauthv1alpha1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go b/generated/1.23/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/clientsecret_client.go similarity index 55% rename from generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go rename to generated/1.23/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/clientsecret_client.go index c55f2a47..d5473ea9 100644 --- a/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go +++ b/generated/1.23/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/clientsecret_client.go @@ -8,29 +8,29 @@ package v1alpha1 import ( "net/http" - v1alpha1 "go.pinniped.dev/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1" - "go.pinniped.dev/generated/1.23/client/supervisor/virtual/clientset/versioned/scheme" + v1alpha1 "go.pinniped.dev/generated/1.23/apis/supervisor/clientsecret/v1alpha1" + "go.pinniped.dev/generated/1.23/client/supervisor/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) -type OauthV1alpha1Interface interface { +type ClientsecretV1alpha1Interface interface { RESTClient() rest.Interface OIDCClientSecretRequestsGetter } -// OauthV1alpha1Client is used to interact with features provided by the oauth.virtual.supervisor.pinniped.dev group. -type OauthV1alpha1Client struct { +// ClientsecretV1alpha1Client is used to interact with features provided by the clientsecret.supervisor.pinniped.dev group. +type ClientsecretV1alpha1Client struct { restClient rest.Interface } -func (c *OauthV1alpha1Client) OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface { +func (c *ClientsecretV1alpha1Client) OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface { return newOIDCClientSecretRequests(c, namespace) } -// NewForConfig creates a new OauthV1alpha1Client for the given config. +// NewForConfig creates a new ClientsecretV1alpha1Client for the given config. // NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), // where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*OauthV1alpha1Client, error) { +func NewForConfig(c *rest.Config) (*ClientsecretV1alpha1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err @@ -42,9 +42,9 @@ func NewForConfig(c *rest.Config) (*OauthV1alpha1Client, error) { return NewForConfigAndClient(&config, httpClient) } -// NewForConfigAndClient creates a new OauthV1alpha1Client for the given config and http client. +// NewForConfigAndClient creates a new ClientsecretV1alpha1Client for the given config and http client. // Note the http client provided takes precedence over the configured transport values. -func NewForConfigAndClient(c *rest.Config, h *http.Client) (*OauthV1alpha1Client, error) { +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ClientsecretV1alpha1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err @@ -53,12 +53,12 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*OauthV1alpha1Client if err != nil { return nil, err } - return &OauthV1alpha1Client{client}, nil + return &ClientsecretV1alpha1Client{client}, nil } -// NewForConfigOrDie creates a new OauthV1alpha1Client for the given config and +// NewForConfigOrDie creates a new ClientsecretV1alpha1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *OauthV1alpha1Client { +func NewForConfigOrDie(c *rest.Config) *ClientsecretV1alpha1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -66,9 +66,9 @@ func NewForConfigOrDie(c *rest.Config) *OauthV1alpha1Client { return client } -// New creates a new OauthV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *OauthV1alpha1Client { - return &OauthV1alpha1Client{c} +// New creates a new ClientsecretV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *ClientsecretV1alpha1Client { + return &ClientsecretV1alpha1Client{c} } func setConfigDefaults(config *rest.Config) error { @@ -86,7 +86,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 *OauthV1alpha1Client) RESTClient() rest.Interface { +func (c *ClientsecretV1alpha1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/generated/1.20/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/doc.go b/generated/1.23/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/doc.go similarity index 100% rename from generated/1.20/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/doc.go rename to generated/1.23/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/doc.go diff --git a/generated/1.20/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go b/generated/1.23/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/doc.go similarity index 100% rename from generated/1.20/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go rename to generated/1.23/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/doc.go diff --git a/generated/1.23/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go b/generated/1.23/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_clientsecret_client.go similarity index 60% rename from generated/1.23/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go rename to generated/1.23/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_clientsecret_client.go index c5ce6f9b..ebf1e89c 100644 --- a/generated/1.23/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go +++ b/generated/1.23/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_clientsecret_client.go @@ -6,22 +6,22 @@ package fake import ( - v1alpha1 "go.pinniped.dev/generated/1.23/client/supervisor/clientset/versioned/typed/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.23/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1" rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" ) -type FakeOauthV1alpha1 struct { +type FakeClientsecretV1alpha1 struct { *testing.Fake } -func (c *FakeOauthV1alpha1) OIDCClients(namespace string) v1alpha1.OIDCClientInterface { - return &FakeOIDCClients{c, namespace} +func (c *FakeClientsecretV1alpha1) OIDCClientSecretRequests(namespace string) v1alpha1.OIDCClientSecretRequestInterface { + return &FakeOIDCClientSecretRequests{c, namespace} } // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeOauthV1alpha1) RESTClient() rest.Interface { +func (c *FakeClientsecretV1alpha1) RESTClient() rest.Interface { var ret *rest.RESTClient return ret } diff --git a/generated/1.23/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_oidcclientsecretrequest.go b/generated/1.23/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_oidcclientsecretrequest.go new file mode 100644 index 00000000..be5d0b56 --- /dev/null +++ b/generated/1.23/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_oidcclientsecretrequest.go @@ -0,0 +1,36 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "go.pinniped.dev/generated/1.23/apis/supervisor/clientsecret/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + schema "k8s.io/apimachinery/pkg/runtime/schema" + testing "k8s.io/client-go/testing" +) + +// FakeOIDCClientSecretRequests implements OIDCClientSecretRequestInterface +type FakeOIDCClientSecretRequests struct { + Fake *FakeClientsecretV1alpha1 + ns string +} + +var oidcclientsecretrequestsResource = schema.GroupVersionResource{Group: "clientsecret.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclientsecretrequests"} + +var oidcclientsecretrequestsKind = schema.GroupVersionKind{Group: "clientsecret.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClientSecretRequest"} + +// Create takes the representation of a oIDCClientSecretRequest and creates it. Returns the server's representation of the oIDCClientSecretRequest, and an error, if there is any. +func (c *FakeOIDCClientSecretRequests) Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (result *v1alpha1.OIDCClientSecretRequest, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(oidcclientsecretrequestsResource, c.ns, oIDCClientSecretRequest), &v1alpha1.OIDCClientSecretRequest{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.OIDCClientSecretRequest), err +} diff --git a/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go b/generated/1.23/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/generated_expansion.go similarity index 100% rename from generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go rename to generated/1.23/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/generated_expansion.go diff --git a/generated/1.23/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/oidcclientsecretrequest.go b/generated/1.23/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/oidcclientsecretrequest.go new file mode 100644 index 00000000..4851c4ff --- /dev/null +++ b/generated/1.23/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/oidcclientsecretrequest.go @@ -0,0 +1,54 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + + v1alpha1 "go.pinniped.dev/generated/1.23/apis/supervisor/clientsecret/v1alpha1" + scheme "go.pinniped.dev/generated/1.23/client/supervisor/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + rest "k8s.io/client-go/rest" +) + +// OIDCClientSecretRequestsGetter has a method to return a OIDCClientSecretRequestInterface. +// A group's client should implement this interface. +type OIDCClientSecretRequestsGetter interface { + OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface +} + +// OIDCClientSecretRequestInterface has methods to work with OIDCClientSecretRequest resources. +type OIDCClientSecretRequestInterface interface { + Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (*v1alpha1.OIDCClientSecretRequest, error) + OIDCClientSecretRequestExpansion +} + +// oIDCClientSecretRequests implements OIDCClientSecretRequestInterface +type oIDCClientSecretRequests struct { + client rest.Interface + ns string +} + +// newOIDCClientSecretRequests returns a OIDCClientSecretRequests +func newOIDCClientSecretRequests(c *ClientsecretV1alpha1Client, namespace string) *oIDCClientSecretRequests { + return &oIDCClientSecretRequests{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Create takes the representation of a oIDCClientSecretRequest and creates it. Returns the server's representation of the oIDCClientSecretRequest, and an error, if there is any. +func (c *oIDCClientSecretRequests) Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (result *v1alpha1.OIDCClientSecretRequest, err error) { + result = &v1alpha1.OIDCClientSecretRequest{} + err = c.client.Post(). + Namespace(c.ns). + Resource("oidcclientsecretrequests"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(oIDCClientSecretRequest). + Do(ctx). + Into(result) + return +} diff --git a/generated/1.23/client/supervisor/clientset/versioned/typed/config/v1alpha1/config_client.go b/generated/1.23/client/supervisor/clientset/versioned/typed/config/v1alpha1/config_client.go index 8327d19b..bca8a275 100644 --- a/generated/1.23/client/supervisor/clientset/versioned/typed/config/v1alpha1/config_client.go +++ b/generated/1.23/client/supervisor/clientset/versioned/typed/config/v1alpha1/config_client.go @@ -16,6 +16,7 @@ import ( type ConfigV1alpha1Interface interface { RESTClient() rest.Interface FederationDomainsGetter + OIDCClientsGetter } // ConfigV1alpha1Client is used to interact with features provided by the config.supervisor.pinniped.dev group. @@ -27,6 +28,10 @@ func (c *ConfigV1alpha1Client) FederationDomains(namespace string) FederationDom return newFederationDomains(c, namespace) } +func (c *ConfigV1alpha1Client) OIDCClients(namespace string) OIDCClientInterface { + return newOIDCClients(c, namespace) +} + // NewForConfig creates a new ConfigV1alpha1Client for the given config. // NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), // where httpClient was generated with rest.HTTPClientFor(c). diff --git a/generated/1.23/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go b/generated/1.23/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go index fd1c886c..9cda8fe3 100644 --- a/generated/1.23/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go +++ b/generated/1.23/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go @@ -19,6 +19,10 @@ func (c *FakeConfigV1alpha1) FederationDomains(namespace string) v1alpha1.Federa return &FakeFederationDomains{c, namespace} } +func (c *FakeConfigV1alpha1) OIDCClients(namespace string) v1alpha1.OIDCClientInterface { + return &FakeOIDCClients{c, namespace} +} + // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. func (c *FakeConfigV1alpha1) RESTClient() rest.Interface { diff --git a/generated/1.23/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclient.go b/generated/1.23/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_oidcclient.go similarity index 92% rename from generated/1.23/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclient.go rename to generated/1.23/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_oidcclient.go index 34cf2735..e810d4f6 100644 --- a/generated/1.23/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclient.go +++ b/generated/1.23/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_oidcclient.go @@ -8,7 +8,7 @@ package fake import ( "context" - v1alpha1 "go.pinniped.dev/generated/1.23/apis/supervisor/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.23/apis/supervisor/config/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -19,13 +19,13 @@ import ( // FakeOIDCClients implements OIDCClientInterface type FakeOIDCClients struct { - Fake *FakeOauthV1alpha1 + Fake *FakeConfigV1alpha1 ns string } -var oidcclientsResource = schema.GroupVersionResource{Group: "oauth.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclients"} +var oidcclientsResource = schema.GroupVersionResource{Group: "config.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclients"} -var oidcclientsKind = schema.GroupVersionKind{Group: "oauth.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClient"} +var oidcclientsKind = schema.GroupVersionKind{Group: "config.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClient"} // Get takes name of the oIDCClient, and returns the corresponding oIDCClient object, and an error if there is any. func (c *FakeOIDCClients) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.OIDCClient, err error) { diff --git a/generated/1.23/client/supervisor/clientset/versioned/typed/config/v1alpha1/generated_expansion.go b/generated/1.23/client/supervisor/clientset/versioned/typed/config/v1alpha1/generated_expansion.go index ba9c9173..35b9ee3d 100644 --- a/generated/1.23/client/supervisor/clientset/versioned/typed/config/v1alpha1/generated_expansion.go +++ b/generated/1.23/client/supervisor/clientset/versioned/typed/config/v1alpha1/generated_expansion.go @@ -6,3 +6,5 @@ package v1alpha1 type FederationDomainExpansion interface{} + +type OIDCClientExpansion interface{} diff --git a/generated/1.23/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oidcclient.go b/generated/1.23/client/supervisor/clientset/versioned/typed/config/v1alpha1/oidcclient.go similarity index 97% rename from generated/1.23/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oidcclient.go rename to generated/1.23/client/supervisor/clientset/versioned/typed/config/v1alpha1/oidcclient.go index 18287fd4..07983ea2 100644 --- a/generated/1.23/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oidcclient.go +++ b/generated/1.23/client/supervisor/clientset/versioned/typed/config/v1alpha1/oidcclient.go @@ -9,7 +9,7 @@ import ( "context" "time" - v1alpha1 "go.pinniped.dev/generated/1.23/apis/supervisor/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.23/apis/supervisor/config/v1alpha1" scheme "go.pinniped.dev/generated/1.23/client/supervisor/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -44,7 +44,7 @@ type oIDCClients struct { } // newOIDCClients returns a OIDCClients -func newOIDCClients(c *OauthV1alpha1Client, namespace string) *oIDCClients { +func newOIDCClients(c *ConfigV1alpha1Client, namespace string) *oIDCClients { return &oIDCClients{ client: c.RESTClient(), ns: namespace, diff --git a/generated/1.23/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/doc.go b/generated/1.23/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/doc.go deleted file mode 100644 index e7a470b6..00000000 --- a/generated/1.23/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1alpha1 diff --git a/generated/1.23/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go b/generated/1.23/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go deleted file mode 100644 index 7906901b..00000000 --- a/generated/1.23/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/generated/1.23/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go b/generated/1.23/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go deleted file mode 100644 index 87d22ea9..00000000 --- a/generated/1.23/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -type OIDCClientExpansion interface{} diff --git a/generated/1.23/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go b/generated/1.23/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go deleted file mode 100644 index 7891e154..00000000 --- a/generated/1.23/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "net/http" - - v1alpha1 "go.pinniped.dev/generated/1.23/apis/supervisor/oauth/v1alpha1" - "go.pinniped.dev/generated/1.23/client/supervisor/clientset/versioned/scheme" - rest "k8s.io/client-go/rest" -) - -type OauthV1alpha1Interface interface { - RESTClient() rest.Interface - OIDCClientsGetter -} - -// OauthV1alpha1Client is used to interact with features provided by the oauth.supervisor.pinniped.dev group. -type OauthV1alpha1Client struct { - restClient rest.Interface -} - -func (c *OauthV1alpha1Client) OIDCClients(namespace string) OIDCClientInterface { - return newOIDCClients(c, namespace) -} - -// NewForConfig creates a new OauthV1alpha1Client for the given config. -// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), -// where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*OauthV1alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - httpClient, err := rest.HTTPClientFor(&config) - if err != nil { - return nil, err - } - return NewForConfigAndClient(&config, httpClient) -} - -// NewForConfigAndClient creates a new OauthV1alpha1Client for the given config and http client. -// Note the http client provided takes precedence over the configured transport values. -func NewForConfigAndClient(c *rest.Config, h *http.Client) (*OauthV1alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientForConfigAndClient(&config, h) - if err != nil { - return nil, err - } - return &OauthV1alpha1Client{client}, nil -} - -// NewForConfigOrDie creates a new OauthV1alpha1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *OauthV1alpha1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new OauthV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *OauthV1alpha1Client { - return &OauthV1alpha1Client{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 *OauthV1alpha1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/generated/1.23/client/supervisor/informers/externalversions/config/v1alpha1/interface.go b/generated/1.23/client/supervisor/informers/externalversions/config/v1alpha1/interface.go index c2a3fb35..c23807e9 100644 --- a/generated/1.23/client/supervisor/informers/externalversions/config/v1alpha1/interface.go +++ b/generated/1.23/client/supervisor/informers/externalversions/config/v1alpha1/interface.go @@ -13,6 +13,8 @@ import ( type Interface interface { // FederationDomains returns a FederationDomainInformer. FederationDomains() FederationDomainInformer + // OIDCClients returns a OIDCClientInformer. + OIDCClients() OIDCClientInformer } type version struct { @@ -30,3 +32,8 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList func (v *version) FederationDomains() FederationDomainInformer { return &federationDomainInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } + +// OIDCClients returns a OIDCClientInformer. +func (v *version) OIDCClients() OIDCClientInformer { + return &oIDCClientInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} diff --git a/generated/1.23/client/supervisor/informers/externalversions/oauth/v1alpha1/oidcclient.go b/generated/1.23/client/supervisor/informers/externalversions/config/v1alpha1/oidcclient.go similarity index 88% rename from generated/1.23/client/supervisor/informers/externalversions/oauth/v1alpha1/oidcclient.go rename to generated/1.23/client/supervisor/informers/externalversions/config/v1alpha1/oidcclient.go index a7fdc001..73b0bc9a 100644 --- a/generated/1.23/client/supervisor/informers/externalversions/oauth/v1alpha1/oidcclient.go +++ b/generated/1.23/client/supervisor/informers/externalversions/config/v1alpha1/oidcclient.go @@ -9,10 +9,10 @@ import ( "context" time "time" - oauthv1alpha1 "go.pinniped.dev/generated/1.23/apis/supervisor/oauth/v1alpha1" + configv1alpha1 "go.pinniped.dev/generated/1.23/apis/supervisor/config/v1alpha1" versioned "go.pinniped.dev/generated/1.23/client/supervisor/clientset/versioned" internalinterfaces "go.pinniped.dev/generated/1.23/client/supervisor/informers/externalversions/internalinterfaces" - v1alpha1 "go.pinniped.dev/generated/1.23/client/supervisor/listers/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.23/client/supervisor/listers/config/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -49,16 +49,16 @@ func NewFilteredOIDCClientInformer(client versioned.Interface, namespace string, if tweakListOptions != nil { tweakListOptions(&options) } - return client.OauthV1alpha1().OIDCClients(namespace).List(context.TODO(), options) + return client.ConfigV1alpha1().OIDCClients(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.OauthV1alpha1().OIDCClients(namespace).Watch(context.TODO(), options) + return client.ConfigV1alpha1().OIDCClients(namespace).Watch(context.TODO(), options) }, }, - &oauthv1alpha1.OIDCClient{}, + &configv1alpha1.OIDCClient{}, resyncPeriod, indexers, ) @@ -69,7 +69,7 @@ func (f *oIDCClientInformer) defaultInformer(client versioned.Interface, resyncP } func (f *oIDCClientInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&oauthv1alpha1.OIDCClient{}, f.defaultInformer) + return f.factory.InformerFor(&configv1alpha1.OIDCClient{}, f.defaultInformer) } func (f *oIDCClientInformer) Lister() v1alpha1.OIDCClientLister { diff --git a/generated/1.23/client/supervisor/informers/externalversions/factory.go b/generated/1.23/client/supervisor/informers/externalversions/factory.go index 690cfe62..25a2ea38 100644 --- a/generated/1.23/client/supervisor/informers/externalversions/factory.go +++ b/generated/1.23/client/supervisor/informers/externalversions/factory.go @@ -14,7 +14,6 @@ import ( config "go.pinniped.dev/generated/1.23/client/supervisor/informers/externalversions/config" idp "go.pinniped.dev/generated/1.23/client/supervisor/informers/externalversions/idp" internalinterfaces "go.pinniped.dev/generated/1.23/client/supervisor/informers/externalversions/internalinterfaces" - oauth "go.pinniped.dev/generated/1.23/client/supervisor/informers/externalversions/oauth" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -163,7 +162,6 @@ type SharedInformerFactory interface { Config() config.Interface IDP() idp.Interface - Oauth() oauth.Interface } func (f *sharedInformerFactory) Config() config.Interface { @@ -173,7 +171,3 @@ func (f *sharedInformerFactory) Config() config.Interface { func (f *sharedInformerFactory) IDP() idp.Interface { return idp.New(f, f.namespace, f.tweakListOptions) } - -func (f *sharedInformerFactory) Oauth() oauth.Interface { - return oauth.New(f, f.namespace, f.tweakListOptions) -} diff --git a/generated/1.23/client/supervisor/informers/externalversions/generic.go b/generated/1.23/client/supervisor/informers/externalversions/generic.go index da434169..4d9f6dce 100644 --- a/generated/1.23/client/supervisor/informers/externalversions/generic.go +++ b/generated/1.23/client/supervisor/informers/externalversions/generic.go @@ -10,7 +10,6 @@ import ( v1alpha1 "go.pinniped.dev/generated/1.23/apis/supervisor/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.23/apis/supervisor/idp/v1alpha1" - oauthv1alpha1 "go.pinniped.dev/generated/1.23/apis/supervisor/oauth/v1alpha1" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" ) @@ -44,6 +43,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource // Group=config.supervisor.pinniped.dev, Version=v1alpha1 case v1alpha1.SchemeGroupVersion.WithResource("federationdomains"): return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1alpha1().FederationDomains().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("oidcclients"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1alpha1().OIDCClients().Informer()}, nil // Group=idp.supervisor.pinniped.dev, Version=v1alpha1 case idpv1alpha1.SchemeGroupVersion.WithResource("activedirectoryidentityproviders"): @@ -53,10 +54,6 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource case idpv1alpha1.SchemeGroupVersion.WithResource("oidcidentityproviders"): return &genericInformer{resource: resource.GroupResource(), informer: f.IDP().V1alpha1().OIDCIdentityProviders().Informer()}, nil - // Group=oauth.supervisor.pinniped.dev, Version=v1alpha1 - case oauthv1alpha1.SchemeGroupVersion.WithResource("oidcclients"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Oauth().V1alpha1().OIDCClients().Informer()}, nil - } return nil, fmt.Errorf("no informer found for %v", resource) diff --git a/generated/1.23/client/supervisor/informers/externalversions/oauth/interface.go b/generated/1.23/client/supervisor/informers/externalversions/oauth/interface.go deleted file mode 100644 index f5bbdc54..00000000 --- a/generated/1.23/client/supervisor/informers/externalversions/oauth/interface.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by informer-gen. DO NOT EDIT. - -package oauth - -import ( - internalinterfaces "go.pinniped.dev/generated/1.23/client/supervisor/informers/externalversions/internalinterfaces" - v1alpha1 "go.pinniped.dev/generated/1.23/client/supervisor/informers/externalversions/oauth/v1alpha1" -) - -// Interface provides access to each of this group's versions. -type Interface interface { - // V1alpha1 provides access to shared informers for resources in V1alpha1. - V1alpha1() v1alpha1.Interface -} - -type group struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// V1alpha1 returns a new v1alpha1.Interface. -func (g *group) V1alpha1() v1alpha1.Interface { - return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) -} diff --git a/generated/1.23/client/supervisor/informers/externalversions/oauth/v1alpha1/interface.go b/generated/1.23/client/supervisor/informers/externalversions/oauth/v1alpha1/interface.go deleted file mode 100644 index 6d128bf0..00000000 --- a/generated/1.23/client/supervisor/informers/externalversions/oauth/v1alpha1/interface.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - internalinterfaces "go.pinniped.dev/generated/1.23/client/supervisor/informers/externalversions/internalinterfaces" -) - -// Interface provides access to all the informers in this group version. -type Interface interface { - // OIDCClients returns a OIDCClientInformer. - OIDCClients() OIDCClientInformer -} - -type version struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// OIDCClients returns a OIDCClientInformer. -func (v *version) OIDCClients() OIDCClientInformer { - return &oIDCClientInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} diff --git a/generated/1.23/client/supervisor/listers/config/v1alpha1/expansion_generated.go b/generated/1.23/client/supervisor/listers/config/v1alpha1/expansion_generated.go index d59892c4..bda2f20e 100644 --- a/generated/1.23/client/supervisor/listers/config/v1alpha1/expansion_generated.go +++ b/generated/1.23/client/supervisor/listers/config/v1alpha1/expansion_generated.go @@ -12,3 +12,11 @@ type FederationDomainListerExpansion interface{} // FederationDomainNamespaceListerExpansion allows custom methods to be added to // FederationDomainNamespaceLister. type FederationDomainNamespaceListerExpansion interface{} + +// OIDCClientListerExpansion allows custom methods to be added to +// OIDCClientLister. +type OIDCClientListerExpansion interface{} + +// OIDCClientNamespaceListerExpansion allows custom methods to be added to +// OIDCClientNamespaceLister. +type OIDCClientNamespaceListerExpansion interface{} diff --git a/generated/1.23/client/supervisor/listers/config/v1alpha1/oidcclient.go b/generated/1.23/client/supervisor/listers/config/v1alpha1/oidcclient.go new file mode 100644 index 00000000..b661faa8 --- /dev/null +++ b/generated/1.23/client/supervisor/listers/config/v1alpha1/oidcclient.go @@ -0,0 +1,86 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "go.pinniped.dev/generated/1.23/apis/supervisor/config/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// OIDCClientLister helps list OIDCClients. +// All objects returned here must be treated as read-only. +type OIDCClientLister interface { + // List lists all OIDCClients in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.OIDCClient, err error) + // OIDCClients returns an object that can list and get OIDCClients. + OIDCClients(namespace string) OIDCClientNamespaceLister + OIDCClientListerExpansion +} + +// oIDCClientLister implements the OIDCClientLister interface. +type oIDCClientLister struct { + indexer cache.Indexer +} + +// NewOIDCClientLister returns a new OIDCClientLister. +func NewOIDCClientLister(indexer cache.Indexer) OIDCClientLister { + return &oIDCClientLister{indexer: indexer} +} + +// List lists all OIDCClients in the indexer. +func (s *oIDCClientLister) List(selector labels.Selector) (ret []*v1alpha1.OIDCClient, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.OIDCClient)) + }) + return ret, err +} + +// OIDCClients returns an object that can list and get OIDCClients. +func (s *oIDCClientLister) OIDCClients(namespace string) OIDCClientNamespaceLister { + return oIDCClientNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// OIDCClientNamespaceLister helps list and get OIDCClients. +// All objects returned here must be treated as read-only. +type OIDCClientNamespaceLister interface { + // List lists all OIDCClients in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.OIDCClient, err error) + // Get retrieves the OIDCClient from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1alpha1.OIDCClient, error) + OIDCClientNamespaceListerExpansion +} + +// oIDCClientNamespaceLister implements the OIDCClientNamespaceLister +// interface. +type oIDCClientNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all OIDCClients in the indexer for a given namespace. +func (s oIDCClientNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.OIDCClient, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.OIDCClient)) + }) + return ret, err +} + +// Get retrieves the OIDCClient from the indexer for a given namespace and name. +func (s oIDCClientNamespaceLister) Get(name string) (*v1alpha1.OIDCClient, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("oidcclient"), name) + } + return obj.(*v1alpha1.OIDCClient), nil +} diff --git a/generated/1.23/client/supervisor/listers/oauth/v1alpha1/expansion_generated.go b/generated/1.23/client/supervisor/listers/oauth/v1alpha1/expansion_generated.go deleted file mode 100644 index c19310da..00000000 --- a/generated/1.23/client/supervisor/listers/oauth/v1alpha1/expansion_generated.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha1 - -// OIDCClientListerExpansion allows custom methods to be added to -// OIDCClientLister. -type OIDCClientListerExpansion interface{} - -// OIDCClientNamespaceListerExpansion allows custom methods to be added to -// OIDCClientNamespaceLister. -type OIDCClientNamespaceListerExpansion interface{} diff --git a/generated/1.23/client/supervisor/listers/oauth/v1alpha1/oidcclient.go b/generated/1.23/client/supervisor/listers/oauth/v1alpha1/oidcclient.go deleted file mode 100644 index 28d81d93..00000000 --- a/generated/1.23/client/supervisor/listers/oauth/v1alpha1/oidcclient.go +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1alpha1 "go.pinniped.dev/generated/1.23/apis/supervisor/oauth/v1alpha1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// OIDCClientLister helps list OIDCClients. -// All objects returned here must be treated as read-only. -type OIDCClientLister interface { - // List lists all OIDCClients in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.OIDCClient, err error) - // OIDCClients returns an object that can list and get OIDCClients. - OIDCClients(namespace string) OIDCClientNamespaceLister - OIDCClientListerExpansion -} - -// oIDCClientLister implements the OIDCClientLister interface. -type oIDCClientLister struct { - indexer cache.Indexer -} - -// NewOIDCClientLister returns a new OIDCClientLister. -func NewOIDCClientLister(indexer cache.Indexer) OIDCClientLister { - return &oIDCClientLister{indexer: indexer} -} - -// List lists all OIDCClients in the indexer. -func (s *oIDCClientLister) List(selector labels.Selector) (ret []*v1alpha1.OIDCClient, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.OIDCClient)) - }) - return ret, err -} - -// OIDCClients returns an object that can list and get OIDCClients. -func (s *oIDCClientLister) OIDCClients(namespace string) OIDCClientNamespaceLister { - return oIDCClientNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// OIDCClientNamespaceLister helps list and get OIDCClients. -// All objects returned here must be treated as read-only. -type OIDCClientNamespaceLister interface { - // List lists all OIDCClients in the indexer for a given namespace. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.OIDCClient, err error) - // Get retrieves the OIDCClient from the indexer for a given namespace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha1.OIDCClient, error) - OIDCClientNamespaceListerExpansion -} - -// oIDCClientNamespaceLister implements the OIDCClientNamespaceLister -// interface. -type oIDCClientNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all OIDCClients in the indexer for a given namespace. -func (s oIDCClientNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.OIDCClient, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.OIDCClient)) - }) - return ret, err -} - -// Get retrieves the OIDCClient from the indexer for a given namespace and name. -func (s oIDCClientNamespaceLister) Get(name string) (*v1alpha1.OIDCClient, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1alpha1.Resource("oidcclient"), name) - } - return obj.(*v1alpha1.OIDCClient), nil -} diff --git a/generated/1.23/client/supervisor/virtual/clientset/versioned/clientset.go b/generated/1.23/client/supervisor/virtual/clientset/versioned/clientset.go deleted file mode 100644 index e3386a25..00000000 --- a/generated/1.23/client/supervisor/virtual/clientset/versioned/clientset.go +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package versioned - -import ( - "fmt" - "net/http" - - oauthv1alpha1 "go.pinniped.dev/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" - discovery "k8s.io/client-go/discovery" - rest "k8s.io/client-go/rest" - flowcontrol "k8s.io/client-go/util/flowcontrol" -) - -type Interface interface { - Discovery() discovery.DiscoveryInterface - OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface -} - -// Clientset contains the clients for groups. Each group has exactly one -// version included in a Clientset. -type Clientset struct { - *discovery.DiscoveryClient - oauthV1alpha1 *oauthv1alpha1.OauthV1alpha1Client -} - -// OauthV1alpha1 retrieves the OauthV1alpha1Client -func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { - return c.oauthV1alpha1 -} - -// Discovery retrieves the DiscoveryClient -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - if c == nil { - return nil - } - return c.DiscoveryClient -} - -// NewForConfig creates a new Clientset for the given config. -// If config's RateLimiter is not set and QPS and Burst are acceptable, -// NewForConfig will generate a rate-limiter in configShallowCopy. -// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), -// where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*Clientset, error) { - configShallowCopy := *c - - if configShallowCopy.UserAgent == "" { - configShallowCopy.UserAgent = rest.DefaultKubernetesUserAgent() - } - - // share the transport between all clients - httpClient, err := rest.HTTPClientFor(&configShallowCopy) - if err != nil { - return nil, err - } - - return NewForConfigAndClient(&configShallowCopy, httpClient) -} - -// NewForConfigAndClient creates a new Clientset for the given config and http client. -// Note the http client provided takes precedence over the configured transport values. -// If config's RateLimiter is not set and QPS and Burst are acceptable, -// NewForConfigAndClient will generate a rate-limiter in configShallowCopy. -func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, error) { - configShallowCopy := *c - if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { - if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") - } - configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) - } - - var cs Clientset - var err error - cs.oauthV1alpha1, err = oauthv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) - if err != nil { - return nil, err - } - - cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfigAndClient(&configShallowCopy, httpClient) - if err != nil { - return nil, err - } - return &cs, nil -} - -// NewForConfigOrDie creates a new Clientset for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *Clientset { - cs, err := NewForConfig(c) - if err != nil { - panic(err) - } - return cs -} - -// New creates a new Clientset for the given RESTClient. -func New(c rest.Interface) *Clientset { - var cs Clientset - cs.oauthV1alpha1 = oauthv1alpha1.New(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClient(c) - return &cs -} diff --git a/generated/1.23/client/supervisor/virtual/clientset/versioned/doc.go b/generated/1.23/client/supervisor/virtual/clientset/versioned/doc.go deleted file mode 100644 index 5dc02e6e..00000000 --- a/generated/1.23/client/supervisor/virtual/clientset/versioned/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated clientset. -package versioned diff --git a/generated/1.23/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go b/generated/1.23/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go deleted file mode 100644 index 43398825..00000000 --- a/generated/1.23/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - clientset "go.pinniped.dev/generated/1.23/client/supervisor/virtual/clientset/versioned" - oauthv1alpha1 "go.pinniped.dev/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" - fakeoauthv1alpha1 "go.pinniped.dev/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/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" -) - -// NewSimpleClientset returns a clientset that will respond with the provided objects. -// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, -// without applying any validations and/or defaults. It shouldn't be considered a replacement -// for a real clientset and is mostly useful in simple unit tests. -func NewSimpleClientset(objects ...runtime.Object) *Clientset { - o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) - for _, obj := range objects { - if err := o.Add(obj); err != nil { - panic(err) - } - } - - cs := &Clientset{tracker: o} - cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} - cs.AddReactor("*", "*", testing.ObjectReaction(o)) - cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { - gvr := action.GetResource() - ns := action.GetNamespace() - watch, err := o.Watch(gvr, ns) - if err != nil { - return false, nil, err - } - return true, watch, nil - }) - - return cs -} - -// Clientset implements clientset.Interface. Meant to be embedded into a -// struct to get a default implementation. This makes faking out just the method -// you want to test easier. -type Clientset struct { - testing.Fake - discovery *fakediscovery.FakeDiscovery - tracker testing.ObjectTracker -} - -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - return c.discovery -} - -func (c *Clientset) Tracker() testing.ObjectTracker { - return c.tracker -} - -var ( - _ clientset.Interface = &Clientset{} - _ testing.FakeClient = &Clientset{} -) - -// OauthV1alpha1 retrieves the OauthV1alpha1Client -func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { - return &fakeoauthv1alpha1.FakeOauthV1alpha1{Fake: &c.Fake} -} diff --git a/generated/1.23/client/supervisor/virtual/clientset/versioned/fake/doc.go b/generated/1.23/client/supervisor/virtual/clientset/versioned/fake/doc.go deleted file mode 100644 index 7c9538fd..00000000 --- a/generated/1.23/client/supervisor/virtual/clientset/versioned/fake/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated fake clientset. -package fake diff --git a/generated/1.23/client/supervisor/virtual/clientset/versioned/fake/register.go b/generated/1.23/client/supervisor/virtual/clientset/versioned/fake/register.go deleted file mode 100644 index 4657e60e..00000000 --- a/generated/1.23/client/supervisor/virtual/clientset/versioned/fake/register.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - oauthv1alpha1 "go.pinniped.dev/generated/1.23/apis/supervisor/virtual/oauth/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" -) - -var scheme = runtime.NewScheme() -var codecs = serializer.NewCodecFactory(scheme) - -var localSchemeBuilder = runtime.SchemeBuilder{ - oauthv1alpha1.AddToScheme, -} - -// AddToScheme adds all types of this clientset into the given scheme. This allows composition -// of clientsets, like in: -// -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) -// -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) -// -// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types -// correctly. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(scheme)) -} diff --git a/generated/1.23/client/supervisor/virtual/clientset/versioned/scheme/doc.go b/generated/1.23/client/supervisor/virtual/clientset/versioned/scheme/doc.go deleted file mode 100644 index cc02f1d3..00000000 --- a/generated/1.23/client/supervisor/virtual/clientset/versioned/scheme/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// This package contains the scheme of the automatically generated clientset. -package scheme diff --git a/generated/1.23/client/supervisor/virtual/clientset/versioned/scheme/register.go b/generated/1.23/client/supervisor/virtual/clientset/versioned/scheme/register.go deleted file mode 100644 index c101730c..00000000 --- a/generated/1.23/client/supervisor/virtual/clientset/versioned/scheme/register.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package scheme - -import ( - oauthv1alpha1 "go.pinniped.dev/generated/1.23/apis/supervisor/virtual/oauth/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" -) - -var Scheme = runtime.NewScheme() -var Codecs = serializer.NewCodecFactory(Scheme) -var ParameterCodec = runtime.NewParameterCodec(Scheme) -var localSchemeBuilder = runtime.SchemeBuilder{ - oauthv1alpha1.AddToScheme, -} - -// AddToScheme adds all types of this clientset into the given scheme. This allows composition -// of clientsets, like in: -// -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) -// -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) -// -// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types -// correctly. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(Scheme)) -} diff --git a/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go b/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go deleted file mode 100644 index e7a470b6..00000000 --- a/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1alpha1 diff --git a/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go b/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go deleted file mode 100644 index 7906901b..00000000 --- a/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go b/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go deleted file mode 100644 index ef926450..00000000 --- a/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1alpha1 "go.pinniped.dev/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" -) - -type FakeOauthV1alpha1 struct { - *testing.Fake -} - -func (c *FakeOauthV1alpha1) OIDCClientSecretRequests(namespace string) v1alpha1.OIDCClientSecretRequestInterface { - return &FakeOIDCClientSecretRequests{c, namespace} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeOauthV1alpha1) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go b/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go deleted file mode 100644 index 7fbadd7f..00000000 --- a/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v1alpha1 "go.pinniped.dev/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - schema "k8s.io/apimachinery/pkg/runtime/schema" - testing "k8s.io/client-go/testing" -) - -// FakeOIDCClientSecretRequests implements OIDCClientSecretRequestInterface -type FakeOIDCClientSecretRequests struct { - Fake *FakeOauthV1alpha1 - ns string -} - -var oidcclientsecretrequestsResource = schema.GroupVersionResource{Group: "oauth.virtual.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclientsecretrequests"} - -var oidcclientsecretrequestsKind = schema.GroupVersionKind{Group: "oauth.virtual.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClientSecretRequest"} - -// Create takes the representation of a oIDCClientSecretRequest and creates it. Returns the server's representation of the oIDCClientSecretRequest, and an error, if there is any. -func (c *FakeOIDCClientSecretRequests) Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (result *v1alpha1.OIDCClientSecretRequest, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(oidcclientsecretrequestsResource, c.ns, oIDCClientSecretRequest), &v1alpha1.OIDCClientSecretRequest{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.OIDCClientSecretRequest), err -} diff --git a/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go b/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go deleted file mode 100644 index 073ea69b..00000000 --- a/generated/1.23/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - - v1alpha1 "go.pinniped.dev/generated/1.23/apis/supervisor/virtual/oauth/v1alpha1" - scheme "go.pinniped.dev/generated/1.23/client/supervisor/virtual/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - rest "k8s.io/client-go/rest" -) - -// OIDCClientSecretRequestsGetter has a method to return a OIDCClientSecretRequestInterface. -// A group's client should implement this interface. -type OIDCClientSecretRequestsGetter interface { - OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface -} - -// OIDCClientSecretRequestInterface has methods to work with OIDCClientSecretRequest resources. -type OIDCClientSecretRequestInterface interface { - Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (*v1alpha1.OIDCClientSecretRequest, error) - OIDCClientSecretRequestExpansion -} - -// oIDCClientSecretRequests implements OIDCClientSecretRequestInterface -type oIDCClientSecretRequests struct { - client rest.Interface - ns string -} - -// newOIDCClientSecretRequests returns a OIDCClientSecretRequests -func newOIDCClientSecretRequests(c *OauthV1alpha1Client, namespace string) *oIDCClientSecretRequests { - return &oIDCClientSecretRequests{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Create takes the representation of a oIDCClientSecretRequest and creates it. Returns the server's representation of the oIDCClientSecretRequest, and an error, if there is any. -func (c *oIDCClientSecretRequests) Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (result *v1alpha1.OIDCClientSecretRequest, err error) { - result = &v1alpha1.OIDCClientSecretRequest{} - err = c.client.Post(). - Namespace(c.ns). - Resource("oidcclientsecretrequests"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(oIDCClientSecretRequest). - Do(ctx). - Into(result) - return -} diff --git a/generated/1.23/crds/config.supervisor.pinniped.dev_oidcclients.yaml b/generated/1.23/crds/config.supervisor.pinniped.dev_oidcclients.yaml new file mode 100644 index 00000000..4efa445e --- /dev/null +++ b/generated/1.23/crds/config.supervisor.pinniped.dev_oidcclients.yaml @@ -0,0 +1,125 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.8.0 + creationTimestamp: null + name: oidcclients.config.supervisor.pinniped.dev +spec: + group: config.supervisor.pinniped.dev + names: + categories: + - pinniped + kind: OIDCClient + listKind: OIDCClientList + plural: oidcclients + singular: oidcclient + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: OIDCClient describes the configuration of an OIDC client. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: Spec of the OIDC client. + properties: + allowedGrantTypes: + description: "allowedGrantTypes is a list of the allowed grant_type + param values that should be accepted during OIDC flows with this + client. \n Must only contain the following values: - authorization_code: + allows the client to perform the authorization code grant flow, + i.e. allows the webapp to authenticate users. This grant must always + be listed. - refresh_token: allows the client to perform refresh + grants for the user to extend the user's session. This grant must + be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: + allows the client to perform RFC8693 token exchange, which is a + step in the process to be able to get a cluster credential for the + user. This grant must be listed if allowedScopes lists pinniped:request-audience." + items: + enum: + - authorization_code + - refresh_token + - urn:ietf:params:oauth:grant-type:token-exchange + type: string + minItems: 1 + type: array + allowedRedirectURIs: + description: allowedRedirectURIs is a list of the allowed redirect_uri + param values that should be accepted during OIDC flows with this + client. Any other uris will be rejected. Must be https, unless it + is a loopback. + items: + type: string + minItems: 1 + type: array + allowedScopes: + description: "allowedScopes is a list of the allowed scopes param + values that should be accepted during OIDC flows with this client. + \n Must only contain the following values: - openid: The client + is allowed to request ID tokens. ID tokens only include the required + claims by default (iss, sub, aud, exp, iat). This scope must always + be listed. - offline_access: The client is allowed to request an + initial refresh token during the authorization code grant flow. + This scope must be listed if allowedGrantTypes lists refresh_token. + - pinniped:request-audience: The client is allowed to request a + new audience value during a RFC8693 token exchange, which is a step + in the process to be able to get a cluster credential for the user. + openid, username and groups scopes must be listed when this scope + is present. This scope must be listed if allowedGrantTypes lists + urn:ietf:params:oauth:grant-type:token-exchange. - username: The + client is allowed to request that ID tokens contain the user's username. + Without the username scope being requested and allowed, the ID token + will not contain the user's username. - groups: The client is allowed + to request that ID tokens contain the user's group membership, if + their group membership is discoverable by the Supervisor. Without + the groups scope being requested and allowed, the ID token will + not contain groups." + items: + enum: + - openid + - offline_access + - username + - groups + - pinniped:request-audience + type: string + minItems: 1 + type: array + required: + - allowedGrantTypes + - allowedRedirectURIs + - allowedScopes + type: object + status: + description: Status of the OIDC client. + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/generated/1.23/crds/oauth.supervisor.pinniped.dev_oidcclients.yaml b/generated/1.23/crds/oauth.supervisor.pinniped.dev_oidcclients.yaml deleted file mode 100644 index 589a9154..00000000 --- a/generated/1.23/crds/oauth.supervisor.pinniped.dev_oidcclients.yaml +++ /dev/null @@ -1,125 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null - name: oidcclients.oauth.supervisor.pinniped.dev -spec: - group: oauth.supervisor.pinniped.dev - names: - categories: - - pinniped - kind: OIDCClient - listKind: OIDCClientList - plural: oidcclients - singular: oidcclient - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1alpha1 - schema: - openAPIV3Schema: - description: OIDCClient describes the configuration of an OIDC client. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: Spec of the OIDC client. - properties: - allowedGrantTypes: - description: "allowedGrantTypes is a list of the allowed grant_type - param values that should be accepted during OIDC flows with this - client. \n Must only contain the following values: - authorization_code: - allows the client to perform the authorization code grant flow, - i.e. allows the webapp to authenticate users. This grant must always - be listed. - refresh_token: allows the client to perform refresh - grants for the user to extend the user's session. This grant must - be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: - allows the client to perform RFC8693 token exchange, which is a - step in the process to be able to get a cluster credential for the - user. This grant must be listed if allowedScopes lists pinniped:request-audience." - items: - enum: - - authorization_code - - refresh_token - - urn:ietf:params:oauth:grant-type:token-exchange - type: string - minItems: 1 - type: array - allowedRedirectURIs: - description: allowedRedirectURIs is a list of the allowed redirect_uri - param values that should be accepted during OIDC flows with this - client. Any other uris will be rejected. Must be https, unless it - is a loopback. - items: - type: string - minItems: 1 - type: array - allowedScopes: - description: "allowedScopes is a list of the allowed scopes param - values that should be accepted during OIDC flows with this client. - \n Must only contain the following values: - openid: The client - is allowed to request ID tokens. ID tokens only include the required - claims by default (iss, sub, aud, exp, iat). This scope must always - be listed. - offline_access: The client is allowed to request an - initial refresh token during the authorization code grant flow. - This scope must be listed if allowedGrantTypes lists refresh_token. - - pinniped:request-audience: The client is allowed to request a - new audience value during a RFC8693 token exchange, which is a step - in the process to be able to get a cluster credential for the user. - openid, username and groups scopes must be listed when this scope - is present. This scope must be listed if allowedGrantTypes lists - urn:ietf:params:oauth:grant-type:token-exchange. - username: The - client is allowed to request that ID tokens contain the user's username. - Without the username scope being requested and allowed, the ID token - will not contain the user's username. - groups: The client is allowed - to request that ID tokens contain the user's group membership, if - their group membership is discoverable by the Supervisor. Without - the groups scope being requested and allowed, the ID token will - not contain groups." - items: - enum: - - openid - - offline_access - - username - - groups - - pinniped:request-audience - type: string - minItems: 1 - type: array - required: - - allowedGrantTypes - - allowedRedirectURIs - - allowedScopes - type: object - status: - description: Status of the OIDC client. - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/generated/1.24/README.adoc b/generated/1.24/README.adoc index d1eff286..8d9d524d 100644 --- a/generated/1.24/README.adoc +++ b/generated/1.24/README.adoc @@ -6,15 +6,14 @@ .Packages - xref:{anchor_prefix}-authentication-concierge-pinniped-dev-v1alpha1[$$authentication.concierge.pinniped.dev/v1alpha1$$] +- xref:{anchor_prefix}-clientsecret-supervisor-pinniped-dev-clientsecret[$$clientsecret.supervisor.pinniped.dev/clientsecret$$] +- xref:{anchor_prefix}-clientsecret-supervisor-pinniped-dev-v1alpha1[$$clientsecret.supervisor.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-config-concierge-pinniped-dev-v1alpha1[$$config.concierge.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-config-supervisor-pinniped-dev-v1alpha1[$$config.supervisor.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-identity-concierge-pinniped-dev-identity[$$identity.concierge.pinniped.dev/identity$$] - xref:{anchor_prefix}-identity-concierge-pinniped-dev-v1alpha1[$$identity.concierge.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-idp-supervisor-pinniped-dev-v1alpha1[$$idp.supervisor.pinniped.dev/v1alpha1$$] - xref:{anchor_prefix}-login-concierge-pinniped-dev-v1alpha1[$$login.concierge.pinniped.dev/v1alpha1$$] -- xref:{anchor_prefix}-oauth-supervisor-pinniped-dev-v1alpha1[$$oauth.supervisor.pinniped.dev/v1alpha1$$] -- xref:{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-oauth[$$oauth.virtual.supervisor.pinniped.dev/oauth$$] -- xref:{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-v1alpha1[$$oauth.virtual.supervisor.pinniped.dev/v1alpha1$$] [id="{anchor_prefix}-authentication-concierge-pinniped-dev-v1alpha1"] @@ -213,6 +212,98 @@ Status of a webhook authenticator. +[id="{anchor_prefix}-clientsecret-supervisor-pinniped-dev-clientsecret"] +=== clientsecret.supervisor.pinniped.dev/clientsecret + +Package clientsecret is the internal version of the Pinniped client secret API. + + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-clientsecret-oidcclientsecretrequestspec"] +==== OIDCClientSecretRequestSpec + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-clientsecret-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generateNewSecret`* __boolean__ | +| *`revokeOldSecrets`* __boolean__ | +|=== + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-clientsecret-oidcclientsecretrequeststatus"] +==== OIDCClientSecretRequestStatus + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-clientsecret-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generatedSecret`* __string__ | +| *`totalClientSecrets`* __integer__ | +|=== + + + +[id="{anchor_prefix}-clientsecret-supervisor-pinniped-dev-v1alpha1"] +=== clientsecret.supervisor.pinniped.dev/v1alpha1 + +Package v1alpha1 is the v1alpha1 version of the Pinniped client secret API. + + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequestspec"] +==== OIDCClientSecretRequestSpec + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generateNewSecret`* __boolean__ | +| *`revokeOldSecrets`* __boolean__ | +|=== + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequeststatus"] +==== OIDCClientSecretRequestStatus + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`generatedSecret`* __string__ | +| *`totalClientSecrets`* __integer__ | +|=== + + + [id="{anchor_prefix}-config-concierge-pinniped-dev-v1alpha1"] === config.concierge.pinniped.dev/v1alpha1 @@ -546,6 +637,51 @@ FederationDomainTLSSpec is a struct that describes the TLS configuration for an |=== +[id="{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-config-v1alpha1-oidcclient"] +==== OIDCClient + +OIDCClient describes the configuration of an OIDC client. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-config-v1alpha1-oidcclientlist[$$OIDCClientList$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#objectmeta-v1-meta[$$ObjectMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. + +| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-config-v1alpha1-oidcclientspec[$$OIDCClientSpec$$]__ | Spec of the OIDC client. +| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-config-v1alpha1-oidcclientstatus[$$OIDCClientStatus$$]__ | Status of the OIDC client. +|=== + + + + +[id="{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-config-v1alpha1-oidcclientspec"] +==== OIDCClientSpec + +OIDCClientSpec is a struct that describes an OIDC Client. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-config-v1alpha1-oidcclient[$$OIDCClient$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`allowedRedirectURIs`* __string array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be https, unless it is a loopback. +| *`allowedGrantTypes`* __GrantType array__ | allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this client. + Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. +| *`allowedScopes`* __Scope array__ | allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. + Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. +|=== + + + + [id="{anchor_prefix}-identity-concierge-pinniped-dev-identity"] === identity.concierge.pinniped.dev/identity @@ -1335,148 +1471,3 @@ TokenCredentialRequestStatus is the status of a TokenCredentialRequest, returned |=== - -[id="{anchor_prefix}-oauth-supervisor-pinniped-dev-v1alpha1"] -=== oauth.supervisor.pinniped.dev/v1alpha1 - -Package v1alpha1 is the v1alpha1 version of the Pinniped supervisor oauth API. - - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-oauth-v1alpha1-oidcclient"] -==== OIDCClient - -OIDCClient describes the configuration of an OIDC client. - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-oauth-v1alpha1-oidcclientlist[$$OIDCClientList$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#objectmeta-v1-meta[$$ObjectMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. - -| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-oauth-v1alpha1-oidcclientspec[$$OIDCClientSpec$$]__ | Spec of the OIDC client. -| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-oauth-v1alpha1-oidcclientstatus[$$OIDCClientStatus$$]__ | Status of the OIDC client. -|=== - - - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-oauth-v1alpha1-oidcclientspec"] -==== OIDCClientSpec - -OIDCClientSpec is a struct that describes an OIDC Client. - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-oauth-v1alpha1-oidcclient[$$OIDCClient$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`allowedRedirectURIs`* __string array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be https, unless it is a loopback. -| *`allowedGrantTypes`* __GrantType array__ | allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. -| *`allowedScopes`* __Scope array__ | allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. - Must only contain the following values: - openid: The client is allowed to request ID tokens. ID tokens only include the required claims by default (iss, sub, aud, exp, iat). This scope must always be listed. - offline_access: The client is allowed to request an initial refresh token during the authorization code grant flow. This scope must be listed if allowedGrantTypes lists refresh_token. - pinniped:request-audience: The client is allowed to request a new audience value during a RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. openid, username and groups scopes must be listed when this scope is present. This scope must be listed if allowedGrantTypes lists urn:ietf:params:oauth:grant-type:token-exchange. - username: The client is allowed to request that ID tokens contain the user's username. Without the username scope being requested and allowed, the ID token will not contain the user's username. - groups: The client is allowed to request that ID tokens contain the user's group membership, if their group membership is discoverable by the Supervisor. Without the groups scope being requested and allowed, the ID token will not contain groups. -|=== - - - - - -[id="{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-oauth"] -=== oauth.virtual.supervisor.pinniped.dev/oauth - -Package oauth is the internal version of the Pinniped virtual oauth API. - - - - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-virtual-oauth-oidcclientsecretrequestspec"] -==== OIDCClientSecretRequestSpec - - - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-virtual-oauth-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`generateNewSecret`* __boolean__ | -| *`revokeOldSecrets`* __boolean__ | -|=== - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-virtual-oauth-oidcclientsecretrequeststatus"] -==== OIDCClientSecretRequestStatus - - - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-virtual-oauth-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`generatedSecret`* __string__ | -| *`totalClientSecrets`* __integer__ | -|=== - - - -[id="{anchor_prefix}-oauth-virtual-supervisor-pinniped-dev-v1alpha1"] -=== oauth.virtual.supervisor.pinniped.dev/v1alpha1 - -Package v1alpha1 is the v1alpha1 version of the Pinniped virtual oauth API. - - - - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequestspec"] -==== OIDCClientSecretRequestSpec - - - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`generateNewSecret`* __boolean__ | -| *`revokeOldSecrets`* __boolean__ | -|=== - - -[id="{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequeststatus"] -==== OIDCClientSecretRequestStatus - - - -.Appears In: -**** -- xref:{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-virtual-oauth-v1alpha1-oidcclientsecretrequest[$$OIDCClientSecretRequest$$] -**** - -[cols="25a,75a", options="header"] -|=== -| Field | Description -| *`generatedSecret`* __string__ | -| *`totalClientSecrets`* __integer__ | -|=== - - diff --git a/generated/1.24/apis/supervisor/clientsecret/doc.go b/generated/1.24/apis/supervisor/clientsecret/doc.go new file mode 100644 index 00000000..c536bc75 --- /dev/null +++ b/generated/1.24/apis/supervisor/clientsecret/doc.go @@ -0,0 +1,8 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// +k8s:deepcopy-gen=package +// +groupName=clientsecret.supervisor.pinniped.dev + +// Package clientsecret is the internal version of the Pinniped client secret API. +package clientsecret diff --git a/generated/1.24/apis/supervisor/clientsecret/register.go b/generated/1.24/apis/supervisor/clientsecret/register.go new file mode 100644 index 00000000..4a1c0173 --- /dev/null +++ b/generated/1.24/apis/supervisor/clientsecret/register.go @@ -0,0 +1,37 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package clientsecret + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +const GroupName = "clientsecret.supervisor.pinniped.dev" + +// SchemeGroupVersion is group version used to register these objects. +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} + +// Kind takes an unqualified kind and returns back a Group qualified GroupKind. +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Resource takes an unqualified resource and returns back a Group qualified GroupResource. +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + AddToScheme = SchemeBuilder.AddToScheme +) + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &OIDCClientSecretRequest{}, + ) + return nil +} diff --git a/generated/1.24/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go b/generated/1.24/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go new file mode 100644 index 00000000..7fd1eb65 --- /dev/null +++ b/generated/1.24/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go @@ -0,0 +1,25 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package clientsecret + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +type OIDCClientSecretRequestSpec struct { + GenerateNewSecret bool `json:"generateNewSecret"` + RevokeOldSecrets bool `json:"revokeOldSecrets"` +} + +type OIDCClientSecretRequestStatus struct { + GeneratedSecret string `json:"generatedSecret,omitempty"` + TotalClientSecrets int `json:"totalClientSecrets"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequest struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` // metadata.name must be set to the client ID + + Spec OIDCClientSecretRequestSpec `json:"spec"` + Status OIDCClientSecretRequestStatus `json:"status"` +} diff --git a/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/conversion.go b/generated/1.24/apis/supervisor/clientsecret/v1alpha1/conversion.go similarity index 100% rename from generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/conversion.go rename to generated/1.24/apis/supervisor/clientsecret/v1alpha1/conversion.go diff --git a/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/defaults.go b/generated/1.24/apis/supervisor/clientsecret/v1alpha1/defaults.go similarity index 100% rename from generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/defaults.go rename to generated/1.24/apis/supervisor/clientsecret/v1alpha1/defaults.go diff --git a/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/doc.go b/generated/1.24/apis/supervisor/clientsecret/v1alpha1/doc.go similarity index 64% rename from generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/doc.go rename to generated/1.24/apis/supervisor/clientsecret/v1alpha1/doc.go index e41fce90..87c38f6d 100644 --- a/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/doc.go +++ b/generated/1.24/apis/supervisor/clientsecret/v1alpha1/doc.go @@ -3,9 +3,9 @@ // +k8s:openapi-gen=true // +k8s:deepcopy-gen=package -// +k8s:conversion-gen=go.pinniped.dev/generated/1.24/apis/supervisor/virtual/oauth +// +k8s:conversion-gen=go.pinniped.dev/generated/1.24/apis/supervisor/clientsecret // +k8s:defaulter-gen=TypeMeta -// +groupName=oauth.virtual.supervisor.pinniped.dev +// +groupName=clientsecret.supervisor.pinniped.dev -// Package v1alpha1 is the v1alpha1 version of the Pinniped virtual oauth API. +// Package v1alpha1 is the v1alpha1 version of the Pinniped client secret API. package v1alpha1 diff --git a/generated/1.24/apis/supervisor/clientsecret/v1alpha1/register.go b/generated/1.24/apis/supervisor/clientsecret/v1alpha1/register.go new file mode 100644 index 00000000..49602125 --- /dev/null +++ b/generated/1.24/apis/supervisor/clientsecret/v1alpha1/register.go @@ -0,0 +1,42 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +const GroupName = "clientsecret.supervisor.pinniped.dev" + +// SchemeGroupVersion is group version used to register these objects. +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} + +var ( + SchemeBuilder runtime.SchemeBuilder + localSchemeBuilder = &SchemeBuilder + AddToScheme = SchemeBuilder.AddToScheme +) + +func init() { + // We only register manually written functions here. The registration of the + // generated functions takes place in the generated files. The separation + // makes the code compile even when the generated files are missing. + localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs) +} + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &OIDCClientSecretRequest{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} + +// Resource takes an unqualified resource and returns back a Group qualified GroupResource. +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} diff --git a/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go b/generated/1.24/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go similarity index 100% rename from generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go rename to generated/1.24/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go diff --git a/generated/1.24/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go b/generated/1.24/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go new file mode 100644 index 00000000..fd6f7ceb --- /dev/null +++ b/generated/1.24/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go @@ -0,0 +1,131 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + clientsecret "go.pinniped.dev/generated/1.24/apis/supervisor/clientsecret" + 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((*OIDCClientSecretRequest)(nil), (*clientsecret.OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest(a.(*OIDCClientSecretRequest), b.(*clientsecret.OIDCClientSecretRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientsecret.OIDCClientSecretRequest)(nil), (*OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(a.(*clientsecret.OIDCClientSecretRequest), b.(*OIDCClientSecretRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestSpec)(nil), (*clientsecret.OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(a.(*OIDCClientSecretRequestSpec), b.(*clientsecret.OIDCClientSecretRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientsecret.OIDCClientSecretRequestSpec)(nil), (*OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(a.(*clientsecret.OIDCClientSecretRequestSpec), b.(*OIDCClientSecretRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestStatus)(nil), (*clientsecret.OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(a.(*OIDCClientSecretRequestStatus), b.(*clientsecret.OIDCClientSecretRequestStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientsecret.OIDCClientSecretRequestStatus)(nil), (*OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(a.(*clientsecret.OIDCClientSecretRequestStatus), b.(*OIDCClientSecretRequestStatus), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *clientsecret.OIDCClientSecretRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *clientsecret.OIDCClientSecretRequest, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest(in, out, s) +} + +func autoConvert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *clientsecret.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest is an autogenerated conversion function. +func Convert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *clientsecret.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { + return autoConvert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in, out, s) +} + +func autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *clientsecret.OIDCClientSecretRequestSpec, s conversion.Scope) error { + out.GenerateNewSecret = in.GenerateNewSecret + out.RevokeOldSecrets = in.RevokeOldSecrets + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *clientsecret.OIDCClientSecretRequestSpec, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(in, out, s) +} + +func autoConvert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *clientsecret.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { + out.GenerateNewSecret = in.GenerateNewSecret + out.RevokeOldSecrets = in.RevokeOldSecrets + return nil +} + +// Convert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec is an autogenerated conversion function. +func Convert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *clientsecret.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { + return autoConvert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in, out, s) +} + +func autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *clientsecret.OIDCClientSecretRequestStatus, s conversion.Scope) error { + out.GeneratedSecret = in.GeneratedSecret + out.TotalClientSecrets = in.TotalClientSecrets + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *clientsecret.OIDCClientSecretRequestStatus, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(in, out, s) +} + +func autoConvert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *clientsecret.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { + out.GeneratedSecret = in.GeneratedSecret + out.TotalClientSecrets = in.TotalClientSecrets + return nil +} + +// Convert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus is an autogenerated conversion function. +func Convert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *clientsecret.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { + return autoConvert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in, out, s) +} diff --git a/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go b/generated/1.24/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go similarity index 100% rename from generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go rename to generated/1.24/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go diff --git a/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go b/generated/1.24/apis/supervisor/clientsecret/v1alpha1/zz_generated.defaults.go similarity index 100% rename from generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go rename to generated/1.24/apis/supervisor/clientsecret/v1alpha1/zz_generated.defaults.go diff --git a/generated/1.24/apis/supervisor/clientsecret/zz_generated.deepcopy.go b/generated/1.24/apis/supervisor/clientsecret/zz_generated.deepcopy.go new file mode 100644 index 00000000..e0dc7d68 --- /dev/null +++ b/generated/1.24/apis/supervisor/clientsecret/zz_generated.deepcopy.go @@ -0,0 +1,73 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package clientsecret + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequest) DeepCopyInto(out *OIDCClientSecretRequest) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequest. +func (in *OIDCClientSecretRequest) DeepCopy() *OIDCClientSecretRequest { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestSpec. +func (in *OIDCClientSecretRequestSpec) DeepCopy() *OIDCClientSecretRequestSpec { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestStatus) DeepCopyInto(out *OIDCClientSecretRequestStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestStatus. +func (in *OIDCClientSecretRequestStatus) DeepCopy() *OIDCClientSecretRequestStatus { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestStatus) + in.DeepCopyInto(out) + return out +} diff --git a/generated/1.24/apis/supervisor/config/v1alpha1/register.go b/generated/1.24/apis/supervisor/config/v1alpha1/register.go index 69045298..54c51699 100644 --- a/generated/1.24/apis/supervisor/config/v1alpha1/register.go +++ b/generated/1.24/apis/supervisor/config/v1alpha1/register.go @@ -32,6 +32,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &FederationDomain{}, &FederationDomainList{}, + &OIDCClient{}, + &OIDCClientList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/generated/1.24/apis/supervisor/oauth/v1alpha1/types_oidcclient.go b/generated/1.24/apis/supervisor/config/v1alpha1/types_oidcclient.go similarity index 100% rename from generated/1.24/apis/supervisor/oauth/v1alpha1/types_oidcclient.go rename to generated/1.24/apis/supervisor/config/v1alpha1/types_oidcclient.go diff --git a/generated/1.24/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go b/generated/1.24/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go index 856b8988..a55d88e7 100644 --- a/generated/1.24/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go +++ b/generated/1.24/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go @@ -150,3 +150,111 @@ func (in *FederationDomainTLSSpec) DeepCopy() *FederationDomainTLSSpec { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClient) DeepCopyInto(out *OIDCClient) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClient. +func (in *OIDCClient) DeepCopy() *OIDCClient { + if in == nil { + return nil + } + out := new(OIDCClient) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClient) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientList) DeepCopyInto(out *OIDCClientList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OIDCClient, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientList. +func (in *OIDCClientList) DeepCopy() *OIDCClientList { + if in == nil { + return nil + } + out := new(OIDCClientList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSpec) DeepCopyInto(out *OIDCClientSpec) { + *out = *in + if in.AllowedRedirectURIs != nil { + in, out := &in.AllowedRedirectURIs, &out.AllowedRedirectURIs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.AllowedGrantTypes != nil { + in, out := &in.AllowedGrantTypes, &out.AllowedGrantTypes + *out = make([]GrantType, len(*in)) + copy(*out, *in) + } + if in.AllowedScopes != nil { + in, out := &in.AllowedScopes, &out.AllowedScopes + *out = make([]Scope, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSpec. +func (in *OIDCClientSpec) DeepCopy() *OIDCClientSpec { + if in == nil { + return nil + } + out := new(OIDCClientSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientStatus) DeepCopyInto(out *OIDCClientStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientStatus. +func (in *OIDCClientStatus) DeepCopy() *OIDCClientStatus { + if in == nil { + return nil + } + out := new(OIDCClientStatus) + in.DeepCopyInto(out) + return out +} diff --git a/generated/1.24/apis/supervisor/oauth/v1alpha1/doc.go b/generated/1.24/apis/supervisor/oauth/v1alpha1/doc.go deleted file mode 100644 index 75580481..00000000 --- a/generated/1.24/apis/supervisor/oauth/v1alpha1/doc.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package -// +k8s:defaulter-gen=TypeMeta -// +groupName=oauth.supervisor.pinniped.dev - -// Package v1alpha1 is the v1alpha1 version of the Pinniped supervisor oauth API. -package v1alpha1 diff --git a/generated/1.24/apis/supervisor/oauth/v1alpha1/register.go b/generated/1.24/apis/supervisor/oauth/v1alpha1/register.go deleted file mode 100644 index 37ae1fbf..00000000 --- a/generated/1.24/apis/supervisor/oauth/v1alpha1/register.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const GroupName = "oauth.supervisor.pinniped.dev" - -// SchemeGroupVersion is group version used to register these objects. -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} - -var ( - SchemeBuilder runtime.SchemeBuilder - localSchemeBuilder = &SchemeBuilder - AddToScheme = localSchemeBuilder.AddToScheme -) - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addKnownTypes) -} - -// Adds the list of known types to the given scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &OIDCClient{}, - &OIDCClientList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} - -// Resource takes an unqualified resource and returns a Group qualified GroupResource. -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} diff --git a/generated/1.24/apis/supervisor/oauth/v1alpha1/zz_generated.deepcopy.go b/generated/1.24/apis/supervisor/oauth/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index 1aba8aea..00000000 --- a/generated/1.24/apis/supervisor/oauth/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,121 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClient) DeepCopyInto(out *OIDCClient) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClient. -func (in *OIDCClient) DeepCopy() *OIDCClient { - if in == nil { - return nil - } - out := new(OIDCClient) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OIDCClient) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientList) DeepCopyInto(out *OIDCClientList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]OIDCClient, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientList. -func (in *OIDCClientList) DeepCopy() *OIDCClientList { - if in == nil { - return nil - } - out := new(OIDCClientList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OIDCClientList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientSpec) DeepCopyInto(out *OIDCClientSpec) { - *out = *in - if in.AllowedRedirectURIs != nil { - in, out := &in.AllowedRedirectURIs, &out.AllowedRedirectURIs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.AllowedGrantTypes != nil { - in, out := &in.AllowedGrantTypes, &out.AllowedGrantTypes - *out = make([]GrantType, len(*in)) - copy(*out, *in) - } - if in.AllowedScopes != nil { - in, out := &in.AllowedScopes, &out.AllowedScopes - *out = make([]Scope, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSpec. -func (in *OIDCClientSpec) DeepCopy() *OIDCClientSpec { - if in == nil { - return nil - } - out := new(OIDCClientSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientStatus) DeepCopyInto(out *OIDCClientStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientStatus. -func (in *OIDCClientStatus) DeepCopy() *OIDCClientStatus { - if in == nil { - return nil - } - out := new(OIDCClientStatus) - in.DeepCopyInto(out) - return out -} diff --git a/generated/1.24/apis/supervisor/virtual/oauth/doc.go b/generated/1.24/apis/supervisor/virtual/oauth/doc.go deleted file mode 100644 index ca4e9a63..00000000 --- a/generated/1.24/apis/supervisor/virtual/oauth/doc.go +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// +k8s:deepcopy-gen=package -// +groupName=oauth.virtual.supervisor.pinniped.dev - -// Package oauth is the internal version of the Pinniped virtual oauth API. -package oauth diff --git a/generated/1.24/apis/supervisor/virtual/oauth/register.go b/generated/1.24/apis/supervisor/virtual/oauth/register.go deleted file mode 100644 index a238d85f..00000000 --- a/generated/1.24/apis/supervisor/virtual/oauth/register.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package oauth - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const GroupName = "oauth.virtual.supervisor.pinniped.dev" - -// SchemeGroupVersion is group version used to register these objects. -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} - -// Kind takes an unqualified kind and returns back a Group qualified GroupKind. -func Kind(kind string) schema.GroupKind { - return SchemeGroupVersion.WithKind(kind).GroupKind() -} - -// Resource takes an unqualified resource and returns back a Group qualified GroupResource. -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -var ( - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - AddToScheme = SchemeBuilder.AddToScheme -) - -// Adds the list of known types to the given scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &OIDCClientSecretRequest{}, - ) - return nil -} diff --git a/generated/1.24/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go b/generated/1.24/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go deleted file mode 100644 index ac54a93c..00000000 --- a/generated/1.24/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package oauth - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -type OIDCClientSecretRequestSpec struct { - GenerateNewSecret bool `json:"generateNewSecret"` - RevokeOldSecrets bool `json:"revokeOldSecrets"` -} - -type OIDCClientSecretRequestStatus struct { - GeneratedSecret string `json:"generatedSecret,omitempty"` - TotalClientSecrets int `json:"totalClientSecrets"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type OIDCClientSecretRequest struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` // metadata.name must be set to the client ID - - Spec OIDCClientSecretRequestSpec `json:"spec"` - Status OIDCClientSecretRequestStatus `json:"status"` -} diff --git a/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/register.go b/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/register.go deleted file mode 100644 index ecc75a08..00000000 --- a/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/register.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const GroupName = "oauth.virtual.supervisor.pinniped.dev" - -// SchemeGroupVersion is group version used to register these objects. -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} - -var ( - SchemeBuilder runtime.SchemeBuilder - localSchemeBuilder = &SchemeBuilder - AddToScheme = SchemeBuilder.AddToScheme -) - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs) -} - -// Adds the list of known types to the given scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &OIDCClientSecretRequest{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} - -// Resource takes an unqualified resource and returns back a Group qualified GroupResource. -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} diff --git a/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go b/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go deleted file mode 100644 index 35815fbe..00000000 --- a/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go +++ /dev/null @@ -1,131 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by conversion-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - oauth "go.pinniped.dev/generated/1.24/apis/supervisor/virtual/oauth" - 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((*OIDCClientSecretRequest)(nil), (*oauth.OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(a.(*OIDCClientSecretRequest), b.(*oauth.OIDCClientSecretRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequest)(nil), (*OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(a.(*oauth.OIDCClientSecretRequest), b.(*OIDCClientSecretRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestSpec)(nil), (*oauth.OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(a.(*OIDCClientSecretRequestSpec), b.(*oauth.OIDCClientSecretRequestSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequestSpec)(nil), (*OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(a.(*oauth.OIDCClientSecretRequestSpec), b.(*OIDCClientSecretRequestSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestStatus)(nil), (*oauth.OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(a.(*OIDCClientSecretRequestStatus), b.(*oauth.OIDCClientSecretRequestStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequestStatus)(nil), (*OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(a.(*oauth.OIDCClientSecretRequestStatus), b.(*OIDCClientSecretRequestStatus), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *oauth.OIDCClientSecretRequest, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest is an autogenerated conversion function. -func Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *oauth.OIDCClientSecretRequest, s conversion.Scope) error { - return autoConvert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in, out, s) -} - -func autoConvert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *oauth.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest is an autogenerated conversion function. -func Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *oauth.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { - return autoConvert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in, out, s) -} - -func autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *oauth.OIDCClientSecretRequestSpec, s conversion.Scope) error { - out.GenerateNewSecret = in.GenerateNewSecret - out.RevokeOldSecrets = in.RevokeOldSecrets - return nil -} - -// Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec is an autogenerated conversion function. -func Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *oauth.OIDCClientSecretRequestSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in, out, s) -} - -func autoConvert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *oauth.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { - out.GenerateNewSecret = in.GenerateNewSecret - out.RevokeOldSecrets = in.RevokeOldSecrets - return nil -} - -// Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec is an autogenerated conversion function. -func Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *oauth.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { - return autoConvert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in, out, s) -} - -func autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *oauth.OIDCClientSecretRequestStatus, s conversion.Scope) error { - out.GeneratedSecret = in.GeneratedSecret - out.TotalClientSecrets = in.TotalClientSecrets - return nil -} - -// Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus is an autogenerated conversion function. -func Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *oauth.OIDCClientSecretRequestStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in, out, s) -} - -func autoConvert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *oauth.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { - out.GeneratedSecret = in.GeneratedSecret - out.TotalClientSecrets = in.TotalClientSecrets - return nil -} - -// Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus is an autogenerated conversion function. -func Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *oauth.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { - return autoConvert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in, out, s) -} diff --git a/generated/1.24/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go b/generated/1.24/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go deleted file mode 100644 index 24b58e7b..00000000 --- a/generated/1.24/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go +++ /dev/null @@ -1,73 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package oauth - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientSecretRequest) DeepCopyInto(out *OIDCClientSecretRequest) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - out.Status = in.Status - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequest. -func (in *OIDCClientSecretRequest) DeepCopy() *OIDCClientSecretRequest { - if in == nil { - return nil - } - out := new(OIDCClientSecretRequest) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestSpec. -func (in *OIDCClientSecretRequestSpec) DeepCopy() *OIDCClientSecretRequestSpec { - if in == nil { - return nil - } - out := new(OIDCClientSecretRequestSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientSecretRequestStatus) DeepCopyInto(out *OIDCClientSecretRequestStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestStatus. -func (in *OIDCClientSecretRequestStatus) DeepCopy() *OIDCClientSecretRequestStatus { - if in == nil { - return nil - } - out := new(OIDCClientSecretRequestStatus) - in.DeepCopyInto(out) - return out -} diff --git a/generated/1.24/client/supervisor/clientset/versioned/clientset.go b/generated/1.24/client/supervisor/clientset/versioned/clientset.go index faf9359f..830a52a1 100644 --- a/generated/1.24/client/supervisor/clientset/versioned/clientset.go +++ b/generated/1.24/client/supervisor/clientset/versioned/clientset.go @@ -9,9 +9,9 @@ import ( "fmt" "net/http" + clientsecretv1alpha1 "go.pinniped.dev/generated/1.24/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1" configv1alpha1 "go.pinniped.dev/generated/1.24/client/supervisor/clientset/versioned/typed/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.24/client/supervisor/clientset/versioned/typed/idp/v1alpha1" - oauthv1alpha1 "go.pinniped.dev/generated/1.24/client/supervisor/clientset/versioned/typed/oauth/v1alpha1" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" flowcontrol "k8s.io/client-go/util/flowcontrol" @@ -19,18 +19,23 @@ import ( type Interface interface { Discovery() discovery.DiscoveryInterface + ClientsecretV1alpha1() clientsecretv1alpha1.ClientsecretV1alpha1Interface ConfigV1alpha1() configv1alpha1.ConfigV1alpha1Interface IDPV1alpha1() idpv1alpha1.IDPV1alpha1Interface - OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface } // Clientset contains the clients for groups. Each group has exactly one // version included in a Clientset. type Clientset struct { *discovery.DiscoveryClient - configV1alpha1 *configv1alpha1.ConfigV1alpha1Client - iDPV1alpha1 *idpv1alpha1.IDPV1alpha1Client - oauthV1alpha1 *oauthv1alpha1.OauthV1alpha1Client + clientsecretV1alpha1 *clientsecretv1alpha1.ClientsecretV1alpha1Client + configV1alpha1 *configv1alpha1.ConfigV1alpha1Client + iDPV1alpha1 *idpv1alpha1.IDPV1alpha1Client +} + +// ClientsecretV1alpha1 retrieves the ClientsecretV1alpha1Client +func (c *Clientset) ClientsecretV1alpha1() clientsecretv1alpha1.ClientsecretV1alpha1Interface { + return c.clientsecretV1alpha1 } // ConfigV1alpha1 retrieves the ConfigV1alpha1Client @@ -43,11 +48,6 @@ func (c *Clientset) IDPV1alpha1() idpv1alpha1.IDPV1alpha1Interface { return c.iDPV1alpha1 } -// OauthV1alpha1 retrieves the OauthV1alpha1Client -func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { - return c.oauthV1alpha1 -} - // Discovery retrieves the DiscoveryClient func (c *Clientset) Discovery() discovery.DiscoveryInterface { if c == nil { @@ -92,6 +92,10 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, var cs Clientset var err error + cs.clientsecretV1alpha1, err = clientsecretv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } cs.configV1alpha1, err = configv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err @@ -100,10 +104,6 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, if err != nil { return nil, err } - cs.oauthV1alpha1, err = oauthv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) - if err != nil { - return nil, err - } cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfigAndClient(&configShallowCopy, httpClient) if err != nil { @@ -125,9 +125,9 @@ 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.clientsecretV1alpha1 = clientsecretv1alpha1.New(c) cs.configV1alpha1 = configv1alpha1.New(c) cs.iDPV1alpha1 = idpv1alpha1.New(c) - cs.oauthV1alpha1 = oauthv1alpha1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) return &cs diff --git a/generated/1.24/client/supervisor/clientset/versioned/fake/clientset_generated.go b/generated/1.24/client/supervisor/clientset/versioned/fake/clientset_generated.go index 3784bd68..8d2e9e47 100644 --- a/generated/1.24/client/supervisor/clientset/versioned/fake/clientset_generated.go +++ b/generated/1.24/client/supervisor/clientset/versioned/fake/clientset_generated.go @@ -7,12 +7,12 @@ package fake import ( clientset "go.pinniped.dev/generated/1.24/client/supervisor/clientset/versioned" + clientsecretv1alpha1 "go.pinniped.dev/generated/1.24/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1" + fakeclientsecretv1alpha1 "go.pinniped.dev/generated/1.24/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake" configv1alpha1 "go.pinniped.dev/generated/1.24/client/supervisor/clientset/versioned/typed/config/v1alpha1" fakeconfigv1alpha1 "go.pinniped.dev/generated/1.24/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake" idpv1alpha1 "go.pinniped.dev/generated/1.24/client/supervisor/clientset/versioned/typed/idp/v1alpha1" fakeidpv1alpha1 "go.pinniped.dev/generated/1.24/client/supervisor/clientset/versioned/typed/idp/v1alpha1/fake" - oauthv1alpha1 "go.pinniped.dev/generated/1.24/client/supervisor/clientset/versioned/typed/oauth/v1alpha1" - fakeoauthv1alpha1 "go.pinniped.dev/generated/1.24/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/discovery" @@ -70,6 +70,11 @@ var ( _ testing.FakeClient = &Clientset{} ) +// ClientsecretV1alpha1 retrieves the ClientsecretV1alpha1Client +func (c *Clientset) ClientsecretV1alpha1() clientsecretv1alpha1.ClientsecretV1alpha1Interface { + return &fakeclientsecretv1alpha1.FakeClientsecretV1alpha1{Fake: &c.Fake} +} + // ConfigV1alpha1 retrieves the ConfigV1alpha1Client func (c *Clientset) ConfigV1alpha1() configv1alpha1.ConfigV1alpha1Interface { return &fakeconfigv1alpha1.FakeConfigV1alpha1{Fake: &c.Fake} @@ -79,8 +84,3 @@ func (c *Clientset) ConfigV1alpha1() configv1alpha1.ConfigV1alpha1Interface { func (c *Clientset) IDPV1alpha1() idpv1alpha1.IDPV1alpha1Interface { return &fakeidpv1alpha1.FakeIDPV1alpha1{Fake: &c.Fake} } - -// OauthV1alpha1 retrieves the OauthV1alpha1Client -func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { - return &fakeoauthv1alpha1.FakeOauthV1alpha1{Fake: &c.Fake} -} diff --git a/generated/1.24/client/supervisor/clientset/versioned/fake/register.go b/generated/1.24/client/supervisor/clientset/versioned/fake/register.go index 3ac8970f..fcbf03b8 100644 --- a/generated/1.24/client/supervisor/clientset/versioned/fake/register.go +++ b/generated/1.24/client/supervisor/clientset/versioned/fake/register.go @@ -6,9 +6,9 @@ package fake import ( + clientsecretv1alpha1 "go.pinniped.dev/generated/1.24/apis/supervisor/clientsecret/v1alpha1" configv1alpha1 "go.pinniped.dev/generated/1.24/apis/supervisor/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.24/apis/supervisor/idp/v1alpha1" - oauthv1alpha1 "go.pinniped.dev/generated/1.24/apis/supervisor/oauth/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -20,9 +20,9 @@ var scheme = runtime.NewScheme() var codecs = serializer.NewCodecFactory(scheme) var localSchemeBuilder = runtime.SchemeBuilder{ + clientsecretv1alpha1.AddToScheme, configv1alpha1.AddToScheme, idpv1alpha1.AddToScheme, - oauthv1alpha1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/generated/1.24/client/supervisor/clientset/versioned/scheme/register.go b/generated/1.24/client/supervisor/clientset/versioned/scheme/register.go index 696c9bcc..dccce174 100644 --- a/generated/1.24/client/supervisor/clientset/versioned/scheme/register.go +++ b/generated/1.24/client/supervisor/clientset/versioned/scheme/register.go @@ -6,9 +6,9 @@ package scheme import ( + clientsecretv1alpha1 "go.pinniped.dev/generated/1.24/apis/supervisor/clientsecret/v1alpha1" configv1alpha1 "go.pinniped.dev/generated/1.24/apis/supervisor/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.24/apis/supervisor/idp/v1alpha1" - oauthv1alpha1 "go.pinniped.dev/generated/1.24/apis/supervisor/oauth/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -20,9 +20,9 @@ var Scheme = runtime.NewScheme() var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) var localSchemeBuilder = runtime.SchemeBuilder{ + clientsecretv1alpha1.AddToScheme, configv1alpha1.AddToScheme, idpv1alpha1.AddToScheme, - oauthv1alpha1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go b/generated/1.24/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/clientsecret_client.go similarity index 55% rename from generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go rename to generated/1.24/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/clientsecret_client.go index f5863aa1..a9ad436b 100644 --- a/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go +++ b/generated/1.24/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/clientsecret_client.go @@ -8,29 +8,29 @@ package v1alpha1 import ( "net/http" - v1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/virtual/oauth/v1alpha1" - "go.pinniped.dev/generated/latest/client/supervisor/virtual/clientset/versioned/scheme" + v1alpha1 "go.pinniped.dev/generated/1.24/apis/supervisor/clientsecret/v1alpha1" + "go.pinniped.dev/generated/1.24/client/supervisor/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) -type OauthV1alpha1Interface interface { +type ClientsecretV1alpha1Interface interface { RESTClient() rest.Interface OIDCClientSecretRequestsGetter } -// OauthV1alpha1Client is used to interact with features provided by the oauth.virtual.supervisor.pinniped.dev group. -type OauthV1alpha1Client struct { +// ClientsecretV1alpha1Client is used to interact with features provided by the clientsecret.supervisor.pinniped.dev group. +type ClientsecretV1alpha1Client struct { restClient rest.Interface } -func (c *OauthV1alpha1Client) OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface { +func (c *ClientsecretV1alpha1Client) OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface { return newOIDCClientSecretRequests(c, namespace) } -// NewForConfig creates a new OauthV1alpha1Client for the given config. +// NewForConfig creates a new ClientsecretV1alpha1Client for the given config. // NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), // where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*OauthV1alpha1Client, error) { +func NewForConfig(c *rest.Config) (*ClientsecretV1alpha1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err @@ -42,9 +42,9 @@ func NewForConfig(c *rest.Config) (*OauthV1alpha1Client, error) { return NewForConfigAndClient(&config, httpClient) } -// NewForConfigAndClient creates a new OauthV1alpha1Client for the given config and http client. +// NewForConfigAndClient creates a new ClientsecretV1alpha1Client for the given config and http client. // Note the http client provided takes precedence over the configured transport values. -func NewForConfigAndClient(c *rest.Config, h *http.Client) (*OauthV1alpha1Client, error) { +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ClientsecretV1alpha1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err @@ -53,12 +53,12 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*OauthV1alpha1Client if err != nil { return nil, err } - return &OauthV1alpha1Client{client}, nil + return &ClientsecretV1alpha1Client{client}, nil } -// NewForConfigOrDie creates a new OauthV1alpha1Client for the given config and +// NewForConfigOrDie creates a new ClientsecretV1alpha1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *OauthV1alpha1Client { +func NewForConfigOrDie(c *rest.Config) *ClientsecretV1alpha1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -66,9 +66,9 @@ func NewForConfigOrDie(c *rest.Config) *OauthV1alpha1Client { return client } -// New creates a new OauthV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *OauthV1alpha1Client { - return &OauthV1alpha1Client{c} +// New creates a new ClientsecretV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *ClientsecretV1alpha1Client { + return &ClientsecretV1alpha1Client{c} } func setConfigDefaults(config *rest.Config) error { @@ -86,7 +86,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 *OauthV1alpha1Client) RESTClient() rest.Interface { +func (c *ClientsecretV1alpha1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go b/generated/1.24/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/doc.go similarity index 100% rename from generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go rename to generated/1.24/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/doc.go diff --git a/generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go b/generated/1.24/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/doc.go similarity index 100% rename from generated/1.20/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go rename to generated/1.24/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/doc.go diff --git a/generated/1.24/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go b/generated/1.24/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_clientsecret_client.go similarity index 60% rename from generated/1.24/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go rename to generated/1.24/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_clientsecret_client.go index f35814e2..3095c0b5 100644 --- a/generated/1.24/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go +++ b/generated/1.24/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_clientsecret_client.go @@ -6,22 +6,22 @@ package fake import ( - v1alpha1 "go.pinniped.dev/generated/1.24/client/supervisor/clientset/versioned/typed/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.24/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1" rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" ) -type FakeOauthV1alpha1 struct { +type FakeClientsecretV1alpha1 struct { *testing.Fake } -func (c *FakeOauthV1alpha1) OIDCClients(namespace string) v1alpha1.OIDCClientInterface { - return &FakeOIDCClients{c, namespace} +func (c *FakeClientsecretV1alpha1) OIDCClientSecretRequests(namespace string) v1alpha1.OIDCClientSecretRequestInterface { + return &FakeOIDCClientSecretRequests{c, namespace} } // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeOauthV1alpha1) RESTClient() rest.Interface { +func (c *FakeClientsecretV1alpha1) RESTClient() rest.Interface { var ret *rest.RESTClient return ret } diff --git a/generated/1.24/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_oidcclientsecretrequest.go b/generated/1.24/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_oidcclientsecretrequest.go new file mode 100644 index 00000000..2c21884f --- /dev/null +++ b/generated/1.24/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_oidcclientsecretrequest.go @@ -0,0 +1,36 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "go.pinniped.dev/generated/1.24/apis/supervisor/clientsecret/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + schema "k8s.io/apimachinery/pkg/runtime/schema" + testing "k8s.io/client-go/testing" +) + +// FakeOIDCClientSecretRequests implements OIDCClientSecretRequestInterface +type FakeOIDCClientSecretRequests struct { + Fake *FakeClientsecretV1alpha1 + ns string +} + +var oidcclientsecretrequestsResource = schema.GroupVersionResource{Group: "clientsecret.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclientsecretrequests"} + +var oidcclientsecretrequestsKind = schema.GroupVersionKind{Group: "clientsecret.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClientSecretRequest"} + +// Create takes the representation of a oIDCClientSecretRequest and creates it. Returns the server's representation of the oIDCClientSecretRequest, and an error, if there is any. +func (c *FakeOIDCClientSecretRequests) Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (result *v1alpha1.OIDCClientSecretRequest, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(oidcclientsecretrequestsResource, c.ns, oIDCClientSecretRequest), &v1alpha1.OIDCClientSecretRequest{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.OIDCClientSecretRequest), err +} diff --git a/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go b/generated/1.24/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/generated_expansion.go similarity index 100% rename from generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go rename to generated/1.24/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/generated_expansion.go diff --git a/generated/1.24/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/oidcclientsecretrequest.go b/generated/1.24/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/oidcclientsecretrequest.go new file mode 100644 index 00000000..7be7135d --- /dev/null +++ b/generated/1.24/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/oidcclientsecretrequest.go @@ -0,0 +1,54 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + + v1alpha1 "go.pinniped.dev/generated/1.24/apis/supervisor/clientsecret/v1alpha1" + scheme "go.pinniped.dev/generated/1.24/client/supervisor/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + rest "k8s.io/client-go/rest" +) + +// OIDCClientSecretRequestsGetter has a method to return a OIDCClientSecretRequestInterface. +// A group's client should implement this interface. +type OIDCClientSecretRequestsGetter interface { + OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface +} + +// OIDCClientSecretRequestInterface has methods to work with OIDCClientSecretRequest resources. +type OIDCClientSecretRequestInterface interface { + Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (*v1alpha1.OIDCClientSecretRequest, error) + OIDCClientSecretRequestExpansion +} + +// oIDCClientSecretRequests implements OIDCClientSecretRequestInterface +type oIDCClientSecretRequests struct { + client rest.Interface + ns string +} + +// newOIDCClientSecretRequests returns a OIDCClientSecretRequests +func newOIDCClientSecretRequests(c *ClientsecretV1alpha1Client, namespace string) *oIDCClientSecretRequests { + return &oIDCClientSecretRequests{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Create takes the representation of a oIDCClientSecretRequest and creates it. Returns the server's representation of the oIDCClientSecretRequest, and an error, if there is any. +func (c *oIDCClientSecretRequests) Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (result *v1alpha1.OIDCClientSecretRequest, err error) { + result = &v1alpha1.OIDCClientSecretRequest{} + err = c.client.Post(). + Namespace(c.ns). + Resource("oidcclientsecretrequests"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(oIDCClientSecretRequest). + Do(ctx). + Into(result) + return +} diff --git a/generated/1.24/client/supervisor/clientset/versioned/typed/config/v1alpha1/config_client.go b/generated/1.24/client/supervisor/clientset/versioned/typed/config/v1alpha1/config_client.go index dc9ff4c2..975ae72c 100644 --- a/generated/1.24/client/supervisor/clientset/versioned/typed/config/v1alpha1/config_client.go +++ b/generated/1.24/client/supervisor/clientset/versioned/typed/config/v1alpha1/config_client.go @@ -16,6 +16,7 @@ import ( type ConfigV1alpha1Interface interface { RESTClient() rest.Interface FederationDomainsGetter + OIDCClientsGetter } // ConfigV1alpha1Client is used to interact with features provided by the config.supervisor.pinniped.dev group. @@ -27,6 +28,10 @@ func (c *ConfigV1alpha1Client) FederationDomains(namespace string) FederationDom return newFederationDomains(c, namespace) } +func (c *ConfigV1alpha1Client) OIDCClients(namespace string) OIDCClientInterface { + return newOIDCClients(c, namespace) +} + // NewForConfig creates a new ConfigV1alpha1Client for the given config. // NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), // where httpClient was generated with rest.HTTPClientFor(c). diff --git a/generated/1.24/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go b/generated/1.24/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go index 19460208..79b8be68 100644 --- a/generated/1.24/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go +++ b/generated/1.24/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go @@ -19,6 +19,10 @@ func (c *FakeConfigV1alpha1) FederationDomains(namespace string) v1alpha1.Federa return &FakeFederationDomains{c, namespace} } +func (c *FakeConfigV1alpha1) OIDCClients(namespace string) v1alpha1.OIDCClientInterface { + return &FakeOIDCClients{c, namespace} +} + // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. func (c *FakeConfigV1alpha1) RESTClient() rest.Interface { diff --git a/generated/1.24/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclient.go b/generated/1.24/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_oidcclient.go similarity index 92% rename from generated/1.24/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclient.go rename to generated/1.24/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_oidcclient.go index ec6ea5cd..550031b4 100644 --- a/generated/1.24/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclient.go +++ b/generated/1.24/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_oidcclient.go @@ -8,7 +8,7 @@ package fake import ( "context" - v1alpha1 "go.pinniped.dev/generated/1.24/apis/supervisor/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.24/apis/supervisor/config/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -19,13 +19,13 @@ import ( // FakeOIDCClients implements OIDCClientInterface type FakeOIDCClients struct { - Fake *FakeOauthV1alpha1 + Fake *FakeConfigV1alpha1 ns string } -var oidcclientsResource = schema.GroupVersionResource{Group: "oauth.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclients"} +var oidcclientsResource = schema.GroupVersionResource{Group: "config.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclients"} -var oidcclientsKind = schema.GroupVersionKind{Group: "oauth.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClient"} +var oidcclientsKind = schema.GroupVersionKind{Group: "config.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClient"} // Get takes name of the oIDCClient, and returns the corresponding oIDCClient object, and an error if there is any. func (c *FakeOIDCClients) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.OIDCClient, err error) { diff --git a/generated/1.24/client/supervisor/clientset/versioned/typed/config/v1alpha1/generated_expansion.go b/generated/1.24/client/supervisor/clientset/versioned/typed/config/v1alpha1/generated_expansion.go index ba9c9173..35b9ee3d 100644 --- a/generated/1.24/client/supervisor/clientset/versioned/typed/config/v1alpha1/generated_expansion.go +++ b/generated/1.24/client/supervisor/clientset/versioned/typed/config/v1alpha1/generated_expansion.go @@ -6,3 +6,5 @@ package v1alpha1 type FederationDomainExpansion interface{} + +type OIDCClientExpansion interface{} diff --git a/generated/1.24/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oidcclient.go b/generated/1.24/client/supervisor/clientset/versioned/typed/config/v1alpha1/oidcclient.go similarity index 97% rename from generated/1.24/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oidcclient.go rename to generated/1.24/client/supervisor/clientset/versioned/typed/config/v1alpha1/oidcclient.go index cdbc0f4a..c7656132 100644 --- a/generated/1.24/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oidcclient.go +++ b/generated/1.24/client/supervisor/clientset/versioned/typed/config/v1alpha1/oidcclient.go @@ -9,7 +9,7 @@ import ( "context" "time" - v1alpha1 "go.pinniped.dev/generated/1.24/apis/supervisor/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.24/apis/supervisor/config/v1alpha1" scheme "go.pinniped.dev/generated/1.24/client/supervisor/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -44,7 +44,7 @@ type oIDCClients struct { } // newOIDCClients returns a OIDCClients -func newOIDCClients(c *OauthV1alpha1Client, namespace string) *oIDCClients { +func newOIDCClients(c *ConfigV1alpha1Client, namespace string) *oIDCClients { return &oIDCClients{ client: c.RESTClient(), ns: namespace, diff --git a/generated/1.24/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/doc.go b/generated/1.24/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/doc.go deleted file mode 100644 index e7a470b6..00000000 --- a/generated/1.24/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1alpha1 diff --git a/generated/1.24/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go b/generated/1.24/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go deleted file mode 100644 index 7906901b..00000000 --- a/generated/1.24/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/generated/1.24/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go b/generated/1.24/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go deleted file mode 100644 index 87d22ea9..00000000 --- a/generated/1.24/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -type OIDCClientExpansion interface{} diff --git a/generated/1.24/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go b/generated/1.24/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go deleted file mode 100644 index 3f71b07e..00000000 --- a/generated/1.24/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "net/http" - - v1alpha1 "go.pinniped.dev/generated/1.24/apis/supervisor/oauth/v1alpha1" - "go.pinniped.dev/generated/1.24/client/supervisor/clientset/versioned/scheme" - rest "k8s.io/client-go/rest" -) - -type OauthV1alpha1Interface interface { - RESTClient() rest.Interface - OIDCClientsGetter -} - -// OauthV1alpha1Client is used to interact with features provided by the oauth.supervisor.pinniped.dev group. -type OauthV1alpha1Client struct { - restClient rest.Interface -} - -func (c *OauthV1alpha1Client) OIDCClients(namespace string) OIDCClientInterface { - return newOIDCClients(c, namespace) -} - -// NewForConfig creates a new OauthV1alpha1Client for the given config. -// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), -// where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*OauthV1alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - httpClient, err := rest.HTTPClientFor(&config) - if err != nil { - return nil, err - } - return NewForConfigAndClient(&config, httpClient) -} - -// NewForConfigAndClient creates a new OauthV1alpha1Client for the given config and http client. -// Note the http client provided takes precedence over the configured transport values. -func NewForConfigAndClient(c *rest.Config, h *http.Client) (*OauthV1alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientForConfigAndClient(&config, h) - if err != nil { - return nil, err - } - return &OauthV1alpha1Client{client}, nil -} - -// NewForConfigOrDie creates a new OauthV1alpha1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *OauthV1alpha1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new OauthV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *OauthV1alpha1Client { - return &OauthV1alpha1Client{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 *OauthV1alpha1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/generated/1.24/client/supervisor/informers/externalversions/config/v1alpha1/interface.go b/generated/1.24/client/supervisor/informers/externalversions/config/v1alpha1/interface.go index 37374c24..4367467b 100644 --- a/generated/1.24/client/supervisor/informers/externalversions/config/v1alpha1/interface.go +++ b/generated/1.24/client/supervisor/informers/externalversions/config/v1alpha1/interface.go @@ -13,6 +13,8 @@ import ( type Interface interface { // FederationDomains returns a FederationDomainInformer. FederationDomains() FederationDomainInformer + // OIDCClients returns a OIDCClientInformer. + OIDCClients() OIDCClientInformer } type version struct { @@ -30,3 +32,8 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList func (v *version) FederationDomains() FederationDomainInformer { return &federationDomainInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } + +// OIDCClients returns a OIDCClientInformer. +func (v *version) OIDCClients() OIDCClientInformer { + return &oIDCClientInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} diff --git a/generated/1.24/client/supervisor/informers/externalversions/oauth/v1alpha1/oidcclient.go b/generated/1.24/client/supervisor/informers/externalversions/config/v1alpha1/oidcclient.go similarity index 88% rename from generated/1.24/client/supervisor/informers/externalversions/oauth/v1alpha1/oidcclient.go rename to generated/1.24/client/supervisor/informers/externalversions/config/v1alpha1/oidcclient.go index 51bc882d..ea999067 100644 --- a/generated/1.24/client/supervisor/informers/externalversions/oauth/v1alpha1/oidcclient.go +++ b/generated/1.24/client/supervisor/informers/externalversions/config/v1alpha1/oidcclient.go @@ -9,10 +9,10 @@ import ( "context" time "time" - oauthv1alpha1 "go.pinniped.dev/generated/1.24/apis/supervisor/oauth/v1alpha1" + configv1alpha1 "go.pinniped.dev/generated/1.24/apis/supervisor/config/v1alpha1" versioned "go.pinniped.dev/generated/1.24/client/supervisor/clientset/versioned" internalinterfaces "go.pinniped.dev/generated/1.24/client/supervisor/informers/externalversions/internalinterfaces" - v1alpha1 "go.pinniped.dev/generated/1.24/client/supervisor/listers/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/1.24/client/supervisor/listers/config/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -49,16 +49,16 @@ func NewFilteredOIDCClientInformer(client versioned.Interface, namespace string, if tweakListOptions != nil { tweakListOptions(&options) } - return client.OauthV1alpha1().OIDCClients(namespace).List(context.TODO(), options) + return client.ConfigV1alpha1().OIDCClients(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.OauthV1alpha1().OIDCClients(namespace).Watch(context.TODO(), options) + return client.ConfigV1alpha1().OIDCClients(namespace).Watch(context.TODO(), options) }, }, - &oauthv1alpha1.OIDCClient{}, + &configv1alpha1.OIDCClient{}, resyncPeriod, indexers, ) @@ -69,7 +69,7 @@ func (f *oIDCClientInformer) defaultInformer(client versioned.Interface, resyncP } func (f *oIDCClientInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&oauthv1alpha1.OIDCClient{}, f.defaultInformer) + return f.factory.InformerFor(&configv1alpha1.OIDCClient{}, f.defaultInformer) } func (f *oIDCClientInformer) Lister() v1alpha1.OIDCClientLister { diff --git a/generated/1.24/client/supervisor/informers/externalversions/factory.go b/generated/1.24/client/supervisor/informers/externalversions/factory.go index 1160af22..cd409f8c 100644 --- a/generated/1.24/client/supervisor/informers/externalversions/factory.go +++ b/generated/1.24/client/supervisor/informers/externalversions/factory.go @@ -14,7 +14,6 @@ import ( config "go.pinniped.dev/generated/1.24/client/supervisor/informers/externalversions/config" idp "go.pinniped.dev/generated/1.24/client/supervisor/informers/externalversions/idp" internalinterfaces "go.pinniped.dev/generated/1.24/client/supervisor/informers/externalversions/internalinterfaces" - oauth "go.pinniped.dev/generated/1.24/client/supervisor/informers/externalversions/oauth" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -163,7 +162,6 @@ type SharedInformerFactory interface { Config() config.Interface IDP() idp.Interface - Oauth() oauth.Interface } func (f *sharedInformerFactory) Config() config.Interface { @@ -173,7 +171,3 @@ func (f *sharedInformerFactory) Config() config.Interface { func (f *sharedInformerFactory) IDP() idp.Interface { return idp.New(f, f.namespace, f.tweakListOptions) } - -func (f *sharedInformerFactory) Oauth() oauth.Interface { - return oauth.New(f, f.namespace, f.tweakListOptions) -} diff --git a/generated/1.24/client/supervisor/informers/externalversions/generic.go b/generated/1.24/client/supervisor/informers/externalversions/generic.go index cff2d5db..c8e3dd37 100644 --- a/generated/1.24/client/supervisor/informers/externalversions/generic.go +++ b/generated/1.24/client/supervisor/informers/externalversions/generic.go @@ -10,7 +10,6 @@ import ( v1alpha1 "go.pinniped.dev/generated/1.24/apis/supervisor/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/1.24/apis/supervisor/idp/v1alpha1" - oauthv1alpha1 "go.pinniped.dev/generated/1.24/apis/supervisor/oauth/v1alpha1" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" ) @@ -44,6 +43,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource // Group=config.supervisor.pinniped.dev, Version=v1alpha1 case v1alpha1.SchemeGroupVersion.WithResource("federationdomains"): return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1alpha1().FederationDomains().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("oidcclients"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1alpha1().OIDCClients().Informer()}, nil // Group=idp.supervisor.pinniped.dev, Version=v1alpha1 case idpv1alpha1.SchemeGroupVersion.WithResource("activedirectoryidentityproviders"): @@ -53,10 +54,6 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource case idpv1alpha1.SchemeGroupVersion.WithResource("oidcidentityproviders"): return &genericInformer{resource: resource.GroupResource(), informer: f.IDP().V1alpha1().OIDCIdentityProviders().Informer()}, nil - // Group=oauth.supervisor.pinniped.dev, Version=v1alpha1 - case oauthv1alpha1.SchemeGroupVersion.WithResource("oidcclients"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Oauth().V1alpha1().OIDCClients().Informer()}, nil - } return nil, fmt.Errorf("no informer found for %v", resource) diff --git a/generated/1.24/client/supervisor/informers/externalversions/oauth/interface.go b/generated/1.24/client/supervisor/informers/externalversions/oauth/interface.go deleted file mode 100644 index de6a600c..00000000 --- a/generated/1.24/client/supervisor/informers/externalversions/oauth/interface.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by informer-gen. DO NOT EDIT. - -package oauth - -import ( - internalinterfaces "go.pinniped.dev/generated/1.24/client/supervisor/informers/externalversions/internalinterfaces" - v1alpha1 "go.pinniped.dev/generated/1.24/client/supervisor/informers/externalversions/oauth/v1alpha1" -) - -// Interface provides access to each of this group's versions. -type Interface interface { - // V1alpha1 provides access to shared informers for resources in V1alpha1. - V1alpha1() v1alpha1.Interface -} - -type group struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// V1alpha1 returns a new v1alpha1.Interface. -func (g *group) V1alpha1() v1alpha1.Interface { - return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) -} diff --git a/generated/1.24/client/supervisor/informers/externalversions/oauth/v1alpha1/interface.go b/generated/1.24/client/supervisor/informers/externalversions/oauth/v1alpha1/interface.go deleted file mode 100644 index 7abf7d4f..00000000 --- a/generated/1.24/client/supervisor/informers/externalversions/oauth/v1alpha1/interface.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - internalinterfaces "go.pinniped.dev/generated/1.24/client/supervisor/informers/externalversions/internalinterfaces" -) - -// Interface provides access to all the informers in this group version. -type Interface interface { - // OIDCClients returns a OIDCClientInformer. - OIDCClients() OIDCClientInformer -} - -type version struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// OIDCClients returns a OIDCClientInformer. -func (v *version) OIDCClients() OIDCClientInformer { - return &oIDCClientInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} diff --git a/generated/1.24/client/supervisor/listers/config/v1alpha1/expansion_generated.go b/generated/1.24/client/supervisor/listers/config/v1alpha1/expansion_generated.go index d59892c4..bda2f20e 100644 --- a/generated/1.24/client/supervisor/listers/config/v1alpha1/expansion_generated.go +++ b/generated/1.24/client/supervisor/listers/config/v1alpha1/expansion_generated.go @@ -12,3 +12,11 @@ type FederationDomainListerExpansion interface{} // FederationDomainNamespaceListerExpansion allows custom methods to be added to // FederationDomainNamespaceLister. type FederationDomainNamespaceListerExpansion interface{} + +// OIDCClientListerExpansion allows custom methods to be added to +// OIDCClientLister. +type OIDCClientListerExpansion interface{} + +// OIDCClientNamespaceListerExpansion allows custom methods to be added to +// OIDCClientNamespaceLister. +type OIDCClientNamespaceListerExpansion interface{} diff --git a/generated/1.24/client/supervisor/listers/config/v1alpha1/oidcclient.go b/generated/1.24/client/supervisor/listers/config/v1alpha1/oidcclient.go new file mode 100644 index 00000000..d69dd1fc --- /dev/null +++ b/generated/1.24/client/supervisor/listers/config/v1alpha1/oidcclient.go @@ -0,0 +1,86 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "go.pinniped.dev/generated/1.24/apis/supervisor/config/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// OIDCClientLister helps list OIDCClients. +// All objects returned here must be treated as read-only. +type OIDCClientLister interface { + // List lists all OIDCClients in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.OIDCClient, err error) + // OIDCClients returns an object that can list and get OIDCClients. + OIDCClients(namespace string) OIDCClientNamespaceLister + OIDCClientListerExpansion +} + +// oIDCClientLister implements the OIDCClientLister interface. +type oIDCClientLister struct { + indexer cache.Indexer +} + +// NewOIDCClientLister returns a new OIDCClientLister. +func NewOIDCClientLister(indexer cache.Indexer) OIDCClientLister { + return &oIDCClientLister{indexer: indexer} +} + +// List lists all OIDCClients in the indexer. +func (s *oIDCClientLister) List(selector labels.Selector) (ret []*v1alpha1.OIDCClient, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.OIDCClient)) + }) + return ret, err +} + +// OIDCClients returns an object that can list and get OIDCClients. +func (s *oIDCClientLister) OIDCClients(namespace string) OIDCClientNamespaceLister { + return oIDCClientNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// OIDCClientNamespaceLister helps list and get OIDCClients. +// All objects returned here must be treated as read-only. +type OIDCClientNamespaceLister interface { + // List lists all OIDCClients in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.OIDCClient, err error) + // Get retrieves the OIDCClient from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1alpha1.OIDCClient, error) + OIDCClientNamespaceListerExpansion +} + +// oIDCClientNamespaceLister implements the OIDCClientNamespaceLister +// interface. +type oIDCClientNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all OIDCClients in the indexer for a given namespace. +func (s oIDCClientNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.OIDCClient, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.OIDCClient)) + }) + return ret, err +} + +// Get retrieves the OIDCClient from the indexer for a given namespace and name. +func (s oIDCClientNamespaceLister) Get(name string) (*v1alpha1.OIDCClient, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("oidcclient"), name) + } + return obj.(*v1alpha1.OIDCClient), nil +} diff --git a/generated/1.24/client/supervisor/listers/oauth/v1alpha1/expansion_generated.go b/generated/1.24/client/supervisor/listers/oauth/v1alpha1/expansion_generated.go deleted file mode 100644 index c19310da..00000000 --- a/generated/1.24/client/supervisor/listers/oauth/v1alpha1/expansion_generated.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha1 - -// OIDCClientListerExpansion allows custom methods to be added to -// OIDCClientLister. -type OIDCClientListerExpansion interface{} - -// OIDCClientNamespaceListerExpansion allows custom methods to be added to -// OIDCClientNamespaceLister. -type OIDCClientNamespaceListerExpansion interface{} diff --git a/generated/1.24/client/supervisor/listers/oauth/v1alpha1/oidcclient.go b/generated/1.24/client/supervisor/listers/oauth/v1alpha1/oidcclient.go deleted file mode 100644 index a969aa96..00000000 --- a/generated/1.24/client/supervisor/listers/oauth/v1alpha1/oidcclient.go +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1alpha1 "go.pinniped.dev/generated/1.24/apis/supervisor/oauth/v1alpha1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// OIDCClientLister helps list OIDCClients. -// All objects returned here must be treated as read-only. -type OIDCClientLister interface { - // List lists all OIDCClients in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.OIDCClient, err error) - // OIDCClients returns an object that can list and get OIDCClients. - OIDCClients(namespace string) OIDCClientNamespaceLister - OIDCClientListerExpansion -} - -// oIDCClientLister implements the OIDCClientLister interface. -type oIDCClientLister struct { - indexer cache.Indexer -} - -// NewOIDCClientLister returns a new OIDCClientLister. -func NewOIDCClientLister(indexer cache.Indexer) OIDCClientLister { - return &oIDCClientLister{indexer: indexer} -} - -// List lists all OIDCClients in the indexer. -func (s *oIDCClientLister) List(selector labels.Selector) (ret []*v1alpha1.OIDCClient, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.OIDCClient)) - }) - return ret, err -} - -// OIDCClients returns an object that can list and get OIDCClients. -func (s *oIDCClientLister) OIDCClients(namespace string) OIDCClientNamespaceLister { - return oIDCClientNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// OIDCClientNamespaceLister helps list and get OIDCClients. -// All objects returned here must be treated as read-only. -type OIDCClientNamespaceLister interface { - // List lists all OIDCClients in the indexer for a given namespace. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.OIDCClient, err error) - // Get retrieves the OIDCClient from the indexer for a given namespace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha1.OIDCClient, error) - OIDCClientNamespaceListerExpansion -} - -// oIDCClientNamespaceLister implements the OIDCClientNamespaceLister -// interface. -type oIDCClientNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all OIDCClients in the indexer for a given namespace. -func (s oIDCClientNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.OIDCClient, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.OIDCClient)) - }) - return ret, err -} - -// Get retrieves the OIDCClient from the indexer for a given namespace and name. -func (s oIDCClientNamespaceLister) Get(name string) (*v1alpha1.OIDCClient, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1alpha1.Resource("oidcclient"), name) - } - return obj.(*v1alpha1.OIDCClient), nil -} diff --git a/generated/1.24/client/supervisor/virtual/clientset/versioned/clientset.go b/generated/1.24/client/supervisor/virtual/clientset/versioned/clientset.go deleted file mode 100644 index bc5111f5..00000000 --- a/generated/1.24/client/supervisor/virtual/clientset/versioned/clientset.go +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package versioned - -import ( - "fmt" - "net/http" - - oauthv1alpha1 "go.pinniped.dev/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" - discovery "k8s.io/client-go/discovery" - rest "k8s.io/client-go/rest" - flowcontrol "k8s.io/client-go/util/flowcontrol" -) - -type Interface interface { - Discovery() discovery.DiscoveryInterface - OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface -} - -// Clientset contains the clients for groups. Each group has exactly one -// version included in a Clientset. -type Clientset struct { - *discovery.DiscoveryClient - oauthV1alpha1 *oauthv1alpha1.OauthV1alpha1Client -} - -// OauthV1alpha1 retrieves the OauthV1alpha1Client -func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { - return c.oauthV1alpha1 -} - -// Discovery retrieves the DiscoveryClient -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - if c == nil { - return nil - } - return c.DiscoveryClient -} - -// NewForConfig creates a new Clientset for the given config. -// If config's RateLimiter is not set and QPS and Burst are acceptable, -// NewForConfig will generate a rate-limiter in configShallowCopy. -// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), -// where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*Clientset, error) { - configShallowCopy := *c - - if configShallowCopy.UserAgent == "" { - configShallowCopy.UserAgent = rest.DefaultKubernetesUserAgent() - } - - // share the transport between all clients - httpClient, err := rest.HTTPClientFor(&configShallowCopy) - if err != nil { - return nil, err - } - - return NewForConfigAndClient(&configShallowCopy, httpClient) -} - -// NewForConfigAndClient creates a new Clientset for the given config and http client. -// Note the http client provided takes precedence over the configured transport values. -// If config's RateLimiter is not set and QPS and Burst are acceptable, -// NewForConfigAndClient will generate a rate-limiter in configShallowCopy. -func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, error) { - configShallowCopy := *c - if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { - if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") - } - configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) - } - - var cs Clientset - var err error - cs.oauthV1alpha1, err = oauthv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) - if err != nil { - return nil, err - } - - cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfigAndClient(&configShallowCopy, httpClient) - if err != nil { - return nil, err - } - return &cs, nil -} - -// NewForConfigOrDie creates a new Clientset for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *Clientset { - cs, err := NewForConfig(c) - if err != nil { - panic(err) - } - return cs -} - -// New creates a new Clientset for the given RESTClient. -func New(c rest.Interface) *Clientset { - var cs Clientset - cs.oauthV1alpha1 = oauthv1alpha1.New(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClient(c) - return &cs -} diff --git a/generated/1.24/client/supervisor/virtual/clientset/versioned/doc.go b/generated/1.24/client/supervisor/virtual/clientset/versioned/doc.go deleted file mode 100644 index 5dc02e6e..00000000 --- a/generated/1.24/client/supervisor/virtual/clientset/versioned/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated clientset. -package versioned diff --git a/generated/1.24/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go b/generated/1.24/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go deleted file mode 100644 index ad40c879..00000000 --- a/generated/1.24/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - clientset "go.pinniped.dev/generated/1.24/client/supervisor/virtual/clientset/versioned" - oauthv1alpha1 "go.pinniped.dev/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" - fakeoauthv1alpha1 "go.pinniped.dev/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/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" -) - -// NewSimpleClientset returns a clientset that will respond with the provided objects. -// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, -// without applying any validations and/or defaults. It shouldn't be considered a replacement -// for a real clientset and is mostly useful in simple unit tests. -func NewSimpleClientset(objects ...runtime.Object) *Clientset { - o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) - for _, obj := range objects { - if err := o.Add(obj); err != nil { - panic(err) - } - } - - cs := &Clientset{tracker: o} - cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} - cs.AddReactor("*", "*", testing.ObjectReaction(o)) - cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { - gvr := action.GetResource() - ns := action.GetNamespace() - watch, err := o.Watch(gvr, ns) - if err != nil { - return false, nil, err - } - return true, watch, nil - }) - - return cs -} - -// Clientset implements clientset.Interface. Meant to be embedded into a -// struct to get a default implementation. This makes faking out just the method -// you want to test easier. -type Clientset struct { - testing.Fake - discovery *fakediscovery.FakeDiscovery - tracker testing.ObjectTracker -} - -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - return c.discovery -} - -func (c *Clientset) Tracker() testing.ObjectTracker { - return c.tracker -} - -var ( - _ clientset.Interface = &Clientset{} - _ testing.FakeClient = &Clientset{} -) - -// OauthV1alpha1 retrieves the OauthV1alpha1Client -func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { - return &fakeoauthv1alpha1.FakeOauthV1alpha1{Fake: &c.Fake} -} diff --git a/generated/1.24/client/supervisor/virtual/clientset/versioned/fake/doc.go b/generated/1.24/client/supervisor/virtual/clientset/versioned/fake/doc.go deleted file mode 100644 index 7c9538fd..00000000 --- a/generated/1.24/client/supervisor/virtual/clientset/versioned/fake/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated fake clientset. -package fake diff --git a/generated/1.24/client/supervisor/virtual/clientset/versioned/fake/register.go b/generated/1.24/client/supervisor/virtual/clientset/versioned/fake/register.go deleted file mode 100644 index fcc85a4d..00000000 --- a/generated/1.24/client/supervisor/virtual/clientset/versioned/fake/register.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - oauthv1alpha1 "go.pinniped.dev/generated/1.24/apis/supervisor/virtual/oauth/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" -) - -var scheme = runtime.NewScheme() -var codecs = serializer.NewCodecFactory(scheme) - -var localSchemeBuilder = runtime.SchemeBuilder{ - oauthv1alpha1.AddToScheme, -} - -// AddToScheme adds all types of this clientset into the given scheme. This allows composition -// of clientsets, like in: -// -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) -// -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) -// -// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types -// correctly. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(scheme)) -} diff --git a/generated/1.24/client/supervisor/virtual/clientset/versioned/scheme/doc.go b/generated/1.24/client/supervisor/virtual/clientset/versioned/scheme/doc.go deleted file mode 100644 index cc02f1d3..00000000 --- a/generated/1.24/client/supervisor/virtual/clientset/versioned/scheme/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// This package contains the scheme of the automatically generated clientset. -package scheme diff --git a/generated/1.24/client/supervisor/virtual/clientset/versioned/scheme/register.go b/generated/1.24/client/supervisor/virtual/clientset/versioned/scheme/register.go deleted file mode 100644 index 4c7d2651..00000000 --- a/generated/1.24/client/supervisor/virtual/clientset/versioned/scheme/register.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package scheme - -import ( - oauthv1alpha1 "go.pinniped.dev/generated/1.24/apis/supervisor/virtual/oauth/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" -) - -var Scheme = runtime.NewScheme() -var Codecs = serializer.NewCodecFactory(Scheme) -var ParameterCodec = runtime.NewParameterCodec(Scheme) -var localSchemeBuilder = runtime.SchemeBuilder{ - oauthv1alpha1.AddToScheme, -} - -// AddToScheme adds all types of this clientset into the given scheme. This allows composition -// of clientsets, like in: -// -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) -// -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) -// -// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types -// correctly. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(Scheme)) -} diff --git a/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go b/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go deleted file mode 100644 index e7a470b6..00000000 --- a/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1alpha1 diff --git a/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go b/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go deleted file mode 100644 index 7906901b..00000000 --- a/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go b/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go deleted file mode 100644 index 487cc65b..00000000 --- a/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1alpha1 "go.pinniped.dev/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" -) - -type FakeOauthV1alpha1 struct { - *testing.Fake -} - -func (c *FakeOauthV1alpha1) OIDCClientSecretRequests(namespace string) v1alpha1.OIDCClientSecretRequestInterface { - return &FakeOIDCClientSecretRequests{c, namespace} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeOauthV1alpha1) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go b/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go deleted file mode 100644 index fc821273..00000000 --- a/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v1alpha1 "go.pinniped.dev/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - schema "k8s.io/apimachinery/pkg/runtime/schema" - testing "k8s.io/client-go/testing" -) - -// FakeOIDCClientSecretRequests implements OIDCClientSecretRequestInterface -type FakeOIDCClientSecretRequests struct { - Fake *FakeOauthV1alpha1 - ns string -} - -var oidcclientsecretrequestsResource = schema.GroupVersionResource{Group: "oauth.virtual.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclientsecretrequests"} - -var oidcclientsecretrequestsKind = schema.GroupVersionKind{Group: "oauth.virtual.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClientSecretRequest"} - -// Create takes the representation of a oIDCClientSecretRequest and creates it. Returns the server's representation of the oIDCClientSecretRequest, and an error, if there is any. -func (c *FakeOIDCClientSecretRequests) Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (result *v1alpha1.OIDCClientSecretRequest, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(oidcclientsecretrequestsResource, c.ns, oIDCClientSecretRequest), &v1alpha1.OIDCClientSecretRequest{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.OIDCClientSecretRequest), err -} diff --git a/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go b/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go deleted file mode 100644 index ed4b8949..00000000 --- a/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - - v1alpha1 "go.pinniped.dev/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1" - scheme "go.pinniped.dev/generated/1.24/client/supervisor/virtual/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - rest "k8s.io/client-go/rest" -) - -// OIDCClientSecretRequestsGetter has a method to return a OIDCClientSecretRequestInterface. -// A group's client should implement this interface. -type OIDCClientSecretRequestsGetter interface { - OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface -} - -// OIDCClientSecretRequestInterface has methods to work with OIDCClientSecretRequest resources. -type OIDCClientSecretRequestInterface interface { - Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (*v1alpha1.OIDCClientSecretRequest, error) - OIDCClientSecretRequestExpansion -} - -// oIDCClientSecretRequests implements OIDCClientSecretRequestInterface -type oIDCClientSecretRequests struct { - client rest.Interface - ns string -} - -// newOIDCClientSecretRequests returns a OIDCClientSecretRequests -func newOIDCClientSecretRequests(c *OauthV1alpha1Client, namespace string) *oIDCClientSecretRequests { - return &oIDCClientSecretRequests{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Create takes the representation of a oIDCClientSecretRequest and creates it. Returns the server's representation of the oIDCClientSecretRequest, and an error, if there is any. -func (c *oIDCClientSecretRequests) Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (result *v1alpha1.OIDCClientSecretRequest, err error) { - result = &v1alpha1.OIDCClientSecretRequest{} - err = c.client.Post(). - Namespace(c.ns). - Resource("oidcclientsecretrequests"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(oIDCClientSecretRequest). - Do(ctx). - Into(result) - return -} diff --git a/generated/1.24/crds/config.supervisor.pinniped.dev_oidcclients.yaml b/generated/1.24/crds/config.supervisor.pinniped.dev_oidcclients.yaml new file mode 100644 index 00000000..4efa445e --- /dev/null +++ b/generated/1.24/crds/config.supervisor.pinniped.dev_oidcclients.yaml @@ -0,0 +1,125 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.8.0 + creationTimestamp: null + name: oidcclients.config.supervisor.pinniped.dev +spec: + group: config.supervisor.pinniped.dev + names: + categories: + - pinniped + kind: OIDCClient + listKind: OIDCClientList + plural: oidcclients + singular: oidcclient + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: OIDCClient describes the configuration of an OIDC client. + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: Spec of the OIDC client. + properties: + allowedGrantTypes: + description: "allowedGrantTypes is a list of the allowed grant_type + param values that should be accepted during OIDC flows with this + client. \n Must only contain the following values: - authorization_code: + allows the client to perform the authorization code grant flow, + i.e. allows the webapp to authenticate users. This grant must always + be listed. - refresh_token: allows the client to perform refresh + grants for the user to extend the user's session. This grant must + be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: + allows the client to perform RFC8693 token exchange, which is a + step in the process to be able to get a cluster credential for the + user. This grant must be listed if allowedScopes lists pinniped:request-audience." + items: + enum: + - authorization_code + - refresh_token + - urn:ietf:params:oauth:grant-type:token-exchange + type: string + minItems: 1 + type: array + allowedRedirectURIs: + description: allowedRedirectURIs is a list of the allowed redirect_uri + param values that should be accepted during OIDC flows with this + client. Any other uris will be rejected. Must be https, unless it + is a loopback. + items: + type: string + minItems: 1 + type: array + allowedScopes: + description: "allowedScopes is a list of the allowed scopes param + values that should be accepted during OIDC flows with this client. + \n Must only contain the following values: - openid: The client + is allowed to request ID tokens. ID tokens only include the required + claims by default (iss, sub, aud, exp, iat). This scope must always + be listed. - offline_access: The client is allowed to request an + initial refresh token during the authorization code grant flow. + This scope must be listed if allowedGrantTypes lists refresh_token. + - pinniped:request-audience: The client is allowed to request a + new audience value during a RFC8693 token exchange, which is a step + in the process to be able to get a cluster credential for the user. + openid, username and groups scopes must be listed when this scope + is present. This scope must be listed if allowedGrantTypes lists + urn:ietf:params:oauth:grant-type:token-exchange. - username: The + client is allowed to request that ID tokens contain the user's username. + Without the username scope being requested and allowed, the ID token + will not contain the user's username. - groups: The client is allowed + to request that ID tokens contain the user's group membership, if + their group membership is discoverable by the Supervisor. Without + the groups scope being requested and allowed, the ID token will + not contain groups." + items: + enum: + - openid + - offline_access + - username + - groups + - pinniped:request-audience + type: string + minItems: 1 + type: array + required: + - allowedGrantTypes + - allowedRedirectURIs + - allowedScopes + type: object + status: + description: Status of the OIDC client. + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/generated/1.24/crds/oauth.supervisor.pinniped.dev_oidcclients.yaml b/generated/1.24/crds/oauth.supervisor.pinniped.dev_oidcclients.yaml deleted file mode 100644 index 589a9154..00000000 --- a/generated/1.24/crds/oauth.supervisor.pinniped.dev_oidcclients.yaml +++ /dev/null @@ -1,125 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null - name: oidcclients.oauth.supervisor.pinniped.dev -spec: - group: oauth.supervisor.pinniped.dev - names: - categories: - - pinniped - kind: OIDCClient - listKind: OIDCClientList - plural: oidcclients - singular: oidcclient - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1alpha1 - schema: - openAPIV3Schema: - description: OIDCClient describes the configuration of an OIDC client. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: Spec of the OIDC client. - properties: - allowedGrantTypes: - description: "allowedGrantTypes is a list of the allowed grant_type - param values that should be accepted during OIDC flows with this - client. \n Must only contain the following values: - authorization_code: - allows the client to perform the authorization code grant flow, - i.e. allows the webapp to authenticate users. This grant must always - be listed. - refresh_token: allows the client to perform refresh - grants for the user to extend the user's session. This grant must - be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: - allows the client to perform RFC8693 token exchange, which is a - step in the process to be able to get a cluster credential for the - user. This grant must be listed if allowedScopes lists pinniped:request-audience." - items: - enum: - - authorization_code - - refresh_token - - urn:ietf:params:oauth:grant-type:token-exchange - type: string - minItems: 1 - type: array - allowedRedirectURIs: - description: allowedRedirectURIs is a list of the allowed redirect_uri - param values that should be accepted during OIDC flows with this - client. Any other uris will be rejected. Must be https, unless it - is a loopback. - items: - type: string - minItems: 1 - type: array - allowedScopes: - description: "allowedScopes is a list of the allowed scopes param - values that should be accepted during OIDC flows with this client. - \n Must only contain the following values: - openid: The client - is allowed to request ID tokens. ID tokens only include the required - claims by default (iss, sub, aud, exp, iat). This scope must always - be listed. - offline_access: The client is allowed to request an - initial refresh token during the authorization code grant flow. - This scope must be listed if allowedGrantTypes lists refresh_token. - - pinniped:request-audience: The client is allowed to request a - new audience value during a RFC8693 token exchange, which is a step - in the process to be able to get a cluster credential for the user. - openid, username and groups scopes must be listed when this scope - is present. This scope must be listed if allowedGrantTypes lists - urn:ietf:params:oauth:grant-type:token-exchange. - username: The - client is allowed to request that ID tokens contain the user's username. - Without the username scope being requested and allowed, the ID token - will not contain the user's username. - groups: The client is allowed - to request that ID tokens contain the user's group membership, if - their group membership is discoverable by the Supervisor. Without - the groups scope being requested and allowed, the ID token will - not contain groups." - items: - enum: - - openid - - offline_access - - username - - groups - - pinniped:request-audience - type: string - minItems: 1 - type: array - required: - - allowedGrantTypes - - allowedRedirectURIs - - allowedScopes - type: object - status: - description: Status of the OIDC client. - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/generated/latest/apis/supervisor/clientsecret/doc.go b/generated/latest/apis/supervisor/clientsecret/doc.go new file mode 100644 index 00000000..c536bc75 --- /dev/null +++ b/generated/latest/apis/supervisor/clientsecret/doc.go @@ -0,0 +1,8 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// +k8s:deepcopy-gen=package +// +groupName=clientsecret.supervisor.pinniped.dev + +// Package clientsecret is the internal version of the Pinniped client secret API. +package clientsecret diff --git a/generated/latest/apis/supervisor/clientsecret/register.go b/generated/latest/apis/supervisor/clientsecret/register.go new file mode 100644 index 00000000..4a1c0173 --- /dev/null +++ b/generated/latest/apis/supervisor/clientsecret/register.go @@ -0,0 +1,37 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package clientsecret + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +const GroupName = "clientsecret.supervisor.pinniped.dev" + +// SchemeGroupVersion is group version used to register these objects. +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} + +// Kind takes an unqualified kind and returns back a Group qualified GroupKind. +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Resource takes an unqualified resource and returns back a Group qualified GroupResource. +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + AddToScheme = SchemeBuilder.AddToScheme +) + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &OIDCClientSecretRequest{}, + ) + return nil +} diff --git a/generated/latest/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go b/generated/latest/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go new file mode 100644 index 00000000..7fd1eb65 --- /dev/null +++ b/generated/latest/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go @@ -0,0 +1,25 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package clientsecret + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +type OIDCClientSecretRequestSpec struct { + GenerateNewSecret bool `json:"generateNewSecret"` + RevokeOldSecrets bool `json:"revokeOldSecrets"` +} + +type OIDCClientSecretRequestStatus struct { + GeneratedSecret string `json:"generatedSecret,omitempty"` + TotalClientSecrets int `json:"totalClientSecrets"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequest struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` // metadata.name must be set to the client ID + + Spec OIDCClientSecretRequestSpec `json:"spec"` + Status OIDCClientSecretRequestStatus `json:"status"` +} diff --git a/generated/latest/apis/supervisor/virtual/oauth/v1alpha1/conversion.go b/generated/latest/apis/supervisor/clientsecret/v1alpha1/conversion.go similarity index 100% rename from generated/latest/apis/supervisor/virtual/oauth/v1alpha1/conversion.go rename to generated/latest/apis/supervisor/clientsecret/v1alpha1/conversion.go diff --git a/generated/latest/apis/supervisor/virtual/oauth/v1alpha1/defaults.go b/generated/latest/apis/supervisor/clientsecret/v1alpha1/defaults.go similarity index 100% rename from generated/latest/apis/supervisor/virtual/oauth/v1alpha1/defaults.go rename to generated/latest/apis/supervisor/clientsecret/v1alpha1/defaults.go diff --git a/generated/latest/apis/supervisor/virtual/oauth/v1alpha1/doc.go b/generated/latest/apis/supervisor/clientsecret/v1alpha1/doc.go similarity index 64% rename from generated/latest/apis/supervisor/virtual/oauth/v1alpha1/doc.go rename to generated/latest/apis/supervisor/clientsecret/v1alpha1/doc.go index 8aaf4d21..ce576323 100644 --- a/generated/latest/apis/supervisor/virtual/oauth/v1alpha1/doc.go +++ b/generated/latest/apis/supervisor/clientsecret/v1alpha1/doc.go @@ -3,9 +3,9 @@ // +k8s:openapi-gen=true // +k8s:deepcopy-gen=package -// +k8s:conversion-gen=go.pinniped.dev/generated/latest/apis/supervisor/virtual/oauth +// +k8s:conversion-gen=go.pinniped.dev/generated/latest/apis/supervisor/clientsecret // +k8s:defaulter-gen=TypeMeta -// +groupName=oauth.virtual.supervisor.pinniped.dev +// +groupName=clientsecret.supervisor.pinniped.dev -// Package v1alpha1 is the v1alpha1 version of the Pinniped virtual oauth API. +// Package v1alpha1 is the v1alpha1 version of the Pinniped client secret API. package v1alpha1 diff --git a/generated/latest/apis/supervisor/clientsecret/v1alpha1/register.go b/generated/latest/apis/supervisor/clientsecret/v1alpha1/register.go new file mode 100644 index 00000000..49602125 --- /dev/null +++ b/generated/latest/apis/supervisor/clientsecret/v1alpha1/register.go @@ -0,0 +1,42 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +const GroupName = "clientsecret.supervisor.pinniped.dev" + +// SchemeGroupVersion is group version used to register these objects. +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} + +var ( + SchemeBuilder runtime.SchemeBuilder + localSchemeBuilder = &SchemeBuilder + AddToScheme = SchemeBuilder.AddToScheme +) + +func init() { + // We only register manually written functions here. The registration of the + // generated functions takes place in the generated files. The separation + // makes the code compile even when the generated files are missing. + localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs) +} + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &OIDCClientSecretRequest{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} + +// Resource takes an unqualified resource and returns back a Group qualified GroupResource. +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} diff --git a/generated/latest/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go b/generated/latest/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go similarity index 100% rename from generated/latest/apis/supervisor/virtual/oauth/v1alpha1/types_oidcclientsecretrequest.go rename to generated/latest/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go diff --git a/generated/latest/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go b/generated/latest/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go new file mode 100644 index 00000000..b2a4d732 --- /dev/null +++ b/generated/latest/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go @@ -0,0 +1,131 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + clientsecret "go.pinniped.dev/generated/latest/apis/supervisor/clientsecret" + 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((*OIDCClientSecretRequest)(nil), (*clientsecret.OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest(a.(*OIDCClientSecretRequest), b.(*clientsecret.OIDCClientSecretRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientsecret.OIDCClientSecretRequest)(nil), (*OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(a.(*clientsecret.OIDCClientSecretRequest), b.(*OIDCClientSecretRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestSpec)(nil), (*clientsecret.OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(a.(*OIDCClientSecretRequestSpec), b.(*clientsecret.OIDCClientSecretRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientsecret.OIDCClientSecretRequestSpec)(nil), (*OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(a.(*clientsecret.OIDCClientSecretRequestSpec), b.(*OIDCClientSecretRequestSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestStatus)(nil), (*clientsecret.OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(a.(*OIDCClientSecretRequestStatus), b.(*clientsecret.OIDCClientSecretRequestStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientsecret.OIDCClientSecretRequestStatus)(nil), (*OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(a.(*clientsecret.OIDCClientSecretRequestStatus), b.(*OIDCClientSecretRequestStatus), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *clientsecret.OIDCClientSecretRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *clientsecret.OIDCClientSecretRequest, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequest_To_clientsecret_OIDCClientSecretRequest(in, out, s) +} + +func autoConvert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *clientsecret.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest is an autogenerated conversion function. +func Convert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *clientsecret.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { + return autoConvert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in, out, s) +} + +func autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *clientsecret.OIDCClientSecretRequestSpec, s conversion.Scope) error { + out.GenerateNewSecret = in.GenerateNewSecret + out.RevokeOldSecrets = in.RevokeOldSecrets + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *clientsecret.OIDCClientSecretRequestSpec, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(in, out, s) +} + +func autoConvert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *clientsecret.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { + out.GenerateNewSecret = in.GenerateNewSecret + out.RevokeOldSecrets = in.RevokeOldSecrets + return nil +} + +// Convert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec is an autogenerated conversion function. +func Convert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *clientsecret.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { + return autoConvert_clientsecret_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in, out, s) +} + +func autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *clientsecret.OIDCClientSecretRequestStatus, s conversion.Scope) error { + out.GeneratedSecret = in.GeneratedSecret + out.TotalClientSecrets = in.TotalClientSecrets + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *clientsecret.OIDCClientSecretRequestStatus, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_clientsecret_OIDCClientSecretRequestStatus(in, out, s) +} + +func autoConvert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *clientsecret.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { + out.GeneratedSecret = in.GeneratedSecret + out.TotalClientSecrets = in.TotalClientSecrets + return nil +} + +// Convert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus is an autogenerated conversion function. +func Convert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *clientsecret.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { + return autoConvert_clientsecret_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in, out, s) +} diff --git a/generated/latest/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go b/generated/latest/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go similarity index 100% rename from generated/latest/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.deepcopy.go rename to generated/latest/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go diff --git a/generated/latest/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go b/generated/latest/apis/supervisor/clientsecret/v1alpha1/zz_generated.defaults.go similarity index 100% rename from generated/latest/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.defaults.go rename to generated/latest/apis/supervisor/clientsecret/v1alpha1/zz_generated.defaults.go diff --git a/generated/latest/apis/supervisor/clientsecret/zz_generated.deepcopy.go b/generated/latest/apis/supervisor/clientsecret/zz_generated.deepcopy.go new file mode 100644 index 00000000..e0dc7d68 --- /dev/null +++ b/generated/latest/apis/supervisor/clientsecret/zz_generated.deepcopy.go @@ -0,0 +1,73 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package clientsecret + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequest) DeepCopyInto(out *OIDCClientSecretRequest) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequest. +func (in *OIDCClientSecretRequest) DeepCopy() *OIDCClientSecretRequest { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequest) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestSpec. +func (in *OIDCClientSecretRequestSpec) DeepCopy() *OIDCClientSecretRequestSpec { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestStatus) DeepCopyInto(out *OIDCClientSecretRequestStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestStatus. +func (in *OIDCClientSecretRequestStatus) DeepCopy() *OIDCClientSecretRequestStatus { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestStatus) + in.DeepCopyInto(out) + return out +} diff --git a/generated/latest/apis/supervisor/config/v1alpha1/register.go b/generated/latest/apis/supervisor/config/v1alpha1/register.go index 69045298..54c51699 100644 --- a/generated/latest/apis/supervisor/config/v1alpha1/register.go +++ b/generated/latest/apis/supervisor/config/v1alpha1/register.go @@ -32,6 +32,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &FederationDomain{}, &FederationDomainList{}, + &OIDCClient{}, + &OIDCClientList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/generated/latest/apis/supervisor/oauth/v1alpha1/types_oidcclient.go b/generated/latest/apis/supervisor/config/v1alpha1/types_oidcclient.go similarity index 100% rename from generated/latest/apis/supervisor/oauth/v1alpha1/types_oidcclient.go rename to generated/latest/apis/supervisor/config/v1alpha1/types_oidcclient.go diff --git a/generated/latest/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go b/generated/latest/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go index 856b8988..a55d88e7 100644 --- a/generated/latest/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go +++ b/generated/latest/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go @@ -150,3 +150,111 @@ func (in *FederationDomainTLSSpec) DeepCopy() *FederationDomainTLSSpec { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClient) DeepCopyInto(out *OIDCClient) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClient. +func (in *OIDCClient) DeepCopy() *OIDCClient { + if in == nil { + return nil + } + out := new(OIDCClient) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClient) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientList) DeepCopyInto(out *OIDCClientList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OIDCClient, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientList. +func (in *OIDCClientList) DeepCopy() *OIDCClientList { + if in == nil { + return nil + } + out := new(OIDCClientList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSpec) DeepCopyInto(out *OIDCClientSpec) { + *out = *in + if in.AllowedRedirectURIs != nil { + in, out := &in.AllowedRedirectURIs, &out.AllowedRedirectURIs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.AllowedGrantTypes != nil { + in, out := &in.AllowedGrantTypes, &out.AllowedGrantTypes + *out = make([]GrantType, len(*in)) + copy(*out, *in) + } + if in.AllowedScopes != nil { + in, out := &in.AllowedScopes, &out.AllowedScopes + *out = make([]Scope, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSpec. +func (in *OIDCClientSpec) DeepCopy() *OIDCClientSpec { + if in == nil { + return nil + } + out := new(OIDCClientSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientStatus) DeepCopyInto(out *OIDCClientStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientStatus. +func (in *OIDCClientStatus) DeepCopy() *OIDCClientStatus { + if in == nil { + return nil + } + out := new(OIDCClientStatus) + in.DeepCopyInto(out) + return out +} diff --git a/generated/latest/apis/supervisor/oauth/v1alpha1/doc.go b/generated/latest/apis/supervisor/oauth/v1alpha1/doc.go deleted file mode 100644 index 75580481..00000000 --- a/generated/latest/apis/supervisor/oauth/v1alpha1/doc.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// +k8s:openapi-gen=true -// +k8s:deepcopy-gen=package -// +k8s:defaulter-gen=TypeMeta -// +groupName=oauth.supervisor.pinniped.dev - -// Package v1alpha1 is the v1alpha1 version of the Pinniped supervisor oauth API. -package v1alpha1 diff --git a/generated/latest/apis/supervisor/oauth/v1alpha1/register.go b/generated/latest/apis/supervisor/oauth/v1alpha1/register.go deleted file mode 100644 index 37ae1fbf..00000000 --- a/generated/latest/apis/supervisor/oauth/v1alpha1/register.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const GroupName = "oauth.supervisor.pinniped.dev" - -// SchemeGroupVersion is group version used to register these objects. -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} - -var ( - SchemeBuilder runtime.SchemeBuilder - localSchemeBuilder = &SchemeBuilder - AddToScheme = localSchemeBuilder.AddToScheme -) - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addKnownTypes) -} - -// Adds the list of known types to the given scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &OIDCClient{}, - &OIDCClientList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} - -// Resource takes an unqualified resource and returns a Group qualified GroupResource. -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} diff --git a/generated/latest/apis/supervisor/oauth/v1alpha1/zz_generated.deepcopy.go b/generated/latest/apis/supervisor/oauth/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index 1aba8aea..00000000 --- a/generated/latest/apis/supervisor/oauth/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,121 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClient) DeepCopyInto(out *OIDCClient) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClient. -func (in *OIDCClient) DeepCopy() *OIDCClient { - if in == nil { - return nil - } - out := new(OIDCClient) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OIDCClient) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientList) DeepCopyInto(out *OIDCClientList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]OIDCClient, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientList. -func (in *OIDCClientList) DeepCopy() *OIDCClientList { - if in == nil { - return nil - } - out := new(OIDCClientList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OIDCClientList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientSpec) DeepCopyInto(out *OIDCClientSpec) { - *out = *in - if in.AllowedRedirectURIs != nil { - in, out := &in.AllowedRedirectURIs, &out.AllowedRedirectURIs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.AllowedGrantTypes != nil { - in, out := &in.AllowedGrantTypes, &out.AllowedGrantTypes - *out = make([]GrantType, len(*in)) - copy(*out, *in) - } - if in.AllowedScopes != nil { - in, out := &in.AllowedScopes, &out.AllowedScopes - *out = make([]Scope, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSpec. -func (in *OIDCClientSpec) DeepCopy() *OIDCClientSpec { - if in == nil { - return nil - } - out := new(OIDCClientSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientStatus) DeepCopyInto(out *OIDCClientStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientStatus. -func (in *OIDCClientStatus) DeepCopy() *OIDCClientStatus { - if in == nil { - return nil - } - out := new(OIDCClientStatus) - in.DeepCopyInto(out) - return out -} diff --git a/generated/latest/apis/supervisor/virtual/oauth/doc.go b/generated/latest/apis/supervisor/virtual/oauth/doc.go deleted file mode 100644 index ca4e9a63..00000000 --- a/generated/latest/apis/supervisor/virtual/oauth/doc.go +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// +k8s:deepcopy-gen=package -// +groupName=oauth.virtual.supervisor.pinniped.dev - -// Package oauth is the internal version of the Pinniped virtual oauth API. -package oauth diff --git a/generated/latest/apis/supervisor/virtual/oauth/register.go b/generated/latest/apis/supervisor/virtual/oauth/register.go deleted file mode 100644 index a238d85f..00000000 --- a/generated/latest/apis/supervisor/virtual/oauth/register.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package oauth - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const GroupName = "oauth.virtual.supervisor.pinniped.dev" - -// SchemeGroupVersion is group version used to register these objects. -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} - -// Kind takes an unqualified kind and returns back a Group qualified GroupKind. -func Kind(kind string) schema.GroupKind { - return SchemeGroupVersion.WithKind(kind).GroupKind() -} - -// Resource takes an unqualified resource and returns back a Group qualified GroupResource. -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -var ( - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - AddToScheme = SchemeBuilder.AddToScheme -) - -// Adds the list of known types to the given scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &OIDCClientSecretRequest{}, - ) - return nil -} diff --git a/generated/latest/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go b/generated/latest/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go deleted file mode 100644 index ac54a93c..00000000 --- a/generated/latest/apis/supervisor/virtual/oauth/types_oidcclientsecretrequest.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package oauth - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -type OIDCClientSecretRequestSpec struct { - GenerateNewSecret bool `json:"generateNewSecret"` - RevokeOldSecrets bool `json:"revokeOldSecrets"` -} - -type OIDCClientSecretRequestStatus struct { - GeneratedSecret string `json:"generatedSecret,omitempty"` - TotalClientSecrets int `json:"totalClientSecrets"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type OIDCClientSecretRequest struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` // metadata.name must be set to the client ID - - Spec OIDCClientSecretRequestSpec `json:"spec"` - Status OIDCClientSecretRequestStatus `json:"status"` -} diff --git a/generated/latest/apis/supervisor/virtual/oauth/v1alpha1/register.go b/generated/latest/apis/supervisor/virtual/oauth/v1alpha1/register.go deleted file mode 100644 index ecc75a08..00000000 --- a/generated/latest/apis/supervisor/virtual/oauth/v1alpha1/register.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const GroupName = "oauth.virtual.supervisor.pinniped.dev" - -// SchemeGroupVersion is group version used to register these objects. -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} - -var ( - SchemeBuilder runtime.SchemeBuilder - localSchemeBuilder = &SchemeBuilder - AddToScheme = SchemeBuilder.AddToScheme -) - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs) -} - -// Adds the list of known types to the given scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &OIDCClientSecretRequest{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} - -// Resource takes an unqualified resource and returns back a Group qualified GroupResource. -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} diff --git a/generated/latest/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go b/generated/latest/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go deleted file mode 100644 index aebfa30d..00000000 --- a/generated/latest/apis/supervisor/virtual/oauth/v1alpha1/zz_generated.conversion.go +++ /dev/null @@ -1,131 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by conversion-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - oauth "go.pinniped.dev/generated/latest/apis/supervisor/virtual/oauth" - 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((*OIDCClientSecretRequest)(nil), (*oauth.OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(a.(*OIDCClientSecretRequest), b.(*oauth.OIDCClientSecretRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequest)(nil), (*OIDCClientSecretRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(a.(*oauth.OIDCClientSecretRequest), b.(*OIDCClientSecretRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestSpec)(nil), (*oauth.OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(a.(*OIDCClientSecretRequestSpec), b.(*oauth.OIDCClientSecretRequestSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequestSpec)(nil), (*OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(a.(*oauth.OIDCClientSecretRequestSpec), b.(*OIDCClientSecretRequestSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestStatus)(nil), (*oauth.OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(a.(*OIDCClientSecretRequestStatus), b.(*oauth.OIDCClientSecretRequestStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*oauth.OIDCClientSecretRequestStatus)(nil), (*OIDCClientSecretRequestStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(a.(*oauth.OIDCClientSecretRequestStatus), b.(*OIDCClientSecretRequestStatus), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *oauth.OIDCClientSecretRequest, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest is an autogenerated conversion function. -func Convert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in *OIDCClientSecretRequest, out *oauth.OIDCClientSecretRequest, s conversion.Scope) error { - return autoConvert_v1alpha1_OIDCClientSecretRequest_To_oauth_OIDCClientSecretRequest(in, out, s) -} - -func autoConvert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *oauth.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest is an autogenerated conversion function. -func Convert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in *oauth.OIDCClientSecretRequest, out *OIDCClientSecretRequest, s conversion.Scope) error { - return autoConvert_oauth_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in, out, s) -} - -func autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *oauth.OIDCClientSecretRequestSpec, s conversion.Scope) error { - out.GenerateNewSecret = in.GenerateNewSecret - out.RevokeOldSecrets = in.RevokeOldSecrets - return nil -} - -// Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec is an autogenerated conversion function. -func Convert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *oauth.OIDCClientSecretRequestSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_oauth_OIDCClientSecretRequestSpec(in, out, s) -} - -func autoConvert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *oauth.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { - out.GenerateNewSecret = in.GenerateNewSecret - out.RevokeOldSecrets = in.RevokeOldSecrets - return nil -} - -// Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec is an autogenerated conversion function. -func Convert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in *oauth.OIDCClientSecretRequestSpec, out *OIDCClientSecretRequestSpec, s conversion.Scope) error { - return autoConvert_oauth_OIDCClientSecretRequestSpec_To_v1alpha1_OIDCClientSecretRequestSpec(in, out, s) -} - -func autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *oauth.OIDCClientSecretRequestStatus, s conversion.Scope) error { - out.GeneratedSecret = in.GeneratedSecret - out.TotalClientSecrets = in.TotalClientSecrets - return nil -} - -// Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus is an autogenerated conversion function. -func Convert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in *OIDCClientSecretRequestStatus, out *oauth.OIDCClientSecretRequestStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_OIDCClientSecretRequestStatus_To_oauth_OIDCClientSecretRequestStatus(in, out, s) -} - -func autoConvert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *oauth.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { - out.GeneratedSecret = in.GeneratedSecret - out.TotalClientSecrets = in.TotalClientSecrets - return nil -} - -// Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus is an autogenerated conversion function. -func Convert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in *oauth.OIDCClientSecretRequestStatus, out *OIDCClientSecretRequestStatus, s conversion.Scope) error { - return autoConvert_oauth_OIDCClientSecretRequestStatus_To_v1alpha1_OIDCClientSecretRequestStatus(in, out, s) -} diff --git a/generated/latest/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go b/generated/latest/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go deleted file mode 100644 index 24b58e7b..00000000 --- a/generated/latest/apis/supervisor/virtual/oauth/zz_generated.deepcopy.go +++ /dev/null @@ -1,73 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package oauth - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientSecretRequest) DeepCopyInto(out *OIDCClientSecretRequest) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - out.Status = in.Status - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequest. -func (in *OIDCClientSecretRequest) DeepCopy() *OIDCClientSecretRequest { - if in == nil { - return nil - } - out := new(OIDCClientSecretRequest) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestSpec. -func (in *OIDCClientSecretRequestSpec) DeepCopy() *OIDCClientSecretRequestSpec { - if in == nil { - return nil - } - out := new(OIDCClientSecretRequestSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OIDCClientSecretRequestStatus) DeepCopyInto(out *OIDCClientSecretRequestStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestStatus. -func (in *OIDCClientSecretRequestStatus) DeepCopy() *OIDCClientSecretRequestStatus { - if in == nil { - return nil - } - out := new(OIDCClientSecretRequestStatus) - in.DeepCopyInto(out) - return out -} diff --git a/generated/latest/client/supervisor/clientset/versioned/clientset.go b/generated/latest/client/supervisor/clientset/versioned/clientset.go index cc05d311..fc14381c 100644 --- a/generated/latest/client/supervisor/clientset/versioned/clientset.go +++ b/generated/latest/client/supervisor/clientset/versioned/clientset.go @@ -9,9 +9,9 @@ import ( "fmt" "net/http" + clientsecretv1alpha1 "go.pinniped.dev/generated/latest/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1" configv1alpha1 "go.pinniped.dev/generated/latest/client/supervisor/clientset/versioned/typed/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/latest/client/supervisor/clientset/versioned/typed/idp/v1alpha1" - oauthv1alpha1 "go.pinniped.dev/generated/latest/client/supervisor/clientset/versioned/typed/oauth/v1alpha1" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" flowcontrol "k8s.io/client-go/util/flowcontrol" @@ -19,18 +19,23 @@ import ( type Interface interface { Discovery() discovery.DiscoveryInterface + ClientsecretV1alpha1() clientsecretv1alpha1.ClientsecretV1alpha1Interface ConfigV1alpha1() configv1alpha1.ConfigV1alpha1Interface IDPV1alpha1() idpv1alpha1.IDPV1alpha1Interface - OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface } // Clientset contains the clients for groups. Each group has exactly one // version included in a Clientset. type Clientset struct { *discovery.DiscoveryClient - configV1alpha1 *configv1alpha1.ConfigV1alpha1Client - iDPV1alpha1 *idpv1alpha1.IDPV1alpha1Client - oauthV1alpha1 *oauthv1alpha1.OauthV1alpha1Client + clientsecretV1alpha1 *clientsecretv1alpha1.ClientsecretV1alpha1Client + configV1alpha1 *configv1alpha1.ConfigV1alpha1Client + iDPV1alpha1 *idpv1alpha1.IDPV1alpha1Client +} + +// ClientsecretV1alpha1 retrieves the ClientsecretV1alpha1Client +func (c *Clientset) ClientsecretV1alpha1() clientsecretv1alpha1.ClientsecretV1alpha1Interface { + return c.clientsecretV1alpha1 } // ConfigV1alpha1 retrieves the ConfigV1alpha1Client @@ -43,11 +48,6 @@ func (c *Clientset) IDPV1alpha1() idpv1alpha1.IDPV1alpha1Interface { return c.iDPV1alpha1 } -// OauthV1alpha1 retrieves the OauthV1alpha1Client -func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { - return c.oauthV1alpha1 -} - // Discovery retrieves the DiscoveryClient func (c *Clientset) Discovery() discovery.DiscoveryInterface { if c == nil { @@ -92,6 +92,10 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, var cs Clientset var err error + cs.clientsecretV1alpha1, err = clientsecretv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } cs.configV1alpha1, err = configv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err @@ -100,10 +104,6 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, if err != nil { return nil, err } - cs.oauthV1alpha1, err = oauthv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) - if err != nil { - return nil, err - } cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfigAndClient(&configShallowCopy, httpClient) if err != nil { @@ -125,9 +125,9 @@ 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.clientsecretV1alpha1 = clientsecretv1alpha1.New(c) cs.configV1alpha1 = configv1alpha1.New(c) cs.iDPV1alpha1 = idpv1alpha1.New(c) - cs.oauthV1alpha1 = oauthv1alpha1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) return &cs diff --git a/generated/latest/client/supervisor/clientset/versioned/fake/clientset_generated.go b/generated/latest/client/supervisor/clientset/versioned/fake/clientset_generated.go index 6b73fc47..faa6581f 100644 --- a/generated/latest/client/supervisor/clientset/versioned/fake/clientset_generated.go +++ b/generated/latest/client/supervisor/clientset/versioned/fake/clientset_generated.go @@ -7,12 +7,12 @@ package fake import ( clientset "go.pinniped.dev/generated/latest/client/supervisor/clientset/versioned" + clientsecretv1alpha1 "go.pinniped.dev/generated/latest/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1" + fakeclientsecretv1alpha1 "go.pinniped.dev/generated/latest/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake" configv1alpha1 "go.pinniped.dev/generated/latest/client/supervisor/clientset/versioned/typed/config/v1alpha1" fakeconfigv1alpha1 "go.pinniped.dev/generated/latest/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake" idpv1alpha1 "go.pinniped.dev/generated/latest/client/supervisor/clientset/versioned/typed/idp/v1alpha1" fakeidpv1alpha1 "go.pinniped.dev/generated/latest/client/supervisor/clientset/versioned/typed/idp/v1alpha1/fake" - oauthv1alpha1 "go.pinniped.dev/generated/latest/client/supervisor/clientset/versioned/typed/oauth/v1alpha1" - fakeoauthv1alpha1 "go.pinniped.dev/generated/latest/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/discovery" @@ -70,6 +70,11 @@ var ( _ testing.FakeClient = &Clientset{} ) +// ClientsecretV1alpha1 retrieves the ClientsecretV1alpha1Client +func (c *Clientset) ClientsecretV1alpha1() clientsecretv1alpha1.ClientsecretV1alpha1Interface { + return &fakeclientsecretv1alpha1.FakeClientsecretV1alpha1{Fake: &c.Fake} +} + // ConfigV1alpha1 retrieves the ConfigV1alpha1Client func (c *Clientset) ConfigV1alpha1() configv1alpha1.ConfigV1alpha1Interface { return &fakeconfigv1alpha1.FakeConfigV1alpha1{Fake: &c.Fake} @@ -79,8 +84,3 @@ func (c *Clientset) ConfigV1alpha1() configv1alpha1.ConfigV1alpha1Interface { func (c *Clientset) IDPV1alpha1() idpv1alpha1.IDPV1alpha1Interface { return &fakeidpv1alpha1.FakeIDPV1alpha1{Fake: &c.Fake} } - -// OauthV1alpha1 retrieves the OauthV1alpha1Client -func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { - return &fakeoauthv1alpha1.FakeOauthV1alpha1{Fake: &c.Fake} -} diff --git a/generated/latest/client/supervisor/clientset/versioned/fake/register.go b/generated/latest/client/supervisor/clientset/versioned/fake/register.go index db9bb1a4..32607aa9 100644 --- a/generated/latest/client/supervisor/clientset/versioned/fake/register.go +++ b/generated/latest/client/supervisor/clientset/versioned/fake/register.go @@ -6,9 +6,9 @@ package fake import ( + clientsecretv1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/clientsecret/v1alpha1" configv1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/idp/v1alpha1" - oauthv1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/oauth/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -20,9 +20,9 @@ var scheme = runtime.NewScheme() var codecs = serializer.NewCodecFactory(scheme) var localSchemeBuilder = runtime.SchemeBuilder{ + clientsecretv1alpha1.AddToScheme, configv1alpha1.AddToScheme, idpv1alpha1.AddToScheme, - oauthv1alpha1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/generated/latest/client/supervisor/clientset/versioned/scheme/register.go b/generated/latest/client/supervisor/clientset/versioned/scheme/register.go index 9456d619..73edda13 100644 --- a/generated/latest/client/supervisor/clientset/versioned/scheme/register.go +++ b/generated/latest/client/supervisor/clientset/versioned/scheme/register.go @@ -6,9 +6,9 @@ package scheme import ( + clientsecretv1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/clientsecret/v1alpha1" configv1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/idp/v1alpha1" - oauthv1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/oauth/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -20,9 +20,9 @@ var Scheme = runtime.NewScheme() var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) var localSchemeBuilder = runtime.SchemeBuilder{ + clientsecretv1alpha1.AddToScheme, configv1alpha1.AddToScheme, idpv1alpha1.AddToScheme, - oauthv1alpha1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go b/generated/latest/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/clientsecret_client.go similarity index 55% rename from generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go rename to generated/latest/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/clientsecret_client.go index aa4521a2..d8ce41cd 100644 --- a/generated/1.24/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go +++ b/generated/latest/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/clientsecret_client.go @@ -8,29 +8,29 @@ package v1alpha1 import ( "net/http" - v1alpha1 "go.pinniped.dev/generated/1.24/apis/supervisor/virtual/oauth/v1alpha1" - "go.pinniped.dev/generated/1.24/client/supervisor/virtual/clientset/versioned/scheme" + v1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/clientsecret/v1alpha1" + "go.pinniped.dev/generated/latest/client/supervisor/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) -type OauthV1alpha1Interface interface { +type ClientsecretV1alpha1Interface interface { RESTClient() rest.Interface OIDCClientSecretRequestsGetter } -// OauthV1alpha1Client is used to interact with features provided by the oauth.virtual.supervisor.pinniped.dev group. -type OauthV1alpha1Client struct { +// ClientsecretV1alpha1Client is used to interact with features provided by the clientsecret.supervisor.pinniped.dev group. +type ClientsecretV1alpha1Client struct { restClient rest.Interface } -func (c *OauthV1alpha1Client) OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface { +func (c *ClientsecretV1alpha1Client) OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface { return newOIDCClientSecretRequests(c, namespace) } -// NewForConfig creates a new OauthV1alpha1Client for the given config. +// NewForConfig creates a new ClientsecretV1alpha1Client for the given config. // NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), // where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*OauthV1alpha1Client, error) { +func NewForConfig(c *rest.Config) (*ClientsecretV1alpha1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err @@ -42,9 +42,9 @@ func NewForConfig(c *rest.Config) (*OauthV1alpha1Client, error) { return NewForConfigAndClient(&config, httpClient) } -// NewForConfigAndClient creates a new OauthV1alpha1Client for the given config and http client. +// NewForConfigAndClient creates a new ClientsecretV1alpha1Client for the given config and http client. // Note the http client provided takes precedence over the configured transport values. -func NewForConfigAndClient(c *rest.Config, h *http.Client) (*OauthV1alpha1Client, error) { +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ClientsecretV1alpha1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err @@ -53,12 +53,12 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*OauthV1alpha1Client if err != nil { return nil, err } - return &OauthV1alpha1Client{client}, nil + return &ClientsecretV1alpha1Client{client}, nil } -// NewForConfigOrDie creates a new OauthV1alpha1Client for the given config and +// NewForConfigOrDie creates a new ClientsecretV1alpha1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *OauthV1alpha1Client { +func NewForConfigOrDie(c *rest.Config) *ClientsecretV1alpha1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -66,9 +66,9 @@ func NewForConfigOrDie(c *rest.Config) *OauthV1alpha1Client { return client } -// New creates a new OauthV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *OauthV1alpha1Client { - return &OauthV1alpha1Client{c} +// New creates a new ClientsecretV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *ClientsecretV1alpha1Client { + return &ClientsecretV1alpha1Client{c} } func setConfigDefaults(config *rest.Config) error { @@ -86,7 +86,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 *OauthV1alpha1Client) RESTClient() rest.Interface { +func (c *ClientsecretV1alpha1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/generated/1.21/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/doc.go b/generated/latest/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/doc.go similarity index 100% rename from generated/1.21/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/doc.go rename to generated/latest/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/doc.go diff --git a/generated/1.21/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go b/generated/latest/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/doc.go similarity index 100% rename from generated/1.21/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go rename to generated/latest/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/doc.go diff --git a/generated/latest/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go b/generated/latest/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_clientsecret_client.go similarity index 60% rename from generated/latest/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go rename to generated/latest/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_clientsecret_client.go index abcc6a0c..27c559de 100644 --- a/generated/latest/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go +++ b/generated/latest/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_clientsecret_client.go @@ -6,22 +6,22 @@ package fake import ( - v1alpha1 "go.pinniped.dev/generated/latest/client/supervisor/clientset/versioned/typed/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/latest/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1" rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" ) -type FakeOauthV1alpha1 struct { +type FakeClientsecretV1alpha1 struct { *testing.Fake } -func (c *FakeOauthV1alpha1) OIDCClients(namespace string) v1alpha1.OIDCClientInterface { - return &FakeOIDCClients{c, namespace} +func (c *FakeClientsecretV1alpha1) OIDCClientSecretRequests(namespace string) v1alpha1.OIDCClientSecretRequestInterface { + return &FakeOIDCClientSecretRequests{c, namespace} } // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeOauthV1alpha1) RESTClient() rest.Interface { +func (c *FakeClientsecretV1alpha1) RESTClient() rest.Interface { var ret *rest.RESTClient return ret } diff --git a/generated/latest/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_oidcclientsecretrequest.go b/generated/latest/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_oidcclientsecretrequest.go new file mode 100644 index 00000000..00da4ce8 --- /dev/null +++ b/generated/latest/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/fake/fake_oidcclientsecretrequest.go @@ -0,0 +1,36 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/clientsecret/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + schema "k8s.io/apimachinery/pkg/runtime/schema" + testing "k8s.io/client-go/testing" +) + +// FakeOIDCClientSecretRequests implements OIDCClientSecretRequestInterface +type FakeOIDCClientSecretRequests struct { + Fake *FakeClientsecretV1alpha1 + ns string +} + +var oidcclientsecretrequestsResource = schema.GroupVersionResource{Group: "clientsecret.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclientsecretrequests"} + +var oidcclientsecretrequestsKind = schema.GroupVersionKind{Group: "clientsecret.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClientSecretRequest"} + +// Create takes the representation of a oIDCClientSecretRequest and creates it. Returns the server's representation of the oIDCClientSecretRequest, and an error, if there is any. +func (c *FakeOIDCClientSecretRequests) Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (result *v1alpha1.OIDCClientSecretRequest, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(oidcclientsecretrequestsResource, c.ns, oIDCClientSecretRequest), &v1alpha1.OIDCClientSecretRequest{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.OIDCClientSecretRequest), err +} diff --git a/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go b/generated/latest/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/generated_expansion.go similarity index 100% rename from generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go rename to generated/latest/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/generated_expansion.go diff --git a/generated/latest/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/oidcclientsecretrequest.go b/generated/latest/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/oidcclientsecretrequest.go new file mode 100644 index 00000000..76bb20c1 --- /dev/null +++ b/generated/latest/client/supervisor/clientset/versioned/typed/clientsecret/v1alpha1/oidcclientsecretrequest.go @@ -0,0 +1,54 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + + v1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/clientsecret/v1alpha1" + scheme "go.pinniped.dev/generated/latest/client/supervisor/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + rest "k8s.io/client-go/rest" +) + +// OIDCClientSecretRequestsGetter has a method to return a OIDCClientSecretRequestInterface. +// A group's client should implement this interface. +type OIDCClientSecretRequestsGetter interface { + OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface +} + +// OIDCClientSecretRequestInterface has methods to work with OIDCClientSecretRequest resources. +type OIDCClientSecretRequestInterface interface { + Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (*v1alpha1.OIDCClientSecretRequest, error) + OIDCClientSecretRequestExpansion +} + +// oIDCClientSecretRequests implements OIDCClientSecretRequestInterface +type oIDCClientSecretRequests struct { + client rest.Interface + ns string +} + +// newOIDCClientSecretRequests returns a OIDCClientSecretRequests +func newOIDCClientSecretRequests(c *ClientsecretV1alpha1Client, namespace string) *oIDCClientSecretRequests { + return &oIDCClientSecretRequests{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Create takes the representation of a oIDCClientSecretRequest and creates it. Returns the server's representation of the oIDCClientSecretRequest, and an error, if there is any. +func (c *oIDCClientSecretRequests) Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (result *v1alpha1.OIDCClientSecretRequest, err error) { + result = &v1alpha1.OIDCClientSecretRequest{} + err = c.client.Post(). + Namespace(c.ns). + Resource("oidcclientsecretrequests"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(oIDCClientSecretRequest). + Do(ctx). + Into(result) + return +} diff --git a/generated/latest/client/supervisor/clientset/versioned/typed/config/v1alpha1/config_client.go b/generated/latest/client/supervisor/clientset/versioned/typed/config/v1alpha1/config_client.go index c946632a..ea41ad67 100644 --- a/generated/latest/client/supervisor/clientset/versioned/typed/config/v1alpha1/config_client.go +++ b/generated/latest/client/supervisor/clientset/versioned/typed/config/v1alpha1/config_client.go @@ -16,6 +16,7 @@ import ( type ConfigV1alpha1Interface interface { RESTClient() rest.Interface FederationDomainsGetter + OIDCClientsGetter } // ConfigV1alpha1Client is used to interact with features provided by the config.supervisor.pinniped.dev group. @@ -27,6 +28,10 @@ func (c *ConfigV1alpha1Client) FederationDomains(namespace string) FederationDom return newFederationDomains(c, namespace) } +func (c *ConfigV1alpha1Client) OIDCClients(namespace string) OIDCClientInterface { + return newOIDCClients(c, namespace) +} + // NewForConfig creates a new ConfigV1alpha1Client for the given config. // NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), // where httpClient was generated with rest.HTTPClientFor(c). diff --git a/generated/latest/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go b/generated/latest/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go index 088e66a2..2ca19bd6 100644 --- a/generated/latest/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go +++ b/generated/latest/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go @@ -19,6 +19,10 @@ func (c *FakeConfigV1alpha1) FederationDomains(namespace string) v1alpha1.Federa return &FakeFederationDomains{c, namespace} } +func (c *FakeConfigV1alpha1) OIDCClients(namespace string) v1alpha1.OIDCClientInterface { + return &FakeOIDCClients{c, namespace} +} + // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. func (c *FakeConfigV1alpha1) RESTClient() rest.Interface { diff --git a/generated/latest/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclient.go b/generated/latest/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_oidcclient.go similarity index 92% rename from generated/latest/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclient.go rename to generated/latest/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_oidcclient.go index 89568d1a..aba465a9 100644 --- a/generated/latest/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclient.go +++ b/generated/latest/client/supervisor/clientset/versioned/typed/config/v1alpha1/fake/fake_oidcclient.go @@ -8,7 +8,7 @@ package fake import ( "context" - v1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/config/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -19,13 +19,13 @@ import ( // FakeOIDCClients implements OIDCClientInterface type FakeOIDCClients struct { - Fake *FakeOauthV1alpha1 + Fake *FakeConfigV1alpha1 ns string } -var oidcclientsResource = schema.GroupVersionResource{Group: "oauth.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclients"} +var oidcclientsResource = schema.GroupVersionResource{Group: "config.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclients"} -var oidcclientsKind = schema.GroupVersionKind{Group: "oauth.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClient"} +var oidcclientsKind = schema.GroupVersionKind{Group: "config.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClient"} // Get takes name of the oIDCClient, and returns the corresponding oIDCClient object, and an error if there is any. func (c *FakeOIDCClients) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.OIDCClient, err error) { diff --git a/generated/latest/client/supervisor/clientset/versioned/typed/config/v1alpha1/generated_expansion.go b/generated/latest/client/supervisor/clientset/versioned/typed/config/v1alpha1/generated_expansion.go index ba9c9173..35b9ee3d 100644 --- a/generated/latest/client/supervisor/clientset/versioned/typed/config/v1alpha1/generated_expansion.go +++ b/generated/latest/client/supervisor/clientset/versioned/typed/config/v1alpha1/generated_expansion.go @@ -6,3 +6,5 @@ package v1alpha1 type FederationDomainExpansion interface{} + +type OIDCClientExpansion interface{} diff --git a/generated/latest/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oidcclient.go b/generated/latest/client/supervisor/clientset/versioned/typed/config/v1alpha1/oidcclient.go similarity index 97% rename from generated/latest/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oidcclient.go rename to generated/latest/client/supervisor/clientset/versioned/typed/config/v1alpha1/oidcclient.go index 888c2a7e..68fa884e 100644 --- a/generated/latest/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oidcclient.go +++ b/generated/latest/client/supervisor/clientset/versioned/typed/config/v1alpha1/oidcclient.go @@ -9,7 +9,7 @@ import ( "context" "time" - v1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/config/v1alpha1" scheme "go.pinniped.dev/generated/latest/client/supervisor/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -44,7 +44,7 @@ type oIDCClients struct { } // newOIDCClients returns a OIDCClients -func newOIDCClients(c *OauthV1alpha1Client, namespace string) *oIDCClients { +func newOIDCClients(c *ConfigV1alpha1Client, namespace string) *oIDCClients { return &oIDCClients{ client: c.RESTClient(), ns: namespace, diff --git a/generated/latest/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/doc.go b/generated/latest/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/doc.go deleted file mode 100644 index e7a470b6..00000000 --- a/generated/latest/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1alpha1 diff --git a/generated/latest/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go b/generated/latest/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go deleted file mode 100644 index 7906901b..00000000 --- a/generated/latest/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/generated/latest/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go b/generated/latest/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go deleted file mode 100644 index 87d22ea9..00000000 --- a/generated/latest/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/generated_expansion.go +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -type OIDCClientExpansion interface{} diff --git a/generated/latest/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go b/generated/latest/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go deleted file mode 100644 index 80077607..00000000 --- a/generated/latest/client/supervisor/clientset/versioned/typed/oauth/v1alpha1/oauth_client.go +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "net/http" - - v1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/oauth/v1alpha1" - "go.pinniped.dev/generated/latest/client/supervisor/clientset/versioned/scheme" - rest "k8s.io/client-go/rest" -) - -type OauthV1alpha1Interface interface { - RESTClient() rest.Interface - OIDCClientsGetter -} - -// OauthV1alpha1Client is used to interact with features provided by the oauth.supervisor.pinniped.dev group. -type OauthV1alpha1Client struct { - restClient rest.Interface -} - -func (c *OauthV1alpha1Client) OIDCClients(namespace string) OIDCClientInterface { - return newOIDCClients(c, namespace) -} - -// NewForConfig creates a new OauthV1alpha1Client for the given config. -// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), -// where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*OauthV1alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - httpClient, err := rest.HTTPClientFor(&config) - if err != nil { - return nil, err - } - return NewForConfigAndClient(&config, httpClient) -} - -// NewForConfigAndClient creates a new OauthV1alpha1Client for the given config and http client. -// Note the http client provided takes precedence over the configured transport values. -func NewForConfigAndClient(c *rest.Config, h *http.Client) (*OauthV1alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientForConfigAndClient(&config, h) - if err != nil { - return nil, err - } - return &OauthV1alpha1Client{client}, nil -} - -// NewForConfigOrDie creates a new OauthV1alpha1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *OauthV1alpha1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new OauthV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *OauthV1alpha1Client { - return &OauthV1alpha1Client{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 *OauthV1alpha1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/generated/latest/client/supervisor/informers/externalversions/config/v1alpha1/interface.go b/generated/latest/client/supervisor/informers/externalversions/config/v1alpha1/interface.go index 5273529b..a86c165c 100644 --- a/generated/latest/client/supervisor/informers/externalversions/config/v1alpha1/interface.go +++ b/generated/latest/client/supervisor/informers/externalversions/config/v1alpha1/interface.go @@ -13,6 +13,8 @@ import ( type Interface interface { // FederationDomains returns a FederationDomainInformer. FederationDomains() FederationDomainInformer + // OIDCClients returns a OIDCClientInformer. + OIDCClients() OIDCClientInformer } type version struct { @@ -30,3 +32,8 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList func (v *version) FederationDomains() FederationDomainInformer { return &federationDomainInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } + +// OIDCClients returns a OIDCClientInformer. +func (v *version) OIDCClients() OIDCClientInformer { + return &oIDCClientInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} diff --git a/generated/latest/client/supervisor/informers/externalversions/oauth/v1alpha1/oidcclient.go b/generated/latest/client/supervisor/informers/externalversions/config/v1alpha1/oidcclient.go similarity index 88% rename from generated/latest/client/supervisor/informers/externalversions/oauth/v1alpha1/oidcclient.go rename to generated/latest/client/supervisor/informers/externalversions/config/v1alpha1/oidcclient.go index d3eec3d2..00d2f521 100644 --- a/generated/latest/client/supervisor/informers/externalversions/oauth/v1alpha1/oidcclient.go +++ b/generated/latest/client/supervisor/informers/externalversions/config/v1alpha1/oidcclient.go @@ -9,10 +9,10 @@ import ( "context" time "time" - oauthv1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/oauth/v1alpha1" + configv1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/config/v1alpha1" versioned "go.pinniped.dev/generated/latest/client/supervisor/clientset/versioned" internalinterfaces "go.pinniped.dev/generated/latest/client/supervisor/informers/externalversions/internalinterfaces" - v1alpha1 "go.pinniped.dev/generated/latest/client/supervisor/listers/oauth/v1alpha1" + v1alpha1 "go.pinniped.dev/generated/latest/client/supervisor/listers/config/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -49,16 +49,16 @@ func NewFilteredOIDCClientInformer(client versioned.Interface, namespace string, if tweakListOptions != nil { tweakListOptions(&options) } - return client.OauthV1alpha1().OIDCClients(namespace).List(context.TODO(), options) + return client.ConfigV1alpha1().OIDCClients(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.OauthV1alpha1().OIDCClients(namespace).Watch(context.TODO(), options) + return client.ConfigV1alpha1().OIDCClients(namespace).Watch(context.TODO(), options) }, }, - &oauthv1alpha1.OIDCClient{}, + &configv1alpha1.OIDCClient{}, resyncPeriod, indexers, ) @@ -69,7 +69,7 @@ func (f *oIDCClientInformer) defaultInformer(client versioned.Interface, resyncP } func (f *oIDCClientInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&oauthv1alpha1.OIDCClient{}, f.defaultInformer) + return f.factory.InformerFor(&configv1alpha1.OIDCClient{}, f.defaultInformer) } func (f *oIDCClientInformer) Lister() v1alpha1.OIDCClientLister { diff --git a/generated/latest/client/supervisor/informers/externalversions/factory.go b/generated/latest/client/supervisor/informers/externalversions/factory.go index d3c714e7..252195d3 100644 --- a/generated/latest/client/supervisor/informers/externalversions/factory.go +++ b/generated/latest/client/supervisor/informers/externalversions/factory.go @@ -14,7 +14,6 @@ import ( config "go.pinniped.dev/generated/latest/client/supervisor/informers/externalversions/config" idp "go.pinniped.dev/generated/latest/client/supervisor/informers/externalversions/idp" internalinterfaces "go.pinniped.dev/generated/latest/client/supervisor/informers/externalversions/internalinterfaces" - oauth "go.pinniped.dev/generated/latest/client/supervisor/informers/externalversions/oauth" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -163,7 +162,6 @@ type SharedInformerFactory interface { Config() config.Interface IDP() idp.Interface - Oauth() oauth.Interface } func (f *sharedInformerFactory) Config() config.Interface { @@ -173,7 +171,3 @@ func (f *sharedInformerFactory) Config() config.Interface { func (f *sharedInformerFactory) IDP() idp.Interface { return idp.New(f, f.namespace, f.tweakListOptions) } - -func (f *sharedInformerFactory) Oauth() oauth.Interface { - return oauth.New(f, f.namespace, f.tweakListOptions) -} diff --git a/generated/latest/client/supervisor/informers/externalversions/generic.go b/generated/latest/client/supervisor/informers/externalversions/generic.go index ba708933..eb3f5543 100644 --- a/generated/latest/client/supervisor/informers/externalversions/generic.go +++ b/generated/latest/client/supervisor/informers/externalversions/generic.go @@ -10,7 +10,6 @@ import ( v1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/config/v1alpha1" idpv1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/idp/v1alpha1" - oauthv1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/oauth/v1alpha1" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" ) @@ -44,6 +43,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource // Group=config.supervisor.pinniped.dev, Version=v1alpha1 case v1alpha1.SchemeGroupVersion.WithResource("federationdomains"): return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1alpha1().FederationDomains().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("oidcclients"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1alpha1().OIDCClients().Informer()}, nil // Group=idp.supervisor.pinniped.dev, Version=v1alpha1 case idpv1alpha1.SchemeGroupVersion.WithResource("activedirectoryidentityproviders"): @@ -53,10 +54,6 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource case idpv1alpha1.SchemeGroupVersion.WithResource("oidcidentityproviders"): return &genericInformer{resource: resource.GroupResource(), informer: f.IDP().V1alpha1().OIDCIdentityProviders().Informer()}, nil - // Group=oauth.supervisor.pinniped.dev, Version=v1alpha1 - case oauthv1alpha1.SchemeGroupVersion.WithResource("oidcclients"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Oauth().V1alpha1().OIDCClients().Informer()}, nil - } return nil, fmt.Errorf("no informer found for %v", resource) diff --git a/generated/latest/client/supervisor/informers/externalversions/oauth/interface.go b/generated/latest/client/supervisor/informers/externalversions/oauth/interface.go deleted file mode 100644 index b0c7105b..00000000 --- a/generated/latest/client/supervisor/informers/externalversions/oauth/interface.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by informer-gen. DO NOT EDIT. - -package oauth - -import ( - internalinterfaces "go.pinniped.dev/generated/latest/client/supervisor/informers/externalversions/internalinterfaces" - v1alpha1 "go.pinniped.dev/generated/latest/client/supervisor/informers/externalversions/oauth/v1alpha1" -) - -// Interface provides access to each of this group's versions. -type Interface interface { - // V1alpha1 provides access to shared informers for resources in V1alpha1. - V1alpha1() v1alpha1.Interface -} - -type group struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// V1alpha1 returns a new v1alpha1.Interface. -func (g *group) V1alpha1() v1alpha1.Interface { - return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) -} diff --git a/generated/latest/client/supervisor/informers/externalversions/oauth/v1alpha1/interface.go b/generated/latest/client/supervisor/informers/externalversions/oauth/v1alpha1/interface.go deleted file mode 100644 index 48e12497..00000000 --- a/generated/latest/client/supervisor/informers/externalversions/oauth/v1alpha1/interface.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - internalinterfaces "go.pinniped.dev/generated/latest/client/supervisor/informers/externalversions/internalinterfaces" -) - -// Interface provides access to all the informers in this group version. -type Interface interface { - // OIDCClients returns a OIDCClientInformer. - OIDCClients() OIDCClientInformer -} - -type version struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// OIDCClients returns a OIDCClientInformer. -func (v *version) OIDCClients() OIDCClientInformer { - return &oIDCClientInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} diff --git a/generated/latest/client/supervisor/listers/config/v1alpha1/expansion_generated.go b/generated/latest/client/supervisor/listers/config/v1alpha1/expansion_generated.go index d59892c4..bda2f20e 100644 --- a/generated/latest/client/supervisor/listers/config/v1alpha1/expansion_generated.go +++ b/generated/latest/client/supervisor/listers/config/v1alpha1/expansion_generated.go @@ -12,3 +12,11 @@ type FederationDomainListerExpansion interface{} // FederationDomainNamespaceListerExpansion allows custom methods to be added to // FederationDomainNamespaceLister. type FederationDomainNamespaceListerExpansion interface{} + +// OIDCClientListerExpansion allows custom methods to be added to +// OIDCClientLister. +type OIDCClientListerExpansion interface{} + +// OIDCClientNamespaceListerExpansion allows custom methods to be added to +// OIDCClientNamespaceLister. +type OIDCClientNamespaceListerExpansion interface{} diff --git a/generated/latest/client/supervisor/listers/config/v1alpha1/oidcclient.go b/generated/latest/client/supervisor/listers/config/v1alpha1/oidcclient.go new file mode 100644 index 00000000..34297ee1 --- /dev/null +++ b/generated/latest/client/supervisor/listers/config/v1alpha1/oidcclient.go @@ -0,0 +1,86 @@ +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/config/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// OIDCClientLister helps list OIDCClients. +// All objects returned here must be treated as read-only. +type OIDCClientLister interface { + // List lists all OIDCClients in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.OIDCClient, err error) + // OIDCClients returns an object that can list and get OIDCClients. + OIDCClients(namespace string) OIDCClientNamespaceLister + OIDCClientListerExpansion +} + +// oIDCClientLister implements the OIDCClientLister interface. +type oIDCClientLister struct { + indexer cache.Indexer +} + +// NewOIDCClientLister returns a new OIDCClientLister. +func NewOIDCClientLister(indexer cache.Indexer) OIDCClientLister { + return &oIDCClientLister{indexer: indexer} +} + +// List lists all OIDCClients in the indexer. +func (s *oIDCClientLister) List(selector labels.Selector) (ret []*v1alpha1.OIDCClient, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.OIDCClient)) + }) + return ret, err +} + +// OIDCClients returns an object that can list and get OIDCClients. +func (s *oIDCClientLister) OIDCClients(namespace string) OIDCClientNamespaceLister { + return oIDCClientNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// OIDCClientNamespaceLister helps list and get OIDCClients. +// All objects returned here must be treated as read-only. +type OIDCClientNamespaceLister interface { + // List lists all OIDCClients in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.OIDCClient, err error) + // Get retrieves the OIDCClient from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1alpha1.OIDCClient, error) + OIDCClientNamespaceListerExpansion +} + +// oIDCClientNamespaceLister implements the OIDCClientNamespaceLister +// interface. +type oIDCClientNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all OIDCClients in the indexer for a given namespace. +func (s oIDCClientNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.OIDCClient, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.OIDCClient)) + }) + return ret, err +} + +// Get retrieves the OIDCClient from the indexer for a given namespace and name. +func (s oIDCClientNamespaceLister) Get(name string) (*v1alpha1.OIDCClient, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("oidcclient"), name) + } + return obj.(*v1alpha1.OIDCClient), nil +} diff --git a/generated/latest/client/supervisor/listers/oauth/v1alpha1/expansion_generated.go b/generated/latest/client/supervisor/listers/oauth/v1alpha1/expansion_generated.go deleted file mode 100644 index c19310da..00000000 --- a/generated/latest/client/supervisor/listers/oauth/v1alpha1/expansion_generated.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha1 - -// OIDCClientListerExpansion allows custom methods to be added to -// OIDCClientLister. -type OIDCClientListerExpansion interface{} - -// OIDCClientNamespaceListerExpansion allows custom methods to be added to -// OIDCClientNamespaceLister. -type OIDCClientNamespaceListerExpansion interface{} diff --git a/generated/latest/client/supervisor/listers/oauth/v1alpha1/oidcclient.go b/generated/latest/client/supervisor/listers/oauth/v1alpha1/oidcclient.go deleted file mode 100644 index 189936b6..00000000 --- a/generated/latest/client/supervisor/listers/oauth/v1alpha1/oidcclient.go +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/oauth/v1alpha1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// OIDCClientLister helps list OIDCClients. -// All objects returned here must be treated as read-only. -type OIDCClientLister interface { - // List lists all OIDCClients in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.OIDCClient, err error) - // OIDCClients returns an object that can list and get OIDCClients. - OIDCClients(namespace string) OIDCClientNamespaceLister - OIDCClientListerExpansion -} - -// oIDCClientLister implements the OIDCClientLister interface. -type oIDCClientLister struct { - indexer cache.Indexer -} - -// NewOIDCClientLister returns a new OIDCClientLister. -func NewOIDCClientLister(indexer cache.Indexer) OIDCClientLister { - return &oIDCClientLister{indexer: indexer} -} - -// List lists all OIDCClients in the indexer. -func (s *oIDCClientLister) List(selector labels.Selector) (ret []*v1alpha1.OIDCClient, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.OIDCClient)) - }) - return ret, err -} - -// OIDCClients returns an object that can list and get OIDCClients. -func (s *oIDCClientLister) OIDCClients(namespace string) OIDCClientNamespaceLister { - return oIDCClientNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// OIDCClientNamespaceLister helps list and get OIDCClients. -// All objects returned here must be treated as read-only. -type OIDCClientNamespaceLister interface { - // List lists all OIDCClients in the indexer for a given namespace. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha1.OIDCClient, err error) - // Get retrieves the OIDCClient from the indexer for a given namespace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha1.OIDCClient, error) - OIDCClientNamespaceListerExpansion -} - -// oIDCClientNamespaceLister implements the OIDCClientNamespaceLister -// interface. -type oIDCClientNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all OIDCClients in the indexer for a given namespace. -func (s oIDCClientNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.OIDCClient, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1alpha1.OIDCClient)) - }) - return ret, err -} - -// Get retrieves the OIDCClient from the indexer for a given namespace and name. -func (s oIDCClientNamespaceLister) Get(name string) (*v1alpha1.OIDCClient, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1alpha1.Resource("oidcclient"), name) - } - return obj.(*v1alpha1.OIDCClient), nil -} diff --git a/generated/latest/client/supervisor/virtual/clientset/versioned/clientset.go b/generated/latest/client/supervisor/virtual/clientset/versioned/clientset.go deleted file mode 100644 index 87726aee..00000000 --- a/generated/latest/client/supervisor/virtual/clientset/versioned/clientset.go +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package versioned - -import ( - "fmt" - "net/http" - - oauthv1alpha1 "go.pinniped.dev/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" - discovery "k8s.io/client-go/discovery" - rest "k8s.io/client-go/rest" - flowcontrol "k8s.io/client-go/util/flowcontrol" -) - -type Interface interface { - Discovery() discovery.DiscoveryInterface - OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface -} - -// Clientset contains the clients for groups. Each group has exactly one -// version included in a Clientset. -type Clientset struct { - *discovery.DiscoveryClient - oauthV1alpha1 *oauthv1alpha1.OauthV1alpha1Client -} - -// OauthV1alpha1 retrieves the OauthV1alpha1Client -func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { - return c.oauthV1alpha1 -} - -// Discovery retrieves the DiscoveryClient -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - if c == nil { - return nil - } - return c.DiscoveryClient -} - -// NewForConfig creates a new Clientset for the given config. -// If config's RateLimiter is not set and QPS and Burst are acceptable, -// NewForConfig will generate a rate-limiter in configShallowCopy. -// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), -// where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*Clientset, error) { - configShallowCopy := *c - - if configShallowCopy.UserAgent == "" { - configShallowCopy.UserAgent = rest.DefaultKubernetesUserAgent() - } - - // share the transport between all clients - httpClient, err := rest.HTTPClientFor(&configShallowCopy) - if err != nil { - return nil, err - } - - return NewForConfigAndClient(&configShallowCopy, httpClient) -} - -// NewForConfigAndClient creates a new Clientset for the given config and http client. -// Note the http client provided takes precedence over the configured transport values. -// If config's RateLimiter is not set and QPS and Burst are acceptable, -// NewForConfigAndClient will generate a rate-limiter in configShallowCopy. -func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, error) { - configShallowCopy := *c - if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { - if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") - } - configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) - } - - var cs Clientset - var err error - cs.oauthV1alpha1, err = oauthv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) - if err != nil { - return nil, err - } - - cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfigAndClient(&configShallowCopy, httpClient) - if err != nil { - return nil, err - } - return &cs, nil -} - -// NewForConfigOrDie creates a new Clientset for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *Clientset { - cs, err := NewForConfig(c) - if err != nil { - panic(err) - } - return cs -} - -// New creates a new Clientset for the given RESTClient. -func New(c rest.Interface) *Clientset { - var cs Clientset - cs.oauthV1alpha1 = oauthv1alpha1.New(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClient(c) - return &cs -} diff --git a/generated/latest/client/supervisor/virtual/clientset/versioned/doc.go b/generated/latest/client/supervisor/virtual/clientset/versioned/doc.go deleted file mode 100644 index 5dc02e6e..00000000 --- a/generated/latest/client/supervisor/virtual/clientset/versioned/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated clientset. -package versioned diff --git a/generated/latest/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go b/generated/latest/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go deleted file mode 100644 index a0552547..00000000 --- a/generated/latest/client/supervisor/virtual/clientset/versioned/fake/clientset_generated.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - clientset "go.pinniped.dev/generated/latest/client/supervisor/virtual/clientset/versioned" - oauthv1alpha1 "go.pinniped.dev/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" - fakeoauthv1alpha1 "go.pinniped.dev/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/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" -) - -// NewSimpleClientset returns a clientset that will respond with the provided objects. -// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, -// without applying any validations and/or defaults. It shouldn't be considered a replacement -// for a real clientset and is mostly useful in simple unit tests. -func NewSimpleClientset(objects ...runtime.Object) *Clientset { - o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) - for _, obj := range objects { - if err := o.Add(obj); err != nil { - panic(err) - } - } - - cs := &Clientset{tracker: o} - cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} - cs.AddReactor("*", "*", testing.ObjectReaction(o)) - cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { - gvr := action.GetResource() - ns := action.GetNamespace() - watch, err := o.Watch(gvr, ns) - if err != nil { - return false, nil, err - } - return true, watch, nil - }) - - return cs -} - -// Clientset implements clientset.Interface. Meant to be embedded into a -// struct to get a default implementation. This makes faking out just the method -// you want to test easier. -type Clientset struct { - testing.Fake - discovery *fakediscovery.FakeDiscovery - tracker testing.ObjectTracker -} - -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - return c.discovery -} - -func (c *Clientset) Tracker() testing.ObjectTracker { - return c.tracker -} - -var ( - _ clientset.Interface = &Clientset{} - _ testing.FakeClient = &Clientset{} -) - -// OauthV1alpha1 retrieves the OauthV1alpha1Client -func (c *Clientset) OauthV1alpha1() oauthv1alpha1.OauthV1alpha1Interface { - return &fakeoauthv1alpha1.FakeOauthV1alpha1{Fake: &c.Fake} -} diff --git a/generated/latest/client/supervisor/virtual/clientset/versioned/fake/doc.go b/generated/latest/client/supervisor/virtual/clientset/versioned/fake/doc.go deleted file mode 100644 index 7c9538fd..00000000 --- a/generated/latest/client/supervisor/virtual/clientset/versioned/fake/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated fake clientset. -package fake diff --git a/generated/latest/client/supervisor/virtual/clientset/versioned/fake/register.go b/generated/latest/client/supervisor/virtual/clientset/versioned/fake/register.go deleted file mode 100644 index 895e8126..00000000 --- a/generated/latest/client/supervisor/virtual/clientset/versioned/fake/register.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - oauthv1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/virtual/oauth/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" -) - -var scheme = runtime.NewScheme() -var codecs = serializer.NewCodecFactory(scheme) - -var localSchemeBuilder = runtime.SchemeBuilder{ - oauthv1alpha1.AddToScheme, -} - -// AddToScheme adds all types of this clientset into the given scheme. This allows composition -// of clientsets, like in: -// -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) -// -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) -// -// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types -// correctly. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(scheme)) -} diff --git a/generated/latest/client/supervisor/virtual/clientset/versioned/scheme/doc.go b/generated/latest/client/supervisor/virtual/clientset/versioned/scheme/doc.go deleted file mode 100644 index cc02f1d3..00000000 --- a/generated/latest/client/supervisor/virtual/clientset/versioned/scheme/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// This package contains the scheme of the automatically generated clientset. -package scheme diff --git a/generated/latest/client/supervisor/virtual/clientset/versioned/scheme/register.go b/generated/latest/client/supervisor/virtual/clientset/versioned/scheme/register.go deleted file mode 100644 index a842d03d..00000000 --- a/generated/latest/client/supervisor/virtual/clientset/versioned/scheme/register.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package scheme - -import ( - oauthv1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/virtual/oauth/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" -) - -var Scheme = runtime.NewScheme() -var Codecs = serializer.NewCodecFactory(Scheme) -var ParameterCodec = runtime.NewParameterCodec(Scheme) -var localSchemeBuilder = runtime.SchemeBuilder{ - oauthv1alpha1.AddToScheme, -} - -// AddToScheme adds all types of this clientset into the given scheme. This allows composition -// of clientsets, like in: -// -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) -// -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) -// -// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types -// correctly. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(Scheme)) -} diff --git a/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go b/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go deleted file mode 100644 index e7a470b6..00000000 --- a/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1alpha1 diff --git a/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go b/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go deleted file mode 100644 index 7906901b..00000000 --- a/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go b/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go deleted file mode 100644 index c73da3da..00000000 --- a/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oauth_client.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - v1alpha1 "go.pinniped.dev/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1" - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" -) - -type FakeOauthV1alpha1 struct { - *testing.Fake -} - -func (c *FakeOauthV1alpha1) OIDCClientSecretRequests(namespace string) v1alpha1.OIDCClientSecretRequestInterface { - return &FakeOIDCClientSecretRequests{c, namespace} -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeOauthV1alpha1) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go b/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go deleted file mode 100644 index 8220bcc7..00000000 --- a/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/fake/fake_oidcclientsecretrequest.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - - v1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/virtual/oauth/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - schema "k8s.io/apimachinery/pkg/runtime/schema" - testing "k8s.io/client-go/testing" -) - -// FakeOIDCClientSecretRequests implements OIDCClientSecretRequestInterface -type FakeOIDCClientSecretRequests struct { - Fake *FakeOauthV1alpha1 - ns string -} - -var oidcclientsecretrequestsResource = schema.GroupVersionResource{Group: "oauth.virtual.supervisor.pinniped.dev", Version: "v1alpha1", Resource: "oidcclientsecretrequests"} - -var oidcclientsecretrequestsKind = schema.GroupVersionKind{Group: "oauth.virtual.supervisor.pinniped.dev", Version: "v1alpha1", Kind: "OIDCClientSecretRequest"} - -// Create takes the representation of a oIDCClientSecretRequest and creates it. Returns the server's representation of the oIDCClientSecretRequest, and an error, if there is any. -func (c *FakeOIDCClientSecretRequests) Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (result *v1alpha1.OIDCClientSecretRequest, err error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(oidcclientsecretrequestsResource, c.ns, oIDCClientSecretRequest), &v1alpha1.OIDCClientSecretRequest{}) - - if obj == nil { - return nil, err - } - return obj.(*v1alpha1.OIDCClientSecretRequest), err -} diff --git a/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go b/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go deleted file mode 100644 index 259bfbc9..00000000 --- a/generated/latest/client/supervisor/virtual/clientset/versioned/typed/oauth/v1alpha1/oidcclientsecretrequest.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - - v1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/virtual/oauth/v1alpha1" - scheme "go.pinniped.dev/generated/latest/client/supervisor/virtual/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - rest "k8s.io/client-go/rest" -) - -// OIDCClientSecretRequestsGetter has a method to return a OIDCClientSecretRequestInterface. -// A group's client should implement this interface. -type OIDCClientSecretRequestsGetter interface { - OIDCClientSecretRequests(namespace string) OIDCClientSecretRequestInterface -} - -// OIDCClientSecretRequestInterface has methods to work with OIDCClientSecretRequest resources. -type OIDCClientSecretRequestInterface interface { - Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (*v1alpha1.OIDCClientSecretRequest, error) - OIDCClientSecretRequestExpansion -} - -// oIDCClientSecretRequests implements OIDCClientSecretRequestInterface -type oIDCClientSecretRequests struct { - client rest.Interface - ns string -} - -// newOIDCClientSecretRequests returns a OIDCClientSecretRequests -func newOIDCClientSecretRequests(c *OauthV1alpha1Client, namespace string) *oIDCClientSecretRequests { - return &oIDCClientSecretRequests{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Create takes the representation of a oIDCClientSecretRequest and creates it. Returns the server's representation of the oIDCClientSecretRequest, and an error, if there is any. -func (c *oIDCClientSecretRequests) Create(ctx context.Context, oIDCClientSecretRequest *v1alpha1.OIDCClientSecretRequest, opts v1.CreateOptions) (result *v1alpha1.OIDCClientSecretRequest, err error) { - result = &v1alpha1.OIDCClientSecretRequest{} - err = c.client.Post(). - Namespace(c.ns). - Resource("oidcclientsecretrequests"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(oIDCClientSecretRequest). - Do(ctx). - Into(result) - return -} diff --git a/hack/lib/update-codegen.sh b/hack/lib/update-codegen.sh index 81f27cf2..a290645a 100755 --- a/hack/lib/update-codegen.sh +++ b/hack/lib/update-codegen.sh @@ -123,7 +123,7 @@ echo "generating API-related code for our public API groups..." "deepcopy" \ "${BASE_PKG}/generated/${KUBE_MINOR_VERSION}/apis" \ "${BASE_PKG}/generated/${KUBE_MINOR_VERSION}/apis" \ - "supervisor/config:v1alpha1 supervisor/idp:v1alpha1 supervisor/oauth:v1alpha1 supervisor/virtual/oauth:v1alpha1 concierge/config:v1alpha1 concierge/authentication:v1alpha1 concierge/login:v1alpha1 concierge/identity:v1alpha1" \ + "supervisor/config:v1alpha1 supervisor/idp:v1alpha1 supervisor/clientsecret:v1alpha1 concierge/config:v1alpha1 concierge/authentication:v1alpha1 concierge/login:v1alpha1 concierge/identity:v1alpha1" \ --go-header-file "${ROOT}/hack/boilerplate.go.txt" -v "$debug_level" 2>&1 | sed "s|^|gen-api > |" ) @@ -135,7 +135,7 @@ echo "generating API-related code for our internal API groups..." "${BASE_PKG}/generated/${KUBE_MINOR_VERSION}/client/concierge" \ "${BASE_PKG}/generated/${KUBE_MINOR_VERSION}/apis" \ "${BASE_PKG}/generated/${KUBE_MINOR_VERSION}/apis" \ - "concierge/login:v1alpha1 concierge/identity:v1alpha1 supervisor/virtual/oauth:v1alpha1" \ + "concierge/login:v1alpha1 concierge/identity:v1alpha1 supervisor/clientsecret:v1alpha1" \ --go-header-file "${ROOT}/hack/boilerplate.go.txt" -v "$debug_level" 2>&1 | sed "s|^|gen-int-api > |" ) @@ -159,18 +159,9 @@ echo "generating client code for our public API groups..." "client,lister,informer" \ "${BASE_PKG}/generated/${KUBE_MINOR_VERSION}/client/supervisor" \ "${BASE_PKG}/generated/${KUBE_MINOR_VERSION}/apis" \ - "supervisor/config:v1alpha1 supervisor/idp:v1alpha1 supervisor/oauth:v1alpha1" \ + "supervisor/config:v1alpha1 supervisor/idp:v1alpha1 supervisor/clientsecret:v1alpha1" \ --go-header-file "${ROOT}/hack/boilerplate.go.txt" -v "$debug_level" 2>&1 | sed "s|^|gen-client > |" ) -(cd client && - bash "${GOPATH}/src/k8s.io/code-generator/generate-groups.sh" \ - "client,lister,informer" \ - "${BASE_PKG}/generated/${KUBE_MINOR_VERSION}/client/supervisor/virtual" \ - "${BASE_PKG}/generated/${KUBE_MINOR_VERSION}/apis" \ - "supervisor/virtual/oauth:v1alpha1" \ - --go-header-file "${ROOT}/hack/boilerplate.go.txt" -v "$debug_level" 2>&1 | sed "s|^|gen-client > |" -) - # Tidy up the .../client module echo "tidying ${OUTPUT_DIR}/client/go.mod..." @@ -189,7 +180,6 @@ crd-ref-docs \ (cd apis && controller-gen paths=./supervisor/config/v1alpha1 crd output:crd:artifacts:config=../crds && controller-gen paths=./supervisor/idp/v1alpha1 crd output:crd:artifacts:config=../crds && - controller-gen paths=./supervisor/oauth/v1alpha1 crd output:crd:artifacts:config=../crds && controller-gen paths=./concierge/config/v1alpha1 crd output:crd:artifacts:config=../crds && controller-gen paths=./concierge/authentication/v1alpha1 crd output:crd:artifacts:config=../crds ) diff --git a/internal/groupsuffix/groupdata.go b/internal/groupsuffix/groupdata.go index b2c20e1e..14e3fb11 100644 --- a/internal/groupsuffix/groupdata.go +++ b/internal/groupsuffix/groupdata.go @@ -8,7 +8,7 @@ import ( identityv1alpha1 "go.pinniped.dev/generated/latest/apis/concierge/identity/v1alpha1" loginv1alpha1 "go.pinniped.dev/generated/latest/apis/concierge/login/v1alpha1" - oauthv1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/virtual/oauth/v1alpha1" + clientsecretv1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/clientsecret/v1alpha1" ) type GroupData schema.GroupVersion @@ -34,15 +34,15 @@ func ConciergeAggregatedGroups(apiGroupSuffix string) (login, identity GroupData } } -func SupervisorAggregatedGroups(apiGroupSuffix string) (oauth GroupData) { - oauthVirtualSupervisorAPIGroup, ok1 := Replace(oauthv1alpha1.GroupName, apiGroupSuffix) +func SupervisorAggregatedGroups(apiGroupSuffix string) (clientSecret GroupData) { + clientSecretVirtualSupervisorAPIGroup, ok1 := Replace(clientsecretv1alpha1.GroupName, apiGroupSuffix) if !ok1 { panic("static group input is invalid") } return GroupData{ - Group: oauthVirtualSupervisorAPIGroup, - Version: oauthv1alpha1.SchemeGroupVersion.Version, + Group: clientSecretVirtualSupervisorAPIGroup, + Version: clientsecretv1alpha1.SchemeGroupVersion.Version, } } diff --git a/internal/kubeclient/kubeclient.go b/internal/kubeclient/kubeclient.go index 6a9d4eb5..98d0b7f6 100644 --- a/internal/kubeclient/kubeclient.go +++ b/internal/kubeclient/kubeclient.go @@ -23,17 +23,14 @@ import ( pinnipedconciergeclientsetscheme "go.pinniped.dev/generated/latest/client/concierge/clientset/versioned/scheme" pinnipedsupervisorclientset "go.pinniped.dev/generated/latest/client/supervisor/clientset/versioned" pinnipedsupervisorclientsetscheme "go.pinniped.dev/generated/latest/client/supervisor/clientset/versioned/scheme" - pinnipedsupervisorvirtualclientset "go.pinniped.dev/generated/latest/client/supervisor/virtual/clientset/versioned" - pinnipedsupervisorvirtualclientsetscheme "go.pinniped.dev/generated/latest/client/supervisor/virtual/clientset/versioned/scheme" "go.pinniped.dev/internal/crypto/ptls" ) type Client struct { - Kubernetes kubernetes.Interface - Aggregation aggregatorclient.Interface - PinnipedConcierge pinnipedconciergeclientset.Interface - PinnipedSupervisor pinnipedsupervisorclientset.Interface - PinnipedSupervisorVirtual pinnipedsupervisorvirtualclientset.Interface + Kubernetes kubernetes.Interface + Aggregation aggregatorclient.Interface + PinnipedConcierge pinnipedconciergeclientset.Interface + PinnipedSupervisor pinnipedsupervisorclientset.Interface JSONConfig, ProtoConfig *restclient.Config } @@ -93,17 +90,11 @@ func New(opts ...Option) (*Client, error) { return nil, fmt.Errorf("could not initialize pinniped client: %w", err) } - // Connect to the pinniped supervisor aggregated API. - pinnipedSupervisorVirtualClient, err := pinnipedsupervisorvirtualclientset.NewForConfig(configWithWrapper(jsonKubeConfig, pinnipedsupervisorvirtualclientsetscheme.Scheme, pinnipedsupervisorvirtualclientsetscheme.Codecs, c.middlewares, c.transportWrapper)) - if err != nil { - return nil, fmt.Errorf("could not initialize pinniped client: %w", err) - } return &Client{ - Kubernetes: k8sClient, - Aggregation: aggregatorClient, - PinnipedConcierge: pinnipedConciergeClient, - PinnipedSupervisor: pinnipedSupervisorClient, - PinnipedSupervisorVirtual: pinnipedSupervisorVirtualClient, + Kubernetes: k8sClient, + Aggregation: aggregatorClient, + PinnipedConcierge: pinnipedConciergeClient, + PinnipedSupervisor: pinnipedSupervisorClient, JSONConfig: jsonKubeConfig, ProtoConfig: protoKubeConfig, diff --git a/internal/registry/clientsecretrequest/rest.go b/internal/registry/clientsecretrequest/rest.go index cf01c18d..70a7eb07 100644 --- a/internal/registry/clientsecretrequest/rest.go +++ b/internal/registry/clientsecretrequest/rest.go @@ -14,7 +14,7 @@ import ( "k8s.io/apiserver/pkg/registry/rest" "k8s.io/utils/trace" - oauthapi "go.pinniped.dev/generated/latest/apis/supervisor/virtual/oauth" + clientsecretapi "go.pinniped.dev/generated/latest/apis/supervisor/clientsecret" ) func NewREST() *REST { @@ -33,7 +33,7 @@ var _ interface { } = (*REST)(nil) func (*REST) New() runtime.Object { - return &oauthapi.OIDCClientSecretRequest{} + return &clientsecretapi.OIDCClientSecretRequest{} } func (*REST) NamespaceScoped() bool { @@ -57,16 +57,16 @@ func (r *REST) Create(ctx context.Context, obj runtime.Object, createValidation return nil, err } - return &oauthapi.OIDCClientSecretRequest{ - Status: oauthapi.OIDCClientSecretRequestStatus{ + return &clientsecretapi.OIDCClientSecretRequest{ + Status: clientsecretapi.OIDCClientSecretRequestStatus{ GeneratedSecret: "not-a-real-secret", TotalClientSecrets: 20, }, }, nil } -func validateRequest(obj runtime.Object, t *trace.Trace) (*oauthapi.OIDCClientSecretRequest, error) { - clientSecretRequest, ok := obj.(*oauthapi.OIDCClientSecretRequest) +func validateRequest(obj runtime.Object, t *trace.Trace) (*clientsecretapi.OIDCClientSecretRequest, error) { + clientSecretRequest, ok := obj.(*clientsecretapi.OIDCClientSecretRequest) if !ok { traceValidationFailure(t, "not an OIDCClientSecretRequest") return nil, apierrors.NewBadRequest(fmt.Sprintf("not an OIDCClientSecretRequest: %#v", obj)) diff --git a/internal/supervisor/scheme/scheme.go b/internal/supervisor/scheme/scheme.go index 6179040e..d977d012 100644 --- a/internal/supervisor/scheme/scheme.go +++ b/internal/supervisor/scheme/scheme.go @@ -8,8 +8,8 @@ package scheme import ( "fmt" - oauthapi "go.pinniped.dev/generated/latest/apis/supervisor/virtual/oauth" - oauthv1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/virtual/oauth/v1alpha1" + clientsecretapi "go.pinniped.dev/generated/latest/apis/supervisor/clientsecret" + clientsecretv1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/clientsecret/v1alpha1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" @@ -31,21 +31,21 @@ func New(apiGroupSuffix string) (_ *runtime.Scheme, oauth schema.GroupVersion) { // nothing fancy is required if using the standard group suffix if apiGroupSuffix == groupsuffix.PinnipedDefaultSuffix { schemeBuilder := runtime.NewSchemeBuilder( - oauthv1alpha1.AddToScheme, - oauthapi.AddToScheme, + clientsecretv1alpha1.AddToScheme, + clientsecretapi.AddToScheme, ) utilruntime.Must(schemeBuilder.AddToScheme(scheme)) - return scheme, oauthv1alpha1.SchemeGroupVersion + return scheme, clientsecretv1alpha1.SchemeGroupVersion } oauthVirtualSupervisorGroupData := groupsuffix.SupervisorAggregatedGroups(apiGroupSuffix) - addToSchemeAtNewGroup(scheme, oauthv1alpha1.GroupName, oauthVirtualSupervisorGroupData.Group, oauthv1alpha1.AddToScheme, oauthapi.AddToScheme) + addToSchemeAtNewGroup(scheme, clientsecretv1alpha1.GroupName, oauthVirtualSupervisorGroupData.Group, clientsecretv1alpha1.AddToScheme, clientsecretapi.AddToScheme) // manually register conversions and defaulting into the correct scheme since we cannot directly call AddToScheme schemeBuilder := runtime.NewSchemeBuilder( - oauthv1alpha1.RegisterConversions, - oauthv1alpha1.RegisterDefaults, + clientsecretv1alpha1.RegisterConversions, + clientsecretv1alpha1.RegisterDefaults, ) utilruntime.Must(schemeBuilder.AddToScheme(scheme)) @@ -53,9 +53,9 @@ func New(apiGroupSuffix string) (_ *runtime.Scheme, oauth schema.GroupVersion) { // today, but we may have some in the future. Calling AddTypeDefaultingFunc overwrites // any previously registered defaulting function. Thus to make sure that we catch // a situation where we add a defaulting func, we attempt to call it here with a nil - // *oauthv1alpha1.OIDCClientSecretRequest. This will do nothing when there is no + // *clientsecretv1alpha1.OIDCClientSecretRequest. This will do nothing when there is no // defaulting func registered, but it will almost certainly panic if one is added. - scheme.Default((*oauthv1alpha1.OIDCClientSecretRequest)(nil)) + scheme.Default((*clientsecretv1alpha1.OIDCClientSecretRequest)(nil)) return scheme, schema.GroupVersion(oauthVirtualSupervisorGroupData) } diff --git a/internal/supervisor/scheme/scheme_test.go b/internal/supervisor/scheme/scheme_test.go index 80d1e1f8..fa860773 100644 --- a/internal/supervisor/scheme/scheme_test.go +++ b/internal/supervisor/scheme/scheme_test.go @@ -12,28 +12,28 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - oauthapi "go.pinniped.dev/generated/latest/apis/supervisor/virtual/oauth" - oauthv1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/virtual/oauth/v1alpha1" + clientsecretapi "go.pinniped.dev/generated/latest/apis/supervisor/clientsecret" + clientsecretv1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/clientsecret/v1alpha1" ) func TestNew(t *testing.T) { // the standard group - regularOAuthGV := schema.GroupVersion{ - Group: "oauth.virtual.supervisor.pinniped.dev", + regularClientSecretGV := schema.GroupVersion{ + Group: "clientsecret.supervisor.pinniped.dev", Version: "v1alpha1", } - regularOAuthGVInternal := schema.GroupVersion{ - Group: "oauth.virtual.supervisor.pinniped.dev", + regularClientSecretGVInternal := schema.GroupVersion{ + Group: "clientsecret.supervisor.pinniped.dev", Version: runtime.APIVersionInternal, } // the canonical other group - otherOAuthGV := schema.GroupVersion{ - Group: "oauth.virtual.supervisor.walrus.tld", + otherClientSecretGV := schema.GroupVersion{ + Group: "clientsecret.supervisor.walrus.tld", Version: "v1alpha1", } - otherOAuthGVInternal := schema.GroupVersion{ - Group: "oauth.virtual.supervisor.walrus.tld", + otherClientSecretGVInternal := schema.GroupVersion{ + Group: "clientsecret.supervisor.walrus.tld", Version: runtime.APIVersionInternal, } @@ -55,19 +55,19 @@ func TestNew(t *testing.T) { want: map[schema.GroupVersionKind]reflect.Type{ // all the types that are in the aggregated API group - regularOAuthGV.WithKind("OIDCClientSecretRequest"): reflect.TypeOf(&oauthv1alpha1.OIDCClientSecretRequest{}).Elem(), + regularClientSecretGV.WithKind("OIDCClientSecretRequest"): reflect.TypeOf(&clientsecretv1alpha1.OIDCClientSecretRequest{}).Elem(), - regularOAuthGVInternal.WithKind("OIDCClientSecretRequest"): reflect.TypeOf(&oauthapi.OIDCClientSecretRequest{}).Elem(), + regularClientSecretGVInternal.WithKind("OIDCClientSecretRequest"): reflect.TypeOf(&clientsecretapi.OIDCClientSecretRequest{}).Elem(), - regularOAuthGV.WithKind("CreateOptions"): reflect.TypeOf(&metav1.CreateOptions{}).Elem(), - regularOAuthGV.WithKind("DeleteOptions"): reflect.TypeOf(&metav1.DeleteOptions{}).Elem(), - regularOAuthGV.WithKind("GetOptions"): reflect.TypeOf(&metav1.GetOptions{}).Elem(), - regularOAuthGV.WithKind("ListOptions"): reflect.TypeOf(&metav1.ListOptions{}).Elem(), - regularOAuthGV.WithKind("PatchOptions"): reflect.TypeOf(&metav1.PatchOptions{}).Elem(), - regularOAuthGV.WithKind("UpdateOptions"): reflect.TypeOf(&metav1.UpdateOptions{}).Elem(), - regularOAuthGV.WithKind("WatchEvent"): reflect.TypeOf(&metav1.WatchEvent{}).Elem(), + regularClientSecretGV.WithKind("CreateOptions"): reflect.TypeOf(&metav1.CreateOptions{}).Elem(), + regularClientSecretGV.WithKind("DeleteOptions"): reflect.TypeOf(&metav1.DeleteOptions{}).Elem(), + regularClientSecretGV.WithKind("GetOptions"): reflect.TypeOf(&metav1.GetOptions{}).Elem(), + regularClientSecretGV.WithKind("ListOptions"): reflect.TypeOf(&metav1.ListOptions{}).Elem(), + regularClientSecretGV.WithKind("PatchOptions"): reflect.TypeOf(&metav1.PatchOptions{}).Elem(), + regularClientSecretGV.WithKind("UpdateOptions"): reflect.TypeOf(&metav1.UpdateOptions{}).Elem(), + regularClientSecretGV.WithKind("WatchEvent"): reflect.TypeOf(&metav1.WatchEvent{}).Elem(), - regularOAuthGVInternal.WithKind("WatchEvent"): reflect.TypeOf(&metav1.InternalEvent{}).Elem(), + regularClientSecretGVInternal.WithKind("WatchEvent"): reflect.TypeOf(&metav1.InternalEvent{}).Elem(), // the types below this line do not really matter to us because they are in the core group @@ -86,7 +86,7 @@ func TestNew(t *testing.T) { metav1.Unversioned.WithKind("UpdateOptions"): reflect.TypeOf(&metav1.UpdateOptions{}).Elem(), metav1.Unversioned.WithKind("WatchEvent"): reflect.TypeOf(&metav1.WatchEvent{}).Elem(), }, - wantOAuthGroupVersion: regularOAuthGV, + wantOAuthGroupVersion: regularClientSecretGV, }, { name: "other api group", @@ -94,19 +94,19 @@ func TestNew(t *testing.T) { want: map[schema.GroupVersionKind]reflect.Type{ // all the types that are in the aggregated API group - otherOAuthGV.WithKind("OIDCClientSecretRequest"): reflect.TypeOf(&oauthv1alpha1.OIDCClientSecretRequest{}).Elem(), + otherClientSecretGV.WithKind("OIDCClientSecretRequest"): reflect.TypeOf(&clientsecretv1alpha1.OIDCClientSecretRequest{}).Elem(), - otherOAuthGVInternal.WithKind("OIDCClientSecretRequest"): reflect.TypeOf(&oauthapi.OIDCClientSecretRequest{}).Elem(), + otherClientSecretGVInternal.WithKind("OIDCClientSecretRequest"): reflect.TypeOf(&clientsecretapi.OIDCClientSecretRequest{}).Elem(), - otherOAuthGV.WithKind("CreateOptions"): reflect.TypeOf(&metav1.CreateOptions{}).Elem(), - otherOAuthGV.WithKind("DeleteOptions"): reflect.TypeOf(&metav1.DeleteOptions{}).Elem(), - otherOAuthGV.WithKind("GetOptions"): reflect.TypeOf(&metav1.GetOptions{}).Elem(), - otherOAuthGV.WithKind("ListOptions"): reflect.TypeOf(&metav1.ListOptions{}).Elem(), - otherOAuthGV.WithKind("PatchOptions"): reflect.TypeOf(&metav1.PatchOptions{}).Elem(), - otherOAuthGV.WithKind("UpdateOptions"): reflect.TypeOf(&metav1.UpdateOptions{}).Elem(), - otherOAuthGV.WithKind("WatchEvent"): reflect.TypeOf(&metav1.WatchEvent{}).Elem(), + otherClientSecretGV.WithKind("CreateOptions"): reflect.TypeOf(&metav1.CreateOptions{}).Elem(), + otherClientSecretGV.WithKind("DeleteOptions"): reflect.TypeOf(&metav1.DeleteOptions{}).Elem(), + otherClientSecretGV.WithKind("GetOptions"): reflect.TypeOf(&metav1.GetOptions{}).Elem(), + otherClientSecretGV.WithKind("ListOptions"): reflect.TypeOf(&metav1.ListOptions{}).Elem(), + otherClientSecretGV.WithKind("PatchOptions"): reflect.TypeOf(&metav1.PatchOptions{}).Elem(), + otherClientSecretGV.WithKind("UpdateOptions"): reflect.TypeOf(&metav1.UpdateOptions{}).Elem(), + otherClientSecretGV.WithKind("WatchEvent"): reflect.TypeOf(&metav1.WatchEvent{}).Elem(), - otherOAuthGVInternal.WithKind("WatchEvent"): reflect.TypeOf(&metav1.InternalEvent{}).Elem(), + otherClientSecretGVInternal.WithKind("WatchEvent"): reflect.TypeOf(&metav1.InternalEvent{}).Elem(), // the types below this line do not really matter to us because they are in the core group @@ -125,7 +125,7 @@ func TestNew(t *testing.T) { metav1.Unversioned.WithKind("UpdateOptions"): reflect.TypeOf(&metav1.UpdateOptions{}).Elem(), metav1.Unversioned.WithKind("WatchEvent"): reflect.TypeOf(&metav1.WatchEvent{}).Elem(), }, - wantOAuthGroupVersion: otherOAuthGV, + wantOAuthGroupVersion: otherClientSecretGV, }, } for _, tt := range tests { diff --git a/test/integration/kube_api_discovery_test.go b/test/integration/kube_api_discovery_test.go index 835dcf0a..9c3b9602 100644 --- a/test/integration/kube_api_discovery_test.go +++ b/test/integration/kube_api_discovery_test.go @@ -53,8 +53,7 @@ func TestGetAPIResourceList(t *testing.T) { configConciergeGV := makeGV("config", "concierge") idpSupervisorGV := makeGV("idp", "supervisor") configSupervisorGV := makeGV("config", "supervisor") - oauthSupervisorGV := makeGV("oauth", "supervisor") - oauthVirtualSupervisorGV := makeGV("oauth.virtual", "supervisor") + oauthVirtualSupervisorGV := makeGV("clientsecret", "supervisor") tests := []struct { group metav1.APIGroup @@ -168,25 +167,6 @@ func TestGetAPIResourceList(t *testing.T) { Kind: "FederationDomain", Verbs: []string{"get", "patch", "update"}, }, - }, - }, - }, - { - group: metav1.APIGroup{ - Name: oauthSupervisorGV.Group, - Versions: []metav1.GroupVersionForDiscovery{ - { - GroupVersion: oauthSupervisorGV.String(), - Version: oauthSupervisorGV.Version, - }, - }, - PreferredVersion: metav1.GroupVersionForDiscovery{ - GroupVersion: oauthSupervisorGV.String(), - Version: oauthSupervisorGV.Version, - }, - }, - resourceByVersion: map[string][]metav1.APIResource{ - oauthSupervisorGV.String(): { { Name: "oidcclients", SingularName: "oidcclient", @@ -550,7 +530,7 @@ func TestCRDAdditionalPrinterColumns_Parallel(t *testing.T) { {Name: "Age", Type: "date", JSONPath: ".metadata.creationTimestamp"}, }, }, - addSuffix("oidcclients.oauth.supervisor"): { + addSuffix("oidcclients.config.supervisor"): { "v1alpha1": []apiextensionsv1.CustomResourceColumnDefinition{ {Name: "Age", Type: "date", JSONPath: ".metadata.creationTimestamp"}, }, diff --git a/test/integration/supervisor_oidcclientsecret_test.go b/test/integration/supervisor_oidcclientsecret_test.go index 9133f0c7..8e41b0ff 100644 --- a/test/integration/supervisor_oidcclientsecret_test.go +++ b/test/integration/supervisor_oidcclientsecret_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/require" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "go.pinniped.dev/generated/latest/apis/supervisor/virtual/oauth/v1alpha1" + "go.pinniped.dev/generated/latest/apis/supervisor/clientsecret/v1alpha1" "go.pinniped.dev/test/testlib" ) @@ -21,9 +21,9 @@ func TestOIDCClientSecretRequest_HappyPath_Parallel(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), time.Minute) defer cancel() - client := testlib.NewVirtualSupervisorClientset(t) + client := testlib.NewSupervisorClientset(t) - response, err := client.OauthV1alpha1().OIDCClientSecretRequests(env.SupervisorNamespace).Create(ctx, + response, err := client.ClientsecretV1alpha1().OIDCClientSecretRequests(env.SupervisorNamespace).Create(ctx, &v1alpha1.OIDCClientSecretRequest{ Spec: v1alpha1.OIDCClientSecretRequestSpec{ GenerateNewSecret: true, @@ -41,9 +41,9 @@ func TestOIDCClientSecretRequest_Unauthenticated_Parallel(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), time.Minute) defer cancel() - client := testlib.NewAnonymousVirtualSupervisorClientset(t) + client := testlib.NewAnonymousSupervisorClientset(t) - _, err := client.OauthV1alpha1().OIDCClientSecretRequests(env.SupervisorNamespace).Create(ctx, + _, err := client.ClientsecretV1alpha1().OIDCClientSecretRequests(env.SupervisorNamespace).Create(ctx, &v1alpha1.OIDCClientSecretRequest{ Spec: v1alpha1.OIDCClientSecretRequestSpec{ GenerateNewSecret: true, diff --git a/test/testlib/client.go b/test/testlib/client.go index 376e1462..b395d6fe 100644 --- a/test/testlib/client.go +++ b/test/testlib/client.go @@ -34,7 +34,6 @@ import ( idpv1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/idp/v1alpha1" conciergeclientset "go.pinniped.dev/generated/latest/client/concierge/clientset/versioned" supervisorclientset "go.pinniped.dev/generated/latest/client/supervisor/clientset/versioned" - virtualsupervisorclientset "go.pinniped.dev/generated/latest/client/supervisor/virtual/clientset/versioned" "go.pinniped.dev/internal/groupsuffix" "go.pinniped.dev/internal/kubeclient" @@ -87,16 +86,10 @@ func NewSupervisorClientset(t *testing.T) supervisorclientset.Interface { return NewKubeclient(t, NewClientConfig(t)).PinnipedSupervisor } -func NewAnonymousVirtualSupervisorClientset(t *testing.T) virtualsupervisorclientset.Interface { +func NewAnonymousSupervisorClientset(t *testing.T) supervisorclientset.Interface { t.Helper() - return NewKubeclient(t, NewAnonymousClientRestConfig(t)).PinnipedSupervisorVirtual -} - -func NewVirtualSupervisorClientset(t *testing.T) virtualsupervisorclientset.Interface { - t.Helper() - - return NewKubeclient(t, NewClientConfig(t)).PinnipedSupervisorVirtual + return NewKubeclient(t, NewAnonymousClientRestConfig(t)).PinnipedSupervisor } func NewConciergeClientset(t *testing.T) conciergeclientset.Interface { From c117329553aa278691802cf15e27d3f6ced1a4e9 Mon Sep 17 00:00:00 2001 From: Margo Crawford Date: Wed, 15 Jun 2022 09:38:21 -0700 Subject: [PATCH 07/11] Updates based on code review Signed-off-by: Margo Crawford --- apis/supervisor/clientsecret/register.go.tmpl | 1 + .../types_oidcclientsecretrequest.go.tmpl | 27 +++++++++-- .../clientsecret/v1alpha1/register.go.tmpl | 1 + .../types_oidcclientsecretrequest.go.tmpl | 8 ++++ generated/1.17/README.adoc | 48 +++++++++++++++++-- .../apis/supervisor/clientsecret/register.go | 1 + .../types_oidcclientsecretrequest.go | 27 +++++++++-- .../clientsecret/v1alpha1/register.go | 1 + .../v1alpha1/types_oidcclientsecretrequest.go | 8 ++++ .../v1alpha1/zz_generated.conversion.go | 34 +++++++++++++ .../v1alpha1/zz_generated.deepcopy.go | 33 +++++++++++++ .../clientsecret/zz_generated.deepcopy.go | 33 +++++++++++++ generated/1.18/README.adoc | 48 +++++++++++++++++-- .../apis/supervisor/clientsecret/register.go | 1 + .../types_oidcclientsecretrequest.go | 27 +++++++++-- .../clientsecret/v1alpha1/register.go | 1 + .../v1alpha1/types_oidcclientsecretrequest.go | 8 ++++ .../v1alpha1/zz_generated.conversion.go | 34 +++++++++++++ .../v1alpha1/zz_generated.deepcopy.go | 33 +++++++++++++ .../clientsecret/zz_generated.deepcopy.go | 33 +++++++++++++ generated/1.19/README.adoc | 48 +++++++++++++++++-- .../apis/supervisor/clientsecret/register.go | 1 + .../types_oidcclientsecretrequest.go | 27 +++++++++-- .../clientsecret/v1alpha1/register.go | 1 + .../v1alpha1/types_oidcclientsecretrequest.go | 8 ++++ .../v1alpha1/zz_generated.conversion.go | 34 +++++++++++++ .../v1alpha1/zz_generated.deepcopy.go | 33 +++++++++++++ .../clientsecret/zz_generated.deepcopy.go | 33 +++++++++++++ generated/1.20/README.adoc | 48 +++++++++++++++++-- .../apis/supervisor/clientsecret/register.go | 1 + .../types_oidcclientsecretrequest.go | 27 +++++++++-- .../clientsecret/v1alpha1/register.go | 1 + .../v1alpha1/types_oidcclientsecretrequest.go | 8 ++++ .../v1alpha1/zz_generated.conversion.go | 34 +++++++++++++ .../v1alpha1/zz_generated.deepcopy.go | 33 +++++++++++++ .../clientsecret/zz_generated.deepcopy.go | 33 +++++++++++++ generated/1.21/README.adoc | 48 +++++++++++++++++-- .../apis/supervisor/clientsecret/register.go | 1 + .../types_oidcclientsecretrequest.go | 27 +++++++++-- .../clientsecret/v1alpha1/register.go | 1 + .../v1alpha1/types_oidcclientsecretrequest.go | 8 ++++ .../v1alpha1/zz_generated.conversion.go | 34 +++++++++++++ .../v1alpha1/zz_generated.deepcopy.go | 33 +++++++++++++ .../clientsecret/zz_generated.deepcopy.go | 33 +++++++++++++ generated/1.22/README.adoc | 48 +++++++++++++++++-- .../apis/supervisor/clientsecret/register.go | 1 + .../types_oidcclientsecretrequest.go | 27 +++++++++-- .../clientsecret/v1alpha1/register.go | 1 + .../v1alpha1/types_oidcclientsecretrequest.go | 8 ++++ .../v1alpha1/zz_generated.conversion.go | 34 +++++++++++++ .../v1alpha1/zz_generated.deepcopy.go | 33 +++++++++++++ .../clientsecret/zz_generated.deepcopy.go | 33 +++++++++++++ generated/1.23/README.adoc | 48 +++++++++++++++++-- .../apis/supervisor/clientsecret/register.go | 1 + .../types_oidcclientsecretrequest.go | 27 +++++++++-- .../clientsecret/v1alpha1/register.go | 1 + .../v1alpha1/types_oidcclientsecretrequest.go | 8 ++++ .../v1alpha1/zz_generated.conversion.go | 34 +++++++++++++ .../v1alpha1/zz_generated.deepcopy.go | 33 +++++++++++++ .../clientsecret/zz_generated.deepcopy.go | 33 +++++++++++++ generated/1.24/README.adoc | 48 +++++++++++++++++-- .../apis/supervisor/clientsecret/register.go | 1 + .../types_oidcclientsecretrequest.go | 27 +++++++++-- .../clientsecret/v1alpha1/register.go | 1 + .../v1alpha1/types_oidcclientsecretrequest.go | 8 ++++ .../v1alpha1/zz_generated.conversion.go | 34 +++++++++++++ .../v1alpha1/zz_generated.deepcopy.go | 33 +++++++++++++ .../clientsecret/zz_generated.deepcopy.go | 33 +++++++++++++ .../apis/supervisor/clientsecret/register.go | 1 + .../types_oidcclientsecretrequest.go | 27 +++++++++-- .../clientsecret/v1alpha1/register.go | 1 + .../v1alpha1/types_oidcclientsecretrequest.go | 8 ++++ .../v1alpha1/zz_generated.conversion.go | 34 +++++++++++++ .../v1alpha1/zz_generated.deepcopy.go | 33 +++++++++++++ .../clientsecret/zz_generated.deepcopy.go | 33 +++++++++++++ internal/config/supervisor/config.go | 26 ++++++++++ internal/config/supervisor/config_test.go | 30 ++++++++++-- internal/config/supervisor/types.go | 9 ++-- internal/registry/clientsecretrequest/rest.go | 32 +++++++++++-- internal/supervisor/apiserver/apiserver.go | 6 +-- internal/supervisor/scheme/scheme.go | 6 +-- internal/supervisor/scheme/scheme_test.go | 28 ++++++----- internal/supervisor/server/server.go | 39 +++++++-------- test/integration/kube_api_discovery_test.go | 23 ++++----- 84 files changed, 1729 insertions(+), 124 deletions(-) diff --git a/apis/supervisor/clientsecret/register.go.tmpl b/apis/supervisor/clientsecret/register.go.tmpl index 4a1c0173..8a76f0fe 100644 --- a/apis/supervisor/clientsecret/register.go.tmpl +++ b/apis/supervisor/clientsecret/register.go.tmpl @@ -32,6 +32,7 @@ var ( func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &OIDCClientSecretRequest{}, + &OIDCClientSecretRequestList{}, ) return nil } diff --git a/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go.tmpl b/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go.tmpl index 7fd1eb65..c7ef37b2 100644 --- a/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go.tmpl +++ b/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go.tmpl @@ -6,15 +6,26 @@ package clientsecret import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" type OIDCClientSecretRequestSpec struct { + // Request a new client secret to for the OIDCClient referenced by the metadata.name field. GenerateNewSecret bool `json:"generateNewSecret"` - RevokeOldSecrets bool `json:"revokeOldSecrets"` + + // Revoke the old client secrets associated with the OIDCClient referenced by the metadata.name + // field. + RevokeOldSecrets bool `json:"revokeOldSecrets"` } type OIDCClientSecretRequestStatus struct { - GeneratedSecret string `json:"generatedSecret,omitempty"` - TotalClientSecrets int `json:"totalClientSecrets"` + // The unencrypted OIDC Client Secret. This will only be shared upon creation and cannot + // be recovered if you lose it. + GeneratedSecret string `json:"generatedSecret,omitempty"` + + // The total number of client secrets associated with the OIDCClient referenced by the + // metadata.name field. + TotalClientSecrets int `json:"totalClientSecrets"` } +// OIDCClientSecretRequest can be used to update the client secrets associated with an +// OIDCClient. // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object type OIDCClientSecretRequest struct { metav1.TypeMeta `json:",inline"` @@ -23,3 +34,13 @@ type OIDCClientSecretRequest struct { Spec OIDCClientSecretRequestSpec `json:"spec"` Status OIDCClientSecretRequestStatus `json:"status"` } + +// OIDCClientSecretList is a list of OIDCClientSecretRequest objects. +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequestList struct { + metav1.TypeMeta + metav1.ListMeta + + // Items is a list of OIDCClientSecretRequest + Items []OIDCClientSecretRequest +} diff --git a/apis/supervisor/clientsecret/v1alpha1/register.go.tmpl b/apis/supervisor/clientsecret/v1alpha1/register.go.tmpl index 49602125..4660e407 100644 --- a/apis/supervisor/clientsecret/v1alpha1/register.go.tmpl +++ b/apis/supervisor/clientsecret/v1alpha1/register.go.tmpl @@ -31,6 +31,7 @@ func init() { func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &OIDCClientSecretRequest{}, + &OIDCClientSecretRequestList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go.tmpl b/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go.tmpl index dda2f3bb..ef48e6c0 100644 --- a/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go.tmpl +++ b/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go.tmpl @@ -26,3 +26,11 @@ type OIDCClientSecretRequest struct { Spec OIDCClientSecretRequestSpec `json:"spec"` Status OIDCClientSecretRequestStatus `json:"status"` } + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequestList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + + Items []OIDCClientSecretRequest `json:"items"` +} diff --git a/generated/1.17/README.adoc b/generated/1.17/README.adoc index 739a669e..b3957510 100644 --- a/generated/1.17/README.adoc +++ b/generated/1.17/README.adoc @@ -219,6 +219,26 @@ Package clientsecret is the internal version of the Pinniped client secret API. +[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-clientsecret-oidcclientsecretrequest"] +==== OIDCClientSecretRequest + +OIDCClientSecretRequest can be used to update the client secrets associated with an OIDCClient. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-clientsecret-oidcclientsecretrequestlist[$$OIDCClientSecretRequestList$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#objectmeta-v1-meta[$$ObjectMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. + +| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-clientsecret-oidcclientsecretrequestspec[$$OIDCClientSecretRequestSpec$$]__ | +| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-clientsecret-oidcclientsecretrequeststatus[$$OIDCClientSecretRequestStatus$$]__ | +|=== + + [id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-clientsecret-oidcclientsecretrequestspec"] @@ -234,8 +254,8 @@ Package clientsecret is the internal version of the Pinniped client secret API. [cols="25a,75a", options="header"] |=== | Field | Description -| *`generateNewSecret`* __boolean__ | -| *`revokeOldSecrets`* __boolean__ | +| *`generateNewSecret`* __boolean__ | Request a new client secret to for the OIDCClient referenced by the metadata.name field. +| *`revokeOldSecrets`* __boolean__ | Revoke the old client secrets associated with the OIDCClient referenced by the metadata.name field. |=== @@ -252,8 +272,8 @@ Package clientsecret is the internal version of the Pinniped client secret API. [cols="25a,75a", options="header"] |=== | Field | Description -| *`generatedSecret`* __string__ | -| *`totalClientSecrets`* __integer__ | +| *`generatedSecret`* __string__ | The unencrypted OIDC Client Secret. This will only be shared upon creation and cannot be recovered if you lose it. +| *`totalClientSecrets`* __integer__ | The total number of client secrets associated with the OIDCClient referenced by the metadata.name field. |=== @@ -265,6 +285,26 @@ Package v1alpha1 is the v1alpha1 version of the Pinniped client secret API. +[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequest"] +==== OIDCClientSecretRequest + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequestlist[$$OIDCClientSecretRequestList$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#objectmeta-v1-meta[$$ObjectMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. + +| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequestspec[$$OIDCClientSecretRequestSpec$$]__ | +| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequeststatus[$$OIDCClientSecretRequestStatus$$]__ | +|=== + + [id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequestspec"] diff --git a/generated/1.17/apis/supervisor/clientsecret/register.go b/generated/1.17/apis/supervisor/clientsecret/register.go index 4a1c0173..8a76f0fe 100644 --- a/generated/1.17/apis/supervisor/clientsecret/register.go +++ b/generated/1.17/apis/supervisor/clientsecret/register.go @@ -32,6 +32,7 @@ var ( func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &OIDCClientSecretRequest{}, + &OIDCClientSecretRequestList{}, ) return nil } diff --git a/generated/1.17/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go b/generated/1.17/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go index 7fd1eb65..c7ef37b2 100644 --- a/generated/1.17/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go +++ b/generated/1.17/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go @@ -6,15 +6,26 @@ package clientsecret import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" type OIDCClientSecretRequestSpec struct { + // Request a new client secret to for the OIDCClient referenced by the metadata.name field. GenerateNewSecret bool `json:"generateNewSecret"` - RevokeOldSecrets bool `json:"revokeOldSecrets"` + + // Revoke the old client secrets associated with the OIDCClient referenced by the metadata.name + // field. + RevokeOldSecrets bool `json:"revokeOldSecrets"` } type OIDCClientSecretRequestStatus struct { - GeneratedSecret string `json:"generatedSecret,omitempty"` - TotalClientSecrets int `json:"totalClientSecrets"` + // The unencrypted OIDC Client Secret. This will only be shared upon creation and cannot + // be recovered if you lose it. + GeneratedSecret string `json:"generatedSecret,omitempty"` + + // The total number of client secrets associated with the OIDCClient referenced by the + // metadata.name field. + TotalClientSecrets int `json:"totalClientSecrets"` } +// OIDCClientSecretRequest can be used to update the client secrets associated with an +// OIDCClient. // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object type OIDCClientSecretRequest struct { metav1.TypeMeta `json:",inline"` @@ -23,3 +34,13 @@ type OIDCClientSecretRequest struct { Spec OIDCClientSecretRequestSpec `json:"spec"` Status OIDCClientSecretRequestStatus `json:"status"` } + +// OIDCClientSecretList is a list of OIDCClientSecretRequest objects. +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequestList struct { + metav1.TypeMeta + metav1.ListMeta + + // Items is a list of OIDCClientSecretRequest + Items []OIDCClientSecretRequest +} diff --git a/generated/1.17/apis/supervisor/clientsecret/v1alpha1/register.go b/generated/1.17/apis/supervisor/clientsecret/v1alpha1/register.go index 49602125..4660e407 100644 --- a/generated/1.17/apis/supervisor/clientsecret/v1alpha1/register.go +++ b/generated/1.17/apis/supervisor/clientsecret/v1alpha1/register.go @@ -31,6 +31,7 @@ func init() { func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &OIDCClientSecretRequest{}, + &OIDCClientSecretRequestList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/generated/1.17/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go b/generated/1.17/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go index dda2f3bb..ef48e6c0 100644 --- a/generated/1.17/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go +++ b/generated/1.17/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go @@ -26,3 +26,11 @@ type OIDCClientSecretRequest struct { Spec OIDCClientSecretRequestSpec `json:"spec"` Status OIDCClientSecretRequestStatus `json:"status"` } + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequestList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + + Items []OIDCClientSecretRequest `json:"items"` +} diff --git a/generated/1.17/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go b/generated/1.17/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go index c559d1c2..7f29beb6 100644 --- a/generated/1.17/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go +++ b/generated/1.17/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go @@ -9,6 +9,8 @@ package v1alpha1 import ( + unsafe "unsafe" + clientsecret "go.pinniped.dev/generated/1.17/apis/supervisor/clientsecret" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" @@ -31,6 +33,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestList)(nil), (*clientsecret.OIDCClientSecretRequestList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList(a.(*OIDCClientSecretRequestList), b.(*clientsecret.OIDCClientSecretRequestList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientsecret.OIDCClientSecretRequestList)(nil), (*OIDCClientSecretRequestList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList(a.(*clientsecret.OIDCClientSecretRequestList), b.(*OIDCClientSecretRequestList), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestSpec)(nil), (*clientsecret.OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(a.(*OIDCClientSecretRequestSpec), b.(*clientsecret.OIDCClientSecretRequestSpec), scope) }); err != nil { @@ -86,6 +98,28 @@ func Convert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRe return autoConvert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in, out, s) } +func autoConvert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList(in *OIDCClientSecretRequestList, out *clientsecret.OIDCClientSecretRequestList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]clientsecret.OIDCClientSecretRequest)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList(in *OIDCClientSecretRequestList, out *clientsecret.OIDCClientSecretRequestList, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList(in, out, s) +} + +func autoConvert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList(in *clientsecret.OIDCClientSecretRequestList, out *OIDCClientSecretRequestList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]OIDCClientSecretRequest)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList is an autogenerated conversion function. +func Convert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList(in *clientsecret.OIDCClientSecretRequestList, out *OIDCClientSecretRequestList, s conversion.Scope) error { + return autoConvert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList(in, out, s) +} + func autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *clientsecret.OIDCClientSecretRequestSpec, s conversion.Scope) error { out.GenerateNewSecret = in.GenerateNewSecret out.RevokeOldSecrets = in.RevokeOldSecrets diff --git a/generated/1.17/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go b/generated/1.17/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go index e4fce842..781e9831 100644 --- a/generated/1.17/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go +++ b/generated/1.17/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go @@ -40,6 +40,39 @@ func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestList) DeepCopyInto(out *OIDCClientSecretRequestList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OIDCClientSecretRequest, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestList. +func (in *OIDCClientSecretRequestList) DeepCopy() *OIDCClientSecretRequestList { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequestList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { *out = *in diff --git a/generated/1.17/apis/supervisor/clientsecret/zz_generated.deepcopy.go b/generated/1.17/apis/supervisor/clientsecret/zz_generated.deepcopy.go index e0dc7d68..ffd5e96e 100644 --- a/generated/1.17/apis/supervisor/clientsecret/zz_generated.deepcopy.go +++ b/generated/1.17/apis/supervisor/clientsecret/zz_generated.deepcopy.go @@ -40,6 +40,39 @@ func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestList) DeepCopyInto(out *OIDCClientSecretRequestList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OIDCClientSecretRequest, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestList. +func (in *OIDCClientSecretRequestList) DeepCopy() *OIDCClientSecretRequestList { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequestList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { *out = *in diff --git a/generated/1.18/README.adoc b/generated/1.18/README.adoc index 21512761..c16afbfc 100644 --- a/generated/1.18/README.adoc +++ b/generated/1.18/README.adoc @@ -219,6 +219,26 @@ Package clientsecret is the internal version of the Pinniped client secret API. +[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-clientsecret-oidcclientsecretrequest"] +==== OIDCClientSecretRequest + +OIDCClientSecretRequest can be used to update the client secrets associated with an OIDCClient. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-clientsecret-oidcclientsecretrequestlist[$$OIDCClientSecretRequestList$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#objectmeta-v1-meta[$$ObjectMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. + +| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-clientsecret-oidcclientsecretrequestspec[$$OIDCClientSecretRequestSpec$$]__ | +| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-clientsecret-oidcclientsecretrequeststatus[$$OIDCClientSecretRequestStatus$$]__ | +|=== + + [id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-clientsecret-oidcclientsecretrequestspec"] @@ -234,8 +254,8 @@ Package clientsecret is the internal version of the Pinniped client secret API. [cols="25a,75a", options="header"] |=== | Field | Description -| *`generateNewSecret`* __boolean__ | -| *`revokeOldSecrets`* __boolean__ | +| *`generateNewSecret`* __boolean__ | Request a new client secret to for the OIDCClient referenced by the metadata.name field. +| *`revokeOldSecrets`* __boolean__ | Revoke the old client secrets associated with the OIDCClient referenced by the metadata.name field. |=== @@ -252,8 +272,8 @@ Package clientsecret is the internal version of the Pinniped client secret API. [cols="25a,75a", options="header"] |=== | Field | Description -| *`generatedSecret`* __string__ | -| *`totalClientSecrets`* __integer__ | +| *`generatedSecret`* __string__ | The unencrypted OIDC Client Secret. This will only be shared upon creation and cannot be recovered if you lose it. +| *`totalClientSecrets`* __integer__ | The total number of client secrets associated with the OIDCClient referenced by the metadata.name field. |=== @@ -265,6 +285,26 @@ Package v1alpha1 is the v1alpha1 version of the Pinniped client secret API. +[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequest"] +==== OIDCClientSecretRequest + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequestlist[$$OIDCClientSecretRequestList$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#objectmeta-v1-meta[$$ObjectMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. + +| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequestspec[$$OIDCClientSecretRequestSpec$$]__ | +| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequeststatus[$$OIDCClientSecretRequestStatus$$]__ | +|=== + + [id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequestspec"] diff --git a/generated/1.18/apis/supervisor/clientsecret/register.go b/generated/1.18/apis/supervisor/clientsecret/register.go index 4a1c0173..8a76f0fe 100644 --- a/generated/1.18/apis/supervisor/clientsecret/register.go +++ b/generated/1.18/apis/supervisor/clientsecret/register.go @@ -32,6 +32,7 @@ var ( func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &OIDCClientSecretRequest{}, + &OIDCClientSecretRequestList{}, ) return nil } diff --git a/generated/1.18/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go b/generated/1.18/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go index 7fd1eb65..c7ef37b2 100644 --- a/generated/1.18/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go +++ b/generated/1.18/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go @@ -6,15 +6,26 @@ package clientsecret import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" type OIDCClientSecretRequestSpec struct { + // Request a new client secret to for the OIDCClient referenced by the metadata.name field. GenerateNewSecret bool `json:"generateNewSecret"` - RevokeOldSecrets bool `json:"revokeOldSecrets"` + + // Revoke the old client secrets associated with the OIDCClient referenced by the metadata.name + // field. + RevokeOldSecrets bool `json:"revokeOldSecrets"` } type OIDCClientSecretRequestStatus struct { - GeneratedSecret string `json:"generatedSecret,omitempty"` - TotalClientSecrets int `json:"totalClientSecrets"` + // The unencrypted OIDC Client Secret. This will only be shared upon creation and cannot + // be recovered if you lose it. + GeneratedSecret string `json:"generatedSecret,omitempty"` + + // The total number of client secrets associated with the OIDCClient referenced by the + // metadata.name field. + TotalClientSecrets int `json:"totalClientSecrets"` } +// OIDCClientSecretRequest can be used to update the client secrets associated with an +// OIDCClient. // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object type OIDCClientSecretRequest struct { metav1.TypeMeta `json:",inline"` @@ -23,3 +34,13 @@ type OIDCClientSecretRequest struct { Spec OIDCClientSecretRequestSpec `json:"spec"` Status OIDCClientSecretRequestStatus `json:"status"` } + +// OIDCClientSecretList is a list of OIDCClientSecretRequest objects. +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequestList struct { + metav1.TypeMeta + metav1.ListMeta + + // Items is a list of OIDCClientSecretRequest + Items []OIDCClientSecretRequest +} diff --git a/generated/1.18/apis/supervisor/clientsecret/v1alpha1/register.go b/generated/1.18/apis/supervisor/clientsecret/v1alpha1/register.go index 49602125..4660e407 100644 --- a/generated/1.18/apis/supervisor/clientsecret/v1alpha1/register.go +++ b/generated/1.18/apis/supervisor/clientsecret/v1alpha1/register.go @@ -31,6 +31,7 @@ func init() { func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &OIDCClientSecretRequest{}, + &OIDCClientSecretRequestList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/generated/1.18/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go b/generated/1.18/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go index dda2f3bb..ef48e6c0 100644 --- a/generated/1.18/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go +++ b/generated/1.18/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go @@ -26,3 +26,11 @@ type OIDCClientSecretRequest struct { Spec OIDCClientSecretRequestSpec `json:"spec"` Status OIDCClientSecretRequestStatus `json:"status"` } + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequestList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + + Items []OIDCClientSecretRequest `json:"items"` +} diff --git a/generated/1.18/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go b/generated/1.18/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go index 990c4deb..0ced8135 100644 --- a/generated/1.18/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go +++ b/generated/1.18/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go @@ -9,6 +9,8 @@ package v1alpha1 import ( + unsafe "unsafe" + clientsecret "go.pinniped.dev/generated/1.18/apis/supervisor/clientsecret" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" @@ -31,6 +33,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestList)(nil), (*clientsecret.OIDCClientSecretRequestList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList(a.(*OIDCClientSecretRequestList), b.(*clientsecret.OIDCClientSecretRequestList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientsecret.OIDCClientSecretRequestList)(nil), (*OIDCClientSecretRequestList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList(a.(*clientsecret.OIDCClientSecretRequestList), b.(*OIDCClientSecretRequestList), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestSpec)(nil), (*clientsecret.OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(a.(*OIDCClientSecretRequestSpec), b.(*clientsecret.OIDCClientSecretRequestSpec), scope) }); err != nil { @@ -86,6 +98,28 @@ func Convert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRe return autoConvert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in, out, s) } +func autoConvert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList(in *OIDCClientSecretRequestList, out *clientsecret.OIDCClientSecretRequestList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]clientsecret.OIDCClientSecretRequest)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList(in *OIDCClientSecretRequestList, out *clientsecret.OIDCClientSecretRequestList, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList(in, out, s) +} + +func autoConvert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList(in *clientsecret.OIDCClientSecretRequestList, out *OIDCClientSecretRequestList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]OIDCClientSecretRequest)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList is an autogenerated conversion function. +func Convert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList(in *clientsecret.OIDCClientSecretRequestList, out *OIDCClientSecretRequestList, s conversion.Scope) error { + return autoConvert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList(in, out, s) +} + func autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *clientsecret.OIDCClientSecretRequestSpec, s conversion.Scope) error { out.GenerateNewSecret = in.GenerateNewSecret out.RevokeOldSecrets = in.RevokeOldSecrets diff --git a/generated/1.18/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go b/generated/1.18/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go index e4fce842..781e9831 100644 --- a/generated/1.18/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go +++ b/generated/1.18/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go @@ -40,6 +40,39 @@ func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestList) DeepCopyInto(out *OIDCClientSecretRequestList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OIDCClientSecretRequest, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestList. +func (in *OIDCClientSecretRequestList) DeepCopy() *OIDCClientSecretRequestList { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequestList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { *out = *in diff --git a/generated/1.18/apis/supervisor/clientsecret/zz_generated.deepcopy.go b/generated/1.18/apis/supervisor/clientsecret/zz_generated.deepcopy.go index e0dc7d68..ffd5e96e 100644 --- a/generated/1.18/apis/supervisor/clientsecret/zz_generated.deepcopy.go +++ b/generated/1.18/apis/supervisor/clientsecret/zz_generated.deepcopy.go @@ -40,6 +40,39 @@ func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestList) DeepCopyInto(out *OIDCClientSecretRequestList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OIDCClientSecretRequest, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestList. +func (in *OIDCClientSecretRequestList) DeepCopy() *OIDCClientSecretRequestList { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequestList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { *out = *in diff --git a/generated/1.19/README.adoc b/generated/1.19/README.adoc index bdba4347..cacb5f67 100644 --- a/generated/1.19/README.adoc +++ b/generated/1.19/README.adoc @@ -219,6 +219,26 @@ Package clientsecret is the internal version of the Pinniped client secret API. +[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-clientsecret-oidcclientsecretrequest"] +==== OIDCClientSecretRequest + +OIDCClientSecretRequest can be used to update the client secrets associated with an OIDCClient. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-clientsecret-oidcclientsecretrequestlist[$$OIDCClientSecretRequestList$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#objectmeta-v1-meta[$$ObjectMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. + +| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-clientsecret-oidcclientsecretrequestspec[$$OIDCClientSecretRequestSpec$$]__ | +| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-clientsecret-oidcclientsecretrequeststatus[$$OIDCClientSecretRequestStatus$$]__ | +|=== + + [id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-clientsecret-oidcclientsecretrequestspec"] @@ -234,8 +254,8 @@ Package clientsecret is the internal version of the Pinniped client secret API. [cols="25a,75a", options="header"] |=== | Field | Description -| *`generateNewSecret`* __boolean__ | -| *`revokeOldSecrets`* __boolean__ | +| *`generateNewSecret`* __boolean__ | Request a new client secret to for the OIDCClient referenced by the metadata.name field. +| *`revokeOldSecrets`* __boolean__ | Revoke the old client secrets associated with the OIDCClient referenced by the metadata.name field. |=== @@ -252,8 +272,8 @@ Package clientsecret is the internal version of the Pinniped client secret API. [cols="25a,75a", options="header"] |=== | Field | Description -| *`generatedSecret`* __string__ | -| *`totalClientSecrets`* __integer__ | +| *`generatedSecret`* __string__ | The unencrypted OIDC Client Secret. This will only be shared upon creation and cannot be recovered if you lose it. +| *`totalClientSecrets`* __integer__ | The total number of client secrets associated with the OIDCClient referenced by the metadata.name field. |=== @@ -265,6 +285,26 @@ Package v1alpha1 is the v1alpha1 version of the Pinniped client secret API. +[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequest"] +==== OIDCClientSecretRequest + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequestlist[$$OIDCClientSecretRequestList$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#objectmeta-v1-meta[$$ObjectMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. + +| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequestspec[$$OIDCClientSecretRequestSpec$$]__ | +| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequeststatus[$$OIDCClientSecretRequestStatus$$]__ | +|=== + + [id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequestspec"] diff --git a/generated/1.19/apis/supervisor/clientsecret/register.go b/generated/1.19/apis/supervisor/clientsecret/register.go index 4a1c0173..8a76f0fe 100644 --- a/generated/1.19/apis/supervisor/clientsecret/register.go +++ b/generated/1.19/apis/supervisor/clientsecret/register.go @@ -32,6 +32,7 @@ var ( func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &OIDCClientSecretRequest{}, + &OIDCClientSecretRequestList{}, ) return nil } diff --git a/generated/1.19/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go b/generated/1.19/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go index 7fd1eb65..c7ef37b2 100644 --- a/generated/1.19/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go +++ b/generated/1.19/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go @@ -6,15 +6,26 @@ package clientsecret import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" type OIDCClientSecretRequestSpec struct { + // Request a new client secret to for the OIDCClient referenced by the metadata.name field. GenerateNewSecret bool `json:"generateNewSecret"` - RevokeOldSecrets bool `json:"revokeOldSecrets"` + + // Revoke the old client secrets associated with the OIDCClient referenced by the metadata.name + // field. + RevokeOldSecrets bool `json:"revokeOldSecrets"` } type OIDCClientSecretRequestStatus struct { - GeneratedSecret string `json:"generatedSecret,omitempty"` - TotalClientSecrets int `json:"totalClientSecrets"` + // The unencrypted OIDC Client Secret. This will only be shared upon creation and cannot + // be recovered if you lose it. + GeneratedSecret string `json:"generatedSecret,omitempty"` + + // The total number of client secrets associated with the OIDCClient referenced by the + // metadata.name field. + TotalClientSecrets int `json:"totalClientSecrets"` } +// OIDCClientSecretRequest can be used to update the client secrets associated with an +// OIDCClient. // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object type OIDCClientSecretRequest struct { metav1.TypeMeta `json:",inline"` @@ -23,3 +34,13 @@ type OIDCClientSecretRequest struct { Spec OIDCClientSecretRequestSpec `json:"spec"` Status OIDCClientSecretRequestStatus `json:"status"` } + +// OIDCClientSecretList is a list of OIDCClientSecretRequest objects. +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequestList struct { + metav1.TypeMeta + metav1.ListMeta + + // Items is a list of OIDCClientSecretRequest + Items []OIDCClientSecretRequest +} diff --git a/generated/1.19/apis/supervisor/clientsecret/v1alpha1/register.go b/generated/1.19/apis/supervisor/clientsecret/v1alpha1/register.go index 49602125..4660e407 100644 --- a/generated/1.19/apis/supervisor/clientsecret/v1alpha1/register.go +++ b/generated/1.19/apis/supervisor/clientsecret/v1alpha1/register.go @@ -31,6 +31,7 @@ func init() { func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &OIDCClientSecretRequest{}, + &OIDCClientSecretRequestList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/generated/1.19/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go b/generated/1.19/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go index dda2f3bb..ef48e6c0 100644 --- a/generated/1.19/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go +++ b/generated/1.19/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go @@ -26,3 +26,11 @@ type OIDCClientSecretRequest struct { Spec OIDCClientSecretRequestSpec `json:"spec"` Status OIDCClientSecretRequestStatus `json:"status"` } + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequestList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + + Items []OIDCClientSecretRequest `json:"items"` +} diff --git a/generated/1.19/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go b/generated/1.19/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go index bf34cde1..c9c13bee 100644 --- a/generated/1.19/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go +++ b/generated/1.19/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go @@ -9,6 +9,8 @@ package v1alpha1 import ( + unsafe "unsafe" + clientsecret "go.pinniped.dev/generated/1.19/apis/supervisor/clientsecret" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" @@ -31,6 +33,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestList)(nil), (*clientsecret.OIDCClientSecretRequestList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList(a.(*OIDCClientSecretRequestList), b.(*clientsecret.OIDCClientSecretRequestList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientsecret.OIDCClientSecretRequestList)(nil), (*OIDCClientSecretRequestList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList(a.(*clientsecret.OIDCClientSecretRequestList), b.(*OIDCClientSecretRequestList), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestSpec)(nil), (*clientsecret.OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(a.(*OIDCClientSecretRequestSpec), b.(*clientsecret.OIDCClientSecretRequestSpec), scope) }); err != nil { @@ -86,6 +98,28 @@ func Convert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRe return autoConvert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in, out, s) } +func autoConvert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList(in *OIDCClientSecretRequestList, out *clientsecret.OIDCClientSecretRequestList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]clientsecret.OIDCClientSecretRequest)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList(in *OIDCClientSecretRequestList, out *clientsecret.OIDCClientSecretRequestList, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList(in, out, s) +} + +func autoConvert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList(in *clientsecret.OIDCClientSecretRequestList, out *OIDCClientSecretRequestList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]OIDCClientSecretRequest)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList is an autogenerated conversion function. +func Convert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList(in *clientsecret.OIDCClientSecretRequestList, out *OIDCClientSecretRequestList, s conversion.Scope) error { + return autoConvert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList(in, out, s) +} + func autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *clientsecret.OIDCClientSecretRequestSpec, s conversion.Scope) error { out.GenerateNewSecret = in.GenerateNewSecret out.RevokeOldSecrets = in.RevokeOldSecrets diff --git a/generated/1.19/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go b/generated/1.19/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go index e4fce842..781e9831 100644 --- a/generated/1.19/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go +++ b/generated/1.19/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go @@ -40,6 +40,39 @@ func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestList) DeepCopyInto(out *OIDCClientSecretRequestList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OIDCClientSecretRequest, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestList. +func (in *OIDCClientSecretRequestList) DeepCopy() *OIDCClientSecretRequestList { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequestList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { *out = *in diff --git a/generated/1.19/apis/supervisor/clientsecret/zz_generated.deepcopy.go b/generated/1.19/apis/supervisor/clientsecret/zz_generated.deepcopy.go index e0dc7d68..ffd5e96e 100644 --- a/generated/1.19/apis/supervisor/clientsecret/zz_generated.deepcopy.go +++ b/generated/1.19/apis/supervisor/clientsecret/zz_generated.deepcopy.go @@ -40,6 +40,39 @@ func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestList) DeepCopyInto(out *OIDCClientSecretRequestList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OIDCClientSecretRequest, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestList. +func (in *OIDCClientSecretRequestList) DeepCopy() *OIDCClientSecretRequestList { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequestList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { *out = *in diff --git a/generated/1.20/README.adoc b/generated/1.20/README.adoc index 958b952c..2483e34a 100644 --- a/generated/1.20/README.adoc +++ b/generated/1.20/README.adoc @@ -219,6 +219,26 @@ Package clientsecret is the internal version of the Pinniped client secret API. +[id="{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-clientsecret-oidcclientsecretrequest"] +==== OIDCClientSecretRequest + +OIDCClientSecretRequest can be used to update the client secrets associated with an OIDCClient. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-clientsecret-oidcclientsecretrequestlist[$$OIDCClientSecretRequestList$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.2/#objectmeta-v1-meta[$$ObjectMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. + +| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-clientsecret-oidcclientsecretrequestspec[$$OIDCClientSecretRequestSpec$$]__ | +| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-clientsecret-oidcclientsecretrequeststatus[$$OIDCClientSecretRequestStatus$$]__ | +|=== + + [id="{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-clientsecret-oidcclientsecretrequestspec"] @@ -234,8 +254,8 @@ Package clientsecret is the internal version of the Pinniped client secret API. [cols="25a,75a", options="header"] |=== | Field | Description -| *`generateNewSecret`* __boolean__ | -| *`revokeOldSecrets`* __boolean__ | +| *`generateNewSecret`* __boolean__ | Request a new client secret to for the OIDCClient referenced by the metadata.name field. +| *`revokeOldSecrets`* __boolean__ | Revoke the old client secrets associated with the OIDCClient referenced by the metadata.name field. |=== @@ -252,8 +272,8 @@ Package clientsecret is the internal version of the Pinniped client secret API. [cols="25a,75a", options="header"] |=== | Field | Description -| *`generatedSecret`* __string__ | -| *`totalClientSecrets`* __integer__ | +| *`generatedSecret`* __string__ | The unencrypted OIDC Client Secret. This will only be shared upon creation and cannot be recovered if you lose it. +| *`totalClientSecrets`* __integer__ | The total number of client secrets associated with the OIDCClient referenced by the metadata.name field. |=== @@ -265,6 +285,26 @@ Package v1alpha1 is the v1alpha1 version of the Pinniped client secret API. +[id="{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequest"] +==== OIDCClientSecretRequest + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequestlist[$$OIDCClientSecretRequestList$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.2/#objectmeta-v1-meta[$$ObjectMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. + +| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequestspec[$$OIDCClientSecretRequestSpec$$]__ | +| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequeststatus[$$OIDCClientSecretRequestStatus$$]__ | +|=== + + [id="{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequestspec"] diff --git a/generated/1.20/apis/supervisor/clientsecret/register.go b/generated/1.20/apis/supervisor/clientsecret/register.go index 4a1c0173..8a76f0fe 100644 --- a/generated/1.20/apis/supervisor/clientsecret/register.go +++ b/generated/1.20/apis/supervisor/clientsecret/register.go @@ -32,6 +32,7 @@ var ( func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &OIDCClientSecretRequest{}, + &OIDCClientSecretRequestList{}, ) return nil } diff --git a/generated/1.20/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go b/generated/1.20/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go index 7fd1eb65..c7ef37b2 100644 --- a/generated/1.20/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go +++ b/generated/1.20/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go @@ -6,15 +6,26 @@ package clientsecret import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" type OIDCClientSecretRequestSpec struct { + // Request a new client secret to for the OIDCClient referenced by the metadata.name field. GenerateNewSecret bool `json:"generateNewSecret"` - RevokeOldSecrets bool `json:"revokeOldSecrets"` + + // Revoke the old client secrets associated with the OIDCClient referenced by the metadata.name + // field. + RevokeOldSecrets bool `json:"revokeOldSecrets"` } type OIDCClientSecretRequestStatus struct { - GeneratedSecret string `json:"generatedSecret,omitempty"` - TotalClientSecrets int `json:"totalClientSecrets"` + // The unencrypted OIDC Client Secret. This will only be shared upon creation and cannot + // be recovered if you lose it. + GeneratedSecret string `json:"generatedSecret,omitempty"` + + // The total number of client secrets associated with the OIDCClient referenced by the + // metadata.name field. + TotalClientSecrets int `json:"totalClientSecrets"` } +// OIDCClientSecretRequest can be used to update the client secrets associated with an +// OIDCClient. // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object type OIDCClientSecretRequest struct { metav1.TypeMeta `json:",inline"` @@ -23,3 +34,13 @@ type OIDCClientSecretRequest struct { Spec OIDCClientSecretRequestSpec `json:"spec"` Status OIDCClientSecretRequestStatus `json:"status"` } + +// OIDCClientSecretList is a list of OIDCClientSecretRequest objects. +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequestList struct { + metav1.TypeMeta + metav1.ListMeta + + // Items is a list of OIDCClientSecretRequest + Items []OIDCClientSecretRequest +} diff --git a/generated/1.20/apis/supervisor/clientsecret/v1alpha1/register.go b/generated/1.20/apis/supervisor/clientsecret/v1alpha1/register.go index 49602125..4660e407 100644 --- a/generated/1.20/apis/supervisor/clientsecret/v1alpha1/register.go +++ b/generated/1.20/apis/supervisor/clientsecret/v1alpha1/register.go @@ -31,6 +31,7 @@ func init() { func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &OIDCClientSecretRequest{}, + &OIDCClientSecretRequestList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/generated/1.20/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go b/generated/1.20/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go index dda2f3bb..ef48e6c0 100644 --- a/generated/1.20/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go +++ b/generated/1.20/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go @@ -26,3 +26,11 @@ type OIDCClientSecretRequest struct { Spec OIDCClientSecretRequestSpec `json:"spec"` Status OIDCClientSecretRequestStatus `json:"status"` } + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequestList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + + Items []OIDCClientSecretRequest `json:"items"` +} diff --git a/generated/1.20/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go b/generated/1.20/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go index f33c9a56..0f9f7ed3 100644 --- a/generated/1.20/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go +++ b/generated/1.20/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go @@ -9,6 +9,8 @@ package v1alpha1 import ( + unsafe "unsafe" + clientsecret "go.pinniped.dev/generated/1.20/apis/supervisor/clientsecret" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" @@ -31,6 +33,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestList)(nil), (*clientsecret.OIDCClientSecretRequestList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList(a.(*OIDCClientSecretRequestList), b.(*clientsecret.OIDCClientSecretRequestList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientsecret.OIDCClientSecretRequestList)(nil), (*OIDCClientSecretRequestList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList(a.(*clientsecret.OIDCClientSecretRequestList), b.(*OIDCClientSecretRequestList), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestSpec)(nil), (*clientsecret.OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(a.(*OIDCClientSecretRequestSpec), b.(*clientsecret.OIDCClientSecretRequestSpec), scope) }); err != nil { @@ -86,6 +98,28 @@ func Convert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRe return autoConvert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in, out, s) } +func autoConvert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList(in *OIDCClientSecretRequestList, out *clientsecret.OIDCClientSecretRequestList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]clientsecret.OIDCClientSecretRequest)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList(in *OIDCClientSecretRequestList, out *clientsecret.OIDCClientSecretRequestList, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList(in, out, s) +} + +func autoConvert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList(in *clientsecret.OIDCClientSecretRequestList, out *OIDCClientSecretRequestList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]OIDCClientSecretRequest)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList is an autogenerated conversion function. +func Convert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList(in *clientsecret.OIDCClientSecretRequestList, out *OIDCClientSecretRequestList, s conversion.Scope) error { + return autoConvert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList(in, out, s) +} + func autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *clientsecret.OIDCClientSecretRequestSpec, s conversion.Scope) error { out.GenerateNewSecret = in.GenerateNewSecret out.RevokeOldSecrets = in.RevokeOldSecrets diff --git a/generated/1.20/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go b/generated/1.20/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go index e4fce842..781e9831 100644 --- a/generated/1.20/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go +++ b/generated/1.20/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go @@ -40,6 +40,39 @@ func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestList) DeepCopyInto(out *OIDCClientSecretRequestList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OIDCClientSecretRequest, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestList. +func (in *OIDCClientSecretRequestList) DeepCopy() *OIDCClientSecretRequestList { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequestList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { *out = *in diff --git a/generated/1.20/apis/supervisor/clientsecret/zz_generated.deepcopy.go b/generated/1.20/apis/supervisor/clientsecret/zz_generated.deepcopy.go index e0dc7d68..ffd5e96e 100644 --- a/generated/1.20/apis/supervisor/clientsecret/zz_generated.deepcopy.go +++ b/generated/1.20/apis/supervisor/clientsecret/zz_generated.deepcopy.go @@ -40,6 +40,39 @@ func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestList) DeepCopyInto(out *OIDCClientSecretRequestList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OIDCClientSecretRequest, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestList. +func (in *OIDCClientSecretRequestList) DeepCopy() *OIDCClientSecretRequestList { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequestList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { *out = *in diff --git a/generated/1.21/README.adoc b/generated/1.21/README.adoc index 9eb23eb5..57a7b10c 100644 --- a/generated/1.21/README.adoc +++ b/generated/1.21/README.adoc @@ -219,6 +219,26 @@ Package clientsecret is the internal version of the Pinniped client secret API. +[id="{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-clientsecret-oidcclientsecretrequest"] +==== OIDCClientSecretRequest + +OIDCClientSecretRequest can be used to update the client secrets associated with an OIDCClient. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-clientsecret-oidcclientsecretrequestlist[$$OIDCClientSecretRequestList$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#objectmeta-v1-meta[$$ObjectMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. + +| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-clientsecret-oidcclientsecretrequestspec[$$OIDCClientSecretRequestSpec$$]__ | +| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-clientsecret-oidcclientsecretrequeststatus[$$OIDCClientSecretRequestStatus$$]__ | +|=== + + [id="{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-clientsecret-oidcclientsecretrequestspec"] @@ -234,8 +254,8 @@ Package clientsecret is the internal version of the Pinniped client secret API. [cols="25a,75a", options="header"] |=== | Field | Description -| *`generateNewSecret`* __boolean__ | -| *`revokeOldSecrets`* __boolean__ | +| *`generateNewSecret`* __boolean__ | Request a new client secret to for the OIDCClient referenced by the metadata.name field. +| *`revokeOldSecrets`* __boolean__ | Revoke the old client secrets associated with the OIDCClient referenced by the metadata.name field. |=== @@ -252,8 +272,8 @@ Package clientsecret is the internal version of the Pinniped client secret API. [cols="25a,75a", options="header"] |=== | Field | Description -| *`generatedSecret`* __string__ | -| *`totalClientSecrets`* __integer__ | +| *`generatedSecret`* __string__ | The unencrypted OIDC Client Secret. This will only be shared upon creation and cannot be recovered if you lose it. +| *`totalClientSecrets`* __integer__ | The total number of client secrets associated with the OIDCClient referenced by the metadata.name field. |=== @@ -265,6 +285,26 @@ Package v1alpha1 is the v1alpha1 version of the Pinniped client secret API. +[id="{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequest"] +==== OIDCClientSecretRequest + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequestlist[$$OIDCClientSecretRequestList$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#objectmeta-v1-meta[$$ObjectMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. + +| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequestspec[$$OIDCClientSecretRequestSpec$$]__ | +| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequeststatus[$$OIDCClientSecretRequestStatus$$]__ | +|=== + + [id="{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequestspec"] diff --git a/generated/1.21/apis/supervisor/clientsecret/register.go b/generated/1.21/apis/supervisor/clientsecret/register.go index 4a1c0173..8a76f0fe 100644 --- a/generated/1.21/apis/supervisor/clientsecret/register.go +++ b/generated/1.21/apis/supervisor/clientsecret/register.go @@ -32,6 +32,7 @@ var ( func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &OIDCClientSecretRequest{}, + &OIDCClientSecretRequestList{}, ) return nil } diff --git a/generated/1.21/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go b/generated/1.21/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go index 7fd1eb65..c7ef37b2 100644 --- a/generated/1.21/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go +++ b/generated/1.21/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go @@ -6,15 +6,26 @@ package clientsecret import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" type OIDCClientSecretRequestSpec struct { + // Request a new client secret to for the OIDCClient referenced by the metadata.name field. GenerateNewSecret bool `json:"generateNewSecret"` - RevokeOldSecrets bool `json:"revokeOldSecrets"` + + // Revoke the old client secrets associated with the OIDCClient referenced by the metadata.name + // field. + RevokeOldSecrets bool `json:"revokeOldSecrets"` } type OIDCClientSecretRequestStatus struct { - GeneratedSecret string `json:"generatedSecret,omitempty"` - TotalClientSecrets int `json:"totalClientSecrets"` + // The unencrypted OIDC Client Secret. This will only be shared upon creation and cannot + // be recovered if you lose it. + GeneratedSecret string `json:"generatedSecret,omitempty"` + + // The total number of client secrets associated with the OIDCClient referenced by the + // metadata.name field. + TotalClientSecrets int `json:"totalClientSecrets"` } +// OIDCClientSecretRequest can be used to update the client secrets associated with an +// OIDCClient. // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object type OIDCClientSecretRequest struct { metav1.TypeMeta `json:",inline"` @@ -23,3 +34,13 @@ type OIDCClientSecretRequest struct { Spec OIDCClientSecretRequestSpec `json:"spec"` Status OIDCClientSecretRequestStatus `json:"status"` } + +// OIDCClientSecretList is a list of OIDCClientSecretRequest objects. +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequestList struct { + metav1.TypeMeta + metav1.ListMeta + + // Items is a list of OIDCClientSecretRequest + Items []OIDCClientSecretRequest +} diff --git a/generated/1.21/apis/supervisor/clientsecret/v1alpha1/register.go b/generated/1.21/apis/supervisor/clientsecret/v1alpha1/register.go index 49602125..4660e407 100644 --- a/generated/1.21/apis/supervisor/clientsecret/v1alpha1/register.go +++ b/generated/1.21/apis/supervisor/clientsecret/v1alpha1/register.go @@ -31,6 +31,7 @@ func init() { func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &OIDCClientSecretRequest{}, + &OIDCClientSecretRequestList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/generated/1.21/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go b/generated/1.21/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go index dda2f3bb..ef48e6c0 100644 --- a/generated/1.21/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go +++ b/generated/1.21/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go @@ -26,3 +26,11 @@ type OIDCClientSecretRequest struct { Spec OIDCClientSecretRequestSpec `json:"spec"` Status OIDCClientSecretRequestStatus `json:"status"` } + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequestList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + + Items []OIDCClientSecretRequest `json:"items"` +} diff --git a/generated/1.21/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go b/generated/1.21/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go index a5fbb3bb..f5aabafa 100644 --- a/generated/1.21/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go +++ b/generated/1.21/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go @@ -9,6 +9,8 @@ package v1alpha1 import ( + unsafe "unsafe" + clientsecret "go.pinniped.dev/generated/1.21/apis/supervisor/clientsecret" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" @@ -31,6 +33,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestList)(nil), (*clientsecret.OIDCClientSecretRequestList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList(a.(*OIDCClientSecretRequestList), b.(*clientsecret.OIDCClientSecretRequestList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientsecret.OIDCClientSecretRequestList)(nil), (*OIDCClientSecretRequestList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList(a.(*clientsecret.OIDCClientSecretRequestList), b.(*OIDCClientSecretRequestList), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestSpec)(nil), (*clientsecret.OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(a.(*OIDCClientSecretRequestSpec), b.(*clientsecret.OIDCClientSecretRequestSpec), scope) }); err != nil { @@ -86,6 +98,28 @@ func Convert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRe return autoConvert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in, out, s) } +func autoConvert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList(in *OIDCClientSecretRequestList, out *clientsecret.OIDCClientSecretRequestList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]clientsecret.OIDCClientSecretRequest)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList(in *OIDCClientSecretRequestList, out *clientsecret.OIDCClientSecretRequestList, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList(in, out, s) +} + +func autoConvert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList(in *clientsecret.OIDCClientSecretRequestList, out *OIDCClientSecretRequestList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]OIDCClientSecretRequest)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList is an autogenerated conversion function. +func Convert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList(in *clientsecret.OIDCClientSecretRequestList, out *OIDCClientSecretRequestList, s conversion.Scope) error { + return autoConvert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList(in, out, s) +} + func autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *clientsecret.OIDCClientSecretRequestSpec, s conversion.Scope) error { out.GenerateNewSecret = in.GenerateNewSecret out.RevokeOldSecrets = in.RevokeOldSecrets diff --git a/generated/1.21/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go b/generated/1.21/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go index e4fce842..781e9831 100644 --- a/generated/1.21/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go +++ b/generated/1.21/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go @@ -40,6 +40,39 @@ func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestList) DeepCopyInto(out *OIDCClientSecretRequestList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OIDCClientSecretRequest, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestList. +func (in *OIDCClientSecretRequestList) DeepCopy() *OIDCClientSecretRequestList { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequestList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { *out = *in diff --git a/generated/1.21/apis/supervisor/clientsecret/zz_generated.deepcopy.go b/generated/1.21/apis/supervisor/clientsecret/zz_generated.deepcopy.go index e0dc7d68..ffd5e96e 100644 --- a/generated/1.21/apis/supervisor/clientsecret/zz_generated.deepcopy.go +++ b/generated/1.21/apis/supervisor/clientsecret/zz_generated.deepcopy.go @@ -40,6 +40,39 @@ func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestList) DeepCopyInto(out *OIDCClientSecretRequestList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OIDCClientSecretRequest, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestList. +func (in *OIDCClientSecretRequestList) DeepCopy() *OIDCClientSecretRequestList { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequestList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { *out = *in diff --git a/generated/1.22/README.adoc b/generated/1.22/README.adoc index 0a4498b9..a51284cf 100644 --- a/generated/1.22/README.adoc +++ b/generated/1.22/README.adoc @@ -219,6 +219,26 @@ Package clientsecret is the internal version of the Pinniped client secret API. +[id="{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-clientsecret-oidcclientsecretrequest"] +==== OIDCClientSecretRequest + +OIDCClientSecretRequest can be used to update the client secrets associated with an OIDCClient. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-clientsecret-oidcclientsecretrequestlist[$$OIDCClientSecretRequestList$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.22/#objectmeta-v1-meta[$$ObjectMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. + +| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-clientsecret-oidcclientsecretrequestspec[$$OIDCClientSecretRequestSpec$$]__ | +| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-clientsecret-oidcclientsecretrequeststatus[$$OIDCClientSecretRequestStatus$$]__ | +|=== + + [id="{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-clientsecret-oidcclientsecretrequestspec"] @@ -234,8 +254,8 @@ Package clientsecret is the internal version of the Pinniped client secret API. [cols="25a,75a", options="header"] |=== | Field | Description -| *`generateNewSecret`* __boolean__ | -| *`revokeOldSecrets`* __boolean__ | +| *`generateNewSecret`* __boolean__ | Request a new client secret to for the OIDCClient referenced by the metadata.name field. +| *`revokeOldSecrets`* __boolean__ | Revoke the old client secrets associated with the OIDCClient referenced by the metadata.name field. |=== @@ -252,8 +272,8 @@ Package clientsecret is the internal version of the Pinniped client secret API. [cols="25a,75a", options="header"] |=== | Field | Description -| *`generatedSecret`* __string__ | -| *`totalClientSecrets`* __integer__ | +| *`generatedSecret`* __string__ | The unencrypted OIDC Client Secret. This will only be shared upon creation and cannot be recovered if you lose it. +| *`totalClientSecrets`* __integer__ | The total number of client secrets associated with the OIDCClient referenced by the metadata.name field. |=== @@ -265,6 +285,26 @@ Package v1alpha1 is the v1alpha1 version of the Pinniped client secret API. +[id="{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequest"] +==== OIDCClientSecretRequest + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequestlist[$$OIDCClientSecretRequestList$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.22/#objectmeta-v1-meta[$$ObjectMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. + +| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequestspec[$$OIDCClientSecretRequestSpec$$]__ | +| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequeststatus[$$OIDCClientSecretRequestStatus$$]__ | +|=== + + [id="{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequestspec"] diff --git a/generated/1.22/apis/supervisor/clientsecret/register.go b/generated/1.22/apis/supervisor/clientsecret/register.go index 4a1c0173..8a76f0fe 100644 --- a/generated/1.22/apis/supervisor/clientsecret/register.go +++ b/generated/1.22/apis/supervisor/clientsecret/register.go @@ -32,6 +32,7 @@ var ( func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &OIDCClientSecretRequest{}, + &OIDCClientSecretRequestList{}, ) return nil } diff --git a/generated/1.22/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go b/generated/1.22/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go index 7fd1eb65..c7ef37b2 100644 --- a/generated/1.22/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go +++ b/generated/1.22/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go @@ -6,15 +6,26 @@ package clientsecret import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" type OIDCClientSecretRequestSpec struct { + // Request a new client secret to for the OIDCClient referenced by the metadata.name field. GenerateNewSecret bool `json:"generateNewSecret"` - RevokeOldSecrets bool `json:"revokeOldSecrets"` + + // Revoke the old client secrets associated with the OIDCClient referenced by the metadata.name + // field. + RevokeOldSecrets bool `json:"revokeOldSecrets"` } type OIDCClientSecretRequestStatus struct { - GeneratedSecret string `json:"generatedSecret,omitempty"` - TotalClientSecrets int `json:"totalClientSecrets"` + // The unencrypted OIDC Client Secret. This will only be shared upon creation and cannot + // be recovered if you lose it. + GeneratedSecret string `json:"generatedSecret,omitempty"` + + // The total number of client secrets associated with the OIDCClient referenced by the + // metadata.name field. + TotalClientSecrets int `json:"totalClientSecrets"` } +// OIDCClientSecretRequest can be used to update the client secrets associated with an +// OIDCClient. // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object type OIDCClientSecretRequest struct { metav1.TypeMeta `json:",inline"` @@ -23,3 +34,13 @@ type OIDCClientSecretRequest struct { Spec OIDCClientSecretRequestSpec `json:"spec"` Status OIDCClientSecretRequestStatus `json:"status"` } + +// OIDCClientSecretList is a list of OIDCClientSecretRequest objects. +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequestList struct { + metav1.TypeMeta + metav1.ListMeta + + // Items is a list of OIDCClientSecretRequest + Items []OIDCClientSecretRequest +} diff --git a/generated/1.22/apis/supervisor/clientsecret/v1alpha1/register.go b/generated/1.22/apis/supervisor/clientsecret/v1alpha1/register.go index 49602125..4660e407 100644 --- a/generated/1.22/apis/supervisor/clientsecret/v1alpha1/register.go +++ b/generated/1.22/apis/supervisor/clientsecret/v1alpha1/register.go @@ -31,6 +31,7 @@ func init() { func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &OIDCClientSecretRequest{}, + &OIDCClientSecretRequestList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/generated/1.22/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go b/generated/1.22/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go index dda2f3bb..ef48e6c0 100644 --- a/generated/1.22/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go +++ b/generated/1.22/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go @@ -26,3 +26,11 @@ type OIDCClientSecretRequest struct { Spec OIDCClientSecretRequestSpec `json:"spec"` Status OIDCClientSecretRequestStatus `json:"status"` } + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequestList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + + Items []OIDCClientSecretRequest `json:"items"` +} diff --git a/generated/1.22/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go b/generated/1.22/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go index 4071a9d2..8de08fb5 100644 --- a/generated/1.22/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go +++ b/generated/1.22/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go @@ -9,6 +9,8 @@ package v1alpha1 import ( + unsafe "unsafe" + clientsecret "go.pinniped.dev/generated/1.22/apis/supervisor/clientsecret" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" @@ -31,6 +33,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestList)(nil), (*clientsecret.OIDCClientSecretRequestList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList(a.(*OIDCClientSecretRequestList), b.(*clientsecret.OIDCClientSecretRequestList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientsecret.OIDCClientSecretRequestList)(nil), (*OIDCClientSecretRequestList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList(a.(*clientsecret.OIDCClientSecretRequestList), b.(*OIDCClientSecretRequestList), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestSpec)(nil), (*clientsecret.OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(a.(*OIDCClientSecretRequestSpec), b.(*clientsecret.OIDCClientSecretRequestSpec), scope) }); err != nil { @@ -86,6 +98,28 @@ func Convert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRe return autoConvert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in, out, s) } +func autoConvert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList(in *OIDCClientSecretRequestList, out *clientsecret.OIDCClientSecretRequestList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]clientsecret.OIDCClientSecretRequest)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList(in *OIDCClientSecretRequestList, out *clientsecret.OIDCClientSecretRequestList, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList(in, out, s) +} + +func autoConvert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList(in *clientsecret.OIDCClientSecretRequestList, out *OIDCClientSecretRequestList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]OIDCClientSecretRequest)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList is an autogenerated conversion function. +func Convert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList(in *clientsecret.OIDCClientSecretRequestList, out *OIDCClientSecretRequestList, s conversion.Scope) error { + return autoConvert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList(in, out, s) +} + func autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *clientsecret.OIDCClientSecretRequestSpec, s conversion.Scope) error { out.GenerateNewSecret = in.GenerateNewSecret out.RevokeOldSecrets = in.RevokeOldSecrets diff --git a/generated/1.22/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go b/generated/1.22/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go index e4fce842..781e9831 100644 --- a/generated/1.22/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go +++ b/generated/1.22/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go @@ -40,6 +40,39 @@ func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestList) DeepCopyInto(out *OIDCClientSecretRequestList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OIDCClientSecretRequest, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestList. +func (in *OIDCClientSecretRequestList) DeepCopy() *OIDCClientSecretRequestList { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequestList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { *out = *in diff --git a/generated/1.22/apis/supervisor/clientsecret/zz_generated.deepcopy.go b/generated/1.22/apis/supervisor/clientsecret/zz_generated.deepcopy.go index e0dc7d68..ffd5e96e 100644 --- a/generated/1.22/apis/supervisor/clientsecret/zz_generated.deepcopy.go +++ b/generated/1.22/apis/supervisor/clientsecret/zz_generated.deepcopy.go @@ -40,6 +40,39 @@ func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestList) DeepCopyInto(out *OIDCClientSecretRequestList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OIDCClientSecretRequest, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestList. +func (in *OIDCClientSecretRequestList) DeepCopy() *OIDCClientSecretRequestList { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequestList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { *out = *in diff --git a/generated/1.23/README.adoc b/generated/1.23/README.adoc index 2e9fde69..5f4ad98b 100644 --- a/generated/1.23/README.adoc +++ b/generated/1.23/README.adoc @@ -219,6 +219,26 @@ Package clientsecret is the internal version of the Pinniped client secret API. +[id="{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-clientsecret-oidcclientsecretrequest"] +==== OIDCClientSecretRequest + +OIDCClientSecretRequest can be used to update the client secrets associated with an OIDCClient. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-clientsecret-oidcclientsecretrequestlist[$$OIDCClientSecretRequestList$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#objectmeta-v1-meta[$$ObjectMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. + +| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-clientsecret-oidcclientsecretrequestspec[$$OIDCClientSecretRequestSpec$$]__ | +| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-clientsecret-oidcclientsecretrequeststatus[$$OIDCClientSecretRequestStatus$$]__ | +|=== + + [id="{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-clientsecret-oidcclientsecretrequestspec"] @@ -234,8 +254,8 @@ Package clientsecret is the internal version of the Pinniped client secret API. [cols="25a,75a", options="header"] |=== | Field | Description -| *`generateNewSecret`* __boolean__ | -| *`revokeOldSecrets`* __boolean__ | +| *`generateNewSecret`* __boolean__ | Request a new client secret to for the OIDCClient referenced by the metadata.name field. +| *`revokeOldSecrets`* __boolean__ | Revoke the old client secrets associated with the OIDCClient referenced by the metadata.name field. |=== @@ -252,8 +272,8 @@ Package clientsecret is the internal version of the Pinniped client secret API. [cols="25a,75a", options="header"] |=== | Field | Description -| *`generatedSecret`* __string__ | -| *`totalClientSecrets`* __integer__ | +| *`generatedSecret`* __string__ | The unencrypted OIDC Client Secret. This will only be shared upon creation and cannot be recovered if you lose it. +| *`totalClientSecrets`* __integer__ | The total number of client secrets associated with the OIDCClient referenced by the metadata.name field. |=== @@ -265,6 +285,26 @@ Package v1alpha1 is the v1alpha1 version of the Pinniped client secret API. +[id="{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequest"] +==== OIDCClientSecretRequest + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequestlist[$$OIDCClientSecretRequestList$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#objectmeta-v1-meta[$$ObjectMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. + +| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequestspec[$$OIDCClientSecretRequestSpec$$]__ | +| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequeststatus[$$OIDCClientSecretRequestStatus$$]__ | +|=== + + [id="{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequestspec"] diff --git a/generated/1.23/apis/supervisor/clientsecret/register.go b/generated/1.23/apis/supervisor/clientsecret/register.go index 4a1c0173..8a76f0fe 100644 --- a/generated/1.23/apis/supervisor/clientsecret/register.go +++ b/generated/1.23/apis/supervisor/clientsecret/register.go @@ -32,6 +32,7 @@ var ( func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &OIDCClientSecretRequest{}, + &OIDCClientSecretRequestList{}, ) return nil } diff --git a/generated/1.23/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go b/generated/1.23/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go index 7fd1eb65..c7ef37b2 100644 --- a/generated/1.23/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go +++ b/generated/1.23/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go @@ -6,15 +6,26 @@ package clientsecret import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" type OIDCClientSecretRequestSpec struct { + // Request a new client secret to for the OIDCClient referenced by the metadata.name field. GenerateNewSecret bool `json:"generateNewSecret"` - RevokeOldSecrets bool `json:"revokeOldSecrets"` + + // Revoke the old client secrets associated with the OIDCClient referenced by the metadata.name + // field. + RevokeOldSecrets bool `json:"revokeOldSecrets"` } type OIDCClientSecretRequestStatus struct { - GeneratedSecret string `json:"generatedSecret,omitempty"` - TotalClientSecrets int `json:"totalClientSecrets"` + // The unencrypted OIDC Client Secret. This will only be shared upon creation and cannot + // be recovered if you lose it. + GeneratedSecret string `json:"generatedSecret,omitempty"` + + // The total number of client secrets associated with the OIDCClient referenced by the + // metadata.name field. + TotalClientSecrets int `json:"totalClientSecrets"` } +// OIDCClientSecretRequest can be used to update the client secrets associated with an +// OIDCClient. // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object type OIDCClientSecretRequest struct { metav1.TypeMeta `json:",inline"` @@ -23,3 +34,13 @@ type OIDCClientSecretRequest struct { Spec OIDCClientSecretRequestSpec `json:"spec"` Status OIDCClientSecretRequestStatus `json:"status"` } + +// OIDCClientSecretList is a list of OIDCClientSecretRequest objects. +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequestList struct { + metav1.TypeMeta + metav1.ListMeta + + // Items is a list of OIDCClientSecretRequest + Items []OIDCClientSecretRequest +} diff --git a/generated/1.23/apis/supervisor/clientsecret/v1alpha1/register.go b/generated/1.23/apis/supervisor/clientsecret/v1alpha1/register.go index 49602125..4660e407 100644 --- a/generated/1.23/apis/supervisor/clientsecret/v1alpha1/register.go +++ b/generated/1.23/apis/supervisor/clientsecret/v1alpha1/register.go @@ -31,6 +31,7 @@ func init() { func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &OIDCClientSecretRequest{}, + &OIDCClientSecretRequestList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/generated/1.23/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go b/generated/1.23/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go index dda2f3bb..ef48e6c0 100644 --- a/generated/1.23/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go +++ b/generated/1.23/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go @@ -26,3 +26,11 @@ type OIDCClientSecretRequest struct { Spec OIDCClientSecretRequestSpec `json:"spec"` Status OIDCClientSecretRequestStatus `json:"status"` } + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequestList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + + Items []OIDCClientSecretRequest `json:"items"` +} diff --git a/generated/1.23/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go b/generated/1.23/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go index 4b0bc6ae..3c37704b 100644 --- a/generated/1.23/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go +++ b/generated/1.23/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go @@ -9,6 +9,8 @@ package v1alpha1 import ( + unsafe "unsafe" + clientsecret "go.pinniped.dev/generated/1.23/apis/supervisor/clientsecret" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" @@ -31,6 +33,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestList)(nil), (*clientsecret.OIDCClientSecretRequestList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList(a.(*OIDCClientSecretRequestList), b.(*clientsecret.OIDCClientSecretRequestList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientsecret.OIDCClientSecretRequestList)(nil), (*OIDCClientSecretRequestList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList(a.(*clientsecret.OIDCClientSecretRequestList), b.(*OIDCClientSecretRequestList), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestSpec)(nil), (*clientsecret.OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(a.(*OIDCClientSecretRequestSpec), b.(*clientsecret.OIDCClientSecretRequestSpec), scope) }); err != nil { @@ -86,6 +98,28 @@ func Convert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRe return autoConvert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in, out, s) } +func autoConvert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList(in *OIDCClientSecretRequestList, out *clientsecret.OIDCClientSecretRequestList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]clientsecret.OIDCClientSecretRequest)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList(in *OIDCClientSecretRequestList, out *clientsecret.OIDCClientSecretRequestList, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList(in, out, s) +} + +func autoConvert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList(in *clientsecret.OIDCClientSecretRequestList, out *OIDCClientSecretRequestList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]OIDCClientSecretRequest)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList is an autogenerated conversion function. +func Convert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList(in *clientsecret.OIDCClientSecretRequestList, out *OIDCClientSecretRequestList, s conversion.Scope) error { + return autoConvert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList(in, out, s) +} + func autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *clientsecret.OIDCClientSecretRequestSpec, s conversion.Scope) error { out.GenerateNewSecret = in.GenerateNewSecret out.RevokeOldSecrets = in.RevokeOldSecrets diff --git a/generated/1.23/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go b/generated/1.23/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go index e4fce842..781e9831 100644 --- a/generated/1.23/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go +++ b/generated/1.23/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go @@ -40,6 +40,39 @@ func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestList) DeepCopyInto(out *OIDCClientSecretRequestList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OIDCClientSecretRequest, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestList. +func (in *OIDCClientSecretRequestList) DeepCopy() *OIDCClientSecretRequestList { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequestList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { *out = *in diff --git a/generated/1.23/apis/supervisor/clientsecret/zz_generated.deepcopy.go b/generated/1.23/apis/supervisor/clientsecret/zz_generated.deepcopy.go index e0dc7d68..ffd5e96e 100644 --- a/generated/1.23/apis/supervisor/clientsecret/zz_generated.deepcopy.go +++ b/generated/1.23/apis/supervisor/clientsecret/zz_generated.deepcopy.go @@ -40,6 +40,39 @@ func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestList) DeepCopyInto(out *OIDCClientSecretRequestList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OIDCClientSecretRequest, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestList. +func (in *OIDCClientSecretRequestList) DeepCopy() *OIDCClientSecretRequestList { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequestList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { *out = *in diff --git a/generated/1.24/README.adoc b/generated/1.24/README.adoc index 8d9d524d..c711183b 100644 --- a/generated/1.24/README.adoc +++ b/generated/1.24/README.adoc @@ -219,6 +219,26 @@ Package clientsecret is the internal version of the Pinniped client secret API. +[id="{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-clientsecret-oidcclientsecretrequest"] +==== OIDCClientSecretRequest + +OIDCClientSecretRequest can be used to update the client secrets associated with an OIDCClient. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-clientsecret-oidcclientsecretrequestlist[$$OIDCClientSecretRequestList$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#objectmeta-v1-meta[$$ObjectMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. + +| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-clientsecret-oidcclientsecretrequestspec[$$OIDCClientSecretRequestSpec$$]__ | +| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-clientsecret-oidcclientsecretrequeststatus[$$OIDCClientSecretRequestStatus$$]__ | +|=== + + [id="{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-clientsecret-oidcclientsecretrequestspec"] @@ -234,8 +254,8 @@ Package clientsecret is the internal version of the Pinniped client secret API. [cols="25a,75a", options="header"] |=== | Field | Description -| *`generateNewSecret`* __boolean__ | -| *`revokeOldSecrets`* __boolean__ | +| *`generateNewSecret`* __boolean__ | Request a new client secret to for the OIDCClient referenced by the metadata.name field. +| *`revokeOldSecrets`* __boolean__ | Revoke the old client secrets associated with the OIDCClient referenced by the metadata.name field. |=== @@ -252,8 +272,8 @@ Package clientsecret is the internal version of the Pinniped client secret API. [cols="25a,75a", options="header"] |=== | Field | Description -| *`generatedSecret`* __string__ | -| *`totalClientSecrets`* __integer__ | +| *`generatedSecret`* __string__ | The unencrypted OIDC Client Secret. This will only be shared upon creation and cannot be recovered if you lose it. +| *`totalClientSecrets`* __integer__ | The total number of client secrets associated with the OIDCClient referenced by the metadata.name field. |=== @@ -265,6 +285,26 @@ Package v1alpha1 is the v1alpha1 version of the Pinniped client secret API. +[id="{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequest"] +==== OIDCClientSecretRequest + + + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequestlist[$$OIDCClientSecretRequestList$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#objectmeta-v1-meta[$$ObjectMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`. + +| *`spec`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequestspec[$$OIDCClientSecretRequestSpec$$]__ | +| *`status`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequeststatus[$$OIDCClientSecretRequestStatus$$]__ | +|=== + + [id="{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-clientsecret-v1alpha1-oidcclientsecretrequestspec"] diff --git a/generated/1.24/apis/supervisor/clientsecret/register.go b/generated/1.24/apis/supervisor/clientsecret/register.go index 4a1c0173..8a76f0fe 100644 --- a/generated/1.24/apis/supervisor/clientsecret/register.go +++ b/generated/1.24/apis/supervisor/clientsecret/register.go @@ -32,6 +32,7 @@ var ( func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &OIDCClientSecretRequest{}, + &OIDCClientSecretRequestList{}, ) return nil } diff --git a/generated/1.24/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go b/generated/1.24/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go index 7fd1eb65..c7ef37b2 100644 --- a/generated/1.24/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go +++ b/generated/1.24/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go @@ -6,15 +6,26 @@ package clientsecret import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" type OIDCClientSecretRequestSpec struct { + // Request a new client secret to for the OIDCClient referenced by the metadata.name field. GenerateNewSecret bool `json:"generateNewSecret"` - RevokeOldSecrets bool `json:"revokeOldSecrets"` + + // Revoke the old client secrets associated with the OIDCClient referenced by the metadata.name + // field. + RevokeOldSecrets bool `json:"revokeOldSecrets"` } type OIDCClientSecretRequestStatus struct { - GeneratedSecret string `json:"generatedSecret,omitempty"` - TotalClientSecrets int `json:"totalClientSecrets"` + // The unencrypted OIDC Client Secret. This will only be shared upon creation and cannot + // be recovered if you lose it. + GeneratedSecret string `json:"generatedSecret,omitempty"` + + // The total number of client secrets associated with the OIDCClient referenced by the + // metadata.name field. + TotalClientSecrets int `json:"totalClientSecrets"` } +// OIDCClientSecretRequest can be used to update the client secrets associated with an +// OIDCClient. // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object type OIDCClientSecretRequest struct { metav1.TypeMeta `json:",inline"` @@ -23,3 +34,13 @@ type OIDCClientSecretRequest struct { Spec OIDCClientSecretRequestSpec `json:"spec"` Status OIDCClientSecretRequestStatus `json:"status"` } + +// OIDCClientSecretList is a list of OIDCClientSecretRequest objects. +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequestList struct { + metav1.TypeMeta + metav1.ListMeta + + // Items is a list of OIDCClientSecretRequest + Items []OIDCClientSecretRequest +} diff --git a/generated/1.24/apis/supervisor/clientsecret/v1alpha1/register.go b/generated/1.24/apis/supervisor/clientsecret/v1alpha1/register.go index 49602125..4660e407 100644 --- a/generated/1.24/apis/supervisor/clientsecret/v1alpha1/register.go +++ b/generated/1.24/apis/supervisor/clientsecret/v1alpha1/register.go @@ -31,6 +31,7 @@ func init() { func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &OIDCClientSecretRequest{}, + &OIDCClientSecretRequestList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/generated/1.24/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go b/generated/1.24/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go index dda2f3bb..ef48e6c0 100644 --- a/generated/1.24/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go +++ b/generated/1.24/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go @@ -26,3 +26,11 @@ type OIDCClientSecretRequest struct { Spec OIDCClientSecretRequestSpec `json:"spec"` Status OIDCClientSecretRequestStatus `json:"status"` } + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequestList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + + Items []OIDCClientSecretRequest `json:"items"` +} diff --git a/generated/1.24/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go b/generated/1.24/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go index fd6f7ceb..78fbd0dc 100644 --- a/generated/1.24/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go +++ b/generated/1.24/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go @@ -9,6 +9,8 @@ package v1alpha1 import ( + unsafe "unsafe" + clientsecret "go.pinniped.dev/generated/1.24/apis/supervisor/clientsecret" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" @@ -31,6 +33,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestList)(nil), (*clientsecret.OIDCClientSecretRequestList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList(a.(*OIDCClientSecretRequestList), b.(*clientsecret.OIDCClientSecretRequestList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientsecret.OIDCClientSecretRequestList)(nil), (*OIDCClientSecretRequestList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList(a.(*clientsecret.OIDCClientSecretRequestList), b.(*OIDCClientSecretRequestList), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestSpec)(nil), (*clientsecret.OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(a.(*OIDCClientSecretRequestSpec), b.(*clientsecret.OIDCClientSecretRequestSpec), scope) }); err != nil { @@ -86,6 +98,28 @@ func Convert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRe return autoConvert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in, out, s) } +func autoConvert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList(in *OIDCClientSecretRequestList, out *clientsecret.OIDCClientSecretRequestList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]clientsecret.OIDCClientSecretRequest)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList(in *OIDCClientSecretRequestList, out *clientsecret.OIDCClientSecretRequestList, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList(in, out, s) +} + +func autoConvert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList(in *clientsecret.OIDCClientSecretRequestList, out *OIDCClientSecretRequestList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]OIDCClientSecretRequest)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList is an autogenerated conversion function. +func Convert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList(in *clientsecret.OIDCClientSecretRequestList, out *OIDCClientSecretRequestList, s conversion.Scope) error { + return autoConvert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList(in, out, s) +} + func autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *clientsecret.OIDCClientSecretRequestSpec, s conversion.Scope) error { out.GenerateNewSecret = in.GenerateNewSecret out.RevokeOldSecrets = in.RevokeOldSecrets diff --git a/generated/1.24/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go b/generated/1.24/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go index e4fce842..781e9831 100644 --- a/generated/1.24/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go +++ b/generated/1.24/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go @@ -40,6 +40,39 @@ func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestList) DeepCopyInto(out *OIDCClientSecretRequestList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OIDCClientSecretRequest, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestList. +func (in *OIDCClientSecretRequestList) DeepCopy() *OIDCClientSecretRequestList { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequestList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { *out = *in diff --git a/generated/1.24/apis/supervisor/clientsecret/zz_generated.deepcopy.go b/generated/1.24/apis/supervisor/clientsecret/zz_generated.deepcopy.go index e0dc7d68..ffd5e96e 100644 --- a/generated/1.24/apis/supervisor/clientsecret/zz_generated.deepcopy.go +++ b/generated/1.24/apis/supervisor/clientsecret/zz_generated.deepcopy.go @@ -40,6 +40,39 @@ func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestList) DeepCopyInto(out *OIDCClientSecretRequestList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OIDCClientSecretRequest, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestList. +func (in *OIDCClientSecretRequestList) DeepCopy() *OIDCClientSecretRequestList { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequestList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { *out = *in diff --git a/generated/latest/apis/supervisor/clientsecret/register.go b/generated/latest/apis/supervisor/clientsecret/register.go index 4a1c0173..8a76f0fe 100644 --- a/generated/latest/apis/supervisor/clientsecret/register.go +++ b/generated/latest/apis/supervisor/clientsecret/register.go @@ -32,6 +32,7 @@ var ( func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &OIDCClientSecretRequest{}, + &OIDCClientSecretRequestList{}, ) return nil } diff --git a/generated/latest/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go b/generated/latest/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go index 7fd1eb65..c7ef37b2 100644 --- a/generated/latest/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go +++ b/generated/latest/apis/supervisor/clientsecret/types_oidcclientsecretrequest.go @@ -6,15 +6,26 @@ package clientsecret import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" type OIDCClientSecretRequestSpec struct { + // Request a new client secret to for the OIDCClient referenced by the metadata.name field. GenerateNewSecret bool `json:"generateNewSecret"` - RevokeOldSecrets bool `json:"revokeOldSecrets"` + + // Revoke the old client secrets associated with the OIDCClient referenced by the metadata.name + // field. + RevokeOldSecrets bool `json:"revokeOldSecrets"` } type OIDCClientSecretRequestStatus struct { - GeneratedSecret string `json:"generatedSecret,omitempty"` - TotalClientSecrets int `json:"totalClientSecrets"` + // The unencrypted OIDC Client Secret. This will only be shared upon creation and cannot + // be recovered if you lose it. + GeneratedSecret string `json:"generatedSecret,omitempty"` + + // The total number of client secrets associated with the OIDCClient referenced by the + // metadata.name field. + TotalClientSecrets int `json:"totalClientSecrets"` } +// OIDCClientSecretRequest can be used to update the client secrets associated with an +// OIDCClient. // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object type OIDCClientSecretRequest struct { metav1.TypeMeta `json:",inline"` @@ -23,3 +34,13 @@ type OIDCClientSecretRequest struct { Spec OIDCClientSecretRequestSpec `json:"spec"` Status OIDCClientSecretRequestStatus `json:"status"` } + +// OIDCClientSecretList is a list of OIDCClientSecretRequest objects. +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequestList struct { + metav1.TypeMeta + metav1.ListMeta + + // Items is a list of OIDCClientSecretRequest + Items []OIDCClientSecretRequest +} diff --git a/generated/latest/apis/supervisor/clientsecret/v1alpha1/register.go b/generated/latest/apis/supervisor/clientsecret/v1alpha1/register.go index 49602125..4660e407 100644 --- a/generated/latest/apis/supervisor/clientsecret/v1alpha1/register.go +++ b/generated/latest/apis/supervisor/clientsecret/v1alpha1/register.go @@ -31,6 +31,7 @@ func init() { func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &OIDCClientSecretRequest{}, + &OIDCClientSecretRequestList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/generated/latest/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go b/generated/latest/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go index dda2f3bb..ef48e6c0 100644 --- a/generated/latest/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go +++ b/generated/latest/apis/supervisor/clientsecret/v1alpha1/types_oidcclientsecretrequest.go @@ -26,3 +26,11 @@ type OIDCClientSecretRequest struct { Spec OIDCClientSecretRequestSpec `json:"spec"` Status OIDCClientSecretRequestStatus `json:"status"` } + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type OIDCClientSecretRequestList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + + Items []OIDCClientSecretRequest `json:"items"` +} diff --git a/generated/latest/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go b/generated/latest/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go index b2a4d732..d52f2c10 100644 --- a/generated/latest/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go +++ b/generated/latest/apis/supervisor/clientsecret/v1alpha1/zz_generated.conversion.go @@ -9,6 +9,8 @@ package v1alpha1 import ( + unsafe "unsafe" + clientsecret "go.pinniped.dev/generated/latest/apis/supervisor/clientsecret" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" @@ -31,6 +33,16 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestList)(nil), (*clientsecret.OIDCClientSecretRequestList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList(a.(*OIDCClientSecretRequestList), b.(*clientsecret.OIDCClientSecretRequestList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientsecret.OIDCClientSecretRequestList)(nil), (*OIDCClientSecretRequestList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList(a.(*clientsecret.OIDCClientSecretRequestList), b.(*OIDCClientSecretRequestList), scope) + }); err != nil { + return err + } if err := s.AddGeneratedConversionFunc((*OIDCClientSecretRequestSpec)(nil), (*clientsecret.OIDCClientSecretRequestSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(a.(*OIDCClientSecretRequestSpec), b.(*clientsecret.OIDCClientSecretRequestSpec), scope) }); err != nil { @@ -86,6 +98,28 @@ func Convert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRe return autoConvert_clientsecret_OIDCClientSecretRequest_To_v1alpha1_OIDCClientSecretRequest(in, out, s) } +func autoConvert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList(in *OIDCClientSecretRequestList, out *clientsecret.OIDCClientSecretRequestList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]clientsecret.OIDCClientSecretRequest)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList is an autogenerated conversion function. +func Convert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList(in *OIDCClientSecretRequestList, out *clientsecret.OIDCClientSecretRequestList, s conversion.Scope) error { + return autoConvert_v1alpha1_OIDCClientSecretRequestList_To_clientsecret_OIDCClientSecretRequestList(in, out, s) +} + +func autoConvert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList(in *clientsecret.OIDCClientSecretRequestList, out *OIDCClientSecretRequestList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]OIDCClientSecretRequest)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList is an autogenerated conversion function. +func Convert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList(in *clientsecret.OIDCClientSecretRequestList, out *OIDCClientSecretRequestList, s conversion.Scope) error { + return autoConvert_clientsecret_OIDCClientSecretRequestList_To_v1alpha1_OIDCClientSecretRequestList(in, out, s) +} + func autoConvert_v1alpha1_OIDCClientSecretRequestSpec_To_clientsecret_OIDCClientSecretRequestSpec(in *OIDCClientSecretRequestSpec, out *clientsecret.OIDCClientSecretRequestSpec, s conversion.Scope) error { out.GenerateNewSecret = in.GenerateNewSecret out.RevokeOldSecrets = in.RevokeOldSecrets diff --git a/generated/latest/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go b/generated/latest/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go index e4fce842..781e9831 100644 --- a/generated/latest/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go +++ b/generated/latest/apis/supervisor/clientsecret/v1alpha1/zz_generated.deepcopy.go @@ -40,6 +40,39 @@ func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestList) DeepCopyInto(out *OIDCClientSecretRequestList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OIDCClientSecretRequest, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestList. +func (in *OIDCClientSecretRequestList) DeepCopy() *OIDCClientSecretRequestList { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequestList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { *out = *in diff --git a/generated/latest/apis/supervisor/clientsecret/zz_generated.deepcopy.go b/generated/latest/apis/supervisor/clientsecret/zz_generated.deepcopy.go index e0dc7d68..ffd5e96e 100644 --- a/generated/latest/apis/supervisor/clientsecret/zz_generated.deepcopy.go +++ b/generated/latest/apis/supervisor/clientsecret/zz_generated.deepcopy.go @@ -40,6 +40,39 @@ func (in *OIDCClientSecretRequest) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OIDCClientSecretRequestList) DeepCopyInto(out *OIDCClientSecretRequestList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OIDCClientSecretRequest, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OIDCClientSecretRequestList. +func (in *OIDCClientSecretRequestList) DeepCopy() *OIDCClientSecretRequestList { + if in == nil { + return nil + } + out := new(OIDCClientSecretRequestList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OIDCClientSecretRequestList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OIDCClientSecretRequestSpec) DeepCopyInto(out *OIDCClientSecretRequestSpec) { *out = *in diff --git a/internal/config/supervisor/config.go b/internal/config/supervisor/config.go index 192d9790..44c98eef 100644 --- a/internal/config/supervisor/config.go +++ b/internal/config/supervisor/config.go @@ -24,6 +24,12 @@ const ( NetworkDisabled = "disabled" NetworkUnix = "unix" NetworkTCP = "tcp" + + // Use 10250 because it happens to be the same port on which the Kubelet listens, so some cluster types + // are more permissive with servers that run on this port. For example, GKE private clusters do not + // allow traffic from the control plane to most ports, but do allow traffic to port 10250. This allows + // the Concierge to work without additional configuration on these types of clusters. + aggregatedAPIServerPortDefault = 10250 ) // FromPath loads an Config from a provided local file path, inserts any @@ -50,6 +56,12 @@ func FromPath(ctx context.Context, path string) (*Config, error) { return nil, fmt.Errorf("validate apiGroupSuffix: %w", err) } + maybeSetAggregatedAPIServerPortDefaults(&config.AggregatedAPIServerPort) + + if err := validateServerPort(config.AggregatedAPIServerPort); err != nil { + return nil, fmt.Errorf("validate aggregatedAPIServerPort: %w", err) + } + if err := validateNames(&config.NamesConfig); err != nil { return nil, fmt.Errorf("validate names: %w", err) } @@ -105,6 +117,12 @@ func validateAPIGroupSuffix(apiGroupSuffix string) error { return groupsuffix.Validate(apiGroupSuffix) } +func maybeSetAggregatedAPIServerPortDefaults(port **int64) { + if *port == nil { + *port = pointer.Int64Ptr(aggregatedAPIServerPortDefault) + } +} + func validateNames(names *NamesConfigSpec) error { missingNames := []string{} if names.DefaultTLSCertificateSecret == "" { @@ -193,3 +211,11 @@ func addrIsOnlyOnLoopback(addr string) bool { } return ip.IsLoopback() } + +func validateServerPort(port *int64) error { + // It cannot be below 1024 because the container is not running as root. + if *port < 1024 || *port > 65535 { + return constable.Error("must be within range 1024 to 65535") + } + return nil +} diff --git a/internal/config/supervisor/config_test.go b/internal/config/supervisor/config_test.go index ac4651a7..44da6ec5 100644 --- a/internal/config/supervisor/config_test.go +++ b/internal/config/supervisor/config_test.go @@ -43,6 +43,7 @@ func TestFromPath(t *testing.T) { address: 127.0.0.1:1234 insecureAcceptExternalUnencryptedHttpRequests: false logLevel: trace + aggregatedAPIServerPort: 12345 `), wantConfig: &Config{ APIGroupSuffix: pointer.StringPtr("some.suffix.com"), @@ -68,6 +69,7 @@ func TestFromPath(t *testing.T) { Log: plog.LogSpec{ Level: plog.LevelTrace, }, + AggregatedAPIServerPort: pointer.Int64Ptr(12345), }, }, { @@ -91,6 +93,7 @@ func TestFromPath(t *testing.T) { log: level: info format: text + aggregatedAPIServerPort: 12345 `), wantConfig: &Config{ APIGroupSuffix: pointer.StringPtr("some.suffix.com"), @@ -116,6 +119,7 @@ func TestFromPath(t *testing.T) { Level: plog.LevelInfo, Format: plog.FormatText, }, + AggregatedAPIServerPort: pointer.Int64Ptr(12345), }, }, { @@ -166,6 +170,7 @@ func TestFromPath(t *testing.T) { Level: plog.LevelTrace, Format: plog.FormatText, }, + AggregatedAPIServerPort: pointer.Int64Ptr(10250), }, }, { @@ -202,7 +207,8 @@ func TestFromPath(t *testing.T) { Network: "disabled", }, }, - AllowExternalHTTP: false, + AllowExternalHTTP: false, + AggregatedAPIServerPort: pointer.Int64Ptr(10250), }, }, { @@ -332,7 +338,8 @@ func TestFromPath(t *testing.T) { Address: ":1234", }, }, - AllowExternalHTTP: true, + AllowExternalHTTP: true, + AggregatedAPIServerPort: pointer.Int64Ptr(10250), }, }, { @@ -363,7 +370,8 @@ func TestFromPath(t *testing.T) { Address: ":1234", }, }, - AllowExternalHTTP: true, + AllowExternalHTTP: true, + AggregatedAPIServerPort: pointer.Int64Ptr(10250), }, }, { @@ -420,6 +428,22 @@ func TestFromPath(t *testing.T) { `), wantError: "validate apiGroupSuffix: a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')", }, + { + name: "AggregatedAPIServerPortDefault too small", + yaml: here.Doc(` + --- + aggregatedAPIServerPort: 1023 + `), + wantError: "validate aggregatedAPIServerPort: must be within range 1024 to 65535", + }, + { + name: "AggregatedAPIServerPortDefault too large", + yaml: here.Doc(` + --- + aggregatedAPIServerPort: 65536 + `), + wantError: "validate aggregatedAPIServerPort: must be within range 1024 to 65535", + }, } for _, test := range tests { test := test diff --git a/internal/config/supervisor/types.go b/internal/config/supervisor/types.go index edef3ce7..bd89e2c7 100644 --- a/internal/config/supervisor/types.go +++ b/internal/config/supervisor/types.go @@ -15,10 +15,11 @@ type Config struct { Labels map[string]string `json:"labels"` NamesConfig NamesConfigSpec `json:"names"` // Deprecated: use log.level instead - LogLevel *plog.LogLevel `json:"logLevel"` - Log plog.LogSpec `json:"log"` - Endpoints *Endpoints `json:"endpoints"` - AllowExternalHTTP stringOrBoolAsBool `json:"insecureAcceptExternalUnencryptedHttpRequests"` + LogLevel *plog.LogLevel `json:"logLevel"` + Log plog.LogSpec `json:"log"` + Endpoints *Endpoints `json:"endpoints"` + AllowExternalHTTP stringOrBoolAsBool `json:"insecureAcceptExternalUnencryptedHttpRequests"` + AggregatedAPIServerPort *int64 `json:"aggregatedAPIServerPort"` } // NamesConfigSpec configures the names of some Kubernetes resources for the Supervisor. diff --git a/internal/registry/clientsecretrequest/rest.go b/internal/registry/clientsecretrequest/rest.go index 70a7eb07..12621f1f 100644 --- a/internal/registry/clientsecretrequest/rest.go +++ b/internal/registry/clientsecretrequest/rest.go @@ -9,19 +9,24 @@ import ( "fmt" apierrors "k8s.io/apimachinery/pkg/api/errors" + metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apiserver/pkg/registry/rest" "k8s.io/utils/trace" clientsecretapi "go.pinniped.dev/generated/latest/apis/supervisor/clientsecret" ) -func NewREST() *REST { - return &REST{} +func NewREST(resource schema.GroupResource) *REST { + return &REST{ + tableConvertor: rest.NewDefaultTableConvertor(resource), + } } type REST struct { + tableConvertor rest.TableConvertor } // Assert that our *REST implements all the optional interfaces that we expect it to implement. @@ -30,19 +35,38 @@ var _ interface { rest.NamespaceScopedStrategy rest.Scoper rest.Storage + rest.CategoriesProvider + rest.Lister + rest.TableConvertor } = (*REST)(nil) func (*REST) New() runtime.Object { return &clientsecretapi.OIDCClientSecretRequest{} } +func (*REST) NewList() runtime.Object { + return &clientsecretapi.OIDCClientSecretRequestList{} +} + +func (*REST) List(_ context.Context, _ *metainternalversion.ListOptions) (runtime.Object, error) { + return &clientsecretapi.OIDCClientSecretRequestList{ + ListMeta: metav1.ListMeta{ + ResourceVersion: "0", // this resource version means "from the API server cache" + }, + Items: []clientsecretapi.OIDCClientSecretRequest{}, // avoid sending nil items list + }, nil +} + +func (r *REST) ConvertToTable(ctx context.Context, obj runtime.Object, tableOptions runtime.Object) (*metav1.Table, error) { + return r.tableConvertor.ConvertToTable(ctx, obj, tableOptions) +} + func (*REST) NamespaceScoped() bool { return true } func (*REST) Categories() []string { - // because we haven't implemented lister, adding it to categories breaks things. - return []string{} + return []string{"pinniped"} } func (r *REST) Create(ctx context.Context, obj runtime.Object, createValidation rest.ValidateObjectFunc, options *metav1.CreateOptions) (runtime.Object, error) { diff --git a/internal/supervisor/apiserver/apiserver.go b/internal/supervisor/apiserver/apiserver.go index 21c620e3..135aeca9 100644 --- a/internal/supervisor/apiserver/apiserver.go +++ b/internal/supervisor/apiserver/apiserver.go @@ -30,7 +30,7 @@ type ExtraConfig struct { BuildControllersPostStartHook controllerinit.RunnerBuilder Scheme *runtime.Scheme NegotiatedSerializer runtime.NegotiatedSerializer - OauthVirtualSupervisorGroupVersion schema.GroupVersion + ClientSecretSupervisorGroupVersion schema.GroupVersion } type PinnipedServer struct { @@ -74,8 +74,8 @@ func (c completedConfig) New() (*PinnipedServer, error) { var errs []error //nolint: prealloc for _, f := range []func() (schema.GroupVersionResource, rest.Storage){ func() (schema.GroupVersionResource, rest.Storage) { - clientSecretReqGVR := c.ExtraConfig.OauthVirtualSupervisorGroupVersion.WithResource("oidcclientsecretrequests") - clientSecretReqStorage := clientsecretrequest.NewREST() + clientSecretReqGVR := c.ExtraConfig.ClientSecretSupervisorGroupVersion.WithResource("oidcclientsecretrequests") + clientSecretReqStorage := clientsecretrequest.NewREST(clientSecretReqGVR.GroupResource()) return clientSecretReqGVR, clientSecretReqStorage }, } { diff --git a/internal/supervisor/scheme/scheme.go b/internal/supervisor/scheme/scheme.go index d977d012..ad6f3aba 100644 --- a/internal/supervisor/scheme/scheme.go +++ b/internal/supervisor/scheme/scheme.go @@ -38,9 +38,9 @@ func New(apiGroupSuffix string) (_ *runtime.Scheme, oauth schema.GroupVersion) { return scheme, clientsecretv1alpha1.SchemeGroupVersion } - oauthVirtualSupervisorGroupData := groupsuffix.SupervisorAggregatedGroups(apiGroupSuffix) + clientSecretSupervisorGroupData := groupsuffix.SupervisorAggregatedGroups(apiGroupSuffix) - addToSchemeAtNewGroup(scheme, clientsecretv1alpha1.GroupName, oauthVirtualSupervisorGroupData.Group, clientsecretv1alpha1.AddToScheme, clientsecretapi.AddToScheme) + addToSchemeAtNewGroup(scheme, clientsecretv1alpha1.GroupName, clientSecretSupervisorGroupData.Group, clientsecretv1alpha1.AddToScheme, clientsecretapi.AddToScheme) // manually register conversions and defaulting into the correct scheme since we cannot directly call AddToScheme schemeBuilder := runtime.NewSchemeBuilder( @@ -57,7 +57,7 @@ func New(apiGroupSuffix string) (_ *runtime.Scheme, oauth schema.GroupVersion) { // defaulting func registered, but it will almost certainly panic if one is added. scheme.Default((*clientsecretv1alpha1.OIDCClientSecretRequest)(nil)) - return scheme, schema.GroupVersion(oauthVirtualSupervisorGroupData) + return scheme, schema.GroupVersion(clientSecretSupervisorGroupData) } func addToSchemeAtNewGroup(scheme *runtime.Scheme, oldGroup, newGroup string, funcs ...func(*runtime.Scheme) error) { diff --git a/internal/supervisor/scheme/scheme_test.go b/internal/supervisor/scheme/scheme_test.go index fa860773..8c0b0bde 100644 --- a/internal/supervisor/scheme/scheme_test.go +++ b/internal/supervisor/scheme/scheme_test.go @@ -44,10 +44,10 @@ func TestNew(t *testing.T) { } tests := []struct { - name string - apiGroupSuffix string - want map[schema.GroupVersionKind]reflect.Type - wantOAuthGroupVersion schema.GroupVersion + name string + apiGroupSuffix string + want map[schema.GroupVersionKind]reflect.Type + wantClientSecretGroupVersion schema.GroupVersion }{ { name: "regular api group", @@ -55,9 +55,11 @@ func TestNew(t *testing.T) { want: map[schema.GroupVersionKind]reflect.Type{ // all the types that are in the aggregated API group - regularClientSecretGV.WithKind("OIDCClientSecretRequest"): reflect.TypeOf(&clientsecretv1alpha1.OIDCClientSecretRequest{}).Elem(), + regularClientSecretGV.WithKind("OIDCClientSecretRequest"): reflect.TypeOf(&clientsecretv1alpha1.OIDCClientSecretRequest{}).Elem(), + regularClientSecretGV.WithKind("OIDCClientSecretRequestList"): reflect.TypeOf(&clientsecretv1alpha1.OIDCClientSecretRequestList{}).Elem(), - regularClientSecretGVInternal.WithKind("OIDCClientSecretRequest"): reflect.TypeOf(&clientsecretapi.OIDCClientSecretRequest{}).Elem(), + regularClientSecretGVInternal.WithKind("OIDCClientSecretRequest"): reflect.TypeOf(&clientsecretapi.OIDCClientSecretRequest{}).Elem(), + regularClientSecretGVInternal.WithKind("OIDCClientSecretRequestList"): reflect.TypeOf(&clientsecretapi.OIDCClientSecretRequestList{}).Elem(), regularClientSecretGV.WithKind("CreateOptions"): reflect.TypeOf(&metav1.CreateOptions{}).Elem(), regularClientSecretGV.WithKind("DeleteOptions"): reflect.TypeOf(&metav1.DeleteOptions{}).Elem(), @@ -86,7 +88,7 @@ func TestNew(t *testing.T) { metav1.Unversioned.WithKind("UpdateOptions"): reflect.TypeOf(&metav1.UpdateOptions{}).Elem(), metav1.Unversioned.WithKind("WatchEvent"): reflect.TypeOf(&metav1.WatchEvent{}).Elem(), }, - wantOAuthGroupVersion: regularClientSecretGV, + wantClientSecretGroupVersion: regularClientSecretGV, }, { name: "other api group", @@ -94,9 +96,11 @@ func TestNew(t *testing.T) { want: map[schema.GroupVersionKind]reflect.Type{ // all the types that are in the aggregated API group - otherClientSecretGV.WithKind("OIDCClientSecretRequest"): reflect.TypeOf(&clientsecretv1alpha1.OIDCClientSecretRequest{}).Elem(), + otherClientSecretGV.WithKind("OIDCClientSecretRequest"): reflect.TypeOf(&clientsecretv1alpha1.OIDCClientSecretRequest{}).Elem(), + otherClientSecretGV.WithKind("OIDCClientSecretRequestList"): reflect.TypeOf(&clientsecretv1alpha1.OIDCClientSecretRequestList{}).Elem(), - otherClientSecretGVInternal.WithKind("OIDCClientSecretRequest"): reflect.TypeOf(&clientsecretapi.OIDCClientSecretRequest{}).Elem(), + otherClientSecretGVInternal.WithKind("OIDCClientSecretRequest"): reflect.TypeOf(&clientsecretapi.OIDCClientSecretRequest{}).Elem(), + otherClientSecretGVInternal.WithKind("OIDCClientSecretRequestList"): reflect.TypeOf(&clientsecretapi.OIDCClientSecretRequestList{}).Elem(), otherClientSecretGV.WithKind("CreateOptions"): reflect.TypeOf(&metav1.CreateOptions{}).Elem(), otherClientSecretGV.WithKind("DeleteOptions"): reflect.TypeOf(&metav1.DeleteOptions{}).Elem(), @@ -125,15 +129,15 @@ func TestNew(t *testing.T) { metav1.Unversioned.WithKind("UpdateOptions"): reflect.TypeOf(&metav1.UpdateOptions{}).Elem(), metav1.Unversioned.WithKind("WatchEvent"): reflect.TypeOf(&metav1.WatchEvent{}).Elem(), }, - wantOAuthGroupVersion: otherClientSecretGV, + wantClientSecretGroupVersion: otherClientSecretGV, }, } for _, tt := range tests { tt := tt t.Run(tt.name, func(t *testing.T) { - scheme, oauthGV := New(tt.apiGroupSuffix) + scheme, clientSecretGV := New(tt.apiGroupSuffix) require.Equal(t, tt.want, scheme.AllKnownTypes()) - require.Equal(t, tt.wantOAuthGroupVersion, oauthGV) + require.Equal(t, tt.wantClientSecretGroupVersion, clientSecretGV) }) } } diff --git a/internal/supervisor/server/server.go b/internal/supervisor/server/server.go index d4320091..30cdf48f 100644 --- a/internal/supervisor/server/server.go +++ b/internal/supervisor/server/server.go @@ -138,7 +138,8 @@ func prepareControllers( leaderElector controllerinit.RunnerWrapper, podInfo *downward.PodInfo, ) controllerinit.RunnerBuilder { - oauthSupervisorGroupData := groupsuffix.SupervisorAggregatedGroups(*cfg.APIGroupSuffix) + const certificateName string = "pinniped-supervisor-api-tls-serving-certificate" + clientSecretSupervisorGroupData := groupsuffix.SupervisorAggregatedGroups(*cfg.APIGroupSuffix) federationDomainInformer := pinnipedInformers.Config().V1alpha1().FederationDomains() secretInformer := kubeInformers.Core().V1().Secrets() @@ -310,14 +311,14 @@ func prepareControllers( WithController( apicerts.NewCertsManagerController( podInfo.Namespace, - "pinniped-supervisor-api-tls-serving-certificate", + certificateName, cfg.Labels, kubeClient, secretInformer, controllerlib.WithInformer, controllerlib.WithInitialEvent, - 31536000*time.Second, - "Pinniped Aggregation CA", + 365*24*time.Hour, // about one year + "Pinniped Supervisor Aggregation CA", cfg.NamesConfig.APIService, ), singletonWorker, @@ -325,8 +326,8 @@ func prepareControllers( WithController( apicerts.NewAPIServiceUpdaterController( podInfo.Namespace, - "pinniped-supervisor-api-tls-serving-certificate", - oauthSupervisorGroupData.APIServiceName(), + certificateName, + clientSecretSupervisorGroupData.APIServiceName(), aggregatorClient, secretInformer, controllerlib.WithInformer, @@ -336,7 +337,7 @@ func prepareControllers( WithController( apicerts.NewCertsObserverController( podInfo.Namespace, - "pinniped-supervisor-api-tls-serving-certificate", + certificateName, dynamicServingCertProvider, secretInformer, controllerlib.WithInformer, @@ -346,11 +347,11 @@ func prepareControllers( WithController( apicerts.NewCertsExpirerController( podInfo.Namespace, - "pinniped-supervisor-api-tls-serving-certificate", + certificateName, kubeClient, secretInformer, controllerlib.WithInformer, - 23328000*time.Second, + 9*30*24*time.Hour, // about 9 months apicerts.TLSCertificateChainSecretKey, plog.New(), ), @@ -363,9 +364,9 @@ func prepareControllers( //nolint:funlen func runSupervisor(ctx context.Context, podInfo *downward.PodInfo, cfg *supervisor.Config) error { serverInstallationNamespace := podInfo.Namespace - oauthSupervisorGroupData := groupsuffix.SupervisorAggregatedGroups(*cfg.APIGroupSuffix) + clientSecretSupervisorGroupData := groupsuffix.SupervisorAggregatedGroups(*cfg.APIGroupSuffix) - apiServiceRef, err := apiserviceref.New(oauthSupervisorGroupData.APIServiceName()) + apiServiceRef, err := apiserviceref.New(clientSecretSupervisorGroupData.APIServiceName()) if err != nil { return fmt.Errorf("cannot create API service ref: %w", err) } @@ -429,9 +430,9 @@ func runSupervisor(ctx context.Context, podInfo *downward.PodInfo, cfg *supervis clientWithoutLeaderElection.Kubernetes.CoreV1().Secrets(serverInstallationNamespace), // writes to kube storage are allowed for non-leaders ) - // Get the "real" name of the oauth virtual supervisor API group (i.e., the API group name with the + // Get the "real" name of the client secret supervisor API group (i.e., the API group name with the // injected suffix). - scheme, oauthGV := supervisorscheme.New(*cfg.APIGroupSuffix) + scheme, clientSecretGV := supervisorscheme.New(*cfg.APIGroupSuffix) buildControllersFunc := prepareControllers( cfg, @@ -458,9 +459,9 @@ func runSupervisor(ctx context.Context, podInfo *downward.PodInfo, cfg *supervis dynamicServingCertProvider, buildControllersFunc, *cfg.APIGroupSuffix, - 10250, + *cfg.AggregatedAPIServerPort, scheme, - oauthGV, + clientSecretGV, ) if err != nil { return fmt.Errorf("could not configure aggregated API server: %w", err) @@ -561,16 +562,16 @@ func getAggregatedAPIServerConfig( apiGroupSuffix string, aggregatedAPIServerPort int64, scheme *runtime.Scheme, - oauthVirtualSupervisorGroupVersion schema.GroupVersion, + clientSecretSupervisorGroupVersion schema.GroupVersion, ) (*apiserver.Config, error) { codecs := serializer.NewCodecFactory(scheme) // this is unused for now but it is a safe value that we could use in the future - defaultEtcdPathPrefix := fmt.Sprintf("/pinniped-concierge-registry/%s", apiGroupSuffix) + defaultEtcdPathPrefix := fmt.Sprintf("/pinniped-supervisor-registry/%s", apiGroupSuffix) recommendedOptions := genericoptions.NewRecommendedOptions( defaultEtcdPathPrefix, - codecs.LegacyCodec(oauthVirtualSupervisorGroupVersion), + codecs.LegacyCodec(clientSecretSupervisorGroupVersion), ) recommendedOptions.Etcd = nil // turn off etcd storage because we don't need it yet recommendedOptions.SecureServing.ServerCert.GeneratedCert = dynamicCertProvider @@ -605,7 +606,7 @@ func getAggregatedAPIServerConfig( BuildControllersPostStartHook: buildControllers, Scheme: scheme, NegotiatedSerializer: codecs, - OauthVirtualSupervisorGroupVersion: oauthVirtualSupervisorGroupVersion, + ClientSecretSupervisorGroupVersion: clientSecretSupervisorGroupVersion, }, } return apiServerConfig, nil diff --git a/test/integration/kube_api_discovery_test.go b/test/integration/kube_api_discovery_test.go index 9c3b9602..c46d01bf 100644 --- a/test/integration/kube_api_discovery_test.go +++ b/test/integration/kube_api_discovery_test.go @@ -53,7 +53,7 @@ func TestGetAPIResourceList(t *testing.T) { configConciergeGV := makeGV("config", "concierge") idpSupervisorGV := makeGV("idp", "supervisor") configSupervisorGV := makeGV("config", "supervisor") - oauthVirtualSupervisorGV := makeGV("clientsecret", "supervisor") + clientSecretSupervisorGV := makeGV("clientsecret", "supervisor") tests := []struct { group metav1.APIGroup @@ -113,26 +113,26 @@ func TestGetAPIResourceList(t *testing.T) { }, { group: metav1.APIGroup{ - Name: oauthVirtualSupervisorGV.Group, + Name: clientSecretSupervisorGV.Group, Versions: []metav1.GroupVersionForDiscovery{ { - GroupVersion: oauthVirtualSupervisorGV.String(), - Version: oauthVirtualSupervisorGV.Version, + GroupVersion: clientSecretSupervisorGV.String(), + Version: clientSecretSupervisorGV.Version, }, }, PreferredVersion: metav1.GroupVersionForDiscovery{ - GroupVersion: oauthVirtualSupervisorGV.String(), - Version: oauthVirtualSupervisorGV.Version, + GroupVersion: clientSecretSupervisorGV.String(), + Version: clientSecretSupervisorGV.Version, }, }, resourceByVersion: map[string][]metav1.APIResource{ - oauthVirtualSupervisorGV.String(): { + clientSecretSupervisorGV.String(): { { Name: "oidcclientsecretrequests", Kind: "OIDCClientSecretRequest", - Verbs: []string{"create"}, + Verbs: []string{"create", "list"}, Namespaced: true, - Categories: nil, + Categories: []string{"pinniped"}, }, }, }, @@ -354,11 +354,6 @@ func TestGetAPIResourceList(t *testing.T) { if strings.HasSuffix(a.Name, "/status") { continue } - if a.Name == "oidcclientsecretrequests" { - // OIDCClientSecretRequest does not implement list, - // so it doesn't make sense for it to belong to a category. - continue - } assert.Containsf(t, a.Categories, "pinniped", "expected resource %q to be in the 'pinniped' category", a.Name) assert.NotContainsf(t, a.Categories, "all", "expected resource %q not to be in the 'all' category", a.Name) } From ff26c424ae4701f6ba500ccd49a4201f6ee84141 Mon Sep 17 00:00:00 2001 From: Margo Crawford Date: Wed, 15 Jun 2022 10:19:56 -0700 Subject: [PATCH 08/11] Remove unused role binding Signed-off-by: Margo Crawford --- deploy/supervisor/rbac.yaml | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/deploy/supervisor/rbac.yaml b/deploy/supervisor/rbac.yaml index 8fe7e58d..a56818fe 100644 --- a/deploy/supervisor/rbac.yaml +++ b/deploy/supervisor/rbac.yaml @@ -92,18 +92,6 @@ roleRef: name: extension-apiserver-authentication-reader apiGroup: rbac.authorization.k8s.io -#! Give permission to list and watch ConfigMaps in kube-public ---- -kind: Role -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: #@ defaultResourceNameWithSuffix("cluster-info-lister-watcher") - namespace: kube-public - labels: #@ labels() -rules: - - apiGroups: [ "" ] - resources: [ configmaps ] - verbs: [ list, watch ] #! Give permissions for subjectaccessreviews, tokenreview that is needed by aggregated api servers --- kind: ClusterRoleBinding @@ -119,21 +107,6 @@ roleRef: kind: ClusterRole name: system:auth-delegator apiGroup: rbac.authorization.k8s.io ---- -kind: RoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: #@ defaultResourceNameWithSuffix("cluster-info-lister-watcher") - namespace: kube-public - labels: #@ labels() -subjects: - - kind: ServiceAccount - name: #@ defaultResourceName() - namespace: #@ namespace() -roleRef: - kind: Role - name: #@ defaultResourceNameWithSuffix("cluster-info-lister-watcher") - apiGroup: rbac.authorization.k8s.io #! Give permission to various cluster-scoped objects --- From 59d67322d3a91a5c222a943cb47668b529f9f462 Mon Sep 17 00:00:00 2001 From: Monis Khan Date: Mon, 13 Jun 2022 20:06:47 -0400 Subject: [PATCH 09/11] Static validation for OIDC clients The following validation is enforced: 1. Names must start with client.oauth.pinniped.dev- 2. Redirect URIs must start with https:// or http://127.0.0.1 or http://::1 3. All spec lists must not have duplicates Added an integration test to assert all static validations. Signed-off-by: Monis Khan --- .../config/v1alpha1/types_oidcclient.go.tmpl | 11 +- ...g.supervisor.pinniped.dev_oidcclients.yaml | 10 +- deploy/supervisor/z0_crd_overlay.yaml | 12 + generated/1.17/README.adoc | 2 +- .../config/v1alpha1/types_oidcclient.go | 11 +- .../config/v1alpha1/zz_generated.deepcopy.go | 2 +- ...g.supervisor.pinniped.dev_oidcclients.yaml | 10 +- generated/1.18/README.adoc | 2 +- .../config/v1alpha1/types_oidcclient.go | 11 +- .../config/v1alpha1/zz_generated.deepcopy.go | 2 +- ...g.supervisor.pinniped.dev_oidcclients.yaml | 10 +- generated/1.19/README.adoc | 2 +- .../config/v1alpha1/types_oidcclient.go | 11 +- .../config/v1alpha1/zz_generated.deepcopy.go | 2 +- ...g.supervisor.pinniped.dev_oidcclients.yaml | 10 +- generated/1.20/README.adoc | 2 +- .../config/v1alpha1/types_oidcclient.go | 11 +- .../config/v1alpha1/zz_generated.deepcopy.go | 2 +- ...g.supervisor.pinniped.dev_oidcclients.yaml | 10 +- generated/1.21/README.adoc | 2 +- .../config/v1alpha1/types_oidcclient.go | 11 +- .../config/v1alpha1/zz_generated.deepcopy.go | 2 +- ...g.supervisor.pinniped.dev_oidcclients.yaml | 10 +- generated/1.22/README.adoc | 2 +- .../config/v1alpha1/types_oidcclient.go | 11 +- .../config/v1alpha1/zz_generated.deepcopy.go | 2 +- ...g.supervisor.pinniped.dev_oidcclients.yaml | 10 +- generated/1.23/README.adoc | 2 +- .../config/v1alpha1/types_oidcclient.go | 11 +- .../config/v1alpha1/zz_generated.deepcopy.go | 2 +- ...g.supervisor.pinniped.dev_oidcclients.yaml | 10 +- generated/1.24/README.adoc | 2 +- .../config/v1alpha1/types_oidcclient.go | 11 +- .../config/v1alpha1/zz_generated.deepcopy.go | 2 +- ...g.supervisor.pinniped.dev_oidcclients.yaml | 10 +- .../config/v1alpha1/types_oidcclient.go | 11 +- .../config/v1alpha1/zz_generated.deepcopy.go | 2 +- internal/oidc/oidc.go | 3 + test/integration/oidc_client_test.go | 408 ++++++++++++++++++ 39 files changed, 602 insertions(+), 55 deletions(-) create mode 100644 test/integration/oidc_client_test.go diff --git a/apis/supervisor/config/v1alpha1/types_oidcclient.go.tmpl b/apis/supervisor/config/v1alpha1/types_oidcclient.go.tmpl index e905c61a..17a1103f 100644 --- a/apis/supervisor/config/v1alpha1/types_oidcclient.go.tmpl +++ b/apis/supervisor/config/v1alpha1/types_oidcclient.go.tmpl @@ -7,6 +7,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +// +kubebuilder:validation:Pattern=`^https://.+|^http://(127\.0\.0\.1|\[::1\])(:\d+)?/` +type RedirectURI string + // +kubebuilder:validation:Enum="authorization_code";"refresh_token";"urn:ietf:params:oauth:grant-type:token-exchange" type GrantType string @@ -17,9 +20,11 @@ type Scope string type OIDCClientSpec struct { // allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this // client. Any other uris will be rejected. - // Must be https, unless it is a loopback. + // Must be a URI with the https scheme, unless the hostname is 127.0.0.1 or ::1 which may use the http scheme. + // Port numbers are not required for 127.0.0.1 or ::1 and are ignored when checking for a matching redirect_uri. + // +listType=set // +kubebuilder:validation:MinItems=1 - AllowedRedirectURIs []string `json:"allowedRedirectURIs"` + AllowedRedirectURIs []RedirectURI `json:"allowedRedirectURIs"` // allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this // client. @@ -32,6 +37,7 @@ type OIDCClientSpec struct { // - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, // which is a step in the process to be able to get a cluster credential for the user. // This grant must be listed if allowedScopes lists pinniped:request-audience. + // +listType=set // +kubebuilder:validation:MinItems=1 AllowedGrantTypes []GrantType `json:"allowedGrantTypes"` @@ -51,6 +57,7 @@ type OIDCClientSpec struct { // - groups: The client is allowed to request that ID tokens contain the user's group membership, // if their group membership is discoverable by the Supervisor. // Without the groups scope being requested and allowed, the ID token will not contain groups. + // +listType=set // +kubebuilder:validation:MinItems=1 AllowedScopes []Scope `json:"allowedScopes"` } diff --git a/deploy/supervisor/config.supervisor.pinniped.dev_oidcclients.yaml b/deploy/supervisor/config.supervisor.pinniped.dev_oidcclients.yaml index 4efa445e..6030582f 100644 --- a/deploy/supervisor/config.supervisor.pinniped.dev_oidcclients.yaml +++ b/deploy/supervisor/config.supervisor.pinniped.dev_oidcclients.yaml @@ -61,15 +61,20 @@ spec: type: string minItems: 1 type: array + x-kubernetes-list-type: set allowedRedirectURIs: description: allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this - client. Any other uris will be rejected. Must be https, unless it - is a loopback. + client. Any other uris will be rejected. Must be a URI with the + https scheme, unless the hostname is 127.0.0.1 or ::1 which may + use the http scheme. Port numbers are not required for 127.0.0.1 + or ::1 and are ignored when checking for a matching redirect_uri. items: + pattern: ^https://.+|^http://(127\.0\.0\.1|\[::1\])(:\d+)?/ type: string minItems: 1 type: array + x-kubernetes-list-type: set allowedScopes: description: "allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. @@ -102,6 +107,7 @@ spec: type: string minItems: 1 type: array + x-kubernetes-list-type: set required: - allowedGrantTypes - allowedRedirectURIs diff --git a/deploy/supervisor/z0_crd_overlay.yaml b/deploy/supervisor/z0_crd_overlay.yaml index a658091b..f7a50a88 100644 --- a/deploy/supervisor/z0_crd_overlay.yaml +++ b/deploy/supervisor/z0_crd_overlay.yaml @@ -49,3 +49,15 @@ metadata: name: #@ pinnipedDevAPIGroupWithPrefix("oidcclients.config.supervisor") spec: group: #@ pinnipedDevAPIGroupWithPrefix("config.supervisor") + versions: + #@overlay/match by=overlay.all, expects="1+" + - schema: + openAPIV3Schema: + #@overlay/match by=overlay.subset({"metadata":{"type":"object"}}), expects=1 + properties: + metadata: + #@overlay/match missing_ok=True + properties: + name: + pattern: ^client\.oauth\.pinniped\.dev- + type: string diff --git a/generated/1.17/README.adoc b/generated/1.17/README.adoc index 624f035f..33ccf479 100644 --- a/generated/1.17/README.adoc +++ b/generated/1.17/README.adoc @@ -578,7 +578,7 @@ OIDCClientSpec is a struct that describes an OIDC Client. [cols="25a,75a", options="header"] |=== | Field | Description -| *`allowedRedirectURIs`* __string array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be https, unless it is a loopback. +| *`allowedRedirectURIs`* __RedirectURI array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be a URI with the https scheme, unless the hostname is 127.0.0.1 or ::1 which may use the http scheme. Port numbers are not required for 127.0.0.1 or ::1 and are ignored when checking for a matching redirect_uri. | *`allowedGrantTypes`* __GrantType array__ | allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this client. Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. | *`allowedScopes`* __Scope array__ | allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. diff --git a/generated/1.17/apis/supervisor/config/v1alpha1/types_oidcclient.go b/generated/1.17/apis/supervisor/config/v1alpha1/types_oidcclient.go index e905c61a..17a1103f 100644 --- a/generated/1.17/apis/supervisor/config/v1alpha1/types_oidcclient.go +++ b/generated/1.17/apis/supervisor/config/v1alpha1/types_oidcclient.go @@ -7,6 +7,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +// +kubebuilder:validation:Pattern=`^https://.+|^http://(127\.0\.0\.1|\[::1\])(:\d+)?/` +type RedirectURI string + // +kubebuilder:validation:Enum="authorization_code";"refresh_token";"urn:ietf:params:oauth:grant-type:token-exchange" type GrantType string @@ -17,9 +20,11 @@ type Scope string type OIDCClientSpec struct { // allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this // client. Any other uris will be rejected. - // Must be https, unless it is a loopback. + // Must be a URI with the https scheme, unless the hostname is 127.0.0.1 or ::1 which may use the http scheme. + // Port numbers are not required for 127.0.0.1 or ::1 and are ignored when checking for a matching redirect_uri. + // +listType=set // +kubebuilder:validation:MinItems=1 - AllowedRedirectURIs []string `json:"allowedRedirectURIs"` + AllowedRedirectURIs []RedirectURI `json:"allowedRedirectURIs"` // allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this // client. @@ -32,6 +37,7 @@ type OIDCClientSpec struct { // - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, // which is a step in the process to be able to get a cluster credential for the user. // This grant must be listed if allowedScopes lists pinniped:request-audience. + // +listType=set // +kubebuilder:validation:MinItems=1 AllowedGrantTypes []GrantType `json:"allowedGrantTypes"` @@ -51,6 +57,7 @@ type OIDCClientSpec struct { // - groups: The client is allowed to request that ID tokens contain the user's group membership, // if their group membership is discoverable by the Supervisor. // Without the groups scope being requested and allowed, the ID token will not contain groups. + // +listType=set // +kubebuilder:validation:MinItems=1 AllowedScopes []Scope `json:"allowedScopes"` } diff --git a/generated/1.17/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go b/generated/1.17/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go index a55d88e7..f4468886 100644 --- a/generated/1.17/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go +++ b/generated/1.17/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go @@ -217,7 +217,7 @@ func (in *OIDCClientSpec) DeepCopyInto(out *OIDCClientSpec) { *out = *in if in.AllowedRedirectURIs != nil { in, out := &in.AllowedRedirectURIs, &out.AllowedRedirectURIs - *out = make([]string, len(*in)) + *out = make([]RedirectURI, len(*in)) copy(*out, *in) } if in.AllowedGrantTypes != nil { diff --git a/generated/1.17/crds/config.supervisor.pinniped.dev_oidcclients.yaml b/generated/1.17/crds/config.supervisor.pinniped.dev_oidcclients.yaml index 4efa445e..6030582f 100644 --- a/generated/1.17/crds/config.supervisor.pinniped.dev_oidcclients.yaml +++ b/generated/1.17/crds/config.supervisor.pinniped.dev_oidcclients.yaml @@ -61,15 +61,20 @@ spec: type: string minItems: 1 type: array + x-kubernetes-list-type: set allowedRedirectURIs: description: allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this - client. Any other uris will be rejected. Must be https, unless it - is a loopback. + client. Any other uris will be rejected. Must be a URI with the + https scheme, unless the hostname is 127.0.0.1 or ::1 which may + use the http scheme. Port numbers are not required for 127.0.0.1 + or ::1 and are ignored when checking for a matching redirect_uri. items: + pattern: ^https://.+|^http://(127\.0\.0\.1|\[::1\])(:\d+)?/ type: string minItems: 1 type: array + x-kubernetes-list-type: set allowedScopes: description: "allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. @@ -102,6 +107,7 @@ spec: type: string minItems: 1 type: array + x-kubernetes-list-type: set required: - allowedGrantTypes - allowedRedirectURIs diff --git a/generated/1.18/README.adoc b/generated/1.18/README.adoc index 63ec9f13..c8f1cdb1 100644 --- a/generated/1.18/README.adoc +++ b/generated/1.18/README.adoc @@ -578,7 +578,7 @@ OIDCClientSpec is a struct that describes an OIDC Client. [cols="25a,75a", options="header"] |=== | Field | Description -| *`allowedRedirectURIs`* __string array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be https, unless it is a loopback. +| *`allowedRedirectURIs`* __RedirectURI array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be a URI with the https scheme, unless the hostname is 127.0.0.1 or ::1 which may use the http scheme. Port numbers are not required for 127.0.0.1 or ::1 and are ignored when checking for a matching redirect_uri. | *`allowedGrantTypes`* __GrantType array__ | allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this client. Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. | *`allowedScopes`* __Scope array__ | allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. diff --git a/generated/1.18/apis/supervisor/config/v1alpha1/types_oidcclient.go b/generated/1.18/apis/supervisor/config/v1alpha1/types_oidcclient.go index e905c61a..17a1103f 100644 --- a/generated/1.18/apis/supervisor/config/v1alpha1/types_oidcclient.go +++ b/generated/1.18/apis/supervisor/config/v1alpha1/types_oidcclient.go @@ -7,6 +7,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +// +kubebuilder:validation:Pattern=`^https://.+|^http://(127\.0\.0\.1|\[::1\])(:\d+)?/` +type RedirectURI string + // +kubebuilder:validation:Enum="authorization_code";"refresh_token";"urn:ietf:params:oauth:grant-type:token-exchange" type GrantType string @@ -17,9 +20,11 @@ type Scope string type OIDCClientSpec struct { // allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this // client. Any other uris will be rejected. - // Must be https, unless it is a loopback. + // Must be a URI with the https scheme, unless the hostname is 127.0.0.1 or ::1 which may use the http scheme. + // Port numbers are not required for 127.0.0.1 or ::1 and are ignored when checking for a matching redirect_uri. + // +listType=set // +kubebuilder:validation:MinItems=1 - AllowedRedirectURIs []string `json:"allowedRedirectURIs"` + AllowedRedirectURIs []RedirectURI `json:"allowedRedirectURIs"` // allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this // client. @@ -32,6 +37,7 @@ type OIDCClientSpec struct { // - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, // which is a step in the process to be able to get a cluster credential for the user. // This grant must be listed if allowedScopes lists pinniped:request-audience. + // +listType=set // +kubebuilder:validation:MinItems=1 AllowedGrantTypes []GrantType `json:"allowedGrantTypes"` @@ -51,6 +57,7 @@ type OIDCClientSpec struct { // - groups: The client is allowed to request that ID tokens contain the user's group membership, // if their group membership is discoverable by the Supervisor. // Without the groups scope being requested and allowed, the ID token will not contain groups. + // +listType=set // +kubebuilder:validation:MinItems=1 AllowedScopes []Scope `json:"allowedScopes"` } diff --git a/generated/1.18/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go b/generated/1.18/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go index a55d88e7..f4468886 100644 --- a/generated/1.18/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go +++ b/generated/1.18/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go @@ -217,7 +217,7 @@ func (in *OIDCClientSpec) DeepCopyInto(out *OIDCClientSpec) { *out = *in if in.AllowedRedirectURIs != nil { in, out := &in.AllowedRedirectURIs, &out.AllowedRedirectURIs - *out = make([]string, len(*in)) + *out = make([]RedirectURI, len(*in)) copy(*out, *in) } if in.AllowedGrantTypes != nil { diff --git a/generated/1.18/crds/config.supervisor.pinniped.dev_oidcclients.yaml b/generated/1.18/crds/config.supervisor.pinniped.dev_oidcclients.yaml index 4efa445e..6030582f 100644 --- a/generated/1.18/crds/config.supervisor.pinniped.dev_oidcclients.yaml +++ b/generated/1.18/crds/config.supervisor.pinniped.dev_oidcclients.yaml @@ -61,15 +61,20 @@ spec: type: string minItems: 1 type: array + x-kubernetes-list-type: set allowedRedirectURIs: description: allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this - client. Any other uris will be rejected. Must be https, unless it - is a loopback. + client. Any other uris will be rejected. Must be a URI with the + https scheme, unless the hostname is 127.0.0.1 or ::1 which may + use the http scheme. Port numbers are not required for 127.0.0.1 + or ::1 and are ignored when checking for a matching redirect_uri. items: + pattern: ^https://.+|^http://(127\.0\.0\.1|\[::1\])(:\d+)?/ type: string minItems: 1 type: array + x-kubernetes-list-type: set allowedScopes: description: "allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. @@ -102,6 +107,7 @@ spec: type: string minItems: 1 type: array + x-kubernetes-list-type: set required: - allowedGrantTypes - allowedRedirectURIs diff --git a/generated/1.19/README.adoc b/generated/1.19/README.adoc index f04d438f..2db7eb41 100644 --- a/generated/1.19/README.adoc +++ b/generated/1.19/README.adoc @@ -578,7 +578,7 @@ OIDCClientSpec is a struct that describes an OIDC Client. [cols="25a,75a", options="header"] |=== | Field | Description -| *`allowedRedirectURIs`* __string array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be https, unless it is a loopback. +| *`allowedRedirectURIs`* __RedirectURI array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be a URI with the https scheme, unless the hostname is 127.0.0.1 or ::1 which may use the http scheme. Port numbers are not required for 127.0.0.1 or ::1 and are ignored when checking for a matching redirect_uri. | *`allowedGrantTypes`* __GrantType array__ | allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this client. Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. | *`allowedScopes`* __Scope array__ | allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. diff --git a/generated/1.19/apis/supervisor/config/v1alpha1/types_oidcclient.go b/generated/1.19/apis/supervisor/config/v1alpha1/types_oidcclient.go index e905c61a..17a1103f 100644 --- a/generated/1.19/apis/supervisor/config/v1alpha1/types_oidcclient.go +++ b/generated/1.19/apis/supervisor/config/v1alpha1/types_oidcclient.go @@ -7,6 +7,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +// +kubebuilder:validation:Pattern=`^https://.+|^http://(127\.0\.0\.1|\[::1\])(:\d+)?/` +type RedirectURI string + // +kubebuilder:validation:Enum="authorization_code";"refresh_token";"urn:ietf:params:oauth:grant-type:token-exchange" type GrantType string @@ -17,9 +20,11 @@ type Scope string type OIDCClientSpec struct { // allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this // client. Any other uris will be rejected. - // Must be https, unless it is a loopback. + // Must be a URI with the https scheme, unless the hostname is 127.0.0.1 or ::1 which may use the http scheme. + // Port numbers are not required for 127.0.0.1 or ::1 and are ignored when checking for a matching redirect_uri. + // +listType=set // +kubebuilder:validation:MinItems=1 - AllowedRedirectURIs []string `json:"allowedRedirectURIs"` + AllowedRedirectURIs []RedirectURI `json:"allowedRedirectURIs"` // allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this // client. @@ -32,6 +37,7 @@ type OIDCClientSpec struct { // - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, // which is a step in the process to be able to get a cluster credential for the user. // This grant must be listed if allowedScopes lists pinniped:request-audience. + // +listType=set // +kubebuilder:validation:MinItems=1 AllowedGrantTypes []GrantType `json:"allowedGrantTypes"` @@ -51,6 +57,7 @@ type OIDCClientSpec struct { // - groups: The client is allowed to request that ID tokens contain the user's group membership, // if their group membership is discoverable by the Supervisor. // Without the groups scope being requested and allowed, the ID token will not contain groups. + // +listType=set // +kubebuilder:validation:MinItems=1 AllowedScopes []Scope `json:"allowedScopes"` } diff --git a/generated/1.19/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go b/generated/1.19/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go index a55d88e7..f4468886 100644 --- a/generated/1.19/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go +++ b/generated/1.19/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go @@ -217,7 +217,7 @@ func (in *OIDCClientSpec) DeepCopyInto(out *OIDCClientSpec) { *out = *in if in.AllowedRedirectURIs != nil { in, out := &in.AllowedRedirectURIs, &out.AllowedRedirectURIs - *out = make([]string, len(*in)) + *out = make([]RedirectURI, len(*in)) copy(*out, *in) } if in.AllowedGrantTypes != nil { diff --git a/generated/1.19/crds/config.supervisor.pinniped.dev_oidcclients.yaml b/generated/1.19/crds/config.supervisor.pinniped.dev_oidcclients.yaml index 4efa445e..6030582f 100644 --- a/generated/1.19/crds/config.supervisor.pinniped.dev_oidcclients.yaml +++ b/generated/1.19/crds/config.supervisor.pinniped.dev_oidcclients.yaml @@ -61,15 +61,20 @@ spec: type: string minItems: 1 type: array + x-kubernetes-list-type: set allowedRedirectURIs: description: allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this - client. Any other uris will be rejected. Must be https, unless it - is a loopback. + client. Any other uris will be rejected. Must be a URI with the + https scheme, unless the hostname is 127.0.0.1 or ::1 which may + use the http scheme. Port numbers are not required for 127.0.0.1 + or ::1 and are ignored when checking for a matching redirect_uri. items: + pattern: ^https://.+|^http://(127\.0\.0\.1|\[::1\])(:\d+)?/ type: string minItems: 1 type: array + x-kubernetes-list-type: set allowedScopes: description: "allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. @@ -102,6 +107,7 @@ spec: type: string minItems: 1 type: array + x-kubernetes-list-type: set required: - allowedGrantTypes - allowedRedirectURIs diff --git a/generated/1.20/README.adoc b/generated/1.20/README.adoc index 2e989cd3..2eaf98f6 100644 --- a/generated/1.20/README.adoc +++ b/generated/1.20/README.adoc @@ -578,7 +578,7 @@ OIDCClientSpec is a struct that describes an OIDC Client. [cols="25a,75a", options="header"] |=== | Field | Description -| *`allowedRedirectURIs`* __string array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be https, unless it is a loopback. +| *`allowedRedirectURIs`* __RedirectURI array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be a URI with the https scheme, unless the hostname is 127.0.0.1 or ::1 which may use the http scheme. Port numbers are not required for 127.0.0.1 or ::1 and are ignored when checking for a matching redirect_uri. | *`allowedGrantTypes`* __GrantType array__ | allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this client. Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. | *`allowedScopes`* __Scope array__ | allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. diff --git a/generated/1.20/apis/supervisor/config/v1alpha1/types_oidcclient.go b/generated/1.20/apis/supervisor/config/v1alpha1/types_oidcclient.go index e905c61a..17a1103f 100644 --- a/generated/1.20/apis/supervisor/config/v1alpha1/types_oidcclient.go +++ b/generated/1.20/apis/supervisor/config/v1alpha1/types_oidcclient.go @@ -7,6 +7,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +// +kubebuilder:validation:Pattern=`^https://.+|^http://(127\.0\.0\.1|\[::1\])(:\d+)?/` +type RedirectURI string + // +kubebuilder:validation:Enum="authorization_code";"refresh_token";"urn:ietf:params:oauth:grant-type:token-exchange" type GrantType string @@ -17,9 +20,11 @@ type Scope string type OIDCClientSpec struct { // allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this // client. Any other uris will be rejected. - // Must be https, unless it is a loopback. + // Must be a URI with the https scheme, unless the hostname is 127.0.0.1 or ::1 which may use the http scheme. + // Port numbers are not required for 127.0.0.1 or ::1 and are ignored when checking for a matching redirect_uri. + // +listType=set // +kubebuilder:validation:MinItems=1 - AllowedRedirectURIs []string `json:"allowedRedirectURIs"` + AllowedRedirectURIs []RedirectURI `json:"allowedRedirectURIs"` // allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this // client. @@ -32,6 +37,7 @@ type OIDCClientSpec struct { // - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, // which is a step in the process to be able to get a cluster credential for the user. // This grant must be listed if allowedScopes lists pinniped:request-audience. + // +listType=set // +kubebuilder:validation:MinItems=1 AllowedGrantTypes []GrantType `json:"allowedGrantTypes"` @@ -51,6 +57,7 @@ type OIDCClientSpec struct { // - groups: The client is allowed to request that ID tokens contain the user's group membership, // if their group membership is discoverable by the Supervisor. // Without the groups scope being requested and allowed, the ID token will not contain groups. + // +listType=set // +kubebuilder:validation:MinItems=1 AllowedScopes []Scope `json:"allowedScopes"` } diff --git a/generated/1.20/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go b/generated/1.20/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go index a55d88e7..f4468886 100644 --- a/generated/1.20/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go +++ b/generated/1.20/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go @@ -217,7 +217,7 @@ func (in *OIDCClientSpec) DeepCopyInto(out *OIDCClientSpec) { *out = *in if in.AllowedRedirectURIs != nil { in, out := &in.AllowedRedirectURIs, &out.AllowedRedirectURIs - *out = make([]string, len(*in)) + *out = make([]RedirectURI, len(*in)) copy(*out, *in) } if in.AllowedGrantTypes != nil { diff --git a/generated/1.20/crds/config.supervisor.pinniped.dev_oidcclients.yaml b/generated/1.20/crds/config.supervisor.pinniped.dev_oidcclients.yaml index 4efa445e..6030582f 100644 --- a/generated/1.20/crds/config.supervisor.pinniped.dev_oidcclients.yaml +++ b/generated/1.20/crds/config.supervisor.pinniped.dev_oidcclients.yaml @@ -61,15 +61,20 @@ spec: type: string minItems: 1 type: array + x-kubernetes-list-type: set allowedRedirectURIs: description: allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this - client. Any other uris will be rejected. Must be https, unless it - is a loopback. + client. Any other uris will be rejected. Must be a URI with the + https scheme, unless the hostname is 127.0.0.1 or ::1 which may + use the http scheme. Port numbers are not required for 127.0.0.1 + or ::1 and are ignored when checking for a matching redirect_uri. items: + pattern: ^https://.+|^http://(127\.0\.0\.1|\[::1\])(:\d+)?/ type: string minItems: 1 type: array + x-kubernetes-list-type: set allowedScopes: description: "allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. @@ -102,6 +107,7 @@ spec: type: string minItems: 1 type: array + x-kubernetes-list-type: set required: - allowedGrantTypes - allowedRedirectURIs diff --git a/generated/1.21/README.adoc b/generated/1.21/README.adoc index 7635b9a6..5a8ed2ea 100644 --- a/generated/1.21/README.adoc +++ b/generated/1.21/README.adoc @@ -578,7 +578,7 @@ OIDCClientSpec is a struct that describes an OIDC Client. [cols="25a,75a", options="header"] |=== | Field | Description -| *`allowedRedirectURIs`* __string array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be https, unless it is a loopback. +| *`allowedRedirectURIs`* __RedirectURI array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be a URI with the https scheme, unless the hostname is 127.0.0.1 or ::1 which may use the http scheme. Port numbers are not required for 127.0.0.1 or ::1 and are ignored when checking for a matching redirect_uri. | *`allowedGrantTypes`* __GrantType array__ | allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this client. Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. | *`allowedScopes`* __Scope array__ | allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. diff --git a/generated/1.21/apis/supervisor/config/v1alpha1/types_oidcclient.go b/generated/1.21/apis/supervisor/config/v1alpha1/types_oidcclient.go index e905c61a..17a1103f 100644 --- a/generated/1.21/apis/supervisor/config/v1alpha1/types_oidcclient.go +++ b/generated/1.21/apis/supervisor/config/v1alpha1/types_oidcclient.go @@ -7,6 +7,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +// +kubebuilder:validation:Pattern=`^https://.+|^http://(127\.0\.0\.1|\[::1\])(:\d+)?/` +type RedirectURI string + // +kubebuilder:validation:Enum="authorization_code";"refresh_token";"urn:ietf:params:oauth:grant-type:token-exchange" type GrantType string @@ -17,9 +20,11 @@ type Scope string type OIDCClientSpec struct { // allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this // client. Any other uris will be rejected. - // Must be https, unless it is a loopback. + // Must be a URI with the https scheme, unless the hostname is 127.0.0.1 or ::1 which may use the http scheme. + // Port numbers are not required for 127.0.0.1 or ::1 and are ignored when checking for a matching redirect_uri. + // +listType=set // +kubebuilder:validation:MinItems=1 - AllowedRedirectURIs []string `json:"allowedRedirectURIs"` + AllowedRedirectURIs []RedirectURI `json:"allowedRedirectURIs"` // allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this // client. @@ -32,6 +37,7 @@ type OIDCClientSpec struct { // - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, // which is a step in the process to be able to get a cluster credential for the user. // This grant must be listed if allowedScopes lists pinniped:request-audience. + // +listType=set // +kubebuilder:validation:MinItems=1 AllowedGrantTypes []GrantType `json:"allowedGrantTypes"` @@ -51,6 +57,7 @@ type OIDCClientSpec struct { // - groups: The client is allowed to request that ID tokens contain the user's group membership, // if their group membership is discoverable by the Supervisor. // Without the groups scope being requested and allowed, the ID token will not contain groups. + // +listType=set // +kubebuilder:validation:MinItems=1 AllowedScopes []Scope `json:"allowedScopes"` } diff --git a/generated/1.21/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go b/generated/1.21/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go index a55d88e7..f4468886 100644 --- a/generated/1.21/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go +++ b/generated/1.21/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go @@ -217,7 +217,7 @@ func (in *OIDCClientSpec) DeepCopyInto(out *OIDCClientSpec) { *out = *in if in.AllowedRedirectURIs != nil { in, out := &in.AllowedRedirectURIs, &out.AllowedRedirectURIs - *out = make([]string, len(*in)) + *out = make([]RedirectURI, len(*in)) copy(*out, *in) } if in.AllowedGrantTypes != nil { diff --git a/generated/1.21/crds/config.supervisor.pinniped.dev_oidcclients.yaml b/generated/1.21/crds/config.supervisor.pinniped.dev_oidcclients.yaml index 4efa445e..6030582f 100644 --- a/generated/1.21/crds/config.supervisor.pinniped.dev_oidcclients.yaml +++ b/generated/1.21/crds/config.supervisor.pinniped.dev_oidcclients.yaml @@ -61,15 +61,20 @@ spec: type: string minItems: 1 type: array + x-kubernetes-list-type: set allowedRedirectURIs: description: allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this - client. Any other uris will be rejected. Must be https, unless it - is a loopback. + client. Any other uris will be rejected. Must be a URI with the + https scheme, unless the hostname is 127.0.0.1 or ::1 which may + use the http scheme. Port numbers are not required for 127.0.0.1 + or ::1 and are ignored when checking for a matching redirect_uri. items: + pattern: ^https://.+|^http://(127\.0\.0\.1|\[::1\])(:\d+)?/ type: string minItems: 1 type: array + x-kubernetes-list-type: set allowedScopes: description: "allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. @@ -102,6 +107,7 @@ spec: type: string minItems: 1 type: array + x-kubernetes-list-type: set required: - allowedGrantTypes - allowedRedirectURIs diff --git a/generated/1.22/README.adoc b/generated/1.22/README.adoc index 5ba5e839..39973f52 100644 --- a/generated/1.22/README.adoc +++ b/generated/1.22/README.adoc @@ -578,7 +578,7 @@ OIDCClientSpec is a struct that describes an OIDC Client. [cols="25a,75a", options="header"] |=== | Field | Description -| *`allowedRedirectURIs`* __string array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be https, unless it is a loopback. +| *`allowedRedirectURIs`* __RedirectURI array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be a URI with the https scheme, unless the hostname is 127.0.0.1 or ::1 which may use the http scheme. Port numbers are not required for 127.0.0.1 or ::1 and are ignored when checking for a matching redirect_uri. | *`allowedGrantTypes`* __GrantType array__ | allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this client. Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. | *`allowedScopes`* __Scope array__ | allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. diff --git a/generated/1.22/apis/supervisor/config/v1alpha1/types_oidcclient.go b/generated/1.22/apis/supervisor/config/v1alpha1/types_oidcclient.go index e905c61a..17a1103f 100644 --- a/generated/1.22/apis/supervisor/config/v1alpha1/types_oidcclient.go +++ b/generated/1.22/apis/supervisor/config/v1alpha1/types_oidcclient.go @@ -7,6 +7,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +// +kubebuilder:validation:Pattern=`^https://.+|^http://(127\.0\.0\.1|\[::1\])(:\d+)?/` +type RedirectURI string + // +kubebuilder:validation:Enum="authorization_code";"refresh_token";"urn:ietf:params:oauth:grant-type:token-exchange" type GrantType string @@ -17,9 +20,11 @@ type Scope string type OIDCClientSpec struct { // allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this // client. Any other uris will be rejected. - // Must be https, unless it is a loopback. + // Must be a URI with the https scheme, unless the hostname is 127.0.0.1 or ::1 which may use the http scheme. + // Port numbers are not required for 127.0.0.1 or ::1 and are ignored when checking for a matching redirect_uri. + // +listType=set // +kubebuilder:validation:MinItems=1 - AllowedRedirectURIs []string `json:"allowedRedirectURIs"` + AllowedRedirectURIs []RedirectURI `json:"allowedRedirectURIs"` // allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this // client. @@ -32,6 +37,7 @@ type OIDCClientSpec struct { // - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, // which is a step in the process to be able to get a cluster credential for the user. // This grant must be listed if allowedScopes lists pinniped:request-audience. + // +listType=set // +kubebuilder:validation:MinItems=1 AllowedGrantTypes []GrantType `json:"allowedGrantTypes"` @@ -51,6 +57,7 @@ type OIDCClientSpec struct { // - groups: The client is allowed to request that ID tokens contain the user's group membership, // if their group membership is discoverable by the Supervisor. // Without the groups scope being requested and allowed, the ID token will not contain groups. + // +listType=set // +kubebuilder:validation:MinItems=1 AllowedScopes []Scope `json:"allowedScopes"` } diff --git a/generated/1.22/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go b/generated/1.22/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go index a55d88e7..f4468886 100644 --- a/generated/1.22/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go +++ b/generated/1.22/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go @@ -217,7 +217,7 @@ func (in *OIDCClientSpec) DeepCopyInto(out *OIDCClientSpec) { *out = *in if in.AllowedRedirectURIs != nil { in, out := &in.AllowedRedirectURIs, &out.AllowedRedirectURIs - *out = make([]string, len(*in)) + *out = make([]RedirectURI, len(*in)) copy(*out, *in) } if in.AllowedGrantTypes != nil { diff --git a/generated/1.22/crds/config.supervisor.pinniped.dev_oidcclients.yaml b/generated/1.22/crds/config.supervisor.pinniped.dev_oidcclients.yaml index 4efa445e..6030582f 100644 --- a/generated/1.22/crds/config.supervisor.pinniped.dev_oidcclients.yaml +++ b/generated/1.22/crds/config.supervisor.pinniped.dev_oidcclients.yaml @@ -61,15 +61,20 @@ spec: type: string minItems: 1 type: array + x-kubernetes-list-type: set allowedRedirectURIs: description: allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this - client. Any other uris will be rejected. Must be https, unless it - is a loopback. + client. Any other uris will be rejected. Must be a URI with the + https scheme, unless the hostname is 127.0.0.1 or ::1 which may + use the http scheme. Port numbers are not required for 127.0.0.1 + or ::1 and are ignored when checking for a matching redirect_uri. items: + pattern: ^https://.+|^http://(127\.0\.0\.1|\[::1\])(:\d+)?/ type: string minItems: 1 type: array + x-kubernetes-list-type: set allowedScopes: description: "allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. @@ -102,6 +107,7 @@ spec: type: string minItems: 1 type: array + x-kubernetes-list-type: set required: - allowedGrantTypes - allowedRedirectURIs diff --git a/generated/1.23/README.adoc b/generated/1.23/README.adoc index 78612146..85ea04f0 100644 --- a/generated/1.23/README.adoc +++ b/generated/1.23/README.adoc @@ -578,7 +578,7 @@ OIDCClientSpec is a struct that describes an OIDC Client. [cols="25a,75a", options="header"] |=== | Field | Description -| *`allowedRedirectURIs`* __string array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be https, unless it is a loopback. +| *`allowedRedirectURIs`* __RedirectURI array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be a URI with the https scheme, unless the hostname is 127.0.0.1 or ::1 which may use the http scheme. Port numbers are not required for 127.0.0.1 or ::1 and are ignored when checking for a matching redirect_uri. | *`allowedGrantTypes`* __GrantType array__ | allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this client. Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. | *`allowedScopes`* __Scope array__ | allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. diff --git a/generated/1.23/apis/supervisor/config/v1alpha1/types_oidcclient.go b/generated/1.23/apis/supervisor/config/v1alpha1/types_oidcclient.go index e905c61a..17a1103f 100644 --- a/generated/1.23/apis/supervisor/config/v1alpha1/types_oidcclient.go +++ b/generated/1.23/apis/supervisor/config/v1alpha1/types_oidcclient.go @@ -7,6 +7,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +// +kubebuilder:validation:Pattern=`^https://.+|^http://(127\.0\.0\.1|\[::1\])(:\d+)?/` +type RedirectURI string + // +kubebuilder:validation:Enum="authorization_code";"refresh_token";"urn:ietf:params:oauth:grant-type:token-exchange" type GrantType string @@ -17,9 +20,11 @@ type Scope string type OIDCClientSpec struct { // allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this // client. Any other uris will be rejected. - // Must be https, unless it is a loopback. + // Must be a URI with the https scheme, unless the hostname is 127.0.0.1 or ::1 which may use the http scheme. + // Port numbers are not required for 127.0.0.1 or ::1 and are ignored when checking for a matching redirect_uri. + // +listType=set // +kubebuilder:validation:MinItems=1 - AllowedRedirectURIs []string `json:"allowedRedirectURIs"` + AllowedRedirectURIs []RedirectURI `json:"allowedRedirectURIs"` // allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this // client. @@ -32,6 +37,7 @@ type OIDCClientSpec struct { // - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, // which is a step in the process to be able to get a cluster credential for the user. // This grant must be listed if allowedScopes lists pinniped:request-audience. + // +listType=set // +kubebuilder:validation:MinItems=1 AllowedGrantTypes []GrantType `json:"allowedGrantTypes"` @@ -51,6 +57,7 @@ type OIDCClientSpec struct { // - groups: The client is allowed to request that ID tokens contain the user's group membership, // if their group membership is discoverable by the Supervisor. // Without the groups scope being requested and allowed, the ID token will not contain groups. + // +listType=set // +kubebuilder:validation:MinItems=1 AllowedScopes []Scope `json:"allowedScopes"` } diff --git a/generated/1.23/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go b/generated/1.23/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go index a55d88e7..f4468886 100644 --- a/generated/1.23/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go +++ b/generated/1.23/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go @@ -217,7 +217,7 @@ func (in *OIDCClientSpec) DeepCopyInto(out *OIDCClientSpec) { *out = *in if in.AllowedRedirectURIs != nil { in, out := &in.AllowedRedirectURIs, &out.AllowedRedirectURIs - *out = make([]string, len(*in)) + *out = make([]RedirectURI, len(*in)) copy(*out, *in) } if in.AllowedGrantTypes != nil { diff --git a/generated/1.23/crds/config.supervisor.pinniped.dev_oidcclients.yaml b/generated/1.23/crds/config.supervisor.pinniped.dev_oidcclients.yaml index 4efa445e..6030582f 100644 --- a/generated/1.23/crds/config.supervisor.pinniped.dev_oidcclients.yaml +++ b/generated/1.23/crds/config.supervisor.pinniped.dev_oidcclients.yaml @@ -61,15 +61,20 @@ spec: type: string minItems: 1 type: array + x-kubernetes-list-type: set allowedRedirectURIs: description: allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this - client. Any other uris will be rejected. Must be https, unless it - is a loopback. + client. Any other uris will be rejected. Must be a URI with the + https scheme, unless the hostname is 127.0.0.1 or ::1 which may + use the http scheme. Port numbers are not required for 127.0.0.1 + or ::1 and are ignored when checking for a matching redirect_uri. items: + pattern: ^https://.+|^http://(127\.0\.0\.1|\[::1\])(:\d+)?/ type: string minItems: 1 type: array + x-kubernetes-list-type: set allowedScopes: description: "allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. @@ -102,6 +107,7 @@ spec: type: string minItems: 1 type: array + x-kubernetes-list-type: set required: - allowedGrantTypes - allowedRedirectURIs diff --git a/generated/1.24/README.adoc b/generated/1.24/README.adoc index 9255c3d4..1280132f 100644 --- a/generated/1.24/README.adoc +++ b/generated/1.24/README.adoc @@ -578,7 +578,7 @@ OIDCClientSpec is a struct that describes an OIDC Client. [cols="25a,75a", options="header"] |=== | Field | Description -| *`allowedRedirectURIs`* __string array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be https, unless it is a loopback. +| *`allowedRedirectURIs`* __RedirectURI array__ | allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this client. Any other uris will be rejected. Must be a URI with the https scheme, unless the hostname is 127.0.0.1 or ::1 which may use the http scheme. Port numbers are not required for 127.0.0.1 or ::1 and are ignored when checking for a matching redirect_uri. | *`allowedGrantTypes`* __GrantType array__ | allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this client. Must only contain the following values: - authorization_code: allows the client to perform the authorization code grant flow, i.e. allows the webapp to authenticate users. This grant must always be listed. - refresh_token: allows the client to perform refresh grants for the user to extend the user's session. This grant must be listed if allowedScopes lists offline_access. - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, which is a step in the process to be able to get a cluster credential for the user. This grant must be listed if allowedScopes lists pinniped:request-audience. | *`allowedScopes`* __Scope array__ | allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. diff --git a/generated/1.24/apis/supervisor/config/v1alpha1/types_oidcclient.go b/generated/1.24/apis/supervisor/config/v1alpha1/types_oidcclient.go index e905c61a..17a1103f 100644 --- a/generated/1.24/apis/supervisor/config/v1alpha1/types_oidcclient.go +++ b/generated/1.24/apis/supervisor/config/v1alpha1/types_oidcclient.go @@ -7,6 +7,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +// +kubebuilder:validation:Pattern=`^https://.+|^http://(127\.0\.0\.1|\[::1\])(:\d+)?/` +type RedirectURI string + // +kubebuilder:validation:Enum="authorization_code";"refresh_token";"urn:ietf:params:oauth:grant-type:token-exchange" type GrantType string @@ -17,9 +20,11 @@ type Scope string type OIDCClientSpec struct { // allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this // client. Any other uris will be rejected. - // Must be https, unless it is a loopback. + // Must be a URI with the https scheme, unless the hostname is 127.0.0.1 or ::1 which may use the http scheme. + // Port numbers are not required for 127.0.0.1 or ::1 and are ignored when checking for a matching redirect_uri. + // +listType=set // +kubebuilder:validation:MinItems=1 - AllowedRedirectURIs []string `json:"allowedRedirectURIs"` + AllowedRedirectURIs []RedirectURI `json:"allowedRedirectURIs"` // allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this // client. @@ -32,6 +37,7 @@ type OIDCClientSpec struct { // - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, // which is a step in the process to be able to get a cluster credential for the user. // This grant must be listed if allowedScopes lists pinniped:request-audience. + // +listType=set // +kubebuilder:validation:MinItems=1 AllowedGrantTypes []GrantType `json:"allowedGrantTypes"` @@ -51,6 +57,7 @@ type OIDCClientSpec struct { // - groups: The client is allowed to request that ID tokens contain the user's group membership, // if their group membership is discoverable by the Supervisor. // Without the groups scope being requested and allowed, the ID token will not contain groups. + // +listType=set // +kubebuilder:validation:MinItems=1 AllowedScopes []Scope `json:"allowedScopes"` } diff --git a/generated/1.24/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go b/generated/1.24/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go index a55d88e7..f4468886 100644 --- a/generated/1.24/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go +++ b/generated/1.24/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go @@ -217,7 +217,7 @@ func (in *OIDCClientSpec) DeepCopyInto(out *OIDCClientSpec) { *out = *in if in.AllowedRedirectURIs != nil { in, out := &in.AllowedRedirectURIs, &out.AllowedRedirectURIs - *out = make([]string, len(*in)) + *out = make([]RedirectURI, len(*in)) copy(*out, *in) } if in.AllowedGrantTypes != nil { diff --git a/generated/1.24/crds/config.supervisor.pinniped.dev_oidcclients.yaml b/generated/1.24/crds/config.supervisor.pinniped.dev_oidcclients.yaml index 4efa445e..6030582f 100644 --- a/generated/1.24/crds/config.supervisor.pinniped.dev_oidcclients.yaml +++ b/generated/1.24/crds/config.supervisor.pinniped.dev_oidcclients.yaml @@ -61,15 +61,20 @@ spec: type: string minItems: 1 type: array + x-kubernetes-list-type: set allowedRedirectURIs: description: allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this - client. Any other uris will be rejected. Must be https, unless it - is a loopback. + client. Any other uris will be rejected. Must be a URI with the + https scheme, unless the hostname is 127.0.0.1 or ::1 which may + use the http scheme. Port numbers are not required for 127.0.0.1 + or ::1 and are ignored when checking for a matching redirect_uri. items: + pattern: ^https://.+|^http://(127\.0\.0\.1|\[::1\])(:\d+)?/ type: string minItems: 1 type: array + x-kubernetes-list-type: set allowedScopes: description: "allowedScopes is a list of the allowed scopes param values that should be accepted during OIDC flows with this client. @@ -102,6 +107,7 @@ spec: type: string minItems: 1 type: array + x-kubernetes-list-type: set required: - allowedGrantTypes - allowedRedirectURIs diff --git a/generated/latest/apis/supervisor/config/v1alpha1/types_oidcclient.go b/generated/latest/apis/supervisor/config/v1alpha1/types_oidcclient.go index e905c61a..17a1103f 100644 --- a/generated/latest/apis/supervisor/config/v1alpha1/types_oidcclient.go +++ b/generated/latest/apis/supervisor/config/v1alpha1/types_oidcclient.go @@ -7,6 +7,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +// +kubebuilder:validation:Pattern=`^https://.+|^http://(127\.0\.0\.1|\[::1\])(:\d+)?/` +type RedirectURI string + // +kubebuilder:validation:Enum="authorization_code";"refresh_token";"urn:ietf:params:oauth:grant-type:token-exchange" type GrantType string @@ -17,9 +20,11 @@ type Scope string type OIDCClientSpec struct { // allowedRedirectURIs is a list of the allowed redirect_uri param values that should be accepted during OIDC flows with this // client. Any other uris will be rejected. - // Must be https, unless it is a loopback. + // Must be a URI with the https scheme, unless the hostname is 127.0.0.1 or ::1 which may use the http scheme. + // Port numbers are not required for 127.0.0.1 or ::1 and are ignored when checking for a matching redirect_uri. + // +listType=set // +kubebuilder:validation:MinItems=1 - AllowedRedirectURIs []string `json:"allowedRedirectURIs"` + AllowedRedirectURIs []RedirectURI `json:"allowedRedirectURIs"` // allowedGrantTypes is a list of the allowed grant_type param values that should be accepted during OIDC flows with this // client. @@ -32,6 +37,7 @@ type OIDCClientSpec struct { // - urn:ietf:params:oauth:grant-type:token-exchange: allows the client to perform RFC8693 token exchange, // which is a step in the process to be able to get a cluster credential for the user. // This grant must be listed if allowedScopes lists pinniped:request-audience. + // +listType=set // +kubebuilder:validation:MinItems=1 AllowedGrantTypes []GrantType `json:"allowedGrantTypes"` @@ -51,6 +57,7 @@ type OIDCClientSpec struct { // - groups: The client is allowed to request that ID tokens contain the user's group membership, // if their group membership is discoverable by the Supervisor. // Without the groups scope being requested and allowed, the ID token will not contain groups. + // +listType=set // +kubebuilder:validation:MinItems=1 AllowedScopes []Scope `json:"allowedScopes"` } diff --git a/generated/latest/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go b/generated/latest/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go index a55d88e7..f4468886 100644 --- a/generated/latest/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go +++ b/generated/latest/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go @@ -217,7 +217,7 @@ func (in *OIDCClientSpec) DeepCopyInto(out *OIDCClientSpec) { *out = *in if in.AllowedRedirectURIs != nil { in, out := &in.AllowedRedirectURIs, &out.AllowedRedirectURIs - *out = make([]string, len(*in)) + *out = make([]RedirectURI, len(*in)) copy(*out, *in) } if in.AllowedGrantTypes != nil { diff --git a/internal/oidc/oidc.go b/internal/oidc/oidc.go index 79380df7..1c5b7237 100644 --- a/internal/oidc/oidc.go +++ b/internal/oidc/oidc.go @@ -229,6 +229,9 @@ func FositeOauth2Helper( // Use the fosite default to make it more likely that off the shelf OIDC clients can work with the supervisor. MinParameterEntropy: fosite.MinParameterEntropy, + + // do not allow custom scheme redirects, only https and http (on loopback) + RedirectSecureChecker: fosite.IsRedirectURISecureStrict, } provider := compose.Compose( diff --git a/test/integration/oidc_client_test.go b/test/integration/oidc_client_test.go new file mode 100644 index 00000000..be987db9 --- /dev/null +++ b/test/integration/oidc_client_test.go @@ -0,0 +1,408 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package integration + +import ( + "context" + "fmt" + "sort" + "strings" + "testing" + "time" + + "github.com/stretchr/testify/require" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + supervisorconfigv1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/config/v1alpha1" + "go.pinniped.dev/test/testlib" +) + +func TestOIDCClientStaticValidation_Parallel(t *testing.T) { + env := testlib.IntegrationEnv(t) + + groupFix := strings.NewReplacer(".supervisor.pinniped.dev", ".supervisor."+env.APIGroupSuffix) + + ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute) + t.Cleanup(cancel) + + namespaceClient := testlib.NewKubernetesClientset(t).CoreV1().Namespaces() + + ns, err := namespaceClient.Create(ctx, &corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + GenerateName: "test-oidc-client-", + }, + }, metav1.CreateOptions{}) + require.NoError(t, err) + + t.Cleanup(func() { + require.NoError(t, namespaceClient.Delete(ctx, ns.Name, metav1.DeleteOptions{})) + }) + + oidcClients := testlib.NewSupervisorClientset(t).ConfigV1alpha1().OIDCClients(ns.Name) + + tests := []struct { + name string + client *supervisorconfigv1alpha1.OIDCClient + fixWant func(t *testing.T, err error, want string) string + wantErr string + }{ + { + name: "bad name", + client: &supervisorconfigv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{ + Name: "panda", + }, + Spec: supervisorconfigv1alpha1.OIDCClientSpec{ + AllowedRedirectURIs: []supervisorconfigv1alpha1.RedirectURI{ + "https://a", + }, + AllowedGrantTypes: []supervisorconfigv1alpha1.GrantType{ + "refresh_token", + }, + AllowedScopes: []supervisorconfigv1alpha1.Scope{ + "username", + }, + }, + }, + wantErr: `OIDCClient.config.supervisor.pinniped.dev "panda" is invalid: metadata.name: Invalid value: "panda": metadata.name in body should match '^client\.oauth\.pinniped\.dev-'`, + }, + { + name: "bad name but close", + client: &supervisorconfigv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{ + Name: "client0oauth1pinniped2dev-regex", + }, + Spec: supervisorconfigv1alpha1.OIDCClientSpec{ + AllowedRedirectURIs: []supervisorconfigv1alpha1.RedirectURI{ + "https://a", + }, + AllowedGrantTypes: []supervisorconfigv1alpha1.GrantType{ + "refresh_token", + }, + AllowedScopes: []supervisorconfigv1alpha1.Scope{ + "username", + }, + }, + }, + wantErr: `OIDCClient.config.supervisor.pinniped.dev "client0oauth1pinniped2dev-regex" is invalid: metadata.name: Invalid value: "client0oauth1pinniped2dev-regex": metadata.name in body should match '^client\.oauth\.pinniped\.dev-'`, + }, + { + name: "bad generate name", + client: &supervisorconfigv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{ + GenerateName: "snorlax-", + }, + Spec: supervisorconfigv1alpha1.OIDCClientSpec{ + AllowedRedirectURIs: []supervisorconfigv1alpha1.RedirectURI{ + "http://127.0.0.1/callback", + }, + AllowedGrantTypes: []supervisorconfigv1alpha1.GrantType{ + "refresh_token", + }, + AllowedScopes: []supervisorconfigv1alpha1.Scope{ + "username", + }, + }, + }, + fixWant: func(t *testing.T, err error, want string) string { + require.Error(t, err) + gotErr := err.Error() + errPrefix := groupFix.Replace(`OIDCClient.config.supervisor.pinniped.dev "snorlax-`) + require.True(t, strings.HasPrefix(gotErr, errPrefix)) + gotErr = strings.TrimPrefix(gotErr, errPrefix) + end := strings.Index(gotErr, `"`) + require.Equal(t, end, 5) + gotErr = gotErr[:end] + return strings.Replace(want, "RAND", gotErr, 2) + }, + wantErr: `OIDCClient.config.supervisor.pinniped.dev "snorlax-RAND" is invalid: metadata.name: Invalid value: "snorlax-RAND": metadata.name in body should match '^client\.oauth\.pinniped\.dev-'`, + }, + { + name: "bad redirect uri", + client: &supervisorconfigv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{ + Name: "client.oauth.pinniped.dev-hello", + }, + Spec: supervisorconfigv1alpha1.OIDCClientSpec{ + AllowedRedirectURIs: []supervisorconfigv1alpha1.RedirectURI{ + "http://127.0.0.1/callback", + "oob", + "https://a", + }, + AllowedGrantTypes: []supervisorconfigv1alpha1.GrantType{ + "refresh_token", + }, + AllowedScopes: []supervisorconfigv1alpha1.Scope{ + "username", + }, + }, + }, + wantErr: `OIDCClient.config.supervisor.pinniped.dev "client.oauth.pinniped.dev-hello" is invalid: spec.allowedRedirectURIs[1]: Invalid value: "oob": spec.allowedRedirectURIs[1] in body should match '^https://.+|^http://(127\.0\.0\.1|\[::1\])(:\d+)?/'`, + }, + { + name: "bad grant type", + client: &supervisorconfigv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{ + Name: "client.oauth.pinniped.dev-sky", + }, + Spec: supervisorconfigv1alpha1.OIDCClientSpec{ + AllowedRedirectURIs: []supervisorconfigv1alpha1.RedirectURI{ + "http://127.0.0.1/callback", + }, + AllowedGrantTypes: []supervisorconfigv1alpha1.GrantType{ + "refresh_token", + "authorization_code", + "bird", + }, + AllowedScopes: []supervisorconfigv1alpha1.Scope{ + "username", + }, + }, + }, + wantErr: `OIDCClient.config.supervisor.pinniped.dev "client.oauth.pinniped.dev-sky" is invalid: spec.allowedGrantTypes[2]: Unsupported value: "bird": supported values: "authorization_code", "refresh_token", "urn:ietf:params:oauth:grant-type:token-exchange"`, + }, + { + name: "bad scope", + client: &supervisorconfigv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{ + Name: "client.oauth.pinniped.dev-blue", + }, + Spec: supervisorconfigv1alpha1.OIDCClientSpec{ + AllowedRedirectURIs: []supervisorconfigv1alpha1.RedirectURI{ + "http://127.0.0.1/callback", + }, + AllowedGrantTypes: []supervisorconfigv1alpha1.GrantType{ + "refresh_token", + }, + AllowedScopes: []supervisorconfigv1alpha1.Scope{ + "*", + "username", + }, + }, + }, + wantErr: `OIDCClient.config.supervisor.pinniped.dev "client.oauth.pinniped.dev-blue" is invalid: spec.allowedScopes[0]: Unsupported value: "*": supported values: "openid", "offline_access", "username", "groups", "pinniped:request-audience"`, + }, + { + name: "empty unset all", + client: &supervisorconfigv1alpha1.OIDCClient{}, + wantErr: `OIDCClient.config.supervisor.pinniped.dev "" is invalid: [metadata.name: Required value: name or generateName is required, spec.allowedGrantTypes: Required value, spec.allowedRedirectURIs: Required value, spec.allowedScopes: Required value]`, + }, + { + name: "empty uris", + client: &supervisorconfigv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{ + Name: "client.oauth.pinniped.dev-green-1", + }, + Spec: supervisorconfigv1alpha1.OIDCClientSpec{ + AllowedRedirectURIs: []supervisorconfigv1alpha1.RedirectURI{}, + AllowedGrantTypes: []supervisorconfigv1alpha1.GrantType{ + "refresh_token", + }, + AllowedScopes: []supervisorconfigv1alpha1.Scope{ + "username", + }, + }, + }, + wantErr: `OIDCClient.config.supervisor.pinniped.dev "client.oauth.pinniped.dev-green-1" is invalid: spec.allowedRedirectURIs: Invalid value: 0: spec.allowedRedirectURIs in body should have at least 1 items`, + }, + { + name: "empty grants", + client: &supervisorconfigv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{ + Name: "client.oauth.pinniped.dev-green-2", + }, + Spec: supervisorconfigv1alpha1.OIDCClientSpec{ + AllowedRedirectURIs: []supervisorconfigv1alpha1.RedirectURI{ + "http://127.0.0.1/callback", + }, + AllowedGrantTypes: []supervisorconfigv1alpha1.GrantType{}, + AllowedScopes: []supervisorconfigv1alpha1.Scope{ + "username", + }, + }, + }, + wantErr: `OIDCClient.config.supervisor.pinniped.dev "client.oauth.pinniped.dev-green-2" is invalid: spec.allowedGrantTypes: Invalid value: 0: spec.allowedGrantTypes in body should have at least 1 items`, + }, + { + name: "empty scopes", + client: &supervisorconfigv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{ + Name: "client.oauth.pinniped.dev-green-3", + }, + Spec: supervisorconfigv1alpha1.OIDCClientSpec{ + AllowedRedirectURIs: []supervisorconfigv1alpha1.RedirectURI{ + "http://127.0.0.1/callback", + }, + AllowedGrantTypes: []supervisorconfigv1alpha1.GrantType{ + "refresh_token", + }, + AllowedScopes: []supervisorconfigv1alpha1.Scope{}, + }, + }, + wantErr: `OIDCClient.config.supervisor.pinniped.dev "client.oauth.pinniped.dev-green-3" is invalid: spec.allowedScopes: Invalid value: 0: spec.allowedScopes in body should have at least 1 items`, + }, + { + name: "duplicate uris", + client: &supervisorconfigv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{ + Name: "client.oauth.pinniped.dev-red-1", + }, + Spec: supervisorconfigv1alpha1.OIDCClientSpec{ + AllowedRedirectURIs: []supervisorconfigv1alpha1.RedirectURI{ + "http://127.0.0.1/callback", + "http://127.0.0.1/callback", + }, + AllowedGrantTypes: []supervisorconfigv1alpha1.GrantType{ + "refresh_token", + }, + AllowedScopes: []supervisorconfigv1alpha1.Scope{ + "username", + }, + }, + }, + wantErr: `OIDCClient.config.supervisor.pinniped.dev "client.oauth.pinniped.dev-red-1" is invalid: spec.allowedRedirectURIs[1]: Duplicate value: "http://127.0.0.1/callback"`, + }, + { + name: "duplicate grants", + client: &supervisorconfigv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{ + Name: "client.oauth.pinniped.dev-red-2", + }, + Spec: supervisorconfigv1alpha1.OIDCClientSpec{ + AllowedRedirectURIs: []supervisorconfigv1alpha1.RedirectURI{ + "http://127.0.0.1/callback", + }, + AllowedGrantTypes: []supervisorconfigv1alpha1.GrantType{ + "refresh_token", + "refresh_token", + }, + AllowedScopes: []supervisorconfigv1alpha1.Scope{ + "username", + }, + }, + }, + wantErr: `OIDCClient.config.supervisor.pinniped.dev "client.oauth.pinniped.dev-red-2" is invalid: spec.allowedGrantTypes[1]: Duplicate value: "refresh_token"`, + }, + { + name: "duplicate scopes", + client: &supervisorconfigv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{ + Name: "client.oauth.pinniped.dev-red-3", + }, + Spec: supervisorconfigv1alpha1.OIDCClientSpec{ + AllowedRedirectURIs: []supervisorconfigv1alpha1.RedirectURI{ + "http://127.0.0.1/callback", + }, + AllowedGrantTypes: []supervisorconfigv1alpha1.GrantType{ + "refresh_token", + }, + AllowedScopes: []supervisorconfigv1alpha1.Scope{ + "username", + "username", + }, + }, + }, + wantErr: `OIDCClient.config.supervisor.pinniped.dev "client.oauth.pinniped.dev-red-3" is invalid: spec.allowedScopes[1]: Duplicate value: "username"`, + }, + { + name: "bad everything", + client: &supervisorconfigv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{ + Name: "zone", + }, + Spec: supervisorconfigv1alpha1.OIDCClientSpec{ + AllowedRedirectURIs: []supervisorconfigv1alpha1.RedirectURI{ + "of", + }, + AllowedGrantTypes: []supervisorconfigv1alpha1.GrantType{ + "the", + }, + AllowedScopes: []supervisorconfigv1alpha1.Scope{ + "enders", + }, + }, + }, + fixWant: func(t *testing.T, err error, want string) string { + // sort the error causes and use that to rebuild a sorted error message + statusErr := &errors.StatusError{} + require.ErrorAs(t, err, &statusErr) + require.Len(t, statusErr.ErrStatus.Details.Causes, 4) + out := make([]string, 0, len(statusErr.ErrStatus.Details.Causes)) + for _, cause := range statusErr.ErrStatus.Details.Causes { + cause := cause + out = append(out, fmt.Sprintf("%s: %s", cause.Field, cause.Message)) + } + sort.Strings(out) + errPrefix := groupFix.Replace(`OIDCClient.config.supervisor.pinniped.dev "zone" is invalid: [`) + require.True(t, strings.HasPrefix(err.Error(), errPrefix)) + require.Equal(t, err.Error(), statusErr.ErrStatus.Message) + statusErr.ErrStatus.Message = errPrefix + strings.Join(out, ", ") + "]" + return want // leave the wanted error unchanged + }, + wantErr: `OIDCClient.config.supervisor.pinniped.dev "zone" is invalid: [metadata.name: Invalid value: "zone": metadata.name in body should match '^client\.oauth\.pinniped\.dev-', spec.allowedGrantTypes[0]: Unsupported value: "the": supported values: "authorization_code", "refresh_token", "urn:ietf:params:oauth:grant-type:token-exchange", spec.allowedRedirectURIs[0]: Invalid value: "of": spec.allowedRedirectURIs[0] in body should match '^https://.+|^http://(127\.0\.0\.1|\[::1\])(:\d+)?/', spec.allowedScopes[0]: Unsupported value: "enders": supported values: "openid", "offline_access", "username", "groups", "pinniped:request-audience"]`, + }, + { + name: "everything valid", + client: &supervisorconfigv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{ + Name: "client.oauth.pinniped.dev-lava", + }, + Spec: supervisorconfigv1alpha1.OIDCClientSpec{ + AllowedRedirectURIs: []supervisorconfigv1alpha1.RedirectURI{ + "https://example.com", + "http://127.0.0.1/yoyo", + }, + AllowedGrantTypes: []supervisorconfigv1alpha1.GrantType{ + "authorization_code", + "refresh_token", + "urn:ietf:params:oauth:grant-type:token-exchange", + }, + AllowedScopes: []supervisorconfigv1alpha1.Scope{ + "openid", + "offline_access", + "username", + "groups", + "pinniped:request-audience", + }, + }, + }, + wantErr: "", + }, + } + for _, tt := range tests { + tt := tt + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + client, err := oidcClients.Create(ctx, tt.client, metav1.CreateOptions{}) + + want := tt.wantErr + + if len(want) == 0 { + require.NoError(t, err) + + // unset server generated fields + client.Namespace = "" + client.UID = "" + client.ResourceVersion = "" + client.ManagedFields = nil + client.CreationTimestamp = metav1.Time{} + client.Generation = 0 + + require.Equal(t, tt.client, client) + return + } + + if tt.fixWant != nil { + want = tt.fixWant(t, err, want) + } + + want = groupFix.Replace(want) + + require.EqualError(t, err, want) + }) + } +} From 36a5c4c20d8b61e9793e7ff651f7121ac7c18c95 Mon Sep 17 00:00:00 2001 From: Monis Khan Date: Thu, 16 Jun 2022 15:38:14 -0400 Subject: [PATCH 10/11] Fix TestOIDCClientStaticValidation on old servers Signed-off-by: Monis Khan --- .../testutil/kube_server_compatibility.go | 16 +++++ test/integration/oidc_client_test.go | 60 ++++++++++++++++++- 2 files changed, 75 insertions(+), 1 deletion(-) diff --git a/internal/testutil/kube_server_compatibility.go b/internal/testutil/kube_server_compatibility.go index 89cf15b4..fbf6fbc8 100644 --- a/internal/testutil/kube_server_compatibility.go +++ b/internal/testutil/kube_server_compatibility.go @@ -4,6 +4,8 @@ package testutil import ( + "strconv" + "strings" "testing" "github.com/stretchr/testify/require" @@ -28,3 +30,17 @@ func KubeServerSupportsCertificatesV1API(t *testing.T, discoveryClient discovery } return false } + +func KubeServerMinorVersionInBetweenInclusive(t *testing.T, discoveryClient discovery.DiscoveryInterface, min, max int) bool { + t.Helper() + + version, err := discoveryClient.ServerVersion() + require.NoError(t, err) + + require.Equal(t, "1", version.Major) + + minor, err := strconv.Atoi(strings.TrimSuffix(version.Minor, "+")) + require.NoError(t, err) + + return minor >= min && minor <= max +} diff --git a/test/integration/oidc_client_test.go b/test/integration/oidc_client_test.go index be987db9..fe77b3b8 100644 --- a/test/integration/oidc_client_test.go +++ b/test/integration/oidc_client_test.go @@ -17,18 +17,26 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" supervisorconfigv1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/config/v1alpha1" + "go.pinniped.dev/internal/testutil" "go.pinniped.dev/test/testlib" ) func TestOIDCClientStaticValidation_Parallel(t *testing.T) { env := testlib.IntegrationEnv(t) + adminClient := testlib.NewKubernetesClientset(t) + + needsErrFix := testutil.KubeServerMinorVersionInBetweenInclusive(t, adminClient.Discovery(), 0, 23) + reallyOld := testutil.KubeServerMinorVersionInBetweenInclusive(t, adminClient.Discovery(), 0, 19) + noSets := testutil.KubeServerMinorVersionInBetweenInclusive(t, adminClient.Discovery(), 0, 17) + groupFix := strings.NewReplacer(".supervisor.pinniped.dev", ".supervisor."+env.APIGroupSuffix) + errFix := strings.NewReplacer(makeErrFix(reallyOld)...) ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute) t.Cleanup(cancel) - namespaceClient := testlib.NewKubernetesClientset(t).CoreV1().Namespaces() + namespaceClient := adminClient.CoreV1().Namespaces() ns, err := namespaceClient.Create(ctx, &corev1.Namespace{ ObjectMeta: metav1.ObjectMeta{ @@ -48,6 +56,7 @@ func TestOIDCClientStaticValidation_Parallel(t *testing.T) { client *supervisorconfigv1alpha1.OIDCClient fixWant func(t *testing.T, err error, want string) string wantErr string + skip bool }{ { name: "bad name", @@ -116,6 +125,9 @@ func TestOIDCClientStaticValidation_Parallel(t *testing.T) { end := strings.Index(gotErr, `"`) require.Equal(t, end, 5) gotErr = gotErr[:end] + if reallyOld { // these servers do not show the actual invalid value + want = strings.Replace(want, `Invalid value: "snorlax-RAND"`, `Invalid value: ""`, 1) + } return strings.Replace(want, "RAND", gotErr, 2) }, wantErr: `OIDCClient.config.supervisor.pinniped.dev "snorlax-RAND" is invalid: metadata.name: Invalid value: "snorlax-RAND": metadata.name in body should match '^client\.oauth\.pinniped\.dev-'`, @@ -189,6 +201,7 @@ func TestOIDCClientStaticValidation_Parallel(t *testing.T) { name: "empty unset all", client: &supervisorconfigv1alpha1.OIDCClient{}, wantErr: `OIDCClient.config.supervisor.pinniped.dev "" is invalid: [metadata.name: Required value: name or generateName is required, spec.allowedGrantTypes: Required value, spec.allowedRedirectURIs: Required value, spec.allowedScopes: Required value]`, + skip: reallyOld, // the error is both different and has unstable order on older servers }, { name: "empty uris", @@ -264,6 +277,7 @@ func TestOIDCClientStaticValidation_Parallel(t *testing.T) { }, }, wantErr: `OIDCClient.config.supervisor.pinniped.dev "client.oauth.pinniped.dev-red-1" is invalid: spec.allowedRedirectURIs[1]: Duplicate value: "http://127.0.0.1/callback"`, + skip: noSets, // needs v1.18+ for x-kubernetes-list-type: set }, { name: "duplicate grants", @@ -285,6 +299,7 @@ func TestOIDCClientStaticValidation_Parallel(t *testing.T) { }, }, wantErr: `OIDCClient.config.supervisor.pinniped.dev "client.oauth.pinniped.dev-red-2" is invalid: spec.allowedGrantTypes[1]: Duplicate value: "refresh_token"`, + skip: noSets, // needs v1.18+ for x-kubernetes-list-type: set }, { name: "duplicate scopes", @@ -306,6 +321,7 @@ func TestOIDCClientStaticValidation_Parallel(t *testing.T) { }, }, wantErr: `OIDCClient.config.supervisor.pinniped.dev "client.oauth.pinniped.dev-red-3" is invalid: spec.allowedScopes[1]: Duplicate value: "username"`, + skip: noSets, // needs v1.18+ for x-kubernetes-list-type: set }, { name: "bad everything", @@ -375,6 +391,10 @@ func TestOIDCClientStaticValidation_Parallel(t *testing.T) { for _, tt := range tests { tt := tt t.Run(tt.name, func(t *testing.T) { + if tt.skip { + t.Skip() + } + t.Parallel() client, err := oidcClients.Create(ctx, tt.client, metav1.CreateOptions{}) @@ -391,6 +411,7 @@ func TestOIDCClientStaticValidation_Parallel(t *testing.T) { client.ManagedFields = nil client.CreationTimestamp = metav1.Time{} client.Generation = 0 + client.SelfLink = "" // nolint: staticcheck // old API servers still set this field require.Equal(t, tt.client, client) return @@ -402,7 +423,44 @@ func TestOIDCClientStaticValidation_Parallel(t *testing.T) { want = groupFix.Replace(want) + // old API servers have slightly different error messages + if needsErrFix && !strings.Contains(want, "Duplicate value:") { + want = errFix.Replace(want) + } + require.EqualError(t, err, want) }) } } + +func makeErrFix(reallyOld bool) []string { + const total = 10 // should be enough indexes + out := make([]string, 0, total*6) // good enough allocation + + // these servers do not show the actual index of where the error occurred + for i := 0; i < total; i++ { + idx := fmt.Sprintf("[%d]", i) + out = append(out, idx+":", ":") + out = append(out, idx+" ", " ") + } + + if reallyOld { + // these servers display empty values differently + out = append(out, "0:", `"":`) + + // these servers do not show the actual invalid value + for _, s := range []string{ + "of", + "oob", + "zone", + "panda", + "client0oauth1pinniped2dev-regex", + } { + out = append(out, + fmt.Sprintf(`Invalid value: "%s"`, s), + `Invalid value: ""`) + } + } + + return out +} From 5aa0d9126779496a3f9e2e631be8533301fa897e Mon Sep 17 00:00:00 2001 From: Ryan Richard Date: Fri, 17 Jun 2022 12:56:53 -0400 Subject: [PATCH 11/11] New controller watches OIDCClients and updates validation Conditions --- .../config/v1alpha1/types_meta.go.tmpl | 75 ++ .../config/v1alpha1/types_oidcclient.go.tmpl | 28 +- ...g.supervisor.pinniped.dev_oidcclients.yaml | 76 ++ deploy/supervisor/rbac.yaml | 8 + generated/1.17/README.adoc | 38 + .../supervisor/config/v1alpha1/types_meta.go | 75 ++ .../config/v1alpha1/types_oidcclient.go | 28 +- .../config/v1alpha1/zz_generated.deepcopy.go | 26 +- ...g.supervisor.pinniped.dev_oidcclients.yaml | 76 ++ generated/1.18/README.adoc | 38 + .../supervisor/config/v1alpha1/types_meta.go | 75 ++ .../config/v1alpha1/types_oidcclient.go | 28 +- .../config/v1alpha1/zz_generated.deepcopy.go | 26 +- ...g.supervisor.pinniped.dev_oidcclients.yaml | 76 ++ generated/1.19/README.adoc | 38 + .../supervisor/config/v1alpha1/types_meta.go | 75 ++ .../config/v1alpha1/types_oidcclient.go | 28 +- .../config/v1alpha1/zz_generated.deepcopy.go | 26 +- ...g.supervisor.pinniped.dev_oidcclients.yaml | 76 ++ generated/1.20/README.adoc | 38 + .../supervisor/config/v1alpha1/types_meta.go | 75 ++ .../config/v1alpha1/types_oidcclient.go | 28 +- .../config/v1alpha1/zz_generated.deepcopy.go | 26 +- ...g.supervisor.pinniped.dev_oidcclients.yaml | 76 ++ generated/1.21/README.adoc | 38 + .../supervisor/config/v1alpha1/types_meta.go | 75 ++ .../config/v1alpha1/types_oidcclient.go | 28 +- .../config/v1alpha1/zz_generated.deepcopy.go | 26 +- ...g.supervisor.pinniped.dev_oidcclients.yaml | 76 ++ generated/1.22/README.adoc | 38 + .../supervisor/config/v1alpha1/types_meta.go | 75 ++ .../config/v1alpha1/types_oidcclient.go | 28 +- .../config/v1alpha1/zz_generated.deepcopy.go | 26 +- ...g.supervisor.pinniped.dev_oidcclients.yaml | 76 ++ generated/1.23/README.adoc | 38 + .../supervisor/config/v1alpha1/types_meta.go | 75 ++ .../config/v1alpha1/types_oidcclient.go | 28 +- .../config/v1alpha1/zz_generated.deepcopy.go | 26 +- ...g.supervisor.pinniped.dev_oidcclients.yaml | 76 ++ generated/1.24/README.adoc | 38 + .../supervisor/config/v1alpha1/types_meta.go | 75 ++ .../config/v1alpha1/types_oidcclient.go | 28 +- .../config/v1alpha1/zz_generated.deepcopy.go | 26 +- ...g.supervisor.pinniped.dev_oidcclients.yaml | 76 ++ .../supervisor/config/v1alpha1/types_meta.go | 75 ++ .../config/v1alpha1/types_oidcclient.go | 28 +- .../config/v1alpha1/zz_generated.deepcopy.go | 26 +- .../conditionsutil/conditions_util.go | 123 +++ .../conditionsutil/conditions_util.go.go | 68 -- .../active_directory_upstream_watcher.go | 2 +- .../ldap_upstream_watcher.go | 2 +- .../oidcclientwatcher/oidc_client_watcher.go | 317 ++++++ .../oidc_client_watcher_test.go | 903 ++++++++++++++++++ .../oidc_upstream_watcher.go | 2 +- internal/crud/crud.go | 13 +- .../oidcclientsecretstorage.go | 67 ++ .../oidcclientsecretstorage_test.go | 125 +++ internal/supervisor/server/server.go | 11 + ...test.go => supervisor_oidc_client_test.go} | 203 ++++ 59 files changed, 3980 insertions(+), 116 deletions(-) create mode 100644 apis/supervisor/config/v1alpha1/types_meta.go.tmpl create mode 100644 generated/1.17/apis/supervisor/config/v1alpha1/types_meta.go create mode 100644 generated/1.18/apis/supervisor/config/v1alpha1/types_meta.go create mode 100644 generated/1.19/apis/supervisor/config/v1alpha1/types_meta.go create mode 100644 generated/1.20/apis/supervisor/config/v1alpha1/types_meta.go create mode 100644 generated/1.21/apis/supervisor/config/v1alpha1/types_meta.go create mode 100644 generated/1.22/apis/supervisor/config/v1alpha1/types_meta.go create mode 100644 generated/1.23/apis/supervisor/config/v1alpha1/types_meta.go create mode 100644 generated/1.24/apis/supervisor/config/v1alpha1/types_meta.go create mode 100644 generated/latest/apis/supervisor/config/v1alpha1/types_meta.go create mode 100644 internal/controller/conditionsutil/conditions_util.go delete mode 100644 internal/controller/conditionsutil/conditions_util.go.go create mode 100644 internal/controller/supervisorconfig/oidcclientwatcher/oidc_client_watcher.go create mode 100644 internal/controller/supervisorconfig/oidcclientwatcher/oidc_client_watcher_test.go create mode 100644 internal/oidcclientsecretstorage/oidcclientsecretstorage.go create mode 100644 internal/oidcclientsecretstorage/oidcclientsecretstorage_test.go rename test/integration/{oidc_client_test.go => supervisor_oidc_client_test.go} (66%) diff --git a/apis/supervisor/config/v1alpha1/types_meta.go.tmpl b/apis/supervisor/config/v1alpha1/types_meta.go.tmpl new file mode 100644 index 00000000..cd46a471 --- /dev/null +++ b/apis/supervisor/config/v1alpha1/types_meta.go.tmpl @@ -0,0 +1,75 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +// ConditionStatus is effectively an enum type for Condition.Status. +type ConditionStatus string + +// These are valid condition statuses. "ConditionTrue" means a resource is in the condition. +// "ConditionFalse" means a resource is not in the condition. "ConditionUnknown" means kubernetes +// can't decide if a resource is in the condition or not. In the future, we could add other +// intermediate conditions, e.g. ConditionDegraded. +const ( + ConditionTrue ConditionStatus = "True" + ConditionFalse ConditionStatus = "False" + ConditionUnknown ConditionStatus = "Unknown" +) + +// Condition status of a resource (mirrored from the metav1.Condition type added in Kubernetes 1.19). In a future API +// version we can switch to using the upstream type. +// See https://github.com/kubernetes/apimachinery/blob/v0.19.0/pkg/apis/meta/v1/types.go#L1353-L1413. +type Condition struct { + // type of condition in CamelCase or in foo.example.com/CamelCase. + // --- + // Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be + // useful (see .node.status.conditions), the ability to deconflict is important. + // The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Pattern=`^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$` + // +kubebuilder:validation:MaxLength=316 + Type string `json:"type"` + + // status of the condition, one of True, False, Unknown. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Enum=True;False;Unknown + Status ConditionStatus `json:"status"` + + // observedGeneration represents the .metadata.generation that the condition was set based upon. + // For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + // with respect to the current state of the instance. + // +optional + // +kubebuilder:validation:Minimum=0 + ObservedGeneration int64 `json:"observedGeneration,omitempty"` + + // lastTransitionTime is the last time the condition transitioned from one status to another. + // This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Type=string + // +kubebuilder:validation:Format=date-time + LastTransitionTime metav1.Time `json:"lastTransitionTime"` + + // reason contains a programmatic identifier indicating the reason for the condition's last transition. + // Producers of specific condition types may define expected values and meanings for this field, + // and whether the values are considered a guaranteed API. + // The value should be a CamelCase string. + // This field may not be empty. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:MaxLength=1024 + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:Pattern=`^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$` + Reason string `json:"reason"` + + // message is a human readable message indicating details about the transition. + // This may be an empty string. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:MaxLength=32768 + Message string `json:"message"` +} diff --git a/apis/supervisor/config/v1alpha1/types_oidcclient.go.tmpl b/apis/supervisor/config/v1alpha1/types_oidcclient.go.tmpl index 17a1103f..1bc7399d 100644 --- a/apis/supervisor/config/v1alpha1/types_oidcclient.go.tmpl +++ b/apis/supervisor/config/v1alpha1/types_oidcclient.go.tmpl @@ -3,8 +3,19 @@ package v1alpha1 -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +type OIDCClientPhase string + +const ( + // PhasePending is the default phase for newly-created OIDCClient resources. + PhasePending OIDCClientPhase = "Pending" + + // PhaseReady is the phase for an OIDCClient resource in a healthy state. + PhaseReady OIDCClientPhase = "Ready" + + // PhaseError is the phase for an OIDCClient in an unhealthy state. + PhaseError OIDCClientPhase = "Error" ) // +kubebuilder:validation:Pattern=`^https://.+|^http://(127\.0\.0\.1|\[::1\])(:\d+)?/` @@ -62,8 +73,19 @@ type OIDCClientSpec struct { AllowedScopes []Scope `json:"allowedScopes"` } -// OIDCClientStatus is a struct that describes the actual state of an OIDC Client. +// OIDCClientStatus is a struct that describes the actual state of an OIDCClient. type OIDCClientStatus struct { + // Phase summarizes the overall status of the OIDCClient. + // +kubebuilder:default=Pending + // +kubebuilder:validation:Enum=Pending;Ready;Error + Phase OIDCClientPhase `json:"phase,omitempty"` + + // Represents the observations of an OIDCClient's current state. + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + Conditions []Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` } // OIDCClient describes the configuration of an OIDC client. diff --git a/deploy/supervisor/config.supervisor.pinniped.dev_oidcclients.yaml b/deploy/supervisor/config.supervisor.pinniped.dev_oidcclients.yaml index 6030582f..b5569275 100644 --- a/deploy/supervisor/config.supervisor.pinniped.dev_oidcclients.yaml +++ b/deploy/supervisor/config.supervisor.pinniped.dev_oidcclients.yaml @@ -115,6 +115,82 @@ spec: type: object status: description: Status of the OIDC client. + properties: + conditions: + description: Represents the observations of an OIDCClient's current + state. + items: + description: Condition status of a resource (mirrored from the metav1.Condition + type added in Kubernetes 1.19). In a future API version we can + switch to using the upstream type. See https://github.com/kubernetes/apimachinery/blob/v0.19.0/pkg/apis/meta/v1/types.go#L1353-L1413. + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should be when + the underlying condition changed. If that is not known, then + using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, if .metadata.generation + is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the current + state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier indicating + the reason for the condition's last transition. Producers + of specific condition types may define expected values and + meanings for this field, and whether the values are considered + a guaranteed API. The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + phase: + default: Pending + description: Phase summarizes the overall status of the OIDCClient. + enum: + - Pending + - Ready + - Error + type: string type: object required: - spec diff --git a/deploy/supervisor/rbac.yaml b/deploy/supervisor/rbac.yaml index a56818fe..97b542fe 100644 --- a/deploy/supervisor/rbac.yaml +++ b/deploy/supervisor/rbac.yaml @@ -24,6 +24,14 @@ rules: - #@ pinnipedDevAPIGroupWithPrefix("config.supervisor") resources: [federationdomains/status] verbs: [get, patch, update] + - apiGroups: + - #@ pinnipedDevAPIGroupWithPrefix("config.supervisor") + resources: [oidcclients] + verbs: [get, list, watch] + - apiGroups: + - #@ pinnipedDevAPIGroupWithPrefix("config.supervisor") + resources: [oidcclients/status] + verbs: [get, patch, update] - apiGroups: - #@ pinnipedDevAPIGroupWithPrefix("idp.supervisor") resources: [oidcidentityproviders] diff --git a/generated/1.17/README.adoc b/generated/1.17/README.adoc index 4d70f8a7..2b29fc45 100644 --- a/generated/1.17/README.adoc +++ b/generated/1.17/README.adoc @@ -575,6 +575,28 @@ Package v1alpha1 is the v1alpha1 version of the Pinniped supervisor configuratio +[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-config-v1alpha1-condition"] +==== Condition + +Condition status of a resource (mirrored from the metav1.Condition type added in Kubernetes 1.19). In a future API version we can switch to using the upstream type. See https://github.com/kubernetes/apimachinery/blob/v0.19.0/pkg/apis/meta/v1/types.go#L1353-L1413. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-config-v1alpha1-oidcclientstatus[$$OIDCClientStatus$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`type`* __string__ | type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) +| *`status`* __ConditionStatus__ | status of the condition, one of True, False, Unknown. +| *`observedGeneration`* __integer__ | observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. +| *`lastTransitionTime`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#time-v1-meta[$$Time$$]__ | lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. +| *`reason`* __string__ | reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. +| *`message`* __string__ | message is a human readable message indicating details about the transition. This may be an empty string. +|=== + + [id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-config-v1alpha1-federationdomain"] ==== FederationDomain @@ -720,6 +742,22 @@ OIDCClientSpec is a struct that describes an OIDC Client. |=== +[id="{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-config-v1alpha1-oidcclientstatus"] +==== OIDCClientStatus + +OIDCClientStatus is a struct that describes the actual state of an OIDCClient. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-config-v1alpha1-oidcclient[$$OIDCClient$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`phase`* __OIDCClientPhase__ | Phase summarizes the overall status of the OIDCClient. +| *`conditions`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-17-apis-supervisor-config-v1alpha1-condition[$$Condition$$] array__ | Represents the observations of an OIDCClient's current state. +|=== diff --git a/generated/1.17/apis/supervisor/config/v1alpha1/types_meta.go b/generated/1.17/apis/supervisor/config/v1alpha1/types_meta.go new file mode 100644 index 00000000..cd46a471 --- /dev/null +++ b/generated/1.17/apis/supervisor/config/v1alpha1/types_meta.go @@ -0,0 +1,75 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +// ConditionStatus is effectively an enum type for Condition.Status. +type ConditionStatus string + +// These are valid condition statuses. "ConditionTrue" means a resource is in the condition. +// "ConditionFalse" means a resource is not in the condition. "ConditionUnknown" means kubernetes +// can't decide if a resource is in the condition or not. In the future, we could add other +// intermediate conditions, e.g. ConditionDegraded. +const ( + ConditionTrue ConditionStatus = "True" + ConditionFalse ConditionStatus = "False" + ConditionUnknown ConditionStatus = "Unknown" +) + +// Condition status of a resource (mirrored from the metav1.Condition type added in Kubernetes 1.19). In a future API +// version we can switch to using the upstream type. +// See https://github.com/kubernetes/apimachinery/blob/v0.19.0/pkg/apis/meta/v1/types.go#L1353-L1413. +type Condition struct { + // type of condition in CamelCase or in foo.example.com/CamelCase. + // --- + // Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be + // useful (see .node.status.conditions), the ability to deconflict is important. + // The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Pattern=`^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$` + // +kubebuilder:validation:MaxLength=316 + Type string `json:"type"` + + // status of the condition, one of True, False, Unknown. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Enum=True;False;Unknown + Status ConditionStatus `json:"status"` + + // observedGeneration represents the .metadata.generation that the condition was set based upon. + // For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + // with respect to the current state of the instance. + // +optional + // +kubebuilder:validation:Minimum=0 + ObservedGeneration int64 `json:"observedGeneration,omitempty"` + + // lastTransitionTime is the last time the condition transitioned from one status to another. + // This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Type=string + // +kubebuilder:validation:Format=date-time + LastTransitionTime metav1.Time `json:"lastTransitionTime"` + + // reason contains a programmatic identifier indicating the reason for the condition's last transition. + // Producers of specific condition types may define expected values and meanings for this field, + // and whether the values are considered a guaranteed API. + // The value should be a CamelCase string. + // This field may not be empty. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:MaxLength=1024 + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:Pattern=`^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$` + Reason string `json:"reason"` + + // message is a human readable message indicating details about the transition. + // This may be an empty string. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:MaxLength=32768 + Message string `json:"message"` +} diff --git a/generated/1.17/apis/supervisor/config/v1alpha1/types_oidcclient.go b/generated/1.17/apis/supervisor/config/v1alpha1/types_oidcclient.go index 17a1103f..1bc7399d 100644 --- a/generated/1.17/apis/supervisor/config/v1alpha1/types_oidcclient.go +++ b/generated/1.17/apis/supervisor/config/v1alpha1/types_oidcclient.go @@ -3,8 +3,19 @@ package v1alpha1 -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +type OIDCClientPhase string + +const ( + // PhasePending is the default phase for newly-created OIDCClient resources. + PhasePending OIDCClientPhase = "Pending" + + // PhaseReady is the phase for an OIDCClient resource in a healthy state. + PhaseReady OIDCClientPhase = "Ready" + + // PhaseError is the phase for an OIDCClient in an unhealthy state. + PhaseError OIDCClientPhase = "Error" ) // +kubebuilder:validation:Pattern=`^https://.+|^http://(127\.0\.0\.1|\[::1\])(:\d+)?/` @@ -62,8 +73,19 @@ type OIDCClientSpec struct { AllowedScopes []Scope `json:"allowedScopes"` } -// OIDCClientStatus is a struct that describes the actual state of an OIDC Client. +// OIDCClientStatus is a struct that describes the actual state of an OIDCClient. type OIDCClientStatus struct { + // Phase summarizes the overall status of the OIDCClient. + // +kubebuilder:default=Pending + // +kubebuilder:validation:Enum=Pending;Ready;Error + Phase OIDCClientPhase `json:"phase,omitempty"` + + // Represents the observations of an OIDCClient's current state. + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + Conditions []Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` } // OIDCClient describes the configuration of an OIDC client. diff --git a/generated/1.17/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go b/generated/1.17/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go index f4468886..3e7f07d0 100644 --- a/generated/1.17/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go +++ b/generated/1.17/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go @@ -12,6 +12,23 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Condition) DeepCopyInto(out *Condition) { + *out = *in + in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition. +func (in *Condition) DeepCopy() *Condition { + if in == nil { + return nil + } + out := new(Condition) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *FederationDomain) DeepCopyInto(out *FederationDomain) { *out = *in @@ -157,7 +174,7 @@ func (in *OIDCClient) DeepCopyInto(out *OIDCClient) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status + in.Status.DeepCopyInto(&out.Status) return } @@ -246,6 +263,13 @@ func (in *OIDCClientSpec) DeepCopy() *OIDCClientSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OIDCClientStatus) DeepCopyInto(out *OIDCClientStatus) { *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } diff --git a/generated/1.17/crds/config.supervisor.pinniped.dev_oidcclients.yaml b/generated/1.17/crds/config.supervisor.pinniped.dev_oidcclients.yaml index 6030582f..b5569275 100644 --- a/generated/1.17/crds/config.supervisor.pinniped.dev_oidcclients.yaml +++ b/generated/1.17/crds/config.supervisor.pinniped.dev_oidcclients.yaml @@ -115,6 +115,82 @@ spec: type: object status: description: Status of the OIDC client. + properties: + conditions: + description: Represents the observations of an OIDCClient's current + state. + items: + description: Condition status of a resource (mirrored from the metav1.Condition + type added in Kubernetes 1.19). In a future API version we can + switch to using the upstream type. See https://github.com/kubernetes/apimachinery/blob/v0.19.0/pkg/apis/meta/v1/types.go#L1353-L1413. + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should be when + the underlying condition changed. If that is not known, then + using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, if .metadata.generation + is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the current + state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier indicating + the reason for the condition's last transition. Producers + of specific condition types may define expected values and + meanings for this field, and whether the values are considered + a guaranteed API. The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + phase: + default: Pending + description: Phase summarizes the overall status of the OIDCClient. + enum: + - Pending + - Ready + - Error + type: string type: object required: - spec diff --git a/generated/1.18/README.adoc b/generated/1.18/README.adoc index a987b55c..e2fb5b80 100644 --- a/generated/1.18/README.adoc +++ b/generated/1.18/README.adoc @@ -575,6 +575,28 @@ Package v1alpha1 is the v1alpha1 version of the Pinniped supervisor configuratio +[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-config-v1alpha1-condition"] +==== Condition + +Condition status of a resource (mirrored from the metav1.Condition type added in Kubernetes 1.19). In a future API version we can switch to using the upstream type. See https://github.com/kubernetes/apimachinery/blob/v0.19.0/pkg/apis/meta/v1/types.go#L1353-L1413. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-config-v1alpha1-oidcclientstatus[$$OIDCClientStatus$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`type`* __string__ | type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) +| *`status`* __ConditionStatus__ | status of the condition, one of True, False, Unknown. +| *`observedGeneration`* __integer__ | observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. +| *`lastTransitionTime`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#time-v1-meta[$$Time$$]__ | lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. +| *`reason`* __string__ | reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. +| *`message`* __string__ | message is a human readable message indicating details about the transition. This may be an empty string. +|=== + + [id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-config-v1alpha1-federationdomain"] ==== FederationDomain @@ -720,6 +742,22 @@ OIDCClientSpec is a struct that describes an OIDC Client. |=== +[id="{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-config-v1alpha1-oidcclientstatus"] +==== OIDCClientStatus + +OIDCClientStatus is a struct that describes the actual state of an OIDCClient. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-config-v1alpha1-oidcclient[$$OIDCClient$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`phase`* __OIDCClientPhase__ | Phase summarizes the overall status of the OIDCClient. +| *`conditions`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-18-apis-supervisor-config-v1alpha1-condition[$$Condition$$] array__ | Represents the observations of an OIDCClient's current state. +|=== diff --git a/generated/1.18/apis/supervisor/config/v1alpha1/types_meta.go b/generated/1.18/apis/supervisor/config/v1alpha1/types_meta.go new file mode 100644 index 00000000..cd46a471 --- /dev/null +++ b/generated/1.18/apis/supervisor/config/v1alpha1/types_meta.go @@ -0,0 +1,75 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +// ConditionStatus is effectively an enum type for Condition.Status. +type ConditionStatus string + +// These are valid condition statuses. "ConditionTrue" means a resource is in the condition. +// "ConditionFalse" means a resource is not in the condition. "ConditionUnknown" means kubernetes +// can't decide if a resource is in the condition or not. In the future, we could add other +// intermediate conditions, e.g. ConditionDegraded. +const ( + ConditionTrue ConditionStatus = "True" + ConditionFalse ConditionStatus = "False" + ConditionUnknown ConditionStatus = "Unknown" +) + +// Condition status of a resource (mirrored from the metav1.Condition type added in Kubernetes 1.19). In a future API +// version we can switch to using the upstream type. +// See https://github.com/kubernetes/apimachinery/blob/v0.19.0/pkg/apis/meta/v1/types.go#L1353-L1413. +type Condition struct { + // type of condition in CamelCase or in foo.example.com/CamelCase. + // --- + // Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be + // useful (see .node.status.conditions), the ability to deconflict is important. + // The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Pattern=`^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$` + // +kubebuilder:validation:MaxLength=316 + Type string `json:"type"` + + // status of the condition, one of True, False, Unknown. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Enum=True;False;Unknown + Status ConditionStatus `json:"status"` + + // observedGeneration represents the .metadata.generation that the condition was set based upon. + // For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + // with respect to the current state of the instance. + // +optional + // +kubebuilder:validation:Minimum=0 + ObservedGeneration int64 `json:"observedGeneration,omitempty"` + + // lastTransitionTime is the last time the condition transitioned from one status to another. + // This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Type=string + // +kubebuilder:validation:Format=date-time + LastTransitionTime metav1.Time `json:"lastTransitionTime"` + + // reason contains a programmatic identifier indicating the reason for the condition's last transition. + // Producers of specific condition types may define expected values and meanings for this field, + // and whether the values are considered a guaranteed API. + // The value should be a CamelCase string. + // This field may not be empty. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:MaxLength=1024 + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:Pattern=`^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$` + Reason string `json:"reason"` + + // message is a human readable message indicating details about the transition. + // This may be an empty string. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:MaxLength=32768 + Message string `json:"message"` +} diff --git a/generated/1.18/apis/supervisor/config/v1alpha1/types_oidcclient.go b/generated/1.18/apis/supervisor/config/v1alpha1/types_oidcclient.go index 17a1103f..1bc7399d 100644 --- a/generated/1.18/apis/supervisor/config/v1alpha1/types_oidcclient.go +++ b/generated/1.18/apis/supervisor/config/v1alpha1/types_oidcclient.go @@ -3,8 +3,19 @@ package v1alpha1 -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +type OIDCClientPhase string + +const ( + // PhasePending is the default phase for newly-created OIDCClient resources. + PhasePending OIDCClientPhase = "Pending" + + // PhaseReady is the phase for an OIDCClient resource in a healthy state. + PhaseReady OIDCClientPhase = "Ready" + + // PhaseError is the phase for an OIDCClient in an unhealthy state. + PhaseError OIDCClientPhase = "Error" ) // +kubebuilder:validation:Pattern=`^https://.+|^http://(127\.0\.0\.1|\[::1\])(:\d+)?/` @@ -62,8 +73,19 @@ type OIDCClientSpec struct { AllowedScopes []Scope `json:"allowedScopes"` } -// OIDCClientStatus is a struct that describes the actual state of an OIDC Client. +// OIDCClientStatus is a struct that describes the actual state of an OIDCClient. type OIDCClientStatus struct { + // Phase summarizes the overall status of the OIDCClient. + // +kubebuilder:default=Pending + // +kubebuilder:validation:Enum=Pending;Ready;Error + Phase OIDCClientPhase `json:"phase,omitempty"` + + // Represents the observations of an OIDCClient's current state. + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + Conditions []Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` } // OIDCClient describes the configuration of an OIDC client. diff --git a/generated/1.18/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go b/generated/1.18/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go index f4468886..3e7f07d0 100644 --- a/generated/1.18/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go +++ b/generated/1.18/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go @@ -12,6 +12,23 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Condition) DeepCopyInto(out *Condition) { + *out = *in + in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition. +func (in *Condition) DeepCopy() *Condition { + if in == nil { + return nil + } + out := new(Condition) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *FederationDomain) DeepCopyInto(out *FederationDomain) { *out = *in @@ -157,7 +174,7 @@ func (in *OIDCClient) DeepCopyInto(out *OIDCClient) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status + in.Status.DeepCopyInto(&out.Status) return } @@ -246,6 +263,13 @@ func (in *OIDCClientSpec) DeepCopy() *OIDCClientSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OIDCClientStatus) DeepCopyInto(out *OIDCClientStatus) { *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } diff --git a/generated/1.18/crds/config.supervisor.pinniped.dev_oidcclients.yaml b/generated/1.18/crds/config.supervisor.pinniped.dev_oidcclients.yaml index 6030582f..b5569275 100644 --- a/generated/1.18/crds/config.supervisor.pinniped.dev_oidcclients.yaml +++ b/generated/1.18/crds/config.supervisor.pinniped.dev_oidcclients.yaml @@ -115,6 +115,82 @@ spec: type: object status: description: Status of the OIDC client. + properties: + conditions: + description: Represents the observations of an OIDCClient's current + state. + items: + description: Condition status of a resource (mirrored from the metav1.Condition + type added in Kubernetes 1.19). In a future API version we can + switch to using the upstream type. See https://github.com/kubernetes/apimachinery/blob/v0.19.0/pkg/apis/meta/v1/types.go#L1353-L1413. + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should be when + the underlying condition changed. If that is not known, then + using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, if .metadata.generation + is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the current + state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier indicating + the reason for the condition's last transition. Producers + of specific condition types may define expected values and + meanings for this field, and whether the values are considered + a guaranteed API. The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + phase: + default: Pending + description: Phase summarizes the overall status of the OIDCClient. + enum: + - Pending + - Ready + - Error + type: string type: object required: - spec diff --git a/generated/1.19/README.adoc b/generated/1.19/README.adoc index df1fdef2..337689da 100644 --- a/generated/1.19/README.adoc +++ b/generated/1.19/README.adoc @@ -575,6 +575,28 @@ Package v1alpha1 is the v1alpha1 version of the Pinniped supervisor configuratio +[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-config-v1alpha1-condition"] +==== Condition + +Condition status of a resource (mirrored from the metav1.Condition type added in Kubernetes 1.19). In a future API version we can switch to using the upstream type. See https://github.com/kubernetes/apimachinery/blob/v0.19.0/pkg/apis/meta/v1/types.go#L1353-L1413. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-config-v1alpha1-oidcclientstatus[$$OIDCClientStatus$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`type`* __string__ | type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) +| *`status`* __ConditionStatus__ | status of the condition, one of True, False, Unknown. +| *`observedGeneration`* __integer__ | observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. +| *`lastTransitionTime`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#time-v1-meta[$$Time$$]__ | lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. +| *`reason`* __string__ | reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. +| *`message`* __string__ | message is a human readable message indicating details about the transition. This may be an empty string. +|=== + + [id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-config-v1alpha1-federationdomain"] ==== FederationDomain @@ -720,6 +742,22 @@ OIDCClientSpec is a struct that describes an OIDC Client. |=== +[id="{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-config-v1alpha1-oidcclientstatus"] +==== OIDCClientStatus + +OIDCClientStatus is a struct that describes the actual state of an OIDCClient. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-config-v1alpha1-oidcclient[$$OIDCClient$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`phase`* __OIDCClientPhase__ | Phase summarizes the overall status of the OIDCClient. +| *`conditions`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-19-apis-supervisor-config-v1alpha1-condition[$$Condition$$] array__ | Represents the observations of an OIDCClient's current state. +|=== diff --git a/generated/1.19/apis/supervisor/config/v1alpha1/types_meta.go b/generated/1.19/apis/supervisor/config/v1alpha1/types_meta.go new file mode 100644 index 00000000..cd46a471 --- /dev/null +++ b/generated/1.19/apis/supervisor/config/v1alpha1/types_meta.go @@ -0,0 +1,75 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +// ConditionStatus is effectively an enum type for Condition.Status. +type ConditionStatus string + +// These are valid condition statuses. "ConditionTrue" means a resource is in the condition. +// "ConditionFalse" means a resource is not in the condition. "ConditionUnknown" means kubernetes +// can't decide if a resource is in the condition or not. In the future, we could add other +// intermediate conditions, e.g. ConditionDegraded. +const ( + ConditionTrue ConditionStatus = "True" + ConditionFalse ConditionStatus = "False" + ConditionUnknown ConditionStatus = "Unknown" +) + +// Condition status of a resource (mirrored from the metav1.Condition type added in Kubernetes 1.19). In a future API +// version we can switch to using the upstream type. +// See https://github.com/kubernetes/apimachinery/blob/v0.19.0/pkg/apis/meta/v1/types.go#L1353-L1413. +type Condition struct { + // type of condition in CamelCase or in foo.example.com/CamelCase. + // --- + // Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be + // useful (see .node.status.conditions), the ability to deconflict is important. + // The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Pattern=`^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$` + // +kubebuilder:validation:MaxLength=316 + Type string `json:"type"` + + // status of the condition, one of True, False, Unknown. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Enum=True;False;Unknown + Status ConditionStatus `json:"status"` + + // observedGeneration represents the .metadata.generation that the condition was set based upon. + // For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + // with respect to the current state of the instance. + // +optional + // +kubebuilder:validation:Minimum=0 + ObservedGeneration int64 `json:"observedGeneration,omitempty"` + + // lastTransitionTime is the last time the condition transitioned from one status to another. + // This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Type=string + // +kubebuilder:validation:Format=date-time + LastTransitionTime metav1.Time `json:"lastTransitionTime"` + + // reason contains a programmatic identifier indicating the reason for the condition's last transition. + // Producers of specific condition types may define expected values and meanings for this field, + // and whether the values are considered a guaranteed API. + // The value should be a CamelCase string. + // This field may not be empty. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:MaxLength=1024 + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:Pattern=`^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$` + Reason string `json:"reason"` + + // message is a human readable message indicating details about the transition. + // This may be an empty string. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:MaxLength=32768 + Message string `json:"message"` +} diff --git a/generated/1.19/apis/supervisor/config/v1alpha1/types_oidcclient.go b/generated/1.19/apis/supervisor/config/v1alpha1/types_oidcclient.go index 17a1103f..1bc7399d 100644 --- a/generated/1.19/apis/supervisor/config/v1alpha1/types_oidcclient.go +++ b/generated/1.19/apis/supervisor/config/v1alpha1/types_oidcclient.go @@ -3,8 +3,19 @@ package v1alpha1 -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +type OIDCClientPhase string + +const ( + // PhasePending is the default phase for newly-created OIDCClient resources. + PhasePending OIDCClientPhase = "Pending" + + // PhaseReady is the phase for an OIDCClient resource in a healthy state. + PhaseReady OIDCClientPhase = "Ready" + + // PhaseError is the phase for an OIDCClient in an unhealthy state. + PhaseError OIDCClientPhase = "Error" ) // +kubebuilder:validation:Pattern=`^https://.+|^http://(127\.0\.0\.1|\[::1\])(:\d+)?/` @@ -62,8 +73,19 @@ type OIDCClientSpec struct { AllowedScopes []Scope `json:"allowedScopes"` } -// OIDCClientStatus is a struct that describes the actual state of an OIDC Client. +// OIDCClientStatus is a struct that describes the actual state of an OIDCClient. type OIDCClientStatus struct { + // Phase summarizes the overall status of the OIDCClient. + // +kubebuilder:default=Pending + // +kubebuilder:validation:Enum=Pending;Ready;Error + Phase OIDCClientPhase `json:"phase,omitempty"` + + // Represents the observations of an OIDCClient's current state. + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + Conditions []Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` } // OIDCClient describes the configuration of an OIDC client. diff --git a/generated/1.19/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go b/generated/1.19/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go index f4468886..3e7f07d0 100644 --- a/generated/1.19/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go +++ b/generated/1.19/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go @@ -12,6 +12,23 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Condition) DeepCopyInto(out *Condition) { + *out = *in + in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition. +func (in *Condition) DeepCopy() *Condition { + if in == nil { + return nil + } + out := new(Condition) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *FederationDomain) DeepCopyInto(out *FederationDomain) { *out = *in @@ -157,7 +174,7 @@ func (in *OIDCClient) DeepCopyInto(out *OIDCClient) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status + in.Status.DeepCopyInto(&out.Status) return } @@ -246,6 +263,13 @@ func (in *OIDCClientSpec) DeepCopy() *OIDCClientSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OIDCClientStatus) DeepCopyInto(out *OIDCClientStatus) { *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } diff --git a/generated/1.19/crds/config.supervisor.pinniped.dev_oidcclients.yaml b/generated/1.19/crds/config.supervisor.pinniped.dev_oidcclients.yaml index 6030582f..b5569275 100644 --- a/generated/1.19/crds/config.supervisor.pinniped.dev_oidcclients.yaml +++ b/generated/1.19/crds/config.supervisor.pinniped.dev_oidcclients.yaml @@ -115,6 +115,82 @@ spec: type: object status: description: Status of the OIDC client. + properties: + conditions: + description: Represents the observations of an OIDCClient's current + state. + items: + description: Condition status of a resource (mirrored from the metav1.Condition + type added in Kubernetes 1.19). In a future API version we can + switch to using the upstream type. See https://github.com/kubernetes/apimachinery/blob/v0.19.0/pkg/apis/meta/v1/types.go#L1353-L1413. + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should be when + the underlying condition changed. If that is not known, then + using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, if .metadata.generation + is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the current + state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier indicating + the reason for the condition's last transition. Producers + of specific condition types may define expected values and + meanings for this field, and whether the values are considered + a guaranteed API. The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + phase: + default: Pending + description: Phase summarizes the overall status of the OIDCClient. + enum: + - Pending + - Ready + - Error + type: string type: object required: - spec diff --git a/generated/1.20/README.adoc b/generated/1.20/README.adoc index f570511d..493e4ba2 100644 --- a/generated/1.20/README.adoc +++ b/generated/1.20/README.adoc @@ -575,6 +575,28 @@ Package v1alpha1 is the v1alpha1 version of the Pinniped supervisor configuratio +[id="{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-config-v1alpha1-condition"] +==== Condition + +Condition status of a resource (mirrored from the metav1.Condition type added in Kubernetes 1.19). In a future API version we can switch to using the upstream type. See https://github.com/kubernetes/apimachinery/blob/v0.19.0/pkg/apis/meta/v1/types.go#L1353-L1413. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-config-v1alpha1-oidcclientstatus[$$OIDCClientStatus$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`type`* __string__ | type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) +| *`status`* __ConditionStatus__ | status of the condition, one of True, False, Unknown. +| *`observedGeneration`* __integer__ | observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. +| *`lastTransitionTime`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.2/#time-v1-meta[$$Time$$]__ | lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. +| *`reason`* __string__ | reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. +| *`message`* __string__ | message is a human readable message indicating details about the transition. This may be an empty string. +|=== + + [id="{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-config-v1alpha1-federationdomain"] ==== FederationDomain @@ -720,6 +742,22 @@ OIDCClientSpec is a struct that describes an OIDC Client. |=== +[id="{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-config-v1alpha1-oidcclientstatus"] +==== OIDCClientStatus + +OIDCClientStatus is a struct that describes the actual state of an OIDCClient. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-config-v1alpha1-oidcclient[$$OIDCClient$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`phase`* __OIDCClientPhase__ | Phase summarizes the overall status of the OIDCClient. +| *`conditions`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-20-apis-supervisor-config-v1alpha1-condition[$$Condition$$] array__ | Represents the observations of an OIDCClient's current state. +|=== diff --git a/generated/1.20/apis/supervisor/config/v1alpha1/types_meta.go b/generated/1.20/apis/supervisor/config/v1alpha1/types_meta.go new file mode 100644 index 00000000..cd46a471 --- /dev/null +++ b/generated/1.20/apis/supervisor/config/v1alpha1/types_meta.go @@ -0,0 +1,75 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +// ConditionStatus is effectively an enum type for Condition.Status. +type ConditionStatus string + +// These are valid condition statuses. "ConditionTrue" means a resource is in the condition. +// "ConditionFalse" means a resource is not in the condition. "ConditionUnknown" means kubernetes +// can't decide if a resource is in the condition or not. In the future, we could add other +// intermediate conditions, e.g. ConditionDegraded. +const ( + ConditionTrue ConditionStatus = "True" + ConditionFalse ConditionStatus = "False" + ConditionUnknown ConditionStatus = "Unknown" +) + +// Condition status of a resource (mirrored from the metav1.Condition type added in Kubernetes 1.19). In a future API +// version we can switch to using the upstream type. +// See https://github.com/kubernetes/apimachinery/blob/v0.19.0/pkg/apis/meta/v1/types.go#L1353-L1413. +type Condition struct { + // type of condition in CamelCase or in foo.example.com/CamelCase. + // --- + // Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be + // useful (see .node.status.conditions), the ability to deconflict is important. + // The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Pattern=`^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$` + // +kubebuilder:validation:MaxLength=316 + Type string `json:"type"` + + // status of the condition, one of True, False, Unknown. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Enum=True;False;Unknown + Status ConditionStatus `json:"status"` + + // observedGeneration represents the .metadata.generation that the condition was set based upon. + // For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + // with respect to the current state of the instance. + // +optional + // +kubebuilder:validation:Minimum=0 + ObservedGeneration int64 `json:"observedGeneration,omitempty"` + + // lastTransitionTime is the last time the condition transitioned from one status to another. + // This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Type=string + // +kubebuilder:validation:Format=date-time + LastTransitionTime metav1.Time `json:"lastTransitionTime"` + + // reason contains a programmatic identifier indicating the reason for the condition's last transition. + // Producers of specific condition types may define expected values and meanings for this field, + // and whether the values are considered a guaranteed API. + // The value should be a CamelCase string. + // This field may not be empty. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:MaxLength=1024 + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:Pattern=`^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$` + Reason string `json:"reason"` + + // message is a human readable message indicating details about the transition. + // This may be an empty string. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:MaxLength=32768 + Message string `json:"message"` +} diff --git a/generated/1.20/apis/supervisor/config/v1alpha1/types_oidcclient.go b/generated/1.20/apis/supervisor/config/v1alpha1/types_oidcclient.go index 17a1103f..1bc7399d 100644 --- a/generated/1.20/apis/supervisor/config/v1alpha1/types_oidcclient.go +++ b/generated/1.20/apis/supervisor/config/v1alpha1/types_oidcclient.go @@ -3,8 +3,19 @@ package v1alpha1 -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +type OIDCClientPhase string + +const ( + // PhasePending is the default phase for newly-created OIDCClient resources. + PhasePending OIDCClientPhase = "Pending" + + // PhaseReady is the phase for an OIDCClient resource in a healthy state. + PhaseReady OIDCClientPhase = "Ready" + + // PhaseError is the phase for an OIDCClient in an unhealthy state. + PhaseError OIDCClientPhase = "Error" ) // +kubebuilder:validation:Pattern=`^https://.+|^http://(127\.0\.0\.1|\[::1\])(:\d+)?/` @@ -62,8 +73,19 @@ type OIDCClientSpec struct { AllowedScopes []Scope `json:"allowedScopes"` } -// OIDCClientStatus is a struct that describes the actual state of an OIDC Client. +// OIDCClientStatus is a struct that describes the actual state of an OIDCClient. type OIDCClientStatus struct { + // Phase summarizes the overall status of the OIDCClient. + // +kubebuilder:default=Pending + // +kubebuilder:validation:Enum=Pending;Ready;Error + Phase OIDCClientPhase `json:"phase,omitempty"` + + // Represents the observations of an OIDCClient's current state. + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + Conditions []Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` } // OIDCClient describes the configuration of an OIDC client. diff --git a/generated/1.20/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go b/generated/1.20/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go index f4468886..3e7f07d0 100644 --- a/generated/1.20/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go +++ b/generated/1.20/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go @@ -12,6 +12,23 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Condition) DeepCopyInto(out *Condition) { + *out = *in + in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition. +func (in *Condition) DeepCopy() *Condition { + if in == nil { + return nil + } + out := new(Condition) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *FederationDomain) DeepCopyInto(out *FederationDomain) { *out = *in @@ -157,7 +174,7 @@ func (in *OIDCClient) DeepCopyInto(out *OIDCClient) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status + in.Status.DeepCopyInto(&out.Status) return } @@ -246,6 +263,13 @@ func (in *OIDCClientSpec) DeepCopy() *OIDCClientSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OIDCClientStatus) DeepCopyInto(out *OIDCClientStatus) { *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } diff --git a/generated/1.20/crds/config.supervisor.pinniped.dev_oidcclients.yaml b/generated/1.20/crds/config.supervisor.pinniped.dev_oidcclients.yaml index 6030582f..b5569275 100644 --- a/generated/1.20/crds/config.supervisor.pinniped.dev_oidcclients.yaml +++ b/generated/1.20/crds/config.supervisor.pinniped.dev_oidcclients.yaml @@ -115,6 +115,82 @@ spec: type: object status: description: Status of the OIDC client. + properties: + conditions: + description: Represents the observations of an OIDCClient's current + state. + items: + description: Condition status of a resource (mirrored from the metav1.Condition + type added in Kubernetes 1.19). In a future API version we can + switch to using the upstream type. See https://github.com/kubernetes/apimachinery/blob/v0.19.0/pkg/apis/meta/v1/types.go#L1353-L1413. + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should be when + the underlying condition changed. If that is not known, then + using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, if .metadata.generation + is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the current + state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier indicating + the reason for the condition's last transition. Producers + of specific condition types may define expected values and + meanings for this field, and whether the values are considered + a guaranteed API. The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + phase: + default: Pending + description: Phase summarizes the overall status of the OIDCClient. + enum: + - Pending + - Ready + - Error + type: string type: object required: - spec diff --git a/generated/1.21/README.adoc b/generated/1.21/README.adoc index 768478db..59be6db3 100644 --- a/generated/1.21/README.adoc +++ b/generated/1.21/README.adoc @@ -575,6 +575,28 @@ Package v1alpha1 is the v1alpha1 version of the Pinniped supervisor configuratio +[id="{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-config-v1alpha1-condition"] +==== Condition + +Condition status of a resource (mirrored from the metav1.Condition type added in Kubernetes 1.19). In a future API version we can switch to using the upstream type. See https://github.com/kubernetes/apimachinery/blob/v0.19.0/pkg/apis/meta/v1/types.go#L1353-L1413. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-config-v1alpha1-oidcclientstatus[$$OIDCClientStatus$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`type`* __string__ | type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) +| *`status`* __ConditionStatus__ | status of the condition, one of True, False, Unknown. +| *`observedGeneration`* __integer__ | observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. +| *`lastTransitionTime`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#time-v1-meta[$$Time$$]__ | lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. +| *`reason`* __string__ | reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. +| *`message`* __string__ | message is a human readable message indicating details about the transition. This may be an empty string. +|=== + + [id="{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-config-v1alpha1-federationdomain"] ==== FederationDomain @@ -720,6 +742,22 @@ OIDCClientSpec is a struct that describes an OIDC Client. |=== +[id="{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-config-v1alpha1-oidcclientstatus"] +==== OIDCClientStatus + +OIDCClientStatus is a struct that describes the actual state of an OIDCClient. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-config-v1alpha1-oidcclient[$$OIDCClient$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`phase`* __OIDCClientPhase__ | Phase summarizes the overall status of the OIDCClient. +| *`conditions`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-21-apis-supervisor-config-v1alpha1-condition[$$Condition$$] array__ | Represents the observations of an OIDCClient's current state. +|=== diff --git a/generated/1.21/apis/supervisor/config/v1alpha1/types_meta.go b/generated/1.21/apis/supervisor/config/v1alpha1/types_meta.go new file mode 100644 index 00000000..cd46a471 --- /dev/null +++ b/generated/1.21/apis/supervisor/config/v1alpha1/types_meta.go @@ -0,0 +1,75 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +// ConditionStatus is effectively an enum type for Condition.Status. +type ConditionStatus string + +// These are valid condition statuses. "ConditionTrue" means a resource is in the condition. +// "ConditionFalse" means a resource is not in the condition. "ConditionUnknown" means kubernetes +// can't decide if a resource is in the condition or not. In the future, we could add other +// intermediate conditions, e.g. ConditionDegraded. +const ( + ConditionTrue ConditionStatus = "True" + ConditionFalse ConditionStatus = "False" + ConditionUnknown ConditionStatus = "Unknown" +) + +// Condition status of a resource (mirrored from the metav1.Condition type added in Kubernetes 1.19). In a future API +// version we can switch to using the upstream type. +// See https://github.com/kubernetes/apimachinery/blob/v0.19.0/pkg/apis/meta/v1/types.go#L1353-L1413. +type Condition struct { + // type of condition in CamelCase or in foo.example.com/CamelCase. + // --- + // Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be + // useful (see .node.status.conditions), the ability to deconflict is important. + // The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Pattern=`^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$` + // +kubebuilder:validation:MaxLength=316 + Type string `json:"type"` + + // status of the condition, one of True, False, Unknown. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Enum=True;False;Unknown + Status ConditionStatus `json:"status"` + + // observedGeneration represents the .metadata.generation that the condition was set based upon. + // For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + // with respect to the current state of the instance. + // +optional + // +kubebuilder:validation:Minimum=0 + ObservedGeneration int64 `json:"observedGeneration,omitempty"` + + // lastTransitionTime is the last time the condition transitioned from one status to another. + // This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Type=string + // +kubebuilder:validation:Format=date-time + LastTransitionTime metav1.Time `json:"lastTransitionTime"` + + // reason contains a programmatic identifier indicating the reason for the condition's last transition. + // Producers of specific condition types may define expected values and meanings for this field, + // and whether the values are considered a guaranteed API. + // The value should be a CamelCase string. + // This field may not be empty. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:MaxLength=1024 + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:Pattern=`^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$` + Reason string `json:"reason"` + + // message is a human readable message indicating details about the transition. + // This may be an empty string. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:MaxLength=32768 + Message string `json:"message"` +} diff --git a/generated/1.21/apis/supervisor/config/v1alpha1/types_oidcclient.go b/generated/1.21/apis/supervisor/config/v1alpha1/types_oidcclient.go index 17a1103f..1bc7399d 100644 --- a/generated/1.21/apis/supervisor/config/v1alpha1/types_oidcclient.go +++ b/generated/1.21/apis/supervisor/config/v1alpha1/types_oidcclient.go @@ -3,8 +3,19 @@ package v1alpha1 -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +type OIDCClientPhase string + +const ( + // PhasePending is the default phase for newly-created OIDCClient resources. + PhasePending OIDCClientPhase = "Pending" + + // PhaseReady is the phase for an OIDCClient resource in a healthy state. + PhaseReady OIDCClientPhase = "Ready" + + // PhaseError is the phase for an OIDCClient in an unhealthy state. + PhaseError OIDCClientPhase = "Error" ) // +kubebuilder:validation:Pattern=`^https://.+|^http://(127\.0\.0\.1|\[::1\])(:\d+)?/` @@ -62,8 +73,19 @@ type OIDCClientSpec struct { AllowedScopes []Scope `json:"allowedScopes"` } -// OIDCClientStatus is a struct that describes the actual state of an OIDC Client. +// OIDCClientStatus is a struct that describes the actual state of an OIDCClient. type OIDCClientStatus struct { + // Phase summarizes the overall status of the OIDCClient. + // +kubebuilder:default=Pending + // +kubebuilder:validation:Enum=Pending;Ready;Error + Phase OIDCClientPhase `json:"phase,omitempty"` + + // Represents the observations of an OIDCClient's current state. + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + Conditions []Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` } // OIDCClient describes the configuration of an OIDC client. diff --git a/generated/1.21/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go b/generated/1.21/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go index f4468886..3e7f07d0 100644 --- a/generated/1.21/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go +++ b/generated/1.21/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go @@ -12,6 +12,23 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Condition) DeepCopyInto(out *Condition) { + *out = *in + in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition. +func (in *Condition) DeepCopy() *Condition { + if in == nil { + return nil + } + out := new(Condition) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *FederationDomain) DeepCopyInto(out *FederationDomain) { *out = *in @@ -157,7 +174,7 @@ func (in *OIDCClient) DeepCopyInto(out *OIDCClient) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status + in.Status.DeepCopyInto(&out.Status) return } @@ -246,6 +263,13 @@ func (in *OIDCClientSpec) DeepCopy() *OIDCClientSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OIDCClientStatus) DeepCopyInto(out *OIDCClientStatus) { *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } diff --git a/generated/1.21/crds/config.supervisor.pinniped.dev_oidcclients.yaml b/generated/1.21/crds/config.supervisor.pinniped.dev_oidcclients.yaml index 6030582f..b5569275 100644 --- a/generated/1.21/crds/config.supervisor.pinniped.dev_oidcclients.yaml +++ b/generated/1.21/crds/config.supervisor.pinniped.dev_oidcclients.yaml @@ -115,6 +115,82 @@ spec: type: object status: description: Status of the OIDC client. + properties: + conditions: + description: Represents the observations of an OIDCClient's current + state. + items: + description: Condition status of a resource (mirrored from the metav1.Condition + type added in Kubernetes 1.19). In a future API version we can + switch to using the upstream type. See https://github.com/kubernetes/apimachinery/blob/v0.19.0/pkg/apis/meta/v1/types.go#L1353-L1413. + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should be when + the underlying condition changed. If that is not known, then + using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, if .metadata.generation + is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the current + state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier indicating + the reason for the condition's last transition. Producers + of specific condition types may define expected values and + meanings for this field, and whether the values are considered + a guaranteed API. The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + phase: + default: Pending + description: Phase summarizes the overall status of the OIDCClient. + enum: + - Pending + - Ready + - Error + type: string type: object required: - spec diff --git a/generated/1.22/README.adoc b/generated/1.22/README.adoc index 8212b9b8..7f4ace33 100644 --- a/generated/1.22/README.adoc +++ b/generated/1.22/README.adoc @@ -575,6 +575,28 @@ Package v1alpha1 is the v1alpha1 version of the Pinniped supervisor configuratio +[id="{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-config-v1alpha1-condition"] +==== Condition + +Condition status of a resource (mirrored from the metav1.Condition type added in Kubernetes 1.19). In a future API version we can switch to using the upstream type. See https://github.com/kubernetes/apimachinery/blob/v0.19.0/pkg/apis/meta/v1/types.go#L1353-L1413. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-config-v1alpha1-oidcclientstatus[$$OIDCClientStatus$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`type`* __string__ | type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) +| *`status`* __ConditionStatus__ | status of the condition, one of True, False, Unknown. +| *`observedGeneration`* __integer__ | observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. +| *`lastTransitionTime`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.22/#time-v1-meta[$$Time$$]__ | lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. +| *`reason`* __string__ | reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. +| *`message`* __string__ | message is a human readable message indicating details about the transition. This may be an empty string. +|=== + + [id="{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-config-v1alpha1-federationdomain"] ==== FederationDomain @@ -720,6 +742,22 @@ OIDCClientSpec is a struct that describes an OIDC Client. |=== +[id="{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-config-v1alpha1-oidcclientstatus"] +==== OIDCClientStatus + +OIDCClientStatus is a struct that describes the actual state of an OIDCClient. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-config-v1alpha1-oidcclient[$$OIDCClient$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`phase`* __OIDCClientPhase__ | Phase summarizes the overall status of the OIDCClient. +| *`conditions`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-22-apis-supervisor-config-v1alpha1-condition[$$Condition$$] array__ | Represents the observations of an OIDCClient's current state. +|=== diff --git a/generated/1.22/apis/supervisor/config/v1alpha1/types_meta.go b/generated/1.22/apis/supervisor/config/v1alpha1/types_meta.go new file mode 100644 index 00000000..cd46a471 --- /dev/null +++ b/generated/1.22/apis/supervisor/config/v1alpha1/types_meta.go @@ -0,0 +1,75 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +// ConditionStatus is effectively an enum type for Condition.Status. +type ConditionStatus string + +// These are valid condition statuses. "ConditionTrue" means a resource is in the condition. +// "ConditionFalse" means a resource is not in the condition. "ConditionUnknown" means kubernetes +// can't decide if a resource is in the condition or not. In the future, we could add other +// intermediate conditions, e.g. ConditionDegraded. +const ( + ConditionTrue ConditionStatus = "True" + ConditionFalse ConditionStatus = "False" + ConditionUnknown ConditionStatus = "Unknown" +) + +// Condition status of a resource (mirrored from the metav1.Condition type added in Kubernetes 1.19). In a future API +// version we can switch to using the upstream type. +// See https://github.com/kubernetes/apimachinery/blob/v0.19.0/pkg/apis/meta/v1/types.go#L1353-L1413. +type Condition struct { + // type of condition in CamelCase or in foo.example.com/CamelCase. + // --- + // Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be + // useful (see .node.status.conditions), the ability to deconflict is important. + // The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Pattern=`^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$` + // +kubebuilder:validation:MaxLength=316 + Type string `json:"type"` + + // status of the condition, one of True, False, Unknown. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Enum=True;False;Unknown + Status ConditionStatus `json:"status"` + + // observedGeneration represents the .metadata.generation that the condition was set based upon. + // For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + // with respect to the current state of the instance. + // +optional + // +kubebuilder:validation:Minimum=0 + ObservedGeneration int64 `json:"observedGeneration,omitempty"` + + // lastTransitionTime is the last time the condition transitioned from one status to another. + // This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Type=string + // +kubebuilder:validation:Format=date-time + LastTransitionTime metav1.Time `json:"lastTransitionTime"` + + // reason contains a programmatic identifier indicating the reason for the condition's last transition. + // Producers of specific condition types may define expected values and meanings for this field, + // and whether the values are considered a guaranteed API. + // The value should be a CamelCase string. + // This field may not be empty. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:MaxLength=1024 + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:Pattern=`^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$` + Reason string `json:"reason"` + + // message is a human readable message indicating details about the transition. + // This may be an empty string. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:MaxLength=32768 + Message string `json:"message"` +} diff --git a/generated/1.22/apis/supervisor/config/v1alpha1/types_oidcclient.go b/generated/1.22/apis/supervisor/config/v1alpha1/types_oidcclient.go index 17a1103f..1bc7399d 100644 --- a/generated/1.22/apis/supervisor/config/v1alpha1/types_oidcclient.go +++ b/generated/1.22/apis/supervisor/config/v1alpha1/types_oidcclient.go @@ -3,8 +3,19 @@ package v1alpha1 -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +type OIDCClientPhase string + +const ( + // PhasePending is the default phase for newly-created OIDCClient resources. + PhasePending OIDCClientPhase = "Pending" + + // PhaseReady is the phase for an OIDCClient resource in a healthy state. + PhaseReady OIDCClientPhase = "Ready" + + // PhaseError is the phase for an OIDCClient in an unhealthy state. + PhaseError OIDCClientPhase = "Error" ) // +kubebuilder:validation:Pattern=`^https://.+|^http://(127\.0\.0\.1|\[::1\])(:\d+)?/` @@ -62,8 +73,19 @@ type OIDCClientSpec struct { AllowedScopes []Scope `json:"allowedScopes"` } -// OIDCClientStatus is a struct that describes the actual state of an OIDC Client. +// OIDCClientStatus is a struct that describes the actual state of an OIDCClient. type OIDCClientStatus struct { + // Phase summarizes the overall status of the OIDCClient. + // +kubebuilder:default=Pending + // +kubebuilder:validation:Enum=Pending;Ready;Error + Phase OIDCClientPhase `json:"phase,omitempty"` + + // Represents the observations of an OIDCClient's current state. + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + Conditions []Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` } // OIDCClient describes the configuration of an OIDC client. diff --git a/generated/1.22/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go b/generated/1.22/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go index f4468886..3e7f07d0 100644 --- a/generated/1.22/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go +++ b/generated/1.22/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go @@ -12,6 +12,23 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Condition) DeepCopyInto(out *Condition) { + *out = *in + in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition. +func (in *Condition) DeepCopy() *Condition { + if in == nil { + return nil + } + out := new(Condition) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *FederationDomain) DeepCopyInto(out *FederationDomain) { *out = *in @@ -157,7 +174,7 @@ func (in *OIDCClient) DeepCopyInto(out *OIDCClient) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status + in.Status.DeepCopyInto(&out.Status) return } @@ -246,6 +263,13 @@ func (in *OIDCClientSpec) DeepCopy() *OIDCClientSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OIDCClientStatus) DeepCopyInto(out *OIDCClientStatus) { *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } diff --git a/generated/1.22/crds/config.supervisor.pinniped.dev_oidcclients.yaml b/generated/1.22/crds/config.supervisor.pinniped.dev_oidcclients.yaml index 6030582f..b5569275 100644 --- a/generated/1.22/crds/config.supervisor.pinniped.dev_oidcclients.yaml +++ b/generated/1.22/crds/config.supervisor.pinniped.dev_oidcclients.yaml @@ -115,6 +115,82 @@ spec: type: object status: description: Status of the OIDC client. + properties: + conditions: + description: Represents the observations of an OIDCClient's current + state. + items: + description: Condition status of a resource (mirrored from the metav1.Condition + type added in Kubernetes 1.19). In a future API version we can + switch to using the upstream type. See https://github.com/kubernetes/apimachinery/blob/v0.19.0/pkg/apis/meta/v1/types.go#L1353-L1413. + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should be when + the underlying condition changed. If that is not known, then + using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, if .metadata.generation + is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the current + state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier indicating + the reason for the condition's last transition. Producers + of specific condition types may define expected values and + meanings for this field, and whether the values are considered + a guaranteed API. The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + phase: + default: Pending + description: Phase summarizes the overall status of the OIDCClient. + enum: + - Pending + - Ready + - Error + type: string type: object required: - spec diff --git a/generated/1.23/README.adoc b/generated/1.23/README.adoc index e67a0344..ad7d96a6 100644 --- a/generated/1.23/README.adoc +++ b/generated/1.23/README.adoc @@ -575,6 +575,28 @@ Package v1alpha1 is the v1alpha1 version of the Pinniped supervisor configuratio +[id="{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-config-v1alpha1-condition"] +==== Condition + +Condition status of a resource (mirrored from the metav1.Condition type added in Kubernetes 1.19). In a future API version we can switch to using the upstream type. See https://github.com/kubernetes/apimachinery/blob/v0.19.0/pkg/apis/meta/v1/types.go#L1353-L1413. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-config-v1alpha1-oidcclientstatus[$$OIDCClientStatus$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`type`* __string__ | type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) +| *`status`* __ConditionStatus__ | status of the condition, one of True, False, Unknown. +| *`observedGeneration`* __integer__ | observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. +| *`lastTransitionTime`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#time-v1-meta[$$Time$$]__ | lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. +| *`reason`* __string__ | reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. +| *`message`* __string__ | message is a human readable message indicating details about the transition. This may be an empty string. +|=== + + [id="{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-config-v1alpha1-federationdomain"] ==== FederationDomain @@ -720,6 +742,22 @@ OIDCClientSpec is a struct that describes an OIDC Client. |=== +[id="{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-config-v1alpha1-oidcclientstatus"] +==== OIDCClientStatus + +OIDCClientStatus is a struct that describes the actual state of an OIDCClient. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-config-v1alpha1-oidcclient[$$OIDCClient$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`phase`* __OIDCClientPhase__ | Phase summarizes the overall status of the OIDCClient. +| *`conditions`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-23-apis-supervisor-config-v1alpha1-condition[$$Condition$$] array__ | Represents the observations of an OIDCClient's current state. +|=== diff --git a/generated/1.23/apis/supervisor/config/v1alpha1/types_meta.go b/generated/1.23/apis/supervisor/config/v1alpha1/types_meta.go new file mode 100644 index 00000000..cd46a471 --- /dev/null +++ b/generated/1.23/apis/supervisor/config/v1alpha1/types_meta.go @@ -0,0 +1,75 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +// ConditionStatus is effectively an enum type for Condition.Status. +type ConditionStatus string + +// These are valid condition statuses. "ConditionTrue" means a resource is in the condition. +// "ConditionFalse" means a resource is not in the condition. "ConditionUnknown" means kubernetes +// can't decide if a resource is in the condition or not. In the future, we could add other +// intermediate conditions, e.g. ConditionDegraded. +const ( + ConditionTrue ConditionStatus = "True" + ConditionFalse ConditionStatus = "False" + ConditionUnknown ConditionStatus = "Unknown" +) + +// Condition status of a resource (mirrored from the metav1.Condition type added in Kubernetes 1.19). In a future API +// version we can switch to using the upstream type. +// See https://github.com/kubernetes/apimachinery/blob/v0.19.0/pkg/apis/meta/v1/types.go#L1353-L1413. +type Condition struct { + // type of condition in CamelCase or in foo.example.com/CamelCase. + // --- + // Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be + // useful (see .node.status.conditions), the ability to deconflict is important. + // The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Pattern=`^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$` + // +kubebuilder:validation:MaxLength=316 + Type string `json:"type"` + + // status of the condition, one of True, False, Unknown. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Enum=True;False;Unknown + Status ConditionStatus `json:"status"` + + // observedGeneration represents the .metadata.generation that the condition was set based upon. + // For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + // with respect to the current state of the instance. + // +optional + // +kubebuilder:validation:Minimum=0 + ObservedGeneration int64 `json:"observedGeneration,omitempty"` + + // lastTransitionTime is the last time the condition transitioned from one status to another. + // This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Type=string + // +kubebuilder:validation:Format=date-time + LastTransitionTime metav1.Time `json:"lastTransitionTime"` + + // reason contains a programmatic identifier indicating the reason for the condition's last transition. + // Producers of specific condition types may define expected values and meanings for this field, + // and whether the values are considered a guaranteed API. + // The value should be a CamelCase string. + // This field may not be empty. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:MaxLength=1024 + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:Pattern=`^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$` + Reason string `json:"reason"` + + // message is a human readable message indicating details about the transition. + // This may be an empty string. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:MaxLength=32768 + Message string `json:"message"` +} diff --git a/generated/1.23/apis/supervisor/config/v1alpha1/types_oidcclient.go b/generated/1.23/apis/supervisor/config/v1alpha1/types_oidcclient.go index 17a1103f..1bc7399d 100644 --- a/generated/1.23/apis/supervisor/config/v1alpha1/types_oidcclient.go +++ b/generated/1.23/apis/supervisor/config/v1alpha1/types_oidcclient.go @@ -3,8 +3,19 @@ package v1alpha1 -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +type OIDCClientPhase string + +const ( + // PhasePending is the default phase for newly-created OIDCClient resources. + PhasePending OIDCClientPhase = "Pending" + + // PhaseReady is the phase for an OIDCClient resource in a healthy state. + PhaseReady OIDCClientPhase = "Ready" + + // PhaseError is the phase for an OIDCClient in an unhealthy state. + PhaseError OIDCClientPhase = "Error" ) // +kubebuilder:validation:Pattern=`^https://.+|^http://(127\.0\.0\.1|\[::1\])(:\d+)?/` @@ -62,8 +73,19 @@ type OIDCClientSpec struct { AllowedScopes []Scope `json:"allowedScopes"` } -// OIDCClientStatus is a struct that describes the actual state of an OIDC Client. +// OIDCClientStatus is a struct that describes the actual state of an OIDCClient. type OIDCClientStatus struct { + // Phase summarizes the overall status of the OIDCClient. + // +kubebuilder:default=Pending + // +kubebuilder:validation:Enum=Pending;Ready;Error + Phase OIDCClientPhase `json:"phase,omitempty"` + + // Represents the observations of an OIDCClient's current state. + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + Conditions []Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` } // OIDCClient describes the configuration of an OIDC client. diff --git a/generated/1.23/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go b/generated/1.23/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go index f4468886..3e7f07d0 100644 --- a/generated/1.23/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go +++ b/generated/1.23/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go @@ -12,6 +12,23 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Condition) DeepCopyInto(out *Condition) { + *out = *in + in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition. +func (in *Condition) DeepCopy() *Condition { + if in == nil { + return nil + } + out := new(Condition) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *FederationDomain) DeepCopyInto(out *FederationDomain) { *out = *in @@ -157,7 +174,7 @@ func (in *OIDCClient) DeepCopyInto(out *OIDCClient) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status + in.Status.DeepCopyInto(&out.Status) return } @@ -246,6 +263,13 @@ func (in *OIDCClientSpec) DeepCopy() *OIDCClientSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OIDCClientStatus) DeepCopyInto(out *OIDCClientStatus) { *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } diff --git a/generated/1.23/crds/config.supervisor.pinniped.dev_oidcclients.yaml b/generated/1.23/crds/config.supervisor.pinniped.dev_oidcclients.yaml index 6030582f..b5569275 100644 --- a/generated/1.23/crds/config.supervisor.pinniped.dev_oidcclients.yaml +++ b/generated/1.23/crds/config.supervisor.pinniped.dev_oidcclients.yaml @@ -115,6 +115,82 @@ spec: type: object status: description: Status of the OIDC client. + properties: + conditions: + description: Represents the observations of an OIDCClient's current + state. + items: + description: Condition status of a resource (mirrored from the metav1.Condition + type added in Kubernetes 1.19). In a future API version we can + switch to using the upstream type. See https://github.com/kubernetes/apimachinery/blob/v0.19.0/pkg/apis/meta/v1/types.go#L1353-L1413. + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should be when + the underlying condition changed. If that is not known, then + using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, if .metadata.generation + is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the current + state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier indicating + the reason for the condition's last transition. Producers + of specific condition types may define expected values and + meanings for this field, and whether the values are considered + a guaranteed API. The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + phase: + default: Pending + description: Phase summarizes the overall status of the OIDCClient. + enum: + - Pending + - Ready + - Error + type: string type: object required: - spec diff --git a/generated/1.24/README.adoc b/generated/1.24/README.adoc index 73c3b4bf..9a7ab440 100644 --- a/generated/1.24/README.adoc +++ b/generated/1.24/README.adoc @@ -575,6 +575,28 @@ Package v1alpha1 is the v1alpha1 version of the Pinniped supervisor configuratio +[id="{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-config-v1alpha1-condition"] +==== Condition + +Condition status of a resource (mirrored from the metav1.Condition type added in Kubernetes 1.19). In a future API version we can switch to using the upstream type. See https://github.com/kubernetes/apimachinery/blob/v0.19.0/pkg/apis/meta/v1/types.go#L1353-L1413. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-config-v1alpha1-oidcclientstatus[$$OIDCClientStatus$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`type`* __string__ | type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) +| *`status`* __ConditionStatus__ | status of the condition, one of True, False, Unknown. +| *`observedGeneration`* __integer__ | observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. +| *`lastTransitionTime`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#time-v1-meta[$$Time$$]__ | lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. +| *`reason`* __string__ | reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. +| *`message`* __string__ | message is a human readable message indicating details about the transition. This may be an empty string. +|=== + + [id="{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-config-v1alpha1-federationdomain"] ==== FederationDomain @@ -720,6 +742,22 @@ OIDCClientSpec is a struct that describes an OIDC Client. |=== +[id="{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-config-v1alpha1-oidcclientstatus"] +==== OIDCClientStatus + +OIDCClientStatus is a struct that describes the actual state of an OIDCClient. + +.Appears In: +**** +- xref:{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-config-v1alpha1-oidcclient[$$OIDCClient$$] +**** + +[cols="25a,75a", options="header"] +|=== +| Field | Description +| *`phase`* __OIDCClientPhase__ | Phase summarizes the overall status of the OIDCClient. +| *`conditions`* __xref:{anchor_prefix}-go-pinniped-dev-generated-1-24-apis-supervisor-config-v1alpha1-condition[$$Condition$$] array__ | Represents the observations of an OIDCClient's current state. +|=== diff --git a/generated/1.24/apis/supervisor/config/v1alpha1/types_meta.go b/generated/1.24/apis/supervisor/config/v1alpha1/types_meta.go new file mode 100644 index 00000000..cd46a471 --- /dev/null +++ b/generated/1.24/apis/supervisor/config/v1alpha1/types_meta.go @@ -0,0 +1,75 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +// ConditionStatus is effectively an enum type for Condition.Status. +type ConditionStatus string + +// These are valid condition statuses. "ConditionTrue" means a resource is in the condition. +// "ConditionFalse" means a resource is not in the condition. "ConditionUnknown" means kubernetes +// can't decide if a resource is in the condition or not. In the future, we could add other +// intermediate conditions, e.g. ConditionDegraded. +const ( + ConditionTrue ConditionStatus = "True" + ConditionFalse ConditionStatus = "False" + ConditionUnknown ConditionStatus = "Unknown" +) + +// Condition status of a resource (mirrored from the metav1.Condition type added in Kubernetes 1.19). In a future API +// version we can switch to using the upstream type. +// See https://github.com/kubernetes/apimachinery/blob/v0.19.0/pkg/apis/meta/v1/types.go#L1353-L1413. +type Condition struct { + // type of condition in CamelCase or in foo.example.com/CamelCase. + // --- + // Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be + // useful (see .node.status.conditions), the ability to deconflict is important. + // The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Pattern=`^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$` + // +kubebuilder:validation:MaxLength=316 + Type string `json:"type"` + + // status of the condition, one of True, False, Unknown. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Enum=True;False;Unknown + Status ConditionStatus `json:"status"` + + // observedGeneration represents the .metadata.generation that the condition was set based upon. + // For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + // with respect to the current state of the instance. + // +optional + // +kubebuilder:validation:Minimum=0 + ObservedGeneration int64 `json:"observedGeneration,omitempty"` + + // lastTransitionTime is the last time the condition transitioned from one status to another. + // This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Type=string + // +kubebuilder:validation:Format=date-time + LastTransitionTime metav1.Time `json:"lastTransitionTime"` + + // reason contains a programmatic identifier indicating the reason for the condition's last transition. + // Producers of specific condition types may define expected values and meanings for this field, + // and whether the values are considered a guaranteed API. + // The value should be a CamelCase string. + // This field may not be empty. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:MaxLength=1024 + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:Pattern=`^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$` + Reason string `json:"reason"` + + // message is a human readable message indicating details about the transition. + // This may be an empty string. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:MaxLength=32768 + Message string `json:"message"` +} diff --git a/generated/1.24/apis/supervisor/config/v1alpha1/types_oidcclient.go b/generated/1.24/apis/supervisor/config/v1alpha1/types_oidcclient.go index 17a1103f..1bc7399d 100644 --- a/generated/1.24/apis/supervisor/config/v1alpha1/types_oidcclient.go +++ b/generated/1.24/apis/supervisor/config/v1alpha1/types_oidcclient.go @@ -3,8 +3,19 @@ package v1alpha1 -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +type OIDCClientPhase string + +const ( + // PhasePending is the default phase for newly-created OIDCClient resources. + PhasePending OIDCClientPhase = "Pending" + + // PhaseReady is the phase for an OIDCClient resource in a healthy state. + PhaseReady OIDCClientPhase = "Ready" + + // PhaseError is the phase for an OIDCClient in an unhealthy state. + PhaseError OIDCClientPhase = "Error" ) // +kubebuilder:validation:Pattern=`^https://.+|^http://(127\.0\.0\.1|\[::1\])(:\d+)?/` @@ -62,8 +73,19 @@ type OIDCClientSpec struct { AllowedScopes []Scope `json:"allowedScopes"` } -// OIDCClientStatus is a struct that describes the actual state of an OIDC Client. +// OIDCClientStatus is a struct that describes the actual state of an OIDCClient. type OIDCClientStatus struct { + // Phase summarizes the overall status of the OIDCClient. + // +kubebuilder:default=Pending + // +kubebuilder:validation:Enum=Pending;Ready;Error + Phase OIDCClientPhase `json:"phase,omitempty"` + + // Represents the observations of an OIDCClient's current state. + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + Conditions []Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` } // OIDCClient describes the configuration of an OIDC client. diff --git a/generated/1.24/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go b/generated/1.24/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go index f4468886..3e7f07d0 100644 --- a/generated/1.24/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go +++ b/generated/1.24/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go @@ -12,6 +12,23 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Condition) DeepCopyInto(out *Condition) { + *out = *in + in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition. +func (in *Condition) DeepCopy() *Condition { + if in == nil { + return nil + } + out := new(Condition) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *FederationDomain) DeepCopyInto(out *FederationDomain) { *out = *in @@ -157,7 +174,7 @@ func (in *OIDCClient) DeepCopyInto(out *OIDCClient) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status + in.Status.DeepCopyInto(&out.Status) return } @@ -246,6 +263,13 @@ func (in *OIDCClientSpec) DeepCopy() *OIDCClientSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OIDCClientStatus) DeepCopyInto(out *OIDCClientStatus) { *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } diff --git a/generated/1.24/crds/config.supervisor.pinniped.dev_oidcclients.yaml b/generated/1.24/crds/config.supervisor.pinniped.dev_oidcclients.yaml index 6030582f..b5569275 100644 --- a/generated/1.24/crds/config.supervisor.pinniped.dev_oidcclients.yaml +++ b/generated/1.24/crds/config.supervisor.pinniped.dev_oidcclients.yaml @@ -115,6 +115,82 @@ spec: type: object status: description: Status of the OIDC client. + properties: + conditions: + description: Represents the observations of an OIDCClient's current + state. + items: + description: Condition status of a resource (mirrored from the metav1.Condition + type added in Kubernetes 1.19). In a future API version we can + switch to using the upstream type. See https://github.com/kubernetes/apimachinery/blob/v0.19.0/pkg/apis/meta/v1/types.go#L1353-L1413. + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should be when + the underlying condition changed. If that is not known, then + using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, if .metadata.generation + is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the current + state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier indicating + the reason for the condition's last transition. Producers + of specific condition types may define expected values and + meanings for this field, and whether the values are considered + a guaranteed API. The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + phase: + default: Pending + description: Phase summarizes the overall status of the OIDCClient. + enum: + - Pending + - Ready + - Error + type: string type: object required: - spec diff --git a/generated/latest/apis/supervisor/config/v1alpha1/types_meta.go b/generated/latest/apis/supervisor/config/v1alpha1/types_meta.go new file mode 100644 index 00000000..cd46a471 --- /dev/null +++ b/generated/latest/apis/supervisor/config/v1alpha1/types_meta.go @@ -0,0 +1,75 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package v1alpha1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +// ConditionStatus is effectively an enum type for Condition.Status. +type ConditionStatus string + +// These are valid condition statuses. "ConditionTrue" means a resource is in the condition. +// "ConditionFalse" means a resource is not in the condition. "ConditionUnknown" means kubernetes +// can't decide if a resource is in the condition or not. In the future, we could add other +// intermediate conditions, e.g. ConditionDegraded. +const ( + ConditionTrue ConditionStatus = "True" + ConditionFalse ConditionStatus = "False" + ConditionUnknown ConditionStatus = "Unknown" +) + +// Condition status of a resource (mirrored from the metav1.Condition type added in Kubernetes 1.19). In a future API +// version we can switch to using the upstream type. +// See https://github.com/kubernetes/apimachinery/blob/v0.19.0/pkg/apis/meta/v1/types.go#L1353-L1413. +type Condition struct { + // type of condition in CamelCase or in foo.example.com/CamelCase. + // --- + // Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be + // useful (see .node.status.conditions), the ability to deconflict is important. + // The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Pattern=`^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$` + // +kubebuilder:validation:MaxLength=316 + Type string `json:"type"` + + // status of the condition, one of True, False, Unknown. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Enum=True;False;Unknown + Status ConditionStatus `json:"status"` + + // observedGeneration represents the .metadata.generation that the condition was set based upon. + // For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + // with respect to the current state of the instance. + // +optional + // +kubebuilder:validation:Minimum=0 + ObservedGeneration int64 `json:"observedGeneration,omitempty"` + + // lastTransitionTime is the last time the condition transitioned from one status to another. + // This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:Type=string + // +kubebuilder:validation:Format=date-time + LastTransitionTime metav1.Time `json:"lastTransitionTime"` + + // reason contains a programmatic identifier indicating the reason for the condition's last transition. + // Producers of specific condition types may define expected values and meanings for this field, + // and whether the values are considered a guaranteed API. + // The value should be a CamelCase string. + // This field may not be empty. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:MaxLength=1024 + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:Pattern=`^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$` + Reason string `json:"reason"` + + // message is a human readable message indicating details about the transition. + // This may be an empty string. + // +required + // +kubebuilder:validation:Required + // +kubebuilder:validation:MaxLength=32768 + Message string `json:"message"` +} diff --git a/generated/latest/apis/supervisor/config/v1alpha1/types_oidcclient.go b/generated/latest/apis/supervisor/config/v1alpha1/types_oidcclient.go index 17a1103f..1bc7399d 100644 --- a/generated/latest/apis/supervisor/config/v1alpha1/types_oidcclient.go +++ b/generated/latest/apis/supervisor/config/v1alpha1/types_oidcclient.go @@ -3,8 +3,19 @@ package v1alpha1 -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +type OIDCClientPhase string + +const ( + // PhasePending is the default phase for newly-created OIDCClient resources. + PhasePending OIDCClientPhase = "Pending" + + // PhaseReady is the phase for an OIDCClient resource in a healthy state. + PhaseReady OIDCClientPhase = "Ready" + + // PhaseError is the phase for an OIDCClient in an unhealthy state. + PhaseError OIDCClientPhase = "Error" ) // +kubebuilder:validation:Pattern=`^https://.+|^http://(127\.0\.0\.1|\[::1\])(:\d+)?/` @@ -62,8 +73,19 @@ type OIDCClientSpec struct { AllowedScopes []Scope `json:"allowedScopes"` } -// OIDCClientStatus is a struct that describes the actual state of an OIDC Client. +// OIDCClientStatus is a struct that describes the actual state of an OIDCClient. type OIDCClientStatus struct { + // Phase summarizes the overall status of the OIDCClient. + // +kubebuilder:default=Pending + // +kubebuilder:validation:Enum=Pending;Ready;Error + Phase OIDCClientPhase `json:"phase,omitempty"` + + // Represents the observations of an OIDCClient's current state. + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + Conditions []Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` } // OIDCClient describes the configuration of an OIDC client. diff --git a/generated/latest/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go b/generated/latest/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go index f4468886..3e7f07d0 100644 --- a/generated/latest/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go +++ b/generated/latest/apis/supervisor/config/v1alpha1/zz_generated.deepcopy.go @@ -12,6 +12,23 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Condition) DeepCopyInto(out *Condition) { + *out = *in + in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition. +func (in *Condition) DeepCopy() *Condition { + if in == nil { + return nil + } + out := new(Condition) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *FederationDomain) DeepCopyInto(out *FederationDomain) { *out = *in @@ -157,7 +174,7 @@ func (in *OIDCClient) DeepCopyInto(out *OIDCClient) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status + in.Status.DeepCopyInto(&out.Status) return } @@ -246,6 +263,13 @@ func (in *OIDCClientSpec) DeepCopy() *OIDCClientSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OIDCClientStatus) DeepCopyInto(out *OIDCClientStatus) { *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } diff --git a/internal/controller/conditionsutil/conditions_util.go b/internal/controller/conditionsutil/conditions_util.go new file mode 100644 index 00000000..431c1052 --- /dev/null +++ b/internal/controller/conditionsutil/conditions_util.go @@ -0,0 +1,123 @@ +// Copyright 2021-2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package conditionsutil + +import ( + "sort" + + "k8s.io/apimachinery/pkg/api/equality" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + configv1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/config/v1alpha1" + idpv1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/idp/v1alpha1" + "go.pinniped.dev/internal/plog" +) + +// MergeIDPConditions merges conditions into conditionsToUpdate. If returns true if it merged any error conditions. +func MergeIDPConditions(conditions []*idpv1alpha1.Condition, observedGeneration int64, conditionsToUpdate *[]idpv1alpha1.Condition, log plog.MinLogger) bool { + hadErrorCondition := false + for i := range conditions { + cond := conditions[i].DeepCopy() + cond.LastTransitionTime = v1.Now() + cond.ObservedGeneration = observedGeneration + if mergeIDPCondition(conditionsToUpdate, cond) { + log.Info("updated condition", "type", cond.Type, "status", cond.Status, "reason", cond.Reason, "message", cond.Message) + } + if cond.Status == idpv1alpha1.ConditionFalse { + hadErrorCondition = true + } + } + sort.SliceStable(*conditionsToUpdate, func(i, j int) bool { + return (*conditionsToUpdate)[i].Type < (*conditionsToUpdate)[j].Type + }) + return hadErrorCondition +} + +// mergeIDPCondition merges a new idpv1alpha1.Condition into a slice of existing conditions. It returns true +// if the condition has meaningfully changed. +func mergeIDPCondition(existing *[]idpv1alpha1.Condition, new *idpv1alpha1.Condition) bool { + // Find any existing condition with a matching type. + var old *idpv1alpha1.Condition + for i := range *existing { + if (*existing)[i].Type == new.Type { + old = &(*existing)[i] + continue + } + } + + // If there is no existing condition of this type, append this one and we're done. + if old == nil { + *existing = append(*existing, *new) + return true + } + + // Set the LastTransitionTime depending on whether the status has changed. + new = new.DeepCopy() + if old.Status == new.Status { + new.LastTransitionTime = old.LastTransitionTime + } + + // If anything has actually changed, update the entry and return true. + if !equality.Semantic.DeepEqual(old, new) { + *old = *new + return true + } + + // Otherwise the entry is already up to date. + return false +} + +// MergeConfigConditions merges conditions into conditionsToUpdate. If returns true if it merged any error conditions. +func MergeConfigConditions(conditions []*configv1alpha1.Condition, observedGeneration int64, conditionsToUpdate *[]configv1alpha1.Condition, log plog.MinLogger) bool { + hadErrorCondition := false + for i := range conditions { + cond := conditions[i].DeepCopy() + cond.LastTransitionTime = v1.Now() + cond.ObservedGeneration = observedGeneration + if mergeConfigCondition(conditionsToUpdate, cond) { + log.Info("updated condition", "type", cond.Type, "status", cond.Status, "reason", cond.Reason, "message", cond.Message) + } + if cond.Status == configv1alpha1.ConditionFalse { + hadErrorCondition = true + } + } + sort.SliceStable(*conditionsToUpdate, func(i, j int) bool { + return (*conditionsToUpdate)[i].Type < (*conditionsToUpdate)[j].Type + }) + return hadErrorCondition +} + +// mergeConfigCondition merges a new idpv1alpha1.Condition into a slice of existing conditions. It returns true +// if the condition has meaningfully changed. +func mergeConfigCondition(existing *[]configv1alpha1.Condition, new *configv1alpha1.Condition) bool { + // Find any existing condition with a matching type. + var old *configv1alpha1.Condition + for i := range *existing { + if (*existing)[i].Type == new.Type { + old = &(*existing)[i] + continue + } + } + + // If there is no existing condition of this type, append this one and we're done. + if old == nil { + *existing = append(*existing, *new) + return true + } + + // Set the LastTransitionTime depending on whether the status has changed. + new = new.DeepCopy() + if old.Status == new.Status { + new.LastTransitionTime = old.LastTransitionTime + } + + // If anything has actually changed, update the entry and return true. + if !equality.Semantic.DeepEqual(old, new) { + *old = *new + return true + } + + // Otherwise the entry is already up to date. + return false +} diff --git a/internal/controller/conditionsutil/conditions_util.go.go b/internal/controller/conditionsutil/conditions_util.go.go deleted file mode 100644 index dec4695a..00000000 --- a/internal/controller/conditionsutil/conditions_util.go.go +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2021 the Pinniped contributors. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -package conditionsutil - -import ( - "sort" - - "k8s.io/apimachinery/pkg/api/equality" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "go.pinniped.dev/generated/latest/apis/supervisor/idp/v1alpha1" - "go.pinniped.dev/internal/plog" -) - -// Merge merges conditions into conditionsToUpdate. If returns true if it merged any error conditions. -func Merge(conditions []*v1alpha1.Condition, observedGeneration int64, conditionsToUpdate *[]v1alpha1.Condition, log plog.MinLogger) bool { - hadErrorCondition := false - for i := range conditions { - cond := conditions[i].DeepCopy() - cond.LastTransitionTime = v1.Now() - cond.ObservedGeneration = observedGeneration - if mergeCondition(conditionsToUpdate, cond) { - log.Info("updated condition", "type", cond.Type, "status", cond.Status, "reason", cond.Reason, "message", cond.Message) - } - if cond.Status == v1alpha1.ConditionFalse { - hadErrorCondition = true - } - } - sort.SliceStable(*conditionsToUpdate, func(i, j int) bool { - return (*conditionsToUpdate)[i].Type < (*conditionsToUpdate)[j].Type - }) - return hadErrorCondition -} - -// mergeCondition merges a new v1alpha1.Condition into a slice of existing conditions. It returns true -// if the condition has meaningfully changed. -func mergeCondition(existing *[]v1alpha1.Condition, new *v1alpha1.Condition) bool { - // Find any existing condition with a matching type. - var old *v1alpha1.Condition - for i := range *existing { - if (*existing)[i].Type == new.Type { - old = &(*existing)[i] - continue - } - } - - // If there is no existing condition of this type, append this one and we're done. - if old == nil { - *existing = append(*existing, *new) - return true - } - - // Set the LastTransitionTime depending on whether the status has changed. - new = new.DeepCopy() - if old.Status == new.Status { - new.LastTransitionTime = old.LastTransitionTime - } - - // If anything has actually changed, update the entry and return true. - if !equality.Semantic.DeepEqual(old, new) { - *old = *new - return true - } - - // Otherwise the entry is already up to date. - return false -} diff --git a/internal/controller/supervisorconfig/activedirectoryupstreamwatcher/active_directory_upstream_watcher.go b/internal/controller/supervisorconfig/activedirectoryupstreamwatcher/active_directory_upstream_watcher.go index 4aaa41b9..5fd198ea 100644 --- a/internal/controller/supervisorconfig/activedirectoryupstreamwatcher/active_directory_upstream_watcher.go +++ b/internal/controller/supervisorconfig/activedirectoryupstreamwatcher/active_directory_upstream_watcher.go @@ -362,7 +362,7 @@ func (c *activeDirectoryWatcherController) updateStatus(ctx context.Context, ups log := plog.WithValues("namespace", upstream.Namespace, "name", upstream.Name) updated := upstream.DeepCopy() - hadErrorCondition := conditionsutil.Merge(conditions, upstream.Generation, &updated.Status.Conditions, log) + hadErrorCondition := conditionsutil.MergeIDPConditions(conditions, upstream.Generation, &updated.Status.Conditions, log) updated.Status.Phase = v1alpha1.ActiveDirectoryPhaseReady if hadErrorCondition { diff --git a/internal/controller/supervisorconfig/ldapupstreamwatcher/ldap_upstream_watcher.go b/internal/controller/supervisorconfig/ldapupstreamwatcher/ldap_upstream_watcher.go index a942bbf9..6d370e26 100644 --- a/internal/controller/supervisorconfig/ldapupstreamwatcher/ldap_upstream_watcher.go +++ b/internal/controller/supervisorconfig/ldapupstreamwatcher/ldap_upstream_watcher.go @@ -255,7 +255,7 @@ func (c *ldapWatcherController) updateStatus(ctx context.Context, upstream *v1al log := plog.WithValues("namespace", upstream.Namespace, "name", upstream.Name) updated := upstream.DeepCopy() - hadErrorCondition := conditionsutil.Merge(conditions, upstream.Generation, &updated.Status.Conditions, log) + hadErrorCondition := conditionsutil.MergeIDPConditions(conditions, upstream.Generation, &updated.Status.Conditions, log) updated.Status.Phase = v1alpha1.LDAPPhaseReady if hadErrorCondition { diff --git a/internal/controller/supervisorconfig/oidcclientwatcher/oidc_client_watcher.go b/internal/controller/supervisorconfig/oidcclientwatcher/oidc_client_watcher.go new file mode 100644 index 00000000..600f7420 --- /dev/null +++ b/internal/controller/supervisorconfig/oidcclientwatcher/oidc_client_watcher.go @@ -0,0 +1,317 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package oidcclientwatcher + +import ( + "context" + "fmt" + + v1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/equality" + k8serrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + corev1informers "k8s.io/client-go/informers/core/v1" + + "go.pinniped.dev/generated/latest/apis/supervisor/config/v1alpha1" + pinnipedclientset "go.pinniped.dev/generated/latest/client/supervisor/clientset/versioned" + configInformers "go.pinniped.dev/generated/latest/client/supervisor/informers/externalversions/config/v1alpha1" + pinnipedcontroller "go.pinniped.dev/internal/controller" + "go.pinniped.dev/internal/controller/conditionsutil" + "go.pinniped.dev/internal/controllerlib" + "go.pinniped.dev/internal/oidcclientsecretstorage" + "go.pinniped.dev/internal/plog" +) + +const ( + clientSecretExists = "ClientSecretExists" + allowedGrantTypesValid = "AllowedGrantTypesValid" + allowedScopesValid = "AllowedScopesValid" + + reasonSuccess = "Success" + reasonMissingRequiredValue = "MissingRequiredValue" + reasonNoClientSecretFound = "NoClientSecretFound" + + authorizationCodeGrantTypeName = "authorization_code" + refreshTokenGrantTypeName = "refresh_token" + tokenExchangeGrantTypeName = "urn:ietf:params:oauth:grant-type:token-exchange" //nolint:gosec // this is not a credential + + openidScopeName = "openid" + offlineAccessScopeName = "offline_access" + requestAudienceScopeName = "pinniped:request-audience" + usernameScopeName = "username" + groupsScopeName = "groups" + + allowedGrantTypesFieldName = "allowedGrantTypes" + allowedScopesFieldName = "allowedScopes" + + secretTypeToObserve = "storage.pinniped.dev/oidc-client-secret" //nolint:gosec // this is not a credential +) + +type oidcClientWatcherController struct { + pinnipedClient pinnipedclientset.Interface + oidcClientInformer configInformers.OIDCClientInformer + secretInformer corev1informers.SecretInformer +} + +// NewOIDCClientWatcherController returns a controllerlib.Controller that watches OIDCClients and updates +// their status with validation errors. +func NewOIDCClientWatcherController( + pinnipedClient pinnipedclientset.Interface, + secretInformer corev1informers.SecretInformer, + oidcClientInformer configInformers.OIDCClientInformer, + withInformer pinnipedcontroller.WithInformerOptionFunc, +) controllerlib.Controller { + return controllerlib.New( + controllerlib.Config{ + Name: "OIDCClientWatcherController", + Syncer: &oidcClientWatcherController{ + pinnipedClient: pinnipedClient, + secretInformer: secretInformer, + oidcClientInformer: oidcClientInformer, + }, + }, + // We want to be notified when an OIDCClient's corresponding secret gets updated or deleted. + withInformer( + secretInformer, + pinnipedcontroller.MatchAnySecretOfTypeFilter(secretTypeToObserve, pinnipedcontroller.SingletonQueue()), + controllerlib.InformerOption{}, + ), + // We want to be notified when anything happens to an OIDCClient. + withInformer( + oidcClientInformer, + pinnipedcontroller.MatchAnythingFilter(pinnipedcontroller.SingletonQueue()), + controllerlib.InformerOption{}, + ), + ) +} + +// Sync implements controllerlib.Syncer. +func (c *oidcClientWatcherController) Sync(ctx controllerlib.Context) error { + // Sync could be called on either a Secret or an OIDCClient, so to keep it simple, revalidate + // all OIDCClients whenever anything changes. + oidcClients, err := c.oidcClientInformer.Lister().List(labels.Everything()) + if err != nil { + return fmt.Errorf("failed to list OIDCClients: %w", err) + } + + // We're only going to use storage to call GetName(), which happens to not need the constructor params. + // This is because we can read the Secrets from the informer cache here, instead of doing live reads. + storage := oidcclientsecretstorage.New(nil, nil) + + for _, oidcClient := range oidcClients { + correspondingSecretName := storage.GetName(oidcClient.UID) + + secret, err := c.secretInformer.Lister().Secrets(oidcClient.Namespace).Get(correspondingSecretName) + if err != nil { + if !k8serrors.IsNotFound(err) { + // Anything other than a NotFound error is unexpected when reading from an informer. + return fmt.Errorf("failed to get %s/%s secret: %w", oidcClient.Namespace, correspondingSecretName, err) + } + // Got a NotFound error, so continue. The Secret just doesn't exist yet, which is okay. + plog.DebugErr( + "OIDCClientWatcherController error getting storage Secret for OIDCClient's client secrets", err, + "oidcClientName", oidcClient.Name, + "oidcClientNamespace", oidcClient.Namespace, + "secretName", correspondingSecretName, + ) + secret = nil + } + + conditions := validateOIDCClient(oidcClient, secret) + + if err := c.updateStatus(ctx.Context, oidcClient, conditions); err != nil { + return fmt.Errorf("cannot update OIDCClient '%s/%s': %w", oidcClient.Namespace, oidcClient.Name, err) + } + + plog.Debug( + "OIDCClientWatcherController Sync updated an OIDCClient", + "oidcClientName", oidcClient.Name, + "oidcClientNamespace", oidcClient.Namespace, + "conditionsCount", len(conditions), + ) + } + + return nil +} + +// validateOIDCClient validates the OIDCClient and its corresponding client secret storage Secret. +// When the corresponding client secret storage Secret was not found, pass nil to this function to +// get the validation error for that case. +func validateOIDCClient(oidcClient *v1alpha1.OIDCClient, secret *v1.Secret) []*v1alpha1.Condition { + c := validateSecret(secret, []*v1alpha1.Condition{}) + c = validateAllowedGrantTypes(oidcClient, c) + c = validateAllowedScopes(oidcClient, c) + return c +} + +// validateAllowedScopes checks if allowedScopes is valid on the OIDCClient. +func validateAllowedScopes(oidcClient *v1alpha1.OIDCClient, conditions []*v1alpha1.Condition) []*v1alpha1.Condition { + switch { + case !allowedScopesContains(oidcClient, openidScopeName): + conditions = append(conditions, &v1alpha1.Condition{ + Type: allowedScopesValid, + Status: v1alpha1.ConditionFalse, + Reason: reasonMissingRequiredValue, + Message: fmt.Sprintf("%q must always be included in %q", openidScopeName, allowedScopesFieldName), + }) + case allowedGrantTypesContains(oidcClient, refreshTokenGrantTypeName) && !allowedScopesContains(oidcClient, offlineAccessScopeName): + conditions = append(conditions, &v1alpha1.Condition{ + Type: allowedScopesValid, + Status: v1alpha1.ConditionFalse, + Reason: reasonMissingRequiredValue, + Message: fmt.Sprintf("%q must be included in %q when %q is included in %q", + offlineAccessScopeName, allowedScopesFieldName, refreshTokenGrantTypeName, allowedGrantTypesFieldName), + }) + case allowedScopesContains(oidcClient, requestAudienceScopeName) && + (!allowedScopesContains(oidcClient, usernameScopeName) || !allowedScopesContains(oidcClient, groupsScopeName)): + conditions = append(conditions, &v1alpha1.Condition{ + Type: allowedScopesValid, + Status: v1alpha1.ConditionFalse, + Reason: reasonMissingRequiredValue, + Message: fmt.Sprintf("%q and %q must be included in %q when %q is included in %q", + usernameScopeName, groupsScopeName, allowedScopesFieldName, requestAudienceScopeName, allowedScopesFieldName), + }) + case allowedGrantTypesContains(oidcClient, tokenExchangeGrantTypeName) && !allowedScopesContains(oidcClient, requestAudienceScopeName): + conditions = append(conditions, &v1alpha1.Condition{ + Type: allowedScopesValid, + Status: v1alpha1.ConditionFalse, + Reason: reasonMissingRequiredValue, + Message: fmt.Sprintf("%q must be included in %q when %q is included in %q", + requestAudienceScopeName, allowedScopesFieldName, tokenExchangeGrantTypeName, allowedGrantTypesFieldName), + }) + default: + conditions = append(conditions, &v1alpha1.Condition{ + Type: allowedScopesValid, + Status: v1alpha1.ConditionTrue, + Reason: reasonSuccess, + Message: fmt.Sprintf("%q is valid", allowedScopesFieldName), + }) + } + return conditions +} + +// validateAllowedGrantTypes checks if allowedGrantTypes is valid on the OIDCClient. +func validateAllowedGrantTypes(oidcClient *v1alpha1.OIDCClient, conditions []*v1alpha1.Condition) []*v1alpha1.Condition { + switch { + case !allowedGrantTypesContains(oidcClient, authorizationCodeGrantTypeName): + conditions = append(conditions, &v1alpha1.Condition{ + Type: allowedGrantTypesValid, + Status: v1alpha1.ConditionFalse, + Reason: reasonMissingRequiredValue, + Message: fmt.Sprintf("%q must always be included in %q", + authorizationCodeGrantTypeName, allowedGrantTypesFieldName), + }) + case allowedScopesContains(oidcClient, offlineAccessScopeName) && !allowedGrantTypesContains(oidcClient, refreshTokenGrantTypeName): + conditions = append(conditions, &v1alpha1.Condition{ + Type: allowedGrantTypesValid, + Status: v1alpha1.ConditionFalse, + Reason: reasonMissingRequiredValue, + Message: fmt.Sprintf("%q must be included in %q when %q is included in %q", + refreshTokenGrantTypeName, allowedGrantTypesFieldName, offlineAccessScopeName, allowedScopesFieldName), + }) + case allowedScopesContains(oidcClient, requestAudienceScopeName) && !allowedGrantTypesContains(oidcClient, tokenExchangeGrantTypeName): + conditions = append(conditions, &v1alpha1.Condition{ + Type: allowedGrantTypesValid, + Status: v1alpha1.ConditionFalse, + Reason: reasonMissingRequiredValue, + Message: fmt.Sprintf("%q must be included in %q when %q is included in %q", + tokenExchangeGrantTypeName, allowedGrantTypesFieldName, requestAudienceScopeName, allowedScopesFieldName), + }) + default: + conditions = append(conditions, &v1alpha1.Condition{ + Type: allowedGrantTypesValid, + Status: v1alpha1.ConditionTrue, + Reason: reasonSuccess, + Message: fmt.Sprintf("%q is valid", allowedGrantTypesFieldName), + }) + } + return conditions +} + +// validateSecret checks if the client secret storage Secret is valid and contains at least one client secret. +func validateSecret(secret *v1.Secret, conditions []*v1alpha1.Condition) []*v1alpha1.Condition { + if secret == nil { + // Invalid: no storage Secret found. + conditions = append(conditions, &v1alpha1.Condition{ + Type: clientSecretExists, + Status: v1alpha1.ConditionFalse, + Reason: reasonNoClientSecretFound, + Message: "no client secret found (no Secret storage found)", + }) + return conditions + } + + storedClientSecret, err := oidcclientsecretstorage.ReadFromSecret(secret) + if err != nil { + // Invalid: storage Secret exists but its data could not be parsed. + conditions = append(conditions, &v1alpha1.Condition{ + Type: clientSecretExists, + Status: v1alpha1.ConditionFalse, + Reason: reasonNoClientSecretFound, + Message: fmt.Sprintf("error reading client secret storage: %s", err.Error()), + }) + return conditions + } + + // Successfully read the stored client secrets, so check if there are any stored in the list. + storedClientSecretsCount := len(storedClientSecret.SecretHashes) + if storedClientSecretsCount == 0 { + // Invalid: no client secrets stored. + conditions = append(conditions, &v1alpha1.Condition{ + Type: clientSecretExists, + Status: v1alpha1.ConditionFalse, + Reason: reasonNoClientSecretFound, + Message: "no client secret found (empty list in storage)", + }) + } else { + // Valid: has at least one client secret stored for this OIDC client. + conditions = append(conditions, &v1alpha1.Condition{ + Type: clientSecretExists, + Status: v1alpha1.ConditionTrue, + Reason: reasonSuccess, + Message: fmt.Sprintf("%d client secret(s) found", storedClientSecretsCount), + }) + } + return conditions +} + +func allowedGrantTypesContains(haystack *v1alpha1.OIDCClient, needle string) bool { + for _, hay := range haystack.Spec.AllowedGrantTypes { + if hay == v1alpha1.GrantType(needle) { + return true + } + } + return false +} + +func allowedScopesContains(haystack *v1alpha1.OIDCClient, needle string) bool { + for _, hay := range haystack.Spec.AllowedScopes { + if hay == v1alpha1.Scope(needle) { + return true + } + } + return false +} + +func (c *oidcClientWatcherController) updateStatus(ctx context.Context, upstream *v1alpha1.OIDCClient, conditions []*v1alpha1.Condition) error { + updated := upstream.DeepCopy() + + hadErrorCondition := conditionsutil.MergeConfigConditions(conditions, upstream.Generation, &updated.Status.Conditions, plog.New()) + + updated.Status.Phase = v1alpha1.PhaseReady + if hadErrorCondition { + updated.Status.Phase = v1alpha1.PhaseError + } + + if equality.Semantic.DeepEqual(upstream, updated) { + return nil + } + + _, err := c.pinnipedClient. + ConfigV1alpha1(). + OIDCClients(upstream.Namespace). + UpdateStatus(ctx, updated, metav1.UpdateOptions{}) + return err +} diff --git a/internal/controller/supervisorconfig/oidcclientwatcher/oidc_client_watcher_test.go b/internal/controller/supervisorconfig/oidcclientwatcher/oidc_client_watcher_test.go new file mode 100644 index 00000000..683c92ab --- /dev/null +++ b/internal/controller/supervisorconfig/oidcclientwatcher/oidc_client_watcher_test.go @@ -0,0 +1,903 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package oidcclientwatcher + +import ( + "context" + "encoding/base32" + "fmt" + "strings" + "testing" + "time" + + "github.com/stretchr/testify/require" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + kubeinformers "k8s.io/client-go/informers" + kubernetesfake "k8s.io/client-go/kubernetes/fake" + + configv1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/config/v1alpha1" + pinnipedfake "go.pinniped.dev/generated/latest/client/supervisor/clientset/versioned/fake" + pinnipedinformers "go.pinniped.dev/generated/latest/client/supervisor/informers/externalversions" + "go.pinniped.dev/internal/controllerlib" + "go.pinniped.dev/internal/testutil" +) + +func TestOIDCClientWatcherControllerFilterSecret(t *testing.T) { + t.Parallel() + + tests := []struct { + name string + secret metav1.Object + wantAdd bool + wantUpdate bool + wantDelete bool + }{ + { + name: "a secret of the right type", + secret: &corev1.Secret{ + Type: "storage.pinniped.dev/oidc-client-secret", + ObjectMeta: metav1.ObjectMeta{Name: "some-name", Namespace: "some-namespace"}, + }, + wantAdd: true, + wantUpdate: true, + wantDelete: true, + }, + { + name: "a secret of the wrong type", + secret: &corev1.Secret{ + Type: "secrets.pinniped.dev/some-other-type", + ObjectMeta: metav1.ObjectMeta{Name: "some-name", Namespace: "some-namespace"}, + }, + }, + { + name: "resource of wrong data type", + secret: &corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{Name: "some-name", Namespace: "some-namespace"}, + }, + }, + } + for _, test := range tests { + tt := test + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + secretInformer := kubeinformers.NewSharedInformerFactory( + kubernetesfake.NewSimpleClientset(), + 0, + ).Core().V1().Secrets() + oidcClientsInformer := pinnipedinformers.NewSharedInformerFactory( + pinnipedfake.NewSimpleClientset(), + 0, + ).Config().V1alpha1().OIDCClients() + withInformer := testutil.NewObservableWithInformerOption() + _ = NewOIDCClientWatcherController( + nil, // pinnipedClient, not needed + secretInformer, + oidcClientsInformer, + withInformer.WithInformer, + ) + + unrelated := corev1.Secret{} + filter := withInformer.GetFilterForInformer(secretInformer) + require.Equal(t, tt.wantAdd, filter.Add(tt.secret)) + require.Equal(t, tt.wantUpdate, filter.Update(&unrelated, tt.secret)) + require.Equal(t, tt.wantUpdate, filter.Update(tt.secret, &unrelated)) + require.Equal(t, tt.wantDelete, filter.Delete(tt.secret)) + }) + } +} + +func TestOIDCClientWatcherControllerFilterOIDCClient(t *testing.T) { + t.Parallel() + + tests := []struct { + name string + oidcClient configv1alpha1.OIDCClient + wantAdd bool + wantUpdate bool + wantDelete bool + }{ + { + name: "anything goes", + oidcClient: configv1alpha1.OIDCClient{}, + wantAdd: true, + wantUpdate: true, + wantDelete: true, + }, + } + for _, test := range tests { + tt := test + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + secretInformer := kubeinformers.NewSharedInformerFactory( + kubernetesfake.NewSimpleClientset(), + 0, + ).Core().V1().Secrets() + oidcClientsInformer := pinnipedinformers.NewSharedInformerFactory( + pinnipedfake.NewSimpleClientset(), + 0, + ).Config().V1alpha1().OIDCClients() + withInformer := testutil.NewObservableWithInformerOption() + _ = NewOIDCClientWatcherController( + nil, // pinnipedClient, not needed + secretInformer, + oidcClientsInformer, + withInformer.WithInformer, + ) + + unrelated := configv1alpha1.OIDCClient{} + filter := withInformer.GetFilterForInformer(oidcClientsInformer) + require.Equal(t, tt.wantAdd, filter.Add(&tt.oidcClient)) + require.Equal(t, tt.wantUpdate, filter.Update(&unrelated, &tt.oidcClient)) + require.Equal(t, tt.wantUpdate, filter.Update(&tt.oidcClient, &unrelated)) + require.Equal(t, tt.wantDelete, filter.Delete(&tt.oidcClient)) + }) + } +} + +func TestOIDCClientWatcherControllerSync(t *testing.T) { + t.Parallel() + + const ( + testName = "test-name" + testNamespace = "test-namespace" + testUID = "test-uid-123" + + //nolint:gosec // this is not a credential + testBcryptSecret1 = "$2y$15$Kh7cRj0ScSD5QelE3ZNSl.nF04JDv7zb3SgGN.tSfLIX.4kt3UX7m" // bcrypt of "password1" + + //nolint:gosec // this is not a credential + testBcryptSecret2 = "$2y$15$Kh7cRj0ScSD5QelE3ZNSl.nF04JDv7zb3SgGN.tSfLIX.4kt3UX7m" // bcrypt of "password2" + ) + + now := metav1.NewTime(time.Now().UTC()) + earlier := metav1.NewTime(now.Add(-1 * time.Hour).UTC()) + + happyAllowedGrantTypesCondition := func(time metav1.Time, observedGeneration int64) configv1alpha1.Condition { + return configv1alpha1.Condition{ + Type: "AllowedGrantTypesValid", + Status: "True", + LastTransitionTime: time, + Reason: "Success", + Message: `"allowedGrantTypes" is valid`, + ObservedGeneration: observedGeneration, + } + } + + sadAllowedGrantTypesCondition := func(time metav1.Time, observedGeneration int64, message string) configv1alpha1.Condition { + return configv1alpha1.Condition{ + Type: "AllowedGrantTypesValid", + Status: "False", + LastTransitionTime: time, + Reason: "MissingRequiredValue", + Message: message, + ObservedGeneration: observedGeneration, + } + } + + happyClientSecretsCondition := func(howMany int, time metav1.Time, observedGeneration int64) configv1alpha1.Condition { + return configv1alpha1.Condition{ + Type: "ClientSecretExists", + Status: "True", + LastTransitionTime: time, + Reason: "Success", + Message: fmt.Sprintf(`%d client secret(s) found`, howMany), + ObservedGeneration: observedGeneration, + } + } + + sadClientSecretsCondition := func(time metav1.Time, observedGeneration int64, message string) configv1alpha1.Condition { + return configv1alpha1.Condition{ + Type: "ClientSecretExists", + Status: "False", + LastTransitionTime: time, + Reason: "NoClientSecretFound", + Message: message, + ObservedGeneration: observedGeneration, + } + } + + happyAllowedScopesCondition := func(time metav1.Time, observedGeneration int64) configv1alpha1.Condition { + return configv1alpha1.Condition{ + Type: "AllowedScopesValid", + Status: "True", + LastTransitionTime: time, + Reason: "Success", + Message: `"allowedScopes" is valid`, + ObservedGeneration: observedGeneration, + } + } + + sadAllowedScopesCondition := func(time metav1.Time, observedGeneration int64, message string) configv1alpha1.Condition { + return configv1alpha1.Condition{ + Type: "AllowedScopesValid", + Status: "False", + LastTransitionTime: time, + Reason: "MissingRequiredValue", + Message: message, + ObservedGeneration: observedGeneration, + } + } + + secretNameForUID := func(uid string) string { + // See GetName() in OIDCClientSecretStorage for how the production code determines the Secret name. + // This test helper is intended to choose the same name. + return "pinniped-storage-oidc-client-secret-" + + strings.ToLower(base32.StdEncoding.WithPadding(base32.NoPadding).EncodeToString([]byte(uid))) + } + + secretStringDataWithZeroClientSecrets := map[string][]byte{ + "pinniped-storage-data": []byte(`{"version":"1","hashes":[]}`), + "pinniped-storage-version": []byte("1"), + } + + secretStringDataWithOneClientSecret := map[string][]byte{ + "pinniped-storage-data": []byte(`{"version":"1","hashes":["` + testBcryptSecret1 + `"]}`), + "pinniped-storage-version": []byte("1"), + } + + secretStringDataWithTwoClientSecrets := map[string][]byte{ + "pinniped-storage-data": []byte(`{"version":"1","hashes":["` + testBcryptSecret1 + `","` + testBcryptSecret2 + `"]}`), + "pinniped-storage-version": []byte("1"), + } + + secretStringDataWithWrongVersion := map[string][]byte{ + "pinniped-storage-data": []byte(`{"version":"wrong-version","hashes":[]}`), + "pinniped-storage-version": []byte("1"), + } + + storageSecretForUIDWithData := func(uid string, data map[string][]byte) *corev1.Secret { + return &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: testNamespace, + Name: secretNameForUID(uid), + Labels: map[string]string{"storage.pinniped.dev/type": "oidc-client-secret"}, + }, + Type: "storage.pinniped.dev/oidc-client-secret", + Data: data, + } + } + + tests := []struct { + name string + inputObjects []runtime.Object + inputSecrets []runtime.Object + wantErr string + wantResultingOIDCClients []configv1alpha1.OIDCClient + wantAPIActions int + }{ + { + name: "no OIDCClients", + wantAPIActions: 0, // no updates + }, + { + name: "successfully validate minimal OIDCClient and one client secret stored", + inputObjects: []runtime.Object{&configv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Spec: configv1alpha1.OIDCClientSpec{ + AllowedGrantTypes: []configv1alpha1.GrantType{"authorization_code"}, + AllowedScopes: []configv1alpha1.Scope{"openid"}, + }, + }}, + inputSecrets: []runtime.Object{storageSecretForUIDWithData(testUID, secretStringDataWithOneClientSecret)}, + wantAPIActions: 1, // one update + wantResultingOIDCClients: []configv1alpha1.OIDCClient{{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Status: configv1alpha1.OIDCClientStatus{ + Phase: "Ready", + Conditions: []configv1alpha1.Condition{ + happyAllowedGrantTypesCondition(now, 1234), + happyAllowedScopesCondition(now, 1234), + happyClientSecretsCondition(1, now, 1234), + }, + }, + }}, + }, + { + name: "successfully validate minimal OIDCClient and two client secrets stored", + inputObjects: []runtime.Object{&configv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Spec: configv1alpha1.OIDCClientSpec{ + AllowedGrantTypes: []configv1alpha1.GrantType{"authorization_code"}, + AllowedScopes: []configv1alpha1.Scope{"openid"}, + }, + }}, + inputSecrets: []runtime.Object{storageSecretForUIDWithData(testUID, secretStringDataWithTwoClientSecrets)}, + wantAPIActions: 1, // one update + wantResultingOIDCClients: []configv1alpha1.OIDCClient{{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Status: configv1alpha1.OIDCClientStatus{ + Phase: "Ready", + Conditions: []configv1alpha1.Condition{ + happyAllowedGrantTypesCondition(now, 1234), + happyAllowedScopesCondition(now, 1234), + happyClientSecretsCondition(2, now, 1234), + }, + }, + }}, + }, + { + name: "an already validated OIDCClient does not have its conditions updated when everything is still valid", + inputObjects: []runtime.Object{&configv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Spec: configv1alpha1.OIDCClientSpec{ + AllowedGrantTypes: []configv1alpha1.GrantType{"authorization_code"}, + AllowedScopes: []configv1alpha1.Scope{"openid"}, + }, + Status: configv1alpha1.OIDCClientStatus{ + Phase: "Ready", + Conditions: []configv1alpha1.Condition{ + happyAllowedGrantTypesCondition(earlier, 1234), + happyAllowedScopesCondition(earlier, 1234), + happyClientSecretsCondition(1, earlier, 1234), + }, + }, + }}, + inputSecrets: []runtime.Object{storageSecretForUIDWithData(testUID, secretStringDataWithOneClientSecret)}, + wantAPIActions: 0, // no updates + wantResultingOIDCClients: []configv1alpha1.OIDCClient{{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Status: configv1alpha1.OIDCClientStatus{ + Phase: "Ready", + Conditions: []configv1alpha1.Condition{ + happyAllowedGrantTypesCondition(earlier, 1234), + happyAllowedScopesCondition(earlier, 1234), + happyClientSecretsCondition(1, earlier, 1234), + }, + }, + }}, + }, + { + name: "missing required minimum settings and missing client secret storage", + inputObjects: []runtime.Object{&configv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Spec: configv1alpha1.OIDCClientSpec{}, + }}, + wantAPIActions: 1, // one update + wantResultingOIDCClients: []configv1alpha1.OIDCClient{{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Status: configv1alpha1.OIDCClientStatus{ + Phase: "Error", + Conditions: []configv1alpha1.Condition{ + sadAllowedGrantTypesCondition(now, 1234, `"authorization_code" must always be included in "allowedGrantTypes"`), + sadAllowedScopesCondition(now, 1234, `"openid" must always be included in "allowedScopes"`), + sadClientSecretsCondition(now, 1234, "no client secret found (no Secret storage found)"), + }, + }, + }}, + }, + { + name: "client secret storage exists but cannot be read", + inputObjects: []runtime.Object{&configv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Spec: configv1alpha1.OIDCClientSpec{ + AllowedGrantTypes: []configv1alpha1.GrantType{"authorization_code"}, + AllowedScopes: []configv1alpha1.Scope{"openid"}, + }, + }}, + inputSecrets: []runtime.Object{storageSecretForUIDWithData(testUID, secretStringDataWithWrongVersion)}, + wantAPIActions: 1, // one update + wantResultingOIDCClients: []configv1alpha1.OIDCClient{{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Status: configv1alpha1.OIDCClientStatus{ + Phase: "Error", + Conditions: []configv1alpha1.Condition{ + happyAllowedGrantTypesCondition(now, 1234), + happyAllowedScopesCondition(now, 1234), + sadClientSecretsCondition(now, 1234, "error reading client secret storage: OIDC client secret storage data has wrong version: OIDC client secret storage has version wrong-version instead of 1"), + }, + }, + }}, + }, + { + name: "client secret storage exists but does not contain any client secrets", + inputObjects: []runtime.Object{&configv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Spec: configv1alpha1.OIDCClientSpec{ + AllowedGrantTypes: []configv1alpha1.GrantType{"authorization_code"}, + AllowedScopes: []configv1alpha1.Scope{"openid"}, + }, + }}, + inputSecrets: []runtime.Object{storageSecretForUIDWithData(testUID, secretStringDataWithZeroClientSecrets)}, + wantAPIActions: 1, // one update + wantResultingOIDCClients: []configv1alpha1.OIDCClient{{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Status: configv1alpha1.OIDCClientStatus{ + Phase: "Error", + Conditions: []configv1alpha1.Condition{ + happyAllowedGrantTypesCondition(now, 1234), + happyAllowedScopesCondition(now, 1234), + sadClientSecretsCondition(now, 1234, "no client secret found (empty list in storage)"), + }, + }, + }}, + }, + { + name: "can operate on multiple at a time, e.g. one is valid one another is missing required minimum settings", + inputObjects: []runtime.Object{ + &configv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: "test1", Generation: 1234, UID: "uid1"}, + Spec: configv1alpha1.OIDCClientSpec{ + AllowedGrantTypes: []configv1alpha1.GrantType{"authorization_code"}, + AllowedScopes: []configv1alpha1.Scope{"openid"}, + }, + }, + &configv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: "test2", Generation: 4567, UID: "uid2"}, + Spec: configv1alpha1.OIDCClientSpec{}, + }, + }, + inputSecrets: []runtime.Object{storageSecretForUIDWithData("uid1", secretStringDataWithOneClientSecret)}, + wantAPIActions: 2, // one update for each OIDCClient + wantResultingOIDCClients: []configv1alpha1.OIDCClient{ + { + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: "test1", Generation: 1234, UID: "uid1"}, + Status: configv1alpha1.OIDCClientStatus{ + Phase: "Ready", + Conditions: []configv1alpha1.Condition{ + happyAllowedGrantTypesCondition(now, 1234), + happyAllowedScopesCondition(now, 1234), + happyClientSecretsCondition(1, now, 1234), + }, + }, + }, + { + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: "test2", Generation: 4567, UID: "uid2"}, + Status: configv1alpha1.OIDCClientStatus{ + Phase: "Error", + Conditions: []configv1alpha1.Condition{ + sadAllowedGrantTypesCondition(now, 4567, `"authorization_code" must always be included in "allowedGrantTypes"`), + sadAllowedScopesCondition(now, 4567, `"openid" must always be included in "allowedScopes"`), + sadClientSecretsCondition(now, 4567, "no client secret found (no Secret storage found)"), + }, + }, + }, + }, + }, + { + name: "a previously invalid OIDCClient has its spec changed to become valid so the conditions are updated", + inputObjects: []runtime.Object{&configv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 4567, UID: testUID}, + Spec: configv1alpha1.OIDCClientSpec{ + AllowedGrantTypes: []configv1alpha1.GrantType{"authorization_code"}, + AllowedScopes: []configv1alpha1.Scope{"openid"}, + }, + // was invalid on previous run of controller which observed an old generation at an earlier time + Status: configv1alpha1.OIDCClientStatus{ + Phase: "Error", + Conditions: []configv1alpha1.Condition{ + sadAllowedGrantTypesCondition(earlier, 1234, `"authorization_code" must always be included in "allowedGrantTypes"`), + sadAllowedScopesCondition(earlier, 1234, `"openid" must always be included in "allowedScopes"`), + happyClientSecretsCondition(1, earlier, 1234), + }, + }, + }}, + inputSecrets: []runtime.Object{storageSecretForUIDWithData(testUID, secretStringDataWithOneClientSecret)}, + wantAPIActions: 1, // one update + wantResultingOIDCClients: []configv1alpha1.OIDCClient{{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 4567, UID: testUID}, + // status was updated to reflect the current generation at the current time + Status: configv1alpha1.OIDCClientStatus{ + Phase: "Ready", + Conditions: []configv1alpha1.Condition{ + happyAllowedGrantTypesCondition(now, 4567), + happyAllowedScopesCondition(now, 4567), + happyClientSecretsCondition(1, earlier, 4567), // was already validated earlier + }, + }, + }}, + }, + { + name: "refresh_token must be included in allowedGrantTypes when offline_access is included in allowedScopes", + inputObjects: []runtime.Object{&configv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Spec: configv1alpha1.OIDCClientSpec{ + AllowedGrantTypes: []configv1alpha1.GrantType{"authorization_code"}, + AllowedScopes: []configv1alpha1.Scope{"openid", "offline_access"}, + }, + }}, + wantAPIActions: 1, // one update + inputSecrets: []runtime.Object{storageSecretForUIDWithData(testUID, secretStringDataWithOneClientSecret)}, + wantResultingOIDCClients: []configv1alpha1.OIDCClient{{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Status: configv1alpha1.OIDCClientStatus{ + Phase: "Error", + Conditions: []configv1alpha1.Condition{ + sadAllowedGrantTypesCondition(now, 1234, `"refresh_token" must be included in "allowedGrantTypes" when "offline_access" is included in "allowedScopes"`), + happyAllowedScopesCondition(now, 1234), + happyClientSecretsCondition(1, now, 1234), + }, + }, + }}, + }, + { + name: "urn:ietf:params:oauth:grant-type:token-exchange must be included in allowedGrantTypes when pinniped:request-audience is included in allowedScopes", + inputObjects: []runtime.Object{&configv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Spec: configv1alpha1.OIDCClientSpec{ + AllowedGrantTypes: []configv1alpha1.GrantType{"authorization_code"}, + AllowedScopes: []configv1alpha1.Scope{"openid", "pinniped:request-audience", "username", "groups"}, + }, + }}, + inputSecrets: []runtime.Object{storageSecretForUIDWithData(testUID, secretStringDataWithOneClientSecret)}, + wantAPIActions: 1, // one update + wantResultingOIDCClients: []configv1alpha1.OIDCClient{{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Status: configv1alpha1.OIDCClientStatus{ + Phase: "Error", + Conditions: []configv1alpha1.Condition{ + sadAllowedGrantTypesCondition(now, 1234, `"urn:ietf:params:oauth:grant-type:token-exchange" must be included in "allowedGrantTypes" when "pinniped:request-audience" is included in "allowedScopes"`), + happyAllowedScopesCondition(now, 1234), + happyClientSecretsCondition(1, now, 1234), + }, + }, + }}, + }, + { + name: "offline_access must be included in allowedScopes when refresh_token is included in allowedGrantTypes", + inputObjects: []runtime.Object{&configv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Spec: configv1alpha1.OIDCClientSpec{ + AllowedGrantTypes: []configv1alpha1.GrantType{"authorization_code", "refresh_token"}, + AllowedScopes: []configv1alpha1.Scope{"openid"}, + }, + }}, + inputSecrets: []runtime.Object{storageSecretForUIDWithData(testUID, secretStringDataWithOneClientSecret)}, + wantAPIActions: 1, // one update + wantResultingOIDCClients: []configv1alpha1.OIDCClient{{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Status: configv1alpha1.OIDCClientStatus{ + Phase: "Error", + Conditions: []configv1alpha1.Condition{ + happyAllowedGrantTypesCondition(now, 1234), + sadAllowedScopesCondition(now, 1234, `"offline_access" must be included in "allowedScopes" when "refresh_token" is included in "allowedGrantTypes"`), + happyClientSecretsCondition(1, now, 1234), + }, + }, + }}, + }, + { + name: "username and groups must also be included in allowedScopes when pinniped:request-audience is included in allowedScopes: both missing", + inputObjects: []runtime.Object{&configv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Spec: configv1alpha1.OIDCClientSpec{ + AllowedGrantTypes: []configv1alpha1.GrantType{"authorization_code", "urn:ietf:params:oauth:grant-type:token-exchange"}, + AllowedScopes: []configv1alpha1.Scope{"openid", "pinniped:request-audience"}, + }, + }}, + inputSecrets: []runtime.Object{storageSecretForUIDWithData(testUID, secretStringDataWithOneClientSecret)}, + wantAPIActions: 1, // one update + wantResultingOIDCClients: []configv1alpha1.OIDCClient{{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Status: configv1alpha1.OIDCClientStatus{ + Phase: "Error", + Conditions: []configv1alpha1.Condition{ + happyAllowedGrantTypesCondition(now, 1234), + sadAllowedScopesCondition(now, 1234, `"username" and "groups" must be included in "allowedScopes" when "pinniped:request-audience" is included in "allowedScopes"`), + happyClientSecretsCondition(1, now, 1234), + }, + }, + }}, + }, + { + name: "username and groups must also be included in allowedScopes when pinniped:request-audience is included in allowedScopes: username missing", + inputObjects: []runtime.Object{&configv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Spec: configv1alpha1.OIDCClientSpec{ + AllowedGrantTypes: []configv1alpha1.GrantType{"authorization_code", "urn:ietf:params:oauth:grant-type:token-exchange"}, + AllowedScopes: []configv1alpha1.Scope{"openid", "pinniped:request-audience", "groups"}, + }, + }}, + inputSecrets: []runtime.Object{storageSecretForUIDWithData(testUID, secretStringDataWithOneClientSecret)}, + wantAPIActions: 1, // one update + wantResultingOIDCClients: []configv1alpha1.OIDCClient{{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Status: configv1alpha1.OIDCClientStatus{ + Phase: "Error", + Conditions: []configv1alpha1.Condition{ + happyAllowedGrantTypesCondition(now, 1234), + sadAllowedScopesCondition(now, 1234, `"username" and "groups" must be included in "allowedScopes" when "pinniped:request-audience" is included in "allowedScopes"`), + happyClientSecretsCondition(1, now, 1234), + }, + }, + }}, + }, + { + name: "username and groups must also be included in allowedScopes when pinniped:request-audience is included in allowedScopes: groups missing", + inputObjects: []runtime.Object{&configv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Spec: configv1alpha1.OIDCClientSpec{ + AllowedGrantTypes: []configv1alpha1.GrantType{"authorization_code", "urn:ietf:params:oauth:grant-type:token-exchange"}, + AllowedScopes: []configv1alpha1.Scope{"openid", "pinniped:request-audience", "username"}, + }, + }}, + inputSecrets: []runtime.Object{storageSecretForUIDWithData(testUID, secretStringDataWithOneClientSecret)}, + wantAPIActions: 1, // one update + wantResultingOIDCClients: []configv1alpha1.OIDCClient{{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Status: configv1alpha1.OIDCClientStatus{ + Phase: "Error", + Conditions: []configv1alpha1.Condition{ + happyAllowedGrantTypesCondition(now, 1234), + sadAllowedScopesCondition(now, 1234, `"username" and "groups" must be included in "allowedScopes" when "pinniped:request-audience" is included in "allowedScopes"`), + happyClientSecretsCondition(1, now, 1234), + }, + }, + }}, + }, + { + name: "pinniped:request-audience must be included in allowedScopes when urn:ietf:params:oauth:grant-type:token-exchange is included in allowedGrantTypes", + inputObjects: []runtime.Object{&configv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Spec: configv1alpha1.OIDCClientSpec{ + AllowedGrantTypes: []configv1alpha1.GrantType{"authorization_code", "urn:ietf:params:oauth:grant-type:token-exchange"}, + AllowedScopes: []configv1alpha1.Scope{"openid"}, + }, + }}, + inputSecrets: []runtime.Object{storageSecretForUIDWithData(testUID, secretStringDataWithOneClientSecret)}, + wantAPIActions: 1, // one update + wantResultingOIDCClients: []configv1alpha1.OIDCClient{{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Status: configv1alpha1.OIDCClientStatus{ + Phase: "Error", + Conditions: []configv1alpha1.Condition{ + happyAllowedGrantTypesCondition(now, 1234), + sadAllowedScopesCondition(now, 1234, `"pinniped:request-audience" must be included in "allowedScopes" when "urn:ietf:params:oauth:grant-type:token-exchange" is included in "allowedGrantTypes"`), + happyClientSecretsCondition(1, now, 1234), + }, + }, + }}, + }, + { + name: "successfully validate an OIDCClient with all allowedGrantTypes and all allowedScopes", + inputObjects: []runtime.Object{&configv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Spec: configv1alpha1.OIDCClientSpec{ + AllowedGrantTypes: []configv1alpha1.GrantType{"authorization_code", "urn:ietf:params:oauth:grant-type:token-exchange", "refresh_token"}, + AllowedScopes: []configv1alpha1.Scope{"openid", "offline_access", "pinniped:request-audience", "username", "groups"}, + }, + }}, + inputSecrets: []runtime.Object{storageSecretForUIDWithData(testUID, secretStringDataWithOneClientSecret)}, + wantAPIActions: 1, // one update + wantResultingOIDCClients: []configv1alpha1.OIDCClient{{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Status: configv1alpha1.OIDCClientStatus{ + Phase: "Ready", + Conditions: []configv1alpha1.Condition{ + happyAllowedGrantTypesCondition(now, 1234), + happyAllowedScopesCondition(now, 1234), + happyClientSecretsCondition(1, now, 1234), + }, + }, + }}, + }, + { + name: "successfully validate an OIDCClient for offline access without kube API access without username/groups", + inputObjects: []runtime.Object{&configv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Spec: configv1alpha1.OIDCClientSpec{ + AllowedGrantTypes: []configv1alpha1.GrantType{"authorization_code", "refresh_token"}, + AllowedScopes: []configv1alpha1.Scope{"openid", "offline_access"}, + }, + }}, + inputSecrets: []runtime.Object{storageSecretForUIDWithData(testUID, secretStringDataWithOneClientSecret)}, + wantAPIActions: 1, // one update + wantResultingOIDCClients: []configv1alpha1.OIDCClient{{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Status: configv1alpha1.OIDCClientStatus{ + Phase: "Ready", + Conditions: []configv1alpha1.Condition{ + happyAllowedGrantTypesCondition(now, 1234), + happyAllowedScopesCondition(now, 1234), + happyClientSecretsCondition(1, now, 1234), + }, + }, + }}, + }, + { + name: "successfully validate an OIDCClient for offline access without kube API access with username", + inputObjects: []runtime.Object{&configv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Spec: configv1alpha1.OIDCClientSpec{ + AllowedGrantTypes: []configv1alpha1.GrantType{"authorization_code", "refresh_token"}, + AllowedScopes: []configv1alpha1.Scope{"openid", "offline_access", "username"}, + }, + }}, + inputSecrets: []runtime.Object{storageSecretForUIDWithData(testUID, secretStringDataWithOneClientSecret)}, + wantAPIActions: 1, // one update + wantResultingOIDCClients: []configv1alpha1.OIDCClient{{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Status: configv1alpha1.OIDCClientStatus{ + Phase: "Ready", + Conditions: []configv1alpha1.Condition{ + happyAllowedGrantTypesCondition(now, 1234), + happyAllowedScopesCondition(now, 1234), + happyClientSecretsCondition(1, now, 1234), + }, + }, + }}, + }, + { + name: "successfully validate an OIDCClient for offline access without kube API access with groups", + inputObjects: []runtime.Object{&configv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Spec: configv1alpha1.OIDCClientSpec{ + AllowedGrantTypes: []configv1alpha1.GrantType{"authorization_code", "refresh_token"}, + AllowedScopes: []configv1alpha1.Scope{"openid", "offline_access", "groups"}, + }, + }}, + inputSecrets: []runtime.Object{storageSecretForUIDWithData(testUID, secretStringDataWithOneClientSecret)}, + wantAPIActions: 1, // one update + wantResultingOIDCClients: []configv1alpha1.OIDCClient{{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Status: configv1alpha1.OIDCClientStatus{ + Phase: "Ready", + Conditions: []configv1alpha1.Condition{ + happyAllowedGrantTypesCondition(now, 1234), + happyAllowedScopesCondition(now, 1234), + happyClientSecretsCondition(1, now, 1234), + }, + }, + }}, + }, + { + name: "successfully validate an OIDCClient for offline access without kube API access with both username and groups", + inputObjects: []runtime.Object{&configv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Spec: configv1alpha1.OIDCClientSpec{ + AllowedGrantTypes: []configv1alpha1.GrantType{"authorization_code", "refresh_token"}, + AllowedScopes: []configv1alpha1.Scope{"openid", "offline_access", "username", "groups"}, + }, + }}, + inputSecrets: []runtime.Object{storageSecretForUIDWithData(testUID, secretStringDataWithOneClientSecret)}, + wantAPIActions: 1, // one update + wantResultingOIDCClients: []configv1alpha1.OIDCClient{{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Status: configv1alpha1.OIDCClientStatus{ + Phase: "Ready", + Conditions: []configv1alpha1.Condition{ + happyAllowedGrantTypesCondition(now, 1234), + happyAllowedScopesCondition(now, 1234), + happyClientSecretsCondition(1, now, 1234), + }, + }, + }}, + }, + { + name: "successfully validate an OIDCClient without offline access without kube API access with username", + inputObjects: []runtime.Object{&configv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Spec: configv1alpha1.OIDCClientSpec{ + AllowedGrantTypes: []configv1alpha1.GrantType{"authorization_code"}, + AllowedScopes: []configv1alpha1.Scope{"openid", "username"}, + }, + }}, + inputSecrets: []runtime.Object{storageSecretForUIDWithData(testUID, secretStringDataWithOneClientSecret)}, + wantAPIActions: 1, // one update + wantResultingOIDCClients: []configv1alpha1.OIDCClient{{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Status: configv1alpha1.OIDCClientStatus{ + Phase: "Ready", + Conditions: []configv1alpha1.Condition{ + happyAllowedGrantTypesCondition(now, 1234), + happyAllowedScopesCondition(now, 1234), + happyClientSecretsCondition(1, now, 1234), + }, + }, + }}, + }, + { + name: "successfully validate an OIDCClient without offline access without kube API access with groups", + inputObjects: []runtime.Object{&configv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Spec: configv1alpha1.OIDCClientSpec{ + AllowedGrantTypes: []configv1alpha1.GrantType{"authorization_code"}, + AllowedScopes: []configv1alpha1.Scope{"openid", "username"}, + }, + }}, + inputSecrets: []runtime.Object{storageSecretForUIDWithData(testUID, secretStringDataWithOneClientSecret)}, + wantAPIActions: 1, // one update + wantResultingOIDCClients: []configv1alpha1.OIDCClient{{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Status: configv1alpha1.OIDCClientStatus{ + Phase: "Ready", + Conditions: []configv1alpha1.Condition{ + happyAllowedGrantTypesCondition(now, 1234), + happyAllowedScopesCondition(now, 1234), + happyClientSecretsCondition(1, now, 1234), + }, + }, + }}, + }, + { + name: "successfully validate an OIDCClient without offline access without kube API access with both username and groups", + inputObjects: []runtime.Object{&configv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Spec: configv1alpha1.OIDCClientSpec{ + AllowedGrantTypes: []configv1alpha1.GrantType{"authorization_code"}, + AllowedScopes: []configv1alpha1.Scope{"openid", "username", "groups"}, + }, + }}, + inputSecrets: []runtime.Object{storageSecretForUIDWithData(testUID, secretStringDataWithOneClientSecret)}, + wantAPIActions: 1, // one update + wantResultingOIDCClients: []configv1alpha1.OIDCClient{{ + ObjectMeta: metav1.ObjectMeta{Namespace: testNamespace, Name: testName, Generation: 1234, UID: testUID}, + Status: configv1alpha1.OIDCClientStatus{ + Phase: "Ready", + Conditions: []configv1alpha1.Condition{ + happyAllowedGrantTypesCondition(now, 1234), + happyAllowedScopesCondition(now, 1234), + happyClientSecretsCondition(1, now, 1234), + }, + }, + }}, + }, + } + + for _, tt := range tests { + tt := tt + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + fakePinnipedClient := pinnipedfake.NewSimpleClientset(tt.inputObjects...) + fakePinnipedClientForInformers := pinnipedfake.NewSimpleClientset(tt.inputObjects...) + pinnipedInformers := pinnipedinformers.NewSharedInformerFactory(fakePinnipedClientForInformers, 0) + fakeKubeClient := kubernetesfake.NewSimpleClientset(tt.inputSecrets...) + kubeInformers := kubeinformers.NewSharedInformerFactoryWithOptions(fakeKubeClient, 0) + + controller := NewOIDCClientWatcherController( + fakePinnipedClient, + kubeInformers.Core().V1().Secrets(), + pinnipedInformers.Config().V1alpha1().OIDCClients(), + controllerlib.WithInformer, + ) + + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + pinnipedInformers.Start(ctx.Done()) + kubeInformers.Start(ctx.Done()) + controllerlib.TestRunSynchronously(t, controller) + + syncCtx := controllerlib.Context{Context: ctx, Key: controllerlib.Key{}} + + if err := controllerlib.TestSync(t, controller, syncCtx); tt.wantErr != "" { + require.EqualError(t, err, tt.wantErr) + } else { + require.NoError(t, err) + } + + require.Len(t, fakePinnipedClient.Actions(), tt.wantAPIActions) + + actualOIDCClients, err := fakePinnipedClient.ConfigV1alpha1().OIDCClients(testNamespace).List(ctx, metav1.ListOptions{}) + require.NoError(t, err) + + // Assert on the expected Status of the OIDCClients. Preprocess them a bit so that they're easier to assert against. + require.ElementsMatch(t, tt.wantResultingOIDCClients, normalizeOIDCClients(actualOIDCClients.Items, now)) + }) + } +} + +func normalizeOIDCClients(oidcClients []configv1alpha1.OIDCClient, now metav1.Time) []configv1alpha1.OIDCClient { + result := make([]configv1alpha1.OIDCClient, 0, len(oidcClients)) + for _, u := range oidcClients { + normalized := u.DeepCopy() + + // We're only interested in comparing the status, so zero out the spec. + normalized.Spec = configv1alpha1.OIDCClientSpec{} + + // Round down the LastTransitionTime values to `now` if they were just updated. This makes + // it much easier to encode assertions about the expected timestamps. + for i := range normalized.Status.Conditions { + if time.Since(normalized.Status.Conditions[i].LastTransitionTime.Time) < 5*time.Second { + normalized.Status.Conditions[i].LastTransitionTime = now + } + } + result = append(result, *normalized) + } + + return result +} diff --git a/internal/controller/supervisorconfig/oidcupstreamwatcher/oidc_upstream_watcher.go b/internal/controller/supervisorconfig/oidcupstreamwatcher/oidc_upstream_watcher.go index 2faff38c..599d7400 100644 --- a/internal/controller/supervisorconfig/oidcupstreamwatcher/oidc_upstream_watcher.go +++ b/internal/controller/supervisorconfig/oidcupstreamwatcher/oidc_upstream_watcher.go @@ -410,7 +410,7 @@ func (c *oidcWatcherController) updateStatus(ctx context.Context, upstream *v1al log := c.log.WithValues("namespace", upstream.Namespace, "name", upstream.Name) updated := upstream.DeepCopy() - hadErrorCondition := conditionsutil.Merge(conditions, upstream.Generation, &updated.Status.Conditions, log) + hadErrorCondition := conditionsutil.MergeIDPConditions(conditions, upstream.Generation, &updated.Status.Conditions, log) updated.Status.Phase = v1alpha1.PhaseReady if hadErrorCondition { diff --git a/internal/crud/crud.go b/internal/crud/crud.go index 57e73b2a..29ad6b65 100644 --- a/internal/crud/crud.go +++ b/internal/crud/crud.go @@ -1,4 +1,4 @@ -// Copyright 2020-2021 the Pinniped contributors. All Rights Reserved. +// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package crud @@ -45,6 +45,7 @@ type Storage interface { Update(ctx context.Context, signature, resourceVersion string, data JSON) (newResourceVersion string, err error) Delete(ctx context.Context, signature string) error DeleteByLabel(ctx context.Context, labelName string, labelValue string) error + GetName(signature string) string } type JSON interface{} // document that we need valid JSON types @@ -80,7 +81,7 @@ func (s *secretsStorage) Create(ctx context.Context, signature string, data JSON } func (s *secretsStorage) Get(ctx context.Context, signature string, data JSON) (string, error) { - secret, err := s.secrets.Get(ctx, s.getName(signature), metav1.GetOptions{}) + secret, err := s.secrets.Get(ctx, s.GetName(signature), metav1.GetOptions{}) if err != nil { return "", fmt.Errorf("failed to get %s for signature %s: %w", s.resource, signature, err) } @@ -109,7 +110,7 @@ func (s *secretsStorage) Update(ctx context.Context, signature, resourceVersion } func (s *secretsStorage) Delete(ctx context.Context, signature string) error { - if err := s.secrets.Delete(ctx, s.getName(signature), metav1.DeleteOptions{}); err != nil { + if err := s.secrets.Delete(ctx, s.GetName(signature), metav1.DeleteOptions{}); err != nil { return fmt.Errorf("failed to delete %s for signature %s: %w", s.resource, signature, err) } return nil @@ -171,7 +172,7 @@ func validateSecret(resource string, secret *corev1.Secret) error { //nolint: gochecknoglobals var b32 = base32.StdEncoding.WithPadding(base32.NoPadding) -func (s *secretsStorage) getName(signature string) string { +func (s *secretsStorage) GetName(signature string) string { // try to decode base64 signatures to prevent double encoding of binary data signatureBytes := maybeBase64Decode(signature) // lower case base32 encoding insures that our secret name is valid per ValidateSecretName in k/k @@ -182,7 +183,7 @@ func (s *secretsStorage) getName(signature string) string { func (s *secretsStorage) toSecret(signature, resourceVersion string, data JSON, additionalLabels map[string]string) (*corev1.Secret, error) { buf, err := json.Marshal(data) if err != nil { - return nil, fmt.Errorf("failed to encode secret data for %s: %w", s.getName(signature), err) + return nil, fmt.Errorf("failed to encode secret data for %s: %w", s.GetName(signature), err) } labelsToAdd := map[string]string{ @@ -194,7 +195,7 @@ func (s *secretsStorage) toSecret(signature, resourceVersion string, data JSON, return &corev1.Secret{ ObjectMeta: metav1.ObjectMeta{ - Name: s.getName(signature), + Name: s.GetName(signature), ResourceVersion: resourceVersion, Labels: labelsToAdd, Annotations: map[string]string{ diff --git a/internal/oidcclientsecretstorage/oidcclientsecretstorage.go b/internal/oidcclientsecretstorage/oidcclientsecretstorage.go new file mode 100644 index 00000000..257e674c --- /dev/null +++ b/internal/oidcclientsecretstorage/oidcclientsecretstorage.go @@ -0,0 +1,67 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package oidcclientsecretstorage + +import ( + "encoding/base64" + "fmt" + "time" + + v1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/types" + corev1client "k8s.io/client-go/kubernetes/typed/core/v1" + + "go.pinniped.dev/internal/constable" + "go.pinniped.dev/internal/crud" +) + +const ( + TypeLabelValue = "oidc-client-secret" + + ErrOIDCClientSecretStorageVersion = constable.Error("OIDC client secret storage data has wrong version") + + oidcClientSecretStorageVersion = "1" +) + +type OIDCClientSecretStorage struct { + storage crud.Storage +} + +// StoredClientSecret defines the format of the content of a client's secrets when stored in a Secret +// as a JSON string value. +type StoredClientSecret struct { + // List of bcrypt hashes. + SecretHashes []string `json:"hashes"` + // The format version. Take care when updating. We cannot simply bump the storage version and drop/ignore old data. + // Updating this would require some form of migration of existing stored data. + Version string `json:"version"` +} + +func New(secrets corev1client.SecretInterface, clock func() time.Time) *OIDCClientSecretStorage { + // TODO make lifetime = 0 mean that it does not get annotated with any garbage collection annotation + return &OIDCClientSecretStorage{storage: crud.New(TypeLabelValue, secrets, clock, 0)} +} + +// TODO expose other methods as needed for get, create, update, etc. + +// GetName returns the name of the Secret which would be used to store data for the given signature. +func (s *OIDCClientSecretStorage) GetName(oidcClientUID types.UID) string { + // Avoid having s.storage.GetName() base64 decode something that wasn't ever encoded by encoding it here. + b64encodedUID := base64.RawURLEncoding.EncodeToString([]byte(oidcClientUID)) + return s.storage.GetName(b64encodedUID) +} + +// ReadFromSecret reads the contents of a Secret as a StoredClientSecret. +func ReadFromSecret(secret *v1.Secret) (*StoredClientSecret, error) { + storedClientSecret := &StoredClientSecret{} + err := crud.FromSecret(TypeLabelValue, secret, storedClientSecret) + if err != nil { + return nil, err + } + if storedClientSecret.Version != oidcClientSecretStorageVersion { + return nil, fmt.Errorf("%w: OIDC client secret storage has version %s instead of %s", + ErrOIDCClientSecretStorageVersion, storedClientSecret.Version, oidcClientSecretStorageVersion) + } + return storedClientSecret, nil +} diff --git a/internal/oidcclientsecretstorage/oidcclientsecretstorage_test.go b/internal/oidcclientsecretstorage/oidcclientsecretstorage_test.go new file mode 100644 index 00000000..ac81565a --- /dev/null +++ b/internal/oidcclientsecretstorage/oidcclientsecretstorage_test.go @@ -0,0 +1,125 @@ +// Copyright 2022 the Pinniped contributors. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package oidcclientsecretstorage + +import ( + "testing" + + "github.com/stretchr/testify/require" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +func TestGetName(t *testing.T) { + // Note that GetName() should not depend on the constructor params, to make it easier to use in various contexts. + subject := New(nil, nil) + + require.Equal(t, + "pinniped-storage-oidc-client-secret-onxw2zjnmv4gc3lqnrss25ljmqyq", + subject.GetName("some-example-uid1")) + + require.Equal(t, + "pinniped-storage-oidc-client-secret-onxw2zjnmv4gc3lqnrss25ljmqza", + subject.GetName("some-example-uid2")) +} + +func TestReadFromSecret(t *testing.T) { + tests := []struct { + name string + secret *corev1.Secret + wantStored *StoredClientSecret + wantErr string + }{ + { + name: "happy path", + secret: &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Name: "pinniped-storage-oidc-client-secret-pwu5zs7lekbhnln2w4", + ResourceVersion: "", + Labels: map[string]string{ + "storage.pinniped.dev/type": "oidc-client-secret", + }, + }, + Data: map[string][]byte{ + "pinniped-storage-data": []byte(`{"hashes":["first-hash","second-hash"],"version":"1"}`), + "pinniped-storage-version": []byte("1"), + }, + Type: "storage.pinniped.dev/oidc-client-secret", + }, + wantStored: &StoredClientSecret{ + Version: "1", + SecretHashes: []string{"first-hash", "second-hash"}, + }, + }, + { + name: "wrong secret type", + secret: &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Name: "pinniped-storage-oidc-client-secret-pwu5zs7lekbhnln2w4", + ResourceVersion: "", + Labels: map[string]string{ + "storage.pinniped.dev/type": "oidc-client-secret", + }, + }, + Data: map[string][]byte{ + "pinniped-storage-data": []byte(`{"hashes":["first-hash","second-hash"],"version":"1"}`), + "pinniped-storage-version": []byte("1"), + }, + Type: "storage.pinniped.dev/not-oidc-client-secret", + }, + wantErr: "secret storage data has incorrect type: storage.pinniped.dev/not-oidc-client-secret must equal storage.pinniped.dev/oidc-client-secret", + }, + { + name: "wrong stored StoredClientSecret version", + secret: &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Name: "pinniped-storage-oidc-client-secret-pwu5zs7lekbhnln2w4", + ResourceVersion: "", + Labels: map[string]string{ + "storage.pinniped.dev/type": "oidc-client-secret", + }, + }, + Data: map[string][]byte{ + "pinniped-storage-data": []byte(`{"hashes":["first-hash","second-hash"],"version":"wrong-version-here"}`), + "pinniped-storage-version": []byte("1"), + }, + Type: "storage.pinniped.dev/oidc-client-secret", + }, + wantErr: "OIDC client secret storage data has wrong version: OIDC client secret storage has version wrong-version-here instead of 1", + }, + { + name: "wrong storage version", + secret: &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Name: "pinniped-storage-oidc-client-secret-pwu5zs7lekbhnln2w4", + ResourceVersion: "", + Labels: map[string]string{ + "storage.pinniped.dev/type": "oidc-client-secret", + }, + }, + Data: map[string][]byte{ + "pinniped-storage-data": []byte(`{"hashes":["first-hash","second-hash"],"version":"1"}`), + "pinniped-storage-version": []byte("wrong-version-here"), + }, + Type: "storage.pinniped.dev/oidc-client-secret", + }, + wantErr: "secret storage data has incorrect version", + }, + } + + for _, tt := range tests { + tt := tt + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + session, err := ReadFromSecret(tt.secret) + if tt.wantErr == "" { + require.NoError(t, err) + require.Equal(t, tt.wantStored, session) + } else { + require.EqualError(t, err, tt.wantErr) + require.Nil(t, session) + } + }) + } +} diff --git a/internal/supervisor/server/server.go b/internal/supervisor/server/server.go index 30cdf48f..677165ee 100644 --- a/internal/supervisor/server/server.go +++ b/internal/supervisor/server/server.go @@ -46,6 +46,7 @@ import ( "go.pinniped.dev/internal/controller/supervisorconfig/activedirectoryupstreamwatcher" "go.pinniped.dev/internal/controller/supervisorconfig/generator" "go.pinniped.dev/internal/controller/supervisorconfig/ldapupstreamwatcher" + "go.pinniped.dev/internal/controller/supervisorconfig/oidcclientwatcher" "go.pinniped.dev/internal/controller/supervisorconfig/oidcupstreamwatcher" "go.pinniped.dev/internal/controller/supervisorstorage" "go.pinniped.dev/internal/controllerinit" @@ -141,6 +142,7 @@ func prepareControllers( const certificateName string = "pinniped-supervisor-api-tls-serving-certificate" clientSecretSupervisorGroupData := groupsuffix.SupervisorAggregatedGroups(*cfg.APIGroupSuffix) federationDomainInformer := pinnipedInformers.Config().V1alpha1().FederationDomains() + oidcClientInformer := pinnipedInformers.Config().V1alpha1().OIDCClients() secretInformer := kubeInformers.Core().V1().Secrets() // Create controller manager. @@ -356,6 +358,15 @@ func prepareControllers( plog.New(), ), singletonWorker, + ). + WithController( + oidcclientwatcher.NewOIDCClientWatcherController( + pinnipedClient, + secretInformer, + oidcClientInformer, + controllerlib.WithInformer, + ), + singletonWorker, ) return controllerinit.Prepare(controllerManager.Start, leaderElector, kubeInformers, pinnipedInformers) diff --git a/test/integration/oidc_client_test.go b/test/integration/supervisor_oidc_client_test.go similarity index 66% rename from test/integration/oidc_client_test.go rename to test/integration/supervisor_oidc_client_test.go index fe77b3b8..adb43403 100644 --- a/test/integration/oidc_client_test.go +++ b/test/integration/supervisor_oidc_client_test.go @@ -17,6 +17,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" supervisorconfigv1alpha1 "go.pinniped.dev/generated/latest/apis/supervisor/config/v1alpha1" + "go.pinniped.dev/internal/oidcclientsecretstorage" "go.pinniped.dev/internal/testutil" "go.pinniped.dev/test/testlib" ) @@ -464,3 +465,205 @@ func makeErrFix(reallyOld bool) []string { return out } + +func TestOIDCClientControllerValidations_Parallel(t *testing.T) { + env := testlib.IntegrationEnv(t) + + ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute) + t.Cleanup(cancel) + + secrets := testlib.NewKubernetesClientset(t).CoreV1().Secrets(env.SupervisorNamespace) + oidcClients := testlib.NewSupervisorClientset(t).ConfigV1alpha1().OIDCClients(env.SupervisorNamespace) + + tests := []struct { + name string + client *supervisorconfigv1alpha1.OIDCClient + secret *corev1.Secret + wantPhase string + wantConditions []supervisorconfigv1alpha1.Condition + }{ + { + name: "invalid AllowedGrantTypes and AllowedScopes (missing minimum required values), with no Secret", + client: &supervisorconfigv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{ + GenerateName: "client.oauth.pinniped.dev-", + }, + Spec: supervisorconfigv1alpha1.OIDCClientSpec{ + AllowedRedirectURIs: []supervisorconfigv1alpha1.RedirectURI{"https://some-redirect-url.test.pinniped.dev/some/path"}, + AllowedGrantTypes: []supervisorconfigv1alpha1.GrantType{"refresh_token"}, // needs to have authorization_code + AllowedScopes: []supervisorconfigv1alpha1.Scope{"username"}, // needs to have openid + }, + }, + wantPhase: "Error", + wantConditions: []supervisorconfigv1alpha1.Condition{ + { + Type: "AllowedGrantTypesValid", + Status: "False", + Reason: "MissingRequiredValue", + Message: `"authorization_code" must always be included in "allowedGrantTypes"`, + }, + { + Type: "AllowedScopesValid", + Status: "False", + Reason: "MissingRequiredValue", + Message: `"openid" must always be included in "allowedScopes"`, + }, + { + Type: "ClientSecretExists", + Status: "False", + Reason: "NoClientSecretFound", + Message: `no client secret found (no Secret storage found)`, + }, + }, + }, + { + name: "minimal valid AllowedGrantTypes and AllowedScopes, with Secret that contains empty list of client secrets", + client: &supervisorconfigv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{ + GenerateName: "client.oauth.pinniped.dev-", + }, + Spec: supervisorconfigv1alpha1.OIDCClientSpec{ + AllowedRedirectURIs: []supervisorconfigv1alpha1.RedirectURI{"https://some-redirect-url.test.pinniped.dev/some/path"}, + AllowedGrantTypes: []supervisorconfigv1alpha1.GrantType{"authorization_code"}, + AllowedScopes: []supervisorconfigv1alpha1.Scope{"openid"}, + }, + }, + secret: &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{"storage.pinniped.dev/type": "oidc-client-secret"}, + }, + Type: "storage.pinniped.dev/oidc-client-secret", + Data: map[string][]byte{ + "pinniped-storage-data": []byte(`{"version":"1","hashes":[]}`), + "pinniped-storage-version": []byte("1"), + }, + }, + wantPhase: "Error", + wantConditions: []supervisorconfigv1alpha1.Condition{ + { + Type: "AllowedGrantTypesValid", + Status: "True", + Reason: "Success", + Message: `"allowedGrantTypes" is valid`, + }, + { + Type: "AllowedScopesValid", + Status: "True", + Reason: "Success", + Message: `"allowedScopes" is valid`, + }, + { + Type: "ClientSecretExists", + Status: "False", + Reason: "NoClientSecretFound", + Message: `no client secret found (empty list in storage)`, + }, + }, + }, + { + name: "happy path example with one client secret stored and all possible AllowedGrantTypes and AllowedScopes", + client: &supervisorconfigv1alpha1.OIDCClient{ + ObjectMeta: metav1.ObjectMeta{ + GenerateName: "client.oauth.pinniped.dev-", + }, + Spec: supervisorconfigv1alpha1.OIDCClientSpec{ + AllowedRedirectURIs: []supervisorconfigv1alpha1.RedirectURI{"https://some-redirect-url.test.pinniped.dev/some/path"}, + AllowedGrantTypes: []supervisorconfigv1alpha1.GrantType{"authorization_code", "urn:ietf:params:oauth:grant-type:token-exchange", "refresh_token"}, + AllowedScopes: []supervisorconfigv1alpha1.Scope{"openid", "offline_access", "pinniped:request-audience", "username", "groups"}, + }, + }, + secret: &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{"storage.pinniped.dev/type": "oidc-client-secret"}, + }, + Type: "storage.pinniped.dev/oidc-client-secret", + Data: map[string][]byte{ + "pinniped-storage-data": []byte(`{"version":"1","hashes":["$2y$15$Kh7cRj0ScSD5QelE3ZNSl.nF04JDv7zb3SgGN.tSfLIX.4kt3UX7m"]}`), + "pinniped-storage-version": []byte("1"), + }, + }, + wantPhase: "Ready", + wantConditions: []supervisorconfigv1alpha1.Condition{ + { + Type: "AllowedGrantTypesValid", + Status: "True", + Reason: "Success", + Message: `"allowedGrantTypes" is valid`, + }, + { + Type: "AllowedScopesValid", + Status: "True", + Reason: "Success", + Message: `"allowedScopes" is valid`, + }, + { + Type: "ClientSecretExists", + Status: "True", + Reason: "Success", + Message: `1 client secret(s) found`, + }, + }, + }, + // Note: there are many more possible combinations of these settings, but they are covered by the controller's + // unit tests. This test ensures that everything is wired up correctly in regard to this controller, enough to + // allow the controller to work correctly. + } + + for _, tt := range tests { + tt := tt + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + client, err := oidcClients.Create(ctx, tt.client, metav1.CreateOptions{}) + require.NoError(t, err) + t.Cleanup(func() { + t.Logf("cleaning up test OIDCClient %s/%s", client.Namespace, client.Name) + err := oidcClients.Delete(ctx, client.Name, metav1.DeleteOptions{}) + require.NoError(t, err) + }) + + if tt.secret != nil { + // Force the Secret's name to match the client created above. + tt.secret.Name = oidcclientsecretstorage.New(nil, nil).GetName(client.UID) + secret, err := secrets.Create(ctx, tt.secret, metav1.CreateOptions{}) + require.NoError(t, err) + t.Cleanup(func() { + t.Logf("cleaning up test Secret %s/%s", secret.Namespace, secret.Name) + err := secrets.Delete(ctx, secret.Name, metav1.DeleteOptions{}) + require.NoError(t, err) + }) + } + + // Wait for the OIDCClient to enter the expected phase (or time out). + testlib.RequireEventuallyf(t, func(requireEventually *require.Assertions) { + var err error + updatedClient, err := oidcClients.Get(ctx, client.Name, metav1.GetOptions{}) + requireEventually.NoErrorf(err, "error while getting OIDCClient %s/%s", client.Namespace, client.Name) + requireEventually.Equalf(supervisorconfigv1alpha1.OIDCClientPhase(tt.wantPhase), updatedClient.Status.Phase, + "OIDCClient is not in phase %s: %v", tt.wantPhase, testlib.Sdump(updatedClient)) + }, 1*time.Minute, 2*time.Second, "expected the OIDCClient to go into phase %s", tt.wantPhase) + + // Wait for the controller to converge to the expected Conditions list. It may take several passes of the + // controller running, since the Secret is created after the OIDCClient is created, potentially causing + // the controller to Sync at least twice. + testlib.RequireEventuallyf(t, func(requireEventually *require.Assertions) { + var err error + updatedClient, err := oidcClients.Get(ctx, client.Name, metav1.GetOptions{}) + requireEventually.NoErrorf(err, "error while getting OIDCClient %s/%s", client.Namespace, client.Name) + + // Note that the controller sorts the conditions by type name, + // so we can assume that ordering in the test expectations for this test. + requireEventually.Len(updatedClient.Status.Conditions, len(tt.wantConditions)) + for i, want := range tt.wantConditions { + actual := updatedClient.Status.Conditions[i] + requireEventually.Equal(want.Type, actual.Type) + requireEventually.Equal(want.Status, actual.Status) + requireEventually.Equal(want.Reason, actual.Reason) + requireEventually.Equal(want.Message, actual.Message) + requireEventually.Equal(updatedClient.Generation, actual.ObservedGeneration) + requireEventually.NotEmpty(actual.LastTransitionTime) + } + }, 1*time.Minute, 2*time.Second, "expected the OIDCClient to to have conditions %v", tt.wantConditions) + }) + } +}