114 строки
2.1 KiB
YAML
114 строки
2.1 KiB
YAML
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: Role
|
|
metadata:
|
|
creationTimestamp: null
|
|
name: ring-operator
|
|
rules:
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- pods
|
|
- services
|
|
- endpoints
|
|
- persistentvolumeclaims
|
|
- events
|
|
- configmaps
|
|
- secrets
|
|
verbs:
|
|
- '*'
|
|
- apiGroups:
|
|
- apps
|
|
resources:
|
|
- deployments
|
|
- daemonsets
|
|
- replicasets
|
|
- statefulsets
|
|
verbs:
|
|
- '*'
|
|
- apiGroups:
|
|
- monitoring.coreos.com
|
|
resources:
|
|
- servicemonitors
|
|
verbs:
|
|
- get
|
|
- create
|
|
- apiGroups:
|
|
- apps
|
|
resourceNames:
|
|
- ring-operator
|
|
resources:
|
|
- deployments/finalizers
|
|
verbs:
|
|
- update
|
|
- apiGroups:
|
|
- rings.microsoft.com
|
|
resources:
|
|
- '*'
|
|
verbs:
|
|
- '*'
|
|
- apiGroups:
|
|
- traefik.containo.us
|
|
resources:
|
|
- 'ingressroutes'
|
|
- 'middlewares'
|
|
verbs:
|
|
- '*'
|
|
---
|
|
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: ring-operator
|
|
---
|
|
kind: RoleBinding
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
metadata:
|
|
name: ring-operator
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: ring-operator
|
|
roleRef:
|
|
kind: Role
|
|
name: ring-operator
|
|
apiGroup: rbac.authorization.k8s.io
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: ring-operator
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
name: ring-operator
|
|
template:
|
|
metadata:
|
|
labels:
|
|
name: ring-operator
|
|
spec:
|
|
serviceAccountName: ring-operator
|
|
containers:
|
|
- name: ring-operator
|
|
image: mcr.microsoft.com/k8s/bedrock/ring-operator:v1alpha1
|
|
command: [ring-operator]
|
|
imagePullPolicy: IfNotPresent
|
|
env:
|
|
- name: OPERATOR_NAME
|
|
value: ring-operator
|
|
- name: RING_ROUTING_KEY
|
|
value: group
|
|
- name: WATCH_NAMESPACE
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.namespace
|
|
- name: POD_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.name
|
|
resources:
|
|
requests:
|
|
cpu: 500m
|
|
memory: 250Mi
|
|
limits:
|
|
cpu: 2000m
|
|
memory: 500Mi
|