Browse Source
Merge pull request #3351 from woopstar/kubeadm_token_basic_auth_fix
Mount basic auth or token auth dirs to support it on kubeadm deployments
pull/3360/head
k8s-ci-robot
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
26 additions and
1 deletions
-
roles/kubernetes/master/templates/kubeadm-config.v1alpha1.yaml.j2
-
roles/kubernetes/master/templates/kubeadm-config.v1alpha2.yaml.j2
|
|
@ -134,6 +134,19 @@ schedulerExtraArgs: |
|
|
|
{{ key }}: "{{ kube_kubeadm_scheduler_extra_args[key] }}" |
|
|
|
{% endfor %} |
|
|
|
{% endif %} |
|
|
|
{% if kube_basic_auth|default(true) or kube_token_auth|default(true) %} |
|
|
|
apiServerExtraVolumes: |
|
|
|
{% if kube_basic_auth|default(true) %} |
|
|
|
- name: basic-auth-config |
|
|
|
hostPath: {{ kube_users_dir }} |
|
|
|
mountPath: {{ kube_users_dir }} |
|
|
|
{% endif %} |
|
|
|
{% if kube_token_auth|default(true) %} |
|
|
|
- name: token-auth-config |
|
|
|
hostPath: {{ kube_token_dir }} |
|
|
|
mountPath: {{ kube_token_dir }} |
|
|
|
{% endif %} |
|
|
|
{% endif %} |
|
|
|
apiServerCertSANs: |
|
|
|
{% for san in apiserver_sans.split(' ') | unique %} |
|
|
|
- {{ san }} |
|
|
|
|
|
@ -123,8 +123,19 @@ controllerManagerExtraVolumes: |
|
|
|
hostPath: "{{ kube_config_dir }}/openstack-cacert.pem" |
|
|
|
mountPath: "{{ kube_config_dir }}/openstack-cacert.pem" |
|
|
|
{% endif %} |
|
|
|
{% if kubernetes_audit %} |
|
|
|
{% if kubernetes_audit or kube_basic_auth|default(true) or kube_token_auth|default(true) %} |
|
|
|
apiServerExtraVolumes: |
|
|
|
{% if kube_basic_auth|default(true) %} |
|
|
|
- name: basic-auth-config |
|
|
|
hostPath: {{ kube_users_dir }} |
|
|
|
mountPath: {{ kube_users_dir }} |
|
|
|
{% endif %} |
|
|
|
{% if kube_token_auth|default(true) %} |
|
|
|
- name: token-auth-config |
|
|
|
hostPath: {{ kube_token_dir }} |
|
|
|
mountPath: {{ kube_token_dir }} |
|
|
|
{% endif %} |
|
|
|
{% if kubernetes_audit %} |
|
|
|
- name: {{ audit_policy_name }} |
|
|
|
hostPath: {{ audit_policy_hostpath }} |
|
|
|
mountPath: {{ audit_policy_mountpath }} |
|
|
@ -135,6 +146,7 @@ apiServerExtraVolumes: |
|
|
|
writable: true |
|
|
|
{% endif %} |
|
|
|
{% endif %} |
|
|
|
{% endif %} |
|
|
|
schedulerExtraArgs: |
|
|
|
profiling: "{{ kube_profiling }}" |
|
|
|
{% if kube_feature_gates %} |
|
|
|