Skip to content

Commit

Permalink
Merge pull request #51 from smart-edge-open/release-sriov-fec-operato…
Browse files Browse the repository at this point in the history
…r-23.34

SRIOV-FEC Operator Release 23.34
  • Loading branch information
MouliBurla committed Jul 31, 2023
2 parents d6696f5 + ce38fda commit e5e578e
Show file tree
Hide file tree
Showing 31 changed files with 240 additions and 108 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## Copyright (c) 2020-2023 Intel Corporation

# Build the manager binary
FROM golang:1.20.4 as builder
FROM golang:1.20.6 as builder

WORKDIR /workspace
# Copy the Go Modules manifests
Expand All @@ -22,7 +22,7 @@ COPY controllers/ controllers/
# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager main.go

FROM registry.access.redhat.com/ubi9/ubi-micro:9.2-5
FROM registry.access.redhat.com/ubi9/ubi-micro:9.2-9

ARG VERSION
### Required OpenShift Labels
Expand Down
24 changes: 9 additions & 15 deletions Dockerfile.daemon
Original file line number Diff line number Diff line change
@@ -1,25 +1,15 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2020-2023 Intel Corporation

FROM golang:1.20.4 as builder
FROM golang:1.20.6 as builder

WORKDIR /workspace-pf

RUN git clone --depth 1 --branch r44 https://github.com/benhoyt/inih

WORKDIR /workspace-pf/inih/extra

RUN make -f Makefile.static && \
cp libinih.a ../

RUN git clone --depth 1 --branch v22.11 https://github.com/intel/pf-bb-config /workspace-pf/pf-bb-config
RUN git clone --depth 1 --branch v23.03 https://github.com/intel/pf-bb-config /workspace-pf/pf-bb-config

WORKDIR /workspace-pf/pf-bb-config

RUN VERSION_STRING=$(git describe --tags --long) && \
sed -i "s/#VERSION_STRING#/${VERSION_STRING}/g" config_app.c && \
make

RUN ./build.sh

WORKDIR /workspace-go

Expand All @@ -33,7 +23,7 @@ COPY api api/

RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o sriov_fec_daemon cmd/daemon/main.go

FROM registry.access.redhat.com/ubi9/ubi:9.2-489 as package_installer
FROM registry.access.redhat.com/ubi9/ubi:9.2-696 as package_installer

RUN yum install -y ethtool iproute kmod procps-ng pciutils util-linux tar gzip gcc make wget && yum clean all

Expand All @@ -51,7 +41,7 @@ RUN wget https://pci-ids.ucw.cz/v2.2/pci.ids.gz -O pci.ids.gz && \

RUN yum remove -y wget

FROM registry.access.redhat.com/ubi9/ubi-micro:9.2-5
FROM registry.access.redhat.com/ubi9/ubi-micro:9.2-9

ARG VERSION
### Required OpenShift Labels
Expand Down Expand Up @@ -108,11 +98,15 @@ COPY --from=package_installer /bin/awk /bin/sed /bin/
RUN mkdir /usr/share/hwdata
COPY --from=package_installer /usr/share/hwdata /usr/share/hwdata

RUN mkdir /sriov_workdir
RUN mkdir -p /sriov_workdir/vrb1

USER 1001

COPY TEMP_LICENSE_COPY /licenses/LICENSE
WORKDIR /sriov_workdir
COPY --from=builder /workspace-go/sriov_fec_daemon .
COPY --from=builder /workspace-pf/pf-bb-config/pf_bb_config .
COPY --from=builder /workspace-pf/pf-bb-config/vrb1/srs_fft_windows_coefficient.bin vrb1/

ENTRYPOINT ["/sriov_workdir/sriov_fec_daemon"]
4 changes: 2 additions & 2 deletions Dockerfile.labeler
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2020-2023 Intel Corporation

FROM golang:1.20.4 as builder
FROM golang:1.20.6 as builder

WORKDIR /workspace
COPY go.mod go.sum ./
Expand All @@ -15,7 +15,7 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o node_lab

RUN wget https://pci-ids.ucw.cz/v2.2/pci.ids.gz -O pci.ids.gz && gunzip pci.ids.gz

FROM registry.access.redhat.com/ubi9/ubi-micro:9.2-5
FROM registry.access.redhat.com/ubi9/ubi-micro:9.2-9

ARG VERSION
### Required OpenShift Labels
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export CLI_EXEC?=oc
# Container format for podman. Required to build containers with "ManifestType": "application/vnd.oci.image.manifest.v2+json",
export BUILDAH_FORMAT=docker
# Current Operator version
VERSION ?= 2.7.0
VERSION ?= 2.7.1
# Supported channels
CHANNELS ?= stable
# Default channel
Expand Down
1 change: 1 addition & 0 deletions api/v2/sriovfecclusterconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package v2

import (
"fmt"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

Expand Down
1 change: 1 addition & 0 deletions api/v2/sriovfecclusterconfig_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package v2

import (
"fmt"

"github.com/smart-edge-open/sriov-fec-operator/pkg/common/utils"
apierrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/runtime"
Expand Down
9 changes: 5 additions & 4 deletions api/v2/webhook_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ import (
"context"
"crypto/tls"
"fmt"
"net"
"path/filepath"
"testing"
"time"

"github.com/go-logr/logr"
fuzz "github.com/google/gofuzz"
"github.com/smart-edge-open/sriov-fec-operator/pkg/common/utils"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes/scheme"
"net"
"path/filepath"
"testing"
"time"

. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
Expand Down
34 changes: 17 additions & 17 deletions api/v2/zz_generated.deepcopy.go

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

16 changes: 8 additions & 8 deletions assets/200-device-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ data:
{
"resourceList": [
{
"resourceName": "intel_fec_lte",
"resourceName": "{{ .SRIOV_FEC_LTE_RESOURCE_NAME}}",
"deviceType": "accelerator",
"selectors": {
"vendors": ["1172"],
"devices": ["5050"],
"drivers": ["pci-pf-stub", "vfio-pci"]
"drivers": ["pci-pf-stub", "vfio-pci", "igb_uio"]
},
"additionalInfo": {
"*": {
Expand All @@ -69,12 +69,12 @@ data:
}
},
{
"resourceName": "intel_fec_5g",
"resourceName": "{{ .SRIOV_FEC_5G_RESOURCE_NAME}}",
"deviceType": "accelerator",
"selectors": {
"vendors": ["8086"],
"devices": ["0d90"],
"drivers": ["pci-pf-stub", "vfio-pci"]
"drivers": ["pci-pf-stub", "vfio-pci", "igb_uio"]
},
"additionalInfo": {
"*": {
Expand All @@ -83,12 +83,12 @@ data:
}
},
{
"resourceName": "intel_fec_acc100",
"resourceName": "{{ .SRIOV_FEC_ACC100_RESOURCE_NAME}}",
"deviceType": "accelerator",
"selectors": {
"vendors": ["8086"],
"devices": ["0d5d"],
"drivers": ["pci-pf-stub", "vfio-pci"]
"drivers": ["pci-pf-stub", "vfio-pci", "igb_uio"]
},
"additionalInfo": {
"*": {
Expand All @@ -97,12 +97,12 @@ data:
}
},
{
"resourceName": "intel_fec_acc200",
"resourceName": "{{ .SRIOV_FEC_ACC200_RESOURCE_NAME}}",
"deviceType": "accelerator",
"selectors": {
"vendors": ["8086"],
"devices": ["57c1"],
"drivers": ["pci-pf-stub", "vfio-pci"]
"drivers": ["pci-pf-stub", "vfio-pci", "igb_uio"]
},
"additionalInfo": {
"*": {
Expand Down
7 changes: 7 additions & 0 deletions assets/300-daemon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@ data:
mountPath: /var/log
- name: tmp
mountPath: /tmp
- name: lockdown
mountPath: /sys/kernel/security
readOnly: true
env:
- name: SRIOV_FEC_NAMESPACE
valueFrom:
Expand Down Expand Up @@ -243,3 +246,7 @@ data:
emptyDir: {}
- name: tmp
emptyDir: {}
- name: lockdown
hostPath:
path: /sys/kernel/security
3 changes: 1 addition & 2 deletions cmd/daemon/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"github.com/google/uuid"
"github.com/smart-edge-open/sriov-fec-operator/pkg/common/drainhelper"
"github.com/smart-edge-open/sriov-fec-operator/pkg/common/utils"
"io/ioutil"
"os"
"syscall"

Expand Down Expand Up @@ -63,7 +62,7 @@ func main() {

daemon.StartTelemetryDaemon(mgr, nodeName, ns, directClient, setupLog)

vfioTokenBytes, err := ioutil.ReadFile("/sriov_config/vfiotoken")
vfioTokenBytes, err := os.ReadFile("/sriov_config/vfiotoken")
if err != nil {
setupLog.Error(err)
os.Exit(1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,5 +170,5 @@ spec:
provider:
name: Intel Corporation
url: https://builders.intel.com/docs/networkbuilders/intel-vran-dedicated-accelerator-acc100-product-brief.pdf
replaces: sriov-fec.v2.6.0
replaces: sriov-fec.v2.7.1
version: 0.0.0
Loading

0 comments on commit e5e578e

Please sign in to comment.