Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authentication ¶ added in v0.9.0
type Authentication struct {
BuiltInOptions *kubeoptions.BuiltInAuthenticationOptions
PassOnGroups []string
DropGroups []string
}
Authentication wraps BuiltInAuthenticationOptions so we can minimize the dependencies on apiserver auth machinery, specifically by overriding the ApplyTo so we can remove those config dependencies not relevant to the subset of auth methods we enable in the proxy.
func NewAuthentication ¶ added in v0.9.0
func NewAuthentication() *Authentication
NewAuthentication creates a default Authentication.
func (*Authentication) AddFlags ¶ added in v0.9.0
func (c *Authentication) AddFlags(fs *pflag.FlagSet)
AddFlags delegates to ClientCertAuthenticationOptions.
func (*Authentication) AdditionalAuthEnabled ¶ added in v0.10.0
func (c *Authentication) AdditionalAuthEnabled() bool
When configured to enable auth other than ClientCert, this returns true.
func (*Authentication) ApplyTo ¶ added in v0.9.0
func (c *Authentication) ApplyTo(ctx context.Context, authenticationInfo *genericapiserver.AuthenticationInfo, servingInfo *genericapiserver.SecureServingInfo, serviceAccounts ServiceAccountLookup) error
ApplyTo builds the authenticator. serviceAccounts resolves the service accounts and token secrets that service account tokens name, on whichever shard hosts them; it is only consulted when service account authentication is enabled.
func (*Authentication) Validate ¶ added in v0.9.0
func (c *Authentication) Validate() []error
type Options ¶
type Options struct {
SecureServing apiserveroptions.SecureServingOptionsWithLoopback
Authentication Authentication
MappingFile string
RootDirectory string
// RootKubeconfig is parsed but ignored. The proxy does not use the root
// shard: shard discovery, the core identities and service account lookups
// go through the peers, and --shard-peer-kubeconfig is required. A proxy
// started with --root-kubeconfig alone fails validation.
//
// Deprecated: ignored, to be removed.
RootKubeconfig string
ShardsKubeconfig string
ShardsPeerKubeconfigs []string
ProfilerAddress string
CorsAllowedOriginList []string
}
func NewOptions ¶
func NewOptions() *Options
func (*Options) AddFlags ¶
func (o *Options) AddFlags(fss *cliflag.NamedFlagSets)
type ServiceAccountLookup ¶ added in v0.34.0
type ServiceAccountLookup interface {
serviceaccount.ServiceAccountTokenClusterGetter
SecretsWriter() kcpcorev1client.SecretClusterInterface
}
ServiceAccountLookup resolves the service accounts and token secrets that service account tokens name, on whichever shard hosts them, and gives the legacy token validator a writer for its last-used annotations.