kind: Secret
apiVersion: v1
metadata:
name: nginx-ldap-auth
data:
config.yaml: |
web: 0.0.0.0:5555
servers:
- ldaps://ldap1.example.com:636
- ldaps://ldap2.example.com:636
- ldaps://ldap3.example.com:636
auth:
bindDN: uid=seviceaccount,cn=users,dc=example,dc=com
bindPW: password
user:
baseDN: cn=users,dc=example,dc=com
filter: "(objectClass=person)"
userAttr: uid
requiredGroups:
- appAdmin
group:
baseDN: cn=groups,dc=freeipa,dc=example,dc=com
filter: "(objectClass=group)"
groupAttr: member
timeout:
success: 24h
wrong: 5m
---
kind: Service
spec:
type: ClusterIP
ports:
- name: nginx-ldap-auth
port: 5555
protocol: TCP:
targetPort: 5555
selector:
app: nginx-ldap-auth
kind: Deployment
apiVersion: extensions/v1beta1
labels:
replicas: 1
template:
containers:
- image: docker.io/tpimenta/nginx-ldap-auth:latest
command:
- "nginx-ldap-auth"
- "--config"
- "/etc/nginx-ldap-auth/config.yaml"
- name: http
containerPort: 5555
volumeMounts:
- name: config
mountPath: /etc/nginx-ldap-auth
volumes:
secret:
secretName: nginx-ldap-auth
items:
- key: config.yaml
path: config.yaml