Skip to content

Commit af5ab47

Browse files
Remove hard-coded cert-manager configuration and improve TLS docs (#227)
* Refactor ingress configuration to remove cert-manager settings and add TLS setup instructions in documentation * Update CHANGELOG.md for v0.7.1 release notes, including breaking changes and TLS configuration updates * Add documentation files in templates to .helmignore * Fix .helmignore to correctly ignore documentation files in templates
1 parent 3eff22e commit af5ab47

File tree

5 files changed

+83
-9
lines changed

5 files changed

+83
-9
lines changed

CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [v0.7.1] - Unreleased
9+
10+
### Breaking Changes
11+
- Remove hard-coded cert-manager configuration from ingress template [#227](https://github.com/developmentseed/eoapi-k8s/pull/227)
12+
13+
### Changed
14+
- Simplify TLS configuration to allow user-controlled certificate management [#227](https://github.com/developmentseed/eoapi-k8s/pull/227)
15+
- Update documentation with comprehensive cert-manager setup guide [#227](https://github.com/developmentseed/eoapi-k8s/pull/227)
16+
817
## [v0.7.0] - 2025-04-30
918

1019
### Breaking Changes

docs/unified-ingress.md

+71-3
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ ingress:
3434
tls:
3535
enabled: false
3636
secretName: eoapi-tls
37-
certManager: false
38-
certManagerIssuer: letsencrypt-prod
39-
certManagerEmail: ""
4037
```
4138
4239
## Controller-Specific Configurations
@@ -89,6 +86,77 @@ ingress:
8986
secretName: eoapi-tls
9087
```
9188

89+
## Setting up TLS with cert-manager
90+
91+
[cert-manager](https://cert-manager.io) can be used to automatically obtain and manage TLS certificates. Here's how to set it up with Let's Encrypt:
92+
93+
1. First, install cert-manager in your cluster:
94+
```bash
95+
helm repo add jetstack https://charts.jetstack.io
96+
helm repo update
97+
helm install \
98+
cert-manager jetstack/cert-manager \
99+
--namespace cert-manager \
100+
--create-namespace \
101+
--set installCRDs=true
102+
```
103+
104+
2. Create a ClusterIssuer for Let's Encrypt (staging first for testing):
105+
```yaml
106+
apiVersion: cert-manager.io/v1
107+
kind: ClusterIssuer
108+
metadata:
109+
name: letsencrypt-staging
110+
spec:
111+
acme:
112+
# Use Let's Encrypt staging environment first
113+
server: https://acme-staging-v02.api.letsencrypt.org/directory
114+
email: your-email@example.com
115+
privateKeySecretRef:
116+
name: letsencrypt-staging
117+
solvers:
118+
- http01:
119+
ingress:
120+
class: nginx # or traefik, depending on your setup
121+
```
122+
123+
3. After testing with staging, create the production issuer:
124+
```yaml
125+
apiVersion: cert-manager.io/v1
126+
kind: ClusterIssuer
127+
metadata:
128+
name: letsencrypt-prod
129+
spec:
130+
acme:
131+
server: https://acme-v02.api.letsencrypt.org/directory
132+
email: your-email@example.com
133+
privateKeySecretRef:
134+
name: letsencrypt-prod
135+
solvers:
136+
- http01:
137+
ingress:
138+
class: nginx # or traefik, depending on your setup
139+
```
140+
141+
4. Configure your eoAPI ingress to use cert-manager:
142+
```yaml
143+
ingress:
144+
enabled: true
145+
className: "nginx" # or "traefik"
146+
host: "eoapi.example.com"
147+
annotations:
148+
# Add cert-manager annotations
149+
cert-manager.io/cluster-issuer: "letsencrypt-prod"
150+
tls:
151+
enabled: true
152+
secretName: eoapi-tls # cert-manager will create this secret
153+
```
154+
155+
The certificate will be automatically obtained and renewed by cert-manager. The process typically takes a few minutes. You can check the certificate status with:
156+
```bash
157+
kubectl get certificate
158+
```
159+
92160
## Migration
93161

94162
If you're migrating from a version 0.6.0 or earlier, follow these guidelines:

helm-chart/eoapi/.helmignore

+3
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@
2222
*.tmproj
2323
.vscode/
2424
tests/
25+
26+
# Documentation files in templates
27+
templates/*/*.md

helm-chart/eoapi/templates/services/ingress.yaml

-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ metadata:
2020
traefik.ingress.kubernetes.io/router.entrypoints: web
2121
traefik.ingress.kubernetes.io/router.middlewares: {{ $.Release.Namespace }}-strip-prefix-middleware-{{ $.Release.Name }}@kubernetescrd
2222
{{- end }}
23-
{{- if and .Values.ingress.tls.enabled .Values.ingress.tls.certManager .Values.ingress.tls.certManagerIssuer }}
24-
cert-manager.io/issuer: {{ .Values.ingress.tls.certManagerIssuer }}
25-
{{- end }}
2623
spec:
2724
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
2825
ingressClassName: {{ .Values.ingress.className }}

helm-chart/eoapi/values.yaml

-3
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ ingress:
5555
tls:
5656
enabled: false
5757
secretName: eoapi-tls
58-
certManager: false
59-
certManagerIssuer: letsencrypt-prod
60-
certManagerEmail: ""
6158

6259
######################
6360
# DATABASE

0 commit comments

Comments
 (0)