Skip to content

Commit

Permalink
Merge branch 'master' into update-ocp-bundle-to-v25.1.0-beta.3
Browse files Browse the repository at this point in the history
  • Loading branch information
rollandf authored Jan 23, 2025
2 parents 0162cfc + eed2953 commit 44cd36e
Show file tree
Hide file tree
Showing 39 changed files with 261 additions and 94 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/docs-ci-trigger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,17 @@ on:
- "v*"

jobs:
trigger_downstream_workflow:
uses: Mellanox/network-operator-docs/.github/workflows/docs-ci.yaml@main
with:
git_tag: ${{ github.ref_name }}
secrets: inherit
call_docs_ci_downstream_workflow:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GH_TOKEN_NVIDIA_CI_CD }}
GIT_TAG: ${{ github.ref_name }}
steps:
- run: |
gh workflow run docs-ci.yaml \
--repo ${{ github.repository_owner }}/network-operator-docs \
--ref main \
--field git_tag=$GIT_TAG
gh run list --repo ${{ github.repository_owner }}/network-operator-docs --branch feature/docs-ci-refactor --workflow docs-ci.yaml --json url -q '.[0].url' # print downstream workflow's last run URL
run_id=$(gh run list --repo ${{ github.repository_owner }}/network-operator-docs --branch feature/docs-ci-refactor --workflow docs-ci.yaml --json databaseId -q '.[0].databaseId')
gh run watch $run_id --repo ${{ github.repository_owner }}/network-operator-docs --exit-status # set exit code based on downstream workflow's result
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
ARG ARCH

# Build the manager binary
FROM golang:1.23@sha256:51a6466e8dbf3e00e422eb0f7a97ac450b2d57b33617bbe8d2ee0bddcd9d0d37 AS builder
FROM golang:1.23@sha256:8c10f21bec412f08f73aa7b97ca5ac5f28a39d8a88030ad8a339fd0a781d72b4 AS builder

WORKDIR /workspace

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@ generate: $(CONTROLLER_GEN) ## Generate code
.PHONY: bundle
bundle: $(OPERATOR_SDK) $(KUSTOMIZE) manifests ## Generate bundle manifests and metadata, then validate generated files.
cd hack && $(GO) run release.go --with-sha256 --templateDir ./templates/config/manager --outputDir ../config/manager/
cd hack && $(GO) run release.go --with-sha256 --templateDir ./templates/samples/ --outputDir ../config/samples/
$(OPERATOR_SDK) generate kustomize manifests -q
cd config/manager && $(KUSTOMIZE) edit set image controller=$(TAG)
$(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle $(BUNDLE_GEN_FLAGS)
Expand All @@ -410,7 +411,6 @@ bundle-push: ## Push the bundle image.
.PHONY: release-build
release-build:
yq '.[].version' hack/release.yaml | grep 'latest' && exit 1 || true
cd hack && $(GO) run release.go --templateDir ./templates/samples/ --outputDir ../config/samples/
cd hack && $(GO) run release.go --templateDir ./templates/crs/ --outputDir ../example/crs
cd hack && $(GO) run release.go --templateDir ./templates/values/ --outputDir ../deployment/network-operator/

Expand Down
1 change: 0 additions & 1 deletion api/v1alpha1/nicclusterpolicy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ type ImageSpec struct {
// +kubebuilder:validation:Pattern=[a-zA-Z0-9\.\-\/]+
Repository string `json:"repository"`
// Version of the image to use
// +kubebuilder:validation:Pattern=[a-zA-Z0-9\.-]+
Version string `json:"version"`
// ImagePullSecrets is an optional list of references to secrets in the same
// namespace to use for pulling the image
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ metadata:
"config": "{\n \"configList\": [\n {\n \"resourceName\": \"rdma_shared_device_a\",\n \"rdmaHcaMax\": 63,\n \"selectors\": {\n \"vendors\": [\"15b3\"]\n }\n }\n ]\n}\n",
"image": "k8s-rdma-shared-dev-plugin",
"repository": "ghcr.io/mellanox",
"version": "v1.5.2"
"version": "sha256:9f468fdc4449e65e4772575f83aa85840a00f97165f9a00ba34695c91d610fbd"
}
}
}
Expand Down
11 changes: 0 additions & 11 deletions config/crd/bases/mellanox.com_nicclusterpolicies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ spec:
type: string
version:
description: Version of the image to use
pattern: '[a-zA-Z0-9\.-]+'
type: string
required:
- image
Expand Down Expand Up @@ -208,7 +207,6 @@ spec:
type: string
version:
description: Version of the image to use
pattern: '[a-zA-Z0-9\.-]+'
type: string
required:
- image
Expand Down Expand Up @@ -280,7 +278,6 @@ spec:
type: string
version:
description: Version of the image to use
pattern: '[a-zA-Z0-9\.-]+'
type: string
required:
- image
Expand Down Expand Up @@ -552,7 +549,6 @@ spec:
type: string
version:
description: Version of the image to use
pattern: '[a-zA-Z0-9\.-]+'
type: string
required:
- image
Expand Down Expand Up @@ -887,7 +883,6 @@ spec:
type: object
version:
description: Version of the image to use
pattern: '[a-zA-Z0-9\.-]+'
type: string
required:
- image
Expand Down Expand Up @@ -965,7 +960,6 @@ spec:
type: boolean
version:
description: Version of the image to use
pattern: '[a-zA-Z0-9\.-]+'
type: string
required:
- image
Expand Down Expand Up @@ -1041,7 +1035,6 @@ spec:
type: string
version:
description: Version of the image to use
pattern: '[a-zA-Z0-9\.-]+'
type: string
required:
- image
Expand Down Expand Up @@ -1108,7 +1101,6 @@ spec:
type: string
version:
description: Version of the image to use
pattern: '[a-zA-Z0-9\.-]+'
type: string
required:
- image
Expand Down Expand Up @@ -1175,7 +1167,6 @@ spec:
type: string
version:
description: Version of the image to use
pattern: '[a-zA-Z0-9\.-]+'
type: string
required:
- image
Expand Down Expand Up @@ -1245,7 +1236,6 @@ spec:
type: string
version:
description: Version of the image to use
pattern: '[a-zA-Z0-9\.-]+'
type: string
required:
- image
Expand Down Expand Up @@ -1324,7 +1314,6 @@ spec:
type: boolean
version:
description: Version of the image to use
pattern: '[a-zA-Z0-9\.-]+'
type: string
required:
- image
Expand Down
2 changes: 1 addition & 1 deletion config/samples/mellanox.com_v1alpha1_nicclusterpolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ spec:
rdmaSharedDevicePlugin:
image: k8s-rdma-shared-dev-plugin
repository: ghcr.io/mellanox
version: v1.5.2
version: sha256:9f468fdc4449e65e4772575f83aa85840a00f97165f9a00ba34695c91d610fbd
# The config below directly propagates to k8s-rdma-shared-device-plugin configuration.
# Replace 'devices' with your (RDMA capable) netdevice name.
config: |
Expand Down
4 changes: 2 additions & 2 deletions controllers/nicclusterpolicy_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ var _ = Describe("NicClusterPolicyReconciler Controller", func() {
imageRepo := "nvcr.io/nvidia/doca"
imageName := "doca-telemetry-service"
imageVersion := "1.15.5-doca2.5.0"
updatedVersion := "v9.9.9-doca2.5.0"
updatedVersion := "sha256:1699d23027ea30c9fa"
ctx := context.Background()
It("should create, update and delete doca-telemetry-service through NICClusterPolicy", func() {
By("Create doca-telemetry-service through NICClusterPolicy")
Expand Down Expand Up @@ -355,7 +355,7 @@ var _ = Describe("NicClusterPolicyReconciler Controller", func() {
}, timeout*3, interval).Should(BeTrue())

By("Update DOCATelemetryService through NICClusterPolicy")
expectedImageName := fmt.Sprintf("%v/%v:%v", imageRepo, imageName, updatedVersion)
expectedImageName := fmt.Sprintf("%v/%v@%v", imageRepo, imageName, updatedVersion)

// Patch the NICClusterPolicy with the updated DOCATelemetryService version number.
patch := []byte(fmt.Sprintf(`{"spec": {"docaTelemetryService":{"version": %q}}}`, updatedVersion))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ spec:
type: string
version:
description: Version of the image to use
pattern: '[a-zA-Z0-9\.-]+'
type: string
required:
- image
Expand Down Expand Up @@ -208,7 +207,6 @@ spec:
type: string
version:
description: Version of the image to use
pattern: '[a-zA-Z0-9\.-]+'
type: string
required:
- image
Expand Down Expand Up @@ -280,7 +278,6 @@ spec:
type: string
version:
description: Version of the image to use
pattern: '[a-zA-Z0-9\.-]+'
type: string
required:
- image
Expand Down Expand Up @@ -552,7 +549,6 @@ spec:
type: string
version:
description: Version of the image to use
pattern: '[a-zA-Z0-9\.-]+'
type: string
required:
- image
Expand Down Expand Up @@ -887,7 +883,6 @@ spec:
type: object
version:
description: Version of the image to use
pattern: '[a-zA-Z0-9\.-]+'
type: string
required:
- image
Expand Down Expand Up @@ -965,7 +960,6 @@ spec:
type: boolean
version:
description: Version of the image to use
pattern: '[a-zA-Z0-9\.-]+'
type: string
required:
- image
Expand Down Expand Up @@ -1041,7 +1035,6 @@ spec:
type: string
version:
description: Version of the image to use
pattern: '[a-zA-Z0-9\.-]+'
type: string
required:
- image
Expand Down Expand Up @@ -1108,7 +1101,6 @@ spec:
type: string
version:
description: Version of the image to use
pattern: '[a-zA-Z0-9\.-]+'
type: string
required:
- image
Expand Down Expand Up @@ -1175,7 +1167,6 @@ spec:
type: string
version:
description: Version of the image to use
pattern: '[a-zA-Z0-9\.-]+'
type: string
required:
- image
Expand Down Expand Up @@ -1245,7 +1236,6 @@ spec:
type: string
version:
description: Version of the image to use
pattern: '[a-zA-Z0-9\.-]+'
type: string
required:
- image
Expand Down Expand Up @@ -1324,7 +1314,6 @@ spec:
type: boolean
version:
description: Version of the image to use
pattern: '[a-zA-Z0-9\.-]+'
type: string
required:
- image
Expand Down
2 changes: 1 addition & 1 deletion deployment/network-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ sriov-network-operator:
ibSriovCni: ghcr.io/k8snetworkplumbingwg/ib-sriov-cni:v1.1.1
ovsCni: ghcr.io/k8snetworkplumbingwg/ovs-cni-plugin:v0.37.0
# rdmaCni: ghcr.io/k8snetworkplumbingwg/rdma-cni:v1.2.0
sriovDevicePlugin: ghcr.io/k8snetworkplumbingwg/sriov-network-device-plugin:v3.8.0
sriovDevicePlugin: ghcr.io/k8snetworkplumbingwg/sriov-network-device-plugin:v3.9.0
resourcesInjector: ghcr.io/k8snetworkplumbingwg/network-resources-injector:v1.7.0
webhook: nvcr.io/nvstaging/mellanox/sriov-network-operator-webhook:network-operator-25.1.0-beta.3
# imagePullSecrest for SR-IOV Network Operator related images
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ spec:
sriovDevicePlugin:
image: sriov-network-device-plugin
repository: ghcr.io/k8snetworkplumbingwg
version: v3.8.0
version: v3.9.0
config: |
{
"resourceList": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
sriovDevicePlugin:
image: sriov-network-device-plugin
repository: ghcr.io/k8snetworkplumbingwg
version: v3.8.0
version: v3.9.0
config: |
{
"resourceList": [
Expand Down
24 changes: 12 additions & 12 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/caarlos0/env/v6 v6.10.1
github.com/containers/image/v5 v5.33.0
github.com/go-logr/logr v1.4.2
github.com/google/go-containerregistry v0.20.2
github.com/google/go-containerregistry v0.20.3
github.com/google/go-containerregistry/pkg/authn/kubernetes v0.0.0-20231129213221-4fdaa32ee934
github.com/k8snetworkplumbingwg/network-attachment-definition-client v1.7.5
github.com/onsi/ginkgo/v2 v2.22.2
Expand All @@ -17,9 +17,9 @@ require (
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.10.0
github.com/xeipuuv/gojsonschema v1.2.0
k8s.io/api v0.31.4
k8s.io/apimachinery v0.31.4
k8s.io/client-go v0.31.4
k8s.io/api v0.31.5
k8s.io/apimachinery v0.31.5
k8s.io/client-go v0.31.5
k8s.io/utils v0.0.0-20240921022957-49e7df575cb6
sigs.k8s.io/controller-runtime v0.19.4
sigs.k8s.io/yaml v1.4.0
Expand All @@ -32,10 +32,10 @@ require (
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/chai2010/gettext-go v1.0.3 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.15.1 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.16.3 // indirect
github.com/containers/storage v1.56.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/docker/cli v27.3.1+incompatible // indirect
github.com/docker/cli v27.5.0+incompatible // indirect
github.com/docker/distribution v2.8.3+incompatible // indirect
github.com/docker/docker-credential-helpers v0.8.2 // indirect
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
Expand Down Expand Up @@ -99,16 +99,16 @@ require (
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c // indirect
golang.org/x/net v0.33.0 // indirect
golang.org/x/oauth2 v0.23.0 // indirect
golang.org/x/net v0.34.0 // indirect
golang.org/x/oauth2 v0.25.0 // indirect
golang.org/x/sync v0.10.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/term v0.27.0 // indirect
golang.org/x/sys v0.29.0 // indirect
golang.org/x/term v0.28.0 // indirect
golang.org/x/text v0.21.0 // indirect
golang.org/x/time v0.7.0 // indirect
golang.org/x/tools v0.28.0 // indirect
golang.org/x/tools v0.29.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/protobuf v1.36.1 // indirect
google.golang.org/protobuf v1.36.3 // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
Expand Down
Loading

0 comments on commit 44cd36e

Please sign in to comment.