Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] VX-270: Change node to exported_node #255

Merged
merged 1 commit into from
Aug 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions deploy/helm/apps/charts/prometheus/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,27 @@ metadata:
spec:
selector:
app: prometheus
{{- if .Values.service.nodePort }}
type: NodePort
type: ClusterIP
ports:
- port: 9090
targetPort: 9090
nodePort: 30003
{{- else }}
type: ClusterIP

---

{{- if .Values.service.nodePort }}
kind: Service
apiVersion: v1
metadata:
labels:
app: prometheus
name: prometheus-external
namespace: vortex
spec:
selector:
app: prometheus
type: NodePort
ports:
- port: 9090
targetPort: 9090
{{- end }}
nodePort: 30003
{{- end }}
28 changes: 18 additions & 10 deletions deploy/helm/services/charts/mongodb/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,27 @@ metadata:
spec:
selector:
service: mongo
{{- if .Values.service.nodePort }}
type: NodePort
ports:
- port: 27017
nodePort: 31717
targetPort: 27017
protocol: TCP
{{- else }}
clusterIP: None
type: ClusterIP
ports:
- port: 27017
targetPort: 27017
{{- end }}


---

{{- if .Values.service.nodePort }}
apiVersion: v1
kind: Service
metadata:
name: mongo-external
namespace: vortex
spec:
selector:
service: mongo
type: NodePort
ports:
- port: 27017
nodePort: 31717
targetPort: 27017
protocol: TCP
{{- end }}
4 changes: 2 additions & 2 deletions src/prometheuscontroller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func GetPod(sp *serviceprovider.Container, id string) (entity.PodMetrics, error)
case "kube_pod_info":
pod.PodName = id
pod.IP = string(result.Metric["pod_ip"])
pod.Node = string(result.Metric["node"])
pod.Node = string(result.Metric["exported_node"])
pod.Namespace = string(result.Metric["namespace"])
pod.CreateByKind = string(result.Metric["created_by_kind"])
pod.CreateByName = string(result.Metric["created_by_name"])
Expand Down Expand Up @@ -331,7 +331,7 @@ func GetContainer(sp *serviceprovider.Container, id string) (entity.ContainerMet
case "kube_pod_container_info":
container.Detail.ContainerName = id
container.Detail.Pod = string(result.Metric["pod"])
container.Detail.Node = string(result.Metric["node"])
container.Detail.Node = string(result.Metric["exported_node"])
container.Detail.Image = string(result.Metric["image"])
container.Detail.Namespace = string(result.Metric["namespace"])

Expand Down