Always create service account even rbac_enabled = false

This commit is contained in:
Wong Hoi Sing Edison
2018-08-22 11:41:29 +08:00
parent 7398858572
commit c3b3572025
34 changed files with 3 additions and 78 deletions

View File

@@ -7,7 +7,6 @@
- "efk-sa.yml"
- "efk-clusterrolebinding.yml"
run_once: true
when: rbac_enabled
- name: "ElasticSearch | Create Serviceaccount and Clusterrolebinding (RBAC)"
command: "{{ bin_dir }}/kubectl apply -f {{ kube_config_dir }}/{{ item }} -n kube-system"
@@ -15,7 +14,6 @@
- "efk-sa.yml"
- "efk-clusterrolebinding.yml"
run_once: true
when: rbac_enabled
- name: "ElasticSearch | Write ES deployment"
template:

View File

@@ -52,9 +52,7 @@ spec:
volumes:
- name: es-persistent-storage
emptyDir: {}
{% if rbac_enabled %}
serviceAccountName: efk
{% endif %}
initContainers:
- image: alpine:3.6
command: ["/sbin/sysctl", "-w", "vm.max_map_count=262144"]

View File

@@ -28,9 +28,7 @@ spec:
scheduler.alpha.kubernetes.io/critical-pod: ''
spec:
priorityClassName: system-node-critical
{% if rbac_enabled %}
serviceAccountName: efk
{% endif %}
containers:
- name: fluentd-es
image: "{{ fluentd_image_repo }}:{{ fluentd_image_tag }}"

View File

@@ -46,7 +46,4 @@ spec:
- containerPort: 5601
name: ui
protocol: TCP
{% if rbac_enabled %}
serviceAccountName: efk
{% endif %}