From b2eebecd680afc9b555a5f3f2b7d09084ca82c1d Mon Sep 17 00:00:00 2001 From: Arunesh Pandey Date: Mon, 6 Mar 2023 11:39:59 -0800 Subject: [PATCH] Define Labels type and JSON tags for ProviderSpecific fields The current example of CRD source is missing the `Labels` type definition. It also does not have the JSON tag for the `Name` and `Value` fields of the `ProviderSpecificProperty` type. As such, creating a CRD from these types will result in errors. This change fixes the two issues highlighted above. --- docs/contributing/crd-source.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/contributing/crd-source.md b/docs/contributing/crd-source.md index 816b7344b2..40e3814a5b 100644 --- a/docs/contributing/crd-source.md +++ b/docs/contributing/crd-source.md @@ -15,10 +15,11 @@ Here is typical example of [CRD API type](https://github.com/kubernetes-sigs/ext type TTL int64 type Targets []string type ProviderSpecificProperty struct { - Name string - Value string + Name string `json:"name,omitempty"` + Value string `json:"value,omitempty"` } type ProviderSpecific []ProviderSpecificProperty +type Labels map[string]string type Endpoint struct { // The hostname of the DNS record