Skip to content

Commit

Permalink
Merge branch 'prometheus:master' into go-file
Browse files Browse the repository at this point in the history
Signed-off-by: HARSHIT NAGPAL <[email protected]>
  • Loading branch information
HarshitNagpal29 committed Aug 30, 2024
2 parents 1d3494d + 6dc8e37 commit 30350d6
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 18 deletions.
4 changes: 0 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,3 @@ updates:
patterns:
- "go.opentelemetry.io/*"
open-pull-requests-limit: 20
#- package-ecosystem: "pip"
# directory: "/tools/load-generator"
# schedule:
# interval: "monthly"
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ jobs:
uses: golangci/golangci-lint-action@a4f60bb28d35aeee14e6880718e0c85ff1882e64 # v6.0.1
with:
args: --verbose
version: v1.59.0
version: v1.59.1
2 changes: 2 additions & 0 deletions .promu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ build:
path: ./tools/fake-webserver
- name: tools/scaler
path: ./tools/scaler
- name: tools/load-generator
path: ./tools/load-generator
flags: -a -tags netgo
crossbuild:
platforms:
Expand Down
2 changes: 1 addition & 1 deletion Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_
SKIP_GOLANGCI_LINT :=
GOLANGCI_LINT :=
GOLANGCI_LINT_OPTS ?=
GOLANGCI_LINT_VERSION ?= v1.59.0
GOLANGCI_LINT_VERSION ?= v1.59.1
# golangci-lint only supports linux, darwin and windows platforms on i386/amd64/arm64.
# windows isn't included here because of the path separator being different.
ifeq ($(GOHOSTOS),$(filter $(GOHOSTOS),linux darwin))
Expand Down
14 changes: 4 additions & 10 deletions tools/load-generator/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
FROM golang:1.20-alpine
FROM quay.io/prometheus/busybox:latest
LABEL maintainer="The Prometheus Authors <[email protected]>"

WORKDIR /usr/src/app

COPY go.mod go.sum ./
RUN go mod download

COPY . .

RUN go build -o load-generator .
COPY load-generator /bin/load-generator

EXPOSE 8080

ENTRYPOINT ["./load-generator"]
ENTRYPOINT ["/bin/load-generator"]
15 changes: 13 additions & 2 deletions tools/load-generator/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
// Copyright 2019 The Prometheus Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package main

import (
Expand All @@ -16,7 +29,6 @@ import (

// Global variables and Prometheus metrics
var (
namespace string
max404Errors = 30
domainName = os.Getenv("DOMAIN_NAME")

Expand Down Expand Up @@ -185,7 +197,6 @@ func main() {
os.Exit(2)
}

namespace = os.Args[1]
prNumber := os.Args[2]

configFile, err := os.ReadFile("/etc/loadgen/config.yaml")
Expand Down

0 comments on commit 30350d6

Please sign in to comment.