feat(helm): add TLS/HTTPS support with cert-manager integration
- Add TLS configuration to ingress templates (client & server) - Add tls.enabled and tls.secretName to values.yaml - Include comprehensive cert-manager documentation in INSTALLATION.md - Add example annotations for Let's Encrypt cluster issuer - Support both values.yaml and --set flag configuration methods - Backward compatible (TLS disabled by default) Enables automatic HTTPS certificate provisioning when cert-manager is installed in the cluster with appropriate ClusterIssuer configured.
This commit is contained in:
1 parent
1e3ee23120
commit
dd98757b2a
4 files changed
+95
No files matched your search
@@ -26,6 +26,7 @@ Edit `values.yaml` to update:
|
|||||||
- Old: `persistence.redisSize` → New: `persistence.redis.size`
|
- Old: `persistence.redisSize` → New: `persistence.redis.size`
|
||||||
- Add: `persistence.mongo.storageClass` and `persistence.redis.storageClass` (leave empty for default)
|
- Add: `persistence.mongo.storageClass` and `persistence.redis.storageClass` (leave empty for default)
|
||||||
- Secrets under the `secrets` section (`JWT_SECRET`, email credentials, API keys, etc.) — replace all change_me values
|
- Secrets under the `secrets` section (`JWT_SECRET`, email credentials, API keys, etc.) — replace all change_me values
|
||||||
|
- **For TLS/HTTPS**: Configure ingress TLS settings (see section below)
|
||||||
|
|
||||||
### 3. Deploy the Helm chart
|
### 3. Deploy the Helm chart
|
||||||
```bash
|
```bash
|
||||||
@@ -41,3 +42,71 @@ kubectl get svc
|
|||||||
```
|
```
|
||||||
|
|
||||||
Once all pods are `Running` and `Ready`, you can access Checkmate via the configured ingress hosts.
|
Once all pods are `Running` and `Ready`, you can access Checkmate via the configured ingress hosts.
|
||||||
|
|
||||||
|
## Enabling TLS/HTTPS with cert-manager
|
||||||
|
|
||||||
|
If you have [cert-manager](https://cert-manager.io/) installed in your cluster, you can enable automatic TLS certificate provisioning using Let's Encrypt or other certificate issuers.
|
||||||
|
|
||||||
|
### Prerequisites
|
||||||
|
- cert-manager installed in your cluster
|
||||||
|
- A ClusterIssuer or Issuer configured (e.g., `letsencrypt-prod`)
|
||||||
|
|
||||||
|
### Configuration
|
||||||
|
|
||||||
|
Edit `values.yaml` to enable TLS:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
client:
|
||||||
|
ingress:
|
||||||
|
enabled: true
|
||||||
|
host: checkmate.example.com
|
||||||
|
className: nginx
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||||
|
tls:
|
||||||
|
enabled: true
|
||||||
|
secretName: checkmate-client-tls
|
||||||
|
|
||||||
|
server:
|
||||||
|
ingress:
|
||||||
|
enabled: true
|
||||||
|
host: checkmate.example.com
|
||||||
|
className: nginx
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||||
|
tls:
|
||||||
|
enabled: true
|
||||||
|
secretName: checkmate-server-tls
|
||||||
|
```
|
||||||
|
|
||||||
|
### Alternative: Using --set flags
|
||||||
|
|
||||||
|
You can also enable TLS during installation using Helm's `--set` flags:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
helm install checkmate ./charts/helm/checkmate \
|
||||||
|
--set client.ingress.annotations."cert-manager\.io/cluster-issuer"="letsencrypt-prod" \
|
||||||
|
--set client.ingress.tls.enabled=true \
|
||||||
|
--set client.ingress.tls.secretName=checkmate-client-tls \
|
||||||
|
--set server.ingress.annotations."cert-manager\.io/cluster-issuer"="letsencrypt-prod" \
|
||||||
|
--set server.ingress.tls.enabled=true \
|
||||||
|
--set server.ingress.tls.secretName=checkmate-server-tls
|
||||||
|
```
|
||||||
|
|
||||||
|
### Verification
|
||||||
|
|
||||||
|
After deployment, cert-manager will automatically create the TLS secrets. You can verify the certificate status:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Check certificates
|
||||||
|
kubectl get certificates
|
||||||
|
|
||||||
|
# Check certificate details
|
||||||
|
kubectl describe certificate checkmate-client-tls
|
||||||
|
kubectl describe certificate checkmate-server-tls
|
||||||
|
|
||||||
|
# Verify the secrets were created
|
||||||
|
kubectl get secrets | grep checkmate-tls
|
||||||
|
```
|
||||||
|
|
||||||
|
The ingress will automatically use these secrets to enable HTTPS access to your Checkmate instance.
|
||||||
@@ -11,6 +11,12 @@ metadata:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
ingressClassName: {{ .Values.client.ingress.className }}
|
ingressClassName: {{ .Values.client.ingress.className }}
|
||||||
|
{{- if .Values.client.ingress.tls.enabled }}
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- {{ .Values.client.ingress.host }}
|
||||||
|
secretName: {{ .Values.client.ingress.tls.secretName }}
|
||||||
|
{{- end }}
|
||||||
rules:
|
rules:
|
||||||
- host: {{ .Values.client.ingress.host }}
|
- host: {{ .Values.client.ingress.host }}
|
||||||
http:
|
http:
|
||||||
|
|||||||
@@ -18,6 +18,12 @@ metadata:
|
|||||||
#nginx.ingress.kubernetes.io/cors-allow-credentials: "true"*/}}
|
#nginx.ingress.kubernetes.io/cors-allow-credentials: "true"*/}}
|
||||||
spec:
|
spec:
|
||||||
ingressClassName: {{ .Values.server.ingress.className }}
|
ingressClassName: {{ .Values.server.ingress.className }}
|
||||||
|
{{- if .Values.server.ingress.tls.enabled }}
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- {{ .Values.server.ingress.host }}
|
||||||
|
secretName: {{ .Values.server.ingress.tls.secretName }}
|
||||||
|
{{- end }}
|
||||||
rules:
|
rules:
|
||||||
- host: {{ .Values.server.ingress.host }}
|
- host: {{ .Values.server.ingress.host }}
|
||||||
http:
|
http:
|
||||||
|
|||||||
@@ -7,6 +7,13 @@ client:
|
|||||||
host: change_me
|
host: change_me
|
||||||
className: nginx
|
className: nginx
|
||||||
annotations: {}
|
annotations: {}
|
||||||
|
# Example annotations for cert-manager:
|
||||||
|
# annotations:
|
||||||
|
# cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||||
|
tls:
|
||||||
|
enabled: false
|
||||||
|
secretName: checkmate-client-tls
|
||||||
|
# The secret will be automatically created by cert-manager when using the cert-manager.io/cluster-issuer annotation
|
||||||
|
|
||||||
server:
|
server:
|
||||||
image: ghcr.io/bluewave-labs/checkmate-backend:v3.2.0
|
image: ghcr.io/bluewave-labs/checkmate-backend:v3.2.0
|
||||||
@@ -17,6 +24,13 @@ server:
|
|||||||
host: change_me
|
host: change_me
|
||||||
className: nginx
|
className: nginx
|
||||||
annotations: {}
|
annotations: {}
|
||||||
|
# Example annotations for cert-manager:
|
||||||
|
# annotations:
|
||||||
|
# cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||||
|
tls:
|
||||||
|
enabled: false
|
||||||
|
secretName: checkmate-server-tls
|
||||||
|
# The secret will be automatically created by cert-manager when using the cert-manager.io/cluster-issuer annotation
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|||||||
Reference in new issue
Block a user