Closed raffaelespazzoli closed 4 years ago
@redmikhail @D1abloRUS you both have showed interest in the ability of templating resources. I am redesigning this operator to allow to do that. I wanted to submit this new design to your attention to see what you think about it. Instead of an array of resources you'll have the ability to define an array of golang templates. Once processed the templates need to resolved to a resource. The templates will receive one parameter which is the namespace for which we are processing. So, let's take the role binding example it will look something like this:
kind: RoleBinding
metadata:
annotations:
name: {{.Name}}-myrole
namespace: {{.Name}}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: myrole
subjects:
- kind: ServiceAccount
name: mysa
Please let me know what you think.
no need anymore
this covers for the following issues #28 #21 #20 a straw-man design is: