File tree Expand file tree Collapse file tree
samples/features/high availability/Kubernetes/sample-manifest-files Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ apiVersion : v1
2+ kind : ServiceAccount
3+ metadata : {name: manual-failover, namespace: ag1}
4+ ---
5+ apiVersion : rbac.authorization.k8s.io/v1
6+ kind : Role
7+ metadata : {name: manual-failover, namespace: ag1}
8+ rules :
9+ - apiGroups : ['']
10+ resourceNames : [ag1]
11+ resources : [configmaps]
12+ verbs : [get, update]
13+ - apiGroups : ['']
14+ resourceNames : [ag1]
15+ resources : [endpoints]
16+ verbs : [get]
17+ - apiGroups : ['']
18+ resources : [pods]
19+ verbs : [list]
20+ ---
21+ apiVersion : rbac.authorization.k8s.io/v1
22+ kind : RoleBinding
23+ metadata : {name: manual-failover, namespace: ag1}
24+ roleRef : {apiGroup: rbac.authorization.k8s.io, kind: Role, name: manual-failover}
25+ subjects :
26+ - {kind: ServiceAccount, name: manual-failover}
27+ ---
28+ apiVersion : batch/v1
29+ kind : Job
30+ metadata : {name: manual-failover, namespace: ag1}
31+ spec :
32+ template :
33+ metadata : {name: manual-failover}
34+ spec :
35+ containers :
36+ - command : [/mssql-server-k8s-failover]
37+ env :
38+ - {name: MSSQL_K8S_AG_NAME, value: ag1}
39+ - {name: MSSQL_K8S_NEW_PRIMARY, value: <containerName>}
40+ - name : MSSQL_K8S_NAMESPACE
41+ valueFrom :
42+ fieldRef : {fieldPath: metadata.namespace}
43+ image : mcr.microsoft.com/mssql/ha:vNext-CTP2.0-ubuntu
44+ name : manual-failover
45+ restartPolicy : Never
46+ serviceAccount : manual-failover
You can’t perform that action at this time.
0 commit comments