service-mysql-for-apollo-dev-env.yaml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #
  2. # Copyright 2021 Apollo Authors
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. #
  16. ---
  17. # 为外部 mysql 服务设置 service
  18. kind: Service
  19. apiVersion: v1
  20. metadata:
  21. namespace: sre
  22. name: service-mysql-for-apollo-dev-env
  23. labels:
  24. app: service-mysql-for-apollo-dev-env
  25. spec:
  26. ports:
  27. - protocol: TCP
  28. port: 3306
  29. targetPort: 3306
  30. type: ClusterIP
  31. sessionAffinity: None
  32. ---
  33. kind: Endpoints
  34. apiVersion: v1
  35. metadata:
  36. namespace: sre
  37. name: service-mysql-for-apollo-dev-env
  38. subsets:
  39. - addresses:
  40. - ip: your-mysql-addresses
  41. ports:
  42. - protocol: TCP
  43. port: 3306