mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-03-10 20:29:18 +03:00
registry: service add clusterIP, nodePort, loadBalancer support (#8291)
* registry: service add clusterIP, nodePort, loadBalancer support * modify camelcase name to underscore * Add registry service type compatibility check
This commit is contained in:
@@ -8,10 +8,25 @@ metadata:
|
||||
k8s-app: registry
|
||||
addonmanager.kubernetes.io/mode: Reconcile
|
||||
kubernetes.io/name: "KubeRegistry"
|
||||
{% if registry_service_annotations %}
|
||||
annotations:
|
||||
{{ registry_service_annotations | to_nice_yaml(indent=2, width=1337) | indent(width=4) }}
|
||||
{% endif %}
|
||||
spec:
|
||||
selector:
|
||||
k8s-app: registry
|
||||
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 %}
|
||||
ports:
|
||||
- name: registry
|
||||
port: {{ registry_port }}
|
||||
protocol: TCP
|
||||
targetPort: {{ registry_port }}
|
||||
{% if registry_service_type == "NodePort" and registry_service_nodeport != "" %}
|
||||
nodePort: {{ registry_service_nodeport }}
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user