add minor fixes
Change-Id: I0b0daed8be9e969e8291803f1c33261127098746
diff --git a/kubernetes/control/cluster.sls b/kubernetes/control/cluster.sls
index a11beb6..2c7114b 100644
--- a/kubernetes/control/cluster.sls
+++ b/kubernetes/control/cluster.sls
@@ -43,7 +43,7 @@
{%- endif %}
-/srv/kubernetes/{{ service.cluster }}/{{ service_name }}-{{ service.kind }}.yml:
+/srv/kubernetes/{{ service.kind|lower }}/{{ service_name }}-{{ service.kind }}.yml:
file.managed:
- source: salt://kubernetes/files/rc.yml
- user: root
@@ -78,7 +78,7 @@
service: {{ service|yaml }}
{%- endif %}
-/srv/kubernetes/{{ service.cluster }}/{{ node_name }}-{{ service.kind }}.yml:
+/srv/kubernetes/{{ service.kind|lower }}/{{ node_name }}-{{ service.kind }}.yml:
file.managed:
- source: salt://kubernetes/files/rc.yml
- user: root
diff --git a/kubernetes/files/rc.yml b/kubernetes/files/rc.yml
index 5863863..89b4675 100644
--- a/kubernetes/files/rc.yml
+++ b/kubernetes/files/rc.yml
@@ -52,7 +52,7 @@
{%- for container_name, container in service.container.iteritems() %}
- name: {{ container_name }}
image: {% if container.registry is defined %}{{ container.registry }}/{%- endif %}{{ container.image }}{%- if container.tag is defined %}:{{ container.tag }}{%- endif %}
- imagePullPolicy: IfNotPresent
+ imagePullPolicy: {{ container.get('image_pull_policy','IfNotPresent') }}
{%- if container.privileged is defined %}
securityContext:
privileged: True
diff --git a/kubernetes/pool/kubelet.sls b/kubernetes/pool/kubelet.sls
index 71eb4dc..3fc3c2c 100644
--- a/kubernetes/pool/kubelet.sls
+++ b/kubernetes/pool/kubelet.sls
@@ -21,6 +21,13 @@
/etc/kubernetes/config:
file.absent
+manifest-dir-create:
+ file.directory:
+ - name: /etc/kubernetes/manifests
+ - user: root
+ - group: root
+ - mode: 0751
+
{%- if pool.host.label is defined %}
{%- for name,label in pool.host.label.iteritems() %}