Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.git
bin
42 changes: 42 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI
on:
push:
branches: [master]
pull_request:
permissions:
contents: read
jobs:
go:
runs-on: ubuntu-latest
strategy:
matrix:
go: [1.26.8, 1.27.1]
env:
GOTOOLCHAIN: local
GOMAXPROCS: '2'
GOFLAGS: -p=2
steps:
- uses: actions/checkout@v7.0.1
- uses: actions/setup-go@v7.0.0
with:
go-version: ${{ matrix.go }}
- run: go mod verify
- run: go test -race ./...
- run: go vet ./...
- run: make build
- name: Validate Kubernetes manifests
run: go run github.com/yannh/kubeconform/cmd/kubeconform@v0.8.0 -strict -kubernetes-version 1.37.0 -summary deploy/rbac.yaml deploy/deployment.yaml
- name: Verify generated clients and deep copies
run: |
make generate
git diff --exit-code -- apis client
- name: Check module reproducibility
run: |
go mod tidy
git diff --exit-code -- go.mod go.sum
image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7.0.1
- run: docker build --tag node-labeler-operator:test .
- run: docker run --rm --network none --read-only node-labeler-operator:test --help
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node-labeler-operator
/node-labeler-operator
/bin/
24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

17 changes: 9 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
FROM golang:1.10-alpine AS build
COPY . /go/src/github.com/barpilot/node-labeler-operator/
WORKDIR /go/src/github.com/barpilot/node-labeler-operator/
RUN go build -o /bin/node-labeler-operator .
FROM golang:1.27.1 AS build
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOMAXPROCS=2 go build -p=2 -trimpath -ldflags="-s -w" -o /node-labeler-operator .

FROM alpine:latest
RUN apk --no-cache add ca-certificates
COPY --from=build /bin/node-labeler-operator /bin/node-labeler-operator
ENTRYPOINT ["/bin/node-labeler-operator"]
FROM gcr.io/distroless/static-debian13:nonroot
COPY --from=build /node-labeler-operator /node-labeler-operator
ENTRYPOINT ["/node-labeler-operator"]
Loading
Loading