Skip to content

Commit

Permalink
Use controller-runtime to reconstruct spark operator
Browse files Browse the repository at this point in the history
Signed-off-by: Yi Chen <[email protected]>
  • Loading branch information
ChenYi015 committed Jul 1, 2024
1 parent 16cd35a commit 04e18a9
Show file tree
Hide file tree
Showing 268 changed files with 62,714 additions and 33,550 deletions.
22 changes: 21 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,21 @@
vendor
.idea/
.vscode/
bin/
charts/
docs/
examples/
manifest/
sparkctl/sparkctl
sparkctl/sparkctl-linux-amd64
sparkctl/sparkctl-darwin-amd64
test/
vendor/
.DS_Store
.gitignore
.gitlab-ci.yaml
.pre-commit-config.yaml
CONTRIBUTING.md
OWNERS
README.md
spark-operator
test.sh
5 changes: 5 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ jobs:
with:
fetch-depth: "0"

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: The API documentation hasn't changed
run: |
make build-api-docs
Expand Down
12 changes: 7 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
.vscode/
bin/
vendor/
spark-operator
.idea/
**/*.iml
cover.out
sparkctl/sparkctl
spark-on-k8s-operator
sparkctl/sparkctl-linux-amd64
sparkctl/sparkctl-darwin-amd64
**/*.iml

# Various IDEs
.idea/
.vscode/
26 changes: 26 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
run:
deadline: 5m

linters:
enable:
- revive
- gci
- depguard
- godot
- testifylint
- unconvert

issues:
exclude-rules:
# Disable errcheck linter for test files.
- path: _test.go
linters:
- errcheck

linters-settings:
gci:
sections:
- standard
- default
- prefix(github.com/kubeflow/spark-operator)

5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@ COPY go.sum go.sum
RUN go mod download

# Copy the go source code
COPY main.go main.go
COPY api/ api/
COPY cmd/ cmd/
COPY pkg/ pkg/

# Build
ARG TARGETARCH
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} GO111MODULE=on go build -a -o /usr/bin/spark-operator main.go
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} GO111MODULE=on go build -a -o /usr/bin/spark-operator cmd/main.go

FROM ${SPARK_IMAGE}
USER root
Expand Down
Loading

0 comments on commit 04e18a9

Please sign in to comment.