2018-02-04 04:32:33 +00:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
2018-02-09 07:47:57 +00:00
|
|
|
name: registry
|
|
|
|
namespace: {{ registry_namespace }}
|
2018-02-04 04:32:33 +00:00
|
|
|
labels:
|
2018-02-09 07:47:57 +00:00
|
|
|
k8s-app: registry
|
2018-02-04 04:32:33 +00:00
|
|
|
addonmanager.kubernetes.io/mode: Reconcile
|
|
|
|
kubernetes.io/name: "KubeRegistry"
|
2021-12-15 08:18:19 +00:00
|
|
|
{% if registry_service_annotations %}
|
|
|
|
annotations:
|
|
|
|
{{ registry_service_annotations | to_nice_yaml(indent=2, width=1337) | indent(width=4) }}
|
|
|
|
{% endif %}
|
2018-02-04 04:32:33 +00:00
|
|
|
spec:
|
|
|
|
selector:
|
2018-02-09 07:47:57 +00:00
|
|
|
k8s-app: registry
|
2021-12-15 08:18:19 +00:00
|
|
|
type: {{ registry_service_type }}
|
|
|
|
{% if registry_service_type == "ClusterIP" and registry_service_cluster_ip != "" %}
|
|
|
|
clusterIP: {{ registry_service_cluster_ip }}
|
|
|
|
{% endif %}
|
|
|
|
{% if registry_service_type == "LoadBalancer" and registry_service_loadbalancer_ip != "" %}
|
|
|
|
loadBalancerIP: {{ registry_service_loadbalancer_ip }}
|
|
|
|
{% endif %}
|
2018-02-04 04:32:33 +00:00
|
|
|
ports:
|
2018-02-09 07:47:57 +00:00
|
|
|
- name: registry
|
2020-03-17 12:52:22 +00:00
|
|
|
port: {{ registry_port }}
|
2018-02-09 07:47:57 +00:00
|
|
|
protocol: TCP
|
2021-12-15 08:18:19 +00:00
|
|
|
targetPort: {{ registry_port }}
|
|
|
|
{% if registry_service_type == "NodePort" and registry_service_nodeport != "" %}
|
|
|
|
nodePort: {{ registry_service_nodeport }}
|
|
|
|
{% endif %}
|