Skip to content

Commit

Permalink
Merge pull request #158 from NearNodeFlash/release-v0.0.9
Browse files Browse the repository at this point in the history
Release v0.0.9
  • Loading branch information
roehrich-hpe authored Feb 22, 2024
2 parents b1f5745 + 44a1765 commit be1ccfc
Show file tree
Hide file tree
Showing 16 changed files with 141 additions and 53 deletions.
30 changes: 21 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
name: Docker build and push

on:
push:
branches:
- '*'
tags:
- 'v*'
on: [push]

env:
# TEST_TARGET: Name of the testing target in the Dockerfile
Expand All @@ -14,9 +9,6 @@ env:
# DO_TEST - true to build and run unit tests, false to skip the tests
DO_TEST: true

# DO_PUSH - true to push to the HPE_DEPLOY_REPO, false to not push
DO_PUSH: true

jobs:
build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -98,3 +90,23 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}

create_release:
needs: build
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-tags: true
fetch-depth: 0
- name: Repair tag
run: git fetch -f origin ${{ github.ref }}:${{ github.ref }}
- name: Verify that the tag is annotated
run: if test x$(git for-each-ref ${{ github.ref }} | awk '{print $2}') = xtag; then /bin/true; else echo "\"${{ github.ref }}\" does not look like an annotated tag!"; /bin/false; fi
- name: Release
uses: softprops/action-gh-release@v1
with:
#prerelease: true
generate_release_notes: true

28 changes: 0 additions & 28 deletions .github/workflows/verify_tag.yml

This file was deleted.

2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ kind: Kustomization
images:
- name: controller
newName: ghcr.io/nearnodeflash/nnf-dm
newTag: 0.0.8
newTag: 0.0.9
- name: nnf-mfu
newName: ghcr.io/nearnodeflash/nnf-mfu
newTag: 0.0.3
4 changes: 4 additions & 0 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ spec:
cray.nnf.node: 'true'
hostPath: '/mnt/nnf'
mountPath: '/mnt/nnf'
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: '25%'
template:
spec:
serviceAccountName: nnf-dm-controller-manager # not sure why 'controller-manager' isn't patched to include the 'nnf-dm-' prefix
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module github.com/NearNodeFlash/nnf-dm
go 1.19

require (
github.com/NearNodeFlash/lustre-fs-operator v0.0.1-0.20231031201943-531116c1194e
github.com/NearNodeFlash/nnf-sos v0.0.1-0.20240207194141-d4c5588829a1
github.com/NearNodeFlash/lustre-fs-operator v0.0.1-0.20240220213720-51597bca637d
github.com/NearNodeFlash/nnf-sos v0.0.1-0.20240221214302-e7989177289a
github.com/onsi/ginkgo/v2 v2.11.0
github.com/onsi/gomega v1.27.10
github.com/prometheus/client_golang v1.16.0
Expand Down Expand Up @@ -73,7 +73,7 @@ require (
)

require (
github.com/DataWorkflowServices/dws v0.0.1-0.20240207192901-62a0958c23f7
github.com/DataWorkflowServices/dws v0.0.1-0.20240221183421-1a123a9274b6
go.openly.dev/pointy v1.3.0
)

Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
github.com/DataWorkflowServices/dws v0.0.1-0.20240207192901-62a0958c23f7 h1:0WwSoJBPDJIZbM0rgXZk2D+/lBc4EYnM8OE1MRgskjg=
github.com/DataWorkflowServices/dws v0.0.1-0.20240207192901-62a0958c23f7/go.mod h1:vSTBLWbsFjMYxx+sjMDyZpMXLY9m5Bp73cjnmAL30WU=
github.com/NearNodeFlash/lustre-fs-operator v0.0.1-0.20231031201943-531116c1194e h1:j+MNZYrAcwtaUxqA2CcJFyPLWhfxpO6fsIUXhXljY2U=
github.com/NearNodeFlash/lustre-fs-operator v0.0.1-0.20231031201943-531116c1194e/go.mod h1:qBcz9p8sXm1qhDf8WUmhxTlD1NCMEjoAD7NoHbQvMiI=
github.com/DataWorkflowServices/dws v0.0.1-0.20240221183421-1a123a9274b6 h1:LYKIIoawsuo+1ByvQaIpgl8vZc2KrE0q7AE7t0YumrI=
github.com/DataWorkflowServices/dws v0.0.1-0.20240221183421-1a123a9274b6/go.mod h1:vSTBLWbsFjMYxx+sjMDyZpMXLY9m5Bp73cjnmAL30WU=
github.com/NearNodeFlash/lustre-fs-operator v0.0.1-0.20240220213720-51597bca637d h1:AP1TgQlneYZT/AxkYFyvJp1j86+7MTYOoo3I1Zw3L2E=
github.com/NearNodeFlash/lustre-fs-operator v0.0.1-0.20240220213720-51597bca637d/go.mod h1:qBcz9p8sXm1qhDf8WUmhxTlD1NCMEjoAD7NoHbQvMiI=
github.com/NearNodeFlash/nnf-ec v0.0.0-20231010162453-a8168bb6a52f h1:aWtSSQLLk9mUZj94mowirQeVw9saf80gVe10X0rZe8o=
github.com/NearNodeFlash/nnf-ec v0.0.0-20231010162453-a8168bb6a52f/go.mod h1:oxdwMqfttOF9dabJhqrWlirCnMk8/8eyLMwl+hducjk=
github.com/NearNodeFlash/nnf-sos v0.0.1-0.20240207194141-d4c5588829a1 h1:1FgQ8cLuy6+qpIbdHv2cFltssde2YTe823v+BAhALpo=
github.com/NearNodeFlash/nnf-sos v0.0.1-0.20240207194141-d4c5588829a1/go.mod h1:YtN3gTkpS4ju1jvBMZTU/UcCbvRt4DFH8w9mFue+diQ=
github.com/NearNodeFlash/nnf-sos v0.0.1-0.20240221214302-e7989177289a h1:m3lPHiWObITk+zp3GAuOeawkaMr+U4aKlHcblYnsP58=
github.com/NearNodeFlash/nnf-sos v0.0.1-0.20240221214302-e7989177289a/go.mod h1:4kJuGEwS46EYIt24NmNweaMryYp8M6RabNc8Nd+GIBE=
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
Expand Down
6 changes: 4 additions & 2 deletions internal/controller/datamovementmanager_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,7 @@ func (r *NnfDataMovementManagerReconciler) createOrUpdateDaemonSetIfNecessary(ct
mutateFn := func() error {
podTemplateSpec := manager.Spec.Template.DeepCopy()
podTemplateSpec.Labels = manager.Spec.Selector.DeepCopy().MatchLabels
updateStrategy := manager.Spec.UpdateStrategy.DeepCopy()

if podTemplateSpec.Labels == nil {
podTemplateSpec.Labels = make(map[string]string)
Expand All @@ -464,8 +465,9 @@ func (r *NnfDataMovementManagerReconciler) createOrUpdateDaemonSetIfNecessary(ct
setupLustreVolumes(ctx, manager, podSpec, filesystems.Items)

ds.Spec = appsv1.DaemonSetSpec{
Selector: &manager.Spec.Selector,
Template: *podTemplateSpec,
Selector: &manager.Spec.Selector,
Template: *podTemplateSpec,
UpdateStrategy: *updateStrategy,
}

if err := ctrl.SetControllerReference(manager, ds, r.Scheme); err != nil {
Expand Down
21 changes: 21 additions & 0 deletions internal/controller/datamovementmanager_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
"k8s.io/client-go/util/retry"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
Expand All @@ -46,6 +47,9 @@ var _ = Describe("Data Movement Manager Test" /*Ordered, (Ginkgo v2)*/, func() {
mgr := &nnfv1alpha1.NnfDataMovementManager{}
labels := map[string]string{"control-plane": "controller-manager"}

maxUnavailStr := "50%"
maxSurgeStr := "0%"

/* BeforeAll (Ginkgo v2)*/
BeforeEach(func() {
ns = &corev1.Namespace{
Expand Down Expand Up @@ -89,6 +93,8 @@ var _ = Describe("Data Movement Manager Test" /*Ordered, (Ginkgo v2)*/, func() {
})

BeforeEach(func() {
maxUnavailable := intstr.FromString(maxUnavailStr)
maxSurge := intstr.FromString(maxSurgeStr)
mgr = &nnfv1alpha1.NnfDataMovementManager{
ObjectMeta: metav1.ObjectMeta{
Name: "nnf-dm-manager-controller-manager",
Expand All @@ -110,6 +116,13 @@ var _ = Describe("Data Movement Manager Test" /*Ordered, (Ginkgo v2)*/, func() {
},
},
},
UpdateStrategy: appsv1.DaemonSetUpdateStrategy{
Type: appsv1.RollingUpdateDaemonSetStrategyType,
RollingUpdate: &appsv1.RollingUpdateDaemonSet{
MaxUnavailable: &maxUnavailable,
MaxSurge: &maxSurge,
},
},
},
}

Expand Down Expand Up @@ -145,6 +158,14 @@ var _ = Describe("Data Movement Manager Test" /*Ordered, (Ginkgo v2)*/, func() {
g.Expect(k8sClient.Get(ctx, client.ObjectKeyFromObject(mgr), mgr)).Should(Succeed())
return mgr.Status.Ready
}, "5s").Should(BeTrue())

By("The updateStrategy appears in the daemon set")
Eventually(func(g Gomega) error {
g.Expect(k8sClient.Get(ctx, client.ObjectKeyFromObject(daemonset), daemonset)).Should(Succeed())
g.Expect(daemonset.Spec.UpdateStrategy.RollingUpdate.MaxUnavailable.StrVal).Should(Equal(maxUnavailStr))
g.Expect(daemonset.Spec.UpdateStrategy.RollingUpdate.MaxSurge.StrVal).Should(Equal(maxSurgeStr))
return nil
}).Should(Succeed())
})

It("Adds and removes global lustre volumes", func() {
Expand Down

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.

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 vendor/modules.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# github.com/DataWorkflowServices/dws v0.0.1-0.20240207192901-62a0958c23f7
# github.com/DataWorkflowServices/dws v0.0.1-0.20240221183421-1a123a9274b6
## explicit; go 1.19
github.com/DataWorkflowServices/dws/api/v1alpha2
github.com/DataWorkflowServices/dws/utils/dwdparse
github.com/DataWorkflowServices/dws/utils/updater
# github.com/NearNodeFlash/lustre-fs-operator v0.0.1-0.20231031201943-531116c1194e
# github.com/NearNodeFlash/lustre-fs-operator v0.0.1-0.20240220213720-51597bca637d
## explicit; go 1.19
github.com/NearNodeFlash/lustre-fs-operator/api/v1beta1
github.com/NearNodeFlash/lustre-fs-operator/config/crd/bases
# github.com/NearNodeFlash/nnf-ec v0.0.0-20231010162453-a8168bb6a52f
## explicit; go 1.19
github.com/NearNodeFlash/nnf-ec/pkg/rfsf/pkg/models
# github.com/NearNodeFlash/nnf-sos v0.0.1-0.20240207194141-d4c5588829a1
# github.com/NearNodeFlash/nnf-sos v0.0.1-0.20240221214302-e7989177289a
## explicit; go 1.19
github.com/NearNodeFlash/nnf-sos/api/v1alpha1
github.com/NearNodeFlash/nnf-sos/config/crd/bases
Expand Down

0 comments on commit be1ccfc

Please sign in to comment.