Skip to content

Commit

Permalink
Default redirect on Ingress
Browse files Browse the repository at this point in the history
  • Loading branch information
joyliu-q committed Sep 27, 2023
1 parent 79e4ecc commit 4b2c6fd
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions k8s/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ export class MyChart extends PennLabsChart {

const backendImage = 'pennlabs/penn-courses-backend';
const secret = 'penn-courses';
const ingressProps = {
annotations: {
['ingress.kubernetes.io/content-security-policy']: "frame-ancestors 'none';",
["ingress.kubernetes.io/protocol"]: "https",
["traefik.ingress.kubernetes.io/router.middlewares"]: "default-redirect-http@kubernetescrd"
}
}

new RedisApplication(this, 'redis', { deployment: {
image: 'redis/redis-stack-server',
Expand All @@ -31,13 +38,7 @@ export class MyChart extends PennLabsChart {
replicas: 4,
},
djangoSettingsModule: 'PennCourses.settings.production',
ingressProps: {
annotations: {
['ingress.kubernetes.io/content-security-policy']: "frame-ancestors 'none';",
["ingress.kubernetes.io/protocol"]: "https",
["traefik.ingress.kubernetes.io/router.middlewares"]: "default-redict-http@kubernetescrd"
},
},
ingressProps,
domains: [{ host: 'penncourseplan.com', paths: ["/api", "/admin", "/accounts", "/assets"] },
{ host: 'penncoursealert.com', paths: ["/api", "/admin", "/accounts", "/assets", "/webhook"] },
{ host: 'penncoursereview.com', paths: ["/api", "/admin", "/accounts", "/assets"] }],
Expand All @@ -51,13 +52,7 @@ export class MyChart extends PennLabsChart {
replicas: 1,
},
djangoSettingsModule: 'PennCourses.settings.production',
ingressProps: {
annotations: {
['ingress.kubernetes.io/content-security-policy']: "frame-ancestors 'none';",
["ingress.kubernetes.io/protocol"]: "https",
["traefik.ingress.kubernetes.io/router.middlewares"]: "default-redict-http@kubernetescrd"
},
},
ingressProps,
domains: [{ host: 'penncoursereview.com', paths: ["/api/ws"] }],
});

Expand Down

0 comments on commit 4b2c6fd

Please sign in to comment.