Skip to content
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: Introducing "cdk8s+": high-level APIs for Kubernetes #239

Merged
merged 82 commits into from
Jun 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
5aeaaa4
initial types
iliapolo Jun 17, 2020
d9fe9c2
added generated API.md and lock file
iliapolo Jun 17, 2020
708a8de
remove stateful set and fix names in package metadata
iliapolo Jun 17, 2020
c5b538d
align versions to yarn workspace
iliapolo Jun 17, 2020
ff49fce
use the same node version as cdk8s
iliapolo Jun 17, 2020
a4d5d07
added test files and downgrade cdk8s @types/node to use node 10 since…
iliapolo Jun 17, 2020
f5a81f9
added container tests and docstrings
iliapolo Jun 17, 2020
17eca0f
object-meta tests
iliapolo Jun 17, 2020
803d06a
upgrade projen
iliapolo Jun 17, 2020
ef06a91
some more docstrings
iliapolo Jun 17, 2020
4474920
upgrade projen
Jun 17, 2020
3fea269
add Size (from AWS CDK)
Jun 17, 2020
1263dd1
modernize Volume
Jun 17, 2020
f0f1785
upgrade projen
Jun 17, 2020
f811178
update build command
Jun 17, 2020
ca583ee
feat: volume.name
Jun 17, 2020
b3a0606
add docgen to "build"
Jun 17, 2020
104ebf7
update API.md
Jun 17, 2020
c1aa3ac
feat: volume mount options
Jun 17, 2020
075e75c
consolidate some test methods
iliapolo Jun 17, 2020
00c9bd5
added volume-mount test
iliapolo Jun 17, 2020
0511666
remove volume-mount again
iliapolo Jun 17, 2020
e3f4ab6
lock file
iliapolo Jun 17, 2020
3201693
explicitly add cdk8s dep to dev dependencies to make align version work
iliapolo Jun 17, 2020
d2f4764
generate package.json
iliapolo Jun 17, 2020
a9dd36f
fix packaging
Jun 17, 2020
cf3e1c3
remove projen invocation from build since it reset all version number…
iliapolo Jun 17, 2020
0701aca
move version indicator to lerna
iliapolo Jun 17, 2020
1211e26
remove projen invocation from build since it reset all version number…
iliapolo Jun 17, 2020
f27ac92
replace lerna align version with manual since lerna doesn't update pe…
iliapolo Jun 17, 2020
7696ade
put cdk8s in dev dependencies
iliapolo Jun 17, 2020
5451959
move cdk8s back to normal dependencies as a workaround for: https://g…
iliapolo Jun 17, 2020
0115c02
clear up some mess with usage of lazy. _toKube should never return la…
iliapolo Jun 18, 2020
1114a18
reconsile lazy metadata instatiation by simply referring to the under…
iliapolo Jun 18, 2020
f92ac14
regenerate API.md
iliapolo Jun 18, 2020
a889426
remove snapshot
iliapolo Jun 18, 2020
ac1175f
mote pod tests
iliapolo Jun 18, 2020
e2c4d67
more container tests
iliapolo Jun 18, 2020
dabb6ec
chore: move sources to "src"
Jun 19, 2020
181d818
deployment tests
iliapolo Jun 19, 2020
2fc6e47
fix deployment test due to structure changes and regenerate API.md
iliapolo Jun 19, 2020
430bfaa
DeploymentSpec _toKube to accept arbitrary deployment
iliapolo Jun 19, 2020
75ef416
more tests
iliapolo Jun 19, 2020
bc3b58d
add some docs to "Secret"
Jun 19, 2020
925a45b
initial ServiceAccount tests
Jun 19, 2020
e0b10ec
started readme
iliapolo Jun 19, 2020
ac1ba80
readme
iliapolo Jun 19, 2020
4a41b9e
Merge branch 'epolon/introducing-cdk8s-plus' of github.com:iliapolo/c…
iliapolo Jun 19, 2020
7e90e6e
more docs
iliapolo Jun 19, 2020
b3ad701
more docs
iliapolo Jun 19, 2020
1632980
more docs
iliapolo Jun 19, 2020
d565b66
more docs
iliapolo Jun 19, 2020
6f24f2c
more docs
iliapolo Jun 19, 2020
bdc5e42
more docs
iliapolo Jun 19, 2020
ce38b5b
more docs
iliapolo Jun 20, 2020
0fa29b6
more docs
iliapolo Jun 20, 2020
d66de17
added API.md for cdk8s package
iliapolo Jun 20, 2020
914f769
more docs
iliapolo Jun 20, 2020
3a91c48
fix tests
iliapolo Jun 20, 2020
853a18a
more docs
iliapolo Jun 20, 2020
729d559
more docs
iliapolo Jun 20, 2020
5f9ba15
more docs
iliapolo Jun 20, 2020
71163ae
more docs
iliapolo Jun 20, 2020
9e053de
more docs
iliapolo Jun 20, 2020
3277dbf
some docstrings
iliapolo Jun 20, 2020
0e6d3b4
more tests
iliapolo Jun 20, 2020
20183d4
fixtures and API.md
iliapolo Jun 20, 2020
984bea1
more tests
iliapolo Jun 20, 2020
bf2509f
more tests
iliapolo Jun 20, 2020
7005d23
Merge branch 'master' into epolon/introducing-cdk8s-plus
iliapolo Jun 20, 2020
337f33e
contrib guide
iliapolo Jun 20, 2020
c3aae63
contrib
iliapolo Jun 20, 2020
f857689
rephrase
iliapolo Jun 20, 2020
53f4a42
replace reference to imports in deployment test
Jun 21, 2020
7e19b87
added the 'At a glance' section
iliapolo Jun 21, 2020
c5715e0
fix tests and line lenght in contrib
iliapolo Jun 21, 2020
29b46f4
fix apiObject visiliblity in sub classes
iliapolo Jun 21, 2020
63ffc71
fix pod tests
iliapolo Jun 21, 2020
5cba1de
more fixes
iliapolo Jun 21, 2020
15fddd9
chore: use ApiObjectMetadata from cdk8s (#1)
Jun 21, 2020
e3b4fd6
chore: get rid of PodTemplate (#2)
Jun 22, 2020
39a2774
chore: add readonly accessors to all resources (#3)
Jun 22, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,7 @@ typings/
# DynamoDB Local files
.dynamodb/

# utility scripts
!/tools/*.js

# End of https://www.gitignore.io/api/node
5 changes: 5 additions & 0 deletions .versionrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"skip": { "tag": true },
"packageFiles": [ { "filename": "lerna.json", "type": "json" } ],
"bumpFiles": [ { "filename": "lerna.json", "type": "json" } ]
}
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ This section includes information that is relevant for the maintainers of the pr

### Version

The current version of the project is mastered in the root `package.json` file. All other
package.json files (and lerna.json) files use `0.0.0`. This allows bumping a new version without
The current version of the project is mastered in the root `lerna.json` file. All other
package.json files use `0.0.0`. This allows bumping a new version without
needing to modify multiple files and avoid merge conflicts in post-release rebases.

### Release Protocol
Expand All @@ -202,7 +202,7 @@ To release a new version of cdk8s following these steps:
$ yarn bump
```

This will create a new CHANGELOG entry (from conventional commits), bump the version in
This will create a new CHANGELOG entry (from conventional commits), bump the version in
`package.json` and create a bump commit.

Now, push to `master` (in the future we will release from a release branch, but in the meantime we release directly from master):
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"npmClient": "yarn",
"useWorkspaces": true,
"version": "0.0.0"
"version": "0.25.0"
}
28 changes: 25 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "root",
"version": "0.25.0",
"version": "0.0.0",
"private": true,
"scripts": {
"bump": "tools/bump.sh",
Expand All @@ -22,12 +22,34 @@
"cdk8s/json-stable-stringify",
"cdk8s/json-stable-stringify/**",
"cdk8s/follow-redirects",
"cdk8s/follow-redirects/**"
"cdk8s/follow-redirects/**",
"cdk8s-plus/minimatch",
"cdk8s-plus/minimatch/**"
]
},
"devDependencies": {
"changelog-parser": "^2.8.0",
"lerna": "^3.20.2",
"standard-version": "^7.1.0"
},
"jest": {
"clearMocks": true,
"collectCoverage": true,
"coveragePathIgnorePatterns": [
"/node_modules/"
],
"testPathIgnorePatterns": [
"/node_modules/"
],
"preset": "ts-jest",
"testMatch": [
"**/__tests__/**/*.ts?(x)",
"**/?(*.)+(spec|test).ts?(x)"
],
"globals": {
"ts-jest": {
"tsConfig": "tsconfig.jest.json"
}
}
}
}
}
82 changes: 82 additions & 0 deletions packages/cdk8s-plus/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"env": {
"jest": true,
"node": true
},
"plugins": [
"@typescript-eslint",
"import"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "2018",
"sourceType": "module"
},
"extends": [
"plugin:import/typescript"
],
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [
".ts",
".tsx"
]
},
"import/resolver": {
"node": {},
"typescript": {
"directory": "./tsconfig.json"
}
}
},
"ignorePatterns": [
"*.js",
"*.d.ts",
"node_modules/",
"*.generated.ts"
],
"rules": {
"@typescript-eslint/no-require-imports": [
"error"
],
"indent": [
"off"
],
"@typescript-eslint/indent": [
"error",
2
],
"quotes": [
"error",
"single",
{
"avoidEscape": true
}
],
"comma-dangle": [
"error",
"always-multiline"
],
"quote-props": [
"error",
"consistent-as-needed",
{
"unnecessary": true
}
],
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": [
"**/build-tools/**",
"**/test/**"
],
"optionalDependencies": false,
"peerDependencies": true
}
],
"import/no-unresolved": [
"error"
]
}
}
64 changes: 64 additions & 0 deletions packages/cdk8s-plus/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Generated by projen. To modify, edit .projenrc.js and run "npx projen".
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript cache
*.tsbuildinfo
# Optional eslint cache
.eslintcache
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# parcel-bundler cache (https://parceljs.org/)
.cache
/lib
/coverage
# exclude jsii outputs
dist
.jsii
tsconfig.json
# exclude typescript compiler outputs
*.d.ts
*.js
!# synthesized by projen, (do not modify by hand)
!/package.json
!# synthesized by projen, (do not modify by hand)
!/.npmignore
!# synthesized by projen, (do not modify by hand)
!/LICENSE
!/.projenrc.js
!# always commit version file
!version.json
!# synthesized by projen, (do not modify by hand)
!/.versionrc.json
!/src
!/test
!# synthesized by projen, (do not modify by hand)
!/.eslintrc.json
!/API.md
!# synthesized by projen, (do not modify by hand)
!/tsconfig.jest.json
21 changes: 21 additions & 0 deletions packages/cdk8s-plus/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Generated by projen. To modify, edit .projenrc.js and run "npx projen".
# exclude project definition from npm module
/.projenrc.js
# make sure to commit projen definition
# standard-version configuration
/.versionrc.json
/src
/test
/coverage
/.eslintrc.json
# exclude typescript sources and configuration
*.ts
tsconfig.json
# exclude jsii outdir
dist
!/lib
!# include javascript files and typescript declarations
!*.js
!*.d.ts
!# include .jsii manifest
!.jsii
51 changes: 51 additions & 0 deletions packages/cdk8s-plus/.projenrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
const { JsiiProject, Semver } = require('projen');

const constructsDependency = Semver.caret('2.0.1')
const cdk8sDependency = Semver.caret('0.0.0')

const project = new JsiiProject({
name: 'cdk8s-plus',
buildWorkflow: false,
releaseWorkflow: false,
mergify: false,
commitPackageJson: true,
jsiiVersion: Semver.caret('1.6.0'),
description: 'High level abstractions on top of cdk8s',
repository: 'https://github.com/awslabs/cdk8s.git',
authorName: 'Amazon Web Services',
authorUrl: 'https://aws.amazon.com',
peerDependencies: {
constructs: constructsDependency,
cdk8s: cdk8sDependency,
},
dependencies: {
minimatch: Semver.caret('3.0.4'),
cdk8s: cdk8sDependency
},
bundledDependencies: [ 'minimatch' ],
devDependencies: {
'@types/minimatch': Semver.caret('3.0.3'),
},
stability: 'experimental',
java: {
javaPackage: 'org.cdk8s.plus',
mavenGroupId: 'org.cdk8s',
mavenArtifactId: 'cdk8s-plus'
},
python: {
distName: 'cdk8s-plus',
module: 'cdk8s_plus'
},
dotnet: {
dotNetNamespace: 'Org.Cdk8s.Plus',
packageId: 'Org.Cdk8s.Plus'
}
});

// override the default "build" from projen because currently in this
// repo it means "compile"
project.addScripts({
build: 'jsii --silence-warnings=reserved-word && yarn docgen'
});

project.synth();
18 changes: 18 additions & 0 deletions packages/cdk8s-plus/.versionrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"packageFiles": [
{
"filename": "version.json",
"type": "json"
}
],
"bumpFiles": [
{
"filename": "version.json",
"type": "json"
}
],
"commitAll": true,
"scripts": {
"postbump": "yarn projen && git add ."
}
}
Loading