Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TLS for all endpoints in local-setup #300

Merged
merged 1 commit into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 38 additions & 2 deletions config/local-setup/workloads/apicast.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: apicast-staging-wildcard-cert
spec:
dnsNames: ["*.REPLACE"]
issuerRef:
kind: ClusterIssuer
name: selfsigned-cluster-issuer
secretName: apicast-staging-wildcard-cert

---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: apicast-production-wildcard-cert
spec:
dnsNames: ["*.REPLACE"]
issuerRef:
kind: ClusterIssuer
name: selfsigned-cluster-issuer
secretName: apicast-production-wildcard-cert

---
apiVersion: saas.3scale.net/v1alpha1
kind: Apicast
metadata:
Expand All @@ -12,7 +36,7 @@ spec:
config:
configurationCache: 300
threescalePortalEndpoint: "http://mapping-service/config"
endpoint: {dns: ['*.REPLACE']}
endpoint: {dns: ["*.REPLACE"]}
hpa: {}
loadBalancer:
proxyProtocol: false
Expand All @@ -27,6 +51,12 @@ spec:
proxyProtocol: false
port: 38080
routeConfigName: router
https:
listenerHttp:
proxyProtocol: false
certificateSecretName: apicast-production-wildcard-cert
port: 38443
routeConfigName: router
router:
routeConfiguration:
virtualHosts:
Expand Down Expand Up @@ -62,7 +92,7 @@ spec:
config:
configurationCache: 60
threescalePortalEndpoint: "http://mapping-service/config"
endpoint: {dns: ['*.REPLACE']}
endpoint: {dns: ["*.REPLACE"]}
hpa: {}
loadBalancer:
proxyProtocol: false
Expand All @@ -77,6 +107,12 @@ spec:
proxyProtocol: false
port: 38080
routeConfigName: router
https:
listenerHttp:
proxyProtocol: false
certificateSecretName: apicast-staging-wildcard-cert
port: 38443
routeConfigName: router
mgmt_cluster:
cluster:
host: 127.0.0.1
Expand Down
17 changes: 17 additions & 0 deletions config/local-setup/workloads/backend.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: backend-cert
spec:
dnsNames: ["REPLACE"]
issuerRef:
kind: ClusterIssuer
name: selfsigned-cluster-issuer
secretName: backend-cert

---
apiVersion: saas.3scale.net/v1alpha1
kind: Backend
Expand Down Expand Up @@ -42,6 +53,12 @@ spec:
port: 38081
proxyProtocol: false
routeConfigName: router_internal
https:
listenerHttp:
proxyProtocol: false
certificateSecretName: backend-cert
port: 38443
routeConfigName: router_external
router_external:
routeConfiguration:
virtualHosts:
Expand Down
18 changes: 18 additions & 0 deletions config/local-setup/workloads/echoapi.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: echoapi-cert
spec:
dnsNames: ["REPLACE"]
issuerRef:
kind: ClusterIssuer
name: selfsigned-cluster-issuer
secretName: echoapi-cert

---
apiVersion: saas.3scale.net/v1alpha1
kind: EchoAPI
metadata:
Expand Down Expand Up @@ -33,6 +45,12 @@ spec:
proxyProtocol: false
port: 38080
routeConfigName: echo_api_route
https:
listenerHttp:
proxyProtocol: false
certificateSecretName: echoapi-cert
port: 38443
routeConfigName: echo_api_route
envoyImage: REPLACE
nodeID: echo-api
ports:
Expand Down
26 changes: 26 additions & 0 deletions config/local-setup/workloads/replacements/domains.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@
kind: System
fieldPaths:
- spec.config.apicast.stagingDomain
- select:
kind: Certificate
name: apicast-staging-wildcard-cert
fieldPaths:
- spec.dnsNames.0
options:
delimiter: "."
index: 1
- source:
kind: ConfigMap
name: config
Expand All @@ -31,6 +39,14 @@
kind: System
fieldPaths:
- spec.config.apicast.productionDomain
- select:
kind: Certificate
name: apicast-production-wildcard-cert
fieldPaths:
- spec.dnsNames.0
options:
delimiter: "."
index: 1

# CONFIGURE AUTOSSL ENDPOINT
- source:
Expand Down Expand Up @@ -66,6 +82,11 @@
kind: EchoAPI
fieldPaths:
- spec.endpoint.dns.0
- select:
kind: Certificate
name: echoapi-cert
fieldPaths:
- spec.dnsNames.0

# CONFIGURE BACKEND ENDPOINT
- source:
Expand All @@ -84,6 +105,11 @@
options:
delimiter: "/"
index: 2
- select:
kind: Certificate
name: backend-cert
fieldPaths:
- spec.dnsNames.0

# CONFIGURE SYSTEM ENDPOINT
- source:
Expand Down