apiVersion: apps/v1
kind: Deployment
metadata:
  name: mssql
spec:
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app: mssql
  template:
    metadata:
      labels:
        app: mssql
    spec:
      containers:
        - name: mssql
          image: george.azurecr.io/mssql:2017-1903
          env:
            - name: ACCEPT_EULA
              value: "Y"
            - name: SA_PASSWORD
              value: pass@word1
            - name: ATTACH_DBS
              value: "[{'dbName':'sc_Core','dbFiles':['C:\\data\\sc_Core_Primary.mdf','C:\\data\\sc_Core_Primary.ldf']},{'dbName':'sc_Master','dbFiles':['C:\\data\\sc_Master_Primary.mdf','C:\\data\\sc_Master_Primary.ldf']},{'dbName':'sc_Web','dbFiles':['C:\\data\\sc_Web_Primary.mdf','C:\\data\\sc_Web_Primary.ldf']},{'dbName':'sc_Reporting','dbFiles':['C:\\data\\sc_Reporting_Primary.mdf','C:\\data\\sc_Reporting_Primary.ldf']},{'dbName':'sc_ReferenceData','dbFiles':['C:\\data\\sc_ReferenceData_Primary.mdf','C:\\data\\sc_ReferenceData_Primary.ldf']},{'dbName':'sc_Messaging','dbFiles':['C:\\data\\sc_Messaging_Primary.mdf','C:\\data\\sc_Messaging_Primary.ldf']},{'dbName':'sc_ExperienceForms','dbFiles':['C:\\data\\sc_ExperienceForms_Primary.mdf','C:\\data\\sc_ExperienceForms_Primary.ldf']},{'dbName':'sc_MarketingAutomation','dbFiles':['C:\\data\\sc_MarketingAutomation_Primary.mdf','C:\\data\\sc_MarketingAutomation_Primary.ldf']},{'dbName':'sc_Processing.Pools','dbFiles':['C:\\data\\sc_Processing.Pools_Primary.mdf','C:\\data\\sc_Processing.Pools_Primary.ldf']},{'dbName':'sc_Processing.Tasks','dbFiles':['C:\\data\\sc_Processing.Tasks_Primary.mdf','C:\\data\\sc_Processing.Tasks_Primary.ldf']},{'dbName':'sc_ProcessingEngineStorage','dbFiles':['C:\\data\\sc_ProcessingEngineStorage_Primary.mdf','C:\\data\\sc_ProcessingEngineStorage_Primary.ldf']},{'dbName':'sc_ProcessingEngineTasks','dbFiles':['C:\\data\\sc_ProcessingEngineTasks_Primary.mdf','C:\\data\\sc_ProcessingEngineTasks_Primary.ldf']},{'dbName':'sc_Xdb.Collection.ShardMapManager','dbFiles':['C:\\data\\sc_Xdb.Collection.ShardMapManager.mdf','C:\\data\\sc_Xdb.Collection.ShardMapManager_log.ldf']},{'dbName':'sc_Xdb.Collection.Shard0','dbFiles':['C:\\data\\sc_Xdb.Collection.Shard0.mdf','C:\\data\\sc_Xdb.Collection.Shard0_log.ldf']},{'dbName':'sc_Xdb.Collection.Shard1','dbFiles':['C:\\data\\sc_Xdb.Collection.Shard1.mdf','C:\\data\\sc_Xdb.Collection.Shard1_log.ldf']},{'dbName':'sc_EXM.Master','dbFiles':['C:\\data\\sc_EXM.Master_Primary.mdf','C:\\data\\sc_EXM.Master_Primary.ldf']}]"
          volumeMounts:
            - mountPath: "/var/opt/mssql"
              name: mssql
          resources:
            limits:
              memory: 2048Mi
              cpu: 500m
          ports:
            - containerPort: 1433
      volumes:
        - name: mssql
          persistentVolumeClaim:
            claimName: mssql
