Skip to content
This repository was archived by the owner on Dec 2, 2025. It is now read-only.

Commit ccfeb62

Browse files
committed
use separate configmap way
1 parent af0b432 commit ccfeb62

File tree

10 files changed

+245
-113
lines changed

10 files changed

+245
-113
lines changed

deploy/0.bigip-config.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,5 @@ metadata:
55
name: bigip-login
66
namespace: kube-system
77
data:
8-
url: aHR0cHM6Ly8xMC4yNTAuMTYuMTA5 # base64 encoded 'https://10.10.10.10:443'
9-
username: YWRtaW4= # base64 encoded 'admin'
108
password: UEBzc3cwcmQxMjM= # base64 encoded 'mypassword'
119
type: Opaque

deploy/1.clusterrole-and-binding.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ rules:
1717
- apiGroups: ["gateway.networking.k8s.io"]
1818
resources: ["gatewayclasses", "gateways", "httproutes"]
1919
verbs: ["get", "list", "watch"]
20+
- apiGroups: ["gateway.networking.k8s.io"]
21+
resources: ["gatewayclasses/status"]
22+
verbs: ["get", "list", "watch", "update"]
2023

2124
---
2225

deploy/3.deploy-bigip-k8s-gtw-ctlr.yaml

Lines changed: 55 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,32 @@
11
---
22

3+
apiVersion: v1
4+
kind: ConfigMap
5+
metadata:
6+
name: bigip-gwapi-cm
7+
namespace: kube-system
8+
data:
9+
bigip-k8s-gw-conf.yaml: |
10+
bigips:
11+
- mgmtIpAddress: "10.50.17.104"
12+
vxlanProfileName: "fl-vxlan"
13+
vxlanPort: "8472"
14+
vxlanLocalAddress: "4.4.4.4"
15+
selfIpName: "flannel-self"
16+
selfIpAddress: "5.5.5.5/28"
17+
url: "https://10.50.17.104:8443"
18+
username: "admin"
19+
- mgmtIpAddress: "10.50.15.173"
20+
vxlanProfileName: "fl-vxlan"
21+
vxlanPort: "8472"
22+
vxlanLocalAddress: "4.4.4.5"
23+
selfIpName: "flannel-self"
24+
selfIpAddress: "5.5.5.6/28"
25+
url: "https://10.50.15.173:8443"
26+
username: "admin"
27+
28+
---
29+
330
apiVersion: apps/v1
431
kind: Deployment
532
metadata:
@@ -18,36 +45,42 @@ spec:
1845
spec:
1946
serviceAccountName: k8s-bigip-ctlr
2047
nodeSelector:
21-
node-role.kubernetes.io/controlplane: "true"
48+
node-role.kubernetes.io/control-plane: "true"
2249
# node-role.kubernetes.io/master: "true"
2350
containers:
2451
# kubectl logs -f deployment/bigip-kubernetes-gateway -c bigip-kubernetes-gateway-pod -n kube-system
2552
- name: bigip-kubernetes-gateway-pod
26-
image: zongzw/bigip-kubernetes-gateway:latest-20221115-162758
53+
image: jeffreycoho/bigip-kubernetes-gateway:12060066-20221206-153736
2754
imagePullPolicy: IfNotPresent
28-
env:
29-
- name: BIGIP_USERNAME
30-
valueFrom:
31-
secretKeyRef:
32-
name: bigip-login
33-
key: username
34-
- name: BIGIP_PASSWORD
35-
valueFrom:
36-
secretKeyRef:
37-
name: bigip-login
38-
key: password
39-
- name: BIGIP_URL
40-
valueFrom:
41-
secretKeyRef:
42-
name: bigip-login
43-
key: url
55+
# env:
56+
# - name: BIGIP_PASSWORD
57+
# valueFrom:
58+
# secretKeyRef:
59+
# name: bigip-login
60+
# key: password
4461
command: ["/bigip-kubernetes-gateway-controller-linux"]
4562
args: [
46-
"--bigip-username=$(BIGIP_USERNAME)",
47-
"--bigip-password=$(BIGIP_PASSWORD)",
48-
"--bigip-url=$(BIGIP_URL)",
49-
"--gateway-class=bigip"
63+
# "--bigip-password=p@ssw0rd123",
64+
"--controller-name=f5.io/gateway-controller-name",
65+
"--mode=flannel",
66+
"--vxlan-tunnel-name=fl-vxlan",
67+
"--bigip-conf-directory=/bigip-gw",
68+
"--credentials-directory=/creds",
5069
]
70+
volumeMounts:
71+
- name: bigip-creds
72+
mountPath: "/creds"
73+
readOnly: true
74+
- name: bigip-config
75+
mountPath: /bigip-gw
76+
readOnly: true
77+
volumes:
78+
- name: bigip-creds
79+
secret:
80+
secretName: bigip-login
81+
- name: bigip-config
82+
configMap:
83+
name: bigip-gwapi-cm
5184

5285
---
5386

go.mod

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ require (
1515
)
1616

1717
require (
18-
cloud.google.com/go v0.97.0 // indirect
18+
cloud.google.com/go v0.104.0 // indirect
19+
cloud.google.com/go/compute v1.12.1 // indirect
20+
cloud.google.com/go/compute/metadata v0.2.1 // indirect
1921
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
2022
github.com/Azure/go-autorest/autorest v0.11.27 // indirect
2123
github.com/Azure/go-autorest/autorest/adal v0.9.20 // indirect
@@ -29,7 +31,7 @@ require (
2931
github.com/davecgh/go-spew v1.1.1 // indirect
3032
github.com/emicklei/go-restful/v3 v3.8.0 // indirect
3133
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
32-
github.com/fsnotify/fsnotify v1.5.4 // indirect
34+
github.com/fsnotify/fsnotify v1.6.0 // indirect
3335
github.com/go-logr/logr v1.2.3 // indirect
3436
github.com/go-logr/zapr v1.2.3 // indirect
3537
github.com/go-openapi/jsonpointer v0.19.5 // indirect
@@ -40,36 +42,47 @@ require (
4042
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
4143
github.com/golang/protobuf v1.5.2 // indirect
4244
github.com/google/gnostic v0.5.7-v3refs // indirect
43-
github.com/google/go-cmp v0.5.8 // indirect
45+
github.com/google/go-cmp v0.5.9 // indirect
4446
github.com/google/gofuzz v1.1.0 // indirect
45-
github.com/google/uuid v1.1.2 // indirect
47+
github.com/google/uuid v1.3.0 // indirect
48+
github.com/hashicorp/hcl v1.0.0 // indirect
4649
github.com/imdario/mergo v0.3.12 // indirect
4750
github.com/josharian/intern v1.0.0 // indirect
4851
github.com/json-iterator/go v1.1.12 // indirect
52+
github.com/magiconair/properties v1.8.6 // indirect
4953
github.com/mailru/easyjson v0.7.6 // indirect
5054
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
55+
github.com/mitchellh/mapstructure v1.5.0 // indirect
5156
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
5257
github.com/modern-go/reflect2 v1.0.2 // indirect
5358
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
59+
github.com/pelletier/go-toml v1.9.5 // indirect
60+
github.com/pelletier/go-toml/v2 v2.0.5 // indirect
5461
github.com/pkg/errors v0.9.1 // indirect
5562
github.com/prometheus/client_model v0.2.0 // indirect
5663
github.com/prometheus/common v0.37.0 // indirect
5764
github.com/prometheus/procfs v0.8.0 // indirect
65+
github.com/spf13/afero v1.9.2 // indirect
66+
github.com/spf13/cast v1.5.0 // indirect
67+
github.com/spf13/jwalterweatherman v1.1.0 // indirect
5868
github.com/spf13/pflag v1.0.5 // indirect
59-
go.uber.org/atomic v1.7.0 // indirect
60-
go.uber.org/multierr v1.6.0 // indirect
69+
github.com/spf13/viper v1.14.0 // indirect
70+
github.com/subosito/gotenv v1.4.1 // indirect
71+
go.uber.org/atomic v1.9.0 // indirect
72+
go.uber.org/multierr v1.8.0 // indirect
6173
go.uber.org/zap v1.21.0 // indirect
62-
golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd // indirect
63-
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
64-
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect
65-
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect
74+
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect
75+
golang.org/x/net v0.0.0-20221014081412-f15817d10f9b // indirect
76+
golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 // indirect
77+
golang.org/x/sys v0.0.0-20220908164124-27713097b956 // indirect
6678
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
67-
golang.org/x/text v0.3.7 // indirect
79+
golang.org/x/text v0.4.0 // indirect
6880
golang.org/x/time v0.0.0-20220609170525-579cf78fd858 // indirect
6981
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
7082
google.golang.org/appengine v1.6.7 // indirect
7183
google.golang.org/protobuf v1.28.1 // indirect
7284
gopkg.in/inf.v0 v0.9.1 // indirect
85+
gopkg.in/ini.v1 v1.67.0 // indirect
7386
gopkg.in/yaml.v2 v2.4.0 // indirect
7487
gopkg.in/yaml.v3 v3.0.1 // indirect
7588
k8s.io/apiextensions-apiserver v0.25.0 // indirect

0 commit comments

Comments
 (0)