Skip to content

Commit

Permalink
Merge branch 'main' into gb-spotvm
Browse files Browse the repository at this point in the history
  • Loading branch information
Gordonby authored Sep 18, 2023
2 parents c02ec9b + ef95b74 commit 4beaa09
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 13 deletions.
22 changes: 19 additions & 3 deletions helper/.playwrighttests/helper-test-managednatgw.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { matchers } = require('playwright-expect');
// add custom matchers
expect.extend(matchers);

test('managed-natgw-option-is-now-the-prod-default', async ({ page }) => {
test('default-outbound-option-to-be-load-balancer', async ({ page }) => {

await page.goto('http://localhost:3000/AKS-Construction');

Expand All @@ -14,15 +14,31 @@ test('managed-natgw-option-is-now-the-prod-default', async ({ page }) => {
//Check default value
const dropdown = await page.waitForSelector('[data-testid="net-aksEgressType"]')
await expect(dropdown).toBeVisible()
await expect(dropdown).toMatchText('Load Balancer')

});

test('managed-natgw-option-is-now-the-prod-default', async ({ page }) => {

await page.goto('http://localhost:3000/AKS-Construction');

// Click the 4th Tab in the portal Navigation Pivot (network)
await page.click('[data-testid="portalnav-Pivot"] > button:nth-child(4)');

//Change default value
const dropdown = await page.waitForSelector('[data-testid="net-aksEgressType"]')
await expect(dropdown).toBeVisible()
await expect(dropdown).toMatchText('NAT Gateway')

// Click the 1st Tab in the portal Navigation Pivot (network)
await page.click('[data-testid="portalnav-Pivot"] > button:nth-child(1)');

// //Check parameter is there
// Check parameter is absent
await page.waitForSelector('[data-testid="deploy-deploycmd"]')
const clitextbox = await page.$('[data-testid="deploy-deploycmd"]')
await expect(clitextbox).toBeVisible()
await expect(clitextbox).toContainText('aksOutboundTrafficType=natGateway')
await expect(clitextbox).not.toContainText('natGateway')

});

//TODO: Change value and check (this is a real pain with the DropDown control)
4 changes: 2 additions & 2 deletions helper/src/components/clusterTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ export default function ({ defaults, tabValues, updateFn, featureFlag, invalidAr
options={[
{ key: 'none', text: 'Public IP with no IP restrictions' },
{ key: 'whitelist', text: 'Create allowed IP ranges (defaults to IP address of machine running the script)' },
{ key: 'private', text: 'Private Cluster (WARNING: most complex to operate)' }
{ key: 'private', text: 'Private Cluster (Most secure option for your apps, but requires most involved access management)' }

]}
onChange={(ev, { key }) => updateFn("apisecurity", key)}
Expand Down Expand Up @@ -504,4 +504,4 @@ export default function ({ defaults, tabValues, updateFn, featureFlag, invalidAr
</>}
</Stack>
)
}
}
14 changes: 6 additions & 8 deletions helper/src/configpresets/principals.json
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,8 @@
"vnet_opt": "custom",
"vnetprivateend": false,
"afw": false,
"bastion": false
"bastion": false,
"aksOutboundTrafficType":"loadBalancer"
}
}
},
Expand All @@ -291,7 +292,7 @@
"description": {
"title": "Best option for highly secure, regulated environments or sensitive data requirements.",
"titleWarning": {
"description": "WARNING: most complex environment option to operate",
"description": "Most secure option for your apps, but requires most involved access management",
"MessageBarType": 5
},
"bulets": [
Expand Down Expand Up @@ -386,7 +387,8 @@
"vnet_opt": "custom",
"vnetprivateend": true,
"afw": true,
"bastion": true
"bastion": true,
"aksOutboundTrafficType": "userDefinedRouting"
}
}
}
Expand Down Expand Up @@ -426,8 +428,6 @@
"automationAccountScheduledStartStop": "Weekday"
},
"net": {
"createNatGateway": false,
"aksOutboundTrafficType": "loadBalancer"
}
}
},
Expand Down Expand Up @@ -462,13 +462,11 @@
"automationAccountScheduledStartStop": ""
},
"net": {
"createNatGateway": true,
"aksOutboundTrafficType": "natGateway"
}
}
}
]
}
]
}
}
}

0 comments on commit 4beaa09

Please sign in to comment.