Skip to content

Commit 4b2b3aa

Browse files
authored
Merge pull request #93 from nginxinc/rename-to-nginx-loadbalancer-kubernetes
Update for repo rename
2 parents c02153e + 5580a95 commit 4b2b3aa

28 files changed

+123
-124
lines changed

.github/pull_request_template.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Describe the use case and detail of the change. If this PR addresses an issue on
66

77
Before creating a PR, run through this checklist and mark each as complete.
88

9-
- [ ] I have read the [`CONTRIBUTING`](https://github.com/nginxinc/nginx-k8s-loadbalancer/blob/main/CONTRIBUTING.md) document
9+
- [ ] I have read the [`CONTRIBUTING`](https://github.com/nginxinc/nginx-loadbalancer-kubernetes/blob/main/CONTRIBUTING.md) document
1010
- [ ] If applicable, I have added tests that prove my fix is effective or that my feature works
1111
- [ ] If applicable, I have checked that any relevant tests pass after adding my changes
12-
- [ ] I have updated any relevant documentation ([`README.md`](https://github.com/nginxinc/nginx-k8s-loadbalancer/blob/main/README.md) and [`CHANGELOG.md`](https://github.com/nginxinc/nginx-k8s-loadbalancer/blob/main/CHANGELOG.md))
12+
- [ ] I have updated any relevant documentation ([`README.md`](https://github.com/nginxinc/nginx-loadbalancer-kubernetes/blob/main/README.md) and [`CHANGELOG.md`](https://github.com/nginxinc/nginx-loadbalancer-kubernetes/blob/main/CHANGELOG.md))

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ The following is a set of guidelines for contributing to the nginx_k8s_loadbalan
1010

1111
[Code Guidelines](#code-guidelines)
1212

13-
[Code of Conduct](https://github.com/nginxinc/nginx-k8s-loadbalancer/blob/main/CODE_OF_CONDUCT.md)
13+
[Code of Conduct](https://github.com/nginxinc/nginx-loadbalancer-kubernetes/blob/main/CODE_OF_CONDUCT.md)
1414

1515
## Getting Started
1616

17-
Follow our [Installation Guide](https://github.com/nginxinc/nginx-k8s-loadbalancer/blob/main/README.md#Installation) to get the nginx_k8s_loadbalancer up and running.
17+
Follow our [Installation Guide](https://github.com/nginxinc/nginx-loadbalancer-kubernetes/blob/main/README.md#Installation) to get the nginx_k8s_loadbalancer up and running.
1818

1919
<!-- ### Project Structure (OPTIONAL) -->
2020

Dockerfile

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ RUN go mod download
1212

1313
COPY . .
1414

15-
RUN go build -o nginx-k8s-loadbalancer ./cmd/nginx-k8s-loadbalancer/main.go
15+
RUN go build -o nginx-loadbalancer-kubernetes ./cmd/nginx-loadbalancer-kubernetes/main.go
1616

1717
FROM alpine:3.16
1818

19-
WORKDIR /opt/nginx-k8s-loadbalancer
19+
WORKDIR /opt/nginx-loadbalancer-kubernetes
2020

2121
RUN adduser -u 11115 -D -H nlk
2222

2323
USER nlk
2424

25-
COPY --from=builder /app/nginx-k8s-loadbalancer .
25+
COPY --from=builder /app/nginx-loadbalancer-kubernetes .
2626

27-
ENTRYPOINT ["/opt/nginx-k8s-loadbalancer/nginx-k8s-loadbalancer"]
27+
ENTRYPOINT ["/opt/nginx-loadbalancer-kubernetes/nginx-loadbalancer-kubernetes"]

README.md

+45-45
Large diffs are not rendered by default.

cmd/nginx-k8s-loadbalancer/doc.go renamed to cmd/nginx-loadbalancer-kubernetes/doc.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
/*
7-
Package main includes the entrypoint for the nginx-k8s-loadbalancer.
7+
Package main includes the entrypoint for the nginx-loadbalancer-kubernetes.
88
*/
99

1010
package main

deployments/deployment/deployment.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ spec:
1616
app: nlk
1717
spec:
1818
containers:
19-
- name: nginx-k8s-loadbalancer
20-
image: ghcr.io/nginxinc/nginx-k8s-loadbalancer:latest
19+
- name: nginx-loadbalancer-kubernetes
20+
image: ghcr.io/nginxinc/nginx-loadbalancer-kubernetes:latest
2121
imagePullPolicy: Always
2222
ports:
2323
- name: http
@@ -35,4 +35,4 @@ spec:
3535
port: 51031
3636
initialDelaySeconds: 5
3737
periodSeconds: 2
38-
serviceAccountName: nginx-k8s-loadbalancer
38+
serviceAccountName: nginx-loadbalancer-kubernetes
+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
apiVersion: rbac.authorization.k8s.io/v1
22
kind: ClusterRoleBinding
33
metadata:
4-
name: "nginx-k8s-loadbalancer:ingress-resource-get-watch-list"
4+
name: "nginx-loadbalancer-kubernetes:resource-get-watch-list"
55
namespace: nlk
66
subjects:
77
- kind: ServiceAccount
8-
name: nginx-k8s-loadbalancer
8+
name: nginx-loadbalancer-kubernetes
99
namespace: nlk
1010
roleRef:
1111
kind: ClusterRole
12-
name: ingress-resource-get-watch-list
12+
name: resource-get-watch-list
1313
apiGroup: rbac.authorization.k8s.io

deployments/rbac/secret.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
apiVersion: v1
22
kind: Secret
33
metadata:
4-
name: nginx-k8s-loadbalancer-secret
4+
name: nginx-loadbalancer-kubernetes-secret
55
namespace: nlk
66
annotations:
7-
kubernetes.io/service-account.name: nginx-k8s-loadbalancer
7+
kubernetes.io/service-account.name: nginx-loadbalancer-kubernetes
88
type: kubernetes.io/service-account-token

deployments/rbac/serviceaccount.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: v1
22
kind: ServiceAccount
33
metadata:
4-
name: nginx-k8s-loadbalancer
4+
name: nginx-loadbalancer-kubernetes
55
namespace: nlk

docs/DESIGN.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Overview
22

3-
The nginx-k8s-loadbalancer runs in a Kubernetes Cluster and responds to changes in resources of interest, updating designated NGINX Plus hosts with the appropriate configuration.
3+
The nginx-loadbalancer-kubernetes runs in a Kubernetes Cluster and responds to changes in resources of interest, updating designated NGINX Plus hosts with the appropriate configuration.
44

55
## Basic Architecture
66

@@ -44,8 +44,8 @@ adding each `core.ServerUpdateEvent` to the "nlk-synchronizer" queue.
4444
### Translator
4545

4646
The Translator is responsible for converting the `core.Event` event into an `nginxClient.UpstreamServer` event.
47-
This involves filtering out the `core.Event` instances that are not of interest to the controller by accepting only Port names starting with the NklPrefix value (currently _nlk-_).
48-
The event is then fanned-out based on the defined Ports, one event per defined Port. Each port is then augmented with the Ingress name (the name configured in the Port definition with the NklPrefix value removed),
47+
This involves filtering out the `core.Event` instances that are not of interest to the controller by accepting only Port names starting with the NlkPrefix value (currently _nlk-_).
48+
The event is then fanned-out based on the defined Ports, one event per defined Port. Each port is then augmented with the Ingress name (the name configured in the Port definition with the NlkPrefix value removed),
4949
and the list of the Node's IP addresses.
5050

5151
The Translator passes the list of events to the Synchronizer by calling the `AddEvents` method.

docs/README.md

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# nginx-k8s-loadbalancer
1+
# nginx-loadbalancer-kubernetes
22

33
<br/>
44

55
# Welcome to the Nginx Kubernetes Load Balancer Solution!
66

77
<br/>
88

9-
![Nginx K8s LB](media/nkl-logo.png) | ![Nginx K8s LB](media/nginx-2020.png)
9+
![Nginx K8s LB](media/nlk-logo.png) | ![Nginx K8s LB](media/nginx-2020.png)
1010
--- | ---
1111

1212
<br/>
@@ -23,12 +23,12 @@ This repo contains source code and documents for a new `Kubernetes Controller fr
2323

2424
# Overview
2525

26-
- `NKL - Nginx Kubernetes Loadbalancer` is a new K8s Controller from Nginx, that monitors specified K8s Services, and then sends API calls to an external Nginx Plus server to manage Nginx Upstream servers dynamically.
26+
- `NLK - NGINX Loadbalancer for Kubernetes` is a new K8s Controller from Nginx, that monitors specified K8s Services, and then sends API calls to an external Nginx Plus server to manage Nginx Upstream servers dynamically.
2727
- This will `synchronize` the K8s Service Endpoint list, with the Nginx LB Server's upstream list.
2828
- The primary use case and Solution provided is for tracking the K8s` NodePort` IP:Port definitions for the Nginx Ingress Controller's `nginx-ingress Service`.
29-
- NKL is a native Kubernetes Controller, running, configured and managed with standard K8s commands.
30-
- NKL paired with the Nginx Plus Server located external to the K8s cluster, this new controller LB function will provide a `TCP Load Balancer Service` for On Premises K8s clusters, which do not have access to a Cloud providers "Service Type LoadBalancer".
31-
- NKL paired with the Nginx Plus Server located external to the Cluster, using Nginx's advanced HTTP features, provide an `HTTP Load Balancer Service` for Enterprise traffic management solutions, such as:
29+
- NLK is a native Kubernetes Controller, running, configured and managed with standard K8s commands.
30+
- NLK paired with the Nginx Plus Server located external to the K8s cluster, this new controller LB function will provide a `TCP Load Balancer Service` for On Premises K8s clusters, which do not have access to a Cloud providers "Service Type LoadBalancer".
31+
- NLK paired with the Nginx Plus Server located external to the Cluster, using Nginx's advanced HTTP features, provide an `HTTP Load Balancer Service` for Enterprise traffic management solutions, such as:
3232
- MultiCluster Active/Active Load Balancing
3333
- Horizontal Cluster Scaling
3434
- HTTP Split Clients - for A/B, Blue/Green, and Canary test and production traffic steering. Allows Cluster operations/maintainence like upgrades, patching, expansion and troubleshooting with no downtime or reloads
@@ -39,37 +39,37 @@ This repo contains source code and documents for a new `Kubernetes Controller fr
3939

4040
<br/>
4141

42-
## NKL Controller Software Design Overview - How it works
42+
## NLK Controller Software Design Overview - How it works
4343

44-
[NKL Controller DESIGN and Architecture](DESIGN.md)
44+
[NLK Controller DESIGN and Architecture](DESIGN.md)
4545

4646
<br/>
4747

48-
## Reference Diagram for NKL TCP Load Balancer Service
48+
## Reference Diagram for NLK TCP Load Balancer Service
4949

5050
<br/>
5151

52-
![NKL Stream Diagram](media/nkl-blog-diagram-v1.png)
52+
![NLK Stream Diagram](media/nlk-blog-diagram-v1.png)
5353

5454
<br/>
5555

5656
## Sample Screenshots of Solution at Runtime
5757

5858
<br/>
5959

60-
![NGINX LB ConfigMap](media/nkl-configmap.png)
60+
![NGINX LB ConfigMap](media/nlk-configmap.png)
6161
### ConfigMap with 2 Nginx LB Servers defined for HA
6262

6363
<br/>
6464

65-
![NGINX LB Create Nodeport](media/nkl-stream-create-nodeport.png)
66-
### Nginx LB Server Dashboard, NodePort, and NKL Controller Logging
65+
![NGINX LB Create Nodeport](media/nlk-stream-create-nodeport.png)
66+
### Nginx LB Server Dashboard, NodePort, and NLK Controller Logging
6767

6868
### Legend:
6969
- Red - kubectl nodeport commands
7070
- Blue - nodeport and upstreams for http traffic
7171
- Indigo - nodeport and upstreams for https traffic
72-
- Green - NKL log for api calls to LB Server #1
72+
- Green - NLK log for api calls to LB Server #1
7373
- Orange - Nginx LB Server upstream dashboard details
7474
- Kubernetes Worker Nodes are 10.1.1.8 and 10.1.1.10
7575

@@ -95,7 +95,7 @@ Please see the /docs folder and Installation Guides for detailed documentation.
9595

9696
## Development
9797

98-
Read the [`CONTRIBUTING.md`](https://github.com/nginxinc/nginx-k8s-loadbalancer/blob/main/CONTRIBUTING.md) file.
98+
Read the [`CONTRIBUTING.md`](https://github.com/nginxinc/nginx-loadbalancer-kubernetes/blob/main/CONTRIBUTING.md) file.
9999

100100
<br/>
101101

@@ -107,6 +107,6 @@ Read the [`CONTRIBUTING.md`](https://github.com/nginxinc/nginx-k8s-loadbalancer/
107107

108108
## License
109109

110-
[Apache License, Version 2.0](https://github.com/nginxinc/nginx-k8s-loadbalancer/blob/main/LICENSE)
110+
[Apache License, Version 2.0](https://github.com/nginxinc/nginx-loadbalancer-kubernetes/blob/main/LICENSE)
111111

112112
&copy; [F5 Networks, Inc.](https://www.f5.com/) 2023

docs/http/http-installation-guide.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ This can be any standard Linux OS system, based on the Linux Distro and Technica
242242
For easy installation/configuration, Git Clone this repository onto the Loadbalancing Server, it contains all the example files that are used here.
243243

244244
```bash
245-
https://github.com/nginxinc/nginx-k8s-loadbalancer.git
245+
https://github.com/nginxinc/nginx-loadbalancer-kubernetes.git
246246
```
247247

248248
Nginx Config Files
@@ -684,7 +684,7 @@ Use the `loadbalancer-cluster1.yaml` or `nodeport-cluster1.yaml` manifest file t
684684
From the Git Repo, reference the provided Kubernetes Config Files
685685
686686
``` bash
687-
nginx-k8s-loadbalancer/
687+
nginx-loadbalancer-kubernetes/
688688
└── docs/
689689
└── http/
690690
├── grafana-dashboard.json............ NGINX Plus Grafana dashboard

docs/http/loadbalancer-cluster1.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ spec:
2020
- port: 443
2121
targetPort: 443
2222
protocol: TCP
23-
name: nkl-cluster1-https # Must match Nginx upstream name
23+
name: nlk-cluster1-https # Must match Nginx upstream name
2424
selector:
2525
app: nginx-ingress

docs/http/loadbalancer-cluster2.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ spec:
2020
- port: 443
2121
targetPort: 443
2222
protocol: TCP
23-
name: nkl-cluster2-https # Must match Nginx upstream name
23+
name: nlk-cluster2-https # Must match Nginx upstream name
2424
selector:
2525
app: nginx-ingress

docs/tcp/tcp-installation-guide.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ https://www.nginx.com/free-trial-request/
173173
For easy installation/configuration, Git Clone this repository onto the Loadbalancing Server, it contains all the example files that are used here.
174174

175175
```bash
176-
https://github.com/nginxinc/nginx-k8s-loadbalancer.git
176+
https://github.com/nginxinc/nginx-loadbalancer-kubernetes.git
177177
```
178178

179179
<br/>
@@ -191,7 +191,7 @@ etc/
191191
```
192192

193193
``` bash
194-
nginx-k8s-loadbalancer/
194+
nginx-loadbalancer-kubernetes/
195195
└── docs/
196196
└── tcp/
197197
├── loadbalancer-nlk.yaml........ LoadBalancer manifest

go.mod

+7-5
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@ module github.com/nginxinc/kubernetes-nginx-ingress
66

77
go 1.19
88

9-
require github.com/sirupsen/logrus v1.9.0
9+
require (
10+
github.com/nginxinc/nginx-plus-go-client v0.10.0
11+
github.com/sirupsen/logrus v1.9.0
12+
k8s.io/api v0.26.0
13+
k8s.io/apimachinery v0.26.0
14+
k8s.io/client-go v0.26.0
15+
)
1016

1117
require (
1218
github.com/davecgh/go-spew v1.1.1 // indirect
@@ -26,7 +32,6 @@ require (
2632
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
2733
github.com/modern-go/reflect2 v1.0.2 // indirect
2834
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
29-
github.com/nginxinc/nginx-plus-go-client v0.10.0 // indirect
3035
golang.org/x/net v0.7.0 // indirect
3136
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect
3237
golang.org/x/sys v0.5.0 // indirect
@@ -38,9 +43,6 @@ require (
3843
gopkg.in/inf.v0 v0.9.1 // indirect
3944
gopkg.in/yaml.v2 v2.4.0 // indirect
4045
gopkg.in/yaml.v3 v3.0.1 // indirect
41-
k8s.io/api v0.26.0 // indirect
42-
k8s.io/apimachinery v0.26.0 // indirect
43-
k8s.io/client-go v0.26.0 // indirect
4446
k8s.io/klog/v2 v2.80.1 // indirect
4547
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect
4648
k8s.io/utils v0.0.0-20221107191617-1a15be271d1d // indirect

0 commit comments

Comments
 (0)