Merge branch 'master' into wwi-app

This commit is contained in:
Jovan Popovic
2018-10-05 22:02:39 +02:00
4 changed files with 49 additions and 3 deletions
@@ -28,7 +28,7 @@ RETURN (SELECT 1 AS AccessResult
INNER JOIN [Application].StateProvinces AS sp
ON c.StateProvinceID = sp.StateProvinceID
WHERE c.CityID = @CityID) + N'' Sales'') <> 0
OR (ORIGINAL_LOGIN() = N''Website''
OR (ORIGINAL_LOGIN() = N''Website'' OR ORIGINAL_LOGIN() = N''WebApi''
AND EXISTS (SELECT 1
FROM [Application].Cities AS c
INNER JOIN [Application].StateProvinces AS sp
@@ -1,2 +1,2 @@
Django==1.11.5
django ~> 1.11.15
django-pyodbc-azure==1.11.0.0
@@ -1,4 +1,4 @@
Django==1.9.8
django ~> 1.11.15
dj-database-url==0.3.0
dj-static==0.0.6
gunicorn==19.6.0
@@ -0,0 +1,46 @@
apiVersion: v1
kind: ServiceAccount
metadata: {name: manual-failover, namespace: ag1}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata: {name: manual-failover, namespace: ag1}
rules:
- apiGroups: ['']
resourceNames: [ag1]
resources: [configmaps]
verbs: [get, update]
- apiGroups: ['']
resourceNames: [ag1]
resources: [endpoints]
verbs: [get]
- apiGroups: ['']
resources: [pods]
verbs: [list]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata: {name: manual-failover, namespace: ag1}
roleRef: {apiGroup: rbac.authorization.k8s.io, kind: Role, name: manual-failover}
subjects:
- {kind: ServiceAccount, name: manual-failover}
---
apiVersion: batch/v1
kind: Job
metadata: {name: manual-failover, namespace: ag1}
spec:
template:
metadata: {name: manual-failover}
spec:
containers:
- command: [/mssql-server-k8s-failover]
env:
- {name: MSSQL_K8S_AG_NAME, value: ag1}
- {name: MSSQL_K8S_NEW_PRIMARY, value: <containerName>}
- name: MSSQL_K8S_NAMESPACE
valueFrom:
fieldRef: {fieldPath: metadata.namespace}
image: mcr.microsoft.com/mssql/ha:vNext-CTP2.0-ubuntu
name: manual-failover
restartPolicy: Never
serviceAccount: manual-failover