Skip to content

Commit c02fc67

Browse files
committed
php 8 updates
Signed-off-by: Travis Glenn Hansen <[email protected]>
1 parent 796dffb commit c02fc67

File tree

5 files changed

+21
-2
lines changed

5 files changed

+21
-2
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# v0.5.2
2+
3+
Released 2021-08-01
4+
5+
- update deploy assets to use modern `apiVersion`s
6+
- handle more stringent type checks by php 8
7+
18
# v0.5.1
29

310
Released 2021-07-31

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,14 @@ can be established. Each `kpc` instance will only require 1 process (ie: access
224224

225225
# Development
226226

227+
## check store values
228+
229+
```
230+
kubectl -n kube-system get configmaps kubernetes-pfsense-controller-store -o json | jq -crM '.data."haproxy-declarative"' | jq .
231+
kubectl -n kube-system get configmaps kubernetes-pfsense-controller-store -o json | jq -crM '.data."metallb"' | jq .
232+
...
233+
```
234+
227235
## HAProxy
228236
XML config structure (note that `ha_backends` is actually frontends...it's badly named):
229237
```yaml

deploy/rbac.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ metadata:
66
namespace: kube-system
77
---
88
kind: ClusterRole
9-
apiVersion: rbac.authorization.k8s.io/v1beta1
9+
apiVersion: rbac.authorization.k8s.io/v1
1010
metadata:
1111
name: kubernetes-pfsense-controller
1212
rules:
@@ -40,7 +40,7 @@ rules:
4040
- watch
4141
---
4242
kind: ClusterRoleBinding
43-
apiVersion: rbac.authorization.k8s.io/v1beta1
43+
apiVersion: rbac.authorization.k8s.io/v1
4444
metadata:
4545
name: kubernetes-pfsense-controller
4646
roleRef:

deploy/secret.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ metadata:
77
type: Opaque
88
data:
99
# base64 encoded password
10+
# echo -n "mypassword" | base64
1011
pfsense-password:

src/KubernetesPfSenseController/Plugin/MetalLB.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,9 @@ private function doActionGeneric()
214214

215215
// get store data
216216
$store = $this->getStore();
217+
$store[$pluginConfig['bgp-implementation']] = $store[$pluginConfig['bgp-implementation']] ?? [];
218+
$store[$pluginConfig['bgp-implementation']]['managed_neighbors'] = $store[$pluginConfig['bgp-implementation']]['managed_neighbors'] ?? [];
219+
217220
$managedNeighborNamesPreSave = @array_keys($managedNeighborsPreSave);
218221
$managedNeighborNames = @array_keys($store[$pluginConfig['bgp-implementation']]['managed_neighbors']);
219222
if (empty($managedNeighborNames)) {

0 commit comments

Comments
 (0)