-
-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow stdin for kube play #463
Comments
@mcexit can you please post an example of what you would like to have? What can be in stdin? |
An example is whatever manifest you want to pass to podman_play (akin to apiVersion: v1
kind: PersistentVolumeClaim
metadata:
annotations:
volume.podman.io/device: syncthing/files
volume.podman.io/mount-options: bind
labels:
app.kubernetes.io/component: server
app.kubernetes.io/created-by: podman
app.kubernetes.io/managed-by: kustomize-4.5.7
app.kubernetes.io/name: syncthing
app.kubernetes.io/part-of: examples
app.kubernetes.io/version: official
name: podman-syncthing
namespace: examples
spec:
volumeName: syncthing
---
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
volume.podman.io/device: syncthing/files
volume.podman.io/mount-options: bind
labels:
app.kubernetes.io/component: server
app.kubernetes.io/created-by: podman
app.kubernetes.io/managed-by: kustomize-4.5.7
app.kubernetes.io/name: syncthing
app.kubernetes.io/part-of: examples
app.kubernetes.io/version: official
name: podman-syncthing
namespace: examples
spec:
selector:
matchLabels:
app.kubernetes.io/component: server
app.kubernetes.io/created-by: podman
app.kubernetes.io/name: syncthing
app.kubernetes.io/part-of: examples
app.kubernetes.io/version: official
template:
metadata:
annotations:
volume.podman.io/device: syncthing/files
volume.podman.io/mount-options: bind
labels:
app.kubernetes.io/component: server
app.kubernetes.io/created-by: podman
app.kubernetes.io/name: syncthing
app.kubernetes.io/part-of: examples
app.kubernetes.io/version: official
spec:
containers:
- image: syncthing/syncthing
name: syncthing
ports:
- containerPort: 8384
hostIP: 127.0.0.1
hostPort: 8384
- containerPort: 21027
hostPort: 21027
protocol: UDP
- containerPort: 22000
hostPort: 22000
protocol: TCP
- containerPort: 22000
hostPort: 22000
protocol: UDP
volumeMounts:
- mountPath: /var/syncthing
name: syncthing
volumes:
- name: syncthing
persistentVolumeClaim:
claimName: podman-syncthing |
I'd like to understand how would look ansible task with it. Can you please provide a desired example? Like registering |
That is one possibility, but there is a kustomize lookup module already in ansible: https://docs.ansible.com/ansible/latest/collections/kubernetes/core/kustomize_lookup.html So it would look like: - name: Play kube file
containers.podman.podman_play:
stdin: "{{ lookup('kubernetes.core.kustomize', dir='/path/to/kustomization') }}" You could even use |
Fix containers#463 Signed-off-by: Sagi Shnaidman <[email protected]>
Fix containers#463 Signed-off-by: Sagi Shnaidman <[email protected]>
Fix containers#463 Signed-off-by: Sagi Shnaidman <[email protected]>
Fix containers#463 Signed-off-by: Sagi Shnaidman <[email protected]>
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind feature
Description
podman_play module only allows file input.
Describe the results you received: podman_play only allows file input using
kube_file
which is required.Describe the results you expected: podman_play module should allow for variable input, not just file. This allows the utilization of something like
kubernetes.core.kustomize lookup
Version of the
containers.podman
collection:Either git commit if installed from git:
git show --summary
Or version from
ansible-galaxy
if installed from galaxy:ansible-galaxy collection list | grep containers.podman
Output of
ansible --version
:Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Additional environment details (AWS, VirtualBox, physical, etc.): physical
The text was updated successfully, but these errors were encountered: