Skip to content

Instantly share code, notes, and snippets.

@BlaineEXE
Created July 27, 2022 19:08
Show Gist options
  • Save BlaineEXE/6c8d4458b224bb94bcd7773bf8a8c0f5 to your computer and use it in GitHub Desktop.
Save BlaineEXE/6c8d4458b224bb94bcd7773bf8a8c0f5 to your computer and use it in GitHub Desktop.
Test pod for Rook NFS-SSSD prototype
# This pod is configured to get user information from SSSD
# Mount an NFS export to the pod as the root user, and set permissions as desired
# Use `su $user` to switch to other users (like 'maintainer') for testing export controls
apiVersion: apps/v1
kind: Deployment
metadata:
name: nfs-test-pod
namespace: rook-ceph # namespace:cluster
labels:
app: nfs-test-pod
spec:
replicas: 1
selector:
matchLabels:
app: nfs-test-pod
template:
metadata:
labels:
app: nfs-test-pod
spec:
dnsPolicy: ClusterFirstWithHostNet
containers:
- name: nfs-test-pod
image: quay.io/brgardne/sssd:latest
command:
- bash
- -c
- |
set -ex
# install nfs client
yum install -y nfs-utils
# start sssd process in background
sssd --daemon --logger=files
# keep the pod running so we can exec into it for testing
sleep infinity
imagePullPolicy: IfNotPresent
tty: true
securityContext:
privileged: true
resources: {}
volumeMounts:
- mountPath: /etc/sssd/conf.d
name: sssd-config
volumes:
- name: sssd-config
configMap:
name: sssd-config
defaultMode: 0600 # required
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment