forked from ansible-collections/community.kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add testcase for multi resource template
User can combine multiple resources in the given template file, which can be consumed by k8s module to create multiple resources at once. Fixes: ansible-collections#243 Signed-off-by: Abhijeet Kasurde <[email protected]>
- Loading branch information
Showing
3 changed files
with
55 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
minor_changes: | ||
- k8s - add testcase for adding multiple resources using template parameter (https://github.com/ansible-collections/community.kubernetes/issues/243). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
labels: | ||
app: "{{ k8s_pod_name_one }}" | ||
name: '{{ k8s_pod_name_one }}' | ||
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_one }}' | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
labels: | ||
app: "{{ k8s_pod_name_two }}" | ||
name: '{{ k8s_pod_name_two }}' | ||
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_two }}' |