apiVersion: v1
kind: Service
metadata:
  name: rook-ceph-rgw-{{taskserv.object_storename}}-external
  namespace: {{taskserv.namespace  | default (value="rook-ceph")}} # namespace:cluster
  labels:
    app: rook-ceph-rgw
    rook_cluster: {{taskserv.clustertname | default(value="rook-ceph")}}  # namespace:cluster
    rook_object_store: {{taskserv.object_storename}}
spec:
  ports:
    - name: rgw
      port: 80 # service port mentioned in object store crd
      protocol: TCP
      targetPort: 8080
  selector:
    app: rook-ceph-rgw
    rook_cluster: {{taskserv.clustertname | default(value="rook-ceph")}}  # namespace:cluster
    rook_object_store: {{taskserv.object_storename}}
  sessionAffinity: None
  type: NodePort
