Browse Source

Add support for admission controllers in 1.10 and above

pull/3054/head
Robert Everson 6 years ago
parent
commit
ac18f6cf8b
2 changed files with 8 additions and 0 deletions
  1. 4
      roles/kubernetes/master/templates/kubeadm-config.yaml.j2
  2. 4
      roles/kubernetes/master/templates/manifests/kube-apiserver.manifest.j2

4
roles/kubernetes/master/templates/kubeadm-config.yaml.j2

@ -34,7 +34,11 @@ apiServerExtraArgs:
bind-address: {{ kube_apiserver_bind_address }}
insecure-bind-address: {{ kube_apiserver_insecure_bind_address }}
insecure-port: "{{ kube_apiserver_insecure_port }}"
{% if kube_version | version_compare('v1.10', '<') %}
admission-control: {{ kube_apiserver_admission_control | join(',') }}
{% else %}
enable-admission-plugins: {{ kube_apiserver_admission_control | join(',') }}
{% endif %}
apiserver-count: "{{ kube_apiserver_count }}"
{% if kube_version | version_compare('v1.9', '>=') %}
endpoint-reconciler-type: lease

4
roles/kubernetes/master/templates/manifests/kube-apiserver.manifest.j2

@ -45,7 +45,11 @@ spec:
{% if kube_version | version_compare('v1.9', '>=') %}
- --endpoint-reconciler-type=lease
{% endif %}
{% if kube_version | version_compare('v1.10', '<') %}
- --admission-control={{ kube_apiserver_admission_control | join(',') }}
{% else %}
- --enable-admission-plugins={{ kube_apiserver_admission_control | join(',') }}
{% endif %}
- --service-cluster-ip-range={{ kube_service_addresses }}
- --service-node-port-range={{ kube_apiserver_node_port_range }}
- --client-ca-file={{ kube_cert_dir }}/ca.pem

Loading…
Cancel
Save