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:
zhengtianbao
2021-12-15 02:18:19 -06:00
committed by GitHub
parent 4daa824b3c
commit aa9b8453a0
3 changed files with 52 additions and 0 deletions

View File

@@ -1,4 +1,29 @@
---
- name: Registry | check registry_service_type value
fail:
msg: "registry_service_type can only be 'ClusterIP', 'LoadBalancer' or 'NodePort'"
when: registry_service_type not in ['ClusterIP', 'LoadBalancer', 'NodePort']
- name: Registry | Stop if registry_service_cluster_ip is defined when registry_service_type is not 'ClusterIP'
fail:
msg: "registry_service_cluster_ip support only compatible with ClusterIP."
when:
- registry_service_cluster_ip is defined and registry_service_cluster_ip != ""
- registry_service_type != "ClusterIP"
- name: Registry | Stop if registry_service_loadbalancer_ip is defined when registry_service_type is not 'LoadBalancer'
fail:
msg: "registry_service_loadbalancer_ip support only compatible with LoadBalancer."
when:
- registry_service_loadbalancer_ip is defined and registry_service_loadbalancer_ip != ""
- registry_service_type != "LoadBalancer"
- name: Registry | Stop if registry_service_nodeport is defined when registry_service_type is not 'NodePort'
fail:
msg: "registry_service_nodeport support only compatible with NodePort."
when:
- registry_service_nodeport is defined and registry_service_nodeport != ""
- registry_service_type != "NodePort"
- name: Registry | Create addon dir
file: