aboutsummaryrefslogtreecommitdiffstats
path: root/test/security/sslendpoints/README
diff options
context:
space:
mode:
authorPawel Wieczorek <p.wieczorek2@samsung.com>2020-02-25 13:36:59 +0100
committerBartek Grzybowski <b.grzybowski@partner.samsung.com>2020-03-25 13:08:24 +0000
commit600bce340bda372151b4120d89c854f2decc3a93 (patch)
tree32b37ae282f41729665661c9eb29237e0d5e4610 /test/security/sslendpoints/README
parent45d5c7a8853f5b25dbb9b6b8a99846d68a199468 (diff)
Add NodePorts filtering with development environment basis
This patch has not made "sslendpoints" fully compatible with "check_for_nonssl_endpoints.sh" script yet. It sets up basic development environment for Golang-based checkers, though. Tool output will be added to the README after reaching full compatibility with previous (script) version. Development environment brought by this patch is heavily based on: https://github.com/SamsungSLAV/boruta Issue-ID: SECCOM-261 Change-Id: I8f035b63bea13785c40971ede5fdbbc9b6810168 Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
Diffstat (limited to 'test/security/sslendpoints/README')
-rw-r--r--test/security/sslendpoints/README63
1 files changed, 58 insertions, 5 deletions
diff --git a/test/security/sslendpoints/README b/test/security/sslendpoints/README
index fc0e37a1b..ffedb11d1 100644
--- a/test/security/sslendpoints/README
+++ b/test/security/sslendpoints/README
@@ -11,21 +11,56 @@ Prerequisites
Configuration
~~~~~~~~~~~~~
-Mandatory
-+++++++++
-
-Optional
-++++++++
+``-kubeconfig``
+ Optional unless ``$HOME`` is not set. Defaults to ``$HOME/.kube/config``.
Build (local)
~~~~~~~~~~~~~
+- go_ (1.11+, tested on 1.13)
+
+.. _go: https://golang.org/doc/install
+
Build (Docker)
~~~~~~~~~~~~~~
+- Docker_ engine
+- make (optional)
+
+.. _Docker: https://docs.docker.com/install
+
Test
~~~~
+- Ginkgo_
+- GolangCI-Lint_ (optional)
+
+.. _Ginkgo: https://onsi.github.io/ginkgo/#getting-ginkgo
+.. _GolangCI-Lint: https://github.com/golangci/golangci-lint#install
+
+Building
+--------
+
+Command (local)
+~~~~~~~~~~~~~~~
+
+.. code-block:: shell
+
+ $ mkdir bin
+ $ go build -o bin/sslendpoints
+
+Additional ``bin`` directory and specifying ``go build`` output are used to
+declutter project and maintain compatibility with Docker-based process. Running
+``go build`` without parameters will create ``sslendpoints`` binary in current
+directory.
+
+Command (Docker)
+~~~~~~~~~~~~~~~~
+
+.. code-block:: shell
+
+ $ make # or commands from corresponding "make" targets
+
Running
-------
@@ -33,12 +68,30 @@ Running
Command (local)
~~~~~~~~~~~~~~~
+.. code-block:: shell
+
+ $ bin/sslendpoints [-kubeconfig KUBECONFIG]
+
Command (Docker)
~~~~~~~~~~~~~~~~
+.. code-block:: shell
+
+ $ docker run --rm --volume $KUBECONFIG:/.kube/config \
+ sslendpoints-build-img /bin/sslendpoints
+
+ $ docker run --rm --volume $KUBECONFIG:/opt/config \
+ sslendpoints-build-img /bin/sslendpoints -kubeconfig /opt/config
+
Output
~~~~~~
Testing
-------
+
+.. code-block:: shell
+
+ $ go test ./... # basic
+ $ ginkgo -r # pretty
+ $ golangci-lint run # linters