Skip to content

Instantly share code, notes, and snippets.

@SQLDBAWithABeard
Last active May 26, 2021 10:54
Show Gist options
  • Save SQLDBAWithABeard/c26a857b28a717b994760b9c55474824 to your computer and use it in GitHub Desktop.
Save SQLDBAWithABeard/c26a857b28a717b994760b9c55474824 to your computer and use it in GitHub Desktop.
bicepdatacontroller
// this is for a raw K8s installation
param name string
param customLocationName string
param tags object
param datacontrollerUserName string
@secure()
param datacontrollerPassword string
@secure()
param uploadServicePrincipalClientId string
@secure()
param uploadServicePrincipalTenantId string
param uploadServicePrincipalAuthority string
@secure()
param uploadServicePrincipalClientSecret string
@allowed([
'NodePort'
'LoadBalancer'
])
param serviceType string
param dockerImageTag string = 'public-preview-apr-2021'
param dataStorageClassName string
param dataStorageSize string //'15Gi' for example
param logStorageClassName string
param logStorageSize string //'15Gi' for example
param connectionMode string = 'direct'
resource datacontroller 'Microsoft.AzureArcData/dataControllers@2021-03-02-preview' = {
name: name
location: resourceGroup().location
extendedLocation: {
name: resourceId('microsoft.extendedlocation/customlocations', customLocationName)
type: 'CustomLocation'
}
tags: tags
properties: {
basicLoginInformation: {
username: datacontrollerUserName
password: datacontrollerPassword
}
uploadServicePrincipal: {
clientId: uploadServicePrincipalClientId
tenantId: uploadServicePrincipalTenantId
authority: uploadServicePrincipalAuthority
clientSecret: uploadServicePrincipalClientSecret
}
k8sRaw: {
apiVersion: 'arcdata.microsoft.com/v1alpha1'
kind: 'datacontroller'
spec: {
credentials: {
controllerAdmin: 'controller-login-secret:'
dockerRegistry: 'arc-private-registry:'
domainServiceAccount: 'domain-service-account-secret:'
serviceAccount: 'sa-mssql-controller'
}
docker: {
imagePullPolicy: 'Always:'
imageTag: dockerImageTag
registry: 'mcr.microsoft.com:'
repository: 'arcdata'
}
security: {
allowDumps: true
allowNodeMetricsCollection: true
allowPodMetricsCollection: true
allowRunAsRoot: false
}
services: [
{
name: 'controller'
port: 30080
serviceType: serviceType
}
{
name: serviceProxy
port: 30777
serviceType: serviceType
}
]
settings: {
ElasticSearch: {
'vm.max_map_count': '-1'
}
azure: {
connectionMode: connectionMode
location: resourceGroup().location
resourceGroup: resourceGroup().name
subscription: subscription().subscriptionId
}
controller: {
displayName: name
enableBilling: true
'logs.rotation.days': 7
'logs.rotation.size': 5000
}
}
storage: {
data: {
accessMode: 'ReadWriteOnce'
className: dataStorageClassName
size: dataStorageSize
}
logs: {
accessMode: 'ReadWriteOnce'
className: logStorageClassName
size: logStorageSize
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment