@@ -1331,8 +1331,7 @@ def _version_specific_upgrade(
13311331 provider_full_name = provider_enum_name_map [provider ]
13321332 if not config .get (provider_full_name , {}).get ("node_groups" , {}):
13331333 try :
1334- text = textwrap .dedent (
1335- f"""
1334+ text = textwrap .dedent (f"""
13361335 The default node groups for GCP have been changed to cost efficient e2 family nodes reducing the running cost of Nebari on GCP by ~50%.
13371336 This change will affect your current deployment, and will result in ~15 minutes of downtime during the upgrade step as the node groups are switched out, but shouldn't result in data loss.
13381337
@@ -1343,8 +1342,7 @@ def _version_specific_upgrade(
13431342
13441343 Would you like to upgrade to the cost effective node groups [purple]{ config_filename } [/purple]?
13451344 If not, select "N" and the old default node groups will be added to the nebari config file.
1346- """
1347- )
1345+ """ )
13481346 continue_ = kwargs .get ("attempt_fixes" , False ) or Confirm .ask (
13491347 text ,
13501348 default = True ,
@@ -1370,8 +1368,7 @@ def _version_specific_upgrade(
13701368 except KeyError :
13711369 pass
13721370 else :
1373- text = textwrap .dedent (
1374- """
1371+ text = textwrap .dedent ("""
13751372 The default node groups for GCP have been changed to cost efficient e2 family nodes reducing the running cost of Nebari on GCP by ~50%.
13761373 Consider upgrading your node group instance types to the new default configuration.
13771374
@@ -1380,8 +1377,7 @@ def _version_specific_upgrade(
13801377 As always, make sure to backup data before upgrading. See https://www.nebari.dev/docs/how-tos/manual-backup for more information.
13811378
13821379 The new default node groups instances are:
1383- """
1384- )
1380+ """ )
13851381 text += json .dumps (
13861382 {
13871383 "general" : {"instance" : "e2-highmem-4" },
@@ -1467,8 +1463,7 @@ def _version_specific_upgrade(
14671463
14681464 rich .print ("\n β οΈ Upgrade Warning β οΈ" )
14691465
1470- text = textwrap .dedent (
1471- """
1466+ text = textwrap .dedent ("""
14721467 Please ensure no users are currently logged in prior to deploying this
14731468 update.
14741469
@@ -1489,8 +1484,7 @@ def _version_specific_upgrade(
14891484 mounted.
14901485
14911486 For more details check our [green][link=https://www.nebari.dev/docs/references/release/]release notes[/link][/green].
1492- """
1493- )
1487+ """ )
14941488 rich .print (text )
14951489 keycloak_admin = None
14961490
@@ -1522,15 +1516,11 @@ def _version_specific_upgrade(
15221516 )
15231517 except ValueError as e :
15241518 if "invalid_grant" in str (e ):
1525- rich .print (
1526- textwrap .dedent (
1527- """
1519+ rich .print (textwrap .dedent ("""
15281520 [red bold]Failed to connect to the Keycloak server.[/red bold]\n
15291521 [yellow]Please set the [bold]KEYCLOAK_ADMIN_USERNAME[/bold] and [bold]KEYCLOAK_ADMIN_PASSWORD[/bold]
15301522 environment variables with the Keycloak root credentials and try again.[/yellow]
1531- """
1532- )
1533- )
1523+ """ ))
15341524 exit ()
15351525 else :
15361526 # Handle other exceptions
@@ -1633,8 +1623,7 @@ def _version_specific_upgrade(
16331623 ):
16341624 rich .print ("\n β οΈ Upgrade Warning β οΈ" )
16351625
1636- text = textwrap .dedent (
1637- """
1626+ text = textwrap .dedent ("""
16381627 In this release, we have updated our maximum supported Kubernetes version from 1.29 to 1.31.
16391628 Please note that Nebari will NOT automatically upgrade your running Kubernetes version as part of
16401629 the redeployment process.
@@ -1645,8 +1634,7 @@ def _version_specific_upgrade(
16451634
16461635 For more information on upgrading Kubernetes for your specific cloud provider, please visit:
16471636 https://www.nebari.dev/docs/how-tos/kubernetes-version-upgrade
1648- """
1649- )
1637+ """ )
16501638 rich .print (text )
16511639
16521640 # If the Nebari provider is Azure, we must handle a major version upgrade
@@ -1657,9 +1645,7 @@ def _version_specific_upgrade(
16571645
16581646 if config .get ("provider" , "" ) == "azure" :
16591647 rich .print ("\n β οΈ Azure Provider Upgrade Notice β οΈ" )
1660- rich .print (
1661- textwrap .dedent (
1662- """
1648+ rich .print (textwrap .dedent ("""
16631649 In this Nebari release, the Azure Terraform provider has been upgraded
16641650 from version 3.97.1 to 4.7.0. This major update includes internal schema
16651651 changes for certain resources, most notably the `azurerm_storage_account`.
@@ -1670,9 +1656,7 @@ def _version_specific_upgrade(
16701656
16711657 For detailed information on the Azure provider 4.x changes, please visit:
16721658 https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/guides/4.0-upgrade-guide
1673- """
1674- )
1675- )
1659+ """ ))
16761660
16771661 # Prompt user for confirmation
16781662 continue_ = kwargs .get ("attempt_fixes" , False ) or Confirm .ask (
@@ -1753,8 +1737,7 @@ def _version_specific_upgrade(
17531737 ]:
17541738 rich .print ("\n β οΈ Node Taints Update β οΈ" )
17551739
1756- text = textwrap .dedent (
1757- """
1740+ text = textwrap .dedent ("""
17581741 Starting with Nebari version 2025.4.1, node taints will be automatically applied to all non-general node groups by default.
17591742 Node taints help ensure that specific workloads run only on designated nodes,
17601743 improving resource utilization and isolation. This change will include:
@@ -1764,8 +1747,7 @@ def _version_specific_upgrade(
17641747
17651748 If you prefer not to use node taints, you can opt out by adding `taints: []`
17661749 to each node group definition in your nebari-config.yaml file.
1767- """
1768- )
1750+ """ )
17691751 rich .print (text )
17701752
17711753 provider_full_name = provider_enum_name_map .get (provider )
@@ -2074,9 +2056,7 @@ def _version_specific_upgrade(
20742056 namespace = config .get ("namespace" , "dev" )
20752057
20762058 rich .print ("\n β οΈ CRITICAL UPGRADE WARNING β οΈ" )
2077- rich .print (
2078- textwrap .dedent (
2079- f"""
2059+ rich .print (textwrap .dedent (f"""
20802060 This version includes a major [bold red]Keycloak upgrade[/bold red] from the [green]keycloak[/green] chart (15.0.2)
20812061 to the [green]keycloakx[/green] chart (7.1.3). This upgrade changes the underlying architecture
20822062 from JBoss/WildFly to Quarkus.
@@ -2092,9 +2072,7 @@ def _version_specific_upgrade(
20922072
20932073 After this upgrade step completes, you will need to run:
20942074 [cyan]nebari deploy -c { config_filename } [/cyan] to apply the changes
2095- """
2096- )
2097- )
2075+ """ ))
20982076 # Get all available contexts
20992077 contexts , active_context = kubernetes .config .list_kube_config_contexts ()
21002078
0 commit comments