-
-
Notifications
You must be signed in to change notification settings - Fork 11
feat(aws-eks-asg-rolling-update-handler): Add option to create PodMonitor #9
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
base: master
Are you sure you want to change the base?
Conversation
I need this in order to use a PodMonitor like this: apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: rolling-update-handler-metrics
spec:
selector:
matchLabels:
app.kubernetes.io/name: aws-eks-asg-rolling-update-handler
podMetricsEndpoints:
- port: metrics |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you bump the version in the Chart.yaml file?
d2413a1
to
64e92fc
Compare
sure :) |
4b8e14e
to
4153b57
Compare
@@ -33,6 +33,14 @@ spec: | |||
dnsPolicy: Default | |||
containers: | |||
- name: {{ template "aws-eks-asg-rolling-update-handler.name" . }} | |||
{{- range .Values.environmentVars }} | |||
{{- if eq .name "METRICS_PORT" }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've never seen this kind of pattern, and I'm not really a fan. I'd rather have a clear variable for the chart.
Something like
metrics:
enabled: true
port: 8080
@@ -0,0 +1,18 @@ | |||
{{- if .Values.podmonitor.create }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{{- if .Values.podmonitor.create }} | |
{{- if .Values.podMonitor.create }} |
@@ -49,3 +49,8 @@ containerSecurityContext: {} | |||
# capabilities: | |||
# drop: | |||
# - ALL | |||
|
|||
podmonitor: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
podmonitor: | |
podMonitor: |
@@ -14,3 +14,4 @@ The following table lists the configurable parameters of the aws-eks-asg-rolling | |||
| podLabels | Labels to add to the aws-eks-asg-rolling-update-handler pod configuration | no | `{}` | | |||
| securityContext | Pod security context | no | `{}` | | |||
| containerSecurityContext | Container security context | no | `{}` | | |||
| podmonitor | Create a PodMonitor | no | `{"create": false, "labels": {}}` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| podmonitor | Create a PodMonitor | no | `{"create": false, "labels": {}}` | | |
| podMonitor | Create a PodMonitor | no | `{"create": false, "labels": {}}` | |
Summary
this enables usage of PodMonitor CustomResource in kube-prometheus-stack and it opens the possibility of port-forwarding.
In my opinion this shouldnt be notable in existing deployments.
Checklist
README.md
, if applicable.