basic rbac support

This commit is contained in:
jwfang
2017-06-27 12:27:25 +08:00
parent b495d36fa5
commit 092bf07cbf
27 changed files with 374 additions and 59 deletions

View File

@@ -2,7 +2,7 @@ apiVersion: v1
kind: Pod
metadata:
name: kube-scheduler
namespace: kube-system
namespace: {{ system_namespace }}
labels:
k8s-app: kube-scheduler
spec:
@@ -25,7 +25,7 @@ spec:
- /hyperkube
- scheduler
- --leader-elect=true
- --master={{ kube_apiserver_endpoint }}
- --kubeconfig={{ kube_config_dir }}/kube-scheduler-kubeconfig.yaml
- --v={{ kube_log_level }}
{% if scheduler_custom_flags is string %}
- {{ scheduler_custom_flags }}
@@ -41,3 +41,27 @@ spec:
port: 10251
initialDelaySeconds: 30
timeoutSeconds: 10
volumeMounts:
- mountPath: /etc/ssl/certs
name: ssl-certs-host
readOnly: true
- mountPath: "{{ kube_config_dir }}/ssl"
name: etc-kube-ssl
readOnly: true
- mountPath: "{{ kube_config_dir }}/kube-scheduler-kubeconfig.yaml"
name: kubeconfig
readOnly: true
volumes:
- name: ssl-certs-host
hostPath:
{% if ansible_os_family == 'RedHat' %}
path: /etc/pki/tls
{% else %}
path: /usr/share/ca-certificates
{% endif %}
- name: etc-kube-ssl
hostPath:
path: "{{ kube_config_dir }}/ssl"
- name: kubeconfig
hostPath:
path: "{{ kube_config_dir }}/kube-scheduler-kubeconfig.yaml"