constructor()

in lib/nginx-ingress-construct/index.ts [23:82]


    constructor(scope: cdk.Construct, id: string) {
        super(scope, id);
        // Teams for the cluster.
        const teams: Array<ssp.Team> = [
            new team.TeamPlatform(accountID),
            new team.TeamTroiSetup,
            new team.TeamRikerSetup,
            new team.TeamBurnhamSetup(scope)
        ];

        const subdomain : string = valueFromContext(scope, "dev.subzone.name", "dev.some.example.com");
        const parentDnsAccountId = this.node.tryGetContext("parent.dns.account")!;
        const parentDomain = valueFromContext(this, "parent.hostedzone.name", "some.example.com");

        EksBlueprint.builder()
            .account(process.env.CDK_DEFAULT_ACCOUNT)
            .region('us-west-2')
            .teams(...teams)
            .resourceProvider(GlobalResources.HostedZone, new ssp.DelegatingHostedZoneProvider({
                parentDomain,
                subdomain, 
                parentDnsAccountId,
                delegatingRoleName: 'DomainOperatorRole', 
                wildcardSubdomain: true
            }))
            .resourceProvider(GlobalResources.Certificate, new ssp.CreateCertificateProvider('wildcard-cert', `*.${subdomain}`, GlobalResources.HostedZone))
            .addOns(new ssp.CalicoAddOn,
                new ssp.AwsLoadBalancerControllerAddOn,
                new ssp.addons.ExternalDnsAddon({
                    hostedZoneResources: [GlobalResources.HostedZone] // you can add more if you register resource providers
                }),
                new ssp.NginxAddOn({ 
                    internetFacing: true, 
                    backendProtocol: "tcp", 
                    externalDnsHostname: subdomain, 
                    crossZoneEnabled: false, 
                    certificateResourceName: GlobalResources.Certificate,
                    values: {
                        controller: {
                            service: {
                                httpsPort: {
                                    targetPort: "http"
                                }
                            }
                        }
                    }
                }),
                new ssp.ArgoCDAddOn( {
                    bootstrapRepo: {
                        repoUrl: gitUrl,
                        targetRevision: "deployable",
                        path: 'envs/dev'
                    },
                    adminPasswordSecretName: MultiRegionConstruct.SECRET_ARGO_ADMIN_PWD,
                }),
                new ssp.MetricsServerAddOn,
                new ssp.ClusterAutoScalerAddOn,
                new ssp.ContainerInsightsAddOn )
            .build(scope, `${id}-blueprint`);
    }