Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project refactor work #11

Merged
merged 5 commits into from
Mar 2, 2024
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
bin
testbin/*
.DS_Store
# Test binary, build with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out


# editor and IDE paraphernalia
.idea
.vscode
*.nix
*.swp
*.swo
*~

# vendor files
vendor

# Local Netlify folder
.netlify

# Directory with CRDs for dependencies
dep-crds
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.20 as builder
FROM golang:1.21 as builder
ARG TARGETOS
ARG TARGETARCH

Expand All @@ -14,10 +14,10 @@ RUN go mod download
# Copy the go source
COPY cmd/main.go cmd/main.go
COPY api/ api/
COPY internal/controller/ internal/controller/
COPY internal/cert/ internal/cert/
COPY internal/webhook/ internal/webhook/
COPY internal/commonutils internal/commonutils
COPY pkg/controller/ pkg/controller/
COPY pkg/cert/ pkg/cert/
COPY pkg/webhook/ pkg/webhook/
COPY pkg/commonutils pkg/commonutils

# Build
# the GOARCH has not a default value to allow the binary be built according to the host where the command
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ help: ## Display this help.
.PHONY: manifests
manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
$(CONTROLLER_GEN) \
rbac:roleName=manager-role output:rbac:artifacts:config=config/rbac\
crd:generateEmbeddedObjectMeta=true output:crd:artifacts:config=config/crd/bases\
webhook output:webhook:artifacts:config=config/webhook\
paths="./..."
rbac:roleName=manager-role output:rbac:artifacts:config=config/rbac \
crd:generateEmbeddedObjectMeta=true output:crd:artifacts:config=config/crd/bases \
webhook output:webhook:artifacts:config=config/webhook \
paths="./..."

.PHONY: generate
generate: controller-gen code-generator ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations and client-go libraries.
Expand Down Expand Up @@ -164,7 +164,7 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest

## Tool Versions
KUSTOMIZE_VERSION ?= v5.2.1
CONTROLLER_TOOLS_VERSION ?= v0.13.0
CONTROLLER_TOOLS_VERSION ?= v0.14.0

.PHONY: kustomize
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary. If wrong version is installed, it will be removed before downloading.
Expand Down
6 changes: 3 additions & 3 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
domain: x-k8s.io
layout:
- go.kubebuilder.io/v4
projectName: leader-worker-set
repo: sigs.k8s.io/leader-worker-set
projectName: lws
repo: sigs.k8s.io/lws
resources:
- api:
crdVersion: v1
Expand All @@ -15,7 +15,7 @@ resources:
domain: x-k8s.io
group: leaderworkerset
kind: LeaderWorkerSet
path: sigs.k8s.io/leader-worker-set/api/leaderworkerset/v1
path: sigs.k8s.io/lws/api/leaderworkerset/v1
version: v1
webhooks:
defaulting: true
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions client-go/applyconfiguration/utils.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client-go/clientset/versioned/clientset.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions client-go/clientset/versioned/fake/clientset_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client-go/clientset/versioned/fake/register.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client-go/clientset/versioned/scheme/register.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions client-go/informers/externalversions/factory.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client-go/informers/externalversions/generic.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client-go/listers/leaderworkerset/v1/leaderworkerset.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ import (
"sigs.k8s.io/controller-runtime/pkg/log/zap"
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"

leaderworkersetv1 "sigs.k8s.io/leader-worker-set/api/leaderworkerset/v1"
"sigs.k8s.io/leader-worker-set/internal/cert"
"sigs.k8s.io/leader-worker-set/internal/controller"
"sigs.k8s.io/leader-worker-set/internal/webhook"
leaderworkersetv1 "sigs.k8s.io/lws/api/leaderworkerset/v1"
"sigs.k8s.io/lws/pkg/cert"
"sigs.k8s.io/lws/pkg/controller"
"sigs.k8s.io/lws/pkg/webhook"
//+kubebuilder:scaffold:imports
)

Expand Down
Loading