Merge pull request #5586 from fernandocarletti/feature/flags

Add flag to disable Basic Auth.
This commit is contained in:
k8s-ci-robot 2018-11-18 18:01:05 -08:00 committed by GitHub
commit 67f1cc8aba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 24 additions and 1 deletions

View File

@ -268,6 +268,16 @@ spec:
serviceNodePortRange: 30000-33000
```
#### Disable Basic Auth
This will disable the passing of the `--basic-auth-file` flag.
```yaml
spec:
kubeAPIServer:
disableBasicAuth: true
```
#### targetRamMb
Memory limit for apiserver in MB (used to configure sizes of caches, etc.)

View File

@ -283,9 +283,12 @@ func (b *KubeAPIServerBuilder) buildPod() (*v1.Pod, error) {
kubeAPIServer.ClientCAFile = filepath.Join(b.PathSrvKubernetes(), "ca.crt")
kubeAPIServer.TLSCertFile = filepath.Join(b.PathSrvKubernetes(), "server.cert")
kubeAPIServer.TLSPrivateKeyFile = filepath.Join(b.PathSrvKubernetes(), "server.key")
kubeAPIServer.BasicAuthFile = filepath.Join(b.PathSrvKubernetes(), "basic_auth.csv")
kubeAPIServer.TokenAuthFile = filepath.Join(b.PathSrvKubernetes(), "known_tokens.csv")
if !kubeAPIServer.DisableBasicAuth {
kubeAPIServer.BasicAuthFile = filepath.Join(b.PathSrvKubernetes(), "basic_auth.csv")
}
if b.UseEtcdTLS() {
kubeAPIServer.EtcdCAFile = filepath.Join(b.PathSrvKubernetes(), "ca.crt")
kubeAPIServer.EtcdCertFile = filepath.Join(b.PathSrvKubernetes(), "etcd-client.pem")

View File

@ -224,6 +224,8 @@ type KubeProxyConfig struct {
type KubeAPIServerConfig struct {
// Image is the docker container used
Image string `json:"image,omitempty"`
// DisableBasicAuth removes the --basic-auth-file flag
DisableBasicAuth bool `json:"disableBasicAuth,omitempty"`
// LogLevel is the logging level of the api
LogLevel int32 `json:"logLevel,omitempty" flag:"v" flag-empty:"0"`
// CloudProvider is the name of the cloudProvider we are using, aws, gce etcd

View File

@ -224,6 +224,8 @@ type KubeProxyConfig struct {
type KubeAPIServerConfig struct {
// Image is the docker container used
Image string `json:"image,omitempty"`
// DisableBasicAuth removes the --basic-auth-file flag
DisableBasicAuth bool `json:"disableBasicAuth,omitempty"`
// LogLevel is the logging level of the api
LogLevel int32 `json:"logLevel,omitempty" flag:"v" flag-empty:"0"`
// CloudProvider is the name of the cloudProvider we are using, aws, gce etcd

View File

@ -2167,6 +2167,7 @@ func Convert_kops_KopeioNetworkingSpec_To_v1alpha1_KopeioNetworkingSpec(in *kops
func autoConvert_v1alpha1_KubeAPIServerConfig_To_kops_KubeAPIServerConfig(in *KubeAPIServerConfig, out *kops.KubeAPIServerConfig, s conversion.Scope) error {
out.Image = in.Image
out.DisableBasicAuth = in.DisableBasicAuth
out.LogLevel = in.LogLevel
out.CloudProvider = in.CloudProvider
out.SecurePort = in.SecurePort
@ -2240,6 +2241,7 @@ func Convert_v1alpha1_KubeAPIServerConfig_To_kops_KubeAPIServerConfig(in *KubeAP
func autoConvert_kops_KubeAPIServerConfig_To_v1alpha1_KubeAPIServerConfig(in *kops.KubeAPIServerConfig, out *KubeAPIServerConfig, s conversion.Scope) error {
out.Image = in.Image
out.DisableBasicAuth = in.DisableBasicAuth
out.LogLevel = in.LogLevel
out.CloudProvider = in.CloudProvider
out.SecurePort = in.SecurePort

View File

@ -224,6 +224,8 @@ type KubeProxyConfig struct {
type KubeAPIServerConfig struct {
// Image is the docker container used
Image string `json:"image,omitempty"`
// DisableBasicAuth removes the --basic-auth-file flag
DisableBasicAuth bool `json:"disableBasicAuth,omitempty"`
// LogLevel is the logging level of the api
LogLevel int32 `json:"logLevel,omitempty" flag:"v" flag-empty:"0"`
// CloudProvider is the name of the cloudProvider we are using, aws, gce etcd

View File

@ -2431,6 +2431,7 @@ func Convert_kops_KopeioNetworkingSpec_To_v1alpha2_KopeioNetworkingSpec(in *kops
func autoConvert_v1alpha2_KubeAPIServerConfig_To_kops_KubeAPIServerConfig(in *KubeAPIServerConfig, out *kops.KubeAPIServerConfig, s conversion.Scope) error {
out.Image = in.Image
out.DisableBasicAuth = in.DisableBasicAuth
out.LogLevel = in.LogLevel
out.CloudProvider = in.CloudProvider
out.SecurePort = in.SecurePort
@ -2504,6 +2505,7 @@ func Convert_v1alpha2_KubeAPIServerConfig_To_kops_KubeAPIServerConfig(in *KubeAP
func autoConvert_kops_KubeAPIServerConfig_To_v1alpha2_KubeAPIServerConfig(in *kops.KubeAPIServerConfig, out *KubeAPIServerConfig, s conversion.Scope) error {
out.Image = in.Image
out.DisableBasicAuth = in.DisableBasicAuth
out.LogLevel = in.LogLevel
out.CloudProvider = in.CloudProvider
out.SecurePort = in.SecurePort