cloud-barista / cb-operator

The Operator for Cloud-Barista system
Apache License 2.0
6 stars 6 forks source link

TODO: Open multiple ports for Spider, Tumblebug, and Dragonfly in Helm chart #45

Closed jihoon-seo closed 4 years ago

jihoon-seo commented 4 years ago

https://kubernetes.io/docs/concepts/services-networking/service/#multi-port-services

issue-label-bot[bot] commented 4 years ago

Issue-Label Bot is automatically applying the label feature_request to this issue, with a confidence of 0.92. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

jihoon-seo commented 4 years ago

[Analysis]

  1. In charts/cb-spider/templates/deployment.yaml

      containers:
        - name: {{ .Chart.Name }}
          #ports:
          #  - name: http
          #    containerPort: 80
          #    protocol: TCP
  2. In charts/cb-spider/templates/service.yaml

    {{- if (and (eq .Values.service.type "ClusterIP") (not (empty .Values.service.clusterIP))) }}
    clusterIP: {{ .Values.service.clusterIP }}
    {{- end }}  
    ports:
    - port: {{ .Values.service.port }}
      protocol: TCP
      name: http
      targetPort: 1024
    {{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort))) }}
      nodePort: {{ .Values.service.nodePort }}
    {{- end }}
  3. In charts/cb-spider/values.yaml

    service:
    type: ClusterIP
    port: 1024
  4. In values.yaml

    cb-spider:
    enabled : true
    service:
    nodePort: 31024
    type: NodePort