Skip to content

Commit af9134c

Browse files
authored
Merge pull request #888 from subbuv26/1.9-release
Merge branch 'feature.user-defined-as3' into master
2 parents f1e115e + b62ec31 commit af9134c

39 files changed

+26960
-498
lines changed

.approvals.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -818,6 +818,13 @@
818818
"category": 3,
819819
"status": "approved"
820820
},
821+
{
822+
"name": "xeipuuv/gojsonschema",
823+
"version": "v1.1.0",
824+
"license": "Apache 2.0",
825+
"category": 3,
826+
"status": "approved"
827+
},
821828
{
822829
"name": "PuerkitoBio/purell",
823830
"version": "v1.0.0",

.f5license

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,24 @@
530530
See the License for the specific language governing permissions and
531531
limitations under the License.
532532

533+
# The xeipuuv/gojsonschema module contains a proper LICENSE file.
534+
- name: xeipuuv/gojsonschema
535+
version: v1.1.0
536+
attribution_text: |
537+
Copyright 2015 xeipuuv
538+
539+
Licensed under the Apache License, Version 2.0 (the "License");
540+
you may not use this file except in compliance with the License.
541+
You may obtain a copy of the License at
542+
543+
http://www.apache.org/licenses/LICENSE-2.0
544+
545+
Unless required by applicable law or agreed to in writing, software
546+
distributed under the License is distributed on an "AS IS" BASIS,
547+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
548+
See the License for the specific language governing permissions and
549+
limitations under the License.
550+
533551
# The yaml.v2 module is licensed under Apache except for the portions ported
534552
# from the libyaml project, which are licensed under MIT.
535553
- name: yaml

Godeps/Godeps.json

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build-tools/Dockerfile.debian.runtime

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1717
&& apt-get remove -y git
1818

1919
COPY bigip-virtual-server_v*.json $APPPATH/vendor/src/f5/schemas/
20+
COPY as3-schema-3.10-cis.json $APPPATH/vendor/src/f5/schemas/
2021
COPY k8s-bigip-ctlr $APPPATH/bin
2122
COPY VERSION_BUILD.json $APPPATH/vendor/src/f5/
2223

build-tools/Dockerfile.rhel7.runtime

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ RUN microdnf --enablerepo=rhel-7-server-rpms --enablerepo=rhel-7-server-optional
4343
microdnf clean all
4444

4545
COPY bigip-virtual-server_v*.json $APPPATH/vendor/src/f5/schemas/
46+
COPY as3-schema-3.10-cis.json $APPPATH/vendor/src/f5/schemas/
4647
COPY k8s-bigip-ctlr $APPPATH/bin/k8s-bigip-ctlr.real
4748
COPY VERSION_BUILD.json $APPPATH/vendor/src/f5/
4849

build-tools/build-release-images.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ VERSION_INFO=$(${CURDIR}/version-tool version)
2222
cp $CURDIR/../_docker_workspace/out/$RELEASE_PLATFORM/bin/* $WKDIR/
2323
cp requirements.txt $WKDIR/
2424
cp schemas/bigip-virtual-server_v*.json $WKDIR/
25+
cp schemas/as3-schema-3.10-cis.json $WKDIR/
2526
cp LICENSE $WKDIR/
2627
cp $CURDIR/help.md $WKDIR/help.md
2728
echo "{\"version\": \"${VERSION_INFO}\", \"build\": \"${BUILD_INFO}\"}" \

cmd/k8s-bigip-ctlr/main.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ var (
105105
bigIPPassword *string
106106
bigIPPartitions *[]string
107107
credsDir *string
108+
as3Validation *bool
109+
sslInsecure *bool
108110

109111
vxlanMode string
110112
openshiftSDNName *string
@@ -172,6 +174,10 @@ func _init() {
172174
credsDir = bigIPFlags.String("credentials-directory", "",
173175
"Optional, directory that contains the BIG-IP username, password, and/or "+
174176
"url files. To be used instead of username, password, and/or url arguments.")
177+
as3Validation = bigIPFlags.Bool("as3-validation", true,
178+
"Optional, when set to false, disables as3 template validation on the controller.")
179+
sslInsecure = bigIPFlags.Bool("insecure", false,
180+
"Optional, when set to true, enable insecure SSL communication to BIGIP.")
175181

176182
bigIPFlags.Usage = func() {
177183
fmt.Fprintf(os.Stderr, " BigIP:\n%s\n", bigIPFlags.FlagUsagesWrapped(width))
@@ -604,6 +610,8 @@ func main() {
604610
UseSecrets: *useSecrets,
605611
ManageConfigMaps: *manageConfigMaps,
606612
SchemaLocal: *schemaLocal,
613+
AS3Validation: *as3Validation,
614+
SSLInsecure: *sslInsecure,
607615
}
608616

609617
// If running with Flannel, create an event channel that the appManager
@@ -641,6 +649,10 @@ func main() {
641649
BigIPPartitions: *bigIPPartitions,
642650
}
643651

652+
appmanager.BigIPUsername = *bigIPUsername
653+
appmanager.BigIPPassword = *bigIPPassword
654+
appmanager.BigIPURL = *bigIPURL
655+
644656
subPidCh, err := startPythonDriver(configWriter, gs, bs, *pythonBaseDir)
645657
if nil != err {
646658
log.Fatalf("Could not initialize subprocess configuration: %v", err)

docs/RELEASE-NOTES.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ Release Notes for BIG-IP Controller for Kubernetes
44
next-release
55
------------
66

7+
Added Functionality
8+
```````````````````
9+
* Added support for `Application Services 3 Extension <https://clouddocs.f5.com/products/extensions/f5-appsvcs-extension/latest/>_`.
10+
11+
Limitations
12+
```````````
13+
* AS3 pool class declarations support only one load balancing pool.
14+
* The BIG-IP Contoller supports only one AS3 ConfigMap instance.
15+
* AS3 does not support moving BIG-IP nodes to new partitions.
16+
* Static ARP entries remain after deleting an AS3 ConfigMap.
17+
718
v1.8.1
819
------
920

pkg/appmanager/appManager.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ type Manager struct {
127127
mergedRulesMap map[string]map[string]mergedRuleEntry
128128
// Whether to watch ConfigMap resources or not
129129
manageConfigMaps bool
130+
as3Members map[Member]struct{}
131+
as3Validation bool
132+
sslInsecure bool
130133
}
131134

132135
// Struct to allow NewManager to receive all or only specific parameters.
@@ -149,6 +152,8 @@ type Params struct {
149152
broadcasterFunc NewBroadcasterFunc
150153
SchemaLocal string
151154
ManageConfigMaps bool
155+
AS3Validation bool
156+
SSLInsecure bool
152157
}
153158

154159
// Configuration options for Routes in OpenShift
@@ -196,6 +201,9 @@ func NewManager(params *Params) *Manager {
196201
schemaLocal: params.SchemaLocal,
197202
mergedRulesMap: make(map[string]map[string]mergedRuleEntry),
198203
manageConfigMaps: params.ManageConfigMaps,
204+
as3Members: make(map[Member]struct{}, 0),
205+
as3Validation: params.AS3Validation,
206+
sslInsecure: params.SSLInsecure,
199207
}
200208
if nil != manager.kubeClient && nil == manager.restClientv1 {
201209
// This is the normal production case, but need the checks for unit tests.
@@ -771,6 +779,8 @@ func (appMgr *Manager) processNextVirtualServer() bool {
771779
log.Debugf("[as3_log] Processing AS3 cfgMap (%s) with AS3 Manager.\n", k.As3Name)
772780
log.Debugf("[as3_log] AS3 ConfigMap Data: %s\n", k.As3Data)
773781
appMgr.vsQueue.Done(key)
782+
appMgr.processUserDefinedAS3(k.As3Data)
783+
appMgr.vsQueue.Forget(key)
774784
return false
775785
}
776786
if !appMgr.initialState && appMgr.processedItems == 0 {
@@ -893,7 +903,7 @@ func (appMgr *Manager) syncVirtualServer(sKey serviceQueueKey) error {
893903
appMgr.deleteUnusedProfiles(appInf, sKey.Namespace, &stats)
894904

895905
if stats.vsUpdated > 0 || stats.vsDeleted > 0 || stats.cpUpdated > 0 ||
896-
stats.dgUpdated > 0 || stats.poolsUpdated > 0 {
906+
stats.dgUpdated > 0 || stats.poolsUpdated > 0 || len(appMgr.as3Members) > 0 {
897907
appMgr.outputConfig()
898908
} else if !appMgr.initialState && appMgr.processedItems >= appMgr.queueLen {
899909
appMgr.outputConfig()

0 commit comments

Comments
 (0)