Skip to content

Commit c06e01c

Browse files
committed
Certificate Issuer CRD
1 parent 1cdd435 commit c06e01c

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

.github/workflows/go.yml

+3
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ jobs:
5050
- name: Update deployment file
5151
run: TAG=$(echo $GITHUB_SHA | head -c7) && sed -i 's|<IMAGE>|${{ secrets.REGISTRY_NAME }}/golang-web:'${TAG}'|' $GITHUB_WORKSPACE/deployment.yml
5252

53+
- name: Update certificate email in issuer CRD
54+
run: sed -i 's|<CERTIFICATE_EMAIL>|${{ secrets.CERTIFICATE_EMAIL }}|' $GITHUB_WORKSPACE/deployment.yml
55+
5356
- name: Save DigitalOcean kubeconfig with short-lived credentials
5457
run: doctl kubernetes cluster kubeconfig save --expiry-seconds 600 ${{ secrets.CLUSTER_NAME }}
5558

deployment.yml

+21
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,27 @@ metadata:
44
name: golang
55
---
66
---
7+
apiVersion: cert-manager.io/v1
8+
kind: Issuer
9+
metadata:
10+
name: letsencrypt-nginx
11+
namespace: golang
12+
spec:
13+
# ACME issuer configuration
14+
# `email` - the email address to be associated with the ACME account (make sure it's a valid one)
15+
# `server` - the URL used to access the ACME server’s directory endpoint
16+
# `privateKeySecretRef` - Kubernetes Secret to store the automatically generated ACME account private key
17+
acme:
18+
email: <CERTIFICATE_EMAIL>
19+
server: https://acme-v02.api.letsencrypt.org/directory
20+
privateKeySecretRef:
21+
name: letsencrypt-nginx-private-key
22+
solvers:
23+
# Use the HTTP-01 challenge provider
24+
- http01:
25+
ingress:
26+
class: nginx
27+
---
728
---
829
apiVersion: apps/v1
930
kind: Deployment

0 commit comments

Comments
 (0)