Skip to content

Commit

Permalink
Add FIPS support to CLI extension. (Azure#3254)
Browse files Browse the repository at this point in the history
  • Loading branch information
JunSun17 authored Apr 21, 2021
1 parent 4b0bc9d commit 58186f6
Show file tree
Hide file tree
Showing 5 changed files with 1,237 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/aks-preview/azext_aks_preview/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,9 @@
- name: --ppg
type: string
short-summary: The ID of a PPG.
- name: --enable-fips-image
type: bool
short-summary: Use FIPS-enabled OS on agent nodes.
- name: --workspace-resource-id
type: string
short-summary: The resource ID of an existing Log Analytics Workspace to use for storing monitoring data. If not specified, uses the default Log Analytics Workspace if it exists, otherwise creates one.
Expand Down Expand Up @@ -834,6 +837,9 @@
- name: --os-type
type: string
short-summary: The OS Type. Linux or Windows.
- name: --enable-fips-image
type: bool
short-summary: Use FIPS-enabled OS on agent nodes.
- name: --enable-cluster-autoscaler -e
type: bool
short-summary: Enable cluster autoscaler.
Expand Down
2 changes: 2 additions & 0 deletions src/aks-preview/azext_aks_preview/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ def load_arguments(self, _):
c.argument('ppg')
c.argument('workspace_resource_id')
c.argument('skip_subnet_role_assignment', action='store_true')
c.argument('enable_fips_image', action='store_true', is_preview=True)
c.argument('enable_cluster_autoscaler', action='store_true')
c.argument('uptime_sla', action='store_true')
c.argument('cluster_autoscaler_profile', nargs='+', validator=validate_cluster_autoscaler_profile)
Expand Down Expand Up @@ -202,6 +203,7 @@ def load_arguments(self, _):
c.argument('node_vm_size', options_list=['--node-vm-size', '-s'], completer=get_vm_size_completion_list)
c.argument('max_pods', type=int, options_list=['--max-pods', '-m'])
c.argument('os_type', type=str)
c.argument('enable_fips_image', action='store_true', is_preview=True)
c.argument('enable_cluster_autoscaler', options_list=["--enable-cluster-autoscaler", "-e"], action='store_true')
c.argument('node_taints', type=str, validator=validate_taints)
c.argument('priority', arg_type=get_enum_type([CONST_SCALE_SET_PRIORITY_REGULAR, CONST_SCALE_SET_PRIORITY_SPOT]), validator=validate_priority)
Expand Down
4 changes: 4 additions & 0 deletions src/aks-preview/azext_aks_preview/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -971,6 +971,7 @@ def aks_create(cmd, # pylint: disable=too-many-locals,too-many-statements,to
enable_vmss=None,
vm_set_type=None,
skip_subnet_role_assignment=False,
enable_fips_image=False,
enable_cluster_autoscaler=False,
cluster_autoscaler_profile=None,
network_plugin=None,
Expand Down Expand Up @@ -1087,6 +1088,7 @@ def aks_create(cmd, # pylint: disable=too-many-locals,too-many-statements,to
proximity_placement_group_id=ppg,
availability_zones=node_zones,
enable_node_public_ip=enable_node_public_ip,
enable_fips=enable_fips_image,
node_public_ip_prefix_id=node_public_ip_prefix_id,
enable_encryption_at_host=enable_encryption_at_host,
max_pods=int(max_pods) if max_pods else None,
Expand Down Expand Up @@ -2933,6 +2935,7 @@ def aks_agentpool_add(cmd, # pylint: disable=unused-argument,too-many-local
ppg=None,
max_pods=0,
os_type="Linux",
enable_fips_image=False,
min_count=None,
max_count=None,
enable_cluster_autoscaler=False,
Expand Down Expand Up @@ -2982,6 +2985,7 @@ def aks_agentpool_add(cmd, # pylint: disable=unused-argument,too-many-local
count=int(node_count),
vm_size=node_vm_size,
os_type=os_type,
enable_fips=enable_fips_image,
storage_profile=ContainerServiceStorageProfileTypes.managed_disks,
vnet_subnet_id=vnet_subnet_id,
pod_subnet_id=pod_subnet_id,
Expand Down
Loading

0 comments on commit 58186f6

Please sign in to comment.