Skip to content

Commit

Permalink
add e2e test for MCS feature
Browse files Browse the repository at this point in the history
Signed-off-by: changzhen <[email protected]>
  • Loading branch information
XiShanYongYe-Chang committed Jul 21, 2021
1 parent 380dd48 commit 0f1ce4e
Show file tree
Hide file tree
Showing 5 changed files with 622 additions and 3 deletions.
2 changes: 1 addition & 1 deletion artifacts/deploy/controller-manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
- --bind-address=0.0.0.0
- --cluster-status-update-frequency=10s
- --secure-port=10357
- --v=2
- --v=4
volumeMounts:
- name: kubeconfig
subPath: kubeconfig
Expand Down
4 changes: 2 additions & 2 deletions pkg/controllers/mcs/service_export_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,14 @@ func (c *ServiceExportController) RunWorkQueue() {
}

func (c *ServiceExportController) syncServiceExportOrEndpointSlice(key util.QueueKey) error {
klog.V(4).Infof("Begin to sync ServiceExport or EndpointSlice %s.", key)

fedKey, ok := key.(keys.FederatedKey)
if !ok {
klog.Errorf("Failed to sync serviceExport as invalid key: %v", key)
return fmt.Errorf("invalid key")
}

klog.V(4).Infof("Begin to sync %s %s.", fedKey.Kind, fedKey.NamespaceKey())

switch fedKey.Kind {
case util.ServiceExportKind:
if err := c.handleServiceExportEvent(fedKey); err != nil {
Expand Down
3 changes: 3 additions & 0 deletions pkg/util/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ const (
ServiceExportKind = "ServiceExport"
// ServiceImportKind indicates the target resource is a serviceimport crd
ServiceImportKind = "ServiceImport"

// CRDKind indicated the target resource is a CustomResourceDefinition
CRDKind = "CustomResourceDefinition"
)

// Define resource filed
Expand Down
Loading

0 comments on commit 0f1ce4e

Please sign in to comment.