Open dr-shim opened 6 years ago
Following is working :
k8s_v1_service:
name: my-svc
namespace: default
labels:
app: my-svc
spec_cluster_ip: 'None'
spec_ports:
- name: my-svc
port: 9042
targetPort: 9042
protocol: TCP
spec_selector:
app: my-svc
@rahulinux
I just tried your code, but it also doesn't work for me. Are you sure you were able to make Headless service with this code?
@rahulinux I expected that the provisioned service has its Cluster IP as 'None', but it has a random IP address. I think the ansible service broker has some kind of a problem in this part, becuase if I made the same service with direct yaml file
( Project name -> Application -> Services -> Add to Project -> Import YAML / JSON)
, it's perfectly working, having its Cluster IP as 'None'.
Here is the direct YAML file which provision the same service.
apiVersion: v1
kind: Service
metadata:
labels:
app: cassandra
name: cassandra
spec:
clusterIP: None
ports:
- port: 9042
selector:
app: cassandra
I was trying to make 'Headless service' with this code
But, it doesn't work. It seems that any of the aliases (cluster_ip: && spec: cluster_ip:) of spec_cluster_ip: doesn't work. Is there anyone who tried to make Headless service using APB?