Skip to content
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

[SECCOMP-31580] - FIPS support #112

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ jobs:
docker: ['scratch','ubi']
# The type of runner that the job will run on
runs-on: ubuntu-latest
env:
CGO_ENABLED: 1
GOEXPERIMENT: boringcrypto
name: ${{ matrix.docker }}
steps:
- name: Login to Quay.io
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ jobs:
golangci:
name: lint
runs-on: ubuntu-latest
env:
CGO_ENABLED: 1
GOEXPERIMENT: boringcrypto
steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand Down
1 change: 1 addition & 0 deletions .promu.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
go:
# This must match .circle/config.yml.
version: 1.18
cgo: true
repository:
path: github.com/prometheus-community/elasticsearch_exporter
build:
Expand Down
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM quay.io/prometheus/golang-builder AS builder

ENV CGO_ENABLED=1
ENV GOEXPERIMENT=boringcrypto

ARG PROMU_VERSION=0.13.0
ADD https://github.com/prometheus/promu/releases/download/v${PROMU_VERSION}/promu-${PROMU_VERSION}.linux-amd64.tar.gz ./
RUN tar -xvzf promu-${PROMU_VERSION}.linux-amd64.tar.gz && mv promu-${PROMU_VERSION}.linux-amd64/promu /go/bin
Expand All @@ -8,7 +11,7 @@ ADD . /go/src/github.com/prometheus-community/elasticsearch_exporter
WORKDIR /go/src/github.com/prometheus-community/elasticsearch_exporter

RUN go mod download
RUN make
RUN make

FROM scratch AS scratch

Expand Down
3 changes: 3 additions & 0 deletions Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ GO_VERSION ?= $(shell $(GO) version)
GO_VERSION_NUMBER ?= $(word 3, $(GO_VERSION))
PRE_GO_111 ?= $(shell echo $(GO_VERSION_NUMBER) | grep -E 'go1\.(10|[0-9])\.')

export CGO_ENABLED := 1
export GOEXPERIMENT := boringcrypto

PROMU := $(FIRST_GOPATH)/bin/promu
pkgs = ./...

Expand Down
6 changes: 4 additions & 2 deletions build/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ pipeline {
ARTIFACTORY_URL = 'docker.internal.sysdig.com'
EXPORTER = 'elasticsearch-exporter'
VERSION = '1.2.1'
CGO_ENABLED = '1'
GOEXPERIMENT = 'boringcrypto'
}

stages {
stage('Pull image from artifactory') {
steps {
script {
docker.withRegistry("https://${env.ARTIFACTORY_URL}", registryCredential) {
docker.withRegistry("https://${env.ARTIFACTORY_URL}", registryCredential) {
sh """docker pull ${env.ARTIFACTORY_URL}/${env.EXPORTER}:${env.VERSION}"""
sh """docker pull ${env.ARTIFACTORY_URL}/${env.EXPORTER}:${env.VERSION}-ubi"""
}
Expand All @@ -40,4 +42,4 @@ pipeline {
}
}
}
}
}
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import (

"context"

_ "crypto/tls/fipsonly"

"github.com/go-kit/log/level"
"github.com/prometheus-community/elasticsearch_exporter/collector"
"github.com/prometheus-community/elasticsearch_exporter/pkg/clusterinfo"
Expand Down
Loading