@dogsbay/adapter-tigera 0.2.0-beta.135 → 0.2.0-beta.137
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.
- package/dist/data-components.d.ts +80 -0
- package/dist/data-components.js +520 -0
- package/dist/index.js +11 -1
- package/package.json +3 -3
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tigera's data components as template partials over their JSON (plans/page-templates.md, "Data
|
|
3
|
+
* components in the Docusaurus importer"). Each template reproduces what the React component
|
|
4
|
+
* renders, from the same file, which is copied into the site's `data/`:
|
|
5
|
+
* - `<FelixConfig configType name />` over `_includes/components/FelixConfig/config-params.json`
|
|
6
|
+
* (identical in every product and version);
|
|
7
|
+
* - `<ComponentVersions />` over the docs folder's `releases.json` (the `variables.js` list),
|
|
8
|
+
* in two variants: Calico links the GitHub release archive, Calico Enterprise its own.
|
|
9
|
+
* - `<ReleaseArchiveTable />` (Calico Enterprise) over the same `releases.json`.
|
|
10
|
+
* - `<PrivateRegistryRegular />` and `<PrivateRegistryImagePath />` (Calico Enterprise): the
|
|
11
|
+
* `docker pull`/`tag`/`push` and `crane cp` commands for the first release's images, over
|
|
12
|
+
* the same `releases.json`, with `registry` and the product names from variables.js and the
|
|
13
|
+
* Installation `variant` read from the component's own source (it changed in 3.23-2).
|
|
14
|
+
* - `<VersionedCloudImageList />` (Calico Cloud): the Helm commands for each Calico Cloud
|
|
15
|
+
* version's images, from `src/___new___/data/ccImageLists.js` (a data MODULE, read as data and
|
|
16
|
+
* written as JSON). The component is a version select; a static page shows every version as
|
|
17
|
+
* a tab, the first (the select's default) first.
|
|
18
|
+
* - `<MaintenanceImageOptionsAlternateRegistry />` (Calico): the pull/tag/push and `crane cp`
|
|
19
|
+
* lines for the first release's images named in variables.js's `imageNames`.
|
|
20
|
+
* - `<InstallOpenShiftManifests />` (Calico 3.30 on): the download with its `--exclude` flags,
|
|
21
|
+
* then Tigera's own `<ConfigDataplaneOpenShiftManifests />`, included as converted.
|
|
22
|
+
* - `<FossaReport />` (Calico Enterprise): a link to the attribution report.
|
|
23
|
+
* Paths are relative to the docs folder imported, so each version reads its own copy.
|
|
24
|
+
*
|
|
25
|
+
* Fidelity notes, against the components:
|
|
26
|
+
* - A `name` that matches no group says so, as the component does: Tigera's resource pages call
|
|
27
|
+
* `Data plane: Common` where the JSON says `Dataplane: Common`, and its site shows the message.
|
|
28
|
+
* - Descriptions and schemas are the Markdown fields (`Description`, `StringSchema`), not the
|
|
29
|
+
* `…HTML` copies the components inject. A description's lines join into one table cell,
|
|
30
|
+
* as Tigera's own HTML shows them (its lists and links are literal text there too).
|
|
31
|
+
* - Heading anchors keep the components' ids: the field name, and `toKebab` (the FIRST space
|
|
32
|
+
* replaced, lowercased) for a release, written by `| heading_id` (a `{#{{` would open a
|
|
33
|
+
* template comment). Values print through template pages' Markdown-aware filters (`| text`,
|
|
34
|
+
* `| code`, `| cell`, `| href`), so a value from the JSON cannot add structure.
|
|
35
|
+
* - The private-registry commands are exactly the components' text, faults included: in the
|
|
36
|
+
* image-path variant the operator's `docker push` has no line break, so the first image's
|
|
37
|
+
* push joins its line, and the Windows `crane cp` lines use the global `registry`, not the
|
|
38
|
+
* image's own; the `sed … /a` lines show no backslash before their spaces (`\ ` in a JS
|
|
39
|
+
* template literal is a space). A code block written outside a list item is drawn in the item before it;
|
|
40
|
+
* `// highlight-next-line` becomes the line highlight it means. A value in a code block is
|
|
41
|
+
* printed on one line, so it cannot close the fence.
|
|
42
|
+
*/
|
|
43
|
+
import { type PreprocessContext, type TemplateComponent } from "@dogsbay/format-docusaurus/adapter";
|
|
44
|
+
/** `<ComponentVersions />` for the product being imported, with its name (and downloads URL) from variables.js. */
|
|
45
|
+
declare function componentVersions(ctx: PreprocessContext): TemplateComponent | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* `<VersionedCloudImageList />` (Calico Cloud). The component reads the CURRENT product's
|
|
48
|
+
* variables.js (`calico-cloud/variables`) on every version, so this does too. Converted only when
|
|
49
|
+
* every version label and image line is a plain image reference: a value then cannot end its
|
|
50
|
+
* code block or add a line. Anything else keeps the placeholder.
|
|
51
|
+
*/
|
|
52
|
+
declare function cloudImageList(ctx: PreprocessContext): TemplateComponent | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* `<MaintenanceImageOptionsAlternateRegistry />` (Calico): the first release's images pulled, retagged
|
|
55
|
+
* and pushed to `$REGISTRY` (Windows ones by `crane cp`), each under its name in variables.js's
|
|
56
|
+
* `imageNames`, which is written into the partial as a dict. Names and the registry must be plain
|
|
57
|
+
* image references; anything else keeps the placeholder.
|
|
58
|
+
*/
|
|
59
|
+
declare function alternateRegistry(ctx: PreprocessContext): TemplateComponent | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* `<InstallOpenShiftManifests />` (Calico 3.30 on): the download, with `--exclude` for each file of
|
|
62
|
+
* `filesToExclude` (a list the component builds in a loop, which the JSX converter cannot read),
|
|
63
|
+
* then `<ConfigDataplaneOpenShiftManifests folderName="manifests" />` unless
|
|
64
|
+
* `skipDataplaneConfigSteps`, INCLUDED as the converter writes it, so its text is Tigera's own.
|
|
65
|
+
* Only for the component's source in that shape (READ as text); any other version or product
|
|
66
|
+
* (3.29, Calico Enterprise) converts as it is.
|
|
67
|
+
*/
|
|
68
|
+
declare function openshiftManifests(ctx: PreprocessContext): TemplateComponent | undefined;
|
|
69
|
+
export declare const TIGERA_DATA_COMPONENTS: {
|
|
70
|
+
MaintenanceImageOptionsAlternateRegistry: typeof alternateRegistry;
|
|
71
|
+
InstallOpenShiftManifests: typeof openshiftManifests;
|
|
72
|
+
FossaReport: TemplateComponent;
|
|
73
|
+
FelixConfig: TemplateComponent;
|
|
74
|
+
ComponentVersions: typeof componentVersions;
|
|
75
|
+
ReleaseArchiveTable: TemplateComponent;
|
|
76
|
+
PrivateRegistryRegular: (ctx: PreprocessContext) => TemplateComponent | undefined;
|
|
77
|
+
VersionedCloudImageList: typeof cloudImageList;
|
|
78
|
+
PrivateRegistryImagePath: (ctx: PreprocessContext) => TemplateComponent | undefined;
|
|
79
|
+
};
|
|
80
|
+
export {};
|
|
@@ -0,0 +1,520 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tigera's data components as template partials over their JSON (plans/page-templates.md, "Data
|
|
3
|
+
* components in the Docusaurus importer"). Each template reproduces what the React component
|
|
4
|
+
* renders, from the same file, which is copied into the site's `data/`:
|
|
5
|
+
* - `<FelixConfig configType name />` over `_includes/components/FelixConfig/config-params.json`
|
|
6
|
+
* (identical in every product and version);
|
|
7
|
+
* - `<ComponentVersions />` over the docs folder's `releases.json` (the `variables.js` list),
|
|
8
|
+
* in two variants: Calico links the GitHub release archive, Calico Enterprise its own.
|
|
9
|
+
* - `<ReleaseArchiveTable />` (Calico Enterprise) over the same `releases.json`.
|
|
10
|
+
* - `<PrivateRegistryRegular />` and `<PrivateRegistryImagePath />` (Calico Enterprise): the
|
|
11
|
+
* `docker pull`/`tag`/`push` and `crane cp` commands for the first release's images, over
|
|
12
|
+
* the same `releases.json`, with `registry` and the product names from variables.js and the
|
|
13
|
+
* Installation `variant` read from the component's own source (it changed in 3.23-2).
|
|
14
|
+
* - `<VersionedCloudImageList />` (Calico Cloud): the Helm commands for each Calico Cloud
|
|
15
|
+
* version's images, from `src/___new___/data/ccImageLists.js` (a data MODULE, read as data and
|
|
16
|
+
* written as JSON). The component is a version select; a static page shows every version as
|
|
17
|
+
* a tab, the first (the select's default) first.
|
|
18
|
+
* - `<MaintenanceImageOptionsAlternateRegistry />` (Calico): the pull/tag/push and `crane cp`
|
|
19
|
+
* lines for the first release's images named in variables.js's `imageNames`.
|
|
20
|
+
* - `<InstallOpenShiftManifests />` (Calico 3.30 on): the download with its `--exclude` flags,
|
|
21
|
+
* then Tigera's own `<ConfigDataplaneOpenShiftManifests />`, included as converted.
|
|
22
|
+
* - `<FossaReport />` (Calico Enterprise): a link to the attribution report.
|
|
23
|
+
* Paths are relative to the docs folder imported, so each version reads its own copy.
|
|
24
|
+
*
|
|
25
|
+
* Fidelity notes, against the components:
|
|
26
|
+
* - A `name` that matches no group says so, as the component does: Tigera's resource pages call
|
|
27
|
+
* `Data plane: Common` where the JSON says `Dataplane: Common`, and its site shows the message.
|
|
28
|
+
* - Descriptions and schemas are the Markdown fields (`Description`, `StringSchema`), not the
|
|
29
|
+
* `…HTML` copies the components inject. A description's lines join into one table cell,
|
|
30
|
+
* as Tigera's own HTML shows them (its lists and links are literal text there too).
|
|
31
|
+
* - Heading anchors keep the components' ids: the field name, and `toKebab` (the FIRST space
|
|
32
|
+
* replaced, lowercased) for a release, written by `| heading_id` (a `{#{{` would open a
|
|
33
|
+
* template comment). Values print through template pages' Markdown-aware filters (`| text`,
|
|
34
|
+
* `| code`, `| cell`, `| href`), so a value from the JSON cannot add structure.
|
|
35
|
+
* - The private-registry commands are exactly the components' text, faults included: in the
|
|
36
|
+
* image-path variant the operator's `docker push` has no line break, so the first image's
|
|
37
|
+
* push joins its line, and the Windows `crane cp` lines use the global `registry`, not the
|
|
38
|
+
* image's own; the `sed … /a` lines show no backslash before their spaces (`\ ` in a JS
|
|
39
|
+
* template literal is a space). A code block written outside a list item is drawn in the item before it;
|
|
40
|
+
* `// highlight-next-line` becomes the line highlight it means. A value in a code block is
|
|
41
|
+
* printed on one line, so it cannot close the fence.
|
|
42
|
+
*/
|
|
43
|
+
import { readDataModule } from "@dogsbay/format-docusaurus/adapter";
|
|
44
|
+
import { loadVariables } from "./variables.js";
|
|
45
|
+
/**
|
|
46
|
+
* A value as inline code (`| code`: one line, in a fence its backticks cannot close). Template
|
|
47
|
+
* pages never evaluate inside a code span written in the page, so the filter writes the span.
|
|
48
|
+
*/
|
|
49
|
+
const code = (expr) => `{{ (${expr}) | code }}`;
|
|
50
|
+
/** The same in a table cell (`| cell`: one line, `|` escaped). */
|
|
51
|
+
const codeCell = (expr) => `{{ (${expr}) | code | cell }}`;
|
|
52
|
+
/** A heading's `{#id}` from a value (`| heading_id`: nothing in it can end the block). */
|
|
53
|
+
const headingId = (expr) => `{{ (${expr}) | heading_id }}`;
|
|
54
|
+
/** One Felix field's table, for the configuration file or the environment variable. */
|
|
55
|
+
const felixTable = (key) => `| Attribute | Value |
|
|
56
|
+
| --- | --- |
|
|
57
|
+
| Key | ${codeCell(key)} |
|
|
58
|
+
| Description | {{ f.Description | cell }} |
|
|
59
|
+
| Schema | {{ f.StringSchema | cell }} |
|
|
60
|
+
| Default | {% if f.StringDefault == "" %}none{% elif f.GoType == "*v1.Duration" %}${codeCell("f.StringDefault")} ({{ f.ParsedDefault | text }}){% else %}${codeCell("f.StringDefault")}{% endif %} |`;
|
|
61
|
+
const FELIX_TEXT = `{%- set g = data.felix_config.Groups | selectattr("Name", "equalto", name) | first -%}
|
|
62
|
+
{%- if not g -%}
|
|
63
|
+
No matching group found for '{{ name | text }}'.
|
|
64
|
+
{%- elif config_type == "yaml" -%}
|
|
65
|
+
{%- for f in g.Fields -%}
|
|
66
|
+
{%- if f.NameYAML %}
|
|
67
|
+
|
|
68
|
+
##### ${code("f.NameYAML")} ${headingId("f.NameYAML")}
|
|
69
|
+
|
|
70
|
+
| Attribute | Value |
|
|
71
|
+
| --- | --- |
|
|
72
|
+
| Key | ${codeCell("f.NameYAML")} |
|
|
73
|
+
| Description | {{ f.Description | cell }} |
|
|
74
|
+
| Schema | {{ f.YAMLSchema | cell }} |
|
|
75
|
+
| Default | {% if f.YAMLDefault == "" %}none{% else %}${codeCell("f.YAMLDefault")}{% endif %} |
|
|
76
|
+
{%- endif -%}
|
|
77
|
+
{%- endfor %}
|
|
78
|
+
{%- elif config_type == "configenv" -%}
|
|
79
|
+
{%- for f in g.Fields %}
|
|
80
|
+
|
|
81
|
+
#### ${code("f.NameConfigFile")} ${headingId("f.NameConfigFile")}
|
|
82
|
+
|
|
83
|
+
:::tabs{groupId="operating-systems"}
|
|
84
|
+
Configuration file
|
|
85
|
+
: ${felixTable("f.NameConfigFile")}
|
|
86
|
+
|
|
87
|
+
Environment variable
|
|
88
|
+
: ${felixTable("f.NameEnvVar | upper")}
|
|
89
|
+
:::
|
|
90
|
+
{%- endfor %}
|
|
91
|
+
{%- else -%}
|
|
92
|
+
You got it wrong
|
|
93
|
+
{%- endif %}
|
|
94
|
+
`;
|
|
95
|
+
const FELIX = {
|
|
96
|
+
name: "felix-config",
|
|
97
|
+
text: FELIX_TEXT,
|
|
98
|
+
params: { configType: "config_type", name: "name" },
|
|
99
|
+
data: { "felix-config.json": "_includes/components/FelixConfig/config-params.json" },
|
|
100
|
+
};
|
|
101
|
+
/** The release's version as the heading shows it: a leading `v` dropped. */
|
|
102
|
+
const SHOWN = `release.title[1:] if release.title.startswith("v") else release.title`;
|
|
103
|
+
/** The heading's id, Tigera's `toKebab` of the title: the first space replaced, lowercased. */
|
|
104
|
+
const KEBAB = headingId(`"component-versions-" ~ release.title.replace(" ", "-", 1).lower()`);
|
|
105
|
+
/** The operator image a release installs, as inline code. */
|
|
106
|
+
const OPERATOR = code(`release["tigera-operator"].registry ~ "/" ~ release["tigera-operator"].image ~ ":" ~ release["tigera-operator"].version`);
|
|
107
|
+
const versionsText = (archive) => `{%- for release in data.releases %}
|
|
108
|
+
|
|
109
|
+
## Component versions for {{ prodname | text }} {{ (${SHOWN}) | replace("\\n", " ") | text }} ${KEBAB}
|
|
110
|
+
|
|
111
|
+
{% if release.title != "master" %}${archive}
|
|
112
|
+
|
|
113
|
+
{% endif %}This release comprises the following components, and can be installed using ${OPERATOR}
|
|
114
|
+
|
|
115
|
+
| Component | Version |
|
|
116
|
+
| --- | --- |
|
|
117
|
+
{% for name, c in release.components | items %}| {{ name | text }} | {{ c.version | text }} |
|
|
118
|
+
{% endfor %}
|
|
119
|
+
{%- endfor %}
|
|
120
|
+
`;
|
|
121
|
+
const CALICO_ARCHIVE = `[Release archive]({{ ("https://github.com/projectcalico/calico/releases/download/" ~ release.title ~ "/release-" ~ release.title ~ ".tgz") | href }}) with Kubernetes manifests.`;
|
|
122
|
+
const ENTERPRISE_ARCHIVE = `[Release archive]({{ (downloadsurl ~ "/ee/archives/release-" ~ release.title ~ "-" ~ release["tigera-operator"].version ~ ".tgz") | href }}) with Kubernetes manifests. Based on Calico {{ data.releases[0].calico.minor_version | replace("\\n", " ") | text }}.`;
|
|
123
|
+
/** `<ComponentVersions />` for the product being imported, with its name (and downloads URL) from variables.js. */
|
|
124
|
+
function componentVersions(ctx) {
|
|
125
|
+
const vars = loadVariables(ctx);
|
|
126
|
+
const prodname = typeof vars.prodname === "string" ? vars.prodname : undefined;
|
|
127
|
+
if (prodname === undefined)
|
|
128
|
+
return undefined;
|
|
129
|
+
const data = { "releases.json": "releases.json" };
|
|
130
|
+
if (/^calico-enterprise(_versioned_docs\/|$)/.test(ctx.instanceRoot ?? "")) {
|
|
131
|
+
const downloadsurl = typeof vars.downloadsurl === "string" ? vars.downloadsurl : undefined;
|
|
132
|
+
if (downloadsurl === undefined)
|
|
133
|
+
return undefined;
|
|
134
|
+
return { name: "component-versions-enterprise", text: versionsText(ENTERPRISE_ARCHIVE), values: { prodname, downloadsurl }, data };
|
|
135
|
+
}
|
|
136
|
+
return { name: "component-versions", text: versionsText(CALICO_ARCHIVE), values: { prodname }, data };
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* `<ReleaseArchiveTable />` (Calico Enterprise): every release's archive, from `releases.json`.
|
|
140
|
+
* The URL is the one the component builds (downloads.tigera.io, not `downloadsurl`), shown as
|
|
141
|
+
* the link's text as on the site.
|
|
142
|
+
*/
|
|
143
|
+
const RELEASE_ARCHIVES = {
|
|
144
|
+
name: "release-archive-table",
|
|
145
|
+
text: `| Patch version | Release archive link |
|
|
146
|
+
| --- | --- |
|
|
147
|
+
{% for release in data.releases -%}
|
|
148
|
+
{%- set url = "https://downloads.tigera.io/ee/archives/release-" ~ release.title ~ "-" ~ release["tigera-operator"].version ~ ".tgz" -%}
|
|
149
|
+
| {{ release.title | text }} | [{{ url | text }}]({{ url | href }}) |
|
|
150
|
+
{% endfor %}`,
|
|
151
|
+
data: { "releases.json": "releases.json" },
|
|
152
|
+
};
|
|
153
|
+
/** A value in a code block: one line, so nothing in it can close the fence. */
|
|
154
|
+
const line = (expr) => `{{ (${expr}) | string | replace("\\r", " ") | replace("\\n", " ") }}`;
|
|
155
|
+
/** The image's registry, as the component's `mapComponentToRegistry`: its own, else variables.js's. */
|
|
156
|
+
const REGISTRY = `((c.registry ~ "/") if c.registry is defined and c.registry else registry)`;
|
|
157
|
+
/** The images the commands cover: each component with one, Windows ones (`-windows`) apart. */
|
|
158
|
+
const LINUX = `{% for _, c in data.releases[0].components | items %}{% if c.image is defined and c.image and "-windows" not in c.image %}`;
|
|
159
|
+
const WINDOWS = `{% for _, c in data.releases[0].components | items %}{% if c.image is defined and c.image and "-windows" in c.image %}`;
|
|
160
|
+
const END = `{% endif %}{% endfor %}`;
|
|
161
|
+
const OP = `data.releases[0]["tigera-operator"]`;
|
|
162
|
+
const IMAGE = `c.image ~ ":" ~ c.version`;
|
|
163
|
+
const NAME = `(c.image.split("/") | last) ~ ":" ~ c.version`;
|
|
164
|
+
const OP_NAME = `(${OP}.image.split("/") | last) ~ ":" ~ ${OP}.version`;
|
|
165
|
+
const OP_SOURCE = `${OP}.registry ~ "/" ~ ${OP}.image ~ ":" ~ ${OP}.version`;
|
|
166
|
+
const PULL = (indent) => `${indent}\`\`\`bash {minja}
|
|
167
|
+
${indent}docker pull ${line(OP_SOURCE)}
|
|
168
|
+
${indent}${LINUX}docker pull ${line(`${REGISTRY} ~ ${IMAGE}`)}
|
|
169
|
+
${indent}${END}\`\`\``;
|
|
170
|
+
const installation = (imagePath) => `\`\`\`yaml {highlights="${imagePath ? "9-10" : "9"}" minja}
|
|
171
|
+
apiVersion: operator.tigera.io/v1
|
|
172
|
+
kind: Installation
|
|
173
|
+
metadata:
|
|
174
|
+
name: default
|
|
175
|
+
spec:
|
|
176
|
+
variant: ${line("variant")}
|
|
177
|
+
imagePullSecrets:
|
|
178
|
+
- name: tigera-pull-secret
|
|
179
|
+
registry: myregistry.com${imagePath ? "\n imagePath: my-image-path" : ""}
|
|
180
|
+
\`\`\``;
|
|
181
|
+
const PULL_SECRET = `Next, ensure that an image pull secret has been configured for your custom registry. Set the enviroment variable \`PRIVATE_REGISTRY_PULL_SECRET\` to the secret name. Then add the image pull secret to the operator deployment spec:
|
|
182
|
+
|
|
183
|
+
\`\`\`bash
|
|
184
|
+
sed -ie "/serviceAccountName: tigera-operator/a imagePullSecrets:\\n - name: $PRIVATE_REGISTRY_PULL_SECRET" tigera-operator.yaml
|
|
185
|
+
\`\`\``;
|
|
186
|
+
const PROMETHEUS = (sub) => `If you are installing Prometheus operator as part of {{ prodname | text }}, then before applying \`tigera-prometheus-operator.yaml\`, modify registry references to use your custom registry:
|
|
187
|
+
|
|
188
|
+
\`\`\`bash
|
|
189
|
+
sed -ie "${sub}" tigera-prometheus-operator.yaml
|
|
190
|
+
sed -ie "/serviceAccountName: calico-prometheus-operator/a imagePullSecrets:\\n - name: $PRIVATE_REGISTRY_PULL_SECRET" tigera-prometheus-operator.yaml
|
|
191
|
+
\`\`\``;
|
|
192
|
+
const INTRO = `In order to install images from your private registry, you must first pull the images from Tigera's registry, re-tag them with your own registry, and then push the newly tagged images to your own registry.`;
|
|
193
|
+
const REGULAR_TEXT = `#### Push {{ prodname | text }} images to your private registry ${headingId(`"push-" ~ prodnamedash ~ "-images-to-your-private-registry"`)}
|
|
194
|
+
|
|
195
|
+
${INTRO}
|
|
196
|
+
|
|
197
|
+
1. Use the following commands to pull the required {{ prodname | text }} images.
|
|
198
|
+
|
|
199
|
+
${PULL(" ")}
|
|
200
|
+
|
|
201
|
+
2. Retag the images with the name of your private registry \`$PRIVATE_REGISTRY\`.
|
|
202
|
+
|
|
203
|
+
\`\`\`bash {minja}
|
|
204
|
+
docker tag ${line(OP_SOURCE)} $PRIVATE_REGISTRY/${line(`${OP}.image ~ ":" ~ ${OP}.version`)}
|
|
205
|
+
${LINUX}docker tag ${line(`${REGISTRY} ~ ${IMAGE}`)} $PRIVATE_REGISTRY/${line(IMAGE)}
|
|
206
|
+
${END}\`\`\`
|
|
207
|
+
|
|
208
|
+
3. Push the images to your private registry.
|
|
209
|
+
|
|
210
|
+
\`\`\`bash {minja}
|
|
211
|
+
docker push $PRIVATE_REGISTRY/${line(`${OP}.image ~ ":" ~ ${OP}.version`)}
|
|
212
|
+
${LINUX}docker push $PRIVATE_REGISTRY/${line(IMAGE)}
|
|
213
|
+
${END}\`\`\`
|
|
214
|
+
|
|
215
|
+
:::warning
|
|
216
|
+
Do not push the private {{ prodname | text }} images to a public registry.
|
|
217
|
+
:::
|
|
218
|
+
|
|
219
|
+
4. Use \`crane cp\` to copy the Windows images to your private registry.
|
|
220
|
+
|
|
221
|
+
For hybrid Linux + Windows clusters, use \`crane cp\` on the following Windows images to copy them to your private registry.
|
|
222
|
+
|
|
223
|
+
\`\`\`bash {minja}
|
|
224
|
+
${WINDOWS}crane cp ${line(`${REGISTRY} ~ ${IMAGE}`)} $PRIVATE_REGISTRY/$IMAGE_PATH/${line(NAME)}
|
|
225
|
+
${END}\`\`\`
|
|
226
|
+
|
|
227
|
+
:::warning
|
|
228
|
+
Do not \`crane cp\` the private {{ prodname_windows | text }} images to a public registry.
|
|
229
|
+
:::
|
|
230
|
+
|
|
231
|
+
#### Run the operator using images from your private registry {#run-the-operator-using-images-from-your-private-registry}
|
|
232
|
+
|
|
233
|
+
Before applying \`tigera-operator.yaml\`, modify registry references to use your custom registry:
|
|
234
|
+
|
|
235
|
+
\`\`\`
|
|
236
|
+
sed -ie "s?quay.io?$PRIVATE_REGISTRY?g" tigera-operator.yaml
|
|
237
|
+
\`\`\`
|
|
238
|
+
|
|
239
|
+
${PULL_SECRET}
|
|
240
|
+
|
|
241
|
+
${PROMETHEUS("s?quay.io?$PRIVATE_REGISTRY?g")}
|
|
242
|
+
|
|
243
|
+
Before applying \`custom-resources.yaml\`, modify registry references to use your custom registry:
|
|
244
|
+
|
|
245
|
+
\`\`\`bash
|
|
246
|
+
sed -ie "s?quay.io?$PRIVATE_REGISTRY?g" custom-resources.yaml
|
|
247
|
+
\`\`\`
|
|
248
|
+
|
|
249
|
+
#### Configure the operator to use images from your private registry. {#configure-the-operator-to-use-images-from-your-private-registry}
|
|
250
|
+
|
|
251
|
+
Set the \`spec.registry\` field of your Installation resource to the name of your custom registry. For example:
|
|
252
|
+
|
|
253
|
+
${installation(false)}
|
|
254
|
+
`;
|
|
255
|
+
const IMAGE_PATH_SUB = "s?quay.io.*/?$PRIVATE_REGISTRY/$IMAGE_PATH/?";
|
|
256
|
+
const IMAGE_PATH_TEXT = `### Push {{ prodname | text }} images to your private registry image path ${headingId(`"push-" ~ prodnamedash ~ "-images-to-your-private-registry-image-path"`)}
|
|
257
|
+
|
|
258
|
+
${INTRO}
|
|
259
|
+
|
|
260
|
+
1. Use the following commands to pull the required {{ prodname | text }} images.
|
|
261
|
+
|
|
262
|
+
${PULL(" ")}
|
|
263
|
+
|
|
264
|
+
2. Retag the images with the name of your private registry \`$PRIVATE_REGISTRY\` and \`$IMAGE_PATH\`.
|
|
265
|
+
|
|
266
|
+
\`\`\`bash {minja}
|
|
267
|
+
docker tag ${line(OP_SOURCE)} $PRIVATE_REGISTRY/$IMAGE_PATH/${line(OP_NAME)}
|
|
268
|
+
${LINUX}docker tag ${line(`${REGISTRY} ~ ${IMAGE}`)} $PRIVATE_REGISTRY/$IMAGE_PATH/${line(NAME)}
|
|
269
|
+
${END}\`\`\`
|
|
270
|
+
|
|
271
|
+
3. Push the images to your private registry.
|
|
272
|
+
|
|
273
|
+
\`\`\`bash {minja}
|
|
274
|
+
docker push $PRIVATE_REGISTRY/$IMAGE_PATH/${line(OP_NAME)}${LINUX}docker push $PRIVATE_REGISTRY/$IMAGE_PATH/${line(NAME)}
|
|
275
|
+
${END}\`\`\`
|
|
276
|
+
|
|
277
|
+
:::warning
|
|
278
|
+
Do not push the private {{ prodname | text }} images to a public registry.
|
|
279
|
+
:::
|
|
280
|
+
|
|
281
|
+
4. Use \`crane cp\` to copy the Windows images to your private registry.
|
|
282
|
+
|
|
283
|
+
For hybrid Linux + Windows clusters, use \`crane cp\` on the following Windows images to copy them to your private registry.
|
|
284
|
+
|
|
285
|
+
\`\`\`bash {minja}
|
|
286
|
+
${WINDOWS}crane cp ${line(`registry ~ ${IMAGE}`)} $PRIVATE_REGISTRY/$IMAGE_PATH/${line(NAME)}
|
|
287
|
+
${END}\`\`\`
|
|
288
|
+
|
|
289
|
+
:::warning
|
|
290
|
+
Do not \`crane cp\` the private {{ prodname_windows | text }} images to a public registry.
|
|
291
|
+
:::
|
|
292
|
+
|
|
293
|
+
### Run the operator using images from your private registry image path {#run-the-operator-using-images-from-your-private-registry-image-path}
|
|
294
|
+
|
|
295
|
+
Before applying \`tigera-operator.yaml\`, modify registry references to use your custom registry:
|
|
296
|
+
|
|
297
|
+
\`\`\`bash
|
|
298
|
+
sed -ie "${IMAGE_PATH_SUB}" tigera-operator.yaml
|
|
299
|
+
\`\`\`
|
|
300
|
+
|
|
301
|
+
${PULL_SECRET}
|
|
302
|
+
|
|
303
|
+
${PROMETHEUS(IMAGE_PATH_SUB)}
|
|
304
|
+
|
|
305
|
+
Before applying \`custom-resources.yaml\`, modify registry references to use your custom registry:
|
|
306
|
+
|
|
307
|
+
\`\`\`bash
|
|
308
|
+
sed -ie "${IMAGE_PATH_SUB}" custom-resources.yaml
|
|
309
|
+
\`\`\`
|
|
310
|
+
|
|
311
|
+
For **OpenShift**, after downloading all manifests modify the following to use your custom registry:
|
|
312
|
+
|
|
313
|
+
\`\`\`bash
|
|
314
|
+
sed -ie "${IMAGE_PATH_SUB}" manifests/02-tigera-operator.yaml
|
|
315
|
+
\`\`\`
|
|
316
|
+
|
|
317
|
+
:::note
|
|
318
|
+
Add the image pull secret for your \`registry\` to the secret \`tigera-pull-secret\`
|
|
319
|
+
:::
|
|
320
|
+
|
|
321
|
+
### Configure the operator to use images from your private registry image path. {#configure-the-operator-to-use-images-from-your-private-registry-image-path}
|
|
322
|
+
|
|
323
|
+
Set the \`spec.registry\` and \`spec.imagePath\` field of your Installation resource to the name of your custom registry. For example:
|
|
324
|
+
|
|
325
|
+
${installation(true)}
|
|
326
|
+
`;
|
|
327
|
+
/**
|
|
328
|
+
* A private-registry component for the version imported: the names and `registry` from its
|
|
329
|
+
* variables.js, the Installation `variant` from the component's own source (READ as text,
|
|
330
|
+
* never run). Anything missing keeps the placeholder.
|
|
331
|
+
*/
|
|
332
|
+
function privateRegistry(component, name, text) {
|
|
333
|
+
return (ctx) => {
|
|
334
|
+
const vars = loadVariables(ctx);
|
|
335
|
+
const str = (k) => (typeof vars[k] === "string" ? vars[k] : undefined);
|
|
336
|
+
const [prodname, prodnamedash, prodname_windows, registry] = ["prodname", "prodnamedash", "prodnameWindows", "registry"].map(str);
|
|
337
|
+
const root = ctx.instanceRoot ? `${ctx.instanceRoot}/` : "";
|
|
338
|
+
const source = ctx.corpus?.text(`${root}_includes/components/${component}.js`);
|
|
339
|
+
const variant = source && /^[ \t]*variant:[ \t]*([A-Za-z]+)[ \t]*$/m.exec(source)?.[1];
|
|
340
|
+
if (!prodname || !prodnamedash || !prodname_windows || registry === undefined || !variant)
|
|
341
|
+
return undefined;
|
|
342
|
+
return { name, text, values: { prodname, prodnamedash, prodname_windows, registry, variant }, data: { "releases.json": "releases.json" } };
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
/** The image lists: `src/___new___/data/ccImageLists.js`, version → one image per line. */
|
|
346
|
+
const CC_IMAGE_LISTS = "src/___new___/data/ccImageLists.js";
|
|
347
|
+
const IMAGE_REF = /^[A-Za-z0-9._/:@-]*$/;
|
|
348
|
+
/** A version label: printed raw in the code block's title, so no quote, brace or line break. */
|
|
349
|
+
const VERSION_LABEL = /^[A-Za-z0-9._()-][A-Za-z0-9._ ()-]{0,59}$/;
|
|
350
|
+
const CLOUD_IMAGES_TEXT = `Select your version:
|
|
351
|
+
|
|
352
|
+
:::tabs
|
|
353
|
+
{%- for version, images in data.cc_image_lists | items %}
|
|
354
|
+
|
|
355
|
+
{{ version | text }}
|
|
356
|
+
: \`\`\`javascript {title="Helm command to add images for Calico Cloud {{ version }}" minja}
|
|
357
|
+
helm repo add calico-cloud ${line("clouddownloadbase")}/charts
|
|
358
|
+
INSTALLER_IMAGE="${line("cloudoperatorimage")}:$(helm show chart calico-cloud/calico-cloud | grep version: | sed -e 's/version: *//' -e 's/+/-g/')"
|
|
359
|
+
IMAGES=(
|
|
360
|
+
$INSTALLER_IMAGE
|
|
361
|
+
{% for image in images.split("\\n") %}${line("image")}
|
|
362
|
+
{% endfor %})
|
|
363
|
+
\`\`\`
|
|
364
|
+
{%- endfor %}
|
|
365
|
+
:::
|
|
366
|
+
`;
|
|
367
|
+
/**
|
|
368
|
+
* `<VersionedCloudImageList />` (Calico Cloud). The component reads the CURRENT product's
|
|
369
|
+
* variables.js (`calico-cloud/variables`) on every version, so this does too. Converted only when
|
|
370
|
+
* every version label and image line is a plain image reference: a value then cannot end its
|
|
371
|
+
* code block or add a line. Anything else keeps the placeholder.
|
|
372
|
+
*/
|
|
373
|
+
function cloudImageList(ctx) {
|
|
374
|
+
const project = ctx.projectRoot ? `${ctx.projectRoot}/` : "";
|
|
375
|
+
const instance = ctx.instanceRoot ?? "";
|
|
376
|
+
if (!ctx.corpus || !/^calico-cloud(_versioned_docs\/|$)/.test(instance.slice(project.length)))
|
|
377
|
+
return undefined;
|
|
378
|
+
const vars = loadVariables({ ...ctx, instanceRoot: `${project}calico-cloud` });
|
|
379
|
+
const [clouddownloadbase, cloudoperatorimage] = ["clouddownloadbase", "cloudoperatorimage"].map((k) => (typeof vars[k] === "string" ? vars[k] : undefined));
|
|
380
|
+
if (!clouddownloadbase || !cloudoperatorimage)
|
|
381
|
+
return undefined;
|
|
382
|
+
const { value, unresolved } = readDataModule(ctx.corpus, `${project}${CC_IMAGE_LISTS}`, { root: ctx.projectRoot ?? "" });
|
|
383
|
+
if (unresolved.length || !value || typeof value !== "object" || Array.isArray(value))
|
|
384
|
+
return undefined;
|
|
385
|
+
const lists = Object.entries(value);
|
|
386
|
+
if (!lists.length || !lists.every(([k, v]) => VERSION_LABEL.test(k) && typeof v === "string" && v.split("\n").every((l) => IMAGE_REF.test(l))))
|
|
387
|
+
return undefined;
|
|
388
|
+
// Data sources are relative to the docs folder: climb out of it to the project, not the corpus
|
|
389
|
+
const up = instance.slice(project.length).split("/").map(() => "..").join("/");
|
|
390
|
+
return {
|
|
391
|
+
name: "versioned-cloud-image-list",
|
|
392
|
+
text: CLOUD_IMAGES_TEXT,
|
|
393
|
+
values: { clouddownloadbase, cloudoperatorimage },
|
|
394
|
+
data: { "cc-image-lists.json": { module: `${up}/${CC_IMAGE_LISTS}` } },
|
|
395
|
+
};
|
|
396
|
+
}
|
|
397
|
+
/** An image name or registry from variables.js written into a template: plain characters only. */
|
|
398
|
+
const PLAIN_NAME = /^[A-Za-z0-9._/:@-]+$/;
|
|
399
|
+
/** An image the alternate-registry commands cover, as `renderRetagCommands`'s filters: a name in `imageNames`, no flannel. */
|
|
400
|
+
const NAMED = `{% for key, c in data.releases[0].components | items %}{% if key in names and names[key] and "flannel" not in key and`;
|
|
401
|
+
const NAMED_IMAGE = `names[key] ~ ":" ~ c.version`;
|
|
402
|
+
const ALTERNATE_REGISTRY_TEXT = (names) => `{%- set names = ${names} %}
|
|
403
|
+
1. Use the following commands to pull the required {{ prodname | text }} images.
|
|
404
|
+
|
|
405
|
+
\`\`\`bash {minja}
|
|
406
|
+
docker pull ${line(OP_SOURCE)}
|
|
407
|
+
${NAMED} "-windows" not in key %}docker pull ${line(`${REGISTRY} ~ ${NAMED_IMAGE}`)}
|
|
408
|
+
${END}\`\`\`
|
|
409
|
+
|
|
410
|
+
2. Retag the images with the name of your registry \`$REGISTRY\`.
|
|
411
|
+
|
|
412
|
+
\`\`\`bash {minja}
|
|
413
|
+
docker tag ${line(OP_SOURCE)} $REGISTRY/${line(`${OP}.image ~ ":" ~ ${OP}.version`)}
|
|
414
|
+
${NAMED} "-windows" not in key %}docker tag ${line(`${REGISTRY} ~ ${NAMED_IMAGE}`)} $REGISTRY/${line(NAMED_IMAGE)}
|
|
415
|
+
${END}\`\`\`
|
|
416
|
+
|
|
417
|
+
3. Push the images to your registry.
|
|
418
|
+
|
|
419
|
+
\`\`\`bash {minja}
|
|
420
|
+
docker push $REGISTRY/${line(`${OP}.image ~ ":" ~ ${OP}.version`)}
|
|
421
|
+
${NAMED} "-windows" not in key %}docker push $REGISTRY/${line(NAMED_IMAGE)}
|
|
422
|
+
${END}\`\`\`
|
|
423
|
+
|
|
424
|
+
4. Use \`crane cp\` to copy the Windows images to your private registry.
|
|
425
|
+
|
|
426
|
+
For hybrid Linux + Windows clusters, use \`crane cp\` on the following Windows images to copy them to your private registry.
|
|
427
|
+
|
|
428
|
+
\`\`\`bash {minja}
|
|
429
|
+
${NAMED} "-windows" in key %}crane cp ${line(`${REGISTRY} ~ ${NAMED_IMAGE}`)} $REGISTRY/${line(NAMED_IMAGE)}
|
|
430
|
+
${END}\`\`\`
|
|
431
|
+
`;
|
|
432
|
+
/**
|
|
433
|
+
* `<MaintenanceImageOptionsAlternateRegistry />` (Calico): the first release's images pulled, retagged
|
|
434
|
+
* and pushed to `$REGISTRY` (Windows ones by `crane cp`), each under its name in variables.js's
|
|
435
|
+
* `imageNames`, which is written into the partial as a dict. Names and the registry must be plain
|
|
436
|
+
* image references; anything else keeps the placeholder.
|
|
437
|
+
*/
|
|
438
|
+
function alternateRegistry(ctx) {
|
|
439
|
+
const vars = loadVariables(ctx);
|
|
440
|
+
const { prodname, registry, imageNames } = vars;
|
|
441
|
+
if (typeof prodname !== "string" || typeof registry !== "string" || (registry && !PLAIN_NAME.test(registry)))
|
|
442
|
+
return undefined;
|
|
443
|
+
if (!imageNames || typeof imageNames !== "object" || Array.isArray(imageNames))
|
|
444
|
+
return undefined;
|
|
445
|
+
const entries = Object.entries(imageNames);
|
|
446
|
+
if (!entries.every(([k, v]) => PLAIN_NAME.test(k) && typeof v === "string" && PLAIN_NAME.test(v)))
|
|
447
|
+
return undefined;
|
|
448
|
+
const names = `{${entries.map(([k, v]) => `"${k}": "${v}"`).join(", ")}}`;
|
|
449
|
+
return { name: "alternate-registry", text: ALTERNATE_REGISTRY_TEXT(names), values: { prodname, registry }, data: { "releases.json": "releases.json" } };
|
|
450
|
+
}
|
|
451
|
+
const OPENSHIFT_MANIFESTS_TEXT = `Download the {{ prodname | text }} manifests for OpenShift and add them to the generated manifests directory:
|
|
452
|
+
|
|
453
|
+
\`\`\`bash {minja}
|
|
454
|
+
mkdir calico
|
|
455
|
+
wget -qO- ${line("calico_releases_url")}/${line("release_title")}/ocp.tgz | \\
|
|
456
|
+
tar xvz {% if files_to_exclude is string and files_to_exclude %}{% for f in files_to_exclude.split(",") %}--exclude=ocp/${line("f.strip()")} {% endfor %}{% endif %}--strip-components=1 -C calico
|
|
457
|
+
cp calico/* manifests/
|
|
458
|
+
\`\`\`
|
|
459
|
+
{%- if not skip_dataplane_config_steps %}
|
|
460
|
+
|
|
461
|
+
{% component "dataplane" %}
|
|
462
|
+
{%- endif %}
|
|
463
|
+
`;
|
|
464
|
+
/**
|
|
465
|
+
* `<InstallOpenShiftManifests />` (Calico 3.30 on): the download, with `--exclude` for each file of
|
|
466
|
+
* `filesToExclude` (a list the component builds in a loop, which the JSX converter cannot read),
|
|
467
|
+
* then `<ConfigDataplaneOpenShiftManifests folderName="manifests" />` unless
|
|
468
|
+
* `skipDataplaneConfigSteps`, INCLUDED as the converter writes it, so its text is Tigera's own.
|
|
469
|
+
* Only for the component's source in that shape (READ as text); any other version or product
|
|
470
|
+
* (3.29, Calico Enterprise) converts as it is.
|
|
471
|
+
*/
|
|
472
|
+
function openshiftManifests(ctx) {
|
|
473
|
+
const root = ctx.instanceRoot ? `${ctx.instanceRoot}/` : "";
|
|
474
|
+
const source = ctx.corpus?.text(`${root}_includes/components/InstallOpenShiftManifests.js`);
|
|
475
|
+
if (!source || !source.includes("props.filesToExclude") || !/import ConfigDataplaneOpenShiftManifests from '\.\/ConfigDataplaneOpenShiftManifests'/.test(source))
|
|
476
|
+
return undefined;
|
|
477
|
+
const vars = loadVariables(ctx);
|
|
478
|
+
const [prodname, release_title, calico_releases_url] = ["prodname", "releaseTitle", "calicoReleasesURL"].map((k) => (typeof vars[k] === "string" ? vars[k] : undefined));
|
|
479
|
+
if (!prodname || !release_title || !calico_releases_url)
|
|
480
|
+
return undefined;
|
|
481
|
+
return {
|
|
482
|
+
name: "install-openshift-manifests",
|
|
483
|
+
text: OPENSHIFT_MANIFESTS_TEXT,
|
|
484
|
+
params: { filesToExclude: "files_to_exclude", skipDataplaneConfigSteps: "skip_dataplane_config_steps" },
|
|
485
|
+
values: { prodname, release_title, calico_releases_url },
|
|
486
|
+
data: {},
|
|
487
|
+
components: { dataplane: { module: "_includes/components/ConfigDataplaneOpenShiftManifests.js", props: { folderName: "manifests" } } },
|
|
488
|
+
};
|
|
489
|
+
}
|
|
490
|
+
/**
|
|
491
|
+
* `<FossaReport releases={releases} />` (Calico Enterprise): the first release that is not
|
|
492
|
+
* `master`, its minor version, and the report's S3 page. The component shows the page in an
|
|
493
|
+
* iframe with a link under it; a static page gives the link, titled as the iframe was.
|
|
494
|
+
*/
|
|
495
|
+
const FOSSA = {
|
|
496
|
+
name: "fossa-report",
|
|
497
|
+
text: `{%- set latest = data.releases | rejectattr("title", "equalto", "master") | first -%}
|
|
498
|
+
{%- set parts = ((latest.title[1:] if latest.title.startswith("v") else latest.title).split(".")) if latest else [] -%}
|
|
499
|
+
{%- if parts | length < 2 -%}
|
|
500
|
+
No FOSSA attribution report available for this version.
|
|
501
|
+
{%- else -%}
|
|
502
|
+
{%- set minor = parts[0] ~ "." ~ parts[1] -%}
|
|
503
|
+
{%- set src = "https://ce-" ~ minor.replace(".", "-") ~ "-attribution-report.s3.amazonaws.com/attribution-report.html" -%}
|
|
504
|
+
[FOSSA Attribution Report - Calico Enterprise {{ minor | text }}]({{ src | href }})
|
|
505
|
+
{%- endif %}
|
|
506
|
+
`,
|
|
507
|
+
fromData: ["releases"],
|
|
508
|
+
data: { "releases.json": "releases.json" },
|
|
509
|
+
};
|
|
510
|
+
export const TIGERA_DATA_COMPONENTS = {
|
|
511
|
+
MaintenanceImageOptionsAlternateRegistry: alternateRegistry,
|
|
512
|
+
InstallOpenShiftManifests: openshiftManifests,
|
|
513
|
+
FossaReport: FOSSA,
|
|
514
|
+
FelixConfig: FELIX,
|
|
515
|
+
ComponentVersions: componentVersions,
|
|
516
|
+
ReleaseArchiveTable: RELEASE_ARCHIVES,
|
|
517
|
+
PrivateRegistryRegular: privateRegistry("PrivateRegistryRegular", "private-registry-regular", REGULAR_TEXT),
|
|
518
|
+
VersionedCloudImageList: cloudImageList,
|
|
519
|
+
PrivateRegistryImagePath: privateRegistry("PrivateRegistryImagePath", "private-registry-image-path", IMAGE_PATH_TEXT),
|
|
520
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
import { splicePartials } from "@dogsbay/format-docusaurus/adapter";
|
|
13
13
|
import { loadVariables, substituteVariables } from "./variables.js";
|
|
14
14
|
import { toStructural } from "./structural.js";
|
|
15
|
+
import { TIGERA_DATA_COMPONENTS } from "./data-components.js";
|
|
15
16
|
// ── Tigera custom components ────────────────────────────
|
|
16
17
|
//
|
|
17
18
|
// Mappings keep output clean instead of leaking raw JSX. Card-like components
|
|
@@ -36,6 +37,8 @@ const TIGERA_COMPONENTS = {
|
|
|
36
37
|
CalicoProducts: { type: "cards", container: true },
|
|
37
38
|
// Conditional rendering — keep the inner content, drop the wrapper.
|
|
38
39
|
If: { type: "if", container: true, strip: true },
|
|
40
|
+
// A caption under an image (theme MDX component): its text is kept, the wrapper dropped
|
|
41
|
+
ImageCaption: { type: "image-caption", container: true, strip: true },
|
|
39
42
|
// Metadata/badge components with no reproducible static content.
|
|
40
43
|
GeekDetails: { type: "badge", container: false, strip: true },
|
|
41
44
|
// NOTE: `<Screenshot>` (a plain <img> wrapper) is handled by an inline
|
|
@@ -57,9 +60,16 @@ const TIGERA_JS_COMPONENTS = [
|
|
|
57
60
|
"InstallOpenShiftManifests",
|
|
58
61
|
"MaintenanceImageOptionsAlternateRegistry",
|
|
59
62
|
"FelixConfig",
|
|
63
|
+
"FossaReport",
|
|
64
|
+
"PrivateRegistryImagePath",
|
|
65
|
+
"PrivateRegistryRegular",
|
|
66
|
+
"VersionedCloudImageList",
|
|
67
|
+
"ReleaseArchiveTable",
|
|
60
68
|
];
|
|
61
69
|
for (const name of TIGERA_JS_COMPONENTS) {
|
|
62
|
-
|
|
70
|
+
// A data component carries its template partial, used when the output is Dogsbay MD
|
|
71
|
+
const template = TIGERA_DATA_COMPONENTS[name];
|
|
72
|
+
TIGERA_COMPONENTS[name] = { type: "__placeholder", container: true, ...(template ? { template } : {}) };
|
|
63
73
|
}
|
|
64
74
|
// Self-closing Tigera tags (no closing tag expected).
|
|
65
75
|
const TIGERA_SELF_CLOSING = [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dogsbay/adapter-tigera",
|
|
3
|
-
"version": "0.2.0-beta.
|
|
3
|
+
"version": "0.2.0-beta.137",
|
|
4
4
|
"description": "Tigera/Calico site adapter for @dogsbay/format-docusaurus — resolves $[variable] substitution and Tigera-specific MDX components.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"README.md"
|
|
12
12
|
],
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@dogsbay/corpus": "0.2.0-beta.
|
|
15
|
-
"@dogsbay/format-docusaurus": "0.2.0-beta.
|
|
14
|
+
"@dogsbay/corpus": "0.2.0-beta.137",
|
|
15
|
+
"@dogsbay/format-docusaurus": "0.2.0-beta.137"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/node": "^22.20.1",
|