-
Notifications
You must be signed in to change notification settings - Fork 35
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
Move to yaml resources everywhere #612
Comments
#617 does the first part of flattening the s3-keys |
Unfortunately podman secrets don't understand k8s style secrets at all. If I have a /tmp/s.yaml with ---
apiVersion: v1
kind: Secret
metadata:
name: foo-tokens
stringData:
github-token: "foo bar 123"
supi: |
first line
second line Then
In order for this to work, you have to pick out every single key individually with See https://docs.podman.io/en/latest/markdown/podman-kube-play.1.html ConfigMaps have the same problem, BTW. So here goes the dream of uniform handling.. |
It actually does work fine when using ---
apiVersion: v1
kind: Secret
metadata:
name: foo-tokens
stringData:
github-token: "foo bar 123"
supi: |
first line
second line
---
apiVersion: v1
kind: Pod
metadata:
name: mypod
spec:
containers:
- name: test1
image: quay.io/libpod/alpine_nginx:latest
volumeMounts:
- name: foo
mountPath: /etc/foo
readOnly: true
volumes:
- name: foo
secret:
secretName: foo-tokens
optional: false
So we could go all-in on YAML and use that everywhere. quadlets even support https://www.redhat.com/sysadmin/multi-container-application-podman-quadlet |
In other words, we should kube-ify the containers first (as that works with host directory secrets) and then convert the secrets -- that way it can be broken down into multiple smaller steps. |
So one possibility to do secrets, which falls short of putting each individual secret into bitwarden would be to use Ansible Vault. We'd check the encrypted secret vault into this repository and put the encryption passphrase into bitwarden (and manually enter it on each deployment). That should be very easy to get going. The only downside of that is that we introduce a giant encrypted blob with all of our secrets inside of it into source control. That sucks for two reasons:
|
I played with this a bit more and found out a couple of things:
On the Bitwarden side, this is very much possible to do this with |
If you mean the yaml resource, then yes.
Right, it turns into a standard podman volume.
Do you generally not like to start the containers via a .kube file, or do you mean to do this just as an intermediate step to yaml-ify the secrets first, and the containers later?
🤷♂️ that overhead is tiny.
Yes, I don't like this either -- this can't be the primary source of truth, just a transport format. So we still need to keep the secrets someplace else. That's also why I am not a 💯 fan of bitwarden -- there's no history, no commit logs with explanations, etc. (I'm not against it, this is just something which I really like about having them in git).
Yeah, I share the feeling. It's entirely emotional, though -- if someone can break that encryption, they can also break pretty much everything else that holds the internet together. Thanks for your |
For the "monitor" containers, this is fine by me, but I'm trying to imagine how this will interact with Is your idea to If so, then I agree that this would be reasonable. If you want |
Yes, I only wanted the "static" deployments in yaml, at least for now. The job-runner instances are fine with |
podman kube play
can create podman secrests from k8s yaml secrets now. With that, both our OpenShift and systemd deployments can use the same input.While at it, split the input secrets further:
The text was updated successfully, but these errors were encountered: