Skip to content

Commit

Permalink
salt: Fix mine call for salt '3000.2'
Browse files Browse the repository at this point in the history
In Salt '3000.2' we can't provide kwargs for mine call, so we need to
use potitional arguments in pillar and for `module.run` with `mine.send`
we need to use potitional arguments to provide the mine name, as `func`
get renamed to `name` but this arguments is gave to the function behind,
which make the mine function call fail.

Sees saltstack/salt#56584
  • Loading branch information
TeddyAndrieux committed Apr 30, 2020
1 parent 9b69bd3 commit e6c1b6e
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
16 changes: 8 additions & 8 deletions pillar/metalk8s/roles/ca.sls
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
mine_functions:
kubernetes_root_ca_b64:
mine_function: hashutil.base64_encodefile
fname: /etc/kubernetes/pki/ca.crt
- mine_function: hashutil.base64_encodefile
- /etc/kubernetes/pki/ca.crt

kubernetes_etcd_ca_b64:
mine_function: hashutil.base64_encodefile
fname: /etc/kubernetes/pki/etcd/ca.crt
- mine_function: hashutil.base64_encodefile
- /etc/kubernetes/pki/etcd/ca.crt

kubernetes_front_proxy_ca_b64:
mine_function: hashutil.base64_encodefile
fname: /etc/kubernetes/pki/front-proxy-ca.crt
- mine_function: hashutil.base64_encodefile
- /etc/kubernetes/pki/front-proxy-ca.crt

kubernetes_sa_pub_key_b64:
mine_function: hashutil.base64_encodefile
fname: /etc/kubernetes/pki/sa.pub
- mine_function: hashutil.base64_encodefile
- /etc/kubernetes/pki/sa.pub

x509_signing_policies:
kube_apiserver_client_policy:
Expand Down
8 changes: 4 additions & 4 deletions pillar/metalk8s/roles/minion.sls
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
mine_functions:
control_plane_ip:
mine_function: grains.get
key: metalk8s:control_plane_ip
- mine_function: grains.get
- metalk8s:control_plane_ip
workload_plane_ip:
mine_function: grains.get
key: metalk8s:workload_plane_ip
- mine_function: grains.get
- metalk8s:workload_plane_ip
2 changes: 1 addition & 1 deletion salt/metalk8s/kubernetes/ca/etcd/installed.sls
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Generate etcd CA certificate:
Advertise etcd CA certificate in the mine:
module.wait:
- mine.send:
- func: kubernetes_etcd_ca_b64
- kubernetes_etcd_ca_b64
- mine_function: hashutil.base64_encodefile
- /etc/kubernetes/pki/etcd/ca.crt
- watch:
Expand Down
2 changes: 1 addition & 1 deletion salt/metalk8s/kubernetes/ca/front-proxy/installed.sls
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Generate front proxy CA certificate:
Advertise front proxy CA certificate in the mine:
module.wait:
- mine.send:
- func: kubernetes_front_proxy_ca_b64
- kubernetes_front_proxy_ca_b64
- mine_function: hashutil.base64_encodefile
- /etc/kubernetes/pki/front-proxy-ca.crt
- watch:
Expand Down
2 changes: 1 addition & 1 deletion salt/metalk8s/kubernetes/ca/kubernetes/exported.sls
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ include:
Advertise CA certificate in the mine:
module.wait:
- mine.send:
- func: 'kubernetes_root_ca_b64'
- kubernetes_root_ca_b64
- mine_function: hashutil.base64_encodefile
- /etc/kubernetes/pki/ca.crt
- watch:
Expand Down
2 changes: 1 addition & 1 deletion salt/metalk8s/kubernetes/sa/installed.sls
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Store SA public key:
Advertise SA pub key in the mine:
module.wait:
- mine.send:
- func: kubernetes_sa_pub_key_b64
- kubernetes_sa_pub_key_b64
- mine_function: hashutil.base64_encodefile
- /etc/kubernetes/pki/sa.pub
- watch:
Expand Down

0 comments on commit e6c1b6e

Please sign in to comment.