From 17d82600a46eccd67d63c4068a32e869a013e1c4 Mon Sep 17 00:00:00 2001 From: Hiroki Matsumoto <35314064+h-r-k-matsumoto@users.noreply.github.com> Date: Tue, 24 Sep 2024 07:19:22 +0900 Subject: [PATCH] Bump golang up to 1.23 (#49) --- Dockerfile | 2 +- README.md | 6 +- test/kubernetes/base/deployment.yaml | 112 ++++++++++++++------------- 3 files changed, 61 insertions(+), 59 deletions(-) diff --git a/Dockerfile b/Dockerfile index e3051e0..37f96b4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.22 AS builder +FROM golang:1.23 AS builder WORKDIR /go/src/github.com/rakutentech/passenger-go-exporter COPY go.mod go.sum ./ diff --git a/README.md b/README.md index 55c1ab0..27179dd 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@ Implemented in golang, keeps memory consumption below 100MB, and runs on CPU 0.0 ## Supported version -- golang: 1.22 -- Passenger: 6.0.18, or later. +- golang: 1.23 +- Passenger: 6.0.23, or later. All other versions have not been tested. @@ -39,7 +39,7 @@ Passenger Go Exporter side defines similarly. - mountPath: /tmp/ruby name: tmp - name: passenger-exporter - image: ghcr.io/rakutentech/passenger-go-exporter:v1.4.2 + image: ghcr.io/rakutentech/passenger-go-exporter:v1.4.4 imagePullPolicy: IfNotPresent env: - name: PASSENGER_INSTANCE_REGISTRY_DIR diff --git a/test/kubernetes/base/deployment.yaml b/test/kubernetes/base/deployment.yaml index ad324d9..bf782ca 100644 --- a/test/kubernetes/base/deployment.yaml +++ b/test/kubernetes/base/deployment.yaml @@ -5,6 +5,7 @@ metadata: labels: app: example spec: + replicas: 0 strategy: rollingUpdate: maxUnavailable: 25% @@ -19,60 +20,61 @@ spec: labels: app: example spec: + volumes: - - name: tmp - emptyDir: {} + - name: tmp + emptyDir: {} containers: - - name: example - image: example - imagePullPolicy: IfNotPresent - ports: - - containerPort: 3000 - name: http - protocol: TCP - livenessProbe: - httpGet: - path: / - port: 3000 - readinessProbe: - timeoutSeconds: 2 - httpGet: - path: / - port: 3000 - env: - - name: PASSENGER_INSTANCE_REGISTRY_DIR - value: /tmp/ruby - volumeMounts: - - mountPath: /tmp/ruby - name: tmp - - name: passenger-exporter - image: passenger-exporter - imagePullPolicy: IfNotPresent - env: - - name: PASSENGER_INSTANCE_REGISTRY_DIR - value: /tmp/ruby - ports: - - containerPort: 9768 - name: http - protocol: TCP - livenessProbe: - initialDelaySeconds: 10 - timeoutSeconds: 2 - httpGet: - path: /health - port: 9768 - readinessProbe: - timeoutSeconds: 1 - httpGet: - path: /health - port: 9768 - resources: - limits: - cpu: 20m - memory: 60Mi - requests: - cpu: 20m - memory: 60Mi - volumeMounts: - - mountPath: /tmp/ruby - name: tmp + - name: example + image: example + imagePullPolicy: IfNotPresent + ports: + - containerPort: 3000 + name: http + protocol: TCP + livenessProbe: + httpGet: + path: / + port: 3000 + readinessProbe: + timeoutSeconds: 2 + httpGet: + path: / + port: 3000 + env: + - name: PASSENGER_INSTANCE_REGISTRY_DIR + value: /tmp/ruby + volumeMounts: + - mountPath: /tmp/ruby + name: tmp + - name: passenger-exporter + image: passenger-exporter + imagePullPolicy: IfNotPresent + env: + - name: PASSENGER_INSTANCE_REGISTRY_DIR + value: /tmp/ruby + ports: + - containerPort: 9768 + name: http + protocol: TCP + livenessProbe: + initialDelaySeconds: 10 + timeoutSeconds: 2 + httpGet: + path: /health + port: 9768 + readinessProbe: + timeoutSeconds: 1 + httpGet: + path: /health + port: 9768 + resources: + limits: + cpu: 20m + memory: 60Mi + requests: + cpu: 20m + memory: 60Mi + volumeMounts: + - mountPath: /tmp/ruby + name: tmp