Skip to content

Commit

Permalink
Remove WhoAmI api
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Jun 10, 2024
1 parent e773b49 commit 7313c86
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 406 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@ helm install kube-ui-server appscode/kube-ui-server
```console
$ kubectl create -f artifacts/whoami.yaml -o yaml

apiVersion: authentication.k8s.appscode.com/v1alpha1
kind: WhoAmI
response:
user:
apiVersion: authentication.k8s.io/v1
kind: SelfSubjectReview
metadata:
creationTimestamp: "2024-06-10T18:41:37Z"
status:
userInfo:
groups:
- system:masters
- kubeadm:cluster-admins
- system:authenticated
username: kubernetes-admin
```
Expand Down
124 changes: 0 additions & 124 deletions apis/identity/v1alpha1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

79 changes: 0 additions & 79 deletions apis/identity/v1alpha1/whoami_types.go

This file was deleted.

107 changes: 0 additions & 107 deletions apis/identity/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions artifacts/whoami.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
apiVersion: identity.k8s.appscode.com/v1alpha1
kind: WhoAmI
apiVersion: authentication.k8s.io/v1
kind: SelfSubjectReview
2 changes: 0 additions & 2 deletions pkg/apiserver/apiserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ import (
coststorage "kubeops.dev/ui-server/pkg/registry/cost/reports"
clusteridstorage "kubeops.dev/ui-server/pkg/registry/identity/clusteridentity"
inboxtokenreqstorage "kubeops.dev/ui-server/pkg/registry/identity/inboxtokenrequest"
whoamistorage "kubeops.dev/ui-server/pkg/registry/identity/whoami"
"kubeops.dev/ui-server/pkg/registry/meta/chartpresetquery"
clusterprofilestorage "kubeops.dev/ui-server/pkg/registry/meta/clusterprofile"
clusterstatusstorage "kubeops.dev/ui-server/pkg/registry/meta/clusterstatus"
Expand Down Expand Up @@ -359,7 +358,6 @@ func (c completedConfig) New(ctx context.Context) (*UIServer, error) {
v1alpha1storage := map[string]rest.Storage{}
v1alpha1storage[identityapi.ResourceClusterIdentities] = clusteridstorage.NewStorage(ctrlClient, bc, cid)
v1alpha1storage[identityapi.ResourceInboxTokenRequests] = inboxtokenreqstorage.NewStorage(ctrlClient, bc, cid)
v1alpha1storage[identityapi.ResourceWhoAmIs] = whoamistorage.NewStorage()
apiGroupInfo.VersionedResourcesStorageMap["v1alpha1"] = v1alpha1storage

if err := s.GenericAPIServer.InstallAPIGroup(&apiGroupInfo); err != nil {
Expand Down
1 change: 0 additions & 1 deletion pkg/cmds/server/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ func (o *UIServerOptions) Config() (*apiserver.Config, error) {
fmt.Sprintf("/apis/%s", identityapi.GroupVersion),
fmt.Sprintf("/apis/%s/%s", identityapi.GroupVersion, identityapi.ResourceClusterIdentities),
fmt.Sprintf("/apis/%s/%s", identityapi.GroupVersion, identityapi.ResourceInboxTokenRequests),
fmt.Sprintf("/apis/%s/%s", identityapi.GroupVersion, identityapi.ResourceWhoAmIs),
}

serverConfig.OpenAPIConfig = genericapiserver.DefaultOpenAPIConfig(
Expand Down
Loading

0 comments on commit 7313c86

Please sign in to comment.