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

Commit

Permalink
feat: update aws-load-balance iam policy v2
Browse files Browse the repository at this point in the history
  • Loading branch information
neilkuan committed Oct 31, 2020
1 parent d7a73e3 commit 94028c1
Show file tree
Hide file tree
Showing 9 changed files with 254 additions and 277 deletions.
11 changes: 0 additions & 11 deletions .github/dependabot.yml

This file was deleted.

1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixes #
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ coverage
!/.github/workflows/build.yml
!/.github/workflows/release.yml
!/.mergify.yml
!/.github/dependabot.yml
!/.github/pull_request_template.md
!/src
!/tsconfig.jest.json
!/test
Expand Down
8 changes: 0 additions & 8 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,3 @@ pull_request_rules:
conditions:
- label=auto-merge
- status-success=build
- name: Merge pull requests from dependabot if CI passes
conditions:
- author=dependabot[bot]
- status-success=build
actions:
merge:
method: merge
commit_message: title+body
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ dist
/tsconfig.json
/.github
/.vscode
/.idea
/.projenrc.js
/tsconfig.jest.json
/coverage
Expand Down
31 changes: 22 additions & 9 deletions .projenrc.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
const { ConstructLibraryCdk8s, Semver } = require('projen');
const { ConstructLibrary } = require('projen');
const PROJECT_DESCRIPTION = 'cdk8s-aws-alb-ingress-controller is an CDK8S construct library that provides AWS Alb Ingress Controller Deplyment Configure.';
const CDK_VERSION = '1.70.0';
const project = new ConstructLibraryCdk8s({
const CDK_VERSION = '1.71.0';
const CDK8S_VERSION = '0.32.0';
const project = new ConstructLibrary({
description: PROJECT_DESCRIPTION,
authorAddress: "guan840912@gmail.com",
authorName: "Neil Kuan",
cdk8sVersion: "0.30.0",
//cdk8sVersion: "0.30.0",
name: "cdk8s-aws-alb-ingress-controller",
repository: "https://github.com/guan840912/cdk8s-aws-alb-ingress-controller.git",
keywords: ['aws', 'cdk8s', 'alb-ingress-controller'],
defaultReleaseBranch: 'main',
releaseBranches: ['main'],
//compat: true,
dependabot: false,
catalog: {
twitter: 'neil_kuan',
announce: true,
Expand All @@ -19,12 +22,22 @@ const project = new ConstructLibraryCdk8s({
distName: 'cdk8s-aws-alb-ingress-controller',
module: 'cdk8s_aws_alb_ingress_controller',
},
devDeps: [
`cdk8s@^${CDK8S_VERSION}`,
`cdk8s-plus@^${CDK8S_VERSION}`,
'constructs@^3.2.7',
`@aws-cdk/aws-iam@^${CDK_VERSION}`,
`@aws-cdk/core@^${CDK_VERSION}`,
],
peerDeps: [
`cdk8s@^${CDK8S_VERSION}`,
`cdk8s-plus@^${CDK8S_VERSION}`,
'constructs@^3.2.7',
`@aws-cdk/aws-iam@^${CDK_VERSION}`,
`@aws-cdk/core@^${CDK_VERSION}`,
]
});
project.addPeerDependencies({
'constructs': Semver.caret('3.1.3'),
'@aws-cdk/aws-iam': Semver.caret(CDK_VERSION),
'@aws-cdk/core': Semver.caret(CDK_VERSION),
});


const common_exclude = ['cdk.out', 'cdk.context.json', 'image', 'yarn-error.log','coverage'];
project.gitignore.exclude(...common_exclude);
Expand Down
38 changes: 26 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@
"organization": false
},
"devDependencies": {
"@aws-cdk/aws-iam": "1.70.0",
"@aws-cdk/core": "1.70.0",
"@aws-cdk/aws-iam": "1.71.0",
"@aws-cdk/core": "1.71.0",
"@types/jest": "^26.0.7",
"@types/node": "^10.17.0",
"@typescript-eslint/eslint-plugin": "^4.3.0",
"@typescript-eslint/parser": "^4.3.0",
"cdk8s": "0.30.0",
"cdk8s-plus": "0.30.0",
"constructs": "3.1.3",
"cdk8s": "0.32.0",
"cdk8s-plus": "0.32.0",
"constructs": "3.2.7",
"eslint": "^7.11.0",
"eslint-import-resolver-node": "^0.3.4",
"eslint-import-resolver-typescript": "^2.3.0",
Expand All @@ -51,17 +51,17 @@
"jsii-pacmak": "^1.11.0",
"jsii-release": "^0.1.6",
"json-schema": "^0.2.5",
"projen": "^0.3.122",
"projen": "^0.3.138",
"standard-version": "^9.0.0",
"ts-jest": "^26.1.0",
"typescript": "^3.9.5"
},
"peerDependencies": {
"@aws-cdk/aws-iam": "^1.70.0",
"@aws-cdk/core": "^1.70.0",
"cdk8s": "^0.30.0",
"cdk8s-plus": "^0.30.0",
"constructs": "^3.1.3"
"@aws-cdk/aws-iam": "^1.71.0",
"@aws-cdk/core": "^1.71.0",
"cdk8s": "^0.32.0",
"cdk8s-plus": "^0.32.0",
"constructs": "^3.2.7"
},
"dependencies": {},
"bundledDependencies": [],
Expand All @@ -78,58 +78,72 @@
"license": "Apache-2.0",
"start": {
"start": {
"command": "yarn run start",
"desc": "Shows this menu"
},
"projen": {
"desc": "Synthesize project configuration from .projenrc.js",
"command": "yarn run projen",
"category": 3
},
"bump": {
"desc": "Commits a bump to the package version based on conventional commits",
"command": "yarn run bump",
"category": 2
},
"release": {
"desc": "Bumps version & push to main",
"command": "yarn run release",
"category": 2
},
"projen:upgrade": {
"desc": "upgrades projen to the latest version",
"command": "yarn run projen:upgrade",
"category": 3
},
"compile": {
"desc": "Only compile",
"command": "yarn run compile",
"category": 0
},
"watch": {
"desc": "Watch & compile in the background",
"command": "yarn run watch",
"category": 0
},
"build": {
"desc": "Full release build (test+compile)",
"command": "yarn run build",
"category": 0
},
"package": {
"desc": "Create an npm tarball",
"command": "yarn run package",
"category": 2
},
"test": {
"desc": "Run tests",
"command": "yarn run test",
"category": 1
},
"test:watch": {
"desc": "Run jest in watch mode",
"command": "yarn run test:watch",
"category": 1
},
"eslint": {
"desc": "Runs eslint against the codebase",
"command": "yarn run eslint",
"category": 1
},
"compat": {
"desc": "Perform API compatibility check against latest version",
"command": "yarn run compat",
"category": 2
},
"docgen": {
"desc": "Generate API.md from .jsii manifest",
"command": "yarn run docgen",
"category": 2
}
},
Expand All @@ -151,7 +165,7 @@
],
"globals": {
"ts-jest": {
"tsConfig": "tsconfig.jest.json"
"tsconfig": "tsconfig.jest.json"
}
}
},
Expand Down
5 changes: 3 additions & 2 deletions src/alb-controller-policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,9 @@ const awsLoadBalancerControllerPolicyV2 = [
'elasticloadbalancing:RemoveTags',
],
Resource: [
'arn:aws:elasticloadbalancing:*:*:loadbalancer/*',
'arn:aws:elasticloadbalancing:*:*:targetgroup*',
'arn:aws:elasticloadbalancing:*:*:targetgroup/*/*',
'arn:aws:elasticloadbalancing:*:*:loadbalancer/net/*/*',
'arn:aws:elasticloadbalancing:*:*:loadbalancer/app/*/*',
],
Condition: {
Null: {
Expand Down
Loading

0 comments on commit 94028c1

Please sign in to comment.