From dd941de24189f3ebdbb3207be3c6f72ccfb59b88 Mon Sep 17 00:00:00 2001 From: sp98 Date: Mon, 23 Jan 2023 17:53:51 +0530 Subject: [PATCH] core: multiClusterService API spec changes Add API changes for export services to peer cluster Signed-off-by: sp98 --- .../charts/rook-ceph/templates/resources.yaml | 7 +++++++ deploy/examples/cluster.yaml | 6 ++++++ deploy/examples/crds.yaml | 7 +++++++ pkg/apis/ceph.rook.io/v1/types.go | 11 +++++++++++ .../ceph.rook.io/v1/zz_generated.deepcopy.go | 17 +++++++++++++++++ 5 files changed, 48 insertions(+) diff --git a/deploy/charts/rook-ceph/templates/resources.yaml b/deploy/charts/rook-ceph/templates/resources.yaml index 637777c6d..746070ff5 100644 --- a/deploy/charts/rook-ceph/templates/resources.yaml +++ b/deploy/charts/rook-ceph/templates/resources.yaml @@ -1905,6 +1905,13 @@ spec: - IPv6 nullable: true type: string + multiClusterService: + description: Enable multiClusterService to export the Services between peer clusters + properties: + enabled: + description: Enable multiClusterService to export the mon and OSD services to peer cluster. Ensure that peer clusters are connected using an MCS API compatible application, like Globalnet Submariner. + type: boolean + type: object provider: description: Provider is what provides network connectivity to the cluster e.g. "host" or "multus" nullable: true diff --git a/deploy/examples/cluster.yaml b/deploy/examples/cluster.yaml index b6d7b127f..52d2cda8f 100644 --- a/deploy/examples/cluster.yaml +++ b/deploy/examples/cluster.yaml @@ -110,6 +110,12 @@ spec: #ipFamily: "IPv6" # Ceph daemons to listen on both IPv4 and Ipv6 networks #dualStack: false + # Enable multiClusterService to export the mon and OSD services to peer cluster. + # This is useful to support RBD mirroring between two clusters having overlapping CIDRs. + # Ensure that peer clusters are connected using an MCS API compatible application, like Globalnet Submariner. + #multiClusterService: + # enabled: false + # enable the crash collector for ceph daemon crash collection crashCollector: disable: false diff --git a/deploy/examples/crds.yaml b/deploy/examples/crds.yaml index f2f5cfec9..b0a768aca 100644 --- a/deploy/examples/crds.yaml +++ b/deploy/examples/crds.yaml @@ -1903,6 +1903,13 @@ spec: - IPv6 nullable: true type: string + multiClusterService: + description: Enable multiClusterService to export the Services between peer clusters + properties: + enabled: + description: Enable multiClusterService to export the mon and OSD services to peer cluster. Ensure that peer clusters are connected using an MCS API compatible application, like Globalnet Submariner. + type: boolean + type: object provider: description: Provider is what provides network connectivity to the cluster e.g. "host" or "multus" nullable: true diff --git a/pkg/apis/ceph.rook.io/v1/types.go b/pkg/apis/ceph.rook.io/v1/types.go index acbc14805..a9a44ac83 100755 --- a/pkg/apis/ceph.rook.io/v1/types.go +++ b/pkg/apis/ceph.rook.io/v1/types.go @@ -2158,8 +2158,19 @@ type NetworkSpec struct { // DualStack determines whether Ceph daemons should listen on both IPv4 and IPv6 // +optional DualStack bool `json:"dualStack,omitempty"` + + // Enable multiClusterService to export the Services between peer clusters + // +optional + MultiClusterService MultiClusterServiceSpec `json:"multiClusterService,omitempty"` } +type MultiClusterServiceSpec struct { + // Enable multiClusterService to export the mon and OSD services to peer cluster. + // Ensure that peer clusters are connected using an MCS API compatible application, + // like Globalnet Submariner. + // +optional + Enabled bool `json:"enabled,omitempty"` +} type ConnectionsSpec struct { // Encryption settings for the network connections. // +nullable diff --git a/pkg/apis/ceph.rook.io/v1/zz_generated.deepcopy.go b/pkg/apis/ceph.rook.io/v1/zz_generated.deepcopy.go index a2832e82c..e40a15aa1 100644 --- a/pkg/apis/ceph.rook.io/v1/zz_generated.deepcopy.go +++ b/pkg/apis/ceph.rook.io/v1/zz_generated.deepcopy.go @@ -2804,6 +2804,22 @@ func (in *MonitoringSpec) DeepCopy() *MonitoringSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MultiClusterServiceSpec) DeepCopyInto(out *MultiClusterServiceSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MultiClusterServiceSpec. +func (in *MultiClusterServiceSpec) DeepCopy() *MultiClusterServiceSpec { + if in == nil { + return nil + } + out := new(MultiClusterServiceSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NFSGaneshaSpec) DeepCopyInto(out *NFSGaneshaSpec) { *out = *in @@ -2902,6 +2918,7 @@ func (in *NetworkSpec) DeepCopyInto(out *NetworkSpec) { *out = new(ConnectionsSpec) (*in).DeepCopyInto(*out) } + out.MultiClusterService = in.MultiClusterService return }