Skip to content

Commit 76f0768

Browse files
feat(plugindefinitions): add docsUrl field to ClusterPD and PD, deprecate docMarkDownUrl field (#1827)
* add docsUrl field to ClusterPD and PD, deprecate docMarkDownUrl field On-behalf-of: @SAP krzysztof.zagorski@sap.com * Automatic generation of CRD API Docs * fix suggestions On-behalf-of: @SAP krzysztof.zagorski@sap.com * Automatic generation of CRD API Docs * change field json value to docsURL On-behalf-of: @SAP krzysztof.zagorski@sap.com * Automatic generation of CRD API Docs * update docsURL references On-behalf-of: @SAP krzysztof.zagorski@sap.com --------- Co-authored-by: cloud-operator-bot[bot] <224791424+cloud-operator-bot[bot]@users.noreply.github.com>
1 parent 8b0378c commit 76f0768

File tree

8 files changed

+94
-5
lines changed

8 files changed

+94
-5
lines changed

api/v1alpha1/plugindefinition_types.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,14 @@ type PluginDefinitionSpec struct {
4444
// - A publicly accessible image reference to a .png file. Will be displayed 100x100px
4545
Icon string `json:"icon,omitempty"`
4646

47+
// DocsURL specifies the URL to the documentation for this plugin.
48+
// This is used by the Greenhouse UI to provide a link to external documentation.
49+
DocsURL string `json:"docsURL,omitempty"`
50+
4751
// DocMarkDownUrl specifies the URL to the markdown documentation file for this plugin.
4852
// Source needs to allow all CORS origins.
53+
//
54+
// Deprecated: Use docsURL instead. This field will be removed in a future release.
4955
DocMarkDownUrl string `json:"docMarkDownUrl,omitempty"` //nolint:stylecheck
5056
}
5157

charts/manager/crds/greenhouse.sap_clusterplugindefinitions.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@ spec:
6868
description: |-
6969
DocMarkDownUrl specifies the URL to the markdown documentation file for this plugin.
7070
Source needs to allow all CORS origins.
71+
72+
Deprecated: Use docsURL instead. This field will be removed in a future release.
73+
type: string
74+
docsURL:
75+
description: |-
76+
DocsURL specifies the URL to the documentation for this plugin.
77+
This is used by the Greenhouse UI to provide a link to external documentation.
7178
type: string
7279
helmChart:
7380
description: HelmChart specifies where the Helm Chart for this pluginDefinition

charts/manager/crds/greenhouse.sap_plugindefinitions.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ spec:
6767
description: |-
6868
DocMarkDownUrl specifies the URL to the markdown documentation file for this plugin.
6969
Source needs to allow all CORS origins.
70+
71+
Deprecated: Use docsURL instead. This field will be removed in a future release.
72+
type: string
73+
docsURL:
74+
description: |-
75+
DocsURL specifies the URL to the documentation for this plugin.
76+
This is used by the Greenhouse UI to provide a link to external documentation.
7077
type: string
7178
helmChart:
7279
description: HelmChart specifies where the Helm Chart for this pluginDefinition

docs/contribute/local-dev.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,8 @@ metadata:
183183
spec:
184184
description: Automated TLS certificate management
185185
displayName: Certificate manager
186-
docMarkDownUrl: >-
187-
https://raw.githubusercontent.com/cloudoperators/greenhouse-extensions/main/cert-manager/README.md
186+
docsURL: >-
187+
https://cloudoperators.github.io/greenhouse/docs/reference/catalog/cert-manager/
188188
helmChart:
189189
name: 'local/plugins/<path-to-cert-manager-chart-folder>'
190190
repository: '' # <- has to be empty

docs/reference/api/index.html

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1234,6 +1234,18 @@ <h3 id="greenhouse.sap/v1alpha1.ClusterPluginDefinition">ClusterPluginDefinition
12341234
</tr>
12351235
<tr>
12361236
<td>
1237+
<code>docsURL</code><br>
1238+
<em>
1239+
string
1240+
</em>
1241+
</td>
1242+
<td>
1243+
<p>DocsURL specifies the URL to the documentation for this plugin.
1244+
This is used by the Greenhouse UI to provide a link to external documentation.</p>
1245+
</td>
1246+
</tr>
1247+
<tr>
1248+
<td>
12371249
<code>docMarkDownUrl</code><br>
12381250
<em>
12391251
string
@@ -1242,6 +1254,7 @@ <h3 id="greenhouse.sap/v1alpha1.ClusterPluginDefinition">ClusterPluginDefinition
12421254
<td>
12431255
<p>DocMarkDownUrl specifies the URL to the markdown documentation file for this plugin.
12441256
Source needs to allow all CORS origins.</p>
1257+
<p>Deprecated: Use docsURL instead. This field will be removed in a future release.</p>
12451258
</td>
12461259
</tr>
12471260
</table>
@@ -2568,6 +2581,18 @@ <h3 id="greenhouse.sap/v1alpha1.PluginDefinition">PluginDefinition
25682581
</tr>
25692582
<tr>
25702583
<td>
2584+
<code>docsURL</code><br>
2585+
<em>
2586+
string
2587+
</em>
2588+
</td>
2589+
<td>
2590+
<p>DocsURL specifies the URL to the documentation for this plugin.
2591+
This is used by the Greenhouse UI to provide a link to external documentation.</p>
2592+
</td>
2593+
</tr>
2594+
<tr>
2595+
<td>
25712596
<code>docMarkDownUrl</code><br>
25722597
<em>
25732598
string
@@ -2576,6 +2601,7 @@ <h3 id="greenhouse.sap/v1alpha1.PluginDefinition">PluginDefinition
25762601
<td>
25772602
<p>DocMarkDownUrl specifies the URL to the markdown documentation file for this plugin.
25782603
Source needs to allow all CORS origins.</p>
2604+
<p>Deprecated: Use docsURL instead. This field will be removed in a future release.</p>
25792605
</td>
25802606
</tr>
25812607
</table>
@@ -2758,6 +2784,18 @@ <h3 id="greenhouse.sap/v1alpha1.PluginDefinitionSpec">PluginDefinitionSpec
27582784
</tr>
27592785
<tr>
27602786
<td>
2787+
<code>docsURL</code><br>
2788+
<em>
2789+
string
2790+
</em>
2791+
</td>
2792+
<td>
2793+
<p>DocsURL specifies the URL to the documentation for this plugin.
2794+
This is used by the Greenhouse UI to provide a link to external documentation.</p>
2795+
</td>
2796+
</tr>
2797+
<tr>
2798+
<td>
27612799
<code>docMarkDownUrl</code><br>
27622800
<em>
27632801
string
@@ -2766,6 +2804,7 @@ <h3 id="greenhouse.sap/v1alpha1.PluginDefinitionSpec">PluginDefinitionSpec
27662804
<td>
27672805
<p>DocMarkDownUrl specifies the URL to the markdown documentation file for this plugin.
27682806
Source needs to allow all CORS origins.</p>
2807+
<p>Deprecated: Use docsURL instead. This field will be removed in a future release.</p>
27692808
</td>
27702809
</tr>
27712810
</tbody>

docs/reference/api/openapi.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,13 @@ components:
371371
description: |-
372372
DocMarkDownUrl specifies the URL to the markdown documentation file for this plugin.
373373
Source needs to allow all CORS origins.
374+
375+
Deprecated: Use docsURL instead. This field will be removed in a future release.
376+
type: string
377+
docsURL:
378+
description: |-
379+
DocsURL specifies the URL to the documentation for this plugin.
380+
This is used by the Greenhouse UI to provide a link to external documentation.
374381
type: string
375382
helmChart:
376383
description: HelmChart specifies where the Helm Chart for this pluginDefinition can be found.
@@ -870,6 +877,13 @@ components:
870877
description: |-
871878
DocMarkDownUrl specifies the URL to the markdown documentation file for this plugin.
872879
Source needs to allow all CORS origins.
880+
881+
Deprecated: Use docsURL instead. This field will be removed in a future release.
882+
type: string
883+
docsURL:
884+
description: |-
885+
DocsURL specifies the URL to the documentation for this plugin.
886+
This is used by the Greenhouse UI to provide a link to external documentation.
873887
type: string
874888
helmChart:
875889
description: HelmChart specifies where the Helm Chart for this pluginDefinition can be found.

docs/reference/components/plugindefinition.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:
1717
description: The Alerts Plugin consists of both Prometheus Alertmanager and Supernova,
1818
the holistic alert management UI
1919
displayName: Alerts
20-
docMarkDownUrl: https://raw.githubusercontent.com/cloudoperators/greenhouse-extensions/main/alerts/README.md
20+
docsURL: https://cloudoperators.github.io/greenhouse/docs/reference/catalog/alerts/
2121
helmChart:
2222
name: alerts
2323
repository: oci://ghcr.io/cloudoperators/greenhouse-extensions/charts
@@ -45,10 +45,12 @@ spec:
4545
version: latest
4646
weight: 0
4747
icon: https://raw.githubusercontent.com/cloudoperators/greenhouse-extensions/main/alerts/logo.png
48-
docMarkDownUrl: https://raw.githubusercontent.com/cloudoperators/greenhouse-extensions/main/alerts/README.md
48+
docsURL: https://cloudoperators.github.io/greenhouse/docs/reference/catalog/alerts/
4949
```
5050

51-
The fields `weight` and `icon` are optional and are used to customize the appearance of the Plugin in the Greenhouse UI sidebar. The optional field `docMarkDownUrl` can be used to provide a link to documentation for the PluginDefinition, which will be displayed in the entry of available PluginDefinitions in the Greenhouse UI.
51+
The fields `weight` and `icon` are optional and are used to customize the appearance of the Plugin in the Greenhouse UI sidebar. The optional field `docsURL` can be used to provide a link to documentation for the PluginDefinition, which will be displayed in the entry of available PluginDefinitions in the Greenhouse UI.
52+
53+
> **Note:** The `docMarkDownUrl` field is deprecated and will be removed in a future release. Please use `docsURL` instead.
5254

5355
`.spec.helmChart` is an optional field that specifies the Helm chart that is deployed when creating a Plugin from this PluginDefinition.
5456

types/typescript/schema.d.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,15 @@ export interface components {
293293
/**
294294
* @description DocMarkDownUrl specifies the URL to the markdown documentation file for this plugin.
295295
* Source needs to allow all CORS origins.
296+
*
297+
* Deprecated: Use docsURL instead. This field will be removed in a future release.
296298
*/
297299
docMarkDownUrl?: string;
300+
/**
301+
* @description DocsURL specifies the URL to the documentation for this plugin.
302+
* This is used by the Greenhouse UI to provide a link to external documentation.
303+
*/
304+
docsURL?: string;
298305
/** @description HelmChart specifies where the Helm Chart for this pluginDefinition can be found. */
299306
helmChart?: {
300307
/** @description Name of the HelmChart chart. */
@@ -678,8 +685,15 @@ export interface components {
678685
/**
679686
* @description DocMarkDownUrl specifies the URL to the markdown documentation file for this plugin.
680687
* Source needs to allow all CORS origins.
688+
*
689+
* Deprecated: Use docsURL instead. This field will be removed in a future release.
681690
*/
682691
docMarkDownUrl?: string;
692+
/**
693+
* @description DocsURL specifies the URL to the documentation for this plugin.
694+
* This is used by the Greenhouse UI to provide a link to external documentation.
695+
*/
696+
docsURL?: string;
683697
/** @description HelmChart specifies where the Helm Chart for this pluginDefinition can be found. */
684698
helmChart?: {
685699
/** @description Name of the HelmChart chart. */

0 commit comments

Comments
 (0)