Skip to content

Commit

Permalink
Merge pull request #45 from stakater-charts/add-endpoint-monitor
Browse files Browse the repository at this point in the history
Add endpoint moinitor
  • Loading branch information
usamaahmadkhan authored Oct 2, 2020
2 parents e2458d3 + 3ef69b3 commit 03ebfbf
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 2 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,7 @@ To uninstall the chart:
| autoscaling.annotations | Annotations for horizontal pod autoscaler | `{}` |
| autoscaling.minReplicas | Sets minimum replica count when autoscaling is enabled | `1` |
| autoscaling.maxReplicas | Sets maximum replica count when autoscaling is enabled | `10` |
| autoscaling.metrics | Configuration for hpa metrics, set when autoscaling is enabled | `{}` |
| autoscaling.metrics | Configuration for hpa metrics, set when autoscaling is enabled | `{}` |
| endpointMonitor.enabled | Enable endpointMonitor for IMC (https://github.com/stakater/IngressMonitorController) | `false` |
| endpointMonitor.additionalLabels | Labels for endpointMonitor | `{}` |
| endpointMonitor.annotations | Annotations for endpointMonitor | `{}` |
34 changes: 34 additions & 0 deletions application/templates/endpointmonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{{- if .Values.endpointMonitor }}
{{- if .Values.endpointMonitor.enabled }}
apiVersion: endpointmonitor.stakater.com/v1alpha1
kind: EndpointMonitor
metadata:
labels:
{{ include "application.labels.stakater" . | indent 4 }}
{{ include "application.labels.chart" . | indent 4 }}
{{- if .Values.endpointMonitor.additionalLabels }}
{{ toYaml .Values.endpointMonitor.additionalLabels | indent 4 }}
{{- end }}
{{- if or .Values.endpointMonitor.annotations }}
annotations:
{{- end }}
{{- if or .Values.endpointMonitor.annotations }}
{{ toYaml .Values.endpointMonitor.annotations | indent 4 }}
{{- end }}
name: {{ template "application.name" . }}-ep-monitor
spec:
forceHttps: true
urlFrom:
{{- if .Values.route -}}
{{- if .Values.route.enabled -}}
routeRef:
{{- end }}
{{- end }}
{{- if .Values.ingress -}}
{{- if .Values.ingress.enabled -}}
ingressRef:
{{- end }}
{{- end }}
name: {{ template "application.name" . }}
{{- end }}
{{- end }}
14 changes: 13 additions & 1 deletion application/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -395,4 +395,16 @@ autoscaling:
- type: Resource
resource:
name: memory
targetAverageUtilization: 60
targetAverageUtilization: 60

# EndpointMonitor for IMC (https://github.com/stakater/IngressMonitorController)
endpointMonitor:
enabled: false

# Additional labels
additionalLabels:
# key: value

# Additional annotations
annotations:
# key: value

0 comments on commit 03ebfbf

Please sign in to comment.