Skip to content

Commit

Permalink
set proper fields in yaml
Browse files Browse the repository at this point in the history
Signed-off-by: weizhou.lan@daocloud.io <weizhou.lan@daocloud.io>

---------

Signed-off-by: weizhou.lan@daocloud.io <weizhou.lan@daocloud.io>
  • Loading branch information
weizhoublue committed Jul 12, 2024
1 parent 689d7ed commit b387232
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 12 deletions.
28 changes: 27 additions & 1 deletion bindata/manifests/daemon/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,40 +39,54 @@ 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
resources:
requests:
cpu: 10m
memory: 10Mi
limits:
cpu: 100m
memory: 100Mi
volumeMounts:
- name: cnibin
mountPath: /host/opt/cni/bin
- 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
resources:
requests:
cpu: 10m
memory: 10Mi
limits:
cpu: 100m
memory: 100Mi
volumeMounts:
- name: cnibin
mountPath: /host/opt/cni/bin
- 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 @@ -85,16 +99,20 @@ spec:
requests:
cpu: 10m
memory: 10Mi
limits:
cpu: 100m
memory: 100Mi
volumeMounts:
- name: cnibin
mountPath: /host/opt/cni/bin
- name: os-release
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 @@ -105,13 +123,18 @@ spec:
requests:
cpu: 10m
memory: 10Mi
limits:
cpu: 100m
memory: 100Mi
volumeMounts:
- name: host
mountPath: /host
{{- end }}
{{- end }}
containers:
- name: sriov-network-config-daemon
image: {{.Image}}
imagePullPolicy: IfNotPresent
command:
- sriov-network-config-daemon
securityContext:
Expand Down Expand Up @@ -144,6 +167,9 @@ spec:
requests:
cpu: 100m
memory: 100Mi
limits:
cpu: 500m
memory: 500Mi
volumeMounts:
- name: host
mountPath: /host
Expand Down
4 changes: 4 additions & 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 All @@ -85,6 +86,9 @@ spec:
requests:
cpu: 10m
memory: 50Mi
limits:
cpu: 500m
memory: 500Mi
volumeMounts:
- mountPath: /etc/tls
name: tls
Expand Down
4 changes: 4 additions & 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 All @@ -60,6 +61,9 @@ spec:
requests:
cpu: 10m
memory: 50Mi
limits:
cpu: 500m
memory: 500Mi
volumeMounts:
- name: devicesock
mountPath: /var/lib/kubelet/device-plugins
Expand Down
4 changes: 4 additions & 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 All @@ -87,6 +88,9 @@ spec:
requests:
cpu: 10m
memory: 50Mi
limits:
cpu: 300m
memory: 500Mi
volumeMounts:
- mountPath: /etc/tls
name: tls
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"
24 changes: 13 additions & 11 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"
admissionControllers:
Expand Down Expand Up @@ -78,9 +78,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 @@ -94,13 +95,14 @@ supportedExtraNICs: []

# Image URIs for sriov-network-operator components
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: quay.io/kubevirt/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
operator: ghcr.io/spidernet-io/sriov-network-operator:v1.3.0
sriovConfigDaemon: ghcr.io/spidernet-io/sriov-network-operator-config-daemon:v1.3.0
sriovDevicePlugin: ghcr.io/k8snetworkplumbingwg/sriov-network-device-plugin:v3.7.0
resourcesInjector: ghcr.io/k8snetworkplumbingwg/network-resources-injector:v1.6.0
webhook: ghcr.io/spidernet-io/sriov-network-operator-webhook:v1.3.0
#sriovCni: ghcr.io/k8snetworkplumbingwg/sriov-cni
#ibSriovCni: ghcr.io/k8snetworkplumbingwg/ib-sriov-cni
#ovsCni: quay.io/kubevirt/ovs-cni-plugin


imagePullSecrets: []

0 comments on commit b387232

Please sign in to comment.