Skip to content

Commit

Permalink
Add mock-cve-data pod
Browse files Browse the repository at this point in the history
  • Loading branch information
bmitchinson committed Apr 3, 2023
1 parent 25e398f commit 14743c8
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/azure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export const assignUrbanOSDNSRecords = (
classRef: TerraformStack,
ip: PublicIp
) => {
["Discovery", "Andi", "Data", "Streams"].forEach((domain) => {
["Discovery", "Andi", "Data", "Streams", "Crash"].forEach((domain) => {
new DnsARecord(classRef, `${domain}DomainRecord`, {
name: domain.toLowerCase(),
zoneName: Config.URLWithSuffix,
Expand Down
17 changes: 17 additions & 0 deletions src/helm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,23 @@ export const installElasticsearch = (
...dependsOn,
});

export const installMockCVEData = (
classRef: TerraformStack,
dependsOn: DependsOn
) =>
new Release(classRef, "MockCVEHelmRelease", {
name: "mock-cve-data",
chart: "mock-cve-data",
version: "0.0.3",
repository: "https://urbanos-public.github.io/mock-cve-data",
description:
"Install of MockCVE using values from the Juno terraform repo. Installed with the helm provider.",
namespace: "urbanos",
createNamespace: false,
values: [],
...dependsOn,
});

// + 0.025 per hour per ingress w resulting load balancer (~5 * .025)
// + $.005 per GB transferred to consumers outside of the client
// (aka usage of discovery suite, over standard load balancer)
Expand Down
1 change: 1 addition & 0 deletions src/kubectl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export const installIngresses = (
["discovery_api.yaml", "API"],
["discovery_streams.yaml", "Streams"],
["discovery_ui.yaml", "UI"],
["crash.yaml", "Crash"],
].forEach(([ingress_file, label]) => {
installResource(
classRef,
Expand Down
7 changes: 6 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import {
installIngressNginx,
installMinioOperator,
installMinioTenant,
installMockCVEData,
installPostgresql,
installRedis,
installUrbanOS,
Expand Down Expand Up @@ -104,7 +105,7 @@ class MyStack extends TerraformStack {
dependsOn: [namespace],
});

installUrbanOS(classRef, {
const urbanos = installUrbanOS(classRef, {
dependsOn: [
minioTenant,
postgresql,
Expand All @@ -115,6 +116,10 @@ class MyStack extends TerraformStack {
],
});

installMockCVEData(classRef, {
dependsOn: [urbanos],
});

//////////////////////////////////////////////////////////////////////////
// Outputs
// (tf commands run from cdk.out/juno/stacks, after cdktf synth from root)
Expand Down
24 changes: 24 additions & 0 deletions src/resource_additions/ingresses/crash.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: crash-custom-ingress
namespace: urbanos
annotations:
cert-manager.io/cluster-issuer: letsencrypt
spec:
ingressClassName: nginx
tls:
- hosts:
- crash.demo-urbanos.com
secretName: crash-tls-secret
rules:
- host: crash.demo-urbanos.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: mock-cve-data
port:
number: 80

0 comments on commit 14743c8

Please sign in to comment.