[wishlist] support for setting securityContext for pods on deployment
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
I wish to deploy an application that includes an ipsec client, using Strongswan, in a sidecar charm.
In order to have that run, I need the container to be a privileged one - this can be achieved using a podspec, e.g.
```
apiVersion: apps/v1
kind: Deployment
metadata:
name: vpn
labels:
app: vpn
spec:
selector:
matchLabels:
app: vpn
replicas: 1
template:
metadata:
labels:
app: vpn
spec:
containers:
- name: ipsec
image: xavpaice/
ports:
- containerPort: 500
name: vpn-isakmp
- containerPort: 4500
name: vpn-ike
```
It would be good to have this definable in the metadata.yaml containers setting, rather than have to work around the limitation e.g. https:/
This seems like a reasonable feature request. For now, the workaround of hitting the K8s API directly is good -- this has been our go-to workaround for missing features in sidecar charms (where you're not producing the pod-spec directly).