Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Sch <[email protected]>
  • Loading branch information
SchSeba committed Oct 10, 2024
1 parent 2e256c7 commit 9f5207e
Show file tree
Hide file tree
Showing 29 changed files with 1,272 additions and 1,159 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ COPY . .
RUN make _build-manager BIN_PATH=build/_output/cmd

FROM quay.io/centos/centos:stream9
RUN yum -y install delve procps-ng
COPY --from=builder /go/src/github.com/k8snetworkplumbingwg/sriov-network-operator/build/_output/cmd/manager /usr/bin/sriov-network-operator
COPY bindata /bindata
ENV OPERATOR_NAME=sriov-network-operator
Expand Down
16 changes: 16 additions & 0 deletions Dockerfile.rhel7
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.22-openshift-4.17 AS builder
WORKDIR /go/src/github.com/k8snetworkplumbingwg/sriov-network-operator
COPY . .
RUN make _build-manager BIN_PATH=build/_output/cmd

FROM registry.ci.openshift.org/ocp/4.17:base-rhel9
LABEL io.k8s.display-name="OpenShift sriov-network-operator" \
io.k8s.description="This is the component that manange and config sriov component in Openshift cluster" \
io.openshift.tags="openshift,networking,sr-iov" \
com.redhat.delivery.appregistry=true \
maintainer="Multus team <[email protected]>"
COPY --from=builder /go/src/github.com/k8snetworkplumbingwg/sriov-network-operator/build/_output/cmd/manager /usr/bin/sriov-network-operator
COPY bindata /bindata
ENV OPERATOR_NAME=sriov-network-operator
ENV CLUSTER_TYPE=openshift
CMD ["/usr/bin/sriov-network-operator"]
2 changes: 1 addition & 1 deletion Dockerfile.sriov-network-config-daemon
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ FROM quay.io/centos/centos:stream9
ARG MSTFLINT=mstflint
# We have to ensure that pciutils is installed. This package is needed for mstfwreset to succeed.
# xref pkg/vendors/mellanox/mellanox.go#L150
RUN ARCH_DEP_PKGS=$(if [ "$(uname -m)" != "s390x" ]; then echo -n ${MSTFLINT} ; fi) && yum -y install hwdata pciutils $ARCH_DEP_PKGS && yum clean all
RUN ARCH_DEP_PKGS=$(if [ "$(uname -m)" != "s390x" ]; then echo -n ${MSTFLINT} ; fi) && yum -y install delve procps-ng hwdata pciutils $ARCH_DEP_PKGS && yum clean all
LABEL io.k8s.display-name="sriov-network-config-daemon" \
io.k8s.description="This is a daemon that manage and config sriov network devices in Kubernetes cluster"
COPY --from=builder /go/src/github.com/k8snetworkplumbingwg/sriov-network-operator/build/_output/cmd/sriov-network-config-daemon /usr/bin/
Expand Down
16 changes: 16 additions & 0 deletions Dockerfile.sriov-network-config-daemon.rhel7
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.22-openshift-4.17 AS builder
WORKDIR /go/src/github.com/k8snetworkplumbingwg/sriov-network-operator
COPY . .
RUN make _build-sriov-network-config-daemon BIN_PATH=build/_output/cmd

FROM registry.ci.openshift.org/ocp/4.17:base-rhel9
RUN yum -y update && ARCH_DEP_PKGS=$(if [ "$(uname -m)" != "s390x" ]; then echo -n mstflint ; fi) && yum -y install pciutils hwdata $ARCH_DEP_PKGS && yum clean all
LABEL io.k8s.display-name="OpenShift sriov-network-config-daemon" \
io.k8s.description="This is a daemon that manage and config sriov network devices in Openshift cluster" \
io.openshift.tags="openshift,networking,sr-iov" \
maintainer="Multus team <[email protected]>"
COPY --from=builder /go/src/github.com/k8snetworkplumbingwg/sriov-network-operator/build/_output/cmd/sriov-network-config-daemon /usr/bin/
COPY bindata /bindata
ENV PLUGINSPATH=/plugins
ENV CLUSTER_TYPE=openshift
CMD ["/usr/bin/sriov-network-config-daemon"]
13 changes: 13 additions & 0 deletions Dockerfile.webhook.rhel7
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.22-openshift-4.17 AS builder
WORKDIR /go/src/github.com/k8snetworkplumbingwg/sriov-network-operator
COPY . .
RUN make _build-webhook BIN_PATH=build/_output/cmd

FROM registry.ci.openshift.org/ocp/4.17:base-rhel9
LABEL io.k8s.display-name="OpenShift sriov-network-webhook" \
io.k8s.description="This is an admission controller webhook that mutates and validates customer resources of sriov network operator." \
io.openshift.tags="openshift,networking,sr-iov" \
maintainer="Multus team <[email protected]>"
COPY --from=builder /go/src/github.com/k8snetworkplumbingwg/sriov-network-operator/build/_output/cmd/webhook /usr/bin/webhook
ENV CLUSTER_TYPE=openshift
CMD ["/usr/bin/webhook"]
16 changes: 14 additions & 2 deletions bindata/manifests/daemon/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,22 @@ spec:
containers:
- name: sriov-network-config-daemon
image: {{.Image}}
command:
- sriov-network-config-daemon
imagePullPolicy: Always
# command:
# - dlv
# - --listen=:2345
# - --headless=true
# - --api-version=2
# - --accept-multiclient
# - --log
# - exec
# - /usr/bin/sriov-network-config-daemon
# - --
# - start
securityContext:
privileged: true
command:
- sriov-network-config-daemon
args:
- "start"
{{- if .UsedSystemdMode}}
Expand Down
1 change: 1 addition & 0 deletions bindata/manifests/operator-webhook/server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ spec:
containers:
- name: webhook-server
image: {{.SriovNetworkWebhookImage}}
imagePullPolicy: Always
command:
- webhook
args:
Expand Down
1 change: 1 addition & 0 deletions bindata/manifests/plugins/sriov-device-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ spec:
containers:
- name: sriov-device-plugin
image: {{.SRIOVDevicePluginImage}}
imagePullPolicy: Always
args:
- --log-level=10
- --resource-prefix={{.ResourcePrefix}}
Expand Down
1 change: 1 addition & 0 deletions bindata/manifests/webhook/server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ spec:
containers:
- name: webhook-server
image: {{.NetworkResourcesInjectorImage}}
imagePullPolicy: Always
command:
- webhook
args:
Expand Down
Loading

0 comments on commit 9f5207e

Please sign in to comment.