feat: disable network policies generation by default (#1629)

* feat: disable network policies default generation

Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>

* docs: add the generate-network-policies flag to user guide

Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>

* test: add unit tests of the network policies generation

Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>

---------

Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
This commit is contained in:
AhmedGrati
2023-07-05 11:26:37 +01:00
committed by GitHub
parent 485cd2f163
commit f7bee839ce
28 changed files with 112 additions and 423 deletions
+5
View File
@@ -495,6 +495,10 @@ If the Docker Compose file has service name with `_` or `.` in it (eg.`web_servi
Please note that changing service name might break some `docker-compose` files.
## Network policies generation
[Network policies](https://kubernetes.io/docs/concepts/services-networking/network-policies) are not generated by default, because it's not mandatory to deploy your application. However, it's one of the best practices when it comes to deploy secure applications on top of Kubernetes.
To generate network policies, all you need is to use the `--generate-network-policies` flag.
## Build and push image
If the Docker Compose file has `build` or `build:context, build:dockerfile` keys, build will run when `--build` specified.
@@ -503,6 +507,7 @@ And Image will push to _docker.io_ (default) when `--push-image=true` specified.
It is possible to push to custom registry by specify `--push-image-registry`, which will override the registry from image name.
### Authentication on registry
Kompose uses the docker authentication from file `$DOCKER_CONFIG/config.json`, `$HOME/.docker/config.json`, and `$HOME/.dockercfg` after `docker login`.