seninel部署
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. apiVersion: v1
  2. kind: ConfigMap
  3. metadata:
  4. name: envoy-cm
  5. data:
  6. envoy-yml: |-
  7. admin:
  8. access_log_path: /tmp/admin_access.log
  9. address:
  10. socket_address:
  11. protocol: TCP
  12. address: 127.0.0.1
  13. port_value: 9901
  14. static_resources:
  15. listeners:
  16. - name: listener_0
  17. address:
  18. socket_address:
  19. protocol: TCP
  20. address: 0.0.0.0
  21. port_value: 10000
  22. filter_chains:
  23. - filters:
  24. - name: envoy.http_connection_manager
  25. typed_config:
  26. "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
  27. stat_prefix: ingress_http
  28. route_config:
  29. name: local_route
  30. virtual_hosts:
  31. - name: local_service
  32. domains: ["*"]
  33. routes:
  34. - match:
  35. prefix: "/"
  36. route:
  37. host_rewrite: httpbin.org
  38. cluster: service_httpbin
  39. rate_limits:
  40. - stage: 0
  41. actions:
  42. - {destination_cluster: {}}
  43. http_filters:
  44. - name: envoy.rate_limit
  45. config:
  46. domain: foo
  47. stage: 0
  48. rate_limit_service:
  49. grpc_service:
  50. envoy_grpc:
  51. cluster_name: rate_limit_cluster
  52. timeout: 0.25s
  53. - name: envoy.router
  54. clusters:
  55. - name: service_httpbin
  56. connect_timeout: 0.5s
  57. type: LOGICAL_DNS
  58. # Comment out the following line to test on v6 networks
  59. dns_lookup_family: V4_ONLY
  60. lb_policy: ROUND_ROBIN
  61. load_assignment:
  62. cluster_name: service_httpbin
  63. endpoints:
  64. - lb_endpoints:
  65. - endpoint:
  66. address:
  67. socket_address:
  68. address: httpbin.org
  69. port_value: 80
  70. - name: rate_limit_cluster
  71. type: LOGICAL_DNS
  72. connect_timeout: 0.25s
  73. lb_policy: ROUND_ROBIN
  74. http2_protocol_options: {}
  75. load_assignment:
  76. cluster_name: rate_limit_cluster
  77. endpoints:
  78. - lb_endpoints:
  79. - endpoint:
  80. address:
  81. socket_address:
  82. address: sentinel-rls-service
  83. port_value: 10245
  84. ---
  85. apiVersion: apps/v1beta2
  86. kind: Deployment
  87. metadata:
  88. name: envoy-deployment-basic
  89. labels:
  90. app: envoy
  91. spec:
  92. replicas: 1
  93. selector:
  94. matchLabels:
  95. app: envoy
  96. template:
  97. metadata:
  98. labels:
  99. app: envoy
  100. spec:
  101. containers:
  102. - name: envoy
  103. image: envoyproxy/envoy:v1.12.0
  104. ports:
  105. - containerPort: 10000
  106. command: ["envoy"]
  107. args: ["-c", "/tmp/envoy/envoy.yaml"]
  108. volumeMounts:
  109. - name: envoy-config
  110. mountPath: /tmp/envoy
  111. volumes:
  112. - name: envoy-config
  113. configMap:
  114. name: envoy-cm
  115. items:
  116. - key: envoy-yml
  117. path: envoy.yaml
  118. ---
  119. apiVersion: v1
  120. kind: Service
  121. metadata:
  122. name: envoy-service
  123. labels:
  124. name: envoy-service
  125. spec:
  126. type: ClusterIP
  127. ports:
  128. - port: 10000
  129. targetPort: 10000
  130. protocol: TCP
  131. selector:
  132. app: envoy