create sample-apiserver repo for people to inspect
This commit is contained in:
parent
9d21f84d8f
commit
c2c4ecb2ff
|
|
@ -388,7 +388,8 @@ func NewDefaultAPIGroupInfo(group string, registry *registered.APIRegistrationMa
|
||||||
return APIGroupInfo{
|
return APIGroupInfo{
|
||||||
GroupMeta: *groupMeta,
|
GroupMeta: *groupMeta,
|
||||||
VersionedResourcesStorageMap: map[string]map[string]rest.Storage{},
|
VersionedResourcesStorageMap: map[string]map[string]rest.Storage{},
|
||||||
OptionsExternalVersion: ®istry.GroupOrDie("").GroupVersion,
|
// TODO unhardcode this. It was hardcoded before, but we need to re-evaluate
|
||||||
|
OptionsExternalVersion: &schema.GroupVersion{Version: "v1"},
|
||||||
Scheme: scheme,
|
Scheme: scheme,
|
||||||
ParameterCodec: parameterCodec,
|
ParameterCodec: parameterCodec,
|
||||||
NegotiatedSerializer: codecs,
|
NegotiatedSerializer: codecs,
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ func (s *RequestHeaderAuthenticationOptions) AddFlags(fs *pflag.FlagSet) {
|
||||||
// ToAuthenticationRequestHeaderConfig returns a RequestHeaderConfig config object for these options
|
// ToAuthenticationRequestHeaderConfig returns a RequestHeaderConfig config object for these options
|
||||||
// if necessary, nil otherwise.
|
// if necessary, nil otherwise.
|
||||||
func (s *RequestHeaderAuthenticationOptions) ToAuthenticationRequestHeaderConfig() *authenticatorfactory.RequestHeaderConfig {
|
func (s *RequestHeaderAuthenticationOptions) ToAuthenticationRequestHeaderConfig() *authenticatorfactory.RequestHeaderConfig {
|
||||||
if len(s.UsernameHeaders) == 0 {
|
if len(s.UsernameHeaders) == 0 || (len(s.UsernameHeaders) == 1 && len(s.UsernameHeaders[0]) == 0) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue