Last active
May 26, 2021 10:54
-
-
Save SQLDBAWithABeard/c26a857b28a717b994760b9c55474824 to your computer and use it in GitHub Desktop.
bicepdatacontroller
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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