Skip to content

Releases

v1.23.0

Choose a tag to compare

@github-actions github-actions released this 23 Nov 14:05

Changelog

Resetting Credentials

--reset-credentials now works for databases. It generates new credentials and waits until they are applied:

nctl update postgresdatabase mydb --reset-credentials

This works for mysql, postgres, mysqldatabase, postgresdatabase, keyvaluestore, opensearch and bucketuser.

nctl update bucketuser --reset-credentials now asks for confirmation like the other resources. Pass --force to skip it.

Retrieving Credentials

After creating a resource or resetting its credentials, nctl shows the command to retrieve them, for example:

nctl get postgresdatabase mydb --project myproject --print-connection-string

Dependencies

  • Go 1.26.11
  • go.opentelemetry.io/otel/* 1.47.0

v1.22.0

Choose a tag to compare

@github-actions github-actions released this 12 Nov 07:29
b570507

Changelog

⚠️ Behavior Changes

  • Credentials are stored in the keyring of the operating system. See Credentials in the Keyring.
  • The kubeconfig no longer contains the API client secret of an APIServiceAccount login. Kubeconfigs written by earlier versions keep working.
  • nctl get grafana shows more columns. The table now includes LOCATION and HIGH AVAILABILITY. Scripts parsing the table by column position need to be adjusted, or use -o yaml/-o json.
  • nctl auth logout reports a failed logout request. It used to ignore errors of the OIDC logout endpoint.

Credentials in the Keyring

nctl auth login stores the OIDC tokens and the client secrets of APIServiceAccounts in the keyring of the operating system (Keychain on macOS, Secret Service on Linux, Credential Manager on Windows) instead of plain text files.

Where no keyring is available, such as on headless servers or in CI, nctl falls back to files only the user can read and prints a warning. To use files without the warning, pass --insecure-storage:

nctl auth login --api-client-id=... --api-client-secret=... --organization=... --insecure-storage

Existing logins survive the upgrade. If your kubeconfig still contains a client secret from an earlier version, nctl shows the command to move it into the keyring:

nctl auth login --api-client-id=<id> --api-client-secret=<secret> --organization=<org>

NCTL_API_CLIENT_SECRET and --api-client-secret still take precedence over the stored secret.

Build Type of Applications

nctl create application and nctl update application gained a --build-type flag, which selects how an application is built: dockerfile, heroku or paketo.

nctl update application my-app --build-type=dockerfile

Applications can now be switched between Dockerfile and buildpack builds. Changing the build type triggers a new build, and the current release stays active until the new build succeeds.

--dockerfile (create) and --buildpack-stack (create and update) keep working but are deprecated in favour of --build-type.

Backup Time and Retention of Databases

mysqldatabase and postgresdatabase gained --backup-daily-time and --backup-ttl on create and update:

nctl update postgresdatabase my-db --backup-daily-time=01:30 --backup-ttl=168h
  • --backup-daily-time sets the time of day (HH:MM, Europe/Zurich) of the daily backup. Without it, a time between 02:00 and 03:59 is chosen.
  • --backup-ttl sets how long scheduled backups are kept, between 24h and 720h. On update, 0 resets it to the default.

Grafana Location and High Availability

nctl create grafana gained --location and --high-availability:

nctl create grafana my-grafana --high-availability

High availability runs Grafana with multiple replicas, so it stays available during maintenance and node failures. It cannot be changed after creation.

deplo.io Events in Application Logs

The deplo.io events of an application are now part of its logs. To show only the events:

nctl logs application my-app -t event

Fixes

  • Repeating --delete-env or --delete-build-env on nctl update application now deletes all the given variables instead of only the last one.
  • Application logs show the scheduled job label instead of the deploy job label twice.

Go API

For users of the github.com/ninech/nctl/api package: api.New keeps secrets in api.KeyringCredentials by default, and api.WithCredentials replaces them. StaticToken no longer takes a context, and GetTokenFromConfig and GetTokenFromExecConfig take the credentials to read the secrets from.

Commits

  • f2a4679 Merge pull request #491 from ninech/handle-repeated-flag
  • d358dd8 Merge pull request #495 from ninech/events-log
  • 366b515 Merge pull request #496 from ninech/dirk/add_time_ttl
  • 243d5f3 Merge pull request #497 from ninech/allow-dockerfile-switch
  • 324121b Merge pull request #498 from ninech/build-type-flag
  • b570507 Merge pull request #499 from ninech/grafana-location-ha
  • 67c6acc build(deps): bump crate-ci/typos from 1.50.3 to 1.51.1
  • fba275d build(deps): bump github.com/grafana/loki/v3 from 3.7.6 to 3.7.9
  • 8a4239f build(deps): bump github.com/int128/kubelogin from 1.36.3 to 1.36.4
  • 333d037 build(deps): bump k8s.io/client-go from 0.37.1 to 0.37.2
  • 9a75ec6 feat(application): add --build-type flag
  • e45aa3d feat(auth): store credentials in the keyring of the operating system
  • bb45fb6 feat(databases): add BackupDailyTime & BackupTTL
  • 291d71e feat(grafana): add location and high availability
  • 03eda9a feat(logs): show the deplo.io events of applications
  • 272d266 feat(update): allow switching applications between dockerfile and buildpack builds
  • 718b192 fix(logs): show the scheduled job label in application logs
  • 50a2798 fix(update): accumulate repeated --delete-env and --delete-build-env flags
  • 830b26b refactor(grafana): rely on the API default of the location
  • 562301d test(get): synchronize the watch test with the watch

v1.21.0

Choose a tag to compare

@github-actions github-actions released this 27 Oct 15:55
abd386e

Changelog

⚠️ Behavior Changes

Some changes in this release can affect scripts using nctl:

  • Diagnostics and errors go to stderr. Warnings, spinners, confirmation prompts and errors are now written to stderr instead of stdout. They no longer corrupt the output of a command, such as nctl get all -o json, and prompts still show when stdout is redirected. Scripts reading warnings or errors from stdout need to read stderr instead. Usage output on parse errors stays on stdout.
  • Failures exit with a non-zero exit code. Some errors, such as a blocked public IP in nctl exec, exited with 0. They now exit with an error code. Empty results of nctl get still exit with 0.
  • Changed connection strings. --print-connection-string now includes the port explicitly and URL-encodes the credentials. PostgreSQL connection strings use the postgresql:// scheme. See Unified Print Flags for Services.
  • --filename is required. nctl apply, nctl create and nctl delete with a manifest report a missing -f/--filename as a usage error (exit code 80) before running.
  • --service takes one service per flag. Repeat the flag to pass more than one service reference to nctl create application and nctl update application.

Reset Credentials of Databases and Key Value Stores

nctl update gained a --reset-credentials flag for mysql, mysqldatabase, postgres, postgresdatabase, keyvaluestore and opensearch. It generates new credentials and waits until the resource is available with them again:

nctl update postgresdatabase my-db --reset-credentials

Clients using the current credentials lose access, so nctl asks for confirmation first. Pass --force to skip it. Declining cancels the whole update.

Databases and key value stores usually get their new credentials within seconds, while instances can take a few minutes.

Unified Print Flags for Services

All on-demand services now offer the same print flags: --print-user, --print-password, --print-connection-string and --print-ca-cert.

  • keyvaluestore gained --print-user and --print-connection-string (rediss://). --print-password replaces --print-token, which keeps working but is hidden.
  • opensearch gained --print-connection-string.

The printed connection strings now match the DSNs injected into deplo.io applications by service connections:

nctl get postgresdatabase my-db --print-connection-string
postgresql://user:password@my-db.example.com:5432/my-db?sslmode=require

If the service is not ready yet, nctl returns an error instead of a malformed connection string.

Time Zones for Scheduled Jobs

Scheduled jobs of applications can now run in a time zone other than UTC:

nctl create application my-app --scheduled-job-name=report \
  --scheduled-job-command="bundle exec rake report" \
  --scheduled-job-schedule="0 8 * * *" \
  --scheduled-job-time-zone=Europe/Zurich

nctl update application accepts --scheduled-job-time-zone as well.

Shell Completion for API Fields

Shell completion now suggests the values of API fields, such as locations, machine types and versions of storage services, and the help of these flags lists their available values.

nctl get all With Project Scoped Service Accounts

nctl get all no longer needs access to the organization when listing a single project, so it works with API service accounts scoped to a project. --all-projects still requires access to the organization.

Other Fixes

  • Multiple --service flags with the same name but different kinds no longer overwrite each other on nctl update application.
  • nctl update application handles scheduled job fields correctly.
  • The spinner shows again while nctl tests access to the git repository of an application.
  • The help of nctl update mysql --sql-mode no longer shows a default, as omitting the flag keeps the current modes.
  • Shell completion handles flags more reliably.
  • nctl get build --pull-image uses the current Docker client libraries, resolving govulncheck alerts.

v1.20.0

Choose a tag to compare

@thde thde released this 25 Aug 10:06
9d99b4c

Changelog

New Database Defaults and Versions

Following the new EOL lifecycle for business databases:

Setting Before Now
Default Location nine-cz41 nine-cz42
Default Version MySQL 8 8.4
Selectable Versions MySQL 8 8.4
Default Version PostgreSQL 17 18
Selectable Versions Postgres 17, 16, 15 18, 17

nctl create mysql gained a --mysql-version flag, matching the existing --postgres-version:

nctl create mysql my-db --mysql-version=8.4

Automatic Location Fallback for Databases

When a MySQL or PostgreSQL instance is created without --location, and the default location does not currently accept new resources, nctl now retries in one of the locations the API reports as available instead of failing:

nctl create mysql my-db
⚠ the default location does not currently accept new MySQL resources, creating in "nine-es34" instead. The location cannot be changed later, pass --location to choose a different one.

The fallback is only used when no location was requested explicitly. If --location is set, the error is returned as before.

TLS in Printed MySQL Connection Strings

Connection strings printed for MySQL instances and databases now carry ssl-mode=REQUIRED, matching what PostgreSQL already did with sslmode=require.

nctl get mysqldatabase my-db --print-connection-string
mysql://user:password@my-db.example.com/my-db?ssl-mode=REQUIRED

Locations in nctl get all

nctl get all now shows a LOCATION column, listing the location of every resource that has one, and <none> for the ones that don't:

nctl get all
PROJECT  NAME    KIND               GROUP                   LOCATION
dev      banana  Application        apps.nine.ch            <none>
prod     orange  KubernetesCluster  infrastructure.nine.ch  nine-cz42

Empty Lists With -o yaml

nctl get ... -o yaml now prints an empty list when nothing is found, the same as -o json already did.

What's Changed

  • feat(create): retry in another location by @9marco in #443
  • fix: return empty list for -o yaml when nothing is found by @SaadAssaf in #444
  • build(deps): update github.com/ninech/apis by @9marco in #437
  • chore: update dependencies and specifically the ninech/apis package by @shieldwed in #446

Full Changelog: v1.19.0...v1.20.0

v1.19.0

Choose a tag to compare

@thde thde released this 07 Aug 13:51

Changelog

Debian 13 (trixie) for CloudVMs

CloudVMs can now be created with Debian 13:

nctl create cloudvm my-vm --os=debian13

SSH Key Flags

The SSH public key flags of the CloudVM and database commands now share the same
spelling, --ssh-keys and --ssh-keys-from-files:

Command Before Now
create cloudvm --public-keys
--public-keys-from-files
--ssh-keys
--ssh-keys-from-files
update cloudvm --rescue-public-keys
--rescue-public-keys-from-files
--rescue-ssh-keys
--rescue-ssh-keys-from-files
create/update mysql, postgres --ssh-keys
--ssh-keys-file
--ssh-keys
--ssh-keys-from-files

The old flag names keep working but are hidden from the help output and print a
deprecation warning.

Alongside the rename:

  • Keys from flags and from files can be combined, they are no longer mutually exclusive.
    Repeat either flag to pass more than one key or file.
  • Keys are validated to be in SSH format as defined in RFC4253 before the resource is sent to the API,
    instead of failing later on.
  • Rescue keys can be cleared by passing an empty value:
    nctl update cloudvm my-vm --rescue-ssh-keys=""

Updates Without Changes

nctl update no longer exits with an error when the resource is already in the requested state,
it reports that no changes were made and exits with 0:

nctl update cloudvm --on cloudvm-veeZoop4
 ℹ no changes made to CloudVirtualMachine "cloudvm-veeZoop4"

What's Changed

  • feat(cloudvm): add support for Debian 13, codenamed trixie by @thde in #438
  • fix(update): do not error for unchanged resources by @thde in #440
  • fix(update): do not try to guess if flags were provided by @thde in #442
  • build(deps): bump actions/setup-go from 6 to 7 by @dependabot[bot] in #431
  • build(deps): bump github.com/alecthomas/kong from 1.14.0 to 1.16.0 by @dependabot[bot] in #433
  • build(deps): bump github.com/crossplane/crossplane-runtime from 1.20.0 to 1.20.10 by @dependabot[bot] in #434
  • build(deps): bump github.com/prometheus/common from 0.67.5 to 0.70.1 by @dependabot[bot] in #432
  • build(deps): update dependencies by @thde in #436
  • build(deps): bump github.com/grafana/loki/v3 from 3.6.5 to 3.7.4 by @dependabot[bot] in #435

Full Changelog: v1.18.2...v1.19.0

v1.18.2

Choose a tag to compare

@github-actions github-actions released this 30 Jul 09:06
b1a1db3

Changelog

This release contains various fixes for nctl.

What's Changed

  • fix: return non-zero exit code if project is not found by @rnestler in #417
  • detect no-op updates and return error instead of silent success by @SaadAssaf in #418
  • update brew instructions by @thirdeyenick in #419
  • fix: pass existing git auth secret to validator before constructing it by @thirdeyenick in #420
  • build(deps): bump crate-ci/typos from 1.47.0 to 1.48.0 by @dependabot[bot] in #421
  • build(deps): bump actions/checkout from 6 to 7 by @dependabot[bot] in #422
  • build(deps): bump github.com/int128/kubelogin from 1.36.1 to 1.36.2 by @dependabot[bot] in #424
  • build(deps): bump k8s.io/client-go from 0.36.1 to 0.36.2 by @dependabot[bot] in #426
  • fix: reject -f flag combined with a resource kind on create by @SaadAssaf in #430

Full Changelog: v1.18.1...v1.18.2

v1.18.1

Choose a tag to compare

@thde thde released this 16 Jun 15:07
1988fbd

Changelog

This release contains various fixes for nctl.

What's Changed

  • enable docker client auto-negotiation by @thirdeyenick in #415
  • fix: nctl login suggestion text by @thirdeyenick in #401
  • fix: skip authentication for non-interactive commands by @thde in #402
  • fix(exec): avoid panic when redirecting application exec output by @thde in #404
  • fix(update): support unpausing applications with --no-pause by @thirdeyenick in #405
  • change the help text for default buildpack stack by @thirdeyenick in #406
  • fix(application): set default replicas on create, allow unsetting on update by @thirdeyenick in #407
  • build(deps): bump crate-ci/typos from 1.46.0 to 1.47.0 by @dependabot[bot] in #409
  • build(deps): bump k8s.io/client-go from 0.36.0 to 0.36.1 by @dependabot[bot] in #410
  • build(deps): bump k8s.io/kubectl from 0.36.0 to 0.36.1 by @dependabot[bot] in #411

Full Changelog: v1.18.0...v1.18.1

v1.18.0

Choose a tag to compare

@thde thde released this 08 May 13:08

Changelog

nctl exec for On-Demand Services

Adds nctl exec sub-commands for connecting directly to on-demand services: PostgreSQL instances and databases, MySQL instances and databases, and KeyValueStore. Using their native CLI clients.

❯ nctl exec postgresdatabase test
psql (18.3, server 17.9 (Ubuntu 17.9-1.pgdg24.04+1))
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, compression: off, ALPN: postgresql)
Type "help" for help.

05571f2_e4416af=>

The following commands have been added:

  • nctl exec postgres <name> connects to a Postgres instance via psql
  • nctl exec postgresdatabase <name> connects to a PostgresDatabase via psql
  • nctl exec mysql <name> connects to a MySQL instance via mysql
  • nctl exec mysqldatabase <name> connects to a MySQLDatabase via mysql
  • nctl exec keyvaluestore <name> connects to a KeyValueStore via redis-cli

Access Management

For instance-level resources (Postgres, MySQL, KeyValueStore), the command detects the caller's public IP via ip.nine.ch, checks whether it is already in the allowed CIDR list, and if not prompts the user for confirmation before adding it.

The resource is then patched and connectivity is awaited before launching the CLI.

Import from stdin

The command also supports importing using stdin like so:

mysqldump -h source.example.com -u user -ppass mydb | nctl exec mysqldatabase mydb
pg_dump -h source.example.com -U user mydb | nctl exec postgresdatabase mydb

Following Logs

Previously, following logs for older apps could fail or be very slow. With the default 30-day window, apps with a lot of logs could force Loki to establish a live tail over a large historical range. This puts pressure on queriers and query frontends.

Now, we first fetch the requested backlog with the range query API, then start the WebSocket tail from the end of that range.

What's Changed

  • feat(exec): add exec support for on-demand services by @thde in #369
  • feat: avoid historical Loki live-tail queries by @pawelkuc in #397
  • fix: use maps instead of golang.org/x/exp/maps by @SaadAssaf in #399
  • build(deps): bump github.com/int128/kubelogin from 1.36.0 to 1.36.1 by @dependabot[bot] in #394
  • build(deps): bump github.com/mattn/go-isatty from 0.0.20 to 0.0.22 by @dependabot[bot] in #393
  • build(deps): bump crate-ci/typos from 1.45.0 to 1.46.0 by @dependabot[bot] in #391
  • build(deps): bump k8s.io/kubectl from 0.35.2 to 0.36.0 by @dependabot[bot] in #395

Full Changelog: v1.17.1...v1.18.0

v1.17.1

Choose a tag to compare

@gajicdev gajicdev released this 29 Apr 14:07
c788086

What's Changed

New Contributors

Full Changelog: v1.17.0...v1.17.1

v1.17.0

Choose a tag to compare

@gajicdev gajicdev released this 22 Apr 08:58
53c2a6e

What's Changed

  • fix: rebuild on language change by @thirdeyenick in #373
  • refactor: PostgresDatabase Collation Hint by @sislr in #374
  • build(deps): bump docker/login-action from 3 to 4 by @dependabot[bot] in #375
  • build(deps): bump crate-ci/typos from 1.44.0 to 1.45.0 by @dependabot[bot] in #376
  • build(deps): bump golang.org/x/oauth2 from 0.35.0 to 0.36.0 by @dependabot[bot] in #378
  • build(deps): bump k8s.io/api from 0.35.2 to 0.35.3 by @dependabot[bot] in #380
  • build(deps): bump k8s.io/client-go from 0.35.2 to 0.35.3 by @dependabot[bot] in #379
  • build(deps): bump github.com/int128/kubelogin from 1.35.2 to 1.36.0 by @dependabot[bot] in #381
  • refactor: rename config to project-config and add config as alias by @SaadAssaf in #383
  • refactor: make help output more readable by @SaadAssaf in #386
  • feat(grafana): add command by @thirdeyenick in #387
  • add service linking for deploio apps by @gajicdev in #388

Full Changelog: v1.16.0...v1.17.0

⌂ 换网址