Skip to content

Commit

Permalink
Rename API group "networking" to "controlplane"
Browse files Browse the repository at this point in the history
  • Loading branch information
jianjuns committed Aug 26, 2020
1 parent 6dc2c59 commit c676682
Show file tree
Hide file tree
Showing 117 changed files with 1,530 additions and 1,530 deletions.
10 changes: 5 additions & 5 deletions build/yamls/antrea-aks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ metadata:
name: antctl
rules:
- apiGroups:
- networking.antrea.tanzu.vmware.com
- controlplane.antrea.tanzu.vmware.com
resources:
- networkpolicies
- appliedtogroups
Expand Down Expand Up @@ -453,7 +453,7 @@ rules:
- update
- delete
- apiGroups:
- networking.antrea.tanzu.vmware.com
- controlplane.antrea.tanzu.vmware.com
resources:
- networkpolicies
- appliedtogroups
Expand Down Expand Up @@ -584,7 +584,7 @@ rules:
- apiregistration.k8s.io
resourceNames:
- v1beta1.system.antrea.tanzu.vmware.com
- v1beta1.networking.antrea.tanzu.vmware.com
- v1beta1.controlplane.antrea.tanzu.vmware.com
resources:
- apiservices
verbs:
Expand Down Expand Up @@ -923,9 +923,9 @@ kind: APIService
metadata:
labels:
app: antrea
name: v1beta1.networking.antrea.tanzu.vmware.com
name: v1beta1.controlplane.antrea.tanzu.vmware.com
spec:
group: networking.antrea.tanzu.vmware.com
group: controlplane.antrea.tanzu.vmware.com
groupPriorityMinimum: 100
service:
name: antrea
Expand Down
10 changes: 5 additions & 5 deletions build/yamls/antrea-eks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ metadata:
name: antctl
rules:
- apiGroups:
- networking.antrea.tanzu.vmware.com
- controlplane.antrea.tanzu.vmware.com
resources:
- networkpolicies
- appliedtogroups
Expand Down Expand Up @@ -453,7 +453,7 @@ rules:
- update
- delete
- apiGroups:
- networking.antrea.tanzu.vmware.com
- controlplane.antrea.tanzu.vmware.com
resources:
- networkpolicies
- appliedtogroups
Expand Down Expand Up @@ -584,7 +584,7 @@ rules:
- apiregistration.k8s.io
resourceNames:
- v1beta1.system.antrea.tanzu.vmware.com
- v1beta1.networking.antrea.tanzu.vmware.com
- v1beta1.controlplane.antrea.tanzu.vmware.com
resources:
- apiservices
verbs:
Expand Down Expand Up @@ -923,9 +923,9 @@ kind: APIService
metadata:
labels:
app: antrea
name: v1beta1.networking.antrea.tanzu.vmware.com
name: v1beta1.controlplane.antrea.tanzu.vmware.com
spec:
group: networking.antrea.tanzu.vmware.com
group: controlplane.antrea.tanzu.vmware.com
groupPriorityMinimum: 100
service:
name: antrea
Expand Down
10 changes: 5 additions & 5 deletions build/yamls/antrea-gke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ metadata:
name: antctl
rules:
- apiGroups:
- networking.antrea.tanzu.vmware.com
- controlplane.antrea.tanzu.vmware.com
resources:
- networkpolicies
- appliedtogroups
Expand Down Expand Up @@ -453,7 +453,7 @@ rules:
- update
- delete
- apiGroups:
- networking.antrea.tanzu.vmware.com
- controlplane.antrea.tanzu.vmware.com
resources:
- networkpolicies
- appliedtogroups
Expand Down Expand Up @@ -584,7 +584,7 @@ rules:
- apiregistration.k8s.io
resourceNames:
- v1beta1.system.antrea.tanzu.vmware.com
- v1beta1.networking.antrea.tanzu.vmware.com
- v1beta1.controlplane.antrea.tanzu.vmware.com
resources:
- apiservices
verbs:
Expand Down Expand Up @@ -923,9 +923,9 @@ kind: APIService
metadata:
labels:
app: antrea
name: v1beta1.networking.antrea.tanzu.vmware.com
name: v1beta1.controlplane.antrea.tanzu.vmware.com
spec:
group: networking.antrea.tanzu.vmware.com
group: controlplane.antrea.tanzu.vmware.com
groupPriorityMinimum: 100
service:
name: antrea
Expand Down
10 changes: 5 additions & 5 deletions build/yamls/antrea-ipsec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ metadata:
name: antctl
rules:
- apiGroups:
- networking.antrea.tanzu.vmware.com
- controlplane.antrea.tanzu.vmware.com
resources:
- networkpolicies
- appliedtogroups
Expand Down Expand Up @@ -453,7 +453,7 @@ rules:
- update
- delete
- apiGroups:
- networking.antrea.tanzu.vmware.com
- controlplane.antrea.tanzu.vmware.com
resources:
- networkpolicies
- appliedtogroups
Expand Down Expand Up @@ -584,7 +584,7 @@ rules:
- apiregistration.k8s.io
resourceNames:
- v1beta1.system.antrea.tanzu.vmware.com
- v1beta1.networking.antrea.tanzu.vmware.com
- v1beta1.controlplane.antrea.tanzu.vmware.com
resources:
- apiservices
verbs:
Expand Down Expand Up @@ -932,9 +932,9 @@ kind: APIService
metadata:
labels:
app: antrea
name: v1beta1.networking.antrea.tanzu.vmware.com
name: v1beta1.controlplane.antrea.tanzu.vmware.com
spec:
group: networking.antrea.tanzu.vmware.com
group: controlplane.antrea.tanzu.vmware.com
groupPriorityMinimum: 100
service:
name: antrea
Expand Down
10 changes: 5 additions & 5 deletions build/yamls/antrea.yml
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ metadata:
name: antctl
rules:
- apiGroups:
- networking.antrea.tanzu.vmware.com
- controlplane.antrea.tanzu.vmware.com
resources:
- networkpolicies
- appliedtogroups
Expand Down Expand Up @@ -453,7 +453,7 @@ rules:
- update
- delete
- apiGroups:
- networking.antrea.tanzu.vmware.com
- controlplane.antrea.tanzu.vmware.com
resources:
- networkpolicies
- appliedtogroups
Expand Down Expand Up @@ -584,7 +584,7 @@ rules:
- apiregistration.k8s.io
resourceNames:
- v1beta1.system.antrea.tanzu.vmware.com
- v1beta1.networking.antrea.tanzu.vmware.com
- v1beta1.controlplane.antrea.tanzu.vmware.com
resources:
- apiservices
verbs:
Expand Down Expand Up @@ -923,9 +923,9 @@ kind: APIService
metadata:
labels:
app: antrea
name: v1beta1.networking.antrea.tanzu.vmware.com
name: v1beta1.controlplane.antrea.tanzu.vmware.com
spec:
group: networking.antrea.tanzu.vmware.com
group: controlplane.antrea.tanzu.vmware.com
groupPriorityMinimum: 100
service:
name: antrea
Expand Down
2 changes: 1 addition & 1 deletion build/yamls/base/agent-rbac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ rules:
- update
- delete
- apiGroups:
- networking.antrea.tanzu.vmware.com
- controlplane.antrea.tanzu.vmware.com
resources:
- networkpolicies
- appliedtogroups
Expand Down
2 changes: 1 addition & 1 deletion build/yamls/base/agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ spec:
subPath: cni
# We need to mount both the /proc directory and the /var/run/netns directory so that
# antrea-agent can open the network namespace path when setting up Pod
# networking. Different container runtimes may use /proc or /var/run/netns when invoking
# controlplane. Different container runtimes may use /proc or /var/run/netns when invoking
# the CNI commands. Docker uses /proc and containerd uses /var/run/netns.
- name: host-var-log-antrea
mountPath: /var/log/antrea
Expand Down
2 changes: 1 addition & 1 deletion build/yamls/base/antctl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ metadata:
name: antctl
rules:
- apiGroups:
- networking.antrea.tanzu.vmware.com
- controlplane.antrea.tanzu.vmware.com
resources:
- networkpolicies
- appliedtogroups
Expand Down
2 changes: 1 addition & 1 deletion build/yamls/base/controller-rbac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ rules:
- apiservices
resourceNames:
- v1beta1.system.antrea.tanzu.vmware.com
- v1beta1.networking.antrea.tanzu.vmware.com
- v1beta1.controlplane.antrea.tanzu.vmware.com
verbs:
- get
- update
Expand Down
4 changes: 2 additions & 2 deletions build/yamls/base/controller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ metadata:
apiVersion: apiregistration.k8s.io/v1
kind: APIService
metadata:
name: v1beta1.networking.antrea.tanzu.vmware.com
name: v1beta1.controlplane.antrea.tanzu.vmware.com
spec:
group: networking.antrea.tanzu.vmware.com
group: controlplane.antrea.tanzu.vmware.com
groupPriorityMinimum: 100
version: v1beta1
versionPriority: 100
Expand Down
2 changes: 1 addition & 1 deletion build/yamls/patches/np/npRbac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ rules:
- apiservices
resourceNames:
- v1beta1.system.antrea.tanzu.vmware.com
- v1beta1.networking.antrea.tanzu.vmware.com
- v1beta1.controlplane.antrea.tanzu.vmware.com
verbs:
- get
- update
Expand Down
2 changes: 1 addition & 1 deletion cmd/antrea-agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import (
"github.com/vmware-tanzu/antrea/pkg/agent/proxy"
"github.com/vmware-tanzu/antrea/pkg/agent/querier"
"github.com/vmware-tanzu/antrea/pkg/agent/route"
"github.com/vmware-tanzu/antrea/pkg/apis/networking/v1beta1"
"github.com/vmware-tanzu/antrea/pkg/apis/controlplane/v1beta1"
crdinformers "github.com/vmware-tanzu/antrea/pkg/client/informers/externalversions"
"github.com/vmware-tanzu/antrea/pkg/features"
"github.com/vmware-tanzu/antrea/pkg/k8s"
Expand Down
2 changes: 1 addition & 1 deletion docs/ovs-pipeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ how these simple ingress and egress rules map to individual flows as we describe
the relevant tables of our pipeline.

```yaml
apiVersion: networking.k8s.io/v1
apiVersion: controlplane
kind: NetworkPolicy
metadata:
name: test-network-policy
Expand Down
2 changes: 1 addition & 1 deletion docs/prometheus-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ rules:
- pods
verbs: ["get", "list", "watch"]
- apiGroups:
- networking.k8s.io
- controlplane
resources:
- ingresses
verbs: ["get", "list", "watch"]
Expand Down
2 changes: 1 addition & 1 deletion docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ the Kubernetes API and handles authentication.
# Start the proxy in the background
kubectl proxy &
# Access the antrea-controller API path
curl 127.0.0.1:8001/apis/networking.antrea.tanzu.vmware.com
curl 127.0.0.1:8001/apis/controlplane.antrea.tanzu.vmware.com
```

### Directly accessing the antrea-controller API
Expand Down
2 changes: 1 addition & 1 deletion hack/boilerplate/license_header.raw.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright YEAR Antrea Authors
Copyright 2020 Antrea Authors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
12 changes: 6 additions & 6 deletions hack/update-codegen-dockerized.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ $GOPATH/bin/client-gen \
--clientset-name versioned \
--input-base "${ANTREA_PKG}/pkg/apis/" \
--input "clusterinformation/v1beta1" \
--input "networking/v1beta1" \
--input "controlplane/v1beta1" \
--input "system/v1beta1" \
--input "security/v1alpha1" \
--input "core/v1alpha1" \
Expand All @@ -56,8 +56,8 @@ $GOPATH/bin/informer-gen \

$GOPATH/bin/deepcopy-gen \
--input-dirs "${ANTREA_PKG}/pkg/apis/clusterinformation/v1beta1" \
--input-dirs "${ANTREA_PKG}/pkg/apis/networking" \
--input-dirs "${ANTREA_PKG}/pkg/apis/networking/v1beta1" \
--input-dirs "${ANTREA_PKG}/pkg/apis/controlplane" \
--input-dirs "${ANTREA_PKG}/pkg/apis/controlplane/v1beta1" \
--input-dirs "${ANTREA_PKG}/pkg/apis/system/v1beta1" \
--input-dirs "${ANTREA_PKG}/pkg/apis/security/v1alpha1" \
--input-dirs "${ANTREA_PKG}/pkg/apis/core/v1alpha1" \
Expand All @@ -66,12 +66,12 @@ $GOPATH/bin/deepcopy-gen \
--go-header-file hack/boilerplate/license_header.go.txt

$GOPATH/bin/conversion-gen \
--input-dirs "${ANTREA_PKG}/pkg/apis/networking/v1beta1,${ANTREA_PKG}/pkg/apis/networking/" \
--input-dirs "${ANTREA_PKG}/pkg/apis/controlplane/v1beta1,${ANTREA_PKG}/pkg/apis/controlplane/" \
-O zz_generated.conversion \
--go-header-file hack/boilerplate/license_header.go.txt

$GOPATH/bin/openapi-gen \
--input-dirs "${ANTREA_PKG}/pkg/apis/networking/v1beta1" \
--input-dirs "${ANTREA_PKG}/pkg/apis/controlplane/v1beta1" \
--input-dirs "${ANTREA_PKG}/pkg/apis/clusterinformation/v1beta1" \
--input-dirs "${ANTREA_PKG}/pkg/apis/system/v1beta1" \
--input-dirs "k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/apimachinery/pkg/runtime,k8s.io/apimachinery/pkg/util/intstr" \
Expand Down Expand Up @@ -118,7 +118,7 @@ git checkout HEAD -- hack/boilerplate/license_header.raw.txt
go mod vendor
$GOPATH/bin/go-to-protobuf \
--proto-import vendor \
--packages "${ANTREA_PKG}/pkg/apis/networking/v1beta1" \
--packages "${ANTREA_PKG}/pkg/apis/controlplane/v1beta1" \
--go-header-file hack/boilerplate/license_header.go.txt
# Clean up vendor directory.
rm -rf vendor
Expand Down
2 changes: 1 addition & 1 deletion pkg/agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const (
maxRetryForRoundNumSave = 5
)

// Initializer knows how to setup host networking, OpenVSwitch, and Openflow.
// Initializer knows how to setup host controlplane, OpenVSwitch, and Openflow.
type Initializer struct {
client clientset.Interface
ovsBridgeClient ovsconfig.OVSBridgeClient
Expand Down
4 changes: 2 additions & 2 deletions pkg/agent/agent_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func (i *Initializer) prepareOVSBridge() error {
klog.Errorf("Failed to delete OVS bridge: %v", err)
}
if err := util.DeleteHNSNetwork(util.LocalHNSNetwork); err != nil {
klog.Errorf("Failed to cleanup host networking: %v", err)
klog.Errorf("Failed to cleanup host controlplane: %v", err)
}
}()
if err != nil {
Expand Down Expand Up @@ -187,7 +187,7 @@ func (i *Initializer) prepareOVSBridge() error {
}

// initHostNetworkFlows installs Openflow flows between bridge local port and uplink port to support
// host networking. These flows are only needed on windows platform.
// host controlplane. These flows are only needed on windows platform.
func (i *Initializer) initHostNetworkFlows() error {
if err := i.ofClient.InstallBridgeUplinkFlows(config.UplinkOFPort, config.BridgeOFPort); err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions pkg/agent/apiserver/handlers/addressgroup/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"encoding/json"
"net/http"

networkingv1beta1 "github.com/vmware-tanzu/antrea/pkg/apis/networking/v1beta1"
cpv1beta1 "github.com/vmware-tanzu/antrea/pkg/apis/controlplane/v1beta1"
"github.com/vmware-tanzu/antrea/pkg/querier"
)

Expand All @@ -42,7 +42,7 @@ func HandleFunc(npq querier.AgentNetworkPolicyInfoQuerier) http.HandlerFunc {
return
}
} else {
obj = networkingv1beta1.AddressGroupList{Items: groups}
obj = cpv1beta1.AddressGroupList{Items: groups}
}
if err := json.NewEncoder(w).Encode(obj); err != nil {
http.Error(w, "Failed to encode response: "+err.Error(), http.StatusInternalServerError)
Expand Down
Loading

0 comments on commit c676682

Please sign in to comment.