Skip to content

v2.0.0

Choose a tag to compare

@github-actions github-actions released this 26 Mar 19:35
· 4 commits to refs/heads/2.x since this release

2.0.0 (2025-03-26)

⚠ BREAKING CHANGES

  • lib: the deprecated API Duration.toISOString() has been removed. Use Duration.toIsoString() instead.
  • lib: CAUTION! Auto-generated resource names will change with this release. Resource names in manifests synthesized by a previous version of the CDK8s will be invalidated. Deploying new manifests will cause resources to be replaced. Temporarily, you can opt to use the legacy hashing mechanism by setting the environment variable CDK8S_LEGACY_HASH=1.
  • lib: Names.toDnsLabel() now accepts a construct scope instead of a string path, and a set of options instead of maxLen.
  • lib: Names.toLabelValue() now accepts a construct scope instead of a string path, and a set of options instead of maxLen.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

  • plus-17: All L2 resource names will undergo a name change (e.g test-chart-config-configmap-233db8e7 -> test-chart-config-c3f7d3c0)

Resolves cdk8s-team/cdk8s#373

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

  • Construct input types generated by cdk8s import are now called XxxProps instead of XxxOptions to conform with the CDK ecosystem.
  • core: ApiObjectOptions is now called ApiObjectProps
  • core: AppOptions is now called AppProps
  • core: ChartOptions is now called ChartProps
  • core: HelmOptions is now called HelmProps
  • core: IncludeOptions is now called IncludeProps
  • cli: when importing k8s api objects using cdk8s import, non-stable APIs will be have an API level postfix. For example, k8s@1.18 will have an IngressV1Beta1 API object.
  • cli: The --include CLI option has been removed since all API objects are always imported.
  • cli: When using the CLI to import the core Kubernetes API objects, the imported classes will now have a Kube prefix in order to make it easier to differentiate them from the classes offered by the high-level APIs in CDK8s+ (e.g. k8s.Deployment is now k8s.KubeDeployment). You can disable through the --no-class-prefix option: cdk8s import --no-class-prefix k8s.
  • plus: Containers now need to be inputed as interfaces rather than classes. Instead of passing new kplus.Container(props), simply pass in props.

Resolves cdk8s-team/cdk8s#365

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

  • lib: EnvValue.fromSecret(secret, key) has been removed in favor of EnvValue.fromSecretValue({ secret, key }).

  • plus: spec was removed from all cdk8s+ constructs and that now have a flat structure. See Example for new usage.

  • plus: Construct id's for deployment will change due to a latent bug that appended the word pod to them.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

  • plus: deployment.expose() now takes port as a positional argument (before: deployment.expose({ port }), now: deployment.expose(port)).

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

  • lib: auto-generated resource names that included duplicate hyphens will change will be replaced when applied.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

  • lib: cdk8s-plus's value of a label cdk8s.deployment of Pods are changed

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

  • lib: resource names will now be rendered differently, omitting adjacent duplicate components.

Signed-off-by: campionfellin campionfellin@gmail.com

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

  • lib: cdk8s discontinues support for the onPrepare and onSynthesis construct hooks. These methods will eventually be removed from the constructs programming model.
  • cli: enum string values are now proper enums instead of just strings.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

  • cli: the generated module names of imported CRDs now include the resource's group and not just its kind in order to ensure uniqueness. For example, when importing the Jenkins CRD, instead of 'imports/jenkins.ts, we now have imports/jenkins.io/jenkins.ts`.
  • cli: class names are now normalized to PascalCase.
  • please upgrade your dependency requirement for "constructs" to ^2.0.0

  • cli: cdk8s gen is now cdk8s import k8s and output goes to imports/k8s.ts instead of .gen/index.ts.

  • cli: cdk8s import now generates a single file with all types, which means you will have to modify TypeScript code to import { Deployment, Pod, ... } from './imports/k8s' instead of importing multiple files.

  • plus: Remove the spec nesting level on both input and output (#347) (5e34850)

  • upgrade jsii & constructs (#80) (f917e0a)

Features

Bug Fixes

  • colors breaks cli (#172) (3360654)
  • synth output in stdout mode cannot be piped to kubectl (#668) (e086986), closes #667
  • yaml not found in jsii languages (39ef409)
  • added release_override github action to allow creating temporary github release (5000115)
  • allow tests to run without write access to os.tmpdir parent (#338) (dc17022)
  • cdk8s init is failing (#140) (e813723), closes #139
  • cdk8s: autogenerated names fail validation for some resource types (#18) (b70e4fe), closes #16
  • cli does not work when used from a symlink (#11) (4bd3a37)
  • cli-init: install "constructs" instead of "@aws-cdk/core" (6ccc03f)
  • cli: allow any python 3 to be used (#518) (2a49196)
  • cli: Conform python and java package names to language standards (no hyphens) (#283) (f0b33c0)
  • cli: importing local files is broken on windows (#427) (2c4a185)
  • cli: impossible to import two crds with same kind (#203) (f6248ce)
  • cli: init could not find a version that matches cdk8s0-13-0 (e1267f6)
  • cli: new typescript apps cannot be created with @next versions (#55) (119d95c)
  • cli: options type not generated for certain CRDs (#229) (0cbaf19), closes #219
  • cli: python init template doesn't install cdk8s-plus in the correct env (#399) (0d3017b)
  • cli: python init templates are broken (#393) (d786001)
  • cli: typescript-app does not include main.ts (43b435a)
  • cli: unable to import a crd that has no schema (#132) (b8115cb)
  • cli: unable to import CRDs with non-trivial "xxxOf" constraints (#212) (18136ed), closes #171
  • cli: unable to import types with all-caps TLAs (#211) (a11d0e8), closes #209
  • code generating enum values containing !, =, ~ are stripped (#1738) (53815be)
  • crd: Ensure yaml doc is defined before casting to CustomResourceApiObject (#130) (03e6d84)
  • crd: fix multi-resource importing of CRDs (#78) (fd8f753)
  • crd: import a CRD from an insecure server (#102) (4dde096), closes #94
  • docs: align getting started with new code (#410) (c61e109)
  • docs: correct logo paths (#503) (9426047)
  • docs: do not mark arguments as optional in python getting-started (#191) (be090d0)
  • docs: top-level "getting started" page not found (#120) (eb9d2ad), closes #106
  • docs: typo of helm doc (#566) (7d5c97e)
  • docs: WebService typescript example formatting (#408) (e2470f9)
  • dummy to trigger release (#2410) (4cb7569)
  • error displays after manifests are successfully generated (#176) (b3af38c)
  • examples: "replicas" option is not respected in the web-service example (#87) (97ca582)
  • examples: Add missing dependencies on python examples. (#290) (36e6fab), closes #289
  • Fix yaml quote serialization 325 (#327) (6b1f662), closes #325
  • gha: Fix conditional homebrew release script (5ecb143)
  • gha: prevent gha from running on forks (26eb407)
  • go: cdk8s init fails go golang app when cli is installed via yarn (#1020) (e303145), closes /github.com/cdklabs/jsii-srcmak/blob/main/package.json#L61
  • go: invalid go module name (87af61b)
  • helm chart url is considered as crd during helm synthesis (#1513) (03a05cb)
  • import: flattenAdditionalValues does not handle arrays properly (#1552) (42b1430)
  • import strips out enums with spaces (#196) (379116f), closes #108 #109
  • import-crd: non typescript languages fail for crds with a common group id (#202) (5f5b802)
  • import: allow + , * and : in enums (#1181) (ee5f985), closes #1072 #267
  • import: cannot import props that have non-standard capitalization (#43) (5e2b300)
  • import: CRDs not including metadata field (#44) (1bb6c62)
  • import: duplicate properties are emitted when they differ only by case (#2721) (a7e4ae2)
  • import: fail to import CRD without a schema (#417) (3a3fce7)
  • import: fails if executed without a cdk8s.yaml config (#1460) (f6115a8)
  • import: failure when multiple versions of the same CRD exist in different obejcts (#1042) (18e6eda)
  • import: incorrect and unnecessary properties recorder to cdk8s.yaml on cdk8s import (#1315) (39babea)
  • import: missing versions when importing multi-version crd (#387) (74cb37e)
  • import: some resource don't place metadata immediately after apiVersion and kind (#324) (e8efa45), closes #323 #323
  • imports: Specify moduleName overrides for imports (#84) (63daf78)
  • improve error messages around imports (#200) (b8f89f2), closes #192
  • init python-app errors on Windows (#64) (aff9e4e)
  • init-typescript: cdk8s synth fails if ts-node is not globally installed (#896) (8ab563d), closes cdk8s-team/cdk8s#1273
  • init: init templates are using an unmanitained version of cdk8s-plus (#2555) (96836cd)
  • init: pipenv installation instructions leads to broken ssl website (#1241) (ccf0333)
  • init: python and java init is broken due to invalid versions (#8) (a13f6e9)
  • init: typescript project initialization may fail on windows (#1165) (4018306)
  • input type names are "XxxOptions" instead of "XxxProps" (#381) (b2bd34e), closes #371
  • java importing crd fails (#257) (f0ef3b4)
  • Lazy is not resolved in metadata (#443) (914d4a8)
  • lib: uniqueId is not compatible with the k8s labels (#326) (161f368), closes #323
  • lib: corrupted manifests when including large files (#350) (649f41b)
  • lib: deprecated toISOString() conflicts with toIsoString() (#524) (d4e0c3d)
  • lib: duplicate hyphens in generated resource names (#341) (6f6366a)
  • lib: ENOBUFS for large helm charts (#529) (4164f38), closes #454
  • lib: fail to import octal numbers via include (and helm) (#349) (bed9eed), closes #348
  • lib: names generated using non-FIPS compliant algorithm (#392) (a1acae7), closes #334
  • lib: unable to express empty objects and array (#200) (9ae5efb)
  • move output of java imports into /src/main/java (#240) (9445358)
  • multiline string with line greater than 80 characters lose newlines (#589) (e95b8a1), closes #588
  • not folding strings (#495) (8dda8bd), closes #494
  • plus-17: adds externalName to service props (#424) (b4b7c55)
  • plus-17: don't allow containers to be contructed from containers (#404) (5d11533)
  • plus-17: L2 default child (#389) (a8337e8)
  • plus-17: multiple mounts per volume result in duplicate volumes for pod spec (#489) (47c913e)
  • plus: support node ports for cdk8s-plus service (#315) (85ec225), closes #296
  • readme: hello example link is broken #74 (0b858cf)
  • readme: missing information about imports in cdk8s-cli readme (#108) (e9f291e)
  • redirect: Handle 302 redirect case when importing from remote url (#131) (1ed88ca)
  • set yaml default schema to 1.1 (#505) (266c094)
  • synth: construct-metadata is recorded by default (#865) (f125511), closes /github.com/cdk8s-team/cdk8s-core/blob/2.x/src/app.ts#L48-L54 /github.com/cdk8s-team/cdk8s-cli/blob/2.x/src/util.ts#L53
  • templates: tell jest to prefer ts files over compiled js files (#2194) (78bddda)
  • tests and deps (a1eda3c)
  • tokens are not resolved during synthesis (1529ed7)
  • typescript app template does not compile on Windows (#421) (43d9db1), closes cdk8s-team/cdk8s-cli#362
  • typescript-app template broken for npm > 7 (#362) (77bc7b3)
  • unable to require package.json (#585) (1224fd5)
  • union types could not be synthesized (4807d40)
  • union types could not be synthesized (5a47262)
  • unquoted paths cannot be executed on windows (#63) (a413901)
  • website: doc links are broken due to wrong version number (#312) (f2f9402), closes #307
  • which command missing for windows (#417) (38a7034)