Skip to content

Commit

Permalink
Merge pull request #1 from spidernet-io/pr/welan/master
Browse files Browse the repository at this point in the history
create SriovNetworkPoolConfig and configure imagepolicy
  • Loading branch information
weizhoublue authored Jul 10, 2024
2 parents 2fed72e + 390c772 commit f7244ad
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 7 deletions.
13 changes: 12 additions & 1 deletion bindata/manifests/daemon/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,12 @@ spec:
- name: {{ . }}
{{- end }}
{{- end }}
{{- if or .SRIOVCNIImage .SRIOVInfiniBandCNIImage .OVSCNIImage .UsedSystemdMode }}
initContainers:
{{- if .SRIOVCNIImage }}
- name: sriov-cni
image: {{.SRIOVCNIImage}}
imagePullPolicy: IfNotPresent
args: ["--no-sleep"]
securityContext:
privileged: true
Expand All @@ -55,8 +58,11 @@ spec:
- name: os-release
mountPath: /host/etc/os-release
readOnly: true
{{- end }}
{{- if .SRIOVInfiniBandCNIImage }}
- name: sriov-infiniband-cni
image: {{.SRIOVInfiniBandCNIImage}}
imagePullPolicy: IfNotPresent
args: ["--no-sleep"]
securityContext:
privileged: true
Expand All @@ -70,9 +76,11 @@ spec:
- name: os-release
mountPath: /host/etc/os-release
readOnly: true
{{- end }}
{{- if .OVSCNIImage }}
- name: ovs-cni
image: {{.OVSCNIImage}}
imagePullPolicy: IfNotPresent
command: ["/bin/sh","-c"]
args:
- >
Expand All @@ -92,9 +100,10 @@ spec:
mountPath: /host/etc/os-release
readOnly: true
{{- end }}
{{- if .UsedSystemdMode}}
{{- if .UsedSystemdMode }}
- name: sriov-service-copy
image: {{.Image}}
imagePullPolicy: IfNotPresent
command:
- /bin/bash
- -c
Expand All @@ -109,9 +118,11 @@ spec:
- name: host
mountPath: /host
{{- end }}
{{- end }}
containers:
- name: sriov-network-config-daemon
image: {{.Image}}
imagePullPolicy: IfNotPresent
command:
- sriov-network-config-daemon
securityContext:
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 @@ -62,6 +62,7 @@ spec:
containers:
- name: webhook-server
image: {{.SriovNetworkWebhookImage}}
imagePullPolicy: IfNotPresent
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: IfNotPresent
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 @@ -65,6 +65,7 @@ spec:
containers:
- name: webhook-server
image: {{.NetworkResourcesInjectorImage}}
imagePullPolicy: IfNotPresent
command:
- webhook
args:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: sriovnetwork.openshift.io/v1
kind: SriovNetworkPoolConfig
metadata:
name: pool-control
namespace: sriov
spec:
maxUnavailable: "1"
nodeSelector:
matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: "Exists"
---
apiVersion: sriovnetwork.openshift.io/v1
kind: SriovNetworkPoolConfig
metadata:
name: pool-worker
namespace: sriov
spec:
maxUnavailable: "50%"
nodeSelector:
matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: "NotExists"
13 changes: 7 additions & 6 deletions deployment/sriov-network-operator-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ operator:
values: [""]
nameOverride: ""
fullnameOverride: ""
resourcePrefix: "openshift.io"
resourcePrefix: "spidernet.io"
cniBinPath: "/opt/cni/bin"
clusterType: "kubernetes"
metricsExporter:
Expand Down Expand Up @@ -82,9 +82,10 @@ operator:

sriovOperatorConfig:
# deploy sriovOperatorConfig CR with the below values
deploy: false
deploy: true
# node slectors for sriov-network-config-daemon
configDaemonNodeSelector: {}
configDaemonNodeSelector:
kubernetes.io/os: "linux"
# log level for both operator and sriov-network-config-daemon
logLevel: 2
# disable node draining when configuring SR-IOV, set to true in case of a single node
Expand All @@ -100,9 +101,9 @@ supportedExtraNICs: []
images:
operator: ghcr.io/k8snetworkplumbingwg/sriov-network-operator
sriovConfigDaemon: ghcr.io/k8snetworkplumbingwg/sriov-network-operator-config-daemon
sriovCni: ghcr.io/k8snetworkplumbingwg/sriov-cni
ibSriovCni: ghcr.io/k8snetworkplumbingwg/ib-sriov-cni
ovsCni: ghcr.io/k8snetworkplumbingwg/ovs-cni-plugin
#sriovCni: ghcr.io/k8snetworkplumbingwg/sriov-cni
#ibSriovCni: ghcr.io/k8snetworkplumbingwg/ib-sriov-cni
#ovsCni: ghcr.io/k8snetworkplumbingwg/ovs-cni-plugin
sriovDevicePlugin: ghcr.io/k8snetworkplumbingwg/sriov-network-device-plugin
resourcesInjector: ghcr.io/k8snetworkplumbingwg/network-resources-injector
webhook: ghcr.io/k8snetworkplumbingwg/sriov-network-operator-webhook
Expand Down

0 comments on commit f7244ad

Please sign in to comment.