# Create a self-signed issuer for development
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
  name: selfsigned-issuer
  namespace: system
spec:
  selfSigned: {}
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
  name: serving-cert
  namespace: system
spec:
  secretName: devworkspace-operator-webhook-cert
  dnsNames:
  # Note: service name is hard-coded in pkg/webhook/server/server.go
  - devworkspace-webhookserver.$(OPERATOR_NAMESPACE).svc
  - devworkspace-webhookserver.$(OPERATOR_NAMESPACE).svc.cluster.local
  - devworkspace-controller-manager-service.$(OPERATOR_NAMESPACE).svc
  - devworkspace-controller-manager-service.$(OPERATOR_NAMESPACE).svc.cluster.local
  issuerRef:
    kind: Issuer
    name: selfsigned-issuer
