Skip to content
This repository was archived by the owner on Jul 11, 2023. It is now read-only.

Commit eac1c40

Browse files
committed
use friendlier defaults for egress and permissive mode
Signed-off-by: Sean Teeling <[email protected]>
1 parent 8da8732 commit eac1c40

File tree

6 files changed

+14
-6
lines changed

6 files changed

+14
-6
lines changed

.env.example

+4
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ export BOOKWAREHOUSE_NAMESPACE=bookwarehouse
5555
# Default: acr-creds
5656
# export CTR_REGISTRY_CREDS_NAME=acr-creds
5757

58+
# optional: Whether to disable permissive mode, defaults to true.
59+
# Default: true
60+
# export PERMISSIVE_MODE=false
61+
5862
# optional: A tag for the containers used to version the container images in the registry
5963
# Default: latest
6064
# export CTR_TAG=latest

.github/workflows/main.yml

+1
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ jobs:
300300
BOOKTHIEF_EXPECTED_RESPONSE_CODE: "0"
301301
ENABLE_EGRESS: "false"
302302
ENABLE_RECONCILER: "false"
303+
PERMISSIVE_MODE: "false"
303304
DEPLOY_TRAFFIC_SPLIT: "true"
304305
CTR_TAG: ${{ github.sha }}
305306
USE_PRIVATE_REGISTRY: "false"

charts/osm/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ The following table lists the configurable parameters of the osm chart and their
7777
| osm.deployJaeger | bool | `false` | Deploy Jaeger during OSM installation |
7878
| osm.deployPrometheus | bool | `false` | Deploy Prometheus with OSM installation |
7979
| osm.enableDebugServer | bool | `false` | Enable the debug HTTP server on OSM controller |
80-
| osm.enableEgress | bool | `false` | Enable egress in the mesh |
80+
| osm.enableEgress | bool | `true` | Enable egress in the mesh |
8181
| osm.enableFluentbit | bool | `false` | Enable Fluent Bit sidecar deployment on OSM controller's pod |
82-
| osm.enablePermissiveTrafficPolicy | bool | `false` | Enable permissive traffic policy mode |
82+
| osm.enablePermissiveTrafficPolicy | bool | `true` | Enable permissive traffic policy mode |
8383
| osm.enablePrivilegedInitContainer | bool | `false` | Run init container in privileged mode |
8484
| osm.enableReconciler | bool | `false` | Enable reconciler for OSM's CRDs and mutating webhook |
8585
| osm.enforceSingleMesh | bool | `true` | Enforce only deploying one mesh in the cluster |

charts/osm/values.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,10 @@ osm:
168168
enableDebugServer: false
169169

170170
# -- Enable permissive traffic policy mode
171-
enablePermissiveTrafficPolicy: false
171+
enablePermissiveTrafficPolicy: true
172172

173173
# -- Enable egress in the mesh
174-
enableEgress: false
174+
enableEgress: true
175175

176176
# -- Enable reconciler for OSM's CRDs and mutating webhook
177177
enableReconciler: false

demo/run-osm-demo.sh

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ BOOKBUYER_NAMESPACE="${BOOKBUYER_NAMESPACE:-bookbuyer}"
2121
BOOKSTORE_NAMESPACE="${BOOKSTORE_NAMESPACE:-bookstore}"
2222
BOOKTHIEF_NAMESPACE="${BOOKTHIEF_NAMESPACE:-bookthief}"
2323
BOOKWAREHOUSE_NAMESPACE="${BOOKWAREHOUSE_NAMESPACE:-bookwarehouse}"
24+
PERMISSIVE_MODE="${PERMISSIVE_MODE:-true}"
2425
CERT_MANAGER="${CERT_MANAGER:-tresor}"
2526
CTR_REGISTRY="${CTR_REGISTRY:-localhost:5000}"
2627
CTR_REGISTRY_CREDS_NAME="${CTR_REGISTRY_CREDS_NAME:-acr-creds}"
@@ -102,6 +103,7 @@ if [ "$CERT_MANAGER" = "vault" ]; then
102103
--osm-namespace "$K8S_NAMESPACE" \
103104
--verbose \
104105
--mesh-name "$MESH_NAME" \
106+
--set=osm.enablePermissiveTrafficPolicy="$PERMISSIVE_MODE" \
105107
--set=osm.certificateProvider.kind="$CERT_MANAGER" \
106108
--set=osm.vault.host="$VAULT_HOST" \
107109
--set=osm.vault.token="$VAULT_TOKEN" \
@@ -130,6 +132,7 @@ else
130132
--osm-namespace "$K8S_NAMESPACE" \
131133
--verbose \
132134
--mesh-name "$MESH_NAME" \
135+
--set=osm.enablePermissiveTrafficPolicy="$PERMISSIVE_MODE" \
133136
--set=osm.certificateProvider.kind="$CERT_MANAGER" \
134137
--set=osm.image.registry="$CTR_REGISTRY" \
135138
--set=osm.imagePullSecrets[0].name="$CTR_REGISTRY_CREDS_NAME" \

tests/e2e/e2e_helm_install_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ var _ = OSMDescribe("Test osm control plane installation with Helm",
3030

3131
// validate osm MeshConfig
3232
spec := meshConfig.Spec
33-
Expect(spec.Traffic.EnablePermissiveTrafficPolicyMode).To(BeFalse())
34-
Expect(spec.Traffic.EnableEgress).To(BeFalse())
33+
Expect(spec.Traffic.EnablePermissiveTrafficPolicyMode).To(BeTrue())
34+
Expect(spec.Traffic.EnableEgress).To(BeTrue())
3535
Expect(spec.Sidecar.LogLevel).To(Equal("error"))
3636
Expect(spec.Observability.EnableDebugServer).To(BeFalse())
3737
Expect(spec.Observability.Tracing.Enable).To(BeFalse())

0 commit comments

Comments
 (0)