Skip to content

Commit 6483e7a

Browse files
authored
docs: Updating --v1-compatible mentions outside the v1 upgrade guide and v0 compatibility docs (open-policy-agent#7337)
to describe `--v0-compatible` behaviour instead. Signed-off-by: Johan Fylling <[email protected]>
1 parent da69c32 commit 6483e7a

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

cmd/run.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,10 @@ OPA will automatically perform type checking based on a schema inferred from kno
182182
resulting from the schema check. Currently this check is performed on OPA's Authorization Policy Input document and will
183183
be expanded in the future. To disable this, use the --skip-known-schema-check flag.
184184
185-
The --v1-compatible flag can be used to opt-in to OPA features and behaviors that will be enabled by default in a future OPA v1.0 release.
186-
Current behaviors enabled by this flag include:
187-
- setting OPA's listening address to "localhost:8181" by default.
185+
The --v0-compatible flag can be used to opt-in to OPA features and behaviors that were the default in OPA v0.x.
186+
Behaviors enabled by this flag include:
187+
- setting OPA's listening address to ":8181" by default, corresponding to listening on every network interface.
188+
- expecting v0 Rego syntax in policy modules instead of the default v1 Rego syntax.
188189
189190
The --tls-cipher-suites flag can be used to specify the list of enabled TLS 1.0–1.2 cipher suites. Note that TLS 1.3
190191
cipher suites are not configurable. Following are the supported TLS 1.0 - 1.2 cipher suites (IANA):

docs/content/cli.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -887,9 +887,10 @@ OPA will automatically perform type checking based on a schema inferred from kno
887887
resulting from the schema check. Currently this check is performed on OPA's Authorization Policy Input document and will
888888
be expanded in the future. To disable this, use the --skip-known-schema-check flag.
889889

890-
The --v1-compatible flag can be used to opt-in to OPA features and behaviors that will be enabled by default in a future OPA v1.0 release.
891-
Current behaviors enabled by this flag include:
892-
- setting OPA's listening address to "localhost:8181" by default.
890+
The --v0-compatible flag can be used to opt-in to OPA features and behaviors that were the default in OPA v0.x.
891+
Behaviors enabled by this flag include:
892+
- setting OPA's listening address to ":8181" by default, corresponding to listening on every network interface.
893+
- expecting v0 Rego syntax in policy modules instead of the default v1 Rego syntax.
893894

894895
The --tls-cipher-suites flag can be used to specify the list of enabled TLS 1.0–1.2 cipher suites. Note that TLS 1.3
895896
cipher suites are not configurable. Following are the supported TLS 1.0 - 1.2 cipher suites (IANA):

docs/content/management-bundles.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,18 +214,18 @@ fields:
214214
`string` value that identifies the bundle revision.
215215

216216
* `rego_version` - An optional field that specifies the rego-version of the Rego source files
217-
in the bundle. The value of this field is an `integer`; where `0` corresponds to v0 Rego (current OPA v0.x syntax),
218-
and `1` corresponds to v1 Rego ([OPA v1.0](../opa-1/) syntax).
219-
If the field is not included in the manifest, OPA will enforce v0 syntax, or v1 if executed with
220-
the `--v1-compatible` flag.
221-
An existing bundle `rego_version` field takes precedence to the `--v1-compatible` flag.
217+
in the bundle. The value of this field is an `integer`; where `0` corresponds to v0 Rego ([OPA v0.x](../v0-compatibility/) syntax),
218+
and `1` corresponds to v1 Rego (current OPA v1.x syntax).
219+
If the field is not included in the manifest, OPA will enforce v1 syntax, or v0 if executed with
220+
the `--v0-compatible` flag.
221+
An existing bundle `rego_version` field takes precedence to the `--v0-compatible` flag.
222222

223223
* `file_rego_versions` - An optional field that specifies per-file rego-version overrides to the
224224
`rego_version` field. The value of this field is a `map` where the keys are file paths relative to the
225225
bundle root directory (paths are absolute and start with `/`) and the values are `integer` rego-versions.
226226
Glob patterns are accepted, to allow for a single entry to apply to multiple files. The behaviour is undefined
227227
for overlapping patterns. If a file is not matched by any pattern, the `rego_version` field is used.
228-
Existing bundle `rego_version` and `file_rego_versions` fields takes precedence to the `--v1-compatible` flag.
228+
Existing bundle `rego_version` and `file_rego_versions` fields takes precedence to the `--v0-compatible` flag.
229229

230230
* `roots` - If you expect to load additional data into OPA from outside the
231231
bundle (e.g., via OPA's HTTP API) you should include a top-level

0 commit comments

Comments
 (0)