Commit 4749b73
committed
Initial listener-operator implementation (#1)
This implements the basic concept, but is sitll missing a fair bit of documentation. The CRDs should also be moved into operator-rs since some operators will depend on them.
Essentially, this provides two new CRDs and a CSI driver:
```yaml
---
apiVersion: lb.stackable.tech/v1alpha1
kind: LoadBalancer
metadata:
name: example-public-lb
namespace: default
spec:
className: public
podSelector:
statefulset.kubernetes.io/pod-name: example-public-pod
ports:
- name: http
port: 80
protocol: TCP
status:
ingressAddresses:
- address: 172.18.0.3
ports:
http: 80
---
apiVersion: lb.stackable.tech/v1alpha1
kind: LoadBalancerClass
metadata:
name: public
spec:
serviceType: LoadBalancer
```
`LoadBalancerClass` defines the policy for how a specific "kind of service" (for example: public with dynamic discovery, vpc-internal with static discovery) should be deployed on a given network. `LoadBalancer` then links deploys a `Service` (or potentially something else in the future, where relevant) according to these rules, and gives back (via the `status`) a list of addresses that can be used to access the service, including whatever port remappings may be required.
The CSI driver can also be used to project this address information into the pod itself:
```yaml
---
apiVersion: v1
kind: Pod
metadata:
name: example-public-pod
spec:
volumes:
- name: lb
ephemeral:
volumeClaimTemplate:
metadata:
annotations:
lb.stackable.tech/lb-name: example-public-lb
spec:
storageClassName: lb.stackable.tech
accessModes:
- ReadWriteMany
resources:
requests:
storage: "1"
containers:
- name: nginx
image: nginx
volumeMounts:
- name: lb
mountPath: /lb
```
The CSI driver can also be configured to automatically create a LB based on the `Pod`'s settings:
```yaml
---
apiVersion: v1
kind: Pod
metadata:
name: example-public-pod
spec:
volumes:
- name: lb
ephemeral:
volumeClaimTemplate:
metadata:
annotations:
lb.stackable.tech/lb-class: public
spec:
storageClassName: lb.stackable.tech
accessModes:
- ReadWriteMany
resources:
requests:
storage: "1"
containers:
- name: nginx
image: nginx
volumeMounts:
- name: lb
mountPath: /lb
ports:
- name: http
containerPort: 80
```
Finally, the CSI driver also configures stickiness when used with persistent PVCs (such as manually provisioned ones, or ones created via `StatefulSet.spec.volumeClaimTemplates`), if it would be useful for the given `LoadBalancerClass`.1 parent 6c72318 commit 4749b73
99 files changed
Lines changed: 7352 additions & 0 deletions
File tree
- .github
- ISSUE_TEMPLATE
- workflows
- deploy
- helm
- listener-operator
- crds
- templates
- manifests
- docker
- docs
- modules/ROOT
- examples
- pages
- examples
- nix
- python
- rust
- csi-grpc
- src
- vendor
- operator-binary
- src
- csi_server
- scripts
- tests
- ansible
- templates
- kuttl/smoke-nodeport
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
0 commit comments