Skip to content

Commit

Permalink
Switch to ironcore-dev/metalnet
Browse files Browse the repository at this point in the history
- Switch metalnet deps to ironcore-dev/metalnet
- Add api reference docs generation to Makefile
  • Loading branch information
afritzler committed Dec 7, 2023
1 parent 5893504 commit ee4f135
Show file tree
Hide file tree
Showing 21 changed files with 4,024 additions and 38 deletions.
8 changes: 1 addition & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,10 @@ COPY go.sum go.sum

COPY hack hack

ENV GOPRIVATE='github.com/onmetal/*'

# 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 \
--mount=type=cache,target=/root/.cache/go-build \
RUN --mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/go/pkg \
GITHUB_PAT_PATH=/run/secrets/github_pat ./hack/setup-git-redirect.sh \
&& mkdir -p -m 0600 ~/.ssh \
&& ssh-keyscan github.com >> ~/.ssh/known_hosts \
&& go mod download

# Copy the go source
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ extract-openapi: envtest openapi-extractor
--apiservices="./config/apiserver/apiservice/bases" \
--output="./gen"

.PHONY: docs
docs: gen-crd-api-reference-docs ## Run go generate to generate API reference documentation.
$(GEN_CRD_API_REFERENCE_DOCS) -api-dir ./api/core/v1alpha1 -config ./hack/api-reference/config.json -template-dir ./hack/api-reference/template -out-file ./docs/api-reference/core.md

##@ Build

.PHONY: build-ironcore-net
Expand Down Expand Up @@ -445,7 +449,7 @@ $(ENVTEST): $(LOCALBIN)
.PHONY: openapi-extractor
openapi-extractor: $(OPENAPI_EXTRACTOR) ## Download openapi-extractor locally if necessary.
$(OPENAPI_EXTRACTOR): $(LOCALBIN)
test -s $(LOCALBIN)/openapi-extractor || GOBIN=$(LOCALBIN) go install github.com/onmetal/openapi-extractor/cmd/openapi-extractor@latest
test -s $(LOCALBIN)/openapi-extractor || GOBIN=$(LOCALBIN) go install github.com/ironcore-dev/openapi-extractor/cmd/openapi-extractor@latest

.PHONY: gen-crd-api-reference-docs
gen-crd-api-reference-docs: $(GEN_CRD_API_REFERENCE_DOCS) ## Download gen-crd-api-reference-docs locally if necessary.
Expand Down
2 changes: 1 addition & 1 deletion cmd/metalnetlet/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
metalnetletconfig "github.com/ironcore-dev/ironcore-net/metalnetlet/client/config"
"github.com/ironcore-dev/ironcore-net/metalnetlet/controllers"
"github.com/ironcore-dev/ironcore/utils/client/config"
metalnetv1alpha1 "github.com/onmetal/metalnet/api/v1alpha1"
metalnetv1alpha1 "github.com/ironcore-dev/metalnet/api/v1alpha1"
flag "github.com/spf13/pflag"
corev1 "k8s.io/api/core/v1"
"sigs.k8s.io/controller-runtime/pkg/cluster"
Expand Down
6 changes: 3 additions & 3 deletions config/metalnetlet/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ rules:
- update
- watch
- apiGroups:
- networking.metalnet.onmetal.de
- networking.metalnet.ironcore.dev
resources:
- loadbalancers
verbs:
Expand All @@ -53,7 +53,7 @@ rules:
- update
- watch
- apiGroups:
- networking.metalnet.onmetal.de
- networking.metalnet.ironcore.dev
resources:
- networkinterfaces
verbs:
Expand All @@ -66,7 +66,7 @@ rules:
- update
- watch
- apiGroups:
- networking.metalnet.onmetal.de
- networking.metalnet.ironcore.dev
resources:
- networks
verbs:
Expand Down
Loading

0 comments on commit ee4f135

Please sign in to comment.