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

CDPT-1247 Add temp ingress and add some ewwio config. #722

Merged
merged 2 commits into from
Oct 4, 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
7 changes: 7 additions & 0 deletions config/application.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,13 @@
// ACF License Key
Config::define('ACF_PRO_LICENSE', env('ACF_PRO_LICENSE'));

// Set to true to turn off automatic optimization of your images.
// i.e. during migration, when using WP Offload Media - Metadata Tool.
Config::define('EWWW_IMAGE_OPTIMIZER_NOAUTO', env('EWWW_IMAGE_OPTIMIZER_NOAUTO'));

// Enable "agency" mode, which hides all external links and support resources.
Config::define('EWWWIO_WHITELABEL', true);

/**
* Debugging Settings
*/
Expand Down
2 changes: 2 additions & 0 deletions deploy/production/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ data:
# The following IDs are not private, they form part of the publicly visible oauth login url.
OAUTH_CLIENT_ID: "f508fd07-8504-47ed-a7d1-aa55fd2163d1"
OAUTH_TENANT_ID: "c6874728-71e6-41fe-a9e1-2e8c36776ad8"
WP_REDIS_DISABLED: "true"
EWWW_IMAGE_OPTIMIZER_NOAUTO: "true"
41 changes: 40 additions & 1 deletion deploy/production/ingress.tpl.yml
Original file line number Diff line number Diff line change
@@ -1 +1,40 @@
# Intentionally empty file.
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: intranet-production-ingress
namespace: intranet-production
annotations:
external-dns.alpha.kubernetes.io/set-identifier: intranet-production-ingress-intranet-production-green
external-dns.alpha.kubernetes.io/aws-weight: "100"
nginx.ingress.kubernetes.io/auth-type: basic
nginx.ingress.kubernetes.io/auth-secret: basic-auth-secret
nginx.ingress.kubernetes.io/auth-realm: 'Production Access | Authentication Required'
# Set vhost so that WP doesn't see prod-intranet.apps... and redirect.
nginx.ingress.kubernetes.io/upstream-vhost: intranet.justice.gov.uk
nginx.ingress.kubernetes.io/server-snippet: |
location = /health {
auth_basic off;
access_log off;
default_type text/plain;
add_header Content-Type text/plain;
return 200 "OK";
}
location = /.well-known/security.txt {
auth_basic off;
return 301 https://raw.githubusercontent.com/ministryofjustice/security-guidance/main/contact/vulnerability-disclosure-security.txt;
}
spec:
tls:
- hosts:
- prod-intranet.apps.live.cloud-platform.service.justice.gov.uk
rules:
- host: prod-intranet.apps.live.cloud-platform.service.justice.gov.uk
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: nginx-service
port:
number: 8080
Loading