Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcgrath207 committed Mar 31, 2024
1 parent ab9f046 commit e055003
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 2 deletions.
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,20 @@ release-helm:
cd ..

release: release-docker release-helm helm-docs
# Prod release
# ex. make VERSION=1.6.2 release
# Prerelease Candidate
# ex. make VERSION=1.6.3-rc01 release

prerelease-github:
# Prerelease Candidate
# ex. make VERSION=1.6.3-rc01 prerelease-github
gh release create ${VERSION} --generate-notes --prerelease
gh release upload ${VERSION} "chart/k8s-ephemeral-storage-metrics-${VERSION}.tgz"
rm chart/k8s-ephemeral-storage-metrics-*.tgz

release-github:
# Prod release
# ex. make VERSION=1.6.2 release-github
gh release create ${VERSION} --generate-notes
gh release upload ${VERSION} "chart/k8s-ephemeral-storage-metrics-${VERSION}.tgz"
Expand Down
4 changes: 2 additions & 2 deletions chart/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ helm upgrade --install my-deployment k8s-ephemeral-storage-metrics/k8s-ephemeral

## Contribute

### Start Kind
### Start minikube
```bash
make new_kind
make new_minikube
```

### Run locally
Expand Down
20 changes: 20 additions & 0 deletions chart/templates/metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,32 @@ spec:
port: metrics
scheme: http
interval: "{{ .Values.interval }}s"
{{- if .Values.serviceMonitor.metricRelabelings }}
metricRelabelings:
{{ toYaml .Values.serviceMonitor.metricRelabelings | indent 4 }}
{{- end }}
{{- if .Values.serviceMonitor.relabelings }}
relabelings:
{{ toYaml .Values.serviceMonitor.relabelings | indent 4 }}
{{- end }}
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
selector:
matchLabels:
{{- include "chart.selectorLabels" . | nindent 6 }}
{{- if .Values.serviceMonitor.targetLabels }}
targetLabels:
{{- range .Values.serviceMonitor.targetLabels }}
- {{ . }}
{{- end }}
{{- end }}
{{- if .Values.serviceMonitor.podTargetLabels }}
podTargetLabels:
{{- range .Values.serviceMonitor.podTargetLabels }}
- {{ . }}
{{- end }}
{{- end }}

---

Expand Down
11 changes: 11 additions & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@ image:
tag: 1.6.2
imagePullPolicy: IfNotPresent

serviceMonitor:
# Set relabelings as per https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#monitoring.coreos.com/v1.RelabelConfig
relabelings: []
# Set metricRelabelings as per https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#monitoring.coreos.com/v1.RelabelConfig
metricRelabelings: []
# Set targetLabels as per https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#monitoring.coreos.com/v1.ServiceMonitorSpec
targetLabels: []
# Set podTargetLabels as per https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#monitoring.coreos.com/v1.ServiceMonitorSpec
podTargetLabels: []


# -- Set metrics you want to enable
metrics:
# -- Percentage of ephemeral storage used by a container in a pod
Expand Down

0 comments on commit e055003

Please sign in to comment.