Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Commit

Permalink
Merge pull request #3683 from steeling/feature/protocol
Browse files Browse the repository at this point in the history
feat(pkg/apis/config) add the protocol to the mesh cluster
  • Loading branch information
snehachhabria authored Jun 30, 2021
2 parents 58f8a26 + 934b562 commit 94449b5
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
23 changes: 23 additions & 0 deletions charts/osm/crds/multiclusterservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,29 @@ spec:
properties:
serviceAccount:
type: string
ports:
description: The list of ports that are exposed by this service.
type: array
items:
type: object
required:
- port
- protocol
properties:
port:
description: The port that will be exposed by this service.
type: integer
minimum: 1
maximum: 65535
protocol:
description: The IP protocol for this port. Supports "TCP", "UDP", and "SCTP". Default is TCP.
type: string
default: "TCP"
enum:
- TCP
- UDP
- SCTP
type: string
clusters:
description: The clusters the service accounts are hosted on.
type: array
Expand Down
11 changes: 11 additions & 0 deletions pkg/apis/config/v1alpha1/multi_cluster_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ type MultiClusterServiceSpec struct {

// ServiceAccount represents the service account of the multicluster service.
ServiceAccount string `json:"serviceAccount,omitempty"`

// Ports is the list of ports exported by this service.
Ports []PortSpec `json:"ports,omitempty"`
}

// ClusterSpec is the type used to represent a remote cluster in multicluster scenarios.
Expand All @@ -41,6 +44,14 @@ type ClusterSpec struct {
Name string `json:"name,omitempty"`
}

// PortSpec contains information on service's port.
type PortSpec struct {
// The port that will be exposed by this service.
Port uint32
// Protocol is The IP protocol for this port. Supports "TCP", "UDP", and "SCTP". Default is TCP.
Protocol string
}

// MultiClusterServiceList defines the list of MultiClusterService objects.
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type MultiClusterServiceList struct {
Expand Down
21 changes: 21 additions & 0 deletions pkg/apis/config/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 94449b5

Please sign in to comment.