Skip to content
Snippets Groups Projects
Unverified Commit 34d1f0bf authored by k8s-ci-robot's avatar k8s-ci-robot Committed by GitHub
Browse files

Merge pull request #3351 from woopstar/kubeadm_token_basic_auth_fix

Mount basic auth or token auth dirs to support it on kubeadm deployments
parents a8a62afd cac48575
No related branches found
No related tags found
No related merge requests found
...@@ -134,6 +134,19 @@ schedulerExtraArgs: ...@@ -134,6 +134,19 @@ schedulerExtraArgs:
{{ key }}: "{{ kube_kubeadm_scheduler_extra_args[key] }}" {{ key }}: "{{ kube_kubeadm_scheduler_extra_args[key] }}"
{% endfor %} {% endfor %}
{% endif %} {% 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: apiServerCertSANs:
{% for san in apiserver_sans.split(' ') | unique %} {% for san in apiserver_sans.split(' ') | unique %}
- {{ san }} - {{ san }}
......
...@@ -123,8 +123,19 @@ controllerManagerExtraVolumes: ...@@ -123,8 +123,19 @@ controllerManagerExtraVolumes:
hostPath: "{{ kube_config_dir }}/openstack-cacert.pem" hostPath: "{{ kube_config_dir }}/openstack-cacert.pem"
mountPath: "{{ kube_config_dir }}/openstack-cacert.pem" mountPath: "{{ kube_config_dir }}/openstack-cacert.pem"
{% endif %} {% endif %}
{% if kubernetes_audit %} {% if kubernetes_audit or kube_basic_auth|default(true) or kube_token_auth|default(true) %}
apiServerExtraVolumes: 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 }} - name: {{ audit_policy_name }}
hostPath: {{ audit_policy_hostpath }} hostPath: {{ audit_policy_hostpath }}
mountPath: {{ audit_policy_mountpath }} mountPath: {{ audit_policy_mountpath }}
...@@ -135,6 +146,7 @@ apiServerExtraVolumes: ...@@ -135,6 +146,7 @@ apiServerExtraVolumes:
writable: true writable: true
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endif %}
schedulerExtraArgs: schedulerExtraArgs:
profiling: "{{ kube_profiling }}" profiling: "{{ kube_profiling }}"
{% if kube_feature_gates %} {% if kube_feature_gates %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment