Skip to content

Conversation

Aisuko
Copy link
Contributor

@Aisuko Aisuko commented Nov 10, 2020

Signed-off-by: aisuko urakiny@gmail.com

Description

This PR related to #1782

Notes for Reviewers

Signed commits

  • Yes, I signed my commits.

Signed-off-by: aisuko <urakiny@gmail.com>
@Aisuko Aisuko requested a review from leecalcote November 10, 2020 07:08
@Aisuko Aisuko changed the title Add meshery adaptor for networking service mesh Add meshery adaptor chart for networking service mesh Nov 10, 2020
@leecalcote
Copy link
Member

@edwarnicke fyi

@@ -0,0 +1,42 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "meshery-nsm.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

".Values.service.port" could be used directly when we needed. I do not see a reason to add additional lines to define a
variables which are not changed in the current file before they are used.

@@ -0,0 +1,42 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "meshery-nsm.fullname" . -}}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"meshery-nsm.fullname" template could be used directly when we needed. I do not see a reason to add additional lines to define a
variables which are not changed in the current file before they are used.

export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "meshery-osm.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:10009
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we not use {{ .Values.service.port }} to populate value of port "10009". This could be used for all port and in this way we will have only one place where they have to be changed (values.yaml), because from what I noticed we changed them manually here in NOTES.txt

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

port-forward command forward the service which in the pod, we should not use the service port and we need to use the service port.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's may good point is here that we can change the service port which in the pod into values.yaml. I will do this in next PR.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, my point is to point it to the correct port from the values.yaml

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean we add the adapter pod port into values.yaml, not mean use the service port of the pod. That's two different things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants