---
apiVersion: v1
kind: Service
metadata:
  name: kanidm
  namespace: kanidm
  labels:
    app.kubernetes.io/name: kanidm
    app.kubernetes.io/instance: kanidm
spec:
  type: ClusterIP
  sessionAffinity: ClientIP
  sessionAffinityConfig:
    clientIP:
      timeoutSeconds: 10800
  ports:
    - name: https
      port: 8443
      targetPort: https
      protocol: TCP
  selector:
    app.kubernetes.io/name: kanidm
    app.kubernetes.io/instance: kanidm
---
apiVersion: v1
kind: Service
metadata:
  name: kanidm-headless
  namespace: kanidm
  labels:
    app.kubernetes.io/name: kanidm
    app.kubernetes.io/instance: kanidm
spec:
  type: ClusterIP
  clusterIP: None
  ports:
    - name: https
      port: 8443
      targetPort: https
      protocol: TCP
  selector:
    app.kubernetes.io/name: kanidm
    app.kubernetes.io/instance: kanidm
