-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add hack dockefiles to regenerate code and crd manifest
- Loading branch information
1 parent
792fcf4
commit 49ca674
Showing
5 changed files
with
60 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
config/ | ||
hack/ | ||
manifests/ | ||
.vscode/ | ||
.git/ | ||
.dockerignore | ||
.gitignore | ||
Dockerfile | ||
README.md | ||
kluster |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
kluster | ||
config/ | ||
.vscode | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# hack/Dockerfile.update-codegen | ||
|
||
# Usage: docker buildx build --file hack/Dockerfile.update-codegen -o . . | ||
|
||
FROM golang:1.13 AS build | ||
WORKDIR /go/src/github.com/viveksinghggits/kluster | ||
RUN go mod download k8s.io/[email protected] | ||
COPY . . | ||
RUN bash /go/pkg/mod/k8s.io/[email protected]/generate-groups.sh all \ | ||
github.com/viveksinghggits/kluster/pkg/client github.com/viveksinghggits/kluster/pkg/apis viveksingh.dev:v1alpha1 \ | ||
--go-header-file /go/pkg/mod/k8s.io/[email protected]/hack/boilerplate.go.txt | ||
|
||
FROM scratch | ||
COPY --from=build /go/src/github.com/viveksinghggits/kluster/pkg pkg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# hack/Dockerfile.update-crds | ||
|
||
# Usage: docker buildx build --file hack/Dockerfile.update-crds -o . . | ||
|
||
FROM golang:1.13 AS build | ||
WORKDIR /go/src/github.com/viveksinghggits/kluster | ||
RUN GO111MODULE=on go get sigs.k8s.io/controller-tools/cmd/[email protected] | ||
COPY . . | ||
RUN controller-gen paths=github.com/viveksinghggits/kluster/pkg/apis/viveksingh.dev/v1alpha1 \ | ||
crd:crdVersions=v1 \ | ||
output:crd:artifacts:config=manifests | ||
|
||
FROM scratch | ||
COPY --from=build /go/src/github.com/viveksinghggits/kluster/manifests manifests |