seninel部署
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

sentinel-rls.yml 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. apiVersion: v1
  2. kind: ConfigMap
  3. metadata:
  4. name: sentinel-rule-cm
  5. data:
  6. rule-yaml: |-
  7. domain: foo
  8. descriptors:
  9. - resources:
  10. - key: "destination_cluster"
  11. value: "service_httpbin"
  12. count: 1
  13. ---
  14. apiVersion: apps/v1beta2
  15. kind: Deployment
  16. metadata:
  17. name: sentinel-rls-server
  18. labels:
  19. app: sentinel
  20. spec:
  21. replicas: 1
  22. selector:
  23. matchLabels:
  24. app: sentinel
  25. template:
  26. metadata:
  27. labels:
  28. app: sentinel
  29. spec:
  30. containers:
  31. - name: sentinelserver
  32. # You could replace the image with your own image here
  33. image: "registry.cn-hangzhou.aliyuncs.com/sentinel-docker-repo/sentinel-envoy-rls-server:latest"
  34. imagePullPolicy: Always
  35. ports:
  36. - containerPort: 10245
  37. - containerPort: 8719
  38. volumeMounts:
  39. - name: sentinel-rule-config
  40. mountPath: /tmp/sentinel
  41. env:
  42. - name: SENTINEL_RLS_RULE_FILE_PATH
  43. value: "/tmp/sentinel/rule.yaml"
  44. volumes:
  45. - name: sentinel-rule-config
  46. configMap:
  47. name: sentinel-rule-cm
  48. items:
  49. - key: rule-yaml
  50. path: rule.yaml
  51. ---
  52. apiVersion: v1
  53. kind: Service
  54. metadata:
  55. name: sentinel-rls-service
  56. labels:
  57. name: sentinel-rls-service
  58. spec:
  59. type: ClusterIP
  60. ports:
  61. - port: 8719
  62. targetPort: 8719
  63. name: sentinel-command
  64. - port: 10245
  65. targetPort: 10245
  66. name: sentinel-grpc
  67. selector:
  68. app: sentinel