Skip to content

Commit 86f35e1

Browse files
committed
This gets everything ready for DNS redirection of the apex and www domains. Note, redirect cloudflare in proxy mode using the [email protected] login to get to the domains. Encryption is set to full mode and the cert issued is a cluster managed cert instead of a letsencrypt cert. This allows cloudflare to manage the public cert. Closes: #3
1 parent 758fc6f commit 86f35e1

9 files changed

+80
-13
lines changed

k8s/certificate-prd.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# NOTE: Cloudflare is in front so we use a cluster certificate.
2+
---
3+
apiVersion: cert-manager.io/v1
4+
kind: Certificate
5+
metadata:
6+
name: openinfrastructure-co-cert
7+
namespace: istio-ingress
8+
spec:
9+
secretName: openinfrastructure-co-cert
10+
issuerRef:
11+
name: cluster-issuer
12+
kind: ClusterIssuer
13+
commonName: openinfrastructure.co
14+
dnsNames:
15+
- openinfrastructure.co
16+
- www.openinfrastructure.co

k8s/certificate-stg.yaml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
apiVersion: cert-manager.io/v1
3+
kind: Certificate
4+
metadata:
5+
name: ois-run-cert
6+
namespace: istio-ingress
7+
spec:
8+
secretName: ois-run-cert
9+
issuerRef:
10+
name: letsencrypt
11+
kind: ClusterIssuer
12+
commonName: ois.run
13+
dnsNames:
14+
- ois.run
15+

k8s/deployment.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ apiVersion: apps/v1
33
kind: Deployment
44
metadata:
55
name: website
6+
namespace: website
67
labels:
78
app: website
89
spec:

k8s/gateway-prd.yaml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
apiVersion: networking.istio.io/v1alpha3
3+
kind: Gateway
4+
metadata:
5+
name: openinfrastructure-co-gw
6+
namespace: istio-ingress
7+
spec:
8+
selector:
9+
istio: ingressgateway
10+
servers:
11+
- port:
12+
number: 443
13+
name: http
14+
protocol: HTTPS
15+
tls:
16+
mode: SIMPLE
17+
credentialName: openinfrastructure-co-cert
18+
hosts:
19+
- openinfrastructure.co
20+
- www.openinfrastructure.co

k8s/gateway.yaml renamed to k8s/gateway-stg.yaml

-13
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,3 @@
1-
apiVersion: cert-manager.io/v1
2-
kind: Certificate
3-
metadata:
4-
name: ois-run-cert
5-
namespace: istio-ingress
6-
spec:
7-
secretName: ois-run-cert
8-
issuerRef:
9-
name: letsencrypt
10-
kind: ClusterIssuer
11-
commonName: ois.run
12-
dnsNames:
13-
- ois.run
141
---
152
apiVersion: networking.istio.io/v1alpha3
163
kind: Gateway

k8s/kustomization.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
resources:
2+
- namespace.yaml
3+
- deployment.yaml
4+
- service.yaml
5+
- certificate-prd.yaml
6+
- certificate-stg.yaml
7+
- gateway-prd.yaml
8+
- gateway-stg.yaml
9+
- virtual-service-prd.yaml
10+
- virtual-service-stg.yaml

k8s/service.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ apiVersion: v1
33
kind: Service
44
metadata:
55
name: website
6+
namespace: website
67
spec:
78
selector:
89
app: website

k8s/virtual-service-prd.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
apiVersion: networking.istio.io/v1alpha3
3+
kind: VirtualService
4+
metadata:
5+
name: openinfrastructure-co-vs
6+
namespace: website
7+
spec:
8+
hosts:
9+
- openinfrastructure.co
10+
- www.openinfrastructure.co
11+
gateways:
12+
- istio-ingress/openinfrastructure-co-gw
13+
http:
14+
- route:
15+
- destination:
16+
host: website

k8s/virtual-service.yaml renamed to k8s/virtual-service-stg.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ apiVersion: networking.istio.io/v1alpha3
33
kind: VirtualService
44
metadata:
55
name: ois-run-vs
6+
namespace: website
67
spec:
78
hosts:
89
- ois.run

0 commit comments

Comments
 (0)