mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-07-29 10:54:41 +00:00
k8s: add support for template (#230)
Fixes: #37 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
16
molecule/default/templates/pod_template_one.j2
Normal file
16
molecule/default/templates/pod_template_one.j2
Normal file
@@ -0,0 +1,16 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
labels:
|
||||
app: "{{ k8s_pod_name }}"
|
||||
name: '{{ k8s_pod_name }}'
|
||||
namespace: '{{ k8s_pod_namespace }}'
|
||||
spec:
|
||||
containers:
|
||||
- args:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- while true; do echo $(date); sleep 10; done
|
||||
image: python:3.7-alpine
|
||||
imagePullPolicy: Always
|
||||
name: '{{ k8s_pod_name }}'
|
||||
16
molecule/default/templates/pod_template_two.j2
Normal file
16
molecule/default/templates/pod_template_two.j2
Normal file
@@ -0,0 +1,16 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
labels:
|
||||
app: '[[ k8s_pod_name ]]'
|
||||
name: '[[ k8s_pod_name ]]'
|
||||
namespace: '[[ k8s_pod_namespace ]]'
|
||||
spec:
|
||||
containers:
|
||||
- args:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- while true; do echo $(date); sleep 10; done
|
||||
image: python:3.7-alpine
|
||||
imagePullPolicy: Always
|
||||
name: '[[ k8s_pod_name ]]'
|
||||
Reference in New Issue
Block a user