@ydkn/pulumi-components 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +31 -0
- package/index.d.ts.map +1 -0
- package/index.js +62 -0
- package/index.js.map +1 -0
- package/lib/avahi/deployment.d.ts +36 -0
- package/lib/avahi/deployment.d.ts.map +1 -0
- package/lib/avahi/deployment.js +164 -0
- package/lib/avahi/deployment.js.map +1 -0
- package/lib/avahi/index.d.ts +4 -0
- package/lib/avahi/index.d.ts.map +1 -0
- package/lib/avahi/index.js +8 -0
- package/lib/avahi/index.js.map +1 -0
- package/lib/avahi/service.d.ts +51 -0
- package/lib/avahi/service.d.ts.map +1 -0
- package/lib/avahi/service.js +57 -0
- package/lib/avahi/service.js.map +1 -0
- package/lib/aws/accessKey.d.ts +22 -0
- package/lib/aws/accessKey.d.ts.map +1 -0
- package/lib/aws/accessKey.js +27 -0
- package/lib/aws/accessKey.js.map +1 -0
- package/lib/aws/bucket.d.ts +28 -0
- package/lib/aws/bucket.d.ts.map +1 -0
- package/lib/aws/bucket.js +49 -0
- package/lib/aws/bucket.js.map +1 -0
- package/lib/aws/index.d.ts +4 -0
- package/lib/aws/index.d.ts.map +1 -0
- package/lib/aws/index.js +8 -0
- package/lib/aws/index.js.map +1 -0
- package/lib/blocky/deployment.d.ts +39 -0
- package/lib/blocky/deployment.d.ts.map +1 -0
- package/lib/blocky/deployment.js +97 -0
- package/lib/blocky/deployment.js.map +1 -0
- package/lib/blocky/index.d.ts +3 -0
- package/lib/blocky/index.d.ts.map +1 -0
- package/lib/blocky/index.js +6 -0
- package/lib/blocky/index.js.map +1 -0
- package/lib/certManager/certificate.d.ts +126 -0
- package/lib/certManager/certificate.d.ts.map +1 -0
- package/lib/certManager/certificate.js +42 -0
- package/lib/certManager/certificate.js.map +1 -0
- package/lib/certManager/index.d.ts +5 -0
- package/lib/certManager/index.d.ts.map +1 -0
- package/lib/certManager/index.js +11 -0
- package/lib/certManager/index.js.map +1 -0
- package/lib/certManager/issuer.d.ts +109 -0
- package/lib/certManager/issuer.d.ts.map +1 -0
- package/lib/certManager/issuer.js +39 -0
- package/lib/certManager/issuer.js.map +1 -0
- package/lib/certManager/operator.d.ts +43 -0
- package/lib/certManager/operator.d.ts.map +1 -0
- package/lib/certManager/operator.js +177 -0
- package/lib/certManager/operator.js.map +1 -0
- package/lib/common/componentResource.d.ts +20 -0
- package/lib/common/componentResource.d.ts.map +1 -0
- package/lib/common/componentResource.js +62 -0
- package/lib/common/componentResource.js.map +1 -0
- package/lib/common/index.d.ts +4 -0
- package/lib/common/index.d.ts.map +1 -0
- package/lib/common/index.js +6 -0
- package/lib/common/index.js.map +1 -0
- package/lib/common/types.d.ts +3 -0
- package/lib/common/types.d.ts.map +1 -0
- package/lib/common/types.js +3 -0
- package/lib/common/types.js.map +1 -0
- package/lib/externalDns/dnsEndpoint.d.ts +66 -0
- package/lib/externalDns/dnsEndpoint.d.ts.map +1 -0
- package/lib/externalDns/dnsEndpoint.js +17 -0
- package/lib/externalDns/dnsEndpoint.js.map +1 -0
- package/lib/externalDns/index.d.ts +4 -0
- package/lib/externalDns/index.d.ts.map +1 -0
- package/lib/externalDns/index.js +8 -0
- package/lib/externalDns/index.js.map +1 -0
- package/lib/externalDns/operator.d.ts +45 -0
- package/lib/externalDns/operator.d.ts.map +1 -0
- package/lib/externalDns/operator.js +112 -0
- package/lib/externalDns/operator.js.map +1 -0
- package/lib/fcos/assets/rpm-opstree-install.sh +26 -0
- package/lib/fcos/assets/rpm-ostree-install.service +13 -0
- package/lib/fcos/config.d.ts +156 -0
- package/lib/fcos/config.d.ts.map +1 -0
- package/lib/fcos/config.js +168 -0
- package/lib/fcos/config.js.map +1 -0
- package/lib/fcos/host.d.ts +34 -0
- package/lib/fcos/host.d.ts.map +1 -0
- package/lib/fcos/host.js +57 -0
- package/lib/fcos/host.js.map +1 -0
- package/lib/fcos/index.d.ts +4 -0
- package/lib/fcos/index.d.ts.map +1 -0
- package/lib/fcos/index.js +8 -0
- package/lib/fcos/index.js.map +1 -0
- package/lib/freeradius/assets/clients.conf.tmpl +23 -0
- package/lib/freeradius/assets/default.tmpl +116 -0
- package/lib/freeradius/assets/eap.tmpl +66 -0
- package/lib/freeradius/assets/inner-tunnel.tmpl +74 -0
- package/lib/freeradius/assets/ldap.tmpl +48 -0
- package/lib/freeradius/assets/proxy.conf.tmpl +43 -0
- package/lib/freeradius/deployment.d.ts +74 -0
- package/lib/freeradius/deployment.d.ts.map +1 -0
- package/lib/freeradius/deployment.js +216 -0
- package/lib/freeradius/deployment.js.map +1 -0
- package/lib/freeradius/index.d.ts +3 -0
- package/lib/freeradius/index.d.ts.map +1 -0
- package/lib/freeradius/index.js +6 -0
- package/lib/freeradius/index.js.map +1 -0
- package/lib/gitlab/index.d.ts +4 -0
- package/lib/gitlab/index.d.ts.map +1 -0
- package/lib/gitlab/index.js +10 -0
- package/lib/gitlab/index.js.map +1 -0
- package/lib/gitlab/renovate.d.ts +38 -0
- package/lib/gitlab/renovate.d.ts.map +1 -0
- package/lib/gitlab/renovate.js +77 -0
- package/lib/gitlab/renovate.js.map +1 -0
- package/lib/gitlab/runners/cleanup.d.ts +29 -0
- package/lib/gitlab/runners/cleanup.d.ts.map +1 -0
- package/lib/gitlab/runners/cleanup.js +86 -0
- package/lib/gitlab/runners/cleanup.js.map +1 -0
- package/lib/gitlab/runners/index.d.ts +5 -0
- package/lib/gitlab/runners/index.d.ts.map +1 -0
- package/lib/gitlab/runners/index.js +10 -0
- package/lib/gitlab/runners/index.js.map +1 -0
- package/lib/gitlab/runners/runner.d.ts +63 -0
- package/lib/gitlab/runners/runner.d.ts.map +1 -0
- package/lib/gitlab/runners/runner.js +89 -0
- package/lib/gitlab/runners/runner.js.map +1 -0
- package/lib/gitlab/runners/runners.d.ts +27 -0
- package/lib/gitlab/runners/runners.d.ts.map +1 -0
- package/lib/gitlab/runners/runners.js +36 -0
- package/lib/gitlab/runners/runners.js.map +1 -0
- package/lib/grafana/agent.d.ts +41 -0
- package/lib/grafana/agent.d.ts.map +1 -0
- package/lib/grafana/agent.js +379 -0
- package/lib/grafana/agent.js.map +1 -0
- package/lib/grafana/index.d.ts +3 -0
- package/lib/grafana/index.d.ts.map +1 -0
- package/lib/grafana/index.js +6 -0
- package/lib/grafana/index.js.map +1 -0
- package/lib/hcloud/assets/fcos-install.sh +30 -0
- package/lib/hcloud/cluster.d.ts +96 -0
- package/lib/hcloud/cluster.d.ts.map +1 -0
- package/lib/hcloud/cluster.js +323 -0
- package/lib/hcloud/cluster.js.map +1 -0
- package/lib/hcloud/index.d.ts +5 -0
- package/lib/hcloud/index.d.ts.map +1 -0
- package/lib/hcloud/index.js +10 -0
- package/lib/hcloud/index.js.map +1 -0
- package/lib/hcloud/kubernetes.d.ts +39 -0
- package/lib/hcloud/kubernetes.d.ts.map +1 -0
- package/lib/hcloud/kubernetes.js +188 -0
- package/lib/hcloud/kubernetes.js.map +1 -0
- package/lib/hcloud/wireguard.d.ts +33 -0
- package/lib/hcloud/wireguard.d.ts.map +1 -0
- package/lib/hcloud/wireguard.js +103 -0
- package/lib/hcloud/wireguard.js.map +1 -0
- package/lib/k0s/cluster.d.ts +51 -0
- package/lib/k0s/cluster.d.ts.map +1 -0
- package/lib/k0s/cluster.js +183 -0
- package/lib/k0s/cluster.js.map +1 -0
- package/lib/k0s/index.d.ts +3 -0
- package/lib/k0s/index.d.ts.map +1 -0
- package/lib/k0s/index.js +6 -0
- package/lib/k0s/index.js.map +1 -0
- package/lib/kubernetes/helm/index.d.ts +3 -0
- package/lib/kubernetes/helm/index.d.ts.map +1 -0
- package/lib/kubernetes/helm/index.js +6 -0
- package/lib/kubernetes/helm/index.js.map +1 -0
- package/lib/kubernetes/helm/v3/chart.d.ts +37 -0
- package/lib/kubernetes/helm/v3/chart.d.ts.map +1 -0
- package/lib/kubernetes/helm/v3/chart.js +46 -0
- package/lib/kubernetes/helm/v3/chart.js.map +1 -0
- package/lib/kubernetes/helm/v3/helpers.d.ts +3 -0
- package/lib/kubernetes/helm/v3/helpers.d.ts.map +1 -0
- package/lib/kubernetes/helm/v3/helpers.js +29 -0
- package/lib/kubernetes/helm/v3/helpers.js.map +1 -0
- package/lib/kubernetes/helm/v3/index.d.ts +5 -0
- package/lib/kubernetes/helm/v3/index.d.ts.map +1 -0
- package/lib/kubernetes/helm/v3/index.js +10 -0
- package/lib/kubernetes/helm/v3/index.js.map +1 -0
- package/lib/kubernetes/helm/v3/release.d.ts +15 -0
- package/lib/kubernetes/helm/v3/release.d.ts.map +1 -0
- package/lib/kubernetes/helm/v3/release.js +18 -0
- package/lib/kubernetes/helm/v3/release.js.map +1 -0
- package/lib/kubernetes/index.d.ts +5 -0
- package/lib/kubernetes/index.d.ts.map +1 -0
- package/lib/kubernetes/index.js +10 -0
- package/lib/kubernetes/index.js.map +1 -0
- package/lib/kubernetes/transformations/filter.d.ts +13 -0
- package/lib/kubernetes/transformations/filter.d.ts.map +1 -0
- package/lib/kubernetes/transformations/filter.js +32 -0
- package/lib/kubernetes/transformations/filter.js.map +1 -0
- package/lib/kubernetes/transformations/index.d.ts +6 -0
- package/lib/kubernetes/transformations/index.d.ts.map +1 -0
- package/lib/kubernetes/transformations/index.js +12 -0
- package/lib/kubernetes/transformations/index.js.map +1 -0
- package/lib/kubernetes/transformations/metadataNamespace.d.ts +3 -0
- package/lib/kubernetes/transformations/metadataNamespace.d.ts.map +1 -0
- package/lib/kubernetes/transformations/metadataNamespace.js +27 -0
- package/lib/kubernetes/transformations/metadataNamespace.js.map +1 -0
- package/lib/kubernetes/transformations/removeCrdDescriptions.d.ts +3 -0
- package/lib/kubernetes/transformations/removeCrdDescriptions.d.ts.map +1 -0
- package/lib/kubernetes/transformations/removeCrdDescriptions.js +61 -0
- package/lib/kubernetes/transformations/removeCrdDescriptions.js.map +1 -0
- package/lib/kubernetes/transformations/v1beta1Deprecations.d.ts +3 -0
- package/lib/kubernetes/transformations/v1beta1Deprecations.d.ts.map +1 -0
- package/lib/kubernetes/transformations/v1beta1Deprecations.js +55 -0
- package/lib/kubernetes/transformations/v1beta1Deprecations.js.map +1 -0
- package/lib/kubernetes/v1/index.d.ts +5 -0
- package/lib/kubernetes/v1/index.d.ts.map +1 -0
- package/lib/kubernetes/v1/index.js +10 -0
- package/lib/kubernetes/v1/index.js.map +1 -0
- package/lib/kubernetes/v1/nfsVolume.d.ts +92 -0
- package/lib/kubernetes/v1/nfsVolume.d.ts.map +1 -0
- package/lib/kubernetes/v1/nfsVolume.js +97 -0
- package/lib/kubernetes/v1/nfsVolume.js.map +1 -0
- package/lib/kubernetes/v1/pullSecret.d.ts +31 -0
- package/lib/kubernetes/v1/pullSecret.d.ts.map +1 -0
- package/lib/kubernetes/v1/pullSecret.js +27 -0
- package/lib/kubernetes/v1/pullSecret.js.map +1 -0
- package/lib/kubernetes/v1/service.d.ts +31 -0
- package/lib/kubernetes/v1/service.d.ts.map +1 -0
- package/lib/kubernetes/v1/service.js +43 -0
- package/lib/kubernetes/v1/service.js.map +1 -0
- package/lib/metallb/controller.d.ts +17 -0
- package/lib/metallb/controller.d.ts.map +1 -0
- package/lib/metallb/controller.js +87 -0
- package/lib/metallb/controller.js.map +1 -0
- package/lib/metallb/index.d.ts +5 -0
- package/lib/metallb/index.d.ts.map +1 -0
- package/lib/metallb/index.js +10 -0
- package/lib/metallb/index.js.map +1 -0
- package/lib/metallb/ipAddressPool.d.ts +20 -0
- package/lib/metallb/ipAddressPool.d.ts.map +1 -0
- package/lib/metallb/ipAddressPool.js +22 -0
- package/lib/metallb/ipAddressPool.js.map +1 -0
- package/lib/metallb/l2Advertisement.d.ts +21 -0
- package/lib/metallb/l2Advertisement.d.ts.map +1 -0
- package/lib/metallb/l2Advertisement.js +22 -0
- package/lib/metallb/l2Advertisement.js.map +1 -0
- package/lib/node/index.d.ts +4 -0
- package/lib/node/index.d.ts.map +1 -0
- package/lib/node/index.js +6 -0
- package/lib/node/index.js.map +1 -0
- package/lib/node/kubernetes.d.ts +38 -0
- package/lib/node/kubernetes.d.ts.map +1 -0
- package/lib/node/kubernetes.js +89 -0
- package/lib/node/kubernetes.js.map +1 -0
- package/lib/node/node.d.ts +21 -0
- package/lib/node/node.d.ts.map +1 -0
- package/lib/node/node.js +3 -0
- package/lib/node/node.js.map +1 -0
- package/lib/openldap/deployment.d.ts +58 -0
- package/lib/openldap/deployment.d.ts.map +1 -0
- package/lib/openldap/deployment.js +217 -0
- package/lib/openldap/deployment.js.map +1 -0
- package/lib/openldap/index.d.ts +3 -0
- package/lib/openldap/index.d.ts.map +1 -0
- package/lib/openldap/index.js +6 -0
- package/lib/openldap/index.js.map +1 -0
- package/lib/plex/index.d.ts +4 -0
- package/lib/plex/index.d.ts.map +1 -0
- package/lib/plex/index.js +8 -0
- package/lib/plex/index.js.map +1 -0
- package/lib/plex/mediaServer.d.ts +46 -0
- package/lib/plex/mediaServer.d.ts.map +1 -0
- package/lib/plex/mediaServer.js +234 -0
- package/lib/plex/mediaServer.js.map +1 -0
- package/lib/plex/playlists.d.ts +62 -0
- package/lib/plex/playlists.d.ts.map +1 -0
- package/lib/plex/playlists.js +129 -0
- package/lib/plex/playlists.js.map +1 -0
- package/lib/prometheus/index.d.ts +4 -0
- package/lib/prometheus/index.d.ts.map +1 -0
- package/lib/prometheus/index.js +8 -0
- package/lib/prometheus/index.js.map +1 -0
- package/lib/prometheus/podMonitor.d.ts +42 -0
- package/lib/prometheus/podMonitor.d.ts.map +1 -0
- package/lib/prometheus/podMonitor.js +17 -0
- package/lib/prometheus/podMonitor.js.map +1 -0
- package/lib/prometheus/serviceMonitor.d.ts +46 -0
- package/lib/prometheus/serviceMonitor.d.ts.map +1 -0
- package/lib/prometheus/serviceMonitor.js +17 -0
- package/lib/prometheus/serviceMonitor.js.map +1 -0
- package/lib/raspberrypi/cluster.d.ts +41 -0
- package/lib/raspberrypi/cluster.d.ts.map +1 -0
- package/lib/raspberrypi/cluster.js +194 -0
- package/lib/raspberrypi/cluster.js.map +1 -0
- package/lib/raspberrypi/index.d.ts +3 -0
- package/lib/raspberrypi/index.d.ts.map +1 -0
- package/lib/raspberrypi/index.js +6 -0
- package/lib/raspberrypi/index.js.map +1 -0
- package/lib/rethinkdb/deployment.d.ts +61 -0
- package/lib/rethinkdb/deployment.d.ts.map +1 -0
- package/lib/rethinkdb/deployment.js +350 -0
- package/lib/rethinkdb/deployment.js.map +1 -0
- package/lib/rethinkdb/index.d.ts +3 -0
- package/lib/rethinkdb/index.d.ts.map +1 -0
- package/lib/rethinkdb/index.js +6 -0
- package/lib/rethinkdb/index.js.map +1 -0
- package/lib/rook/blockPool.d.ts +28 -0
- package/lib/rook/blockPool.d.ts.map +1 -0
- package/lib/rook/blockPool.js +56 -0
- package/lib/rook/blockPool.js.map +1 -0
- package/lib/rook/cluster.d.ts +54 -0
- package/lib/rook/cluster.d.ts.map +1 -0
- package/lib/rook/cluster.js +100 -0
- package/lib/rook/cluster.js.map +1 -0
- package/lib/rook/filesystem.d.ts +29 -0
- package/lib/rook/filesystem.d.ts.map +1 -0
- package/lib/rook/filesystem.js +110 -0
- package/lib/rook/filesystem.js.map +1 -0
- package/lib/rook/index.d.ts +6 -0
- package/lib/rook/index.d.ts.map +1 -0
- package/lib/rook/index.js +12 -0
- package/lib/rook/index.js.map +1 -0
- package/lib/rook/operator.d.ts +19 -0
- package/lib/rook/operator.d.ts.map +1 -0
- package/lib/rook/operator.js +162 -0
- package/lib/rook/operator.js.map +1 -0
- package/lib/samba/deployment.d.ts +79 -0
- package/lib/samba/deployment.d.ts.map +1 -0
- package/lib/samba/deployment.js +238 -0
- package/lib/samba/deployment.js.map +1 -0
- package/lib/samba/index.d.ts +3 -0
- package/lib/samba/index.d.ts.map +1 -0
- package/lib/samba/index.js +6 -0
- package/lib/samba/index.js.map +1 -0
- package/lib/ssh/exec.d.ts +33 -0
- package/lib/ssh/exec.d.ts.map +1 -0
- package/lib/ssh/exec.js +116 -0
- package/lib/ssh/exec.js.map +1 -0
- package/lib/ssh/file.d.ts +43 -0
- package/lib/ssh/file.d.ts.map +1 -0
- package/lib/ssh/file.js +110 -0
- package/lib/ssh/file.js.map +1 -0
- package/lib/ssh/index.d.ts +5 -0
- package/lib/ssh/index.d.ts.map +1 -0
- package/lib/ssh/index.js +8 -0
- package/lib/ssh/index.js.map +1 -0
- package/lib/ssh/types.d.ts +19 -0
- package/lib/ssh/types.d.ts.map +1 -0
- package/lib/ssh/types.js +3 -0
- package/lib/ssh/types.js.map +1 -0
- package/lib/torproxy/deployment.d.ts +31 -0
- package/lib/torproxy/deployment.d.ts.map +1 -0
- package/lib/torproxy/deployment.js +131 -0
- package/lib/torproxy/deployment.js.map +1 -0
- package/lib/torproxy/index.d.ts +3 -0
- package/lib/torproxy/index.d.ts.map +1 -0
- package/lib/torproxy/index.js +6 -0
- package/lib/torproxy/index.js.map +1 -0
- package/lib/traefik/controller.d.ts +50 -0
- package/lib/traefik/controller.d.ts.map +1 -0
- package/lib/traefik/controller.js +166 -0
- package/lib/traefik/controller.js.map +1 -0
- package/lib/traefik/index.d.ts +5 -0
- package/lib/traefik/index.d.ts.map +1 -0
- package/lib/traefik/index.js +10 -0
- package/lib/traefik/index.js.map +1 -0
- package/lib/traefik/middleware.d.ts +27 -0
- package/lib/traefik/middleware.d.ts.map +1 -0
- package/lib/traefik/middleware.js +22 -0
- package/lib/traefik/middleware.js.map +1 -0
- package/lib/traefik/secureIngress.d.ts +32 -0
- package/lib/traefik/secureIngress.d.ts.map +1 -0
- package/lib/traefik/secureIngress.js +58 -0
- package/lib/traefik/secureIngress.js.map +1 -0
- package/lib/ubuntu/assets/init.sh +52 -0
- package/lib/ubuntu/deployment.d.ts +67 -0
- package/lib/ubuntu/deployment.d.ts.map +1 -0
- package/lib/ubuntu/deployment.js +230 -0
- package/lib/ubuntu/deployment.js.map +1 -0
- package/lib/ubuntu/index.d.ts +3 -0
- package/lib/ubuntu/index.d.ts.map +1 -0
- package/lib/ubuntu/index.js +6 -0
- package/lib/ubuntu/index.js.map +1 -0
- package/lib/unifi/controller.d.ts +52 -0
- package/lib/unifi/controller.d.ts.map +1 -0
- package/lib/unifi/controller.js +232 -0
- package/lib/unifi/controller.js.map +1 -0
- package/lib/unifi/index.d.ts +3 -0
- package/lib/unifi/index.d.ts.map +1 -0
- package/lib/unifi/index.js +6 -0
- package/lib/unifi/index.js.map +1 -0
- package/lib/velero/index.d.ts +3 -0
- package/lib/velero/index.d.ts.map +1 -0
- package/lib/velero/index.js +6 -0
- package/lib/velero/index.js.map +1 -0
- package/lib/velero/operator.d.ts +31 -0
- package/lib/velero/operator.d.ts.map +1 -0
- package/lib/velero/operator.js +148 -0
- package/lib/velero/operator.js.map +1 -0
- package/lib/wireguard/deployment.d.ts +82 -0
- package/lib/wireguard/deployment.d.ts.map +1 -0
- package/lib/wireguard/deployment.js +161 -0
- package/lib/wireguard/deployment.js.map +1 -0
- package/lib/wireguard/index.d.ts +3 -0
- package/lib/wireguard/index.d.ts.map +1 -0
- package/lib/wireguard/index.js +6 -0
- package/lib/wireguard/index.js.map +1 -0
- package/package.json +62 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../lib/ssh/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import { ComponentResource } from "../common";
|
|
3
|
+
export interface TorProxyArgs {
|
|
4
|
+
/**
|
|
5
|
+
* Optional: Namespace
|
|
6
|
+
*/
|
|
7
|
+
namespace?: pulumi.Input<string>;
|
|
8
|
+
/**
|
|
9
|
+
* Optional: Hostname
|
|
10
|
+
*/
|
|
11
|
+
hostname?: pulumi.Input<string>;
|
|
12
|
+
/**
|
|
13
|
+
* Optional: Number of replicas
|
|
14
|
+
*/
|
|
15
|
+
replicas?: pulumi.Input<number>;
|
|
16
|
+
}
|
|
17
|
+
export declare class TorProxy extends ComponentResource {
|
|
18
|
+
private static readonly healthCheckURL;
|
|
19
|
+
private readonly deployment;
|
|
20
|
+
private readonly podDisruptionBudget;
|
|
21
|
+
private readonly service;
|
|
22
|
+
readonly namespace: pulumi.Output<string>;
|
|
23
|
+
/**
|
|
24
|
+
* Create a new TOR proxy resource.
|
|
25
|
+
* @param name The name of the TOR proxy resource.
|
|
26
|
+
* @param args A bag of arguments to control the TOR proxy creation.
|
|
27
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
28
|
+
*/
|
|
29
|
+
constructor(name: string, args: TorProxyArgs, opts?: pulumi.ComponentResourceOptions);
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=deployment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deployment.d.ts","sourceRoot":"","sources":["../../../lib/torproxy/deployment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAEzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAG9C,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACjC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAChC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;CACjC;AAED,qBAAa,QAAS,SAAQ,iBAAiB;IAC7C,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAA6E;IAEnH,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAyB;IACpD,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAoC;IACxE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAwB;IAChD,SAAgB,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAEjD;;;;;OAKG;gBACS,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,wBAAwB;CAkIrF"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TorProxy = void 0;
|
|
4
|
+
const pulumi = require("@pulumi/pulumi");
|
|
5
|
+
const k8s = require("@pulumi/kubernetes");
|
|
6
|
+
const common_1 = require("../common");
|
|
7
|
+
const kubernetes = require("../kubernetes");
|
|
8
|
+
class TorProxy extends common_1.ComponentResource {
|
|
9
|
+
static healthCheckURL = "https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion/";
|
|
10
|
+
deployment;
|
|
11
|
+
podDisruptionBudget;
|
|
12
|
+
service;
|
|
13
|
+
namespace;
|
|
14
|
+
/**
|
|
15
|
+
* Create a new TOR proxy resource.
|
|
16
|
+
* @param name The name of the TOR proxy resource.
|
|
17
|
+
* @param args A bag of arguments to control the TOR proxy creation.
|
|
18
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
19
|
+
*/
|
|
20
|
+
constructor(name, args, opts) {
|
|
21
|
+
super("torproxy", name, args, opts);
|
|
22
|
+
opts = this.opts(k8s.Provider);
|
|
23
|
+
if (args.replicas === undefined) {
|
|
24
|
+
args.replicas = 1;
|
|
25
|
+
}
|
|
26
|
+
this.namespace = args.namespace
|
|
27
|
+
? pulumi.output(args.namespace)
|
|
28
|
+
: new k8s.core.v1.Namespace(name, { metadata: { name } }, opts).metadata.name;
|
|
29
|
+
const metadata = {
|
|
30
|
+
name,
|
|
31
|
+
namespace: this.namespace,
|
|
32
|
+
labels: {
|
|
33
|
+
"app.kubernetes.io/name": "torproxy",
|
|
34
|
+
"app.kubernetes.io/component": "torproxy",
|
|
35
|
+
"app.kubernetes.io/instance": name,
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
const probeCmd = [
|
|
39
|
+
"curl",
|
|
40
|
+
"--proxy",
|
|
41
|
+
"http://127.0.0.1:8118",
|
|
42
|
+
"--insecure",
|
|
43
|
+
"--silent",
|
|
44
|
+
"--output",
|
|
45
|
+
"/dev/null",
|
|
46
|
+
TorProxy.healthCheckURL,
|
|
47
|
+
];
|
|
48
|
+
this.deployment = new k8s.apps.v1.Deployment(name, {
|
|
49
|
+
metadata,
|
|
50
|
+
spec: {
|
|
51
|
+
selector: { matchLabels: metadata.labels },
|
|
52
|
+
replicas: args.replicas,
|
|
53
|
+
template: {
|
|
54
|
+
metadata: { labels: metadata.labels },
|
|
55
|
+
spec: {
|
|
56
|
+
containers: [
|
|
57
|
+
{
|
|
58
|
+
name: "torprivoxy",
|
|
59
|
+
image: "avpnusr/torprivoxy:latest",
|
|
60
|
+
imagePullPolicy: "Always",
|
|
61
|
+
securityContext: { runAsUser: 102, runAsGroup: 102 },
|
|
62
|
+
ports: [{ name: "proxy", protocol: "TCP", containerPort: 8118 }],
|
|
63
|
+
readinessProbe: {
|
|
64
|
+
exec: { command: probeCmd },
|
|
65
|
+
periodSeconds: 30,
|
|
66
|
+
successThreshold: 3,
|
|
67
|
+
failureThreshold: 2,
|
|
68
|
+
timeoutSeconds: 10,
|
|
69
|
+
},
|
|
70
|
+
livenessProbe: {
|
|
71
|
+
exec: { command: probeCmd },
|
|
72
|
+
periodSeconds: 60,
|
|
73
|
+
failureThreshold: 10,
|
|
74
|
+
timeoutSeconds: 10,
|
|
75
|
+
},
|
|
76
|
+
resources: {
|
|
77
|
+
requests: { memory: "48Mi" },
|
|
78
|
+
limits: { memory: "64Mi" },
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
],
|
|
82
|
+
affinity: {
|
|
83
|
+
podAntiAffinity: {
|
|
84
|
+
preferredDuringSchedulingIgnoredDuringExecution: [
|
|
85
|
+
{
|
|
86
|
+
weight: 100,
|
|
87
|
+
podAffinityTerm: {
|
|
88
|
+
labelSelector: {
|
|
89
|
+
matchExpressions: [
|
|
90
|
+
{
|
|
91
|
+
key: "app.kubernetes.io/name",
|
|
92
|
+
operator: "In",
|
|
93
|
+
values: [metadata.labels["app.kubernetes.io/name"]],
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
key: "app.kubernetes.io/instance",
|
|
97
|
+
operator: "In",
|
|
98
|
+
values: [metadata.labels["app.kubernetes.io/instance"]],
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
},
|
|
102
|
+
topologyKey: "kubernetes.io/hostname",
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
],
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
}, opts);
|
|
112
|
+
this.podDisruptionBudget = new k8s.policy.v1.PodDisruptionBudget(name, {
|
|
113
|
+
metadata,
|
|
114
|
+
spec: {
|
|
115
|
+
minAvailable: 1,
|
|
116
|
+
selector: { matchLabels: metadata.labels },
|
|
117
|
+
},
|
|
118
|
+
}, opts);
|
|
119
|
+
this.service = new kubernetes.v1.Service(name, {
|
|
120
|
+
hostnames: args.hostname ? [args.hostname] : undefined,
|
|
121
|
+
metadata,
|
|
122
|
+
spec: {
|
|
123
|
+
selector: metadata.labels,
|
|
124
|
+
ports: [{ name: "proxy", protocol: "TCP", port: 8118 }],
|
|
125
|
+
},
|
|
126
|
+
}, { ...opts, dependsOn: [this.deployment] });
|
|
127
|
+
this.registerOutputs();
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
exports.TorProxy = TorProxy;
|
|
131
|
+
//# sourceMappingURL=deployment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deployment.js","sourceRoot":"","sources":["../../../lib/torproxy/deployment.ts"],"names":[],"mappings":";;;AAAA,yCAAyC;AACzC,0CAA0C;AAC1C,sCAA8C;AAC9C,4CAA4C;AAiB5C,MAAa,QAAS,SAAQ,0BAAiB;IACrC,MAAM,CAAU,cAAc,GAAG,yEAAyE,CAAC;IAElG,UAAU,CAAyB;IACnC,mBAAmB,CAAoC;IACvD,OAAO,CAAwB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qDACxD;iDACF;6CACF;4CACD,WAAW,EAAE,wBAAwB;yCACtC;qCACF;iCACF;6BACF;yBACF;qBACF;iBACF;aACF;SACF,EACD,IAAI,CACL,CAAC;QAEF,IAAI,CAAC,mBAAmB,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,mBAAmB,CAC9D,IAAI,EACJ;YACE,QAAQ;YACR,IAAI,EAAE;gBACJ,YAAY,EAAE,CAAC;gBACf,QAAQ,EAAE,EAAE,WAAW,EAAE,QAAQ,CAAC,MAAM,EAAE;aAC3C;SACF,EACD,IAAI,CACL,CAAC;QAEF,IAAI,CAAC,OAAO,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,OAAO,CACtC,IAAI,EACJ;YACE,SAAS,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS;YACtD,QAAQ;YACR,IAAI,EAAE;gBACJ,QAAQ,EAAE,QAAQ,CAAC,MAAM;gBACzB,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;aACxD;SACF,EACD,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAC1C,CAAC;QAEF,IAAI,CAAC,eAAe,EAAE,CAAC;IACzB,CAAC;;AA/IH,4BAgJC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/torproxy/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TorProxy = void 0;
|
|
4
|
+
const deployment_1 = require("./deployment");
|
|
5
|
+
Object.defineProperty(exports, "TorProxy", { enumerable: true, get: function () { return deployment_1.TorProxy; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/torproxy/index.ts"],"names":[],"mappings":";;;AAAA,6CAAsD;AAE/B,yFAFA,qBAAQ,OAEA"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import { ComponentResource } from "../common";
|
|
3
|
+
export interface TraefikArgs {
|
|
4
|
+
/**
|
|
5
|
+
* Optional: Namespace
|
|
6
|
+
*/
|
|
7
|
+
namespace?: pulumi.Input<string>;
|
|
8
|
+
/**
|
|
9
|
+
* Optional: Number of replicas
|
|
10
|
+
*/
|
|
11
|
+
replicas?: pulumi.Input<number>;
|
|
12
|
+
/**
|
|
13
|
+
* Optional: Type of service
|
|
14
|
+
*/
|
|
15
|
+
serviceType?: pulumi.Input<string>;
|
|
16
|
+
/**
|
|
17
|
+
* Optional: Annotations for service
|
|
18
|
+
*/
|
|
19
|
+
serviceAnnotations?: {
|
|
20
|
+
[key: string]: pulumi.Input<string>;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Optional: Ingress class
|
|
24
|
+
*/
|
|
25
|
+
ingressClass?: pulumi.Input<string>;
|
|
26
|
+
/**
|
|
27
|
+
* Optional: Set ingress class as default
|
|
28
|
+
*/
|
|
29
|
+
defaultIngressClass?: pulumi.Input<boolean>;
|
|
30
|
+
/**
|
|
31
|
+
* Optional: Proxy protocol IPs
|
|
32
|
+
*/
|
|
33
|
+
proxyProtocolIPs?: pulumi.Input<pulumi.Input<string>[]>;
|
|
34
|
+
}
|
|
35
|
+
export declare class Traefik extends ComponentResource {
|
|
36
|
+
private readonly helmRelease;
|
|
37
|
+
private readonly ingressClass;
|
|
38
|
+
private readonly metricsService;
|
|
39
|
+
private readonly serviceMonitor;
|
|
40
|
+
readonly namespace: pulumi.Output<string>;
|
|
41
|
+
readonly ingressClassName: pulumi.Output<string>;
|
|
42
|
+
/**
|
|
43
|
+
* Create a new traefik ingress controller resource.
|
|
44
|
+
* @param name The name of the traefik ingress controller resource.
|
|
45
|
+
* @param args A bag of arguments to control the traefik ingress controller creation.
|
|
46
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
47
|
+
*/
|
|
48
|
+
constructor(name: string, args: TraefikArgs, opts?: pulumi.ComponentResourceOptions);
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../../lib/traefik/controller.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAEzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAI9C,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACjC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAChC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACnC;;OAEG;IACH,kBAAkB,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;KAAE,CAAC;IAC7D;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACpC;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC5C;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;CACzD;AAED,qBAAa,OAAQ,SAAQ,iBAAiB;IAC5C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA6B;IACzD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAiC;IAC9D,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAsB;IACrD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAiB;IAChD,SAAgB,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACjD,SAAgB,gBAAgB,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAExD;;;;;OAKG;gBACS,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,wBAAwB;CA8KpF"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Traefik = void 0;
|
|
4
|
+
const pulumi = require("@pulumi/pulumi");
|
|
5
|
+
const k8s = require("@pulumi/kubernetes");
|
|
6
|
+
const common_1 = require("../common");
|
|
7
|
+
const kubernetes = require("../kubernetes");
|
|
8
|
+
const prometheus_1 = require("../prometheus");
|
|
9
|
+
class Traefik extends common_1.ComponentResource {
|
|
10
|
+
helmRelease;
|
|
11
|
+
ingressClass;
|
|
12
|
+
metricsService;
|
|
13
|
+
serviceMonitor;
|
|
14
|
+
namespace;
|
|
15
|
+
ingressClassName;
|
|
16
|
+
/**
|
|
17
|
+
* Create a new traefik ingress controller resource.
|
|
18
|
+
* @param name The name of the traefik ingress controller resource.
|
|
19
|
+
* @param args A bag of arguments to control the traefik ingress controller creation.
|
|
20
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
21
|
+
*/
|
|
22
|
+
constructor(name, args, opts) {
|
|
23
|
+
super("traefik:controller", name, args, opts);
|
|
24
|
+
opts = this.opts(k8s.Provider);
|
|
25
|
+
if (args.replicas === undefined) {
|
|
26
|
+
args.replicas = 1;
|
|
27
|
+
}
|
|
28
|
+
if (args.serviceType === undefined) {
|
|
29
|
+
args.serviceType = "ClusterIP";
|
|
30
|
+
}
|
|
31
|
+
if (args.serviceAnnotations === undefined) {
|
|
32
|
+
args.serviceAnnotations = {};
|
|
33
|
+
}
|
|
34
|
+
this.namespace = args.namespace
|
|
35
|
+
? pulumi.output(args.namespace)
|
|
36
|
+
: new k8s.core.v1.Namespace(name, { metadata: { name } }, opts).metadata.name;
|
|
37
|
+
const metadata = {
|
|
38
|
+
name,
|
|
39
|
+
namespace: this.namespace,
|
|
40
|
+
labels: {
|
|
41
|
+
"app.kubernetes.io/name": "traefik",
|
|
42
|
+
"app.kubernetes.io/instance": name,
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
this.ingressClassName = pulumi.output(args.ingressClass ?? "traefik");
|
|
46
|
+
this.helmRelease = new kubernetes.helm.v3.Release(name, {
|
|
47
|
+
name: metadata.name,
|
|
48
|
+
namespace: metadata.namespace,
|
|
49
|
+
repositoryOpts: { repo: "https://helm.traefik.io/traefik" },
|
|
50
|
+
chart: "traefik",
|
|
51
|
+
values: {
|
|
52
|
+
fullnameOverride: name,
|
|
53
|
+
deployment: { replicas: args.replicas },
|
|
54
|
+
globalArguments: [],
|
|
55
|
+
additionalArguments: pulumi
|
|
56
|
+
.all([this.ingressClassName, args.proxyProtocolIPs])
|
|
57
|
+
.apply(([ingressClassName, proxyProtocolIPs]) => {
|
|
58
|
+
const args = [
|
|
59
|
+
"--entrypoints.web.http.redirections.entryPoint.to=:443",
|
|
60
|
+
"--entrypoints.web.http.redirections.entryPoint.scheme=https",
|
|
61
|
+
"--entrypoints.web.http.redirections.entrypoint.permanent=true",
|
|
62
|
+
"--metrics.prometheus=true",
|
|
63
|
+
"--metrics.prometheus.entrypoint=metrics",
|
|
64
|
+
"--serversTransport.insecureSkipVerify=true",
|
|
65
|
+
];
|
|
66
|
+
if (ingressClassName !== undefined) {
|
|
67
|
+
args.push(`--providers.kubernetesingress.ingressclass=${ingressClassName}`);
|
|
68
|
+
args.push(`--providers.kubernetescrd.ingressclass=${ingressClassName}`);
|
|
69
|
+
}
|
|
70
|
+
if (proxyProtocolIPs !== undefined && proxyProtocolIPs.length > 0) {
|
|
71
|
+
args.push(`--entrypoints.web.proxyprotocol.trustedips=${proxyProtocolIPs.join(",")}`);
|
|
72
|
+
args.push(`--entrypoints.websecure.proxyprotocol.trustedips=${proxyProtocolIPs.join(",")}`);
|
|
73
|
+
}
|
|
74
|
+
return args;
|
|
75
|
+
}),
|
|
76
|
+
providers: {
|
|
77
|
+
kubernetesCRD: { ingressClass: args.ingressClass },
|
|
78
|
+
kubernetesIngress: { publishedService: { enabled: true } },
|
|
79
|
+
},
|
|
80
|
+
ingressClass: { enabled: false },
|
|
81
|
+
ingressRoute: { dashboard: { enabled: false } },
|
|
82
|
+
logs: {
|
|
83
|
+
general: { format: "json" },
|
|
84
|
+
},
|
|
85
|
+
service: {
|
|
86
|
+
type: args.serviceType,
|
|
87
|
+
annotations: args.serviceAnnotations,
|
|
88
|
+
},
|
|
89
|
+
affinity: {
|
|
90
|
+
podAntiAffinity: {
|
|
91
|
+
preferredDuringSchedulingIgnoredDuringExecution: [
|
|
92
|
+
{
|
|
93
|
+
weight: 100,
|
|
94
|
+
podAffinityTerm: {
|
|
95
|
+
labelSelector: {
|
|
96
|
+
matchExpressions: [
|
|
97
|
+
{ key: "app.kubernetes.io/name", operator: "In", values: ["traefik"] },
|
|
98
|
+
{ key: "app.kubernetes.io/instance", operator: "In", values: [name] },
|
|
99
|
+
],
|
|
100
|
+
},
|
|
101
|
+
topologyKey: "kubernetes.io/hostname",
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
resources: {
|
|
108
|
+
requests: { memory: "64Mi" },
|
|
109
|
+
limits: { memory: "96Mi" },
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
}, opts);
|
|
113
|
+
this.ingressClass = new k8s.networking.v1.IngressClass(name, {
|
|
114
|
+
metadata: {
|
|
115
|
+
...metadata,
|
|
116
|
+
annotations: {
|
|
117
|
+
"ingressclass.kubernetes.io/is-default-class": pulumi
|
|
118
|
+
.all([args.defaultIngressClass])
|
|
119
|
+
.apply(([defaultIngressClass]) => (defaultIngressClass ? "true" : "false")),
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
spec: {
|
|
123
|
+
controller: "traefik.io/ingress-controller",
|
|
124
|
+
},
|
|
125
|
+
}, opts);
|
|
126
|
+
const metricsMetadata = {
|
|
127
|
+
...metadata,
|
|
128
|
+
name: pulumi.interpolate `${name}-metrics`,
|
|
129
|
+
};
|
|
130
|
+
this.metricsService = new k8s.core.v1.Service(`${name}-metrics`, {
|
|
131
|
+
metadata: metricsMetadata,
|
|
132
|
+
spec: {
|
|
133
|
+
selector: metadata.labels,
|
|
134
|
+
ports: [{ name: "metrics", port: 9100, targetPort: "metrics" }],
|
|
135
|
+
},
|
|
136
|
+
}, { ...opts, dependsOn: [this.helmRelease] });
|
|
137
|
+
this.serviceMonitor = new prometheus_1.ServiceMonitor(`${name}-metrics`, {
|
|
138
|
+
metadata: metricsMetadata,
|
|
139
|
+
spec: {
|
|
140
|
+
namespaceSelector: { matchNames: [metadata.namespace] },
|
|
141
|
+
selector: { matchLabels: metricsMetadata.labels },
|
|
142
|
+
endpoints: [
|
|
143
|
+
{
|
|
144
|
+
port: "metrics",
|
|
145
|
+
honorLabels: true,
|
|
146
|
+
metricRelabelings: [
|
|
147
|
+
{
|
|
148
|
+
action: "drop",
|
|
149
|
+
sourceLabels: ["__name__"],
|
|
150
|
+
regex: ["go_.*"].join("|"),
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
action: "drop",
|
|
154
|
+
sourceLabels: ["entrypoint"],
|
|
155
|
+
regex: ["metrics", "traefik"].join("|"),
|
|
156
|
+
},
|
|
157
|
+
],
|
|
158
|
+
},
|
|
159
|
+
],
|
|
160
|
+
},
|
|
161
|
+
}, { ...opts, dependsOn: [this.metricsService] });
|
|
162
|
+
this.registerOutputs();
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
exports.Traefik = Traefik;
|
|
166
|
+
//# sourceMappingURL=controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"controller.js","sourceRoot":"","sources":["../../../lib/traefik/controller.ts"],"names":[],"mappings":";;;AAAA,yCAAyC;AACzC,0CAA0C;AAC1C,sCAA8C;AAC9C,4CAA4C;AAC5C,8CAA+C;AAiC/C,MAAa,OAAQ,SAAQ,0BAAiB;IAC3B,WAAW,CAA6B;IACxC,YAAY,CAAiC;IAC7C,cAAc,CAAsB;IACpC,cAAc,CAAiB;IAChC,SAAS,CAAwB;IACjC,gBAAgB,CAAwB;IAExD;;;;;OAKG;IACH,YAAY,IAAY,EAAE,IAAiB,EAAE,IAAsC;QACjF,KAAK,CAAC,oBAAoB,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAE9C,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAE/B,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE;YAC/B,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;SACnB;QAED,IAAI,IAAI,CAAC,WAAW,KAAK,SAAS,EAAE;YAClC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;SAChC;QAED,IAAI,IAAI,CAAC,kBAAkB,KAAK,SAAS,EAAE;YACzC,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC;SAC9B;QAED,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS;YAC7B,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;YAC/B,CAAC,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,EAAE,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AAQ,EAAE,eAAe;YACzB,IAAI,EAAE;gBACJ,iBAAiB,EAAE,EAAE,UAAU,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;gBACvD,QAAQ,EAAE,EAAE,WAAW,EAAE,eAAe,CAAC,MAAM,EAAE;gBACjD,SAAS,EAAE;oBACT;wBACE,IAAI,EAAE,SAAS;wBACf,WAAW,EAAE,IAAI;wBACjB,iBAAiB,EAAE;4BACjB;gCACE,MAAM,EAAE,MAAM;gCACd,YAAY,EAAE,CAAC,UAAU,CAAC;gCAC1B,KAAK,EAAE,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;6BAC3B;4BACD;gCACE,MAAM,EAAE,MAAM;gCACd,YAAY,EAAE,CAAC,YAAY,CAAC;gCAC5B,KAAK,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;6BACxC;yBACF;qBACF;iBACF;aACF;SACF,EACD,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,CAC9C,CAAC;QAEF,IAAI,CAAC,eAAe,EAAE,CAAC;IACzB,CAAC;CACF;AA5LD,0BA4LC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { TraefikArgs, Traefik } from "./controller";
|
|
2
|
+
import { SecureIngressArgs, SecureIngress } from "./secureIngress";
|
|
3
|
+
import { Middleware, MiddlewareArgs } from "./middleware";
|
|
4
|
+
export { TraefikArgs, Traefik, SecureIngressArgs, SecureIngress, Middleware, MiddlewareArgs };
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/traefik/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Middleware = exports.SecureIngress = exports.Traefik = void 0;
|
|
4
|
+
const controller_1 = require("./controller");
|
|
5
|
+
Object.defineProperty(exports, "Traefik", { enumerable: true, get: function () { return controller_1.Traefik; } });
|
|
6
|
+
const secureIngress_1 = require("./secureIngress");
|
|
7
|
+
Object.defineProperty(exports, "SecureIngress", { enumerable: true, get: function () { return secureIngress_1.SecureIngress; } });
|
|
8
|
+
const middleware_1 = require("./middleware");
|
|
9
|
+
Object.defineProperty(exports, "Middleware", { enumerable: true, get: function () { return middleware_1.Middleware; } });
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/traefik/index.ts"],"names":[],"mappings":";;;AAAA,6CAAoD;AAI9B,wFAJA,oBAAO,OAIA;AAH7B,mDAAmE;AAGjB,8FAHtB,6BAAa,OAGsB;AAF/D,6CAA0D;AAEO,2FAFxD,uBAAU,OAEwD"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import * as k8s from "@pulumi/kubernetes";
|
|
3
|
+
export interface MiddlewareHeadersArgs {
|
|
4
|
+
customRequestHeaders?: pulumi.Input<{
|
|
5
|
+
[key: string]: pulumi.Input<string>;
|
|
6
|
+
}>;
|
|
7
|
+
customResponseHeaders?: pulumi.Input<{
|
|
8
|
+
[key: string]: pulumi.Input<string>;
|
|
9
|
+
}>;
|
|
10
|
+
}
|
|
11
|
+
export interface MiddlewareSpecArgs {
|
|
12
|
+
headers?: pulumi.Input<MiddlewareHeadersArgs>;
|
|
13
|
+
}
|
|
14
|
+
export interface MiddlewareArgs {
|
|
15
|
+
metadata: pulumi.Input<k8s.types.input.meta.v1.ObjectMeta>;
|
|
16
|
+
spec: pulumi.Input<MiddlewareSpecArgs>;
|
|
17
|
+
}
|
|
18
|
+
export declare class Middleware extends k8s.apiextensions.CustomResource {
|
|
19
|
+
/**
|
|
20
|
+
* Create a new middlware resource.
|
|
21
|
+
* @param name The name of the middlware resource.
|
|
22
|
+
* @param args A bag of arguments to control the middlware creation.
|
|
23
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
24
|
+
*/
|
|
25
|
+
constructor(name: string, args: MiddlewareArgs, opts?: pulumi.CustomResourceOptions);
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=middleware.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"middleware.d.ts","sourceRoot":"","sources":["../../../lib/traefik/middleware.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,GAAG,MAAM,oBAAoB,CAAC;AAE1C,MAAM,WAAW,qBAAqB;IACpC,oBAAoB,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;KAAE,CAAC,CAAC;IAC7E,qBAAqB,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;KAAE,CAAC,CAAC;CAC/E;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;CAC/C;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC;IAC3D,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;CACxC;AAED,qBAAa,UAAW,SAAQ,GAAG,CAAC,aAAa,CAAC,cAAc;IAC9D;;;;;OAKG;gBACS,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,qBAAqB;CAYpF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Middleware = void 0;
|
|
4
|
+
const k8s = require("@pulumi/kubernetes");
|
|
5
|
+
class Middleware extends k8s.apiextensions.CustomResource {
|
|
6
|
+
/**
|
|
7
|
+
* Create a new middlware resource.
|
|
8
|
+
* @param name The name of the middlware resource.
|
|
9
|
+
* @param args A bag of arguments to control the middlware creation.
|
|
10
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
11
|
+
*/
|
|
12
|
+
constructor(name, args, opts) {
|
|
13
|
+
super(name, {
|
|
14
|
+
apiVersion: "traefik.containo.us/v1alpha1",
|
|
15
|
+
kind: "Middleware",
|
|
16
|
+
metadata: args.metadata,
|
|
17
|
+
spec: args.spec,
|
|
18
|
+
}, opts);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.Middleware = Middleware;
|
|
22
|
+
//# sourceMappingURL=middleware.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"middleware.js","sourceRoot":"","sources":["../../../lib/traefik/middleware.ts"],"names":[],"mappings":";;;AACA,0CAA0C;AAgB1C,MAAa,UAAW,SAAQ,GAAG,CAAC,aAAa,CAAC,cAAc;IAC9D;;;;;OAKG;IACH,YAAY,IAAY,EAAE,IAAoB,EAAE,IAAmC;QACjF,KAAK,CACH,IAAI,EACJ;YACE,UAAU,EAAE,8BAA8B;YAC1C,IAAI,EAAE,YAAY;YAClB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,EACD,IAAI,CACL,CAAC;IACJ,CAAC;CACF;AAnBD,gCAmBC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import * as k8s from "@pulumi/kubernetes";
|
|
3
|
+
export interface SecureIngressArgs {
|
|
4
|
+
/**
|
|
5
|
+
* Metadata for the ingress resource
|
|
6
|
+
*/
|
|
7
|
+
metadata: pulumi.Input<k8s.types.input.meta.v1.ObjectMeta>;
|
|
8
|
+
/**
|
|
9
|
+
* Spec for the ingress resource
|
|
10
|
+
*/
|
|
11
|
+
spec: pulumi.Input<k8s.types.input.networking.v1.IngressSpec>;
|
|
12
|
+
/**
|
|
13
|
+
* Optional: Name of issuer
|
|
14
|
+
*/
|
|
15
|
+
issuer?: pulumi.Input<string>;
|
|
16
|
+
/**
|
|
17
|
+
* Optional: Name of cluster issuer
|
|
18
|
+
*/
|
|
19
|
+
clusterIssuer?: pulumi.Input<string>;
|
|
20
|
+
}
|
|
21
|
+
export declare class SecureIngress extends k8s.networking.v1.Ingress {
|
|
22
|
+
private static readonly defaultClusterIssuer;
|
|
23
|
+
/**
|
|
24
|
+
* Create a new secure ingress resource.
|
|
25
|
+
* @param name The name of the secure ingress resource.
|
|
26
|
+
* @param args A bag of arguments to control the secure ingress creation.
|
|
27
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
28
|
+
*/
|
|
29
|
+
constructor(name: string, args: SecureIngressArgs, opts?: pulumi.CustomResourceOptions);
|
|
30
|
+
private static hosts;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=secureIngress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secureIngress.d.ts","sourceRoot":"","sources":["../../../lib/traefik/secureIngress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,GAAG,MAAM,oBAAoB,CAAC;AAE1C,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC;IAC3D;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC;IAC9D;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC9B;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;CACtC;AAED,qBAAa,aAAc,SAAQ,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC,OAAO;IAC1D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,oBAAoB,CAAiB;IAE7D;;;;;OAKG;gBACS,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,qBAAqB;IAoCtF,OAAO,CAAC,MAAM,CAAC,KAAK;CAarB"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SecureIngress = void 0;
|
|
4
|
+
const pulumi = require("@pulumi/pulumi");
|
|
5
|
+
const k8s = require("@pulumi/kubernetes");
|
|
6
|
+
class SecureIngress extends k8s.networking.v1.Ingress {
|
|
7
|
+
static defaultClusterIssuer = "letsencrypt";
|
|
8
|
+
/**
|
|
9
|
+
* Create a new secure ingress resource.
|
|
10
|
+
* @param name The name of the secure ingress resource.
|
|
11
|
+
* @param args A bag of arguments to control the secure ingress creation.
|
|
12
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
13
|
+
*/
|
|
14
|
+
constructor(name, args, opts) {
|
|
15
|
+
const ingressArgs = pulumi
|
|
16
|
+
.all([args.metadata, args.spec, args.issuer, args.clusterIssuer])
|
|
17
|
+
.apply(([metadataWrapped, specWrapped, issuer, clusterIssuer]) => {
|
|
18
|
+
const metadata = metadataWrapped;
|
|
19
|
+
const spec = specWrapped;
|
|
20
|
+
if (metadata.annotations === undefined) {
|
|
21
|
+
metadata.annotations = {};
|
|
22
|
+
}
|
|
23
|
+
const annotations = {
|
|
24
|
+
"traefik.ingress.kubernetes.io/router.entrypoints": "websecure",
|
|
25
|
+
"traefik.ingress.kubernetes.io/router.tls": "true",
|
|
26
|
+
};
|
|
27
|
+
if (issuer !== undefined) {
|
|
28
|
+
annotations["cert-manager.io/issuer"] = issuer;
|
|
29
|
+
}
|
|
30
|
+
else if (clusterIssuer !== undefined) {
|
|
31
|
+
annotations["cert-manager.io/cluster-issuer"] = clusterIssuer;
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
annotations["cert-manager.io/cluster-issuer"] = SecureIngress.defaultClusterIssuer;
|
|
35
|
+
}
|
|
36
|
+
metadata.annotations = { ...annotations, ...metadata.annotations };
|
|
37
|
+
if (spec.tls === undefined) {
|
|
38
|
+
spec.tls = [{ hosts: SecureIngress.hosts(spec.rules), secretName: pulumi.interpolate `${name}-tls` }];
|
|
39
|
+
}
|
|
40
|
+
return { metadata, spec };
|
|
41
|
+
});
|
|
42
|
+
super(name, ingressArgs, opts);
|
|
43
|
+
}
|
|
44
|
+
static hosts(rules) {
|
|
45
|
+
if (rules === undefined) {
|
|
46
|
+
return [];
|
|
47
|
+
}
|
|
48
|
+
return rules
|
|
49
|
+
.map((r) => {
|
|
50
|
+
return r.host;
|
|
51
|
+
})
|
|
52
|
+
.filter((h) => {
|
|
53
|
+
return h !== undefined;
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
exports.SecureIngress = SecureIngress;
|
|
58
|
+
//# sourceMappingURL=secureIngress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secureIngress.js","sourceRoot":"","sources":["../../../lib/traefik/secureIngress.ts"],"names":[],"mappings":";;;AAAA,yCAAyC;AACzC,0CAA0C;AAqB1C,MAAa,aAAc,SAAQ,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC,OAAO;IAClD,MAAM,CAAU,oBAAoB,GAAG,aAAa,CAAC;IAE7D;;;;;OAKG;IACH,YAAY,IAAY,EAAE,IAAuB,EAAE,IAAmC;QACpF,MAAM,WAAW,GAAG,MAAM;aACvB,GAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;aAChE,KAAK,CAAC,CAAC,CAAC,eAAe,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,EAAE;YAC/D,MAAM,QAAQ,GAAG,eAAqD,CAAC;YACvE,MAAM,IAAI,GAAG,WAAwD,CAAC;YAEtE,IAAI,QAAQ,CAAC,WAAW,KAAK,SAAS,EAAE;gBACtC,QAAQ,CAAC,WAAW,GAAG,EAAE,CAAC;aAC3B;YAED,MAAM,WAAW,GAA4C;gBAC3D,kDAAkD,EAAE,WAAW;gBAC/D,0CAA0C,EAAE,MAAM;aACnD,CAAC;YAEF,IAAI,MAAM,KAAK,SAAS,EAAE;gBACxB,WAAW,CAAC,wBAAwB,CAAC,GAAG,MAAM,CAAC;aAChD;iBAAM,IAAI,aAAa,KAAK,SAAS,EAAE;gBACtC,WAAW,CAAC,gCAAgC,CAAC,GAAG,aAAa,CAAC;aAC/D;iBAAM;gBACL,WAAW,CAAC,gCAAgC,CAAC,GAAG,aAAa,CAAC,oBAAoB,CAAC;aACpF;YAED,QAAQ,CAAC,WAAW,GAAG,EAAE,GAAG,WAAW,EAAE,GAAG,QAAQ,CAAC,WA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