Skip to content

Commit

Permalink
add readme notes
Browse files Browse the repository at this point in the history
  • Loading branch information
czeslavo committed Oct 3, 2024
1 parent b0fef18 commit c5dbd7d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ When you add a new CRD make sure to
- Add CRD validation tests in [`test/crdsvalidation`][testcrdsvalidation]
- If this CRD is meant to have Konnect helpers functions generated for it,
add it in [konnect-funcs supported type list][konnect_funcs_gen].
- Annotate the CRD and any new type it depends on with the right markers to make sure it will be included
in the generated documentation. See [available markers](#Available custom markers).

[crd_kustomization]: ./config/crd/kustomization.yaml
[konnect_funcs_gen]: ./scripts/konnect-funcs/supportedtypes.go
Expand All @@ -59,3 +61,12 @@ When you add a new CRD make sure to

Currently in order to make a new release/tag available for users to use is to
create a new tag and push it to the repository.

## Available custom markers

| Name | Applies to | Meaning |
|-----------------------------|------------|---------------------------------------------------------------------------------------------------------------|
| `+apireference:kgo:exclude` | Fields | Any field annotated with this marker will be excluded from the [KGO's generated CRDs reference][kgo-crd-ref]. |
| `+apireference:kgo:include` | Types | Any type annotated with this marker will be included in the [KGO's generated CRDs reference][kgo-crd-ref]. |

[kgo-crd-ref]: https://github.com/Kong/gateway-operator/blob/main/docs/api-reference.md
4 changes: 2 additions & 2 deletions api/configuration/v1/kongplugin_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ type KongPlugin struct {
// such as AWS credentials in the Lambda plugin or the client secret in the OIDC plugin.
// Only one of `config` or `configFrom` may be used in a KongPlugin, not both at once.
//
// +apireference:kgo:exclude // KGO does not support this field.
// +apireference:kgo:exclude
ConfigFrom *ConfigSource `json:"configFrom,omitempty"`

// ConfigPatches represents JSON patches to the configuration of the plugin.
Expand All @@ -74,7 +74,7 @@ type KongPlugin struct {
// When Config is specified, patches will be applied to the configuration in Config.
// Otherwise, patches will be applied to an empty object.
//
// +apireference:kgo:exclude // KGO does not support this field.
// +apireference:kgo:exclude
ConfigPatches []ConfigPatch `json:"configPatches,omitempty"`

// PluginName is the name of the plugin to which to apply the config.
Expand Down

0 comments on commit c5dbd7d

Please sign in to comment.