Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Commit

Permalink
[stable/kiam] Adding Prometheus metrics service endpoints (#7762)
Browse files Browse the repository at this point in the history
* Prometheus endpoints in agent/server services

Signed-off-by: Scott Crooks <scott.crooks@gmail.com>

* Dots and 'and' condition for agent service

Signed-off-by: Scott Crooks <scott.crooks@gmail.com>

* Bumping version to 1.3.0

Signed-off-by: Scott Crooks <scott.crooks@gmail.com>

* Changing agent service template to match other templates

Signed-off-by: Scott Crooks <scott.crooks@gmail.com>
  • Loading branch information
sc250024 authored and k8s-ci-robot committed Jan 25, 2019
1 parent 39435d0 commit ab0ed34
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stable/kiam/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: kiam
version: 2.0.1-rc5
version: 2.0.1-rc6
appVersion: 3.0-rc1
description: Integrate AWS IAM with Kubernetes
keywords:
Expand Down
25 changes: 25 additions & 0 deletions stable/kiam/templates/agent-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{{- if .Values.agent.enabled -}}
{{- if .Values.agent.prometheus.scrape -}}
apiVersion: v1
kind: Service
metadata:
labels:
app: {{ template "kiam.name" . }}
chart: {{ template "kiam.chart" . }}
component: "{{ .Values.agent.name }}"
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "kiam.fullname" . }}-agent
spec:
clusterIP: None
selector:
app: {{ template "kiam.name" . }}
component: "{{ .Values.agent.name }}"
release: {{ .Release.Name }}
ports:
- name: metrics
port: {{ .Values.agent.prometheus.port }}
targetPort: {{ .Values.agent.prometheus.port }}
protocol: TCP
{{- end -}}
{{- end }}
6 changes: 6 additions & 0 deletions stable/kiam/templates/server-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ spec:
component: "{{ .Values.server.name }}"
release: {{ .Release.Name }}
ports:
{{- if .Values.server.prometheus.scrape }}
- name: metrics
port: {{ .Values.server.prometheus.port }}
targetPort: {{ .Values.server.prometheus.port }}
protocol: TCP
{{- end }}
- name: grpclb
port: {{ .Values.server.service.port }}
targetPort: {{ .Values.server.service.targetPort }}
Expand Down

0 comments on commit ab0ed34

Please sign in to comment.