Skip to content

Commit 88a88b4

Browse files
committed
add letsencrypt issuer, ingress rule for web, service setup for web, refs #216
1 parent 7cef747 commit 88a88b4

File tree

3 files changed

+87
-16
lines changed

3 files changed

+87
-16
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
apiVersion: cert-manager.io/v1
2+
kind: ClusterIssuer
3+
metadata:
4+
name: letsencrypt-prod-issuer
5+
spec:
6+
acme:
7+
# You must replace this email address with your own.
8+
# Let's Encrypt will use this to contact you about expiring
9+
# certificates, and issues related to your account.
10+
email: {{ .Values.adminEmail }}
11+
# ACME server URL for Let’s Encrypt’s staging environment.
12+
# Specify custom server here (https://acme-staging-v02.api.letsencrypt.org/directory)
13+
# to hit staging LE
14+
server: https://acme-v02.api.letsencrypt.org/directory
15+
privateKeySecretRef:
16+
# Secret resource used to store the account's private key.
17+
name: letsencrypt-issuer-key
18+
# Enable the HTTP-01 challenge provider
19+
# you prove ownership of a domain by ensuring that a particular
20+
# file is present at the domain
21+
solvers:
22+
- http01:
23+
ingress:
24+
class: nginx
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{{- if .Values.web.enabled }}
2+
apiVersion: networking.k8s.io/v1
3+
kind: Ingress
4+
metadata:
5+
name: {{ template "osm-seed.fullname" . }}-ingress-web
6+
annotations:
7+
kubernetes.io/ingress.class: nginx
8+
cert-manager.io/cluster-issuer: letsencrypt-prod-issuer
9+
spec:
10+
tls:
11+
- hosts:
12+
- web.{{ .Values.domain }}
13+
secretName: {{ template "osm-seed.fullname" . }}-secret-web
14+
15+
rules:
16+
- host: web.{{ .Values.domain }}
17+
http:
18+
paths:
19+
- path: /
20+
pathType: Prefix
21+
backend:
22+
service:
23+
name: {{ template "osm-seed.fullname" . }}-web
24+
port:
25+
number: 80
26+
{{- end }}

osm-seed/values.yaml

Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,25 +36,46 @@ AWS_SSL_ARN: false
3636
# ====================================================================================================
3737
# Ingress variables
3838
# ====================================================================================================
39-
ingress:
40-
enabled: false
41-
annotations: {}
42-
# kubernetes.io/ingress.class: nginx
43-
# kubernetes.io/tls-acme: "true"
44-
path: /
45-
hosts:
46-
- chart-example.local
47-
tls: []
39+
# ingress:
40+
# enabled: false
41+
# annotations: {}
42+
# # kubernetes.io/ingress.class: nginx
43+
# # kubernetes.io/tls-acme: "true"
44+
# path: /
45+
# hosts:
46+
# - chart-example.local
47+
# tls: []
48+
49+
# # ====================================================================================================
50+
# # Domain app configuration
51+
# # ====================================================================================================
52+
# domain:
53+
# #enabled, If you set enabled=true, you should uncomment the following configurations
54+
# enabled: false
55+
# # domainName, Add here your domain or the fixed IP where the server is running
56+
# domainName: example.com
57+
# protocolo: http
58+
59+
# Domain that is pointed to the clusterIP
60+
# You will need to create an A record like *.osmseed.example.com pointed to the ClusterIP
61+
# Then, the cluster configuration will setup services at their respective subdomains:
62+
# - web.osmseed.example.com
63+
# - overpass.osmseed.example.com
64+
# - nominatim.osmseed.example.com
65+
# - etc.
66+
domain: osmseed.example.com
4867

4968
# ====================================================================================================
50-
# Domain app configuration
69+
# Configuration for Lets Encrypt setup
5170
# ====================================================================================================
52-
domain:
53-
#enabled, If you set enabled=true, you should uncomment the following configurations
54-
enabled: false
55-
# domainName, Add here your domain or the fixed IP where the server is running
56-
domainName: example.com
57-
protocolo: http
71+
72+
# Admin Email address used when generating Lets Encrypt certificates.
73+
# You will be notified of expirations, etc. on this email address.
74+
adminEmail: [email protected]
75+
76+
# Sets the installCRDs to true for the lets-encrypt subchart.
77+
lets-encrypt:
78+
installCRDs: true
5879

5980
# ====================================================================================================
6081
# ====================================================================================================

0 commit comments

Comments
 (0)