Skip to content

Commit

Permalink
Grammar and typos corrections according to Jianjun's comments.
Browse files Browse the repository at this point in the history
Including files:
- docs/feature-gates.md
- pkg/agent/proxy/endpoints.go
- pkg/agent/proxy/endpointslicecache.go
  • Loading branch information
hongliangl committed Feb 11, 2021
1 parent 8411bca commit 57e5e8f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
9 changes: 5 additions & 4 deletions docs/feature-gates.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,11 @@ NetworkPolicy implementation for Pod-to-Service traffic.

`EndpointSlice` enables Service EndpointSlice support in AntreaProxy. The
EndpointSlice API was introduced in Kubernetes 1.16 (alpha) and it is enabled
by default in Kubernetes 1.17 (beta). This flag will take no effect if AntreaProxy
is not enabled. The endpoint conditions of `Serving` and `Terminating` are not
supported currently. ServiceTopology is not supported either. Refer to this [link](https://kubernetes.io/docs/tasks/administer-cluster/enabling-endpointslices/)
for more information. EndpointSlice API version that AntreaProxy supports is v1beta1
by default in Kubernetes 1.17 (beta). The EndpointSlice feature gate will take no
effect if AntreaProxy is not enabled. The endpoint conditions of `Serving` and
`Terminating` are not supported currently. ServiceTopology is not supported either.
Refer to this [link](https://kubernetes.io/docs/tasks/administer-cluster/enabling-endpointslices/)
for more information. The EndpointSlice API version that AntreaProxy supports is v1beta1
currently, and other EndpointSlice API versions are not supported. If EndpointSlice is
enabled in AntreaProxy, but EndpointSlice API is disabled in Kubernetes or EndpointSlice
API version v1beta1 is not supported in Kubernetes, error messages will be logged by
Expand Down
6 changes: 3 additions & 3 deletions pkg/agent/proxy/endpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,17 +114,17 @@ func (t *endpointsChangesTracker) OnEndpointUpdate(previous, current *corev1.End
func (t *endpointsChangesTracker) OnEndpointSliceUpdate(endpointSlice *discovery.EndpointSlice, removeSlice bool) bool {
// This should never happen.
if endpointSlice == nil {
klog.Error("Nil endpointSlice passed to EndpointSliceUpdate")
klog.Error("Nil EndpointSlice passed to EndpointSliceUpdate")
return false
}

if _, has := supportedEndpointSliceAddressTypes[endpointSlice.AddressType]; !has {
klog.V(4).Infof("EndpointSlice address type not supported: %s", endpointSlice.AddressType)
klog.V(4).Infof("EndpointSlice address type is not supported: %s", endpointSlice.AddressType)
return false
}

if _, _, err := endpointSliceCacheKeys(endpointSlice); err != nil {
klog.Warningf("Error getting endpoint slice cache keys: %v", err)
klog.Warningf("Got EndpointSlice cache keys with error: %v", err)
return false
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/agent/proxy/endpointslicecache.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ limitations under the License.
// limitations under the License.
//
// Original file https://raw.githubusercontent.com/kubernetes/kubernetes/0c0d4fea8dd6bdcd16b9e1d35da3f7d209341a6f/pkg/proxy/endpointslicecache.go
// If this file is located in third_party, there will be an import cycle issue when build Antrea as this file import
// If this file is located in third_party, there will be an import cycle issue when building Antrea as this file imports
// "github.com/vmware-tanzu/antrea/pkg/agent/proxy/types".
// Remove makeEndpointInfo and recorder in fields.
// Remove unused standardEndpointInfo.
Expand Down

0 comments on commit 57e5e8f

Please sign in to comment.