Skip to content

Commit b3c782c

Browse files
committed
[COSMETIC] Format fix
1 parent c75c616 commit b3c782c

File tree

14 files changed

+33
-31
lines changed

14 files changed

+33
-31
lines changed

.github/actions/kind-create/action.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ runs:
4646
chmod 600 $kubeconfig_path
4747
echo "kubeconfig=$(echo $kubeconfig_path)" >> $GITHUB_OUTPUT
4848
shell: bash
49-
49+
5050
- name: Install cloud-provider-kind
5151
id: cloud-provider-kind
5252
run: |
5353
echo "Install cloud-provider-kind"
5454
go install sigs.k8s.io/cloud-provider-kind@latest
55-
kubectl label node e2e-kind-control-plane node.kubernetes.io/exclude-from-external-load-balancers-
55+
kubectl label node e2e-kind-control-plane node.kubernetes.io/exclude-from-external-load-balancers-
5656
~/go/bin/cloud-provider-kind &
5757
shell: bash

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,17 @@ jobs:
6060
run: |
6161
# Build main module
6262
go build ./...
63-
63+
6464
# Build api module
6565
cd api
6666
go build ./...
6767
cd ..
68-
68+
6969
# Build properties module
7070
cd properties
7171
go build ./...
7272
cd ..
73-
73+
7474
# Build main binary
7575
go build -o bin/manager main.go
7676

.github/workflows/e2e-test.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,5 @@ jobs:
8787
# Clean any existing go.work files to avoid workspace conflicts
8888
rm -f go.work go.work.sum
8989
IMG_E2E=$REPOSITORY:$GITHUB_SHA make test-e2e
90+
91+

ADOPTERS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Adopters
22
This is a list of production adopters of Banzai Cloud's Kafka Operator (in alphabetical order):
3-
3+
44
- Adobe Experience Platform is using the Kafka Operator to enable consistent deployment, dynamic scaling, smooth upgrades and auto-balancing in our cross-cloud Kafka infrastructure. Adobe is also contributing to the open source version of the operator.
55

66
- [Banzai Cloud](https://banzaicloud.com) is using the Kafka Operator to provision, configure and manage a secure, resilient and autoscaling production ready Apache Kafka for customers.
77

8-
- AffirmedNetworks is looking to use Kafka Operator to provision, configure and manage life cycle of production ready Apache Kafka. One of the use cases we are looking at, is to use Kafka to manage Event Data/Detail Record that gets generated in our applications.
8+
- AffirmedNetworks is looking to use Kafka Operator to provision, configure and manage life cycle of production ready Apache Kafka. One of the use cases we are looking at, is to use Kafka to manage Event Data/Detail Record that gets generated in our applications.

api/assets/kafka/kraft-controller-healthcheck.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ MATCHING_METRIC=$(curl -s "$JMX_ENDPOINT" | grep "^${METRIC_PREFIX}" | awk '$2 =
3333

3434
# If it's not empty, it means we found a metric with a value of 1.0.
3535
if [ -n "$MATCHING_METRIC" ]; then
36-
# Determine the state of the controller using the last field name of the metric
36+
# Determine the state of the controller using the last field name of the metric
3737
# Possible values are leader, candidate, voted, follower, unattached, observer
3838
STATE=$(echo "$MATCHING_METRIC" | rev | cut -d'_' -f1 | rev)
3939

docs/developer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ Minikube does not have a load balancer implementation, thus our envoy service wi
3737
A possible solution to overcome this problem is to use https://github.com/elsonrodriguez/minikube-lb-patch. The operator will be able to proceed if you run the following command:
3838
```go
3939
kubectl run minikube-lb-patch --replicas=1 --image=elsonrodriguez/minikube-lb-patch:0.1 --namespace=kube-system
40-
```
40+
```

third_party/github.com/banzaicloud/go-cruise-control/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func main() {
3636

3737
// Create Context with timeout
3838
ctx, cancel := context.WithTimeout(context.Background(), 30 * time.Second)
39-
defer cancel()
39+
defer cancel()
4040

4141
// Optionally set request Reason to Context which will sent to Cruise Control as part of the HTTP request
4242
ctx = client.ContextWithReason("example")

third_party/github.com/banzaicloud/go-cruise-control/deploy/producer/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ create_topic() {
2525
--partitions 30 \
2626
--replication-factor 2 \
2727
--topic "${TOPIC}"
28-
28+
2929
# Create the Cruise Control metrics topic
3030
/opt/kafka/bin/kafka-topics.sh \
3131
--bootstrap-server "${KAFKA_BROKERS}" \

third_party/github.com/banzaicloud/k8s-objectmatcher/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ There is a legacy version of the lib, that is now deprecated and documented here
1616

1717
The library uses the same method that `kubectl apply` does under the hood to calculate a patch using the [three way merge](http://www.drdobbs.com/tools/three-way-merging-a-look-under-the-hood/240164902) method.
1818
However for this to work properly we need to keep track of the last applied version of our object, let's call it the `original`. Unfortunately Kubernetes does
19-
not keep track of our previously submitted object versions, but we can put it into an annotation like `kubectl apply` does.
19+
not keep track of our previously submitted object versions, but we can put it into an annotation like `kubectl apply` does.
2020
Next time we query the `current` state of the object from the API Server we can extract the `original` version from the annotation.
2121

2222
Once we have the the `original`, the `current` and our new `modified` object in place the library will take care of the rest.
@@ -72,7 +72,7 @@ Example:
7272
opts := []patch.CalculateOption{
7373
patch.IgnoreStatusFields(),
7474
}
75-
75+
7676
patchResult, err := patch.DefaultPatchMaker.Calculate(existing.(runtime.Object), newObject.(runtime.Object), opts...)
7777
if err != nil {
7878
return err
@@ -89,7 +89,7 @@ This CalculateOption clears volumeClaimTemplate fields from both objects before
8989

9090
#### IgnorePdbSelector
9191

92-
Checks `selector` fields of PDB objects before comparing and removes them if they match. `reflect.DeepEquals` is used for the equality check.
92+
Checks `selector` fields of PDB objects before comparing and removes them if they match. `reflect.DeepEquals` is used for the equality check.
9393
This is required because map fields using `patchStrategy:"replace"` will always diff regardless if they are otherwise equal.
9494

9595
#### IgnoreField("field-name-to-ignore")

third_party/github.com/banzaicloud/k8s-objectmatcher/docs/legacy.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ objectMatcher.Match(e.ObjectOld, e.ObjectNew)
3333

3434
### The idea
3535

36-
There are existing libraries in the wild that can calculate a patch by giving them two different objects. If the patch is empty the two objects match and we are ready, right?
36+
There are existing libraries in the wild that can calculate a patch by giving them two different objects. If the patch is empty the two objects match and we are ready, right?
3737
Well not quite. JSON Merge Patch, defined by [rfc7396](https://tools.ietf.org/html/rfc7396) replaces lists completely which is not always what we need. Kubernetes defines
3838
and uses a modified version called [strategic merge patch](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-api-machinery/strategic-merge-patch.md).
3939

40-
Strategic Merge Patch extends the JSON Merge Patch format by adding explicit directives for deleting, replacing, ordering and merging lists.
40+
Strategic Merge Patch extends the JSON Merge Patch format by adding explicit directives for deleting, replacing, ordering and merging lists.
4141
It uses the go struct tag of the API objects to determine what lists should be merged and which ones should not. Worth to note it's not tied to
4242
Kubernetes objects only, so we can use this for matching custom go structs as well.
4343

@@ -46,21 +46,21 @@ Kubernetes objects only, so we can use this for matching custom go structs as we
4646
#### Defaults and version compatibility
4747

4848
As outlined previously Kubernetes objects are amended with different default values when submitted. For example PodSpec.RestartPolicy will be set to "Always" when
49-
ommitted from the object, so we will have a mismatch when we try to compare it later. This library uses the same functions to set the default values on the local
50-
objects before matching so that they won't differ.
49+
ommitted from the object, so we will have a mismatch when we try to compare it later. This library uses the same functions to set the default values on the local
50+
objects before matching so that they won't differ.
5151

52-
Since the defaults functions are defined in the main kubernetes repo, there is a higher chance that objects decorated using these functions will be incompatible
52+
Since the defaults functions are defined in the main kubernetes repo, there is a higher chance that objects decorated using these functions will be incompatible
5353
when comparing them with objects coming from different server versions. Also since the library depends on the kubernetes repo it is more tightly coupled to it's
5454
version.
5555

56-
To preserve compatibility between the client and server versions [.circleci/config.yml](.circleci/config.yml) contains jobs that run the integration test suite against Kubernetes
56+
To preserve compatibility between the client and server versions [.circleci/config.yml](.circleci/config.yml) contains jobs that run the integration test suite against Kubernetes
5757
versions from 1.10 to 1.14. The library itself is known and tested to be working with operators depending on Kubernetes client version 1.12 and 1.13.
5858

5959
#### Generated values
6060

61-
There are values that are generated by the API Server dynamically. To workaround this the library removes null fields from the patch as long as it's not inside a list.
62-
(In case of lists, even if we remove null fields we would still left with `setElementOrder` directives)
63-
This works as long as we don't set/unset complete fields on the objects conditionally, because in that case we would miss to detect a change to unset something.
61+
There are values that are generated by the API Server dynamically. To workaround this the library removes null fields from the patch as long as it's not inside a list.
62+
(In case of lists, even if we remove null fields we would still left with `setElementOrder` directives)
63+
This works as long as we don't set/unset complete fields on the objects conditionally, because in that case we would miss to detect a change to unset something.
6464

65-
In case a field gets removed from somewhere inside a list we have to explicitly tell to ignore it. One example is NodePort in Service objects, see [service.go](service.go).
65+
In case a field gets removed from somewhere inside a list we have to explicitly tell to ignore it. One example is NodePort in Service objects, see [service.go](service.go).
6666
Another example is Volume and VolumeMount generated automatically for the service account token, see [pod.go](pod.go).

0 commit comments

Comments
 (0)