Skip to content

Commit

Permalink
feat: warning on v1 end-of-life (#2710)
Browse files Browse the repository at this point in the history
  • Loading branch information
iliapolo authored Sep 10, 2024
1 parent a4ee657 commit 276eeca
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# cdk8s-cli

> ⚠️ Version 1.x of the cdk8s toolchain is deprecated and will become end-of-life on 01/01/25.
> **[We strongly recommend migrating to `2.x`](https://cdk8s.io/docs/latest/migrating-from-1.x/)**
### A command-line-interface for CDK for Kubernetes

**cdk8s** is a software development framework for defining Kubernetes
Expand Down
10 changes: 9 additions & 1 deletion src/cli/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
import { yellow } from 'colors';
import { yellow, red } from 'colors';
import * as yargs from 'yargs';
import { upgradeAvailable } from '../upgrades';

if (new Date() < new Date('2025-01-01')) {
console.warn(yellow('⚠️ Version 1.x of the cdk8s toolchain is deprecated and will become end-of-life on 01/01/25.'));
console.warn(yellow('We strongly recommend migrating to 2.x. See https://cdk8s.io/docs/latest/migrating-from-1.x/'));
} else {
console.warn(red('⚠️ Version 1.x of the cdk8s toolchain is end-of-life (since 01/01/25).'));
console.warn(red('We strongly recommend migrating to 2.x. See https://cdk8s.io/docs/latest/migrating-from-1.x/'));
}

async function main() {
const ya = yargs
.option('check-upgrade', { type: 'boolean', desc: 'Check for cdk8s-cli upgrade', default: true })
Expand Down

0 comments on commit 276eeca

Please sign in to comment.