From 39c6df7272935505c8d0b8787f7673788914798c Mon Sep 17 00:00:00 2001 From: Sunyanan Choochotkaew Date: Thu, 11 Apr 2024 10:17:52 +0900 Subject: [PATCH 1/2] add missing fields and update replaces Signed-off-by: Sunyanan Choochotkaew --- bundle.Dockerfile | 2 +- .../multi-nic-cni-operator.clusterserviceversion.template | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bundle.Dockerfile b/bundle.Dockerfile index 58d02afd..d12ca080 100644 --- a/bundle.Dockerfile +++ b/bundle.Dockerfile @@ -6,7 +6,7 @@ LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ LABEL operators.operatorframework.io.bundle.package.v1=multi-nic-cni-operator LABEL operators.operatorframework.io.bundle.channels.v1=alpha -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.28.0 +LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.34.1 LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3 diff --git a/config/manifests/bases/multi-nic-cni-operator.clusterserviceversion.template b/config/manifests/bases/multi-nic-cni-operator.clusterserviceversion.template index cef57678..098583e7 100644 --- a/config/manifests/bases/multi-nic-cni-operator.clusterserviceversion.template +++ b/config/manifests/bases/multi-nic-cni-operator.clusterserviceversion.template @@ -7,7 +7,7 @@ metadata: categories: Networking containerImage: ${IMG} repository: http://github.com/foundation-model-stack/multi-nic-cni - support: IBM + support: Foundation Model Stack Team description: Automate container multi-network configuration features.operators.openshift.io/disconnected: "true" features.operators.openshift.io/fips-compliant: "false" @@ -138,6 +138,7 @@ spec: - email: chiba@jp.ibm.com name: Tatsuhiro Chiba maturity: alpha + minKubeVersion: 1.25.0 provider: name: Foundation Model Stack version: 0.0.0 From 647685fa7b14a6daa9a6ef23866c110a5e33ea0a Mon Sep 17 00:00:00 2001 From: Sunyanan Choochotkaew Date: Tue, 9 Apr 2024 17:58:27 +0900 Subject: [PATCH 2/2] make details of hostinterface optional,set default container Signed-off-by: Sunyanan Choochotkaew --- api/v1/hostinterface_types.go | 13 +++++-------- .../crd/bases/multinic.fms.io_hostinterfaces.yaml | 5 ----- config/manager/manager.yaml | 2 ++ 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/api/v1/hostinterface_types.go b/api/v1/hostinterface_types.go index 87a80c13..ee3f86ed 100644 --- a/api/v1/hostinterface_types.go +++ b/api/v1/hostinterface_types.go @@ -9,16 +9,13 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! -// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. - type InterfaceInfoType struct { InterfaceName string `json:"interfaceName"` - NetAddress string `json:"netAddress"` - HostIP string `json:"hostIP"` - Vendor string `json:"vendor"` - Product string `json:"product"` - PciAddress string `json:"pciAddress"` + NetAddress string `json:"netAddress,omitempty"` + HostIP string `json:"hostIP,omitempty"` + Vendor string `json:"vendor,omitempty"` + Product string `json:"product,omitempty"` + PciAddress string `json:"pciAddress,omitempty"` } func (i InterfaceInfoType) Equal(cmp InterfaceInfoType) bool { diff --git a/config/crd/bases/multinic.fms.io_hostinterfaces.yaml b/config/crd/bases/multinic.fms.io_hostinterfaces.yaml index 0ea01fae..9e08f477 100644 --- a/config/crd/bases/multinic.fms.io_hostinterfaces.yaml +++ b/config/crd/bases/multinic.fms.io_hostinterfaces.yaml @@ -54,12 +54,7 @@ spec: vendor: type: string required: - - hostIP - interfaceName - - netAddress - - pciAddress - - product - - vendor type: object type: array required: diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 331892e8..965537ef 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -19,6 +19,8 @@ spec: replicas: 1 template: metadata: + annotations: + kubectl.kubernetes.io/default-container: manager labels: control-plane: controller-manager spec: