由于错误,我不小心从 OpenShift 集群中删除了 OAuth。我怎样才能重新创建它?
我尝试删除所有与身份验证相关的 pod,但它们仍然没有自动创建。
有人有我可以用来创建的 YAML 文件吗?
我相信默认的
OAuth
资源只是一个空清单,如下所示:
apiVersion: config.openshift.io/v1
kind: OAuth
metadata:
name: cluster
spec: {}
(摘自文档)。
根据
kubectl explain oauth
,spec
属性中没有必填字段:
$ kubectl explain oauth.spec
KIND: OAuth
VERSION: config.openshift.io/v1
RESOURCE: spec <Object>
DESCRIPTION:
spec holds user settable values for configuration
FIELDS:
identityProviders <[]Object>
identityProviders is an ordered list of ways for a user to identify
themselves. When this list is empty, no identities are provisioned for
users.
templates <Object>
templates allow you to customize pages like the login page.
tokenConfig <Object>
tokenConfig contains options for authorization and access tokens
如果您要自定义 oauth 配置(例如,通过添加自定义提供程序),则只需设置这些字段中的任何一个。