Skip to content

Commit

Permalink
Merge release v0.1.3
Browse files Browse the repository at this point in the history
Release v0.1.3
  • Loading branch information
bdevcich authored Jul 16, 2024
2 parents b566743 + 9b9d465 commit 2403032
Show file tree
Hide file tree
Showing 673 changed files with 8,075 additions and 52,008 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# limitations under the License.

# Build the manager binary
FROM golang:1.19 as builder
FROM golang:1.21 as builder

ARG TARGETARCH
ARG TARGETOS
Expand Down
14 changes: 6 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ container-unit-test: .version ## Build docker image with the manager and execute
${CONTAINER_TOOL} build -f Dockerfile --label $(IMAGE_TAG_BASE)-$@:$(VERSION)-$@ -t $(IMAGE_TAG_BASE)-$@:$(VERSION) --target testing .
${CONTAINER_TOOL} run --rm -t --name $@-lustre-fs-operator $(IMAGE_TAG_BASE)-$@:$(VERSION)

TESTDIR ?= ./internal/... ./api/...
TESTDIR ?= ./internal/... ./api/... ./github/cluster-api/...
test: manifests generate fmt vet envtest ## Run tests.
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path --bin-dir $(LOCALBIN))" go test $(TESTDIR) -coverprofile cover.out -args -ginkgo.v

Expand Down Expand Up @@ -265,7 +265,6 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest

CONVERSION_GEN_BIN := conversion-gen
CONVERSION_GEN := $(LOCALBIN)/$(CONVERSION_GEN_BIN)
CONVERSION_GEN_OUTPUT_BASE := --output-base=.
CONVERSION_GEN_PKG := k8s.io/code-generator/cmd/conversion-gen

CONVERSION_VERIFIER_BIN := conversion-verifier
Expand All @@ -275,12 +274,12 @@ CONVERSION_VERIFIER_PKG := sigs.k8s.io/cluster-api/hack/tools/conversion-verifie
## Tool Versions
KUSTOMIZE_VERSION ?= v5.1.1
CONTROLLER_TOOLS_VERSION ?= v0.14.0
CONVERSION_GEN_VER := v0.28.2
CONVERSION_GEN_VER := v0.30.2

# Can be "latest", but cannot be a tag, such as "v1.3.3". However, it will
# work with the short-form git commit rev that has been tagged.
#CONVERSION_VERIFIER_VER := 09030092b # v1.3.3
CONVERSION_VERIFIER_VER := 3290c5a # v1.5.2
CONVERSION_VERIFIER_VER := b0284d8b # v1.7.3

KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
.PHONY: kustomize
Expand Down Expand Up @@ -312,10 +311,9 @@ $(CONVERSION_GEN): $(LOCALBIN) # Build conversion-gen from tools folder.
generate-go-conversions: $(CONVERSION_GEN) ## Generate conversions go code
$(MAKE) clean-generated-conversions SRC_DIRS="./api/v1alpha1"
$(CONVERSION_GEN) \
--input-dirs=./api/v1alpha1 \
--build-tag=ignore_autogenerated_core \
--output-file-base=zz_generated.conversion $(CONVERSION_GEN_OUTPUT_BASE) \
--go-header-file=./hack/boilerplate.go.txt
--output-file=zz_generated.conversion.go \
--go-header-file=./hack/boilerplate.go.txt \
./api/v1alpha1

.PHONY: clean-generated-conversions
clean-generated-conversions: ## Remove files generated by conversion-gen from the mentioned dirs
Expand Down
4 changes: 2 additions & 2 deletions api/v1alpha1/zz_generated.conversion.go

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

2 changes: 1 addition & 1 deletion api/v1alpha1/zz_generated.deepcopy.go

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

2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ kind: Kustomization
images:
- name: controller
newName: ghcr.io/nearnodeflash/lustre-fs-operator
newTag: 0.1.2
newTag: 0.1.3
5 changes: 5 additions & 0 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ spec:
- --leader-elect
image: controller:latest
name: manager
env:
# The service name of the lustre-csi-driver.
# From its pkg/lustre-driver/service/service.go.
- name: LUSTRE_CSI_SERVICE_NAME
value: "lustre-csi.hpe.com"
securityContext:
allowPrivilegeEscalation: false
livenessProbe:
Expand Down
19 changes: 9 additions & 10 deletions github/cluster-api/util/conversion/conversion_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ var (
func TestMarshalData(t *testing.T) {
g := NewWithT(t)

t.Run("should write source object to destination", func(t *testing.T) {
t.Run("should write source object to destination", func(*testing.T) {
src := &lusv1beta1.LustreFileSystem{
ObjectMeta: metav1.ObjectMeta{
Name: "test-1",
Expand All @@ -63,14 +63,13 @@ func TestMarshalData(t *testing.T) {
g.Expect(src.GetLabels()).ToNot(BeEmpty())

g.Expect(dst.GetAnnotations()[DataAnnotation]).ToNot(BeEmpty())
g.Expect(dst.GetAnnotations()[DataAnnotation]).To(ContainSubstring("Proposal"))
g.Expect(dst.GetAnnotations()[DataAnnotation]).To(ContainSubstring("special-id"))
g.Expect(dst.GetAnnotations()[DataAnnotation]).To(ContainSubstring("8128"))
g.Expect(dst.GetAnnotations()[DataAnnotation]).ToNot(ContainSubstring("metadata"))
g.Expect(dst.GetAnnotations()[DataAnnotation]).ToNot(ContainSubstring("label1"))
g.Expect(dst.GetAnnotations()[DataAnnotation]).To(ContainSubstring("mgsNids"))
g.Expect(dst.GetAnnotations()[DataAnnotation]).To(ContainSubstring("rabbit-03@tcp"))
g.Expect(dst.GetAnnotations()[DataAnnotation]).To(ContainSubstring("mountRoot"))
g.Expect(dst.GetAnnotations()[DataAnnotation]).To(ContainSubstring("/lus/w0"))
})

t.Run("should append the annotation", func(t *testing.T) {
t.Run("should append the annotation", func(*testing.T) {
src := &lusv1beta1.LustreFileSystem{
ObjectMeta: metav1.ObjectMeta{
Name: "test-1",
Expand All @@ -91,7 +90,7 @@ func TestMarshalData(t *testing.T) {
func TestUnmarshalData(t *testing.T) {
g := NewWithT(t)

t.Run("should return false without errors if annotation doesn't exist", func(t *testing.T) {
t.Run("should return false without errors if annotation doesn't exist", func(*testing.T) {
src := &lusv1beta1.LustreFileSystem{
ObjectMeta: metav1.ObjectMeta{
Name: "test-1",
Expand All @@ -106,7 +105,7 @@ func TestUnmarshalData(t *testing.T) {
g.Expect(err).ToNot(HaveOccurred())
})

t.Run("should return true when a valid annotation with data exists", func(t *testing.T) {
t.Run("should return true when a valid annotation with data exists", func(*testing.T) {
src := &unstructured.Unstructured{}
src.SetGroupVersionKind(oldGVK)
src.SetName("test-1")
Expand All @@ -130,7 +129,7 @@ func TestUnmarshalData(t *testing.T) {
g.Expect(dst.GetAnnotations()).To(BeEmpty())
})

t.Run("should clean the annotation on successful unmarshal", func(t *testing.T) {
t.Run("should clean the annotation on successful unmarshal", func(*testing.T) {
src := &unstructured.Unstructured{}
src.SetGroupVersionKind(oldGVK)
src.SetName("test-1")
Expand Down
28 changes: 12 additions & 16 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
module github.com/NearNodeFlash/lustre-fs-operator

go 1.19
go 1.21

require (
github.com/DataWorkflowServices/dws v0.0.1-0.20231031201121-13a5a69a969e
github.com/HewlettPackard/lustre-csi-driver v0.0.0-20220623192103-4ce53adacc95
github.com/google/go-cmp v0.5.9
github.com/DataWorkflowServices/dws v0.0.1-0.20240709160056-4a27e5a8dc76
github.com/google/go-cmp v0.6.0
github.com/google/gofuzz v1.2.0
github.com/google/uuid v1.3.0
github.com/onsi/ginkgo/v2 v2.11.0
github.com/onsi/gomega v1.27.10
github.com/onsi/ginkgo/v2 v2.17.1
github.com/onsi/gomega v1.32.0
k8s.io/api v0.28.1
k8s.io/apimachinery v0.28.1
k8s.io/client-go v0.28.1
Expand All @@ -19,12 +18,11 @@ require (
require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/container-storage-interface/spec v1.5.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.10.1 // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/zapr v1.2.4 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
Expand Down Expand Up @@ -52,18 +50,16 @@ require (
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.25.0 // indirect
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect
golang.org/x/net v0.13.0 // indirect
golang.org/x/net v0.20.0 // indirect
golang.org/x/oauth2 v0.8.0 // indirect
golang.org/x/sys v0.11.0 // indirect
golang.org/x/term v0.10.0 // indirect
golang.org/x/text v0.11.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/term v0.16.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.9.3 // indirect
golang.org/x/tools v0.17.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect
google.golang.org/grpc v1.54.0 // indirect
google.golang.org/protobuf v1.30.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
Loading

0 comments on commit 2403032

Please sign in to comment.