Skip to content
This repository has been archived by the owner on Nov 11, 2021. It is now read-only.

Commit

Permalink
Added openvpn chart
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasK33 committed Feb 23, 2021
1 parent d224d76 commit fa35404
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 17 deletions.
2 changes: 2 additions & 0 deletions devops/kubernetes/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { PrometheusChart } from "./src/charts/prometheus/prometheus";
import { RedisOperatorChart } from "./src/charts/redis-operator/redis-operator";
import { TraefikChart } from "./src/charts/traefik/traefik";
import { VaultChart } from "./src/charts/vault/vault";
import { OpenVpnChart } from "./src/charts/openvpn/openvpn";

const { CLUSTER_SETUP } = process.env;

Expand All @@ -29,6 +30,7 @@ if (CLUSTER_SETUP) {
new RedisOperatorChart(app, "redis");
new TraefikChart(app, "traefik");
new VaultChart(app, "vault");
new OpenVpnChart(app, "openvpn");
}

new Cluster(app, "cluster");
Expand Down
46 changes: 46 additions & 0 deletions devops/kubernetes/src/charts/openvpn/openvpn.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import { Chart, ChartProps } from "cdk8s";
import { Construct } from "constructs";
import { IngressRouteTcp } from "../../../imports/traefik.containo.us";
import { HelmChart } from "../../constructs/helmChart";

export class OpenVpnChart extends Chart {
constructor(scope: Construct, id: string, props?: ChartProps) {
super(scope, id, { ...props, namespace: "openvpn" });

new HelmChart(this, "openvpn", {
chart: "stable/openvpn",
releaseName: "openvpn",
values: {
service: {
type: "ClusterIP",
},
persistence: {
enabled: true,
accessMode: "ReadWriteOnce",
size: "1Gi",
},
},
});

new IngressRouteTcp(this, "ingress", {
metadata: {
name: "openvpn",
},
spec: {
entryPoints: ["vpn"],
routes: [
{
kind: "Rule",
match: "HostSNI(`*`)",
services: [
{
name: "openvpn",
port: 443,
},
],
},
],
},
});
}
}
6 changes: 6 additions & 0 deletions devops/kubernetes/src/charts/traefik/traefik.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ export class TraefikChart extends Chart {
exposedPort: 443,
protocol: "TCP",
},
vpn: {
port: 9443,
expose: true,
exposedPort: 9443,
protocol: "TCP",
},
},
service: {
enabled: true,
Expand Down
1 change: 0 additions & 1 deletion devops/kubernetes/src/fortify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,6 @@ export class Fortify extends Chart {
value: FSM_SENTRY_DSN,
},
{ name: "SENTRY_TRACE_SAMPLE_RATE", value: "0" },
{ name: "STATS_EVENTS_GENERATION_ENABLED", value: "false" },
],
secrets: [vaultSecret],
configmaps: [redisConfig, kafkaConfig, postgresConfig, vaultConfig],
Expand Down
4 changes: 2 additions & 2 deletions services/historization/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion services/historization/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "historization",
"version": "1.12.5",
"version": "1.12.6",
"description": "A historization service responsible for persisting info",
"author": {
"name": "Thomas Kosiewski"
Expand Down
15 changes: 2 additions & 13 deletions services/historization/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,19 +105,8 @@ const {
await heartbeat();
logger.debug("Sent heartbeat");
} catch (e) {
const exceptionID = captureException(e, {
contexts: {
kafka: {
topic,
partition,
},
},
});
logger.error("Failed to send heartbeat to Kafka", {
e,
exceptionID,
});
logger.error(e, { exceptionID });
logger.error("Failed to send heartbeat to Kafka", { e });
logger.error(e);
}
}, parseInt(KAFKA_HEARTBEAET_INTERVAL));

Expand Down

0 comments on commit fa35404

Please sign in to comment.