Skip to content

Commit

Permalink
Merge pull request #30 from prudhvigodithi/main
Browse files Browse the repository at this point in the history
Repo code clean up
  • Loading branch information
bshien authored May 7, 2024
2 parents a2a6272 + 0f82239 commit cef7164
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 10 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/add-untriaged.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Apply 'untriaged' label during issue lifecycle

on:
issues:
types: [opened, reopened, transferred]

jobs:
apply-label:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
with:
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['untriaged']
})
2 changes: 1 addition & 1 deletion .github/workflows/cdk-ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ jobs:
./gradlew clean build
cd infrastructure
npm install
npm test
npm test -- --coverage
2 changes: 1 addition & 1 deletion .github/workflows/java-ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:

- name: Run build and test
run: |
./gradlew clean build
./gradlew clean build
4 changes: 2 additions & 2 deletions infrastructure/lib/constructs/lambda.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {ISecurityGroup, IVpc, SubnetType} from "aws-cdk-lib/aws-ec2";
import { IRole } from "aws-cdk-lib/aws-iam";

export class OpenSearchLambdaProps {
readonly lambdaNameBase: string; // Component name cannot be longer then 22, so base should be shorter than 20
readonly lambdaNameBase: string;
readonly lambdaZipPath: string;
readonly handler: string;
readonly vpc?: IVpc;
Expand Down Expand Up @@ -34,7 +34,7 @@ export class OpenSearchLambda extends Construct {
handler: props.handler,
timeout: Duration.minutes(15),
runtime: Runtime.JAVA_17,
tracing: Tracing.ACTIVE, // enable X-RAY
tracing: Tracing.ACTIVE,
memorySize: 1024,
description: `Generated on: ${resourceGenerationTime}`,
functionName: `${props.lambdaNameBase}Lambda`,
Expand Down
3 changes: 1 addition & 2 deletions infrastructure/lib/constructs/opensearchNginxProxyCognito.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
Vpc,
MachineImage
} from 'aws-cdk-lib/aws-ec2';
import { Effect, ManagedPolicy, PolicyStatement, Role, ServicePrincipal } from 'aws-cdk-lib/aws-iam';
import { ManagedPolicy, Role, ServicePrincipal } from 'aws-cdk-lib/aws-iam';
import {Aspects, CfnOutput, Duration, Tag, Tags} from 'aws-cdk-lib';
import { Construct } from 'constructs';
import {
Expand All @@ -27,7 +27,6 @@ import Project from "../enums/project";
import {ARecord, RecordTarget} from "aws-cdk-lib/aws-route53";
import {LoadBalancerTarget} from "aws-cdk-lib/aws-route53-targets";
import {OpenSearchHealthRoute53} from "../stacks/route53";
import {StringParameter} from "aws-cdk-lib/aws-ssm";


export interface NginxProps {
Expand Down
1 change: 0 additions & 1 deletion infrastructure/lib/stacks/opensearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ export class OpenSearchDomainStack extends Stack {
this.domain = new opensearch.Domain(this, 'OpenSearchHealthDomain', {
version: opensearch.EngineVersion.OPENSEARCH_2_11,
vpc: props.vpcStack.vpc,
// vpcSubnets: [props.vpcStack.subnets],
vpcSubnets: [this.props.vpcStack.subnets],
securityGroups: props.vpcStack.securityGroup ? [props.vpcStack.securityGroup] : undefined,
domainName: this.opensearchDomainConfig.domainName,
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/lib/stacks/opensearchNginxProxyReadonly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export class OpenSearchMetricsNginxReadonly extends Stack {
vpc,
allowAllOutbound: true,
});
albSecurityGroup.addIngressRule(Peer.prefixList(Project.RESTRICTED_PREFIX), Port.tcp(443));
albSecurityGroup.addIngressRule(Peer.anyIpv4(), Port.tcp(443), "Allow HTTPS 443 Access");

const openSearchApplicationLoadBalancer = new ApplicationLoadBalancer(this, 'OpenSearchMetricsReadonly-NginxProxyAlb', {
loadBalancerName: "OpenSearchMetricsReadonly",
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/test/hostedzone-stack.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ test('HostedZoneCognito Stack Test', () => {
hostedZoneCognitoStackTemplate.hasResourceProperties('AWS::CertificateManager::Certificate', {
"DomainName": "metrics.login.opensearch.org"
});
});
});
2 changes: 1 addition & 1 deletion infrastructure/test/nginx.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ test('OpenSearchMetricsNginxReadonly Stack Test', () => {
"SecurityGroupIngress": [
{
"CidrIp": "0.0.0.0/0",
"Description": "Allow from anyone on port 443",
"Description": "Allow HTTPS 443 Access",
"FromPort": 443,
"IpProtocol": "tcp",
"ToPort": 443
Expand Down

0 comments on commit cef7164

Please sign in to comment.