apiVersion: v1
kind: ServiceAccount
metadata:
name: traefik-certmanager
namespace: traefik
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
rules:
- apiGroups: ["traefik.containo.us"]
resources: ["ingressroutes"]
verbs: ["watch", "patch"]
- apiGroups: ["traefik.io"]
- apiGroups: ["cert-manager.io"]
resources: ["certificates"]
verbs: ["get", "create", "delete"]
kind: ClusterRoleBinding
subjects:
- kind: ServiceAccount
roleRef:
apiGroup: rbac.authorization.k8s.io
apiVersion: apps/v1
kind: Deployment
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: traefik-certmanager
template:
labels:
serviceAccount: traefik-certmanager
containers:
- name: traefik-certmanager
image: git.ar21.de/yolokube/traefik-certmanager
imagePullPolicy: Always
env:
- name: ISSUER_NAME
value: letsencrypt
- name: ISSUER_KIND
value: ClusterIssuer
- name: CERT_CLEANUP
value: "false"
- name: PATCH_SECRETNAME
value: "true"