Skip to content

Commit a9f28b6

Browse files
authored
Merge pull request #46 from lubronzhan/change_sts
Change kvcp from statefulset to deployment
2 parents 57e07c3 + 0c134f5 commit a9f28b6

File tree

2 files changed

+30
-10
lines changed

2 files changed

+30
-10
lines changed

README.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# kube-vip-cloud-provider
22

3-
The [Kube-Vip](https://kube-vip.io) cloud provider is a general purpose cloud-provider for on-prem bare-metal or virtualised environments. It's designed to work with the [kube-vip](https://kube-vip.io) project however if a load-balancer solution follows the [Kubernetes](https://kubernetes.io) conventions then this cloud-provider will provide IP addresses that another solution can advertise.
3+
The [Kube-Vip](https://kube-vip.io) cloud provider is a general purpose cloud-provider for on-prem bare-metal or virtualised environments. It's designed to work with the [kube-vip](https://kube-vip.io) project however if a load-balancer solution follows the [Kubernetes](https://kubernetes.io) conventions then this cloud-provider will provide IP addresses that another solution can advertise.
44

55
## Architecture
66

@@ -23,17 +23,19 @@ We can apply the controller manifest directly from this repository to get the la
2323
$ kubectl apply -f https://raw.githubusercontent.com/kube-vip/kube-vip-cloud-provider/main/manifest/kube-vip-cloud-controller.yaml
2424
```
2525

26-
It uses a `statefulSet` and can always be viewed with the following command:
26+
It uses a `Deployment` and can always be viewed with the following command:
2727

2828
```
29-
kubectl describe pods -n kube-system kube-vip-cloud-provider-0
29+
kubectl describe deployment/kube-vip-cloud-provider -n kube-system
30+
POD_NAME=$(kubectl get po -n kube-system | grep kube-vip-cloud-provider | cut -d' ' -f1)
31+
kubectl describe pod/$POD_NAME -n kube-system
3032
```
3133

3234
## Global and namespace pools
3335

3436
### Global pool
3537

36-
Any service in any namespace will take an address from the global pool `cidr/range`-global.
38+
Any service in any namespace will take an address from the global pool `cidr/range`-global.
3739

3840
### Namespace pool
3941

manifest/kube-vip-cloud-controller.yaml

+24-6
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,22 @@ subjects:
3535
namespace: kube-system
3636
---
3737
apiVersion: apps/v1
38-
kind: StatefulSet
38+
kind: Deployment
3939
metadata:
4040
name: kube-vip-cloud-provider
4141
namespace: kube-system
4242
spec:
43-
serviceName: kube-vip-cloud-provider
44-
podManagementPolicy: OrderedReady
4543
replicas: 1
4644
revisionHistoryLimit: 10
4745
selector:
4846
matchLabels:
4947
app: kube-vip
5048
component: kube-vip-cloud-provider
49+
strategy:
50+
rollingUpdate:
51+
maxSurge: 25%
52+
maxUnavailable: 25%
53+
type: RollingUpdate
5154
template:
5255
metadata:
5356
labels:
@@ -61,10 +64,25 @@ spec:
6164
image: ghcr.io/kube-vip/kube-vip-cloud-provider:v0.0.3
6265
name: kube-vip-cloud-provider
6366
imagePullPolicy: Always
64-
resources: {}
6567
dnsPolicy: ClusterFirst
6668
restartPolicy: Always
67-
schedulerName: default-scheduler
68-
securityContext: {}
6969
terminationGracePeriodSeconds: 30
7070
serviceAccountName: kube-vip-cloud-controller
71+
tolerations:
72+
- key: node-role.kubernetes.io/master
73+
effect: NoSchedule
74+
- key: node-role.kubernetes.io/control-plane
75+
effect: NoSchedule
76+
affinity:
77+
nodeAffinity:
78+
preferredDuringSchedulingIgnoredDuringExecution:
79+
- weight: 10
80+
preference:
81+
matchExpressions:
82+
- key: node-role.kubernetes.io/control-plane
83+
operator: Exists
84+
- weight: 10
85+
preference:
86+
matchExpressions:
87+
- key: node-role.kubernetes.io/master
88+
operator: Exists

0 commit comments

Comments
 (0)