@redpanda-data/docs-extensions-and-macros 4.10.3 → 4.10.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ module.exports = function anchorName(name) {
2
+ const anchor = String(name).replace(/[^a-zA-Z0-9]/g, '').toLowerCase();
3
+ if (!anchor) {
4
+ throw new Error(`Invalid property name for anchor generation: "${name}"`);
5
+ }
6
+ return anchor;
7
+ };
@@ -10,4 +10,5 @@ module.exports = {
10
10
  formatPropertyValue: require('./formatPropertyValue.js'),
11
11
  renderPropertyExample: require('./renderPropertyExample.js'),
12
12
  formatUnits: require('./formatUnits.js'),
13
+ anchorName: require('./anchorName.js'),
13
14
  };
@@ -719,6 +719,14 @@ def _apply_override_to_existing_property(property_dict, override, overrides_file
719
719
  else:
720
720
  logger.warning(f"related_topics for property must be an array")
721
721
 
722
+ # Apply exclude_from_docs override
723
+ if "exclude_from_docs" in override:
724
+ property_dict["exclude_from_docs"] = override["exclude_from_docs"]
725
+
726
+ # Apply category override for topic properties
727
+ if "category" in override:
728
+ property_dict["category"] = override["category"]
729
+
722
730
 
723
731
  def _create_property_from_override(prop_name, override, overrides_file_path):
724
732
  """Create a new property from override specification."""
@@ -757,6 +765,14 @@ def _create_property_from_override(prop_name, override, overrides_file_path):
757
765
  "example", "example_file", "example_yaml", "related_topics",
758
766
  "is_deprecated", "visibility"]:
759
767
  new_property[key] = value
768
+
769
+ # Add exclude_from_docs if specified
770
+ if "exclude_from_docs" in override:
771
+ new_property["exclude_from_docs"] = override["exclude_from_docs"]
772
+
773
+ # Add category if specified
774
+ if "category" in override:
775
+ new_property["category"] = override["category"]
760
776
 
761
777
  return new_property
762
778
 
@@ -1647,7 +1663,50 @@ def extract_topic_properties(source_path):
1647
1663
  # Skip no-op properties
1648
1664
  if prop_data.get("is_noop", False):
1649
1665
  continue
1650
-
1666
+
1667
+ # Assign category based on property name pattern or mapping
1668
+ def infer_category(name):
1669
+ retention = [
1670
+ "cleanup.policy", "compaction.strategy", "delete.retention.ms", "max.compaction.lag.ms",
1671
+ "min.cleanable.dirty.ratio", "min.compaction.lag.ms", "retention.bytes", "retention.ms"
1672
+ ]
1673
+ segment = [
1674
+ "compression.type", "max.message.bytes", "message.timestamp.type", "segment.bytes", "segment.ms"
1675
+ ]
1676
+ performance = [
1677
+ "flush.bytes", "flush.ms", "redpanda.leaders.preference", "replication.factor", "write.caching"
1678
+ ]
1679
+ tiered = [
1680
+ "initial.retention.local.target.bytes", "initial.retention.local.target.ms", "redpanda.remote.delete",
1681
+ "redpanda.remote.read", "redpanda.remote.recovery", "redpanda.remote.write", "retention.local.target.bytes",
1682
+ "retention.local.target.ms"
1683
+ ]
1684
+ remote_replica = ["redpanda.remote.readreplica"]
1685
+ iceberg = [
1686
+ "redpanda.iceberg.delete", "redpanda.iceberg.invalid.record.action", "redpanda.iceberg.mode",
1687
+ "redpanda.iceberg.partition.spec", "redpanda.iceberg.target.lag.ms"
1688
+ ]
1689
+ schema_registry = [
1690
+ "redpanda.key.schema.id.validation", "redpanda.key.subject.name.strategy", "redpanda.value.schema.id.validation",
1691
+ "redpanda.value.subject.name.strategy", "confluent.key.schema.validation", "confluent.key.subject.name.strategy",
1692
+ "confluent.value.schema.validation", "confluent.value.subject.name.strategy"
1693
+ ]
1694
+ if name in retention:
1695
+ return "retention-compaction"
1696
+ if name in segment:
1697
+ return "segment-message"
1698
+ if name in performance:
1699
+ return "performance-cluster"
1700
+ if name in tiered:
1701
+ return "tiered-storage"
1702
+ if name in remote_replica:
1703
+ return "remote-read-replica"
1704
+ if name in iceberg:
1705
+ return "iceberg-integration"
1706
+ if name in schema_registry:
1707
+ return "schema-registry"
1708
+ return "other"
1709
+
1651
1710
  converted_properties[prop_name] = {
1652
1711
  "name": prop_name,
1653
1712
  "description": prop_data.get("description", ""),
@@ -1657,7 +1716,8 @@ def extract_topic_properties(source_path):
1657
1716
  "corresponding_cluster_property": prop_data.get("corresponding_cluster_property", ""),
1658
1717
  "acceptable_values": prop_data.get("acceptable_values", ""),
1659
1718
  "is_deprecated": False,
1660
- "is_topic_property": True
1719
+ "is_topic_property": True,
1720
+ "category": infer_category(prop_name)
1661
1721
  }
1662
1722
 
1663
1723
  logging.info(f"Extracted {len(converted_properties)} topic properties (excluding {len([p for p in topic_properties.values() if p.get('is_noop', False)])} no-op properties)")
@@ -1,7 +1 @@
1
- === `{{name}}`
2
-
3
- {{#if description}}
4
- {{{description}}}
5
- {{else}}
6
- No description available.
7
- {{/if}}
1
+ - `{{name}}`
@@ -1,63 +1,88 @@
1
- {{#unless is_deprecated}}
1
+ {{#if category}}
2
+ // tag::category-{{category}}[]
3
+ {{/if}}
4
+ {{#if exclude_from_docs}}
5
+ // tag::exclude-from-docs[]
6
+ {{/if}}
7
+ {{#if is_deprecated}}
8
+ // tag::deprecated[]
9
+ {{/if}}
10
+ {{#if cloud_supported}}
11
+ // tag::redpanda-cloud[]
12
+ {{/if}}
2
13
  === {{name}}
3
-
4
14
  {{#if version}}
15
+
16
+ ifndef::env-cloud[]
5
17
  *Introduced in {{version}}*
18
+ endif::[]
6
19
  {{/if}}
7
-
8
20
  {{#if description}}
21
+
9
22
  {{{description}}}
10
23
  {{else}}
24
+
11
25
  No description available.
12
26
  {{/if}}
13
-
14
27
  {{#if is_enterprise}}
28
+
15
29
  ifndef::env-cloud[]
16
30
  *Enterprise license required*: `{{enterprise_value}}` (for license details, see xref:get-started:licensing/index.adoc[Redpanda Licensing])
17
31
  endif::[]
18
-
19
32
  {{/if}}
20
-
33
+ {{#if cloud_byoc_only}}
34
+ ifdef::env-cloud[]
35
+ NOTE: This property is available only in Redpanda Cloud BYOC deployments.
36
+ endif::[]
37
+ {{/if}}
21
38
  {{#if units}}
22
- *Unit:* {{units}}
23
39
 
40
+ *Unit:* {{units}}
24
41
  {{else}}
25
42
  {{#if (formatUnits name)}}
26
- *Unit:* {{formatUnits name}}
27
43
 
44
+ *Unit:* {{formatUnits name}}
28
45
  {{/if}}
29
46
  {{/if}}
30
47
  {{#if (ne defined_in "src/v/config/node_config.cc")}}
31
48
  {{#if (ne needs_restart undefined)}}
32
- *Requires restart:* {{#if needs_restart}}Yes{{else}}No{{/if}}
33
49
 
50
+ *Requires restart:* {{#if needs_restart}}Yes{{else}}No{{/if}}
34
51
  {{/if}}
35
52
  {{/if}}
36
53
  {{#if visibility}}
37
- *Visibility:* `{{visibility}}`
38
54
 
55
+ // tag::self-managed-only[]
56
+ *Visibility:* `{{visibility}}`
57
+ // end::self-managed-only[]
39
58
  {{/if}}
40
59
  {{#if type}}
41
- *Type:* {{type}}
42
60
 
61
+ *Type:* {{type}}
43
62
  {{/if}}
44
63
  {{#if (and minimum maximum)}}
45
- *Accepted values:* [`{{minimum}}`, `{{maximum}}`]
46
64
 
65
+ *Accepted values:* [`{{minimum}}`, `{{maximum}}`]
47
66
  {{else}}
48
67
  {{#if minimum}}
49
- *Minimum value:* `{{minimum}}`
50
68
 
69
+ *Minimum value:* `{{minimum}}`
51
70
  {{/if}}
52
71
  {{#if maximum}}
53
- *Maximum value:* `{{maximum}}`
54
72
 
73
+ *Maximum value:* `{{maximum}}`
55
74
  {{/if}}
56
75
  {{/if}}
57
76
  {{#if (ne default undefined)}}
58
- *Default:* `{{formatPropertyValue default type}}`
59
77
 
78
+ ifdef::env-cloud[]
79
+ *Default:* Available in the Redpanda Cloud Console
80
+ endif::[]
81
+ ifndef::env-cloud[]
82
+ *Default:* `{{formatPropertyValue default type}}`
83
+ endif::[]
60
84
  {{/if}}
85
+
61
86
  *Nullable:* {{#if nullable}}Yes{{else}}No{{/if}}
62
87
  {{#if example}}
63
88
 
@@ -73,8 +98,21 @@ endif::[]
73
98
  {{/if}}
74
99
  {{#if aliases}}
75
100
 
101
+ // tag::self-managed-only[]
76
102
  *Aliases:* {{join aliases ", "}}
103
+ // end::self-managed-only[]
77
104
  {{/if}}
78
- ---
79
- {{/unless}}
80
105
 
106
+ ---
107
+ {{#if cloud_supported}}
108
+ // end::redpanda-cloud[]
109
+ {{/if}}
110
+ {{#if is_deprecated}}
111
+ // end::deprecated[]
112
+ {{/if}}
113
+ {{#if exclude_from_docs}}
114
+ // end::exclude-from-docs[]
115
+ {{/if}}
116
+ {{#if category}}
117
+ // end::category-{{category}}[]
118
+ {{/if}}
@@ -0,0 +1,13 @@
1
+ [cols="1a,1a"]
2
+ |===
3
+ | Topic property | Corresponding cluster property
4
+
5
+ {{#each topicProperties}}
6
+ | <<{{anchorName name}},`{{name}}`>>
7
+ | xref:./cluster-properties.adoc#{{corresponding_cluster_property}}[`{{corresponding_cluster_property}}`]
8
+ {{/each}}
9
+ |===
10
+
11
+ {{!-- Helper to generate anchor names --}}
12
+ {{!-- Usage: anchorName propertyName --}}
13
+ {{!-- Example: cleanup.policy -> cleanuppolicy --}}
@@ -1,4 +1,15 @@
1
- {{#unless is_deprecated}}
1
+ {{#if category}}
2
+ // tag::category-{{category}}[]
3
+ {{/if}}
4
+ {{#if exclude_from_docs}}
5
+ // tag::exclude-from-docs[]
6
+ {{/if}}
7
+ {{#if is_deprecated}}
8
+ // tag::deprecated[]
9
+ {{/if}}
10
+ {{#if cloud_supported}}
11
+ // tag::redpanda-cloud[]
12
+ {{/if}}
2
13
  === {{name}}
3
14
  {{#if version}}
4
15
 
@@ -17,6 +28,11 @@ ifndef::env-cloud[]
17
28
  *Enterprise license required*: `{{enterprise_value}}` (for license details, see xref:get-started:licensing/index.adoc[Redpanda Licensing])
18
29
  endif::[]
19
30
  {{/if}}
31
+ {{#if cloud_byoc_only}}
32
+ ifdef::env-cloud[]
33
+ NOTE: This property is only available in Redpanda Cloud BYOC deployments.
34
+ endif::[]
35
+ {{/if}}
20
36
  {{#if type}}
21
37
 
22
38
  *Type:* {{type}}
@@ -43,9 +59,19 @@ endif::[]
43
59
  {{/if}}
44
60
  {{/if}}
45
61
  {{#if (ne default undefined)}}
62
+ {{#if cloud_supported}}
63
+
64
+ ifdef::env-cloud[]
65
+ *Default:* Available in the Redpanda Cloud Console
66
+ endif::[]
67
+ ifndef::env-cloud[]
68
+ *Default:* `{{formatPropertyValue default type}}`
69
+ endif::[]
70
+ {{else}}
46
71
 
47
72
  *Default:* `{{formatPropertyValue default type}}`
48
73
  {{/if}}
74
+ {{/if}}
49
75
 
50
76
  *Nullable:* {{#if nullable}}Yes{{else}}No{{/if}}
51
77
  {{#if example}}
@@ -62,8 +88,21 @@ endif::[]
62
88
  {{/if}}
63
89
  {{#if aliases}}
64
90
 
91
+ // tag::self-managed-only[]
65
92
  *Aliases:* {{join aliases ", "}}
93
+ // end::self-managed-only[]
66
94
  {{/if}}
67
95
 
68
96
  ---
69
- {{/unless}}
97
+ {{#if cloud_supported}}
98
+ // end::redpanda-cloud[]
99
+ {{/if}}
100
+ {{#if is_deprecated}}
101
+ // end::deprecated[]
102
+ {{/if}}
103
+ {{#if exclude_from_docs}}
104
+ // end::exclude-from-docs[]
105
+ {{/if}}
106
+ {{#if category}}
107
+ // end::category-{{category}}[]
108
+ {{/if}}
@@ -1,100 +0,0 @@
1
- {{#unless is_deprecated}}
2
- {{#if cloud_supported}}
3
- // tag::redpanda-cloud[]
4
- {{/if}}
5
- === {{name}}
6
- {{#if version}}
7
-
8
- *Introduced in {{version}}*
9
- {{/if}}
10
- {{#if description}}
11
-
12
- {{{description}}}
13
- {{else}}
14
-
15
- No description available.
16
- {{/if}}
17
- {{#if is_enterprise}}
18
-
19
- ifndef::env-cloud[]
20
- *Enterprise license required*: `{{enterprise_value}}` (for license details, see xref:get-started:licensing/index.adoc[Redpanda Licensing])
21
- endif::[]
22
- {{/if}}
23
- {{#if cloud_byoc_only}}
24
- ifdef::env-cloud[]
25
- NOTE: This property is available only in Redpanda Cloud BYOC deployments.
26
- endif::[]
27
- {{/if}}
28
- {{#if units}}
29
-
30
- *Unit:* {{units}}
31
- {{else}}
32
- {{#if (formatUnits name)}}
33
-
34
- *Unit:* {{formatUnits name}}
35
- {{/if}}
36
- {{/if}}
37
- {{#if (ne defined_in "src/v/config/node_config.cc")}}
38
- {{#if (ne needs_restart undefined)}}
39
-
40
- *Requires restart:* {{#if needs_restart}}Yes{{else}}No{{/if}}
41
- {{/if}}
42
- {{/if}}
43
- {{#if visibility}}
44
-
45
- // tag::self-managed-only[]
46
- *Visibility:* `{{visibility}}`
47
- // end::self-managed-only[]
48
- {{/if}}
49
- {{#if type}}
50
-
51
- *Type:* {{type}}
52
- {{/if}}
53
- {{#if (and minimum maximum)}}
54
-
55
- *Accepted values:* [`{{minimum}}`, `{{maximum}}`]
56
- {{else}}
57
- {{#if minimum}}
58
-
59
- *Minimum value:* `{{minimum}}`
60
- {{/if}}
61
- {{#if maximum}}
62
-
63
- *Maximum value:* `{{maximum}}`
64
- {{/if}}
65
- {{/if}}
66
- {{#if (ne default undefined)}}
67
-
68
- ifdef::env-cloud[]
69
- *Default:* Available in the Redpanda Cloud Console
70
- endif::[]
71
- ifndef::env-cloud[]
72
- *Default:* `{{formatPropertyValue default type}}`
73
- endif::[]
74
- {{/if}}
75
-
76
- *Nullable:* {{#if nullable}}Yes{{else}}No{{/if}}
77
- {{#if example}}
78
-
79
- {{{renderPropertyExample this}}}
80
- {{/if}}
81
- {{#if related_topics}}
82
-
83
- *Related topics:*
84
-
85
- {{#each related_topics}}
86
- * {{{this}}}
87
- {{/each}}
88
- {{/if}}
89
- {{#if aliases}}
90
-
91
- // tag::self-managed-only[]
92
- *Aliases:* {{join aliases ", "}}
93
- // end::self-managed-only[]
94
- {{/if}}
95
-
96
- ---
97
- {{#if cloud_supported}}
98
- // end::redpanda-cloud[]
99
- {{/if}}
100
- {{/unless}}
@@ -1,17 +0,0 @@
1
- = {{pageTitle}}
2
- {{#if pageAliases}}
3
- :page-aliases: {{join pageAliases ", "}}
4
- {{/if}}
5
- :description: {{description}}
6
-
7
- {{{intro}}}
8
-
9
- {{#if sectionTitle}}
10
- == {{sectionTitle}}
11
- {{/if}}
12
-
13
- {{#if sectionIntro}}
14
- {{{sectionIntro}}}
15
- {{/if}}
16
-
17
- include::reference:partial$properties/{{filename}}.adoc[]
@@ -1,22 +0,0 @@
1
- = {{pageTitle}}
2
- {{#if pageAliases}}
3
- :page-aliases: {{join pageAliases ", "}}
4
- {{/if}}
5
- :description: {{description}}
6
-
7
- {{{intro}}}
8
-
9
- {{#if sectionTitle}}
10
- == {{sectionTitle}}
11
- {{/if}}
12
-
13
- {{#if sectionIntro}}
14
- {{{sectionIntro}}}
15
- {{/if}}
16
-
17
- {{#each groups}}
18
- {{#each this.properties}}
19
- {{> (lookup ../this "template")}}
20
-
21
- {{/each}}
22
- {{/each}}
@@ -1,94 +0,0 @@
1
- {{#unless is_deprecated}}
2
- {{#if cloud_supported}}
3
- // tag::redpanda-cloud[]
4
- {{/if}}
5
- === {{name}}
6
- {{#if version}}
7
-
8
- *Introduced in {{version}}*
9
- {{/if}}
10
- {{#if description}}
11
-
12
- {{{description}}}
13
- {{else}}
14
-
15
- No description available.
16
- {{/if}}
17
- {{#if is_enterprise}}
18
-
19
- ifndef::env-cloud[]
20
- *Enterprise license required*: `{{enterprise_value}}` (for license details, see xref:get-started:licensing/index.adoc[Redpanda Licensing])
21
- endif::[]
22
- {{/if}}
23
- {{#if cloud_byoc_only}}
24
-
25
- NOTE: This property is only available in Redpanda Cloud BYOC deployments.
26
- {{/if}}
27
- {{#if type}}
28
-
29
- *Type:* {{type}}
30
- {{/if}}
31
- {{#if acceptable_values}}
32
-
33
- *Accepted values:* {{{acceptable_values}}}
34
- {{/if}}
35
- {{#if corresponding_cluster_property}}
36
-
37
- *Related cluster property:* xref:reference:cluster-properties.adoc#{{corresponding_cluster_property}}[{{corresponding_cluster_property}}]
38
- {{/if}}
39
- {{#if (and minimum maximum)}}
40
-
41
- *Accepted values:* [`{{minimum}}`, `{{maximum}}`]
42
- {{else}}
43
- {{#if minimum}}
44
-
45
- *Minimum value:* `{{minimum}}`
46
- {{/if}}
47
- {{#if maximum}}
48
-
49
- *Maximum value:* `{{maximum}}`
50
- {{/if}}
51
- {{/if}}
52
- {{#if (ne default undefined)}}
53
- {{#if cloud_supported}}
54
-
55
- ifdef::env-cloud[]
56
- *Default:* Available in the Redpanda Cloud Console
57
- endif::[]
58
- ifndef::env-cloud[]
59
- *Default:* `{{formatPropertyValue default type}}`
60
- endif::[]
61
- {{else}}
62
-
63
- *Default:* `{{formatPropertyValue default type}}`
64
- {{/if}}
65
- {{/if}}
66
-
67
- // tag::self-managed-only[]
68
- *Nullable:* {{#if nullable}}Yes{{else}}No{{/if}}
69
- // end::self-managed-only[]
70
- {{#if example}}
71
-
72
- {{{renderPropertyExample this}}}
73
- {{/if}}
74
- {{#if related_topics}}
75
-
76
- *Related topics:*
77
-
78
- {{#each related_topics}}
79
- * {{{this}}}
80
- {{/each}}
81
- {{/if}}
82
- {{#if aliases}}
83
-
84
- // tag::self-managed-only[]
85
- *Aliases:* {{join aliases ", "}}
86
- // end::self-managed-only[]
87
- {{/if}}
88
-
89
- ---
90
- {{#if cloud_supported}}
91
- // end::redpanda-cloud[]
92
- {{/if}}
93
-
94
- {{/unless}}