Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
72 lines (71 sloc) 2.05 KB
apiVersion: v1
kind: Namespace
metadata: {name: myag}
---
apiVersion: v1
kind: ServiceAccount
metadata: {name: mssql-operator, namespace: myag}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata: {name: mssql-operator-myag}
rules:
- apiGroups: ['']
resources: [serviceaccounts, services]
verbs: [create, get, update, delete]
- apiGroups: [batch]
resources: [jobs]
verbs: [create, get, update, delete]
- apiGroups: [rbac.authorization.k8s.io]
resources: [roles, rolebindings]
verbs: [create, get, update, delete]
- apiGroups: [apps]
resources: [statefulsets]
verbs: [create, delete, get, update]
- apiGroups: ['']
resources: [configmaps, endpoints, secrets]
verbs: [create, get, update, watch, delete]
- apiGroups: ['']
resources: [pods]
verbs: [get, list, update]
- apiGroups: [apiextensions.k8s.io]
resources: [customresourcedefinitions]
verbs: [create]
- apiGroups: [apiextensions.k8s.io]
resourceNames: [sqlservers.mssql.microsoft.com]
resources: [customresourcedefinitions]
verbs: [delete, get, update]
- apiGroups: [mssql.microsoft.com]
resources: [sqlservers]
verbs: [get, list, watch, update]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata: {name: mssql-operator-myag}
roleRef: {apiGroup: rbac.authorization.k8s.io, kind: ClusterRole, name: mssql-operator-myag}
subjects:
- {kind: ServiceAccount, name: mssql-operator, namespace: myag}
---
apiVersion: apps/v1beta2
kind: Deployment
metadata: {name: mssql-operator, namespace: myag}
spec:
replicas: 1
selector:
matchLabels: {app: mssql-operator}
template:
metadata:
labels: {app: mssql-operator}
spec:
containers:
- command: [/mssql-server-k8s-operator]
env:
- name: MSSQL_K8S_NAMESPACE
valueFrom:
fieldRef: {fieldPath: metadata.namespace}
- name: MSSQL_POD_NAME
valueFrom:
fieldRef: {fieldPath: metadata.name}
image: mcr.microsoft.com/mssql/ha:2019-CTP3.0-ubuntu
name: mssql-operator
serviceAccount: mssql-operator
You can’t perform that action at this time.