8000 feat(aws-eks-asg-rolling-update-handler): Add option to create PodMonitor by kilitr · Pull Request #9 · TwiN/helm-charts · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kilitr
Copy link
@kilitr kilitr commented Nov 13, 2023

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

  • Tested and/or added tests to validate that the changes work as intended, if applicable.
  • Updated documentation in README.md, if applicable.

@kilitr
Copy link
Author
kilitr commented Nov 13, 2023

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

Copy link
Owner
@TwiN TwiN left a 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?

@kilitr kilitr force-pushed the master branch 2 times, most recently from d2413a1 to 64e92fc Compare January 31, 2024 09:13
@kilitr
Copy link
Author
kilitr commented Jan 31, 2024

sure :)

@kilitr kilitr force-pushed the master branch 3 times, most recently from 4b8e14e to 4153b57 Compare March 26, 2024 13:45
@kilitr kilitr requested a review from TwiN March 26, 2024 13:45
@kilitr kilitr changed the title add spec.containers[].ports[] for METRICS_PORT env feat(aws-eks-asg-rolling-update-handler): Add option to create PodMonitor Mar 26, 2024
@@ -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" }}
Copy link
Owner

Choose a reason for hiding this comment

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

Hide comment

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 }}
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
{{- if .Values.podmonitor.create }}
{{- if .Values.podMonitor.create }}

@@ -49,3 +49,8 @@ containerSecurityContext: {}
# capabilities:
# drop:
# - ALL

podmonitor:
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
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": {}}` |
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
| podmonitor | Create a PodMonitor | no | `{"create": false, "labels": {}}` |
| podMonitor | Create a PodMonitor | no | `{"create": false, "labels": {}}` |

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.

2 participants
0