Documentation ¶
Overview ¶
* Tencent is pleased to support the open source community by making TKEStack available. * * Copyright (C) 2012-2019 Tencent. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use * this file except in compliance with the License. You may obtain a copy of the * License at * * https://opensource.org/licenses/Apache-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License.
* Tencent is pleased to support the open source community by making TKEStack available. * * Copyright (C) 2012-2019 Tencent. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use * this file except in compliance with the License. You may obtain a copy of the * License at * * https://opensource.org/licenses/Apache-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License.
* Tencent is pleased to support the open source community by making TKEStack available. * * Copyright (C) 2012-2019 Tencent. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use * this file except in compliance with the License. You may obtain a copy of the * License at * * https://opensource.org/licenses/Apache-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License.
* Tencent is pleased to support the open source community by making TKEStack available. * * Copyright (C) 2012-2019 Tencent. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use * this file except in compliance with the License. You may obtain a copy of the * License at * * https://opensource.org/licenses/Apache-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License.
* Tencent is pleased to support the open source community by making TKEStack available. * * Copyright (C) 2012-2019 Tencent. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use * this file except in compliance with the License. You may obtain a copy of the * License at * * https://opensource.org/licenses/Apache-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License.
* Tencent is pleased to support the open source community by making TKEStack available. * * Copyright (C) 2012-2019 Tencent. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use * this file except in compliance with the License. You may obtain a copy of the * License at * * https://opensource.org/licenses/Apache-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License.
* Tencent is pleased to support the open source community by making TKEStack available. * * Copyright (C) 2012-2019 Tencent. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use * this file except in compliance with the License. You may obtain a copy of the * License at * * https://opensource.org/licenses/Apache-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License.
* Tencent is pleased to support the open source community by making TKEStack available. * * Copyright (C) 2012-2019 Tencent. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use * this file except in compliance with the License. You may obtain a copy of the * License at * * https://opensource.org/licenses/Apache-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License.
* Tencent is pleased to support the open source community by making TKEStack available. * * Copyright (C) 2012-2019 Tencent. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use * this file except in compliance with the License. You may obtain a copy of the * License at * * https://opensource.org/licenses/Apache-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License.
* Tencent is pleased to support the open source community by making TKEStack available. * * Copyright (C) 2012-2019 Tencent. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use * this file except in compliance with the License. You may obtain a copy of the * License at * * https://opensource.org/licenses/Apache-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License.
* Tencent is pleased to support the open source community by making TKEStack available. * * Copyright (C) 2012-2019 Tencent. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use * this file except in compliance with the License. You may obtain a copy of the * License at * * https://opensource.org/licenses/Apache-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License.
Index ¶
- Variables
- type Conf
- type CrdKey
- type FloatingIPPlugin
- func (p *FloatingIPPlugin) AddPod(pod *corev1.Pod) error
- func (p *FloatingIPPlugin) Bind(args *schedulerapi.ExtenderBindingArgs) error
- func (p *FloatingIPPlugin) DeletePod(pod *corev1.Pod) error
- func (p *FloatingIPPlugin) Filter(pod *corev1.Pod, nodes []corev1.Node) ([]corev1.Node, schedulerapi.FailedNodesMap, error)
- func (p *FloatingIPPlugin) GetIpam() floatingip.IPAM
- func (p *FloatingIPPlugin) Init() error
- func (p *FloatingIPPlugin) LockDpPool(poolName string) func()
- func (p *FloatingIPPlugin) Prioritize(pod *corev1.Pod, nodes []corev1.Node) (*schedulerapi.HostPriorityList, error)
- func (p *FloatingIPPlugin) Release(r *ReleaseRequest) error
- func (p *FloatingIPPlugin) Run(stop chan struct{})
- func (p *FloatingIPPlugin) UpdatePod(oldPod, newPod *corev1.Pod) error
- type NotSupportedReleasePolicyError
- type ReleaseRequest
Constants ¶
This section is empty.
Variables ¶
var ( NoReplicas = NotSupportedReleasePolicyError(errors.New("parent workload has no replicas")) NotStatefulWorkload = NotSupportedReleasePolicyError( errors.New("pod name doesn't match '.*-[0-9]*$', assume its parent is not a stateful workload")) )
Functions ¶
This section is empty.
Types ¶
type Conf ¶
type Conf struct { FloatingIPs []*floatingip.FloatingIPPool `json:"floatingips,omitempty"` ResyncInterval uint `json:"resyncInterval"` ConfigMapName string `json:"configMapName"` ConfigMapNamespace string `json:"configMapNamespace"` FloatingIPKey string `json:"floatingipKey"` // configmap floatingip data key CloudProviderGRPCAddr string `json:"cloudProviderGrpcAddr"` }
type CrdKey ¶
type CrdKey interface { // GetGroupVersionResource returns the schema.GroupVersionResource for the stored app key prefix GetGroupVersionResource(appPrefix string) *schema.GroupVersionResource }
CrdKey stores schema.GroupVersionResource for each crd workloads and offers query funcs to get schema.GroupVersionResource of a appPrefix
func NewCrdKey ¶
func NewCrdKey(extensionLister extensionlister.CustomResourceDefinitionLister) CrdKey
NewCrdKey creates a CrdKey
type FloatingIPPlugin ¶
type FloatingIPPlugin struct { *context.IPAMContext // contains filtered or unexported fields }
FloatingIPPlugin Allocates Floating IP for deployments
func NewFloatingIPPlugin ¶
func NewFloatingIPPlugin(conf Conf, ctx *context.IPAMContext) (*FloatingIPPlugin, error)
NewFloatingIPPlugin creates FloatingIPPlugin
func (*FloatingIPPlugin) AddPod ¶
func (p *FloatingIPPlugin) AddPod(pod *corev1.Pod) error
AddPod does nothing
func (*FloatingIPPlugin) Bind ¶
func (p *FloatingIPPlugin) Bind(args *schedulerapi.ExtenderBindingArgs) error
Bind binds a new floatingip or reuse an old one to pod
func (*FloatingIPPlugin) DeletePod ¶
func (p *FloatingIPPlugin) DeletePod(pod *corev1.Pod) error
DeletePod unbinds pod from ipam
func (*FloatingIPPlugin) Filter ¶
func (p *FloatingIPPlugin) Filter(pod *corev1.Pod, nodes []corev1.Node) ([]corev1.Node, schedulerapi.FailedNodesMap, error)
Filter marks nodes which have no available ips as FailedNodes If the given pod doesn't want floating IP, none failedNodes returns
func (*FloatingIPPlugin) GetIpam ¶
func (p *FloatingIPPlugin) GetIpam() floatingip.IPAM
func (*FloatingIPPlugin) Init ¶
func (p *FloatingIPPlugin) Init() error
Init retrieves floatingips from json config or config map and calls ipam to update
func (*FloatingIPPlugin) LockDpPool ¶
func (p *FloatingIPPlugin) LockDpPool(poolName string) func()
func (*FloatingIPPlugin) Prioritize ¶
func (p *FloatingIPPlugin) Prioritize(pod *corev1.Pod, nodes []corev1.Node) (*schedulerapi.HostPriorityList, error)
Prioritize can score each node, currently it does nothing
func (*FloatingIPPlugin) Release ¶
func (p *FloatingIPPlugin) Release(r *ReleaseRequest) error
func (*FloatingIPPlugin) Run ¶
func (p *FloatingIPPlugin) Run(stop chan struct{})
Run starts resyncing pod routine
type NotSupportedReleasePolicyError ¶
type NotSupportedReleasePolicyError error
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
* Tencent is pleased to support the open source community by making TKEStack available.
|
* Tencent is pleased to support the open source community by making TKEStack available. |
* Tencent is pleased to support the open source community by making TKEStack available.
|
* Tencent is pleased to support the open source community by making TKEStack available. |