-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: initial kubectl layer construct #1
Changes from 1 commit
ee5799d
0b1e608
dfab34e
beb60d1
5ef1faf
4f2b68f
f2b99cc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,39 @@ | ||
const { awscdk } = require('projen'); | ||
const { awscdk, JsonPatch } = require('projen'); | ||
const project = new awscdk.AwsCdkConstructLibrary({ | ||
author: 'Kaizen Conroy', | ||
authorAddress: 'zen.conroy@gmail.com', | ||
cdkVersion: '2.1.0', | ||
author: 'Amazon Web Services', | ||
cdkVersion: '2.0.0', | ||
defaultReleaseBranch: 'main', | ||
name: 'awscdk-asset-kubectl', | ||
name: '@aws-cdk/asset-kubectl-v1-20', | ||
description: 'An Asset construct that contains kubectl, for use in Lambda Layers', | ||
repositoryUrl: 'https://github.com/cdklabs/awscdk-asset-kubectl.git', | ||
|
||
homepage: 'https://github.com/cdklabs/aws-asset-awscli#readme', | ||
autoApproveOptions: { | ||
allowedUsernames: ['cdklabs-automation'], | ||
secret: 'GITHUB_TOKEN', | ||
}, | ||
autoApproveUpgrades: true, | ||
workflowBootstrapSteps: [ | ||
{ | ||
// This step is required to allow the build workflow to build docker images. | ||
name: 'Change permissions on /var/run/docker.sock', | ||
run: 'sudo chown superchain /var/run/docker.sock', | ||
}, | ||
], | ||
// deps: [], /* Runtime dependencies of this module. */ | ||
// description: undefined, /* The description is just a string that helps people understand the purpose of the package. */ | ||
// devDeps: [], /* Build dependencies for this module. */ | ||
// packageName: undefined, /* The "name" in package.json. */ | ||
}); | ||
|
||
// These patches are required to enable sudo commands in the workflows under `workflowBootstrapSteps`, | ||
// see `workflowBootstrapSteps` above for why a sudo command is needed. | ||
const buildWorkflow = project.tryFindObjectFile('.github/workflows/build.yml'); | ||
buildWorkflow.patch(JsonPatch.add('/jobs/build/container/options', '--group-add sudo')); | ||
const releaseWorkflow = project.tryFindObjectFile('.github/workflows/release.yml'); | ||
releaseWorkflow.patch(JsonPatch.add('/jobs/release/container/options', '--group-add sudo')); | ||
const upgradeWorkflow = project.tryFindObjectFile('.github/workflows/upgrade-main.yml'); | ||
upgradeWorkflow.patch(JsonPatch.add('/jobs/upgrade/container/options', '--group-add sudo')); | ||
|
||
project.preCompileTask.exec('layer/build.sh'); | ||
|
||
project.synth(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Naming suggestions?
@aws-cdk/asset-kubectl-v1.20
does not work. I don't know if people care about the minor version of kubectl here, maybe just@aws-cdk/asset-kubectl-v1
is sufficient?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
people do care about the minor version. Each minor version bump in kubernetes can have breaking changes. How about we borrow the convention from cdk8s-plus https://www.npmjs.com/package/cdk8s-plus-21
@aws-cdk/asset-kubectl-21
or@aws-cdk/asset-kubectl-v21
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Looks like this should be
@aws-cdk/asset-kubectil-v20
then.