Skip to content

Commit

Permalink
fixed polling and updated packages (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcgrath207 authored Oct 18, 2023
1 parent 2992779 commit 2ff6844
Show file tree
Hide file tree
Showing 17 changed files with 165 additions and 208 deletions.
6 changes: 2 additions & 4 deletions DockerfileDebug
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ COPY --from=builder /app .
COPY --from=builder /go/bin/dlv .

ENV LOG_LEVEL=debug
EXPOSE 9999

ENTRYPOINT ["/dlv", "exec", "--listen=:9999", "--headless=true", "--api-version=2", "--accept-multiclient", "/app"]
#ENTRYPOINT ["/dlv", "exec", "--listen=:9999", "--headless=true", "--api-version=2", "--accept-multiclient", "/app"]
EXPOSE 30002

ENTRYPOINT ["/dlv", "exec", "--listen=:30002", "--headless=true", "--api-version=2", "/app"]
15 changes: 9 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

GITROOT ?= $(shell pwd)
DEPLOYMENT_NAME = ephemeral-metrics
K8S_VERSION ?= 1.26.0
K8S_VERSION ?= 1.27.0

## Location to install dependencies to
LOCALBIN ?= $(shell pwd)/bin
Expand Down Expand Up @@ -46,12 +46,15 @@ deploy_e2e: init ginkgo new_kind
release-docker:
GITHUB_TOKEN="${GITHUB_TOKEN}" VERSION="${VERSION}" ./scripts/release-docker.sh

release: release-docker helm-docs
# ex. make GITHUB_TOKEN=asdfasdf VERSION=1.0.0 release
release: github_login release-docker helm-docs
# ex. make VERSION=1.0.1 release

helm package chart --destination chart
helm repo index --merge index.yaml chart/.

release-github:
# ex. make VERSION=1.0.0 release-github
gh auth login --web
release-github: github_login
# ex. make VERSION=1.0.1 release-github
gh release create ${VERSION} --generate-notes

github_login:
gh auth login --web --scopes=read:packages,write:packages
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ helm upgrade --install my-deployment k8s-ephemeral-storage-metrics/k8s-ephemeral
| dev.enabled | bool | `false` | |
| image.imagePullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"ghcr.io/jmcgrath207/k8s-ephemeral-storage-metrics"` | |
| image.tag | string | `"1.0.0"` | |
| image.tag | string | `"1.0.1"` | |
| interval | int | `15` | |
| log_level | string | `"info"` | |
| prometheus.release | string | `"kube-prometheus-stack"` | |
Expand Down
4 changes: 2 additions & 2 deletions chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: k8s-ephemeral-storage-metrics
version: 1.0.0
appVersion: 1.0.0
version: 1.0.1
appVersion: 1.0.1
kubeVersion: ">=1.21.0-0"
description: Ephemeral storage metrics for prometheus operator.
home: https://github.com/jmcgrath207/k8s-ephemeral-storage-metrics
Expand Down
2 changes: 1 addition & 1 deletion chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ helm upgrade --install my-deployment k8s-ephemeral-storage-metrics/k8s-ephemeral
| dev.enabled | bool | `false` | |
| image.imagePullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"ghcr.io/jmcgrath207/k8s-ephemeral-storage-metrics"` | |
| image.tag | string | `"1.0.0"` | |
| image.tag | string | `"1.0.1"` | |
| interval | int | `15` | |
| log_level | string | `"info"` | |
| prometheus.release | string | `"kube-prometheus-stack"` | |
Expand Down
26 changes: 24 additions & 2 deletions chart/index.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
apiVersion: v1
entries:
k8s-ephemeral-storage-metrics:
- annotations:
artifacthub.io/license: MIT
artifacthub.io/links: |
- name: Documentation
url: https://github.com/jmcgrath207/k8s-ephemeral-storage-metrics
artifacthub.io/prerelease: "false"
apiVersion: v2
appVersion: 1.0.1
created: "2023-10-17T23:57:10.241409772-05:00"
description: Ephemeral storage metrics for prometheus operator.
digest: b81465591319d6afd6d750061d7a52fa6888a433e38bbd9ec49670e7349a5578
home: https://github.com/jmcgrath207/k8s-ephemeral-storage-metrics
keywords:
- kubernetes
- metrics
kubeVersion: '>=1.21.0-0'
name: k8s-ephemeral-storage-metrics
sources:
- https://github.com/jmcgrath207/k8s-ephemeral-storage-metrics
urls:
- k8s-ephemeral-storage-metrics-1.0.1.tgz
version: 1.0.1
- annotations:
artifacthub.io/license: MIT
artifacthub.io/links: |
Expand All @@ -9,7 +31,7 @@ entries:
artifacthub.io/prerelease: "false"
apiVersion: v2
appVersion: 1.0.0
created: "2023-10-15T15:42:13.072877463-05:00"
created: "2023-10-17T23:57:10.240782502-05:00"
description: Ephemeral storage metrics for prometheus operator.
digest: 1b3adbccb37a844e66826426c3e735f65f65639f910eafc9ca2ff85b5f083a40
home: https://github.com/jmcgrath207/k8s-ephemeral-storage-metrics
Expand All @@ -23,4 +45,4 @@ entries:
urls:
- k8s-ephemeral-storage-metrics-1.0.0.tgz
version: 1.0.0
generated: "2023-10-15T15:42:13.071453743-05:00"
generated: "2023-10-17T23:57:10.240230462-05:00"
Binary file added chart/k8s-ephemeral-storage-metrics-1.0.1.tgz
Binary file not shown.
5 changes: 5 additions & 0 deletions chart/templates/DeployType.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ spec:
- name: metrics
containerPort: 9100
protocol: TCP
{{ if .Values.dev.enabled }}
- name: debug
containerPort: 30002
protocol: TCP
{{ end }}
livenessProbe:
failureThreshold: 10
httpGet:
Expand Down
9 changes: 4 additions & 5 deletions chart/templates/localDebugService.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@ metadata:
{{- include "chart.labels" . | nindent 4 }}
app.kubernetes.io/name: k8s-ephemeral-storage-metrics-debug
spec:
type: NodePort
type: ClusterIP
selector:
{{- include "chart.selectorLabels" . | nindent 4 }}
app.kubernetes.io/name: k8s-ephemeral-storage-metrics-debug
ports:
- protocol: TCP
port: 9999
targetPort: 9999
nodePort: 30002
port: 30002
targetPort: debug
name: debug
{{ end }}
2 changes: 1 addition & 1 deletion chart/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
image:
repository: ghcr.io/jmcgrath207/k8s-ephemeral-storage-metrics
tag: 1.0.0
tag: 1.0.1
imagePullPolicy: IfNotPresent
log_level: info
deploy_type: DaemonSet
Expand Down
32 changes: 16 additions & 16 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ module k8s-ephemeral-storage-metrics
go 1.21

require (
github.com/onsi/ginkgo/v2 v2.9.7
github.com/onsi/gomega v1.27.7
github.com/onsi/ginkgo/v2 v2.13.0
github.com/onsi/gomega v1.28.0
github.com/prometheus/client_golang v1.17.0
github.com/rs/zerolog v1.31.0
k8s.io/client-go v0.27.3
k8s.io/client-go v0.28.2
)

require (
Expand All @@ -22,17 +22,17 @@ require (
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/gnostic v0.6.9 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/pprof v0.0.0-20230705174524-200ffdc848b8 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/google/pprof v0.0.0-20230926050212-f7f687d19a98 // indirect
github.com/google/uuid v1.3.1 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
Expand All @@ -42,23 +42,23 @@ require (
github.com/prometheus/common v0.44.0 // indirect
github.com/prometheus/procfs v0.11.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
golang.org/x/net v0.12.0 // indirect
golang.org/x/net v0.14.0 // indirect
golang.org/x/oauth2 v0.10.0 // indirect
golang.org/x/sys v0.12.0 // indirect
golang.org/x/term v0.10.0 // indirect
golang.org/x/text v0.11.0 // indirect
golang.org/x/term v0.11.0 // indirect
golang.org/x/text v0.12.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.11.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
golang.org/x/tools v0.12.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/api v0.27.3 // indirect
k8s.io/apimachinery v0.27.3 // indirect
k8s.io/api v0.28.2 // indirect
k8s.io/apimachinery v0.28.2 // indirect
k8s.io/klog/v2 v2.100.1 // indirect
k8s.io/kube-openapi v0.0.0-20230525220651-2546d827e515 // indirect
k8s.io/utils v0.0.0-20230711102312-30195339c3c7 // indirect
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
Expand Down
Loading

0 comments on commit 2ff6844

Please sign in to comment.