Skip to content

Commit

Permalink
git merged prod/1.19.x
Browse files Browse the repository at this point in the history
  • Loading branch information
zmberg committed Aug 27, 2020
2 parents 404683c + 2422b9d commit 524dcb9
Show file tree
Hide file tree
Showing 514 changed files with 42,666 additions and 7,135 deletions.
27 changes: 13 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ PACKAGEPATH=./build/bcs.${VERSION}
EXPORTPATH=./build/api_export

# options
default:api health client storage check executor mesos-driver mesos-watch scheduler loadbalance metricservice metriccollector exporter k8s-watch kube-agent k8s-driver api-export netservice sd-prometheus process-executor process-daemon bmsf-mesos-adapter hpacontroller kube-sche consoleproxy clb-controller gw-controller logbeat-sidecar csi-cbs bcs-webhook-server gamestatefulset network detection cpuset bcs-networkpolicy tools gateway user-manager egress-controller cc-agent bkcmdb-synchronizer
default:api health client storage check executor mesos-driver mesos-watch scheduler loadbalance metricservice metriccollector exporter k8s-watch kube-agent k8s-driver api-export netservice sd-prometheus process-executor process-daemon bmsf-mesos-adapter hpacontroller kube-sche consoleproxy clb-controller gw-controller logbeat-sidecar csi-cbs bcs-webhook-server gamestatefulset network detection cpuset bcs-networkpolicy tools gateway user-manager egress-controller cc-agent bkcmdb-synchronizer bcs-cloud-netservice bcs-cloud-netcontroller bcs-cloud-netagent
k8s:api client storage k8s-watch kube-agent k8s-driver csi-cbs kube-sche gamestatefulset
mesos:api client storage dns mesos-driver mesos-watch scheduler loadbalance netservice hpacontroller consoleproxy clb-controller

Expand Down Expand Up @@ -254,10 +254,7 @@ bmsf-mesos-adapter:pre
go build ${LDFLAG} -o ${PACKAGEPATH}/bcs-mesos-master/bmsf-mesos-adapter/bmsf-mesos-adapter ./bmsf-mesh/bmsf-mesos-adapter/main.go

network:pre
mkdir -p ${PACKAGEPATH}/bcs-mesos-node/bcs-cni/bin
mkdir -p ${PACKAGEPATH}/bcs-mesos-node/bcs-cni/conf
cp ./install/conf/bcs-mesos-node/qcloud-eip/* ${PACKAGEPATH}/bcs-mesos-node/bcs-cni/conf
go build ${LDFLAG} -o ${PACKAGEPATH}/bcs-mesos-node/bcs-cni/bin/qcloud-eip ./bcs-services/bcs-network/qcloud-eip/main.go
cd ./bcs-network && make network && cd -

clb-controller:pre
mkdir -p ${PACKAGEPATH}/bcs-services/bcs-clb-controller
Expand Down Expand Up @@ -286,16 +283,10 @@ tools:
go build ${LDFLAG} -o ${PACKAGEPATH}/bcs-services/cryptools ./install/cryptool/main.go

bcs-networkpolicy:pre
mkdir -p ${PACKAGEPATH}/bcs-services/bcs-networkpolicy
cp -R ./install/conf/bcs-services/bcs-networkpolicy ${PACKAGEPATH}/bcs-services
go build ${LDFLAG} -o ${PACKAGEPATH}/bcs-services/bcs-networkpolicy/bcs-networkpolicy ./bcs-services/bcs-networkpolicy/main.go
cd ./bcs-network && make networkpolicy && cd -

bcs-cloud-network-agent:pre
mkdir -p ${PACKAGEPATH}/bcs-services/bcs-cloud-network-agent
cp -R ./install/conf/bcs-services/bcs-cloud-network-agent ${PACKAGEPATH}/bcs-services
go build ${LDFLAG} -o ${PACKAGEPATH}/bcs-services/bcs-cloud-network-agent/bcs-cloud-network-agent ./bcs-services/bcs-network/bcs-cloudnetwork/cloud-network-agent/main.go
go build ${LDFLAG} -o ${PACKAGEPATH}/bcs-mesos-node/bcs-cni/bin/bcs-eni ./bcs-services/bcs-network/bcs-cloudnetwork/bcs-eni-cni/main.go
cp ${PACKAGEPATH}/bcs-mesos-node/bcs-cni/bin/bcs-eni ${PACKAGEPATH}/bcs-services/bcs-cloud-network-agent/bcs-eni
cd ./bcs-network && make bcs-cloud-network-agent && cd -

user-manager:pre
mkdir -p ${PACKAGEPATH}/bcs-services/bcs-user-manager
Expand All @@ -307,7 +298,15 @@ cc-agent:pre
cp -R ./install/conf/bcs-k8s-master/bcs-cc-agent ${PACKAGEPATH}/bcs-k8s-master
go build ${LDFLAG} -o ${PACKAGEPATH}/bcs-k8s-master/bcs-cc-agent/bcs-cc-agent ./bcs-k8s/bcs-cc-agent/main.go

bkcmdb-synchronizer:
bkcmdb-synchronizer:pre
mkdir -p ${PACKAGEPATH}/bcs-services/bcs-bkcmdb-synchronizer
go build ${LDFLAG} -o ${PACKAGEPATH}/bcs-services/bcs-bkcmdb-synchronizer/bcs-bkcmdb-synchronizer ./bcs-services/bcs-bkcmdb-synchronizer/main.go

bcs-cloud-netservice:pre
cd ./bcs-network && make cloud-netservice && cd -

bcs-cloud-netcontroller:pre
cd ./bcs-network && make cloud-netcontroller && cd -

bcs-cloud-netagent:pre
cd ./bcs-network && make cloud-netagent && cd -
8 changes: 8 additions & 0 deletions bcs-k8s/kubernetes/PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,13 @@ resources:
version: v1
- group: monitor
kind: ServiceMonitor
- group: cloud
kind: CloudSubnet
version: v1
- group: cloud
kind: CloudIP
version: v1
- group: networkextension
kind: Ingress
version: v1
version: "2"
77 changes: 77 additions & 0 deletions bcs-k8s/kubernetes/apis/cloud/v1/cloudip_types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
/*
* Tencent is pleased to support the open source community by making Blueking Container Service available.
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package v1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// CloudIPSpec defines the desired state of CloudIP
type CloudIPSpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "make" to regenerate code after modifying this file
Address string `json:"address"`
VpcID string `json:"vpcID"`
Region string `json:"region"`
SubnetID string `json:"subnetID"`
SubnetCidr string `json:"subnetCidr"`
Cluster string `json:"cluster"`
Namespace string `json:"namespace"`
PodName string `json:"podName"`
WorkloadName string `json:"workloadName"`
WorkloadKind string `json:"workloadKind"`
ContainerID string `json:"containerID"`
Host string `json:"host"`
EniID string `json:"eniID"`
IsFixed bool `json:"isFixed"`
}

// CloudIPStatus defines the observed state of CloudIP
type CloudIPStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "make" to regenerate code after modifying this file
Status string `json:"status"`
CreateTime string `json:"createTime"`
UpdateTime string `json:"updateTime"`
}

// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:object:root=true

// CloudIP is the Schema for the cloudips API
type CloudIP struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec CloudIPSpec `json:"spec,omitempty"`
Status CloudIPStatus `json:"status,omitempty"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:object:root=true

// CloudIPList contains a list of CloudIP
type CloudIPList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []CloudIP `json:"items"`
}

func init() {
SchemeBuilder.Register(&CloudIP{}, &CloudIPList{})
}
71 changes: 71 additions & 0 deletions bcs-k8s/kubernetes/apis/cloud/v1/cloudsubnet_types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/*
* Tencent is pleased to support the open source community by making Blueking Container Service available.
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package v1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// CloudSubnetSpec defines the desired state of CloudSubnet
type CloudSubnetSpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "make" to regenerate code after modifying this file

// Foo is an example field of CloudSubnet. Edit CloudSubnet_types.go to remove/update
SubnetID string `json:"subnetID"`
SubnetCidr string `json:"SubnetCidr"`
VpcID string `json:"vpcID"`
Region string `json:"region"`
Zone string `json:"zone"`
}

// CloudSubnetStatus defines the observed state of CloudSubnet
type CloudSubnetStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "make" to regenerate code after modifying this file
AvailableIPNum int64 `json:"availableIPNum"`
State int32 `json:"state"`
CreateTime string `json:"createTime"`
UpdateTime string `json:"updateTime"`
}

// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:object:root=true

// CloudSubnet is the Schema for the cloudsubnets API
type CloudSubnet struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec CloudSubnetSpec `json:"spec,omitempty"`
Status CloudSubnetStatus `json:"status,omitempty"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:object:root=true

// CloudSubnetList contains a list of CloudSubnet
type CloudSubnetList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []CloudSubnet `json:"items"`
}

func init() {
SchemeBuilder.Register(&CloudSubnet{}, &CloudSubnetList{})
}
9 changes: 9 additions & 0 deletions bcs-k8s/kubernetes/apis/cloud/v1/groupversion_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,12 @@ var (
// AddToScheme adds the types in this group-version to the given scheme.
AddToScheme = SchemeBuilder.AddToScheme
)

var (
SchemeGroupVersion = GroupVersion
)

// Resource is required by pkg/client/listers/...
func Resource(resource string) schema.GroupResource {
return SchemeGroupVersion.WithResource(resource).GroupResource()
}
35 changes: 23 additions & 12 deletions bcs-k8s/kubernetes/apis/cloud/v1/nodenetwork_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ import (
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

const (
// NodeNetworkStatusNotReady node network created, but not effects on node
NodeNetworkStatusNotReady = "NotReady"
// NodeNetworkStatusReady node network created and effects on node
NodeNetworkStatusReady = "Ready"
)

// IPAddress data for ip address
type IPAddress struct {
IP string `json:"ip"`
Expand All @@ -32,7 +39,7 @@ type IPAddress struct {
type NetworkInterfaceAttachment struct {
Index int `json:"index,omitempty"`
// for aws
AttachmentID string `json:"attachmentId,omitempty"`
AttachmentID string `json:"attachmentID,omitempty"`
// for tencent cloud
EniID string `json:"eniID,omitempty"`
InstanceID string `json:"instanceId"`
Expand All @@ -41,32 +48,35 @@ type NetworkInterfaceAttachment struct {
// ElasticNetworkInterface status for elastic network interface
type ElasticNetworkInterface struct {
Index int `json:"index"`
EniID string `json:"eniId"`
RouteTableID int `json:"routeTableId"`
EniID string `json:"eniID"`
RouteTableID int `json:"routeTableID"`
EniName string `json:"eniName,omitempty"`
EniIfaceName string `json:"eniIfaceName"`
EniSubnetID string `json:"eniSubnetId"`
EniSubnetID string `json:"eniSubnetID"`
EniSubnetCidr string `json:"eniSubnetCidr"`
MacAddress string `json:"macAddress"`
Attachment *NetworkInterfaceAttachment `json:"attachment"`
IPNum int `json:"ipNum"`
Address *IPAddress `json:"address"`
SecondaryAddresses []*IPAddress `json:"secondaryAddresses"`
SecondaryAddresses []*IPAddress `json:"secondaryAddresses,omitempty"`
}

// FloatingIPNetworkInterface status for elastic network interface used to bind floating ip
type FloatingIPNetworkInterface struct {
ElasticNetworkInterface `json:",inline"`
IPLimit int `json:"ipLimit"`
Eni *ElasticNetworkInterface `json:"eni"`
IPLimit int `json:"ipLimit"`
}

// VMInfo vm info
type VMInfo struct {
NodeRegionID string `json:"regionId"`
NodeVpcID string `json:"vpcId"`
NodeSubnetID string `json:"subnetId"`
InstanceID string `json:"instanceId"`
NodeZone string `json:"zone"`
NodeRegion string `json:"region"`
NodeVpcID string `json:"vpcID"`
NodeSubnetID string `json:"subnetID"`
InstanceID string `json:"instanceID"`
InstanceIP string `json:"instanceIP"`
CoreNum int `json:"coreNum"`
MemNum int `json:"memNum"`
}

// NodeNetworkSpec defines the desired state of NodeNetwork
Expand All @@ -85,8 +95,9 @@ type NodeNetworkSpec struct {
type NodeNetworkStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "make" to regenerate code after modifying this file
Enis []*ElasticNetworkInterface `json:"enis"`
Enis []*ElasticNetworkInterface `json:"enis,omitempty"`
FloatingIPEni *FloatingIPNetworkInterface `json:"floatingIPEni"`
Status string `json:"status"`
}

// +genclient
Expand Down
Loading

0 comments on commit 524dcb9

Please sign in to comment.