From 8922859e8e8aecc71708483fe146b2fe7bda925a Mon Sep 17 00:00:00 2001 From: Damyan Yordanov Date: Thu, 14 Mar 2024 13:48:24 +0100 Subject: [PATCH] Fix all actions (#210) * Fix all actions - run on public runners - change event trigger to `pull_request`, it's a public repo - remove private repo workarounds as git redirect script * Switch to `ipam.metal.ironcore.dev` API (#211) --- .github/workflows/auto-merge.yaml | 4 +- .github/workflows/golangci-lint.yml | 7 +-- .github/workflows/kustomize.yml | 4 +- .github/workflows/publish-docker.yml | 10 ++-- .github/workflows/release-drafter.yml | 4 +- .github/workflows/size-label.yml | 8 +++- .github/workflows/test.yml | 15 ++---- Dockerfile | 6 +-- Makefile | 13 +---- README.md | 2 +- ...ml => inventories.metal.ironcore.dev.yaml} | 0 ....yaml => ips.ipam.metal.ironcore.dev.yaml} | 4 +- ... => networks.ipam.metal.ironcore.dev.yaml} | 4 +- ...l => subnets.ipam.metal.ironcore.dev.yaml} | 4 +- config/default/apiserver.yaml | 2 +- config/samples/ipam/ip1.yaml | 2 +- config/samples/ipam/ip2.yaml | 2 +- config/samples/ipam/network.yaml | 2 +- config/samples/ipam/subnet.yaml | 4 +- docs/documentation.md | 2 +- go.mod | 32 ++++++------- go.sum | 48 +++++++++---------- hack/setup-git-redirect.sh | 17 ------- main.go | 3 +- pkg/k8s.go | 2 +- pkg/suite_test.go | 2 +- 26 files changed, 82 insertions(+), 121 deletions(-) rename config/crd/bases/{inventories.machine.onmetal.de.yaml => inventories.metal.ironcore.dev.yaml} (100%) rename config/crd/bases/{ips.ipam.onmetal.de.yaml => ips.ipam.metal.ironcore.dev.yaml} (98%) rename config/crd/bases/{networks.ipam.onmetal.de.yaml => networks.ipam.metal.ironcore.dev.yaml} (98%) rename config/crd/bases/{subnets.ipam.onmetal.de.yaml => subnets.ipam.metal.ironcore.dev.yaml} (99%) delete mode 100755 hack/setup-git-redirect.sh diff --git a/.github/workflows/auto-merge.yaml b/.github/workflows/auto-merge.yaml index 0a1ffa3..c2d87ea 100644 --- a/.github/workflows/auto-merge.yaml +++ b/.github/workflows/auto-merge.yaml @@ -1,5 +1,5 @@ name: Dependabot auto-approve -on: pull_request_target +on: pull_request permissions: pull-requests: write @@ -7,7 +7,7 @@ permissions: jobs: dependabot: - runs-on: self-hosted + runs-on: ubuntu-latest if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }} steps: - name: Dependabot metadata diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index be980d8..c1c04ff 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -1,14 +1,14 @@ name: Lint Golang Codebase on: - pull_request_target: + pull_request: paths-ignore: - 'docs/**' - '**/*.md' jobs: golangci: name: lint - runs-on: self-hosted + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: @@ -16,9 +16,6 @@ jobs: - uses: actions/setup-go@v5 with: go-version-file: go.mod - - run: ./hack/setup-git-redirect.sh - env: - GITHUB_PAT: ${{ secrets.BOT_PAT }} - uses: golangci/golangci-lint-action@v4 with: args: --timeout=15m diff --git a/.github/workflows/kustomize.yml b/.github/workflows/kustomize.yml index ba51544..3860078 100644 --- a/.github/workflows/kustomize.yml +++ b/.github/workflows/kustomize.yml @@ -9,13 +9,13 @@ on: - v* paths: - 'config/**' - pull_request_target: + pull_request: paths-ignore: - 'config/**' jobs: kustomize-test: - runs-on: self-hosted + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index 44559ba..8f86cbf 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -9,14 +9,18 @@ on: paths-ignore: - 'docs/**' - '**/*.md' - pull_request_target: + pull_request: paths-ignore: - 'docs/**' - '**/*.md' +permissions: + contents: read + packages: write + jobs: buildAndPush: - runs-on: self-hosted + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: @@ -65,5 +69,3 @@ jobs: push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - secrets: | - "github_pat=${{ secrets.BOT_PAT }}" diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index fd68d1b..609d90b 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -9,7 +9,7 @@ on: jobs: update_release_draft: - runs-on: self-hosted + runs-on: ubuntu-latest steps: # Drafts your next Release notes as Pull Requests are merged into "main" - uses: release-drafter/release-drafter@v6 @@ -17,4 +17,4 @@ jobs: disable-releaser: github.ref != 'refs/heads/main' config-name: release-drafter.yml env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/size-label.yml b/.github/workflows/size-label.yml index 186262e..6d08135 100644 --- a/.github/workflows/size-label.yml +++ b/.github/workflows/size-label.yml @@ -1,12 +1,16 @@ name: Size Label on: - pull_request_target: + pull_request: types: [opened, reopened, synchronize] +permissions: + contents: read + pull-requests: write + jobs: size-label: - runs-on: self-hosted + runs-on: ubuntu-latest steps: - name: size-label uses: pascalgn/size-label-action@v0.5.0 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3f1810e..8ac5cbb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,14 +10,16 @@ on: paths-ignore: - '**.md' - 'deploy/**' - pull_request_target: + pull_request: + branches: + - main paths-ignore: - 'docs/**' - '**/*.md' jobs: run: - runs-on: self-hosted + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: @@ -25,14 +27,5 @@ jobs: - uses: actions/setup-go@v5 with: go-version-file: go.mod - - run: | - mkdir -p ~/.ssh - for key in rsa ecdsa ed25519; do - ssh-keyscan -t $key github.com 2>/dev/null >> ~/.ssh/known_hosts - done - - uses: webfactory/ssh-agent@v0.9.0 - with: - ssh-private-key: ${{ secrets.BOT_PRIVATE_KEY }} - - run: ./hack/setup-git-redirect.sh - run: make build - run: make test diff --git a/Dockerfile b/Dockerfile index 0fa94bc..ef2b9ca 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,13 +6,9 @@ WORKDIR /opt/ipxe COPY go.mod go.mod COPY go.sum go.sum -COPY hack/ hack/ # cache deps before building and copying source so that we don't need to re-download as much # and so that source changes don't invalidate our downloaded layer -RUN --mount=type=ssh --mount=type=secret,id=github_pat GITHUB_PAT_PATH=/run/secrets/github_pat ./hack/setup-git-redirect.sh \ - && mkdir -p -m 0600 ~/.ssh \ - && ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts \ - && go mod download +RUN go mod download # Copy the go source COPY pkg pkg diff --git a/Makefile b/Makefile index 833fbcb..50a9fd8 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,3 @@ -GOPRIVATE ?= "github.com/onmetal/*" IMG ?= ipxe-service:latest ENVTEST_K8S_VERSION ?= 1.25.0 @@ -7,13 +6,6 @@ ENVTEST_SHA = 44c5d5029cc3c19bf6e7df3f5c5943977a39637c ARCHITECTURE = amd64 LOCAL_TESTBIN = $(CURDIR)/testbin -GITHUB_PAT_PATH ?= -ifeq (,$(GITHUB_PAT_PATH)) -GITHUB_PAT_MOUNT ?= -else -GITHUB_PAT_MOUNT ?= --secret id=github_pat,src=$(GITHUB_PAT_PATH) -endif - # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) ifeq (,$(shell go env GOBIN)) GOBIN=$(shell go env GOPATH)/bin @@ -54,11 +46,8 @@ test: setup-envtest IPXE_DEFAULT_CONFIGMAP_PATH="../config/samples/ipxe-default-cm" \ go test ./... -coverprofile cover.out -image: test - podman build . -t ${IMG} --build-arg GOPRIVATE=${GOPRIVATE} --build-arg GIT_USER=${GIT_USER} --build-arg GIT_PASSWORD=${GIT_PASSWORD} - docker-build: ## Build docker image with the manager. - docker build -t ${IMG} --build-arg GOPRIVATE=${GOPRIVATE} $(GITHUB_PAT_MOUNT) . + docker build -t ${IMG} --build-arpg . docker-push: ## Push docker image with the manager. docker push ${IMG} diff --git a/README.md b/README.md index 59f5cfa..c3a217e 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Logo of the project ## Status of the last deployments: -[![Build and Publish Docker Image](https://github.com/onmetal/ipxe-service/actions/workflows/publish-docker.yml/badge.svg)](https://github.com/onmetal/ipxe-service/actions/workflows/publish-docker.yml) +[![Build and Publish Docker Image](https://github.com/ironcore-dev/ipxe-service/actions/workflows/publish-docker.yml/badge.svg)](https://github.com/ironcore-dev/ipxe-service/actions/workflows/publish-docker.yml) ## Overview diff --git a/config/crd/bases/inventories.machine.onmetal.de.yaml b/config/crd/bases/inventories.metal.ironcore.dev.yaml similarity index 100% rename from config/crd/bases/inventories.machine.onmetal.de.yaml rename to config/crd/bases/inventories.metal.ironcore.dev.yaml diff --git a/config/crd/bases/ips.ipam.onmetal.de.yaml b/config/crd/bases/ips.ipam.metal.ironcore.dev.yaml similarity index 98% rename from config/crd/bases/ips.ipam.onmetal.de.yaml rename to config/crd/bases/ips.ipam.metal.ironcore.dev.yaml index 7910405..676343a 100644 --- a/config/crd/bases/ips.ipam.onmetal.de.yaml +++ b/config/crd/bases/ips.ipam.metal.ironcore.dev.yaml @@ -1,9 +1,9 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: - name: ips.ipam.onmetal.de + name: ips.ipam.metal.ironcore.dev spec: - group: ipam.onmetal.de + group: ipam.metal.ironcore.dev names: plural: ips singular: ip diff --git a/config/crd/bases/networks.ipam.onmetal.de.yaml b/config/crd/bases/networks.ipam.metal.ironcore.dev.yaml similarity index 98% rename from config/crd/bases/networks.ipam.onmetal.de.yaml rename to config/crd/bases/networks.ipam.metal.ironcore.dev.yaml index a519e2d..97682fc 100644 --- a/config/crd/bases/networks.ipam.onmetal.de.yaml +++ b/config/crd/bases/networks.ipam.metal.ironcore.dev.yaml @@ -1,9 +1,9 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: - name: networks.ipam.onmetal.de + name: networks.ipam.metal.ironcore.dev spec: - group: ipam.onmetal.de + group: ipam.metal.ironcore.dev names: plural: networks singular: network diff --git a/config/crd/bases/subnets.ipam.onmetal.de.yaml b/config/crd/bases/subnets.ipam.metal.ironcore.dev.yaml similarity index 99% rename from config/crd/bases/subnets.ipam.onmetal.de.yaml rename to config/crd/bases/subnets.ipam.metal.ironcore.dev.yaml index 17f866b..0d189b7 100644 --- a/config/crd/bases/subnets.ipam.onmetal.de.yaml +++ b/config/crd/bases/subnets.ipam.metal.ironcore.dev.yaml @@ -1,9 +1,9 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: - name: subnets.ipam.onmetal.de + name: subnets.ipam.metal.ironcore.dev spec: - group: ipam.onmetal.de + group: ipam.metal.ironcore.dev names: plural: subnets singular: subnet diff --git a/config/default/apiserver.yaml b/config/default/apiserver.yaml index 5369989..b692415 100644 --- a/config/default/apiserver.yaml +++ b/config/default/apiserver.yaml @@ -10,7 +10,7 @@ metadata: name: ipxe-service rules: - apiGroups: - - ipam.onmetal.de + - ipam.metal.ironcore.dev resources: - ips verbs: diff --git a/config/samples/ipam/ip1.yaml b/config/samples/ipam/ip1.yaml index 92ddc9a..8ad8c85 100644 --- a/config/samples/ipam/ip1.yaml +++ b/config/samples/ipam/ip1.yaml @@ -1,4 +1,4 @@ -apiVersion: ipam.onmetal.de/v1alpha1 +apiVersion: ipam.metal.ironcore.dev/v1alpha1 kind: IP metadata: labels: diff --git a/config/samples/ipam/ip2.yaml b/config/samples/ipam/ip2.yaml index e142a32..d1f2cf9 100644 --- a/config/samples/ipam/ip2.yaml +++ b/config/samples/ipam/ip2.yaml @@ -1,4 +1,4 @@ -apiVersion: ipam.onmetal.de/v1alpha1 +apiVersion: ipam.metal.ironcore.dev/v1alpha1 kind: IP metadata: labels: diff --git a/config/samples/ipam/network.yaml b/config/samples/ipam/network.yaml index aabe1f4..643787a 100644 --- a/config/samples/ipam/network.yaml +++ b/config/samples/ipam/network.yaml @@ -1,4 +1,4 @@ -apiVersion: ipam.onmetal.de/v1alpha1 +apiVersion: ipam.metal.ironcore.dev/v1alpha1 kind: Network metadata: name: dhcp diff --git a/config/samples/ipam/subnet.yaml b/config/samples/ipam/subnet.yaml index 050914a..98191d5 100644 --- a/config/samples/ipam/subnet.yaml +++ b/config/samples/ipam/subnet.yaml @@ -1,8 +1,8 @@ -apiVersion: ipam.onmetal.de/v1alpha1 +apiVersion: ipam.metal.ironcore.dev/v1alpha1 kind: Subnet metadata: labels: - ipam.onmetal.de/object-purpose: dhcp + ipam.metal.ironcore.dev/object-purpose: dhcp name: dhcp namespace: metal-api-system spec: diff --git a/docs/documentation.md b/docs/documentation.md index 3fbeba1..10133ba 100644 --- a/docs/documentation.md +++ b/docs/documentation.md @@ -37,7 +37,7 @@ curl http://127.0.0.1:8082 Here's a brief intro about what a developer must do in order to start developing the project further: ```shell -git clone https://github.com/onmetal/ipxe-service.git +git clone https://github.com/ironcore-dev/ipxe-service.git cd ipxe-service/ helm install ipxe-service ./chart ``` diff --git a/go.mod b/go.mod index a14f8a5..bf566d4 100644 --- a/go.mod +++ b/go.mod @@ -1,13 +1,13 @@ -module github.com/onmetal/ipxe-service +module github.com/ironcore-dev/ipxe-service -go 1.21 +go 1.22 require ( github.com/Masterminds/sprig v2.22.0+incompatible github.com/coreos/butane v0.20.0 github.com/gorilla/mux v1.8.1 + github.com/ironcore-dev/ipam v0.2.0 github.com/ironcore-dev/metal v0.11.2 - github.com/onmetal/ipam v0.0.26 github.com/onsi/ginkgo/v2 v2.16.0 github.com/onsi/gomega v1.31.1 github.com/pkg/errors v0.9.1 @@ -32,7 +32,7 @@ require ( github.com/coreos/ignition/v2 v2.17.0 // indirect github.com/coreos/vcontext v0.0.0-20230201181013-d72178a18687 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/emicklei/go-restful/v3 v3.11.2 // indirect + github.com/emicklei/go-restful/v3 v3.11.3 // indirect github.com/evanphx/json-patch/v5 v5.9.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-logr/logr v1.4.1 // indirect @@ -60,24 +60,24 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/client_model v0.5.0 // indirect - github.com/prometheus/common v0.48.0 // indirect + github.com/prometheus/client_model v0.6.0 // indirect + github.com/prometheus/common v0.49.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace // indirect github.com/stretchr/testify v1.8.4 // indirect github.com/vincent-petithory/dataurl v1.0.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect + go.uber.org/zap v1.27.0 // indirect go4.org/netipx v0.0.0-20231129151722-fdeea329fbba // indirect - golang.org/x/crypto v0.18.0 // indirect - golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 // indirect - golang.org/x/net v0.20.0 // indirect - golang.org/x/oauth2 v0.16.0 // indirect - golang.org/x/sys v0.16.0 // indirect - golang.org/x/term v0.16.0 // indirect + golang.org/x/crypto v0.19.0 // indirect + golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/oauth2 v0.17.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/term v0.17.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.17.0 // indirect + golang.org/x/tools v0.18.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/protobuf v1.32.0 // indirect @@ -93,7 +93,3 @@ require ( sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.4.0 // indirect ) - -replace github.com/onmetal/k8s-inventory v0.0.1 => github.com/onmetal/metal-api v0.4.0 - -replace github.com/onmetal/k8s-machine-requests v0.0.0-20210901134901-3a2a3b92842c => github.com/onmetal/metal-api-gateway v0.4.0 diff --git a/go.sum b/go.sum index 0927083..24eee2e 100644 --- a/go.sum +++ b/go.sum @@ -31,8 +31,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/emicklei/go-restful/v3 v3.11.2 h1:1onLa9DcsMYO9P+CXaL0dStDqQ2EHHXLiz+BtnqkLAU= -github.com/emicklei/go-restful/v3 v3.11.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.11.3 h1:yagOQz/38xJmcNeZJtrUcKjkHRltIaIFXKWeG1SkWGE= +github.com/emicklei/go-restful/v3 v3.11.3/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/evanphx/json-patch v5.9.0+incompatible h1:fBXyNpNMuTTDdquAq/uisOr2lShz4oaXpDTX2bLe7ls= github.com/evanphx/json-patch v5.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0/FOJfg= @@ -84,6 +84,8 @@ github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= +github.com/ironcore-dev/ipam v0.2.0 h1:2iqZYK0nLWTx0jj7o/W+G3TT1WV+NXURZpRAxYbwz6A= +github.com/ironcore-dev/ipam v0.2.0/go.mod h1:2RWFJu00UHjN9viwx4JazqVeYRrgo3plKyXCYm/V7es= github.com/ironcore-dev/metal v0.11.2 h1:1FGbc3XASJDokUNSr3tMBwcro+IPX4Y66rL7CsbxgBQ= github.com/ironcore-dev/metal v0.11.2/go.mod h1:CYbi/cR6M+GjBhJfgU5oMKBUpa11Y3NL45K4HDVrL5Y= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= @@ -111,8 +113,6 @@ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/onmetal/ipam v0.0.26 h1:1MExfeV8W24btRAxwQD41nxRxXCF3utqq9YDq4UHmS4= -github.com/onmetal/ipam v0.0.26/go.mod h1:5RWWO4gwdk1vKggVV8aVJNszNiJn6HMVr/lxMj8ON6A= github.com/onsi/ginkgo/v2 v2.16.0 h1:7q1w9frJDzninhXxjZd+Y/x54XNjG/UlRLIYPZafsPM= github.com/onsi/ginkgo/v2 v2.16.0/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3HigUjbIBOs= github.com/onsi/gomega v1.31.1 h1:KYppCUK+bUgAZwHOu7EXVBKyQA6ILvOESHkn/tgoqvo= @@ -124,10 +124,10 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= -github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= -github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= -github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE= -github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= +github.com/prometheus/common v0.49.0 h1:ToNTdK4zSnPVJmh698mGFkDor9wBI/iGaJy5dbH1EgI= +github.com/prometheus/common v0.49.0/go.mod h1:Kxm+EULxRbUkjGU6WFsQqo3ORzB4tyKvlWFOE9mB2sE= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= @@ -152,18 +152,18 @@ go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= go4.org/netipx v0.0.0-20231129151722-fdeea329fbba h1:0b9z3AuHCjxk0x/opv64kcgZLBseWJUpBw5I82+2U4M= go4.org/netipx v0.0.0-20231129151722-fdeea329fbba/go.mod h1:PLyyIXexvUFg3Owu6p/WfdlivPbZJsZdgWZlrGope/Y= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= -golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= -golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 h1:/RIbNt/Zr7rVhIkQhooTxCxFcdWLGIKnZA4IXNFSrvo= -golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= +golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= +golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ= +golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= @@ -173,10 +173,10 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= -golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= -golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= -golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= +golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -189,12 +189,12 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE= -golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= +golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= +golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= @@ -208,8 +208,8 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= -golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= +golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= +golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/hack/setup-git-redirect.sh b/hack/setup-git-redirect.sh deleted file mode 100755 index ba59f4e..0000000 --- a/hack/setup-git-redirect.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash - -set -e - -if [[ -f "$GITHUB_PAT_PATH" ]]; then - echo "Sourcing Github pat from path" - GITHUB_PAT="$(cat "$GITHUB_PAT_PATH")" -fi - -if [[ "$GITHUB_PAT" != "" ]]; then - echo "Rewriting to use Github pat" - git config --global url."https://${GITHUB_PAT}:x-oauth-basic@github.com/".insteadOf "https://github.com/" -else - echo "No Github pat given, rewriting to use plain ssh auth" - git config --global url."git@github.com:".insteadOf "https://github.com" -fi - diff --git a/main.go b/main.go index 42fcbaf..82b47ca 100644 --- a/main.go +++ b/main.go @@ -2,7 +2,8 @@ package main import ( "fmt" - "github.com/onmetal/ipxe-service/pkg" + + "github.com/ironcore-dev/ipxe-service/pkg" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/pkg/k8s.go b/pkg/k8s.go index f8b0ffe..3a5314f 100644 --- a/pkg/k8s.go +++ b/pkg/k8s.go @@ -11,8 +11,8 @@ import ( "k8s.io/client-go/rest" "sigs.k8s.io/controller-runtime/pkg/client/config" + ipamv1alpha1 "github.com/ironcore-dev/ipam/api/ipam/v1alpha1" inventoryv1alpha4 "github.com/ironcore-dev/metal/apis/metal/v1alpha4" - ipamv1alpha1 "github.com/onmetal/ipam/api/v1alpha1" "github.com/pkg/errors" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/suite_test.go b/pkg/suite_test.go index d3b57b3..cd6e44f 100644 --- a/pkg/suite_test.go +++ b/pkg/suite_test.go @@ -28,8 +28,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/yaml" + ipamv1alpha1 "github.com/ironcore-dev/ipam/api/ipam/v1alpha1" inventoryv1alpha4 "github.com/ironcore-dev/metal/apis/metal/v1alpha4" - ipamv1alpha1 "github.com/onmetal/ipam/api/v1alpha1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime"