Skip to content

Commit

Permalink
Merge pull request #1484 from vklohiya/2.1.1-new
Browse files Browse the repository at this point in the history
2.1.1 patch release
  • Loading branch information
vklohiya committed Aug 26, 2020
2 parents f76af0a + 7696f3a commit 9781f49
Show file tree
Hide file tree
Showing 100 changed files with 1,138 additions and 258 deletions.
27 changes: 21 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,7 @@ prod: prod-build

verify: fmt vet

godep-restore: check-gopath
godep restore
rm -rf vendor Godeps

godep-save: check-gopath
godep save ./...
docs: _docs

clean:
rm -rf _docker_workspace
Expand Down Expand Up @@ -118,3 +113,23 @@ reset-dev-patch:

# Build devloper image
dev: dev-patch prod-quick reset-dev-patch

# Docs
#
doc-preview:
rm -rf docs/_build
DOCKER_RUN_ARGS="-p 127.0.0.1:8000:8000" \
./build-tools/docker-docs.sh make -C docs preview

_docs: always-build
./build-tools/docker-docs.sh ./build-tools/make-docs.sh

docker-test:
rm -rf docs/_build
./build-tools/docker-docs.sh ./build-tools/make-docs.sh

# one-time html build using a docker container
.PHONY: docker-html
docker-html:
rm -rf docs/_build
./build-tools/docker-docs.sh make -C docs/ html
2 changes: 1 addition & 1 deletion build-tools/Dockerfile.debian.runtime
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
RUN apt-get remove -y libidn11

COPY bigip-virtual-server_v*.json $APPPATH/vendor/src/f5/schemas/
COPY as3-schema-3.20.0-3-cis.json $APPPATH/vendor/src/f5/schemas/
COPY as3-schema-3.21.0-4-cis.json $APPPATH/vendor/src/f5/schemas/
COPY k8s-bigip-ctlr $APPPATH/bin
COPY VERSION_BUILD.json $APPPATH/vendor/src/f5/

Expand Down
2 changes: 1 addition & 1 deletion build-tools/Dockerfile.debug.runtime
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
RUN apt-get remove -y libidn11

COPY bigip-virtual-server_v*.json $APPPATH/vendor/src/f5/schemas/
COPY as3-schema-3.20.0-3-cis.json $APPPATH/vendor/src/f5/schemas/
COPY as3-schema-3.21.0-4-cis.json $APPPATH/vendor/src/f5/schemas/
COPY k8s-bigip-ctlr $APPPATH/bin
COPY VERSION_BUILD.json $APPPATH/vendor/src/f5/
COPY --from=builder /go/bin/dlv /app/bin
Expand Down
2 changes: 1 addition & 1 deletion build-tools/Dockerfile.rhel7.runtime
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ RUN microdnf --enablerepo=rhel-7-server-rpms --enablerepo=rhel-7-server-optional
microdnf clean all

COPY bigip-virtual-server_v*.json $APPPATH/vendor/src/f5/schemas/
COPY as3-schema-3.20.0-3-cis.json $APPPATH/vendor/src/f5/schemas/
COPY as3-schema-3.21.0-4-cis.json $APPPATH/vendor/src/f5/schemas/
COPY k8s-bigip-ctlr $APPPATH/bin/k8s-bigip-ctlr.real
COPY VERSION_BUILD.json $APPPATH/vendor/src/f5/

Expand Down
2 changes: 1 addition & 1 deletion build-tools/build-release-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ docker rm -f cp-temp

cp requirements.txt $WKDIR/
cp schemas/bigip-virtual-server_v*.json $WKDIR/
cp schemas/as3-schema-3.20.0-3-cis.json $WKDIR/
cp schemas/as3-schema-3.21.0-4-cis.json $WKDIR/
cp LICENSE $WKDIR/
cp $CURDIR/help.md $WKDIR/help.md
echo "{\"version\": \"${VERSION_INFO}\", \"build\": \"${BUILD_INFO}\"}" \
Expand Down
19 changes: 12 additions & 7 deletions cmd/k8s-bigip-ctlr/main.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*-
* Copyright (c) 2017,2018,2019 F5 Networks, Inc.
* Copyright (c) 2017-2020 F5 Networks, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -177,12 +177,12 @@ var (
)

func _init() {
flags = pflag.NewFlagSet("main", pflag.ContinueOnError)
globalFlags = pflag.NewFlagSet("Global", pflag.ContinueOnError)
bigIPFlags = pflag.NewFlagSet("BigIP", pflag.ContinueOnError)
kubeFlags = pflag.NewFlagSet("Kubernetes", pflag.ContinueOnError)
vxlanFlags = pflag.NewFlagSet("VXLAN", pflag.ContinueOnError)
osRouteFlags = pflag.NewFlagSet("OpenShift Routes", pflag.ContinueOnError)
flags = pflag.NewFlagSet("main", pflag.PanicOnError)
globalFlags = pflag.NewFlagSet("Global", pflag.PanicOnError)
bigIPFlags = pflag.NewFlagSet("BigIP", pflag.PanicOnError)
kubeFlags = pflag.NewFlagSet("Kubernetes", pflag.PanicOnError)
vxlanFlags = pflag.NewFlagSet("VXLAN", pflag.PanicOnError)
osRouteFlags = pflag.NewFlagSet("OpenShift Routes", pflag.PanicOnError)

// Flag wrapping
var err error
Expand Down Expand Up @@ -692,6 +692,11 @@ func initCustomResourceManager(
}

func main() {
defer func() {
if r := recover(); r != nil {
flags.Usage()
}
}()
err := flags.Parse(os.Args)
if nil != err {
os.Exit(1)
Expand Down
18 changes: 10 additions & 8 deletions cmd/k8s-bigip-ctlr/main_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*-
* Copyright (c) 2017,2018,2019 F5 Networks, Inc.
* Copyright (c) 2017-2020 F5 Networks, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -595,16 +595,18 @@ var _ = Describe("Main Tests", func() {
}

flags.SetOutput(MockOut{})
defer func() {
Expect(called).To(BeTrue())
}()
defer flags.SetOutput(os.Stderr)

defer func() {
if r := recover(); r != nil {
flags.Usage()
}
}()
err := flags.Parse(os.Args)
Expect(err).ToNot(BeNil())
// This implementation changed in spf13 v1.0.3.
// Usage() is not called as ContinueOnError is set for unit tests.
// So we adopted to the new behaviour introduced.
// Refer --> FlagSet.failf() in flag.go
Expect(called).To(BeFalse())
Expect(len(*openshiftSDNName)).To(Equal(0))

})

It("sets up watches for all namespaces", func() {
Expand Down
2 changes: 1 addition & 1 deletion cmd/k8s-bigip-ctlr/pythonDriver.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*-
* Copyright (c) 2019, F5 Networks, Inc.
* Copyright (c) 2019-2020, F5 Networks, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
34 changes: 17 additions & 17 deletions docs/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ General

.. note::

- The :code:`python-basedir` setting lets you specify the path to an alternate python agent that can bridge between the |kctlr| and `F5 CCCL <https://github.com/f5devcentral/f5-cccl>`_.
- The :code:`python-basedir` setting lets you specify the path to an alternate python agent that can bridge between the |kctlr| and F5-CCCL.

- The time it takes for the |kctlr| to reapply the system configurations to the BIG-IP device is normally low (a few ms) and won't cause service disruption.

Expand Down Expand Up @@ -359,7 +359,7 @@ See the `Integration Overview`_ for more information about F5 resources.
| f5type | Tells ``k8s-bigip-ctlr`` about resources it | |
| | should watch | |
+---------------+---------------------------------------------------+-----------------------------------------------+
| schema | Verifies the ``data`` blob | See the `F5 schema versions`_ table |
| schema | Verifies the ``data`` blob | See the F5 schema versions table |
+---------------+---------------------------------------------------+-----------------------------------------------+
| data | Defines the F5 resource | |
+---------------+---------------------------------------------------+-----------------------------------------------+
Expand All @@ -379,7 +379,7 @@ The `F5 schema`_ allows the |kctlr| to communicate with BIG-IP systems.

While all versions of the BIG-IP Controller and F5 schema are backwards-compatible, using an older schema may limit Controller functionality. Be sure to use the schema version that corresponds with your Controller version to ensure access to the full feature set.

See the `F5 schema versions`_ table for schema and Controller version compatibility.
See the F5 schema versions table for schema and Controller version compatibility.

.. _frontend:

Expand Down Expand Up @@ -434,11 +434,11 @@ sslProfile [#ssl]_ JSON object Optional BIG-IP S

.. note::

If you include ``virtualAddress`` in your Resource definition, you can specify the ``bindAddr`` and ``port`` you want the virtual server to use. Omit the ``virtualAddress`` section if you want to create `pools without virtual servers`_.
If you include ``virtualAddress`` in your Resource definition, you can specify the ``bindAddr`` and ``port`` you want the virtual server to use. Omit the ``virtualAddress`` section if you want to create pools without virtual servers.

If you're creating pools without virtual servers, **you should already have a BIG-IP virtual server** that handles client connections configured with an iRule or local traffic policy that can forward requests to the correct pool for the Service.

You can also `assign IP addresses to BIG-IP virtual servers using IPAM`_.
You can also assign IP addresses to BIG-IP virtual servers using IPAM.

.. _iapp f5 resource:

Expand Down Expand Up @@ -800,29 +800,29 @@ Example Configuration Files
- :fonticon:`fa fa-download` :download:`example-vs-resource.json </_static/config_examples/example-vs-resource.json>`
- :fonticon:`fa fa-download` :download:`example-vs-resource-iapp.json </_static/config_examples/example-vs-resource-iapp.json>`
- :fonticon:`fa fa-download` :download:`example-advanced-vs-resource-iapp.json </_static/config_examples/example-advanced-vs-resource-iapp.json>`
- :fonticon:`fa fa-download` :download:`single-service-ingress.yaml </_static/config_examples/single-service-ingress.yaml>`
- :fonticon:`fa fa-download` :download:`single-service-tls-ingress.yaml </_static/config_examples/single-service-tls-ingress.yaml>`
- :fonticon:`fa fa-download` :download:`simple-ingress-fanout.yaml </_static/config_examples/simple-ingress-fanout.yaml>`
- :fonticon:`fa fa-download` :download:`name-based-ingress.yaml </_static/config_examples/name-based-ingress.yaml>`
- :fonticon:`fa fa-download` :download:`ingress-with-health-monitors.yaml </_static/config_examples/ingress-with-health-monitors.yaml>`
- :fonticon:`fa fa-download` :download:`single-service-ingress.yaml </_static/config_examples/ingress/single-service-ingress.yaml>`
- :fonticon:`fa fa-download` :download:`single-service-tls-ingress.yaml </_static/config_examples/ingress/single-service-tls-ingress.yaml>`
- :fonticon:`fa fa-download` :download:`simple-ingress-fanout.yaml </_static/config_examples/ingress/simple-ingress-fanout.yaml>`
- :fonticon:`fa fa-download` :download:`name-based-ingress.yaml </_static/config_examples/ingress/name-based-ingress.yaml>`
- :fonticon:`fa fa-download` :download:`ingress-with-health-monitors.yaml </_static/config_examples/ingress/ingress-with-health-monitors.yaml>`
- :fonticon:`fa fa-download` :download:`sample-rbac.yaml </_static/config_examples/sample-rbac.yaml>`
- :fonticon:`fa fa-download` :download:`sample-app-root-annotation.yaml </_static/config_examples/sample-app-root-annotation.yaml>`
- :fonticon:`fa fa-download` :download:`sample-url-rewrite-annotation.yaml </_static/config_examples/sample-url-rewrite-annotation.yaml>`
- :fonticon:`fa fa-download` :download:`sample-app-root-annotation.yaml </_static/config_examples/ingress/sample-app-root-annotation.yaml>`
- :fonticon:`fa fa-download` :download:`sample-url-rewrite-annotation.yaml </_static/config_examples/ingress/sample-url-rewrite-annotation.yaml>`

OpenShift
`````````

- :fonticon:`fa fa-download` :download:`sample-unsecured-route.yaml </_static/config_examples/sample-unsecured-route.yaml>`
- :fonticon:`fa fa-download` :download:`sample-edge-route.yaml </_static/config_examples/sample-edge-route.yaml>`
- :fonticon:`fa fa-download` :download:`sample-passthrough-route.yaml </_static/config_examples/sample-passthrough-route.yaml>`
- :fonticon:`fa fa-download` :download:`sample-reencrypt-route.yaml </_static/config_examples/sample-reencrypt-route.yaml>`
- :fonticon:`fa fa-download` :download:`sample-unsecured-route.yaml </_static/config_examples/openshift/routes/sample-unsecured-route.yaml>`
- :fonticon:`fa fa-download` :download:`sample-edge-route.yaml </_static/config_examples/openshift/routes/sample-edge-route.yaml>`
- :fonticon:`fa fa-download` :download:`sample-passthrough-route.yaml </_static/config_examples/openshift/routes/sample-passthrough-route.yaml>`
- :fonticon:`fa fa-download` :download:`sample-reencrypt-route.yaml </_static/config_examples/openshift/routes/sample-reencrypt-route.yaml>`



.. rubric:: **Footnotes**
.. [#objectpartition] The |kctlr| creates and manages objects in the BIG-IP partition defined in the `F5 resource`_ ConfigMap. **It cannot manage objects in the** ``/Common`` **partition**.
.. [#nodeportmode] The |kctlr| forwards traffic to the NodePort assigned to the Service by Kubernetes. See the `Kubernetes Service`_ documentation for more information.
.. [#lb] The |kctlr| supports BIG-IP load balancing algorithms that do not require additional configuration parameters. You can view the full list of supported algorithms in the `f5-cccl schema <https://github.com/f5devcentral/f5-cccl/blob/03e22c4779ceb88f529337ade3ca31ddcd57e4c8/f5_cccl/schemas/cccl-ltm-api-schema.yml#L515>`_. See the `BIG-IP Local Traffic Management Basics user guide <https://support.f5.com/kb/en-us/products/big-ip_ltm/manuals/product/ltm-basics-13-0-0/4.html>`_ for information about each load balancing mode.
.. [#lb] The |kctlr| supports BIG-IP load balancing algorithms that do not require additional configuration parameters. You can view the full list of supported algorithms in the f5-cccl schema. See the `BIG-IP Local Traffic Management Basics user guide <https://support.f5.com/kb/en-us/products/big-ip_ltm/manuals/product/ltm-basics-13-0-0/4.html>`_ for information about each load balancing mode.
.. [#ba] The Controller supports BIG-IP `route domain`_ specific addresses.
.. [#ssl] If you want to configure multiple SSL profiles, use ``f5ProfileNames`` instead of ``f5ProfileName``. The two parameters are mutually exclusive.
.. [#hm1] Required if defining the ``virtual-server.f5.com/health`` Ingress/Route annotation.
Expand Down
Loading

0 comments on commit 9781f49

Please sign in to comment.