Workload type principal preset (prod and non-prod) (#594)
* scaffold * automation account * basic logs * final naming * automation account params and decorators * start-stop tested e2e * ui * utc * width * Better UI - removed ACR * formatt * fixing test behaviour * vnet oopsie * lb
This commit is contained in:
Родитель
eedff24c4e
Коммит
52914d7487
|
@ -0,0 +1,17 @@
|
|||
param principalId string
|
||||
param aksName string
|
||||
|
||||
resource aks 'Microsoft.ContainerService/managedClusters@2023-03-02-preview' existing = {
|
||||
name: aksName
|
||||
}
|
||||
|
||||
var aksContributor = subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
|
||||
resource aksAutomation 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
|
||||
scope: aks
|
||||
name: guid(aks.id, principalId , aksContributor)
|
||||
properties: {
|
||||
roleDefinitionId: aksContributor
|
||||
principalType: 'ServicePrincipal'
|
||||
principalId: principalId
|
||||
}
|
||||
}
|
|
@ -0,0 +1,188 @@
|
|||
@description('The name of the Automation Account')
|
||||
param automationAccountName string
|
||||
|
||||
@description('Deployment Location')
|
||||
param location string = resourceGroup().location
|
||||
|
||||
@description('Used to reference todays date')
|
||||
param today string = utcNow('yyyyMMddTHHmmssZ')
|
||||
|
||||
@description('The timezone to align schedules to. (Eg. "Europe/London" or "America/Los_Angeles")')
|
||||
param timezone string = 'Etc/UTC'
|
||||
|
||||
@allowed(['Basic', 'Free'])
|
||||
@description('The Automation Account SKU. See https://learn.microsoft.com/en-us/azure/automation/overview#pricing-for-azure-automation')
|
||||
param accountSku string = 'Basic'
|
||||
|
||||
@description('For Automation job logging')
|
||||
param loganalyticsWorkspaceId string = ''
|
||||
|
||||
@description('Which logging categeories to log')
|
||||
param diagnosticCategories array = [
|
||||
'JobLogs'
|
||||
'JobStreams'
|
||||
'AuditEvent'
|
||||
]
|
||||
|
||||
type schedule = {
|
||||
frequency : 'Day' | 'Weekday' | 'Week'
|
||||
|
||||
hour : hour
|
||||
minute : minute
|
||||
}
|
||||
|
||||
@minValue(0)
|
||||
@maxValue(23)
|
||||
@description('Seperately declaring as a type allows for min/max validation')
|
||||
type hour = int
|
||||
|
||||
@minValue(0)
|
||||
@maxValue(59)
|
||||
@description('Seperately declaring as a type allows for min/max validation')
|
||||
type minute = int
|
||||
|
||||
@description('Automation Schedules to create')
|
||||
param schedulesToCreate schedule[] = [
|
||||
{
|
||||
frequency:'Day'
|
||||
hour:9
|
||||
minute:0
|
||||
}
|
||||
{
|
||||
frequency:'Weekday'
|
||||
hour:9
|
||||
minute:0
|
||||
}
|
||||
{
|
||||
frequency:'Day'
|
||||
hour:19
|
||||
minute:0
|
||||
}
|
||||
{
|
||||
frequency:'Weekday'
|
||||
hour:19
|
||||
minute:0
|
||||
}
|
||||
{
|
||||
frequency:'Day'
|
||||
hour:0
|
||||
minute:0
|
||||
}
|
||||
{
|
||||
frequency:'Weekday'
|
||||
hour: 0
|
||||
minute:0
|
||||
}
|
||||
]
|
||||
|
||||
type runbookJob = {
|
||||
scheduleName: string
|
||||
parameters: object?
|
||||
}
|
||||
|
||||
@description('The Runbook-Schedule Jobs to create with workflow specific parameters')
|
||||
param runbookJobSchedule runbookJob[]
|
||||
|
||||
@description('The name of the runbook to create')
|
||||
param runbookName string
|
||||
|
||||
@allowed([
|
||||
'GraphPowerShell'
|
||||
'Script'
|
||||
])
|
||||
@description('The type of runbook that is being imported')
|
||||
param runbookType string = 'Script'
|
||||
|
||||
@description('The URI to import the runbook code from')
|
||||
param runbookUri string = ''
|
||||
|
||||
@description('A description of what the runbook does')
|
||||
param runbookDescription string = ''
|
||||
|
||||
var runbookVersion = '1.0.0.0'
|
||||
var tomorrow = dateTimeAdd(today, 'P1D','yyyy-MM-dd')
|
||||
var timebase = '1900-01-01'
|
||||
var scheduleNoExpiry = '9999-12-31T23:59:00+00:00'
|
||||
var workWeek = {weekDays: [
|
||||
'Monday'
|
||||
'Tuesday'
|
||||
'Wednesday'
|
||||
'Thursday'
|
||||
'Friday'
|
||||
]
|
||||
}
|
||||
|
||||
resource automationAccount 'Microsoft.Automation/automationAccounts@2022-08-08' = {
|
||||
name: automationAccountName
|
||||
location: location
|
||||
identity: {
|
||||
type: 'SystemAssigned'
|
||||
}
|
||||
properties: {
|
||||
sku: {
|
||||
name: accountSku
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resource automationAccountDiagLogging 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = if(!empty(loganalyticsWorkspaceId)) {
|
||||
name: 'diags'
|
||||
scope: automationAccount
|
||||
properties: {
|
||||
workspaceId: loganalyticsWorkspaceId
|
||||
logs: [for diagCategory in diagnosticCategories: {
|
||||
category: diagCategory
|
||||
enabled: true
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
||||
resource schedules 'Microsoft.Automation/automationAccounts/schedules@2022-08-08' = [for schedule in schedulesToCreate : {
|
||||
parent: automationAccount
|
||||
name: '${schedule.frequency} - ${dateTimeAdd(timebase,'PT${schedule.hour}H','HH')}:${dateTimeAdd(timebase,'PT${schedule.minute}M','mm')}'
|
||||
properties: {
|
||||
startTime: dateTimeAdd(dateTimeAdd(tomorrow,'PT${schedule.hour}H'), 'PT${schedule.minute}M','yyyy-MM-ddTHH:mm:00+00:00')
|
||||
expiryTime: scheduleNoExpiry
|
||||
interval: 1
|
||||
frequency: schedule.frequency == 'Day' ? 'Day' : 'Week'
|
||||
timeZone: timezone
|
||||
advancedSchedule: schedule.frequency == 'Weekday' ? workWeek : {}
|
||||
}
|
||||
}]
|
||||
|
||||
resource runbook 'Microsoft.Automation/automationAccounts/runbooks@2022-08-08' = if(!empty(runbookName)) {
|
||||
parent: automationAccount
|
||||
name: !empty(runbookName) ? runbookName : 'armtemplatevalidationissue'
|
||||
location: location
|
||||
properties: {
|
||||
logVerbose: true
|
||||
logProgress: true
|
||||
runbookType: runbookType
|
||||
publishContentLink: {
|
||||
uri: runbookUri
|
||||
version: runbookVersion
|
||||
}
|
||||
description: runbookDescription
|
||||
}
|
||||
}
|
||||
|
||||
resource automationJobs 'Microsoft.Automation/automationAccounts/jobSchedules@2022-08-08' = [for job in runbookJobSchedule : if(!empty(runbookName)) {
|
||||
parent: automationAccount
|
||||
name: guid(automationAccount.id, runbook.name, job.scheduleName)
|
||||
properties: {
|
||||
schedule: {
|
||||
name: job.scheduleName
|
||||
}
|
||||
runbook: {
|
||||
name: runbook.name
|
||||
}
|
||||
parameters: job.parameters
|
||||
}
|
||||
dependsOn: [schedules] //All of the possible schedules
|
||||
}]
|
||||
|
||||
@description('The Automation Account resource Id')
|
||||
output automationAccountId string = automationAccount.id
|
||||
|
||||
@description('The Automation Account identity Principal Id')
|
||||
output automationAccountPrincipalId string = automationAccount.identity.principalId
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"experimentalFeaturesEnabled": {
|
||||
"userDefinedTypes": true
|
||||
}
|
||||
}
|
|
@ -1795,4 +1795,85 @@ resource telemetrydeployment 'Microsoft.Resources/deployments@2022-09-01' = if (
|
|||
}
|
||||
}
|
||||
|
||||
/* ___ __ __ .___________. ______ .___ ___. ___ .___________. __ ______ .__ __.
|
||||
/ \ | | | | | | / __ \ | \/ | / \ | || | / __ \ | \ | |
|
||||
/ ^ \ | | | | `---| |----`| | | | | \ / | / ^ \ `---| |----`| | | | | | | \| |
|
||||
/ /_\ \ | | | | | | | | | | | |\/| | / /_\ \ | | | | | | | | | . ` |
|
||||
/ _____ \ | `--' | | | | `--' | | | | | / _____ \ | | | | | `--' | | |\ |
|
||||
/__/ \__\ \______/ |__| \______/ |__| |__| /__/ \__\ |__| |__| \______/ |__| \__| */
|
||||
|
||||
@allowed(['', 'Weekday', 'Day'])
|
||||
@description('Creates an Azure Automation Account to provide scheduled start and stop of the cluster')
|
||||
@metadata({category: 'Automation'})
|
||||
param automationAccountScheduledStartStop string = ''
|
||||
|
||||
@description('The IANA time zone of the automation account')
|
||||
@metadata({category: 'Automation'})
|
||||
param automationTimeZone string = 'Etc/UTC'
|
||||
|
||||
@minValue(0)
|
||||
@maxValue(23)
|
||||
@description('When to start the cluster')
|
||||
@metadata({category: 'Automation'})
|
||||
param automationStartHour int = 8
|
||||
|
||||
@minValue(0)
|
||||
@maxValue(23)
|
||||
@description('When to stop the cluster')
|
||||
@metadata({category: 'Automation'})
|
||||
param automationStopHour int = 19
|
||||
|
||||
var automationFrequency = automationAccountScheduledStartStop == 'Day' ? 'Day' : 'Weekday'
|
||||
|
||||
module AksStartStop 'automationrunbook/automation.bicep' = if (!empty(automationAccountScheduledStartStop)) {
|
||||
name: '${deployment().name}-Automation'
|
||||
params: {
|
||||
location: location
|
||||
automationAccountName: 'aa-${resourceName}'
|
||||
runbookName: 'aks-cluster-changestate'
|
||||
runbookUri: 'https://raw.githubusercontent.com/finoops/aks-cluster-changestate/main/aks-cluster-changestate.ps1'
|
||||
runbookType: 'Script'
|
||||
timezone: automationTimeZone
|
||||
schedulesToCreate : [
|
||||
{
|
||||
frequency: automationFrequency
|
||||
hour: automationStartHour
|
||||
minute: 0
|
||||
}
|
||||
{
|
||||
frequency: automationFrequency
|
||||
hour: automationStopHour
|
||||
minute:0
|
||||
}
|
||||
]
|
||||
runbookJobSchedule: [
|
||||
{
|
||||
scheduleName: '${automationFrequency} - ${padLeft(automationStartHour, 2, '0')}:00'
|
||||
parameters: {
|
||||
ResourceGroupName : resourceGroup().name
|
||||
AksClusterName : aks.name
|
||||
Operation: 'start'
|
||||
}
|
||||
}
|
||||
{
|
||||
scheduleName: '${automationFrequency} - ${padLeft(automationStopHour, 2, '0')}:00'
|
||||
parameters: {
|
||||
ResourceGroupName : resourceGroup().name
|
||||
AksClusterName : aks.name
|
||||
Operation: 'stop'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@description('Gives the Automation Account permission to stop/start the AKS cluster')
|
||||
module aksAutomationRbac 'automationrunbook/aksRbac.bicep' = if (!empty(automationAccountScheduledStartStop)) {
|
||||
name: '${deployment().name}-AutomationRbac'
|
||||
params: {
|
||||
aksName: aks.name
|
||||
principalId: AksStartStop.outputs.automationAccountPrincipalId
|
||||
}
|
||||
}
|
||||
|
||||
//ACSCII Art link : https://textkool.com/en/ascii-art-generator?hl=default&vl=default&font=Star%20Wars&text=changeme
|
||||
|
|
|
@ -4,7 +4,7 @@ const { matchers } = require('playwright-expect');
|
|||
// add custom matchers
|
||||
expect.extend(matchers);
|
||||
|
||||
test('managed-natgw-option-is-not-the-default', async ({ page }) => {
|
||||
test('managed-natgw-option-is-now-the-prod-default', async ({ page }) => {
|
||||
|
||||
await page.goto('http://localhost:3000/AKS-Construction');
|
||||
|
||||
|
@ -14,17 +14,15 @@ test('managed-natgw-option-is-not-the-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')
|
||||
await expect(dropdown).toMatchText('Assigned 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 absent
|
||||
// //Check parameter is there
|
||||
await page.waitForSelector('[data-testid="deploy-deploycmd"]')
|
||||
const clitextbox = await page.$('[data-testid="deploy-deploycmd"]')
|
||||
await expect(clitextbox).toBeVisible()
|
||||
await expect(clitextbox).not.toContainText('aksOutboundTrafficType')
|
||||
await expect(clitextbox).toContainText('aksOutboundTrafficType=userAssignedNATGateway')
|
||||
|
||||
});
|
||||
|
||||
//TODO: Change value and check (this is a real pain with the DropDown control)
|
|
@ -292,23 +292,16 @@ export default function ({ tabValues, updateFn, featureFlag, invalidArray }) {
|
|||
decrementButtonAriaLabel="Decrease value by 1"
|
||||
styles={{ root: { marginTop: '15px'}}}
|
||||
/>
|
||||
<Checkbox styles={{ root: { marginTop: '10px', marginBottom: '10px'}}} checked={addons.containerLogsV2} onChange={(ev, v) => setContainerLogsV2(v)} label={<Text>Enable the ContainerLogV2 schema (<Link target="_target" href="https://learn.microsoft.com/en-us/azure/azure-monitor/containers/container-insights-logging-v2">docs</Link>) (*preview)</Text>} />
|
||||
{
|
||||
addons.containerLogsV2 &&
|
||||
(
|
||||
<PreviewDialog previewLink={"https://learn.microsoft.com/en-us/azure/azure-monitor/containers/container-insights-logging-v2"} isDialogHidden={addons.acrUntaggedRetentionPolicyEnabled}/>
|
||||
)
|
||||
}
|
||||
<Checkbox styles={{ root: { marginTop: '10px', marginBottom: '10px'}}} checked={addons.containerLogsV2} onChange={(ev, v) => setContainerLogsV2(v)} label={<Text>Enable the ContainerLogV2 schema (<Link target="_target" href="https://learn.microsoft.com/en-us/azure/azure-monitor/containers/container-insights-logging-v2">docs</Link>)</Text>} />
|
||||
|
||||
<MessageBar messageBarType={MessageBarType.warning}>Enable the ContainerLogV2 (successor for ContainerLog) schema for additional data capture and friendlier schema. Disabling this feature will also disable features that are dependent on it (e.g. Basic Logs).</MessageBar>
|
||||
|
||||
<Checkbox styles={{ root: { marginTop: '10px', marginBottom: '10px'}}} checked={addons.containerLogsV2BasicLogs} onChange={(ev, v) => setContainerLogV2BasicLogs(v)} label={<Text>Set Basic Logs for ContainerLogV2 (<Link target="_target" href="https://learn.microsoft.com/en-us/azure/azure-monitor/logs/basic-logs-configure?tabs=portal-1%2Cportal-2">docs</Link>) (*preview)</Text>} />
|
||||
{
|
||||
addons.containerLogsV2BasicLogs &&
|
||||
(
|
||||
<PreviewDialog previewLink={"https://learn.microsoft.com/en-us/azure/azure-monitor/logs/basic-logs-configure?tabs=portal-1%2Cportal-2"}/>
|
||||
)
|
||||
}
|
||||
<Checkbox
|
||||
styles={{ root: { marginTop: '10px', marginBottom: '10px'}}}
|
||||
checked={addons.containerLogsV2BasicLogs}
|
||||
onChange={(ev, v) => setContainerLogV2BasicLogs(v)}
|
||||
label={<Text>Set Basic Logs for ContainerLogV2 (<Link target="_target" href="https://learn.microsoft.com/en-us/azure/azure-monitor/logs/basic-logs-configure?tabs=portal-1%2Cportal-2">docs</Link>)</Text>}
|
||||
/>
|
||||
<MessageBar messageBarType={MessageBarType.warning}>Enable the Basic log data plan to cost optimise on log ingestion at the cost of a lower retention period, some log query operations that are no longer available and no alerts. Enabling Basic Logs for ContainerLogsV2 has a dependency on the ContainerLogsV2 schema and thus enabling this capability will automatically enable ContainerLogsV2. In addition, the ContainerLogsV2 table's retention is fixed at eight days. More information available via the provided docs link.</MessageBar>
|
||||
|
||||
<Checkbox styles={{ root: { marginTop: '10px'}}} checked={addons.createAksMetricAlerts} onChange={(ev, v) => updateFn("createAksMetricAlerts", v)} label={<Text>Create recommended metric alerts, enable you to monitor your system resource when it's running on peak capacity or hitting failure rates (<Link target="_target" href="https://azure.microsoft.com/en-us/updates/ci-recommended-alerts/">docs</Link>) </Text>} />
|
||||
|
@ -443,6 +436,41 @@ export default function ({ tabValues, updateFn, featureFlag, invalidArray }) {
|
|||
</Stack.Item>
|
||||
}
|
||||
|
||||
<Stack.Item align="start">
|
||||
<Label required={true}>Azure Automation</Label>
|
||||
<MessageBar>Creates an Azure Automation Account responsible for stopping and starting the AKS Cluster to save on compute costs in development environments.</MessageBar>
|
||||
<ChoiceGroup
|
||||
styles={{ root: { marginLeft: '50px' } }}
|
||||
selectedKey={addons.automationAccountScheduledStartStop}
|
||||
options={[
|
||||
{ key: '', text: 'No, I do not require automation to stop the cluster ' },
|
||||
{ key: 'Weekday', text: 'Yes, start and stop the cluster on Weekdays' },
|
||||
{ key: 'Day', text: 'Yes, start and stop the cluster every day' }
|
||||
]}
|
||||
onChange={(ev, { key }) => updateFn("automationAccountScheduledStartStop", key)}
|
||||
/>
|
||||
|
||||
{addons.automationAccountScheduledStartStop !== '' &&
|
||||
<Stack.Item align="center" styles={{ root: { marginLeft: '100px', width:'275px'}}}>
|
||||
<MessageBar>Only supports 'on the hour' schedules. 24 hour format, UTC Time zone.</MessageBar>
|
||||
|
||||
<Dropdown
|
||||
styles={{ root: { marginBottom: '20px' } }}
|
||||
label="Start time"
|
||||
onChange={(ev, { key }) => updateFn("automationStartHour", key)} selectedKey={addons.automationStartHour}
|
||||
options={[...Array(24).keys()].map(i => {return {key: i, text: `${i}:00`}})}
|
||||
/>
|
||||
|
||||
<Dropdown
|
||||
styles={{ root: { marginBottom: '20px' } }}
|
||||
label="Stop time"
|
||||
onChange={(ev, { key }) => updateFn("automationStopHour", key)} selectedKey={addons.automationStopHour}
|
||||
options={[...Array(24).keys()].map(i => {return {key: i, text: `${i}:00`}})}
|
||||
/>
|
||||
</Stack.Item>
|
||||
}
|
||||
</Stack.Item>
|
||||
|
||||
<Stack.Item align="start">
|
||||
<Label required={true}>
|
||||
CSI Blob storage: Enable BlobFuse or NFS v3 access to Azure Blob Storage
|
||||
|
|
|
@ -77,6 +77,7 @@ export default function DeployTab({ defaults, updateFn, tabValues, invalidArray,
|
|||
...(deploy.enableTelemetry !== defaults.deploy.enableTelemetry && {enableTelemetry: deploy.enableTelemetry }),
|
||||
...(addons.monitor === "aci" && {
|
||||
omsagent: true, retentionInDays: addons.retentionInDays,
|
||||
...(addons.containerLogsV2BasicLogs && { containerLogsV2BasicLogs: addons.containerLogsV2BasicLogs}),
|
||||
...( addons.logDataCap !== defaults.addons.logDataCap && {logDataCap: addons.logDataCap }),
|
||||
...( addons.createAksMetricAlerts !== defaults.addons.createAksMetricAlerts && {createAksMetricAlerts: addons.createAksMetricAlerts })
|
||||
}),
|
||||
|
@ -121,7 +122,13 @@ export default function DeployTab({ defaults, updateFn, tabValues, invalidArray,
|
|||
...(addons.fluxGitOpsAddon !== defaults.addons.fluxGitOpsAddon && { fluxGitOpsAddon: addons.fluxGitOpsAddon}),
|
||||
...(addons.daprAddon !== defaults.addons.daprAddon && { daprAddon: addons.daprAddon }),
|
||||
...(addons.daprAddonHA !== defaults.addons.daprAddonHA && { daprAddonHA: addons.daprAddonHA }),
|
||||
...(addons.sgxPlugin !== defaults.addons.sgxPlugin && { sgxPlugin: addons.sgxPlugin })
|
||||
...(addons.sgxPlugin !== defaults.addons.sgxPlugin && { sgxPlugin: addons.sgxPlugin }),
|
||||
...(addons.automationAccountScheduledStartStop !== defaults.addons.automationAccountScheduledStartStop && {
|
||||
...({automationAccountScheduledStartStop: addons.automationAccountScheduledStartStop}),
|
||||
...(addons.automationTimeZone != defaults.addons.automationTimeZone && {automationTimeZone: addons.automationTimeZone}),
|
||||
...(addons.automationStartHour != defaults.addons.automationStartHour && {automationStartHour: addons.automationStartHour}),
|
||||
...(addons.automationStopHour != defaults.addons.automationStopHour && {automationStopHour: addons.automationStopHour}),
|
||||
})
|
||||
}
|
||||
|
||||
const preview_params = {
|
||||
|
@ -156,7 +163,6 @@ export default function DeployTab({ defaults, updateFn, tabValues, invalidArray,
|
|||
}),
|
||||
...(urlParams.getAll('feature').includes('defender') && cluster.DefenderForContainers !== defaults.cluster.DefenderForContainers && { DefenderForContainers: cluster.DefenderForContainers }),
|
||||
...(addons.monitor === "aci" && {
|
||||
...(addons.containerLogsV2BasicLogs && { containerLogsV2BasicLogs: addons.containerLogsV2BasicLogs}),
|
||||
...(addons.enableSysLog !== defaults.addons.enableSysLog && {enableSysLog: addons.enableSysLog })
|
||||
})
|
||||
}
|
||||
|
|
|
@ -79,18 +79,35 @@ export function Presets({ description, icon, sections, selectedValues, updateSel
|
|||
<Checkbox inputProps={{ 'data-testid': `portalnav-presets-${s.key}-${c.key}-Checkbox`}} checked={selectedValues[s.key] === c.key} label={c.title} styles={{ label: { fontWeight: selectedValues[s.key] === c.key ? '500' : 'normal' } }} />
|
||||
</DocumentCardDetails>
|
||||
|
||||
<Stack key={`sum${s.key}`} height={'100px'} enableScopedSelectors horizontal tokens={{ childrenGap: 10 }}>
|
||||
<Stack.Item align="start" grow={false}>
|
||||
{c.imageSrc &&
|
||||
<DocumentCardImage styles={{ root: { backgroundColor: bodyBackground } }} imageSrc={c.imageSrc} height={150} imageFit={ImageFit.centerContain} />
|
||||
<DocumentCardImage styles={{ root: { backgroundColor: bodyBackground } }}
|
||||
imageSrc={c.imageSrc}
|
||||
height={150}
|
||||
imageFit={ImageFit.centerContain} />
|
||||
}
|
||||
{c.icon &&
|
||||
<DocumentCardPreview styles={{ root: { backgroundColor: bodyBackground, borderBottom: '0' } }} previewImages={[{
|
||||
<DocumentCardPreview
|
||||
styles={{ root: { backgroundColor: bodyBackground, borderBottom: '0' } }}
|
||||
width={'80px'}
|
||||
previewImages={[{
|
||||
previewIconProps: {
|
||||
iconName: c.icon, className: iconClass
|
||||
}, height: 100
|
||||
},]} />
|
||||
}, height: 100, width: 100
|
||||
},]}
|
||||
/>
|
||||
}
|
||||
</Stack.Item>
|
||||
|
||||
<DocumentCardTitle showAsSecondaryTitle={true} shouldTruncate={false} title={c.description.title}/>
|
||||
{c.description.title &&
|
||||
<Stack.Item styles={{root: {paddingTop: 10, paddingRight:10}}} height={100}>
|
||||
<Text>
|
||||
{c.description.title}
|
||||
</Text>
|
||||
</Stack.Item>
|
||||
}
|
||||
</Stack>
|
||||
|
||||
<div style={{ padding: "8px 16px" }} >
|
||||
<Text>
|
||||
|
|
|
@ -6,12 +6,14 @@ import { PrimaryButton,DefaultButton } from '@fluentui/react/lib/Button';
|
|||
export function PreviewDialog({previewLink}) {
|
||||
|
||||
const [hideDialog, { toggle: toggleHideDialog }] = useBoolean(false);
|
||||
|
||||
const dialogContentProps = {
|
||||
type: DialogType.normal,
|
||||
title: 'Preview Feature',
|
||||
closeButtonAriaLabel: 'Close',
|
||||
subText: `Review the instructions on this page ${previewLink} to enable the feature `,
|
||||
};
|
||||
|
||||
function _openLink() {
|
||||
window.open(`${previewLink}`, '_blank', 'noreferrer');
|
||||
}
|
||||
|
@ -21,8 +23,7 @@ export function PreviewDialog({previewLink}) {
|
|||
<Dialog
|
||||
hidden={hideDialog}
|
||||
onDismiss={toggleHideDialog}
|
||||
dialogContentProps={dialogContentProps}
|
||||
>
|
||||
dialogContentProps={dialogContentProps}>
|
||||
<DialogFooter>
|
||||
<PrimaryButton onClick={toggleHideDialog} text="Close" />
|
||||
<DefaultButton onClick={_openLink} text="Open Link in New Tab" />
|
||||
|
|
|
@ -109,7 +109,11 @@
|
|||
"gitops": "none",
|
||||
"containerLogsV2": false,
|
||||
"containerLogsV2BasicLogs": false,
|
||||
"sgxPlugin": false
|
||||
"sgxPlugin": false,
|
||||
"automationAccountScheduledStartStop": "",
|
||||
"automationTimeZone": "Etc/UTC",
|
||||
"automationStartHour": 8,
|
||||
"automationStopHour" : 19
|
||||
},
|
||||
"net": {
|
||||
"vnetFirewallManagementSubnetAddressPrefix": "10.240.51.0/26",
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
"workloadDeployCommands": []
|
||||
},
|
||||
"cluster": {
|
||||
"SystemPoolType": "none",
|
||||
"autoscale": false,
|
||||
"upgradeChannel": "none",
|
||||
"DefenderForContainers": false,
|
||||
|
@ -65,10 +64,8 @@
|
|||
"workloadDeployCommands": []
|
||||
},
|
||||
"cluster": {
|
||||
"SystemPoolType": "CostOptimised",
|
||||
"autoscale": false,
|
||||
"upgradeChannel": "none",
|
||||
"AksPaidSkuForSLA": false
|
||||
"upgradeChannel": "none"
|
||||
},
|
||||
"addons": {
|
||||
"registry": "none",
|
||||
|
@ -82,7 +79,7 @@
|
|||
"default": true,
|
||||
"title": "I want a managed environment",
|
||||
"description": {
|
||||
"title": "I'd like my cluster to be auto-managed by Azure for upgrades and scaling, and use Azure provided managed addons to create an full environment with the minimum of operational requirements",
|
||||
"title": "Auto managed by Azure for upgrades and scaling, using Azure provided managed addons for minimmal operational burden",
|
||||
"bulets": [
|
||||
{
|
||||
"description": "Cluster auto-scaler",
|
||||
|
@ -111,10 +108,8 @@
|
|||
"workloadDeployCommands": []
|
||||
},
|
||||
"cluster": {
|
||||
"SystemPoolType": "CostOptimised",
|
||||
"autoscale": true,
|
||||
"upgradeChannel": "stable",
|
||||
"AksPaidSkuForSLA": true
|
||||
"upgradeChannel": "stable"
|
||||
},
|
||||
"addons": {
|
||||
"registry": [
|
||||
|
@ -396,6 +391,83 @@
|
|||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "env",
|
||||
"sectionTitle": "Workload Type",
|
||||
"cards": [
|
||||
{
|
||||
"key": "Dev",
|
||||
"title": "Non-Production Workloads",
|
||||
"description": {
|
||||
"title": "Leverages a cost-optimised configuration for AKS development teams",
|
||||
"bulets": [
|
||||
{"description": "Single pool, single node"},
|
||||
{"description": "VM Compute: D2s v3 w/managed disk"},
|
||||
{"description": "Automated Daily cluster start/stop"},
|
||||
{"description": "AzMonitor: Reduced logging and monitoring"},
|
||||
{"description": "AzMonitor: Daily Log cap"}
|
||||
]
|
||||
},
|
||||
"icon": "code",
|
||||
"values": {
|
||||
"cluster": {
|
||||
"SystemPoolType": "none",
|
||||
"AksPaidSkuForSLA": false,
|
||||
"availabilityZones": "no",
|
||||
"agentCount": 1,
|
||||
"containerLogsV2BasicLogs" : true,
|
||||
"logDataCap" : 2,
|
||||
"agentVMSize": "Standard_D2s_v3",
|
||||
"osDiskType" : "Managed",
|
||||
"osDiskSizeGB" : 32
|
||||
},
|
||||
"addons": {
|
||||
"automationAccountScheduledStartStop": "Weekday"
|
||||
},
|
||||
"net": {
|
||||
"createNatGateway": false,
|
||||
"aksOutboundTrafficType": "loadBalancer"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "prod",
|
||||
"title": "Production workloads",
|
||||
"default": true,
|
||||
"description": {
|
||||
"title": "Creates a comprehensive AKS configuration for higher reliability and availability",
|
||||
"bulets": [
|
||||
{"description": "3 Node minimum (user pool)"},
|
||||
{"description": "VM Compute: DS3 v2 w/ephemeral OS disk"},
|
||||
{"description": "Availability Zones"},
|
||||
{"description": "SLA"},
|
||||
{"description": "NAT Gateway Egress"}
|
||||
]
|
||||
},
|
||||
"icon": "server",
|
||||
"values": {
|
||||
"deploy": {
|
||||
"workloadDeployCommands": []
|
||||
},
|
||||
"cluster": {
|
||||
"SystemPoolType": "Standard",
|
||||
"AksPaidSkuForSLA": true,
|
||||
"availabilityZones": "yes",
|
||||
"agentCount": 3,
|
||||
"agentVMSize": "Standard_DS3_v2",
|
||||
"osDiskType" : "Ephemeral"
|
||||
},
|
||||
"addons": {
|
||||
"automationAccountScheduledStartStop": ""
|
||||
},
|
||||
"net": {
|
||||
"createNatGateway": true,
|
||||
"aksOutboundTrafficType": "userAssignedNATGateway"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче