generate_services.yaml 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. ---
  2. - name: Generate service for hawkular-metrics
  3. template: src=service.j2 dest={{mktemp.stdout}}/templates/metrics-{{obj_name}}-svc.yaml
  4. vars:
  5. obj_name: hawkular-metrics
  6. ports:
  7. - {port: 443, targetPort: https-endpoint}
  8. selector:
  9. name: "{{obj_name}}"
  10. labels:
  11. metrics-infra: "{{obj_name}}"
  12. name: "{{obj_name}}"
  13. changed_when: no
  14. - name: Generate services for cassandra
  15. template: src=service.j2 dest={{mktemp.stdout}}/templates/metrics-{{obj_name}}-svc.yaml
  16. vars:
  17. obj_name: hawkular-{{item}}
  18. ports:
  19. - {name: cql-port, port: 9042, targetPort: cql-port}
  20. - {name: thrift-port, port: 9160, targetPort: thrift-port}
  21. - {name: tcp-port, port: 7000, targetPort: tcp-port}
  22. - {name: ssl-port, port: 7001, targetPort: ssl-port}
  23. selector:
  24. type: hawkular-cassandra
  25. labels:
  26. metrics-infra: hawkular-cassandra
  27. name: hawkular-cassandra
  28. headless: "{{ item == 'cassandra-nodes' }}"
  29. with_items:
  30. - cassandra
  31. - cassandra-nodes
  32. changed_when: no