2.0.0 (2024-02-28)
⚠ BREAKING CHANGES
- service:
service.addDeployment
was removed. Useselector
instead. Also,service.serve
is renamed toservice.bind
. - You must now pass a
scope
andid
to imported and selected resources - container: Use
container.env.addVariable()
instead ofcontainer.addEnv()
. Propertyenv
of container renamed toenvVariables
.
Resolves #346
Signed-off-by: Eli Polonsky epolon@amazon.com
- The interface
Resources
is now namedContainerResources
.
Signed-off-by: Christopher Rybicki rybickic@amazon.com
- workload:
defaultSelector
renamed toselect
.selectByLabel
renamed toselect
and underwent an API change:deployment.selectByLabel('key', 'value') -> deployment.select(LabelSelector.equals('key', 'value'))
deployment.expose
renamed todeployment.exposeViaService
deployment.expose
andservice.addDeployment
now accept aport
as part of the options, and not a positional argument.
Features
cdk8s-plus
is now a release-candidate (#761) (a4d512d)Role
,ClusterRole
,RoleBinding
,ClusterRoleBinding
L2s (#432) (aeaba6e), closes #24 #25 #26 #374v2.0.0
(#1310) (7d296a0)- bump cdk8s to version
2.x
(#696) (814af13) - bump minimum node version to 14.x (#697) (cb1953d)
- classes for common secret types (#473) (716fb13), closes #344
- config-map: immutable maps (#520) (e95ceb9)
- container lifecycle hooks (#484) (06fd7d9)
- Container resource requirements and HPA (#390) (34621b1), closes #27
- container, pod: default
runAsNonRoot
to true (#1143) (ca5d61c) - container:
allowPrivilegeEscalation
property (#1144) (5a1031a) - container: default
readOnlyRootFilesystem
to true (#1139) (0fc0794) - container: default container resource requirements (#1082) (212dc28)
- container: default container startup probe (#1093) (839b14a)
- container: default container UID and GID (#1094) (0b6f25b)
- container: ephemeral storage resource requirements (#962) (283bff6), closes #984
- container: multiple ports and advanced config properties (#1110) (eb29030)
- container: populate env from
ConfigMap
andSecret
(#688) (39ecc47) - cronjob: introduce
CronJob
construct (#1052) (716738c) - daemon-set: introduce L2 (#504) (fbc9f0a)
- default port when exposing deployment (#41) (4ff7fa3)
- deployment:
minReadySeconds
andprogressDeadlineSeconds
(#515) (c94b826) - deployment: set default replica count to 2 (#1138) (c4bec8a)
- deployment: upgrade strategy (#521) (5dcaced)
- deps: upgrade compiler dependencies (#2350) (8606e48)
- deps: upgrade compiler dependencies (#2360) (eb331c3)
- deps: upgrade compiler dependencies (#2368) (0db80bd)
- deps: upgrade compiler dependencies (#2380) (7e57f71)
- deps: upgrade compiler dependencies (#2395) (3d1c962)
- deps: upgrade compiler dependencies (#2468) (8626b2b)
- deps: upgrade compiler dependencies (#2483) (f81dc2a)
- deps: upgrade compiler dependencies (#2513) (2e81ed4)
- deps: upgrade compiler dependencies (#2578) (51232d9)
- deps: upgrade compiler dependencies (#2709) (6804a8f)
- Env var from fieldRef/resource support (#263) (650096f)
- everything is a construct (#747) (24d9f61)
- expose L1 constructs (#1126) (82eae15)
- expose service via ingress (#51) (b6bbc0f)
- horizontal-pod-autoscaler: Introduce
HorizontalPodAutoscaler
construct (#1174) (406f343), closes #819 - ingress: resource backend (#687) (f030ecb)
- init containers (#451) (ac8c58d)
- network policies (#737) (9129708)
- opt out of service accounts auto mounting tokens (#658) (55aae7a)
- pod host aliases (#469) (21d4389), closes #378
- pod, workload: scheduling strategy (
affinity
,tolerations
,nodeName
) (#684) (6d02852) - pod:
hostNetwork
property (#1874) (9354583), closes #971 - pod: allow adding an existing
Container
object (#1512) (cc0ad56), closes #1508 - pod: allow passing an existing secret to
dockerRegistryAuth
(#1791) (9e2632f) - pod: docker registry auth (#516) (a943879)
- pod: isolate pod of all network connections (#1177) (58e4e67)
- pod: pod dns settings (#497) (d377378)
- pod: termination grace period (#2026) (c12e148)
- probe: ability to configure
scheme
(#958) (eeb37fd), closes #985 - pv & pvc (#483) (da892bc)
- pv: directly mount to container (#491) (c7de2d5), closes /github.com/cdk8s-team/cdk8s/pull/889#discussion_r836943364
- resource grant methods (#756) (9047d0e)
- role: create role bindings using imported service accounts (#1522) (051b2c0)
- role: imported resources can be granted permissions on (#1519) (2f8e862)
- Secret volume support (#211) (0e17fe8), closes #34
- secret: convert a secret to an
EnvValue
(#1643) (7523bcd) - secret: immutable secrets (#522) (ab16d59)
- security context (#455) (963e0b6)
- serviceaccount, pod: set automountServiceAccountToken to false (#1146) (987f6e8)
- service: select pods by selector (#755) (b5a1824)
- stabilize Ingress for cdk8s-plus-22 (#4) (46e5488)
- stateful-set:
minReady
support (#659) (cb67822) - stateful-set:
service
is now optional (#1223) (435f99d) - stateful-set: update strategy (#523) (e47888d)
- TCP socket probes (#383) (129d39f), closes /kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#probe-v1 #345
- volume:
hostPath
volume type (#781) (becda88), closes #780 - volume: azure, gce and aws volumes (#499) (31dc389)
- volume: CSI drivers (#1826) (1a4cbab)
- volume: nfs volume support (#2300) (#2302) (619a137)
- workload:
spread
property for easyhostname
andzone
spreading (#1176) (0847398) - workload: default
restartPolicy
toALWAYS
(#1145) (bf8e258) - workload: expression selectors and pod metadata integration (#660) (a3d88ac)
Bug Fixes
- branch regex doesn't capture current branch names (#48) (f75c50d)
- broken src imports (#1306) (a3bf0e1)
- callable import incompatible with esModuleInterop (#80) (e4a2c0f)
- cluster-role-binding: subject namespace is ignored (#914) (6900a8c)
- config-map: update examples in documentation (#1334) (b3a4ed5)
- container: default uid and gid might cause some images to break (#1437) (a3e3fc3)
- container: unable to set partial container resources (#741) (ae9e2f4)
- deployment:
exposeViaService
does not expose port names (#2170) (0cec06d), closes #1981 - deployment: exposed service doesn't propagate namespace (#882) (5d22227)
- deployment: unable to set
maxUnavailable
on a rolling update strategy (#724) (2c40476) - docs: incorrect API reference link in HPA overview (#1343) (efc873c)
- hpa: unable to target a deployment with a container that has volume mounts (#1438) (3c38b7d)
- ingress: add
ingressClassName
toIngressProps
(#2964) (3812d5e), closes #2856 - job: update examples in documentation (#1364) (ebe1b81)
- pod: unable to use
LabelSelector
class in python (#841) (f4d0e99), closes #745 #745 - release branch workflow (#6) (78f5fcb)
- secret: metadata not fully passed to super in child classes (#1665) (80d6dc7)
- update readme for v28 (#3769) (54988f6)
- volume: names can become too long (#1449) (5870790)