How from sls file to custom modules present under _module folder gets called

9 views
Skip to first unread message

Baitanik Talukder

unread,
Feb 9, 2021, 10:40:03 PM2/9/21
to Salt-users
Hello, 
i am new to salt stack. we are using metalk8s onprem which uses salt stack. https://github.com/scality/metalk8s 

There we have one sls file e.g -> 
#! metalk8s_kubernetes

kind: Namespace
apiVersion: v1
metadata:
  name: metalk8s-ui
  labels:
    heritage: metalk8s


and they have salt/_renderers/metalk8s_kubernetes.py ... 
and also one module salt/_modules/metalk8s_kubernetes.py ...

from sls file first it gets called to renderer, but after that how the module gets called.. Not understanding that... 

so could anyone please help and tell how from normal sls file to custom renderer and custom module file are connected ?

Vaarlion

unread,
Feb 11, 2021, 2:28:48 AM2/11/21
to Salt-users
i don't know what you are using, but as a general information, modules are peice of code that YOU can call individually when needed, but are mostly used by other part of salt like state, or renderer.
You can see those as library of function (IMO)
It's likely than your rendered call some of the module function on it's own
Reply all
Reply to author
Forward
0 new messages