You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1016 B

  1. ---
  2. apiVersion: v1
  3. kind: Service
  4. metadata:
  5. name: registry
  6. namespace: {{ registry_namespace }}
  7. labels:
  8. k8s-app: registry
  9. addonmanager.kubernetes.io/mode: Reconcile
  10. kubernetes.io/name: "KubeRegistry"
  11. {% if registry_service_annotations %}
  12. annotations:
  13. {{ registry_service_annotations | to_nice_yaml(indent=2, width=1337) | indent(width=4) }}
  14. {% endif %}
  15. spec:
  16. selector:
  17. k8s-app: registry
  18. type: {{ registry_service_type }}
  19. {% if registry_service_type == "ClusterIP" and registry_service_cluster_ip != "" %}
  20. clusterIP: {{ registry_service_cluster_ip }}
  21. {% endif %}
  22. {% if registry_service_type == "LoadBalancer" and registry_service_loadbalancer_ip != "" %}
  23. loadBalancerIP: {{ registry_service_loadbalancer_ip }}
  24. {% endif %}
  25. ports:
  26. - name: registry
  27. port: {{ registry_port }}
  28. protocol: TCP
  29. targetPort: {{ registry_port }}
  30. {% if registry_service_type == "NodePort" and registry_service_nodeport != "" %}
  31. nodePort: {{ registry_service_nodeport }}
  32. {% endif %}