Skip to content

Instantly share code, notes, and snippets.

@didil
Created October 5, 2020 16:33
Show Gist options
  • Save didil/8622a38cd440244b41f6277f3f25092e to your computer and use it in GitHub Desktop.
Save didil/8622a38cd440244b41f6277f3f25092e to your computer and use it in GitHub Desktop.
Webhook Certificate Setup Job
apiVersion: batch/v1
kind: Job
metadata:
name: webhook-cert-setup
spec:
template:
spec:
serviceAccountName: webhook-cert-sa
containers:
- name: webhook-cert-setup
# This is a minimal kubectl image based on Alpine Linux that signs certificates using the k8s extension api server
image: quay.io/didil/k8s-webhook-cert-manager:0.13.19-1-a
command: ["./generate_certificate.sh"]
args:
- "--service"
- "hello-webhook-service"
- "--webhook"
- "hello-webhook.leclouddev.com"
- "--secret"
- "hello-tls-secret"
- "--namespace"
- "default"
restartPolicy: OnFailure
backoffLimit: 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment