Skip to content

Commit

Permalink
RP now defaults dns_name_prefix, remove az defaulting (#7451)
Browse files Browse the repository at this point in the history
  • Loading branch information
jim-minter committed Apr 8, 2024
1 parent f12b4e2 commit 97a89b8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
6 changes: 5 additions & 1 deletion src/fleet/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,8 @@ Release History
1.1.0
++++++
* Added new in-preview `az fleet updaterun skip` command.
* Fixed KubeConfig read bug within `az fleet get-credentials`.
* Fixed KubeConfig read bug within `az fleet get-credentials`.

1.1.1
++++++
* Removed automatic population of empty dns_name_prefix as this is handled server-side now.
10 changes: 0 additions & 10 deletions src/fleet/azext_fleet/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# --------------------------------------------------------------------------------------------

import os
import re
import json

from knack.util import CLIError
Expand Down Expand Up @@ -62,15 +61,6 @@ def create_fleet(cmd,
operation_group="fleets",
vm_size=vm_size
)
if dns_name_prefix is None:
subscription_id = get_subscription_id(cmd.cli_ctx)
# Use subscription id to provide uniqueness and prevent DNS name clashes
name_part = re.sub('[^A-Za-z0-9-]', '', name)[0:10]
if not name_part[0].isalpha():
name_part = (str('a') + name_part)[0:10]
resource_group_part = re.sub('[^A-Za-z0-9-]', '', resource_group_name)[0:16]
dns_name_prefix = f'{name_part}-{resource_group_part}-{subscription_id[0:6]}'

api_server_access_profile = api_server_access_profile_model(
enable_private_cluster=enable_private_cluster,
enable_vnet_integration=enable_vnet_integration,
Expand Down
2 changes: 1 addition & 1 deletion src/fleet/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

# TODO: Confirm this is the right version number you want and it matches your
# HISTORY.rst entry.
VERSION = '1.1.0'
VERSION = '1.1.1'

# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
Expand Down

0 comments on commit 97a89b8

Please sign in to comment.