diff --git a/roles/kubernetes-apps/local_volume_provisioner/templates/provisioner-admin-account.yml.j2 b/roles/kubernetes-apps/local_volume_provisioner/templates/provisioner-admin-account.yml.j2 index 5c5c2eb51c3cfcc32ef9ff4dc4147d0ef3413eab..ecdf830796781888f70517db7f231ce0e5b7d7dd 100644 --- a/roles/kubernetes-apps/local_volume_provisioner/templates/provisioner-admin-account.yml.j2 +++ b/roles/kubernetes-apps/local_volume_provisioner/templates/provisioner-admin-account.yml.j2 @@ -8,11 +8,11 @@ apiVersion: rbac.authorization.k8s.io/v1beta1 kind: ClusterRoleBinding metadata: name: local-storage-provisioner-pv-binding - namespace: default + namespace: {{ system_namespace }} subjects: - kind: ServiceAccount name: local-storage-admin - namespace: default + namespace: {{ system_namespace }} roleRef: kind: ClusterRole name: system:persistent-volume-provisioner @@ -22,11 +22,11 @@ apiVersion: rbac.authorization.k8s.io/v1beta1 kind: ClusterRoleBinding metadata: name: local-storage-provisioner-node-binding - namespace: default + namespace: {{ system_namespace }} subjects: - kind: ServiceAccount name: local-storage-admin - namespace: default + namespace: {{ system_namespace }} roleRef: kind: ClusterRole name: system:node diff --git a/roles/kubernetes/node/templates/kubelet.rkt.service.j2 b/roles/kubernetes/node/templates/kubelet.rkt.service.j2 index f602319f2f57b4aa3a47005149249f4e4c47b4d6..4990bd7ee945cc426d66ea0df8b71a2a370de92b 100644 --- a/roles/kubernetes/node/templates/kubelet.rkt.service.j2 +++ b/roles/kubernetes/node/templates/kubelet.rkt.service.j2 @@ -32,7 +32,7 @@ ExecStart=/usr/bin/rkt run \ --volume etc-cni,kind=host,source=/etc/cni,readOnly=true \ --volume opt-cni,kind=host,source=/opt/cni,readOnly=true \ --volume var-lib-cni,kind=host,source=/var/lib/cni,readOnly=false \ - --volume local-volume-base-dir,target {{ local_volume_base_dir }},readOnly=false,recursive=true \ + --volume local-volume-base-dir,kind=host,source={{ local_volume_base_dir }},readOnly=false,recursive=true \ --mount volume=etc-cni,target=/etc/cni \ --mount volume=opt-cni,target=/opt/cni \ --mount volume=var-lib-cni,target=/var/lib/cni \ diff --git a/roles/kubernetes/preinstall/tasks/main.yml b/roles/kubernetes/preinstall/tasks/main.yml index 9b3f47084bd9c72995f25032ff7947d853e47102..738255efcb0e8390f79d4d6c4c1ef628cceb1a05 100644 --- a/roles/kubernetes/preinstall/tasks/main.yml +++ b/roles/kubernetes/preinstall/tasks/main.yml @@ -60,6 +60,7 @@ - "{{ kube_config_dir }}/ssl" - "{{ kube_manifest_dir }}" - "{{ kube_script_dir }}" + - "{{ local_volume_base_dir }}" - name: check cloud_provider value fail: