Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for enabling the Dapr extension #350

Merged
merged 3 commits into from
Aug 12, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows_dep/regressionparams/dapr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"resourceName": {
"value": "az-k8s-dapr"
},
"agentVMSize": {
"value": "Standard_DS3_v2"
},
"fluxGitOpsAddon": {
Gordonby marked this conversation as resolved.
Show resolved Hide resolved
"value": true
}
}
}
24 changes: 24 additions & 0 deletions bicep/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -1183,6 +1183,30 @@ resource fluxAddon 'Microsoft.KubernetesConfiguration/extensions@2022-04-02-prev
}
output fluxReleaseNamespace string = fluxGitOpsAddon ? fluxAddon.properties.scope.cluster.releaseNamespace : ''

param daprAddon bool = false
Gordonby marked this conversation as resolved.
Show resolved Hide resolved
param daprAddon_enableHighAvailability bool = false
Gordonby marked this conversation as resolved.
Show resolved Hide resolved

resource daprExtension 'Microsoft.KubernetesConfiguration/extensions@2022-04-02-preview' = if(daprAddon) {
name: 'dapr'
scope: aks
properties: {
extensionType: 'Microsoft.Dapr'
autoUpgradeMinorVersion: true
releaseTrain: 'Stable'
configurationSettings: {
'global.ha.enabled': daprAddon_enableHighAvailability ? 'true' : 'false'
Gordonby marked this conversation as resolved.
Show resolved Hide resolved
}
scope: {
cluster: {
releaseNamespace: 'dapr-system'
}
}
configurationProtectedSettings: {}
}
}

output daprReleaseNamespace string = daprAddon ? daprExtension.properties.scope.cluster.releaseNamespace : ''


/*__ ___. ______ .__ __. __ .___________. ______ .______ __ .__ __. _______
| \/ | / __ \ | \ | | | | | | / __ \ | _ \ | | | \ | | / _____|
Expand Down
1 change: 1 addition & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"currenttab",
"currt",
"currv",
"dapr",
"Daemonset",
"demoapp",
"denydefault",
Expand Down
30 changes: 27 additions & 3 deletions helper/src/components/addonsTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,32 @@ export default function ({ tabValues, updateFn, featureFlag, invalidArray }) {

</Stack.Item>

</Stack >

<Separator className="notopmargin" />

)
<Stack.Item align="start">
<Label required={true}>
dapr (Distributed Application Runtime)
(<a target="_new" href="https://docs.microsoft.com/en-us/azure/aks/dapr">docs</a>)
</Label>
<MessageBar messageBarType={MessageBarType.info} styles={{ root: { marginBottom: "10px" } }}>
Enabling this option installs dapr, but doesn't apply configuration
</MessageBar>
<Checkbox
styles={{ root: { marginLeft: "50px" } }}
inputProps={{ "data-testid": "addons-dapr-checkbox" }}
checked={addons.daprAddon}
onChange={(ev, v) => updateFn("daprAddon", v)}
label="Install the Dapr AddOn"
/>
<Checkbox
disabled={!addons.daprAddon}
styles={{ root: { marginLeft: "50px" } }}
inputProps={{ "data-testid": "addons-dapr-ha-checkbox" }}
checked={addons.daprAddon_enableHighAvailability}
onChange={(ev, v) => updateFn("daprAddon_enableHighAvailability", v)}
label="Enable high availability mode"
/>
</Stack.Item>
</Stack>
);
}
3 changes: 2 additions & 1 deletion helper/src/components/deployTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ export default function DeployTab({ defaults, updateFn, tabValues, invalidArray,
...(addons.csisecret !== "none" && { keyVaultAksCSI: true }),
...(addons.csisecret === 'akvNew' && { keyVaultCreate: true, ...(deploy.kvCertSecretRole && { keyVaultOfficerRolePrincipalId: "$(az ad signed-in-user show --query id --out tsv)"}) }),
...(addons.csisecret !== "none" && addons.keyVaultAksCSIPollInterval !== defaults.addons.keyVaultAksCSIPollInterval && { keyVaultAksCSIPollInterval: addons.keyVaultAksCSIPollInterval }),
...(addons.fluxGitOpsAddon !== defaults.addons.fluxGitOpsAddon && { fluxGitOpsAddon: addons.fluxGitOpsAddon})
...(addons.fluxGitOpsAddon !== defaults.addons.fluxGitOpsAddon && { fluxGitOpsAddon: addons.fluxGitOpsAddon}),
...(addons.daprAddon !== defaults.addons.daprAddon && { daprAddon: addons.daprAddon }),
Gordonby marked this conversation as resolved.
Show resolved Hide resolved
}

const preview_params = {
Expand Down
2 changes: 2 additions & 0 deletions helper/src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
"DefenderForContainers" : false
},
"addons": {
"daprAddon": false,
"daprAddon_enableHighAvailability": false,
"fluxGitOpsAddon": false,
"networkPolicy": "none",
"kedaAddon": false,
Expand Down