diff --git a/README.md b/README.md index 99958affa..f7c51bc76 100644 --- a/README.md +++ b/README.md @@ -85,11 +85,14 @@ machine against the cluster that you have configured via your `KUBECONFIG`. ### Adding new CRDs -Whenever you add a new CRD ensure that it is included in project's [`PROJECT`](./PROJECT) file. - -This is necessary for creation of a bundle for external hubs like [Operator Hub's community operators][community-operators]. +Whenever you add a new CRD: +- Ensure that it is included in project's [`PROJECT`](./PROJECT) file. This is necessary for creation of + a bundle for external hubs like [Operator Hub's community operators][community-operators]. +- 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-markers]. [community-operators]: https://github.com/k8s-operatorhub/community-operators/ +[available-markers]: https://github.com/Kong/kubernetes-configuration/blob/main/README.md#available-custom-markers ## Seeking Help diff --git a/api/v1alpha1/aigateway_cloud_providers.go b/api/v1alpha1/aigateway_cloud_providers.go index 68c29595c..cfdadade6 100644 --- a/api/v1alpha1/aigateway_cloud_providers.go +++ b/api/v1alpha1/aigateway_cloud_providers.go @@ -6,6 +6,7 @@ package v1alpha1 // AICloudProviderName indicates the unique name of a supported AI cloud // provider. +// +apireference:kgo:include type AICloudProviderName string const ( @@ -36,6 +37,7 @@ const ( // AICloudProvider is the organization that provides API access to Large Language // Models (LLMs). +// +apireference:kgo:include type AICloudProvider struct { // Name is the unique name of an LLM provider. // @@ -46,6 +48,7 @@ type AICloudProvider struct { // AICloudProviderAPITokenRef is an reference to another object which contains // the API token for an AI cloud provider. +// +apireference:kgo:include type AICloudProviderAPITokenRef struct { // Name is the name of the reference object. // diff --git a/api/v1alpha1/aigateway_endpoints.go b/api/v1alpha1/aigateway_endpoints.go index c96047723..18b126881 100644 --- a/api/v1alpha1/aigateway_endpoints.go +++ b/api/v1alpha1/aigateway_endpoints.go @@ -7,6 +7,7 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" // ----------------------------------------------------------------------------- // AIGatewayEndpoint is a network endpoint for accessing an AIGateway. +// +apireference:kgo:include type AIGatewayEndpoint struct { // NetworkAccessHint is a hint to the user about what kind of network access // is expected for the reachability of this endpoint. @@ -49,6 +50,7 @@ type AIGatewayEndpoint struct { // This isn't meant to reflect knowledge of any specific network by name, which // is why it includes "hint" in the name. It's meant to be a hint to the user // such as "internet-accessible", "internal-only". +// +apireference:kgo:include type EndpointNetworkAccessHint string const ( @@ -59,6 +61,7 @@ const ( // AIGatewayConsumerRef indicates the Secret resource containing the credentials // for the Kong consumer. +// +apireference:kgo:include type AIGatewayConsumerRef struct { // Name is the name of the reference object. // diff --git a/api/v1alpha1/aigateway_llm_prompts.go b/api/v1alpha1/aigateway_llm_prompts.go index c3516067f..bdffcfa8c 100644 --- a/api/v1alpha1/aigateway_llm_prompts.go +++ b/api/v1alpha1/aigateway_llm_prompts.go @@ -12,6 +12,7 @@ package v1alpha1 // For example, you might want to provide a "system" role and tell the LLM // something like "you are a helpful assistant who responds in the style of // Sherlock Holmes". +// +apireference:kgo:include type LLMPrompt struct { // Content is the prompt text sent for inference. // @@ -36,6 +37,7 @@ type LLMPrompt struct { // LLMPromptParams contains parameters that can be used to control the behavior // of a large language model (LLM) when generating text based on a prompt. +// +apireference:kgo:include type LLMPromptParams struct { // Temperature controls the randomness of predictions by scaling the logits // before applying softmax. A lower temperature (e.g., 0.0 to 0.7) makes @@ -88,6 +90,7 @@ type LLMPromptParams struct { // ----------------------------------------------------------------------------- // LLMPromptRole indicates the role of a prompt for a large language model (LLM). +// +apireference:kgo:include type LLMPromptRole string const ( @@ -104,6 +107,7 @@ const ( // LLMPromptType indicates the type of prompt to be used for a large // language model (LLM). +// +apireference:kgo:include type LLMPromptType string const ( diff --git a/api/v1alpha1/aigateway_types.go b/api/v1alpha1/aigateway_types.go index b43b43fea..15bcc5c7c 100644 --- a/api/v1alpha1/aigateway_types.go +++ b/api/v1alpha1/aigateway_types.go @@ -51,6 +51,7 @@ import ( // +kubebuilder:object:root=true // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="Endpoint",type="string",JSONPath=".status.endpoint",description="The URL endpoint for the AIGateway" +// +apireference:kgo:include type AIGateway struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -67,6 +68,7 @@ type AIGateway struct { // AIGatewayList contains a list of AIGateways. // // +kubebuilder:object:root=true +// +apireference:kgo:include type AIGatewayList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` @@ -80,6 +82,7 @@ type AIGatewayList struct { // ----------------------------------------------------------------------------- // AIGatewaySpec defines the desired state of an AIGateway. +// +apireference:kgo:include type AIGatewaySpec struct { // GatewayClassName is the name of the GatewayClass which is responsible for // the AIGateway. @@ -139,6 +142,7 @@ type AIGatewaySpec struct { // LargeLanguageModels is a list of Large Language Models (LLM) hosted in // various ways (cloud hosted, self hosted, e.t.c.) which the AIGateway should // serve and manage traffic for. +// +apireference:kgo:include type LargeLanguageModels struct { // CloudHosted configures LLMs hosted and served by cloud providers. // @@ -155,6 +159,7 @@ type LargeLanguageModels struct { // CloudHostedLargeLanguageModel is the configuration for Large Language Models // (LLM) hosted by a known and supported AI cloud provider (e.g. OpenAI, Cohere, // Azure, e.t.c.). +// +apireference:kgo:include type CloudHostedLargeLanguageModel struct { // Identifier is the unique name which identifies the LLM. This will be used // as part of the requests made to an AIGateway endpoint. For instance: if @@ -223,6 +228,7 @@ type CloudHostedLargeLanguageModel struct { // ----------------------------------------------------------------------------- // AIGatewayStatus defines the observed state of AIGateway. +// +apireference:kgo:include type AIGatewayStatus struct { // Endpoints are collections of the URL, credentials and metadata needed in // order to access models served by the AIGateway for inference. diff --git a/api/v1alpha1/dataplane_konnect_extension_types.go b/api/v1alpha1/dataplane_konnect_extension_types.go index 1d524829b..23b83ff49 100644 --- a/api/v1alpha1/dataplane_konnect_extension_types.go +++ b/api/v1alpha1/dataplane_konnect_extension_types.go @@ -34,6 +34,7 @@ func init() { // If a DataPlane successfully refers a DataPlaneKonnectExtension, the DataPlane // deployment spec gets customized to include the konnect-related configuration. // +kubebuilder:validation:XValidation:rule="oldSelf.spec.controlPlaneRef == self.spec.controlPlaneRef", message="spec.controlPlaneRef is immutable." +// +apireference:kgo:include type DataPlaneKonnectExtension struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -47,6 +48,7 @@ type DataPlaneKonnectExtension struct { // +kubebuilder:object:root=true // DataPlaneKonnectExtensionList contains a list of DataPlaneKonnectExtension. +// +apireference:kgo:include type DataPlaneKonnectExtensionList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` @@ -54,6 +56,7 @@ type DataPlaneKonnectExtensionList struct { } // DataPlaneKonnectExtensionSpec defines the desired state of DataPlaneKonnectExtension. +// +apireference:kgo:include type DataPlaneKonnectExtensionSpec struct { // ControlPlaneRef is a reference to a ControlPlane this DataPlaneKonnectExtension is associated with. // +kubebuilder:validation:Required @@ -89,6 +92,7 @@ type DataPlaneKonnectExtensionSpec struct { } // KonnectControlPlaneAPIAuthConfiguration contains the configuration to authenticate with Konnect API ControlPlane. +// +apireference:kgo:include type KonnectControlPlaneAPIAuthConfiguration struct { // ClusterCertificateSecretName is a name of the Secret containing the Konnect Control Plane's cluster certificate. // +kubebuilder:validation:Required @@ -96,6 +100,7 @@ type KonnectControlPlaneAPIAuthConfiguration struct { } // ClusterCertificateSecretRef contains the reference to the Secret containing the Konnect Control Plane's cluster certificate. +// +apireference:kgo:include type ClusterCertificateSecretRef struct { // Name is the name of the Secret containing the Konnect Control Plane's cluster certificate. // +kubebuilder:validation:Required @@ -103,6 +108,7 @@ type ClusterCertificateSecretRef struct { } // DataPlaneKonnectExtensionStatus defines the observed state of DataPlaneKonnectExtension. +// +apireference:kgo:include type DataPlaneKonnectExtensionStatus struct { // DataPlaneRefs is the array of DataPlane references this is associated with. // A new reference is set by the operator when this extension is associated with diff --git a/api/v1alpha1/dataplane_metrics_extension_types.go b/api/v1alpha1/dataplane_metrics_extension_types.go index 44e457913..a8d8ff149 100644 --- a/api/v1alpha1/dataplane_metrics_extension_types.go +++ b/api/v1alpha1/dataplane_metrics_extension_types.go @@ -42,6 +42,7 @@ const ( // // NOTE: This is an enterprise feature. In order to use it you need to use // the EE version of Kong Gateway Operator with a valid license. +// +apireference:kgo:include type DataPlaneMetricsExtension struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -53,6 +54,7 @@ type DataPlaneMetricsExtension struct { // +kubebuilder:object:root=true // DataPlaneMetricsExtensionList contains a list of DataPlaneMetricsExtension. +// +apireference:kgo:include type DataPlaneMetricsExtensionList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` @@ -60,6 +62,7 @@ type DataPlaneMetricsExtensionList struct { } // DataPlaneMetricsExtensionSpec defines the spec for the DataPlaneMetricsExtension. +// +apireference:kgo:include type DataPlaneMetricsExtensionSpec struct { // ServiceSelector holds the service selector specifying the services // for which metrics should be collected. @@ -74,6 +77,7 @@ type DataPlaneMetricsExtensionSpec struct { } // MetricsConfig holds the configuration for the DataPlane metrics. +// +apireference:kgo:include type MetricsConfig struct { // Latency indicates whether latency metrics are enabled for the DataPlane. // This translates into deployed instances having `latency_metrics` option set @@ -109,6 +113,7 @@ type MetricsConfig struct { } // DataPlaneMetricsExtensionStatus defines the status of the DataPlaneMetricsExtension. +// +apireference:kgo:include type DataPlaneMetricsExtensionStatus struct { // ControlPlaneRef is a reference to the ControlPlane that this is associated with. // This field is set by the operator when this extension is associated with @@ -121,6 +126,7 @@ type DataPlaneMetricsExtensionStatus struct { } // ServiceSelector holds the service selector specification. +// +apireference:kgo:include type ServiceSelector struct { // MatchNames holds the list of Services names to match. // @@ -131,6 +137,7 @@ type ServiceSelector struct { } // ServiceSelectorEntry holds the name of a service to match. +// +apireference:kgo:include type ServiceSelectorEntry struct { // Name is the name of the service to match. // diff --git a/api/v1alpha1/extensionref_types.go b/api/v1alpha1/extensionref_types.go index ac892f05f..b4e50633c 100644 --- a/api/v1alpha1/extensionref_types.go +++ b/api/v1alpha1/extensionref_types.go @@ -18,6 +18,7 @@ package v1alpha1 // ExtensionRef corresponds to another resource in the Kubernetes cluster which // defines extended behavior for a resource (e.g. ControlPlane). +// +apireference:kgo:include type ExtensionRef struct { // Group is the group of the extension resource. // +kubebuilder:validation:Optional @@ -32,6 +33,7 @@ type ExtensionRef struct { } // NamespacedRef is a reference to a namespaced resource. +// +apireference:kgo:include type NamespacedRef struct { // Name is the name of the referred resource. // diff --git a/api/v1alpha1/groupversion_info.go b/api/v1alpha1/groupversion_info.go index 78d5cacaa..82abe543d 100644 --- a/api/v1alpha1/groupversion_info.go +++ b/api/v1alpha1/groupversion_info.go @@ -27,7 +27,6 @@ import ( var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: "gateway-operator.konghq.com", Version: "v1alpha1"} - // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} diff --git a/api/v1alpha1/kongplugin_installation_types.go b/api/v1alpha1/kongplugin_installation_types.go index 4760a7ab2..1ef63377d 100644 --- a/api/v1alpha1/kongplugin_installation_types.go +++ b/api/v1alpha1/kongplugin_installation_types.go @@ -25,17 +25,18 @@ func init() { SchemeBuilder.Register(&KongPluginInstallation{}, &KongPluginInstallationList{}) } -//+genclient -//+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -//+kubebuilder:object:root=true -//+kubebuilder:subresource:status -//+kubebuilder:resource:shortName=kpi,categories=kong;all -//+kubebuilder:subresource:status -//+kubebuilder:printcolumn:name="Accepted",description="The Resource is accepted",type=string,JSONPath=`.status.conditions[?(@.type=='Accepted')].status` - // KongPluginInstallation allows using a custom Kong Plugin distributed as a container image available in a registry. // Such a plugin can be associated with GatewayConfiguration or DataPlane to be available for particular Kong Gateway // and configured with KongPlugin CRD. +// +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:resource:shortName=kpi,categories=kong;all +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="Accepted",description="The Resource is accepted",type=string,JSONPath=`.status.conditions[?(@.type=='Accepted')].status` +// +apireference:kgo:include type KongPluginInstallation struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -44,9 +45,10 @@ type KongPluginInstallation struct { Status KongPluginInstallationStatus `json:"status,omitempty"` } -//+kubebuilder:object:root=true +// +kubebuilder:object:root=true // KongPluginInstallationList contains a list of KongPluginInstallation. +// +apireference:kgo:include type KongPluginInstallationList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` @@ -54,34 +56,36 @@ type KongPluginInstallationList struct { } // KongPluginInstallationSpec provides the information necessary to retrieve and install a Kong custom plugin. +// +apireference:kgo:include type KongPluginInstallationSpec struct { // The image is an OCI image URL for a packaged custom Kong plugin. // - //+kubebuilder:validation:Required + // +kubebuilder:validation:Required Image string `json:"image"` // ImagePullSecretRef is a reference to a Kubernetes Secret containing credentials necessary to pull the OCI image // in Image. It must follow the format in https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry. // It is optional. If the image is public, omit this field. // - //+optional + // +optional ImagePullSecretRef *gatewayv1.SecretObjectReference `json:"imagePullSecretRef,omitempty"` } // KongPluginInstallationStatus defines the observed state of KongPluginInstallation. +// +apireference:kgo:include type KongPluginInstallationStatus struct { // Conditions describe the current conditions of this KongPluginInstallation. // - //+listType=map - //+listMapKey=type - //+kubebuilder:validation:MaxItems=8 + // +listType=map + // +listMapKey=type + // +kubebuilder:validation:MaxItems=8 Conditions []metav1.Condition `json:"conditions,omitempty"` // UnderlyingConfigMapName is the name of the ConfigMap that contains the plugin's content. // It is set when the plugin is successfully fetched and unpacked. // - //+optional + // +optional UnderlyingConfigMapName string `json:"underlyingConfigMapName,omitempty"` } @@ -90,9 +94,11 @@ type KongPluginInstallationStatus struct { // KongPluginInstallationConditionType is the type for Conditions in a KongPluginInstallation's // Status.Conditions array. +// +apireference:kgo:include type KongPluginInstallationConditionType string // KongPluginInstallationConditionReason is a reason for the KongPluginInstallation condition's last transition. +// +apireference:kgo:include type KongPluginInstallationConditionReason string const ( diff --git a/api/v1beta1/controlplane_types.go b/api/v1beta1/controlplane_types.go index 6c1e6b5dc..c077eb705 100644 --- a/api/v1beta1/controlplane_types.go +++ b/api/v1beta1/controlplane_types.go @@ -28,15 +28,16 @@ func init() { SchemeBuilder.Register(&ControlPlane{}, &ControlPlaneList{}) } -//+genclient -//+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -//+kubebuilder:object:root=true -//+kubebuilder:subresource:status -//+kubebuilder:resource:shortName=kocp,categories=kong;all -//+kubebuilder:printcolumn:name="Ready",description="The Resource is ready",type=string,JSONPath=`.status.conditions[?(@.type=='Ready')].status` -//+kubebuilder:printcolumn:name="Provisioned",description="The Resource is provisioned",type=string,JSONPath=`.status.conditions[?(@.type=='Provisioned')].status` +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:resource:shortName=kocp,categories=kong;all +// +kubebuilder:printcolumn:name="Ready",description="The Resource is ready",type=string,JSONPath=`.status.conditions[?(@.type=='Ready')].status` +// +kubebuilder:printcolumn:name="Provisioned",description="The Resource is provisioned",type=string,JSONPath=`.status.conditions[?(@.type=='Provisioned')].status` // ControlPlane is the Schema for the controlplanes API +// +apireference:kgo:include type ControlPlane struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -45,9 +46,10 @@ type ControlPlane struct { Status ControlPlaneStatus `json:"status,omitempty"` } -//+kubebuilder:object:root=true +// +kubebuilder:object:root=true // ControlPlaneList contains a list of ControlPlane +// +apireference:kgo:include type ControlPlaneList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` @@ -55,6 +57,7 @@ type ControlPlaneList struct { } // ControlPlaneSpec defines the desired state of ControlPlane +// +apireference:kgo:include type ControlPlaneSpec struct { ControlPlaneOptions `json:",inline"` @@ -83,6 +86,7 @@ type ControlPlaneSpec struct { // ControlPlaneOptions indicates the specific information needed to // deploy and connect a ControlPlane to a DataPlane object. +// +apireference:kgo:include type ControlPlaneOptions struct { // +optional Deployment ControlPlaneDeploymentOptions `json:"deployment"` @@ -106,6 +110,7 @@ type ControlPlaneOptions struct { // includes options for managing Deployments such as the the number of replicas // or pod options like container image and resource requirements. // version, as well as Env variable overrides. +// +apireference:kgo:include type ControlPlaneDeploymentOptions struct { // Replicas describes the number of desired pods. // This is a pointer to distinguish between explicit zero and not specified. @@ -123,6 +128,7 @@ type ControlPlaneDeploymentOptions struct { } // ControlPlaneStatus defines the observed state of ControlPlane +// +apireference:kgo:include type ControlPlaneStatus struct { // Conditions describe the current conditions of the Gateway. // diff --git a/api/v1beta1/dataplane_types.go b/api/v1beta1/dataplane_types.go index 4333a476b..4877d73fc 100644 --- a/api/v1beta1/dataplane_types.go +++ b/api/v1beta1/dataplane_types.go @@ -38,6 +38,7 @@ func init() { // +kubebuilder:printcolumn:name="Ready",description="The Resource is ready",type=string,JSONPath=`.status.conditions[?(@.type=='Ready')].status` // DataPlane is the Schema for the dataplanes API +// +apireference:kgo:include type DataPlane struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -49,6 +50,7 @@ type DataPlane struct { // +kubebuilder:object:root=true // DataPlaneList contains a list of DataPlane +// +apireference:kgo:include type DataPlaneList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` @@ -56,12 +58,14 @@ type DataPlaneList struct { } // DataPlaneSpec defines the desired state of DataPlane +// +apireference:kgo:include type DataPlaneSpec struct { DataPlaneOptions `json:",inline"` } // DataPlaneOptions defines the information specifically needed to // deploy the DataPlane. +// +apireference:kgo:include type DataPlaneOptions struct { // +optional Deployment DataPlaneDeploymentOptions `json:"deployment"` @@ -88,6 +92,7 @@ type DataPlaneOptions struct { // DataPlaneResources defines the resources that will be created and managed // for the DataPlane. +// +apireference:kgo:include type DataPlaneResources struct { // PodDisruptionBudget is the configuration for the PodDisruptionBudget // that will be created for the DataPlane. @@ -95,6 +100,7 @@ type DataPlaneResources struct { } // PodDisruptionBudget defines the configuration for the PodDisruptionBudget. +// +apireference:kgo:include type PodDisruptionBudget struct { // Spec defines the specification of the PodDisruptionBudget. // Selector is managed by the controller and cannot be set by the user. @@ -104,6 +110,7 @@ type PodDisruptionBudget struct { // PodDisruptionBudgetSpec defines the specification of a PodDisruptionBudget. // // +kubebuilder:validation:XValidation:message="You can specify only one of maxUnavailable and minAvailable in a single PodDisruptionBudgetSpec.",rule="(has(self.minAvailable) && !has(self.maxUnavailable)) || (!has(self.minAvailable) && has(self.maxUnavailable))" +// +apireference:kgo:include type PodDisruptionBudgetSpec struct { // An eviction is allowed if at least "minAvailable" pods selected by // "selector" will still be available after the eviction, i.e. even in the @@ -150,6 +157,7 @@ type PodDisruptionBudgetSpec struct { // DataPlaneDeploymentOptions specifies options for the Deployments (as in the Kubernetes // resource "Deployment") which are created and managed for the DataPlane resource. +// +apireference:kgo:include type DataPlaneDeploymentOptions struct { // Rollout describes a custom rollout strategy. // @@ -160,6 +168,7 @@ type DataPlaneDeploymentOptions struct { } // DataPlaneNetworkOptions defines network related options for a DataPlane. +// +apireference:kgo:include type DataPlaneNetworkOptions struct { // Services indicates the configuration of Kubernetes Services needed for // the topology of various forms of traffic (including ingress, e.t.c.) to @@ -174,6 +183,7 @@ type DataPlaneNetworkOptions struct { } // DataPlaneServices contains Services related DataPlane configuration, shared with the GatewayConfiguration. +// +apireference:kgo:include type DataPlaneServices struct { // Ingress is the Kubernetes Service that will be used to expose ingress // traffic for the DataPlane. Here you can determine whether the DataPlane @@ -187,6 +197,7 @@ type DataPlaneServices struct { } // DataPlaneServiceOptions contains Services related DataPlane configuration. +// +apireference:kgo:include type DataPlaneServiceOptions struct { // Ports defines the list of ports that are exposed by the service. // The ports field allows defining the name, port and targetPort of @@ -200,6 +211,7 @@ type DataPlaneServiceOptions struct { } // DataPlaneServicePort contains information on service's port. +// +apireference:kgo:include type DataPlaneServicePort struct { // The name of this port within the service. This must be a DNS_LABEL. // All ports within a ServiceSpec must have unique names. When considering @@ -226,6 +238,7 @@ type DataPlaneServicePort struct { // ServiceOptions is used to includes options to customize the ingress service, // such as the annotations. +// +apireference:kgo:include type ServiceOptions struct { // Type determines how the Service is exposed. // Defaults to `LoadBalancer`. @@ -278,6 +291,7 @@ type ServiceOptions struct { } // DataPlaneStatus defines the observed state of DataPlane +// +apireference:kgo:include type DataPlaneStatus struct { // Conditions describe the status of the DataPlane. // +listType=map @@ -320,6 +334,7 @@ type DataPlaneStatus struct { } // DataPlaneRolloutStatus describes the DataPlane rollout status. +// +apireference:kgo:include type DataPlaneRolloutStatus struct { // Services contain the information about the services which are available // through which user can access the preview deployment. @@ -355,6 +370,7 @@ func (d *DataPlaneRolloutStatus) SetConditions(conditions []metav1.Condition) { // DataPlaneRolloutStatusServices describes the status of the services during // DataPlane rollout. +// +apireference:kgo:include type DataPlaneRolloutStatusServices struct { // Ingress contains the name and the address of the preview service for ingress. // Using this service users can send requests that will hit the preview deployment. @@ -367,6 +383,7 @@ type DataPlaneRolloutStatusServices struct { // DataPlaneRolloutStatusDeployment is a rollout status field which contains // fields specific for Deployments during the rollout. +// +apireference:kgo:include type DataPlaneRolloutStatusDeployment struct { // Selector is a stable label selector value assigned to a DataPlane rollout // status which is used throughout the rollout as a deterministic labels selector @@ -379,6 +396,7 @@ type DataPlaneRolloutStatusDeployment struct { // RolloutStatusService is a struct which contains status information about // services that are exposed as part of the rollout. +// +apireference:kgo:include type RolloutStatusService struct { // Name indicates the name of the service. Name string `json:"name"` @@ -390,6 +408,7 @@ type RolloutStatusService struct { } // Address describes an address which can be either an IP address or a hostname. +// +apireference:kgo:include type Address struct { // Type of the address. // @@ -418,6 +437,7 @@ type Address struct { // * `Hostname` // // +kubebuilder:validation:Pattern=`^IPAddress|Hostname$` +// +apireference:kgo:include type AddressType string const ( @@ -448,6 +468,7 @@ const ( // * `PrivateIP` // // +kubebuilder:validation:Pattern=`^PublicLoadBalancer|PrivateLoadBalancer|PublicIP|PrivateIP$` +// +apireference:kgo:include type AddressSourceType string const ( diff --git a/api/v1beta1/gatewayconfiguration_types.go b/api/v1beta1/gatewayconfiguration_types.go index 376227972..84cd54000 100644 --- a/api/v1beta1/gatewayconfiguration_types.go +++ b/api/v1beta1/gatewayconfiguration_types.go @@ -33,6 +33,7 @@ func init() { // +kubebuilder:validation:XValidation:message="Extension not allowed for DataPlane config options",rule="has(self.spec.dataPlaneOptions.extensions) ? self.spec.dataPlaneOptions.extensions.all(e, e.group == 'gateway-operator.konghq.com' && e.kind == 'DataPlaneKonnectExtension') : true" // GatewayConfiguration is the Schema for the gatewayconfigurations API +// +apireference:kgo:include type GatewayConfiguration struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -42,6 +43,7 @@ type GatewayConfiguration struct { } // GatewayConfigurationSpec defines the desired state of GatewayConfiguration +// +apireference:kgo:include type GatewayConfigurationSpec struct { // DataPlaneOptions is the specification for configuration // overrides for DataPlane resources that will be created for the Gateway. @@ -58,6 +60,7 @@ type GatewayConfigurationSpec struct { // GatewayConfigDataPlaneOptions indicates the specific information needed to // configure and deploy a DataPlane object. +// +apireference:kgo:include type GatewayConfigDataPlaneOptions struct { // +optional Deployment DataPlaneDeploymentOptions `json:"deployment"` @@ -81,6 +84,7 @@ type GatewayConfigDataPlaneOptions struct { } // GatewayConfigDataPlaneNetworkOptions defines network related options for a DataPlane. +// +apireference:kgo:include type GatewayConfigDataPlaneNetworkOptions struct { // Services indicates the configuration of Kubernetes Services needed for // the topology of various forms of traffic (including ingress, etc.) to @@ -89,6 +93,7 @@ type GatewayConfigDataPlaneNetworkOptions struct { } // GatewayConfigDataPlaneServices contains Services related DataPlane configuration. +// +apireference:kgo:include type GatewayConfigDataPlaneServices struct { // Ingress is the Kubernetes Service that will be used to expose ingress // traffic for the DataPlane. Here you can determine whether the DataPlane @@ -103,11 +108,13 @@ type GatewayConfigDataPlaneServices struct { // GatewayConfigServiceOptions is used to includes options to customize the ingress service, // such as the annotations. +// +apireference:kgo:include type GatewayConfigServiceOptions struct { ServiceOptions `json:",inline"` } // GatewayConfigurationStatus defines the observed state of GatewayConfiguration +// +apireference:kgo:include type GatewayConfigurationStatus struct { // Conditions describe the current conditions of the GatewayConfigurationStatus. // @@ -118,9 +125,10 @@ type GatewayConfigurationStatus struct { Conditions []metav1.Condition `json:"conditions,omitempty"` } -//+kubebuilder:object:root=true +// +kubebuilder:object:root=true // GatewayConfigurationList contains a list of GatewayConfiguration +// +apireference:kgo:include type GatewayConfigurationList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` diff --git a/api/v1beta1/shared_types.go b/api/v1beta1/shared_types.go index 238750a8d..b14c01bf3 100644 --- a/api/v1beta1/shared_types.go +++ b/api/v1beta1/shared_types.go @@ -12,6 +12,7 @@ import ( // version, as well as Env variable overrides. // // +kubebuilder:validation:XValidation:message="Using both replicas and scaling fields is not allowed.",rule="!(has(self.scaling) && has(self.replicas))" +// +apireference:kgo:include type DeploymentOptions struct { // Replicas describes the number of desired pods. // This is a pointer to distinguish between explicit zero and not specified. @@ -36,6 +37,7 @@ type DeploymentOptions struct { } // Scaling defines the scaling options for the deployment. +// +apireference:kgo:include type Scaling struct { // HorizontalScaling defines horizontal scaling options for the deployment. // +optional @@ -45,6 +47,7 @@ type Scaling struct { // HorizontalScaling defines horizontal scaling options for the deployment. // It holds all the options from the HorizontalPodAutoscalerSpec besides the // ScaleTargetRef which is being controlled by the Operator. +// +apireference:kgo:include type HorizontalScaling struct { // minReplicas is the lower limit for the number of replicas to which the autoscaler // can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the @@ -78,12 +81,14 @@ type HorizontalScaling struct { } // Rollout defines options for rollouts. +// +apireference:kgo:include type Rollout struct { // Strategy contains the deployment strategy for rollout. Strategy RolloutStrategy `json:"strategy"` } // RolloutStrategy holds the rollout strategy options. +// +apireference:kgo:include type RolloutStrategy struct { // BlueGreen holds the options specific for Blue Green Deployments. // @@ -92,6 +97,7 @@ type RolloutStrategy struct { } // BlueGreenStrategy defines the Blue Green deployment strategy. +// +apireference:kgo:include type BlueGreenStrategy struct { // Promotion defines how the operator handles promotion of resources. Promotion Promotion `json:"promotion"` @@ -106,6 +112,7 @@ type BlueGreenStrategy struct { // Promotion is a type that contains fields that define how the operator handles // promotion of resources during a blue/green rollout. +// +apireference:kgo:include type Promotion struct { // Strategy indicates how you want the operator to handle the promotion of // the preview (green) resources (Deployments and Services) after all workflows @@ -126,6 +133,8 @@ type Promotion struct { // The user must indicate manually when they want the promotion to continue. // That can be done by annotating the `DataPlane` object with // `"gateway-operator.konghq.com/promote-when-ready": "true"`. +// +// +apireference:kgo:include type PromotionStrategy string const ( @@ -143,6 +152,7 @@ const ( // RolloutResources is the type which contains the fields which control how the operator // manages the resources it manages during or after the rollout concludes. +// +apireference:kgo:include type RolloutResources struct { // Plan defines the resource plan for managing resources during and after a rollout. // @@ -153,6 +163,7 @@ type RolloutResources struct { // RolloutResourcePlan is a type that holds rollout resource plan related fields // which control how the operator handles resources during and after a rollout. +// +apireference:kgo:include type RolloutResourcePlan struct { // Deployment describes how the operator manages Deployments during and after a rollout. // @@ -171,6 +182,8 @@ type RolloutResourcePlan struct { // the Deployment to 0 when the rollout is not initiated by a spec change // and then to scale it up when the rollout is initiated (the owner resource // like a DataPlane is patched or updated). +// +// +apireference:kgo:include type RolloutResourcePlanDeployment string const ( @@ -189,6 +202,7 @@ const ( // GatewayConfigurationTargetKind is an object kind that can be targeted for // GatewayConfiguration attachment. +// +apireference:kgo:include type GatewayConfigurationTargetKind string const ( @@ -217,6 +231,7 @@ const ( // KonnectCertificateOptions indicates how the operator should manage the certificates that managed entities will use // to interact with Konnect. +// +apireference:kgo:include type KonnectCertificateOptions struct { // Issuer is the cert-manager Issuer or ClusterIssuer the operator will use to request certificates. When Namespace // is set, the operator will retrieve the Issuer with that Name in that Namespace. When Namespace is omitted, the @@ -225,6 +240,7 @@ type KonnectCertificateOptions struct { } // NamespacedName is a resource identified by name and optional namespace. +// +apireference:kgo:include type NamespacedName struct { // +optional Namespace string `json:"namespace"` diff --git a/docs/api-reference.md b/docs/api-reference.md index 86cd427e4..26fbf56d1 100644 --- a/docs/api-reference.md +++ b/docs/api-reference.md @@ -1,8 +1,1699 @@ ## Packages +- [configuration.konghq.com/v1](#configurationkonghqcomv1) +- [configuration.konghq.com/v1alpha1](#configurationkonghqcomv1alpha1) - [gateway-operator.konghq.com/v1alpha1](#gateway-operatorkonghqcomv1alpha1) - [gateway-operator.konghq.com/v1beta1](#gateway-operatorkonghqcomv1beta1) +- [konnect.konghq.com/v1alpha1](#konnectkonghqcomv1alpha1) + + +## configuration.konghq.com/v1 + +Package v1 contains API Schema definitions for the konghq.com v1 API group. + +- [KongConsumer](#kongconsumer) +- [KongPlugin](#kongplugin) + +### KongConsumer + + +KongConsumer is the Schema for the kongconsumers API. + + + +| Field | Description | +| --- | --- | +| `apiVersion` _string_ | `configuration.konghq.com/v1` +| `kind` _string_ | `KongConsumer` +| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | +| `username` _string_ | Username is a Kong cluster-unique username of the consumer. | +| `custom_id` _string_ | CustomID is a Kong cluster-unique existing ID for the consumer - useful for mapping Kong with users in your existing database. | +| `credentials` _string array_ | Credentials are references to secrets containing a credential to be provisioned in Kong. | +| `consumerGroups` _string array_ | ConsumerGroups are references to consumer groups (that consumer wants to be part of) provisioned in Kong. | +| `spec` _[KongConsumerSpec](#kongconsumerspec)_ | | +| `status` _[KongConsumerStatus](#kongconsumerstatus)_ | Status represents the current status of the KongConsumer resource. | + + + + +### KongPlugin + + +KongPlugin is the Schema for the kongplugins API. + + + +| Field | Description | +| --- | --- | +| `apiVersion` _string_ | `configuration.konghq.com/v1` +| `kind` _string_ | `KongPlugin` +| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | +| `consumerRef` _string_ | ConsumerRef is a reference to a particular consumer. | +| `disabled` _boolean_ | Disabled set if the plugin is disabled or not. | +| `config` _[JSON](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#json-v1-apiextensions-k8s-io)_ | Config contains the plugin configuration. It's a list of keys and values required to configure the plugin. Please read the documentation of the plugin being configured to set values in here. For any plugin in Kong, anything that goes in the `config` JSON key in the Admin API request, goes into this property. Only one of `config` or `configFrom` may be used in a KongPlugin, not both at once. | +| `plugin` _string_ | PluginName is the name of the plugin to which to apply the config. | +| `run_on` _string_ | RunOn configures the plugin to run on the first or the second or both nodes in case of a service mesh deployment. | +| `protocols` _[KongProtocol](#kongprotocol) array_ | Protocols configures plugin to run on requests received on specific protocols. | +| `ordering` _[PluginOrdering](#pluginordering)_ | Ordering overrides the normal plugin execution order. It's only available on Kong Enterprise. `` is a request processing phase (for example, `access` or `body_filter`) and `` is the name of the plugin that will run before or after the KongPlugin. For example, a KongPlugin with `plugin: rate-limiting` and `before.access: ["key-auth"]` will create a rate limiting plugin that limits requests _before_ they are authenticated. | +| `instance_name` _string_ | InstanceName is an optional custom name to identify an instance of the plugin. This is useful when running the same plugin in multiple contexts, for example, on multiple services. | +| `status` _[KongPluginStatus](#kongpluginstatus)_ | Status represents the current status of the KongPlugin resource. | + + + +### Types + +In this section you will find types that the CRDs rely on. + + + + +#### KongConsumerSpec + + +KongConsumerSpec defines the specification of the KongConsumer. + + + +| Field | Description | +| --- | --- | +| `controlPlaneRef` _[ControlPlaneRef](#controlplaneref)_ | ControlPlaneRef is a reference to a ControlPlane this Consumer is associated with. | + + +_Appears in:_ +- [KongConsumer](#kongconsumer) + +#### KongPluginStatus + + +KongPluginStatus represents the current status of the KongPlugin resource. + + + +| Field | Description | +| --- | --- | +| `conditions` _[Condition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#condition-v1-meta) array_ | Conditions describe the current conditions of the KongPluginStatus.

Known condition types are:

* "Programmed" | + + +_Appears in:_ +- [KongPlugin](#kongplugin) + +#### KongProtocol +_Underlying type:_ `string` + +KongProtocol is a valid Kong protocol. +This alias is necessary to deal with https://github.com/kubernetes-sigs/controller-tools/issues/342 + + + + + +_Appears in:_ +- [KongClusterPlugin](#kongclusterplugin) +- [KongIngressRoute](#kongingressroute) +- [KongPlugin](#kongplugin) + + +## configuration.konghq.com/v1alpha1 + +Package v1alpha1 contains API Schema definitions for the configuration.konghq.com v1alpha1 API group. + +- [KongCACertificate](#kongcacertificate) +- [KongCertificate](#kongcertificate) +- [KongCredentialACL](#kongcredentialacl) +- [KongCredentialAPIKey](#kongcredentialapikey) +- [KongCredentialBasicAuth](#kongcredentialbasicauth) +- [KongCredentialHMAC](#kongcredentialhmac) +- [KongCredentialJWT](#kongcredentialjwt) +- [KongDataPlaneClientCertificate](#kongdataplaneclientcertificate) +- [KongKey](#kongkey) +- [KongKeySet](#kongkeyset) +- [KongLicense](#konglicense) +- [KongPluginBinding](#kongpluginbinding) +- [KongRoute](#kongroute) +- [KongSNI](#kongsni) +- [KongService](#kongservice) +- [KongTarget](#kongtarget) +- [KongUpstream](#kongupstream) +- [KongVault](#kongvault) + +### KongCACertificate + + +KongCACertificate is the schema for CACertificate API which defines a Kong CA Certificate. + + + +| Field | Description | +| --- | --- | +| `apiVersion` _string_ | `configuration.konghq.com/v1alpha1` +| `kind` _string_ | `KongCACertificate` +| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | +| `spec` _[KongCACertificateSpec](#kongcacertificatespec)_ | | +| `status` _[KongCACertificateStatus](#kongcacertificatestatus)_ | | + + + +### KongCertificate + + +KongCertificate is the schema for Certificate API which defines a Kong Certificate. + + + +| Field | Description | +| --- | --- | +| `apiVersion` _string_ | `configuration.konghq.com/v1alpha1` +| `kind` _string_ | `KongCertificate` +| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | +| `spec` _[KongCertificateSpec](#kongcertificatespec)_ | | +| `status` _[KongCertificateStatus](#kongcertificatestatus)_ | | + + + +### KongCredentialACL + + +KongCredentialACL is the schema for ACL credentials API which defines a ACL credential for consumers. + + + +| Field | Description | +| --- | --- | +| `apiVersion` _string_ | `configuration.konghq.com/v1alpha1` +| `kind` _string_ | `KongCredentialACL` +| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | +| `spec` _[KongCredentialACLSpec](#kongcredentialaclspec)_ | Spec contains the ACL credential specification. | +| `status` _[KongCredentialACLStatus](#kongcredentialaclstatus)_ | Status contains the ACL credential status. | + + + +### KongCredentialAPIKey + + +KongCredentialAPIKey is the schema for API key credentials API which defines a API key credential for consumers. + + + +| Field | Description | +| --- | --- | +| `apiVersion` _string_ | `configuration.konghq.com/v1alpha1` +| `kind` _string_ | `KongCredentialAPIKey` +| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | +| `spec` _[KongCredentialAPIKeySpec](#kongcredentialapikeyspec)_ | Spec contains the API Key credential specification. | +| `status` _[KongCredentialAPIKeyStatus](#kongcredentialapikeystatus)_ | Status contains the API Key credential status. | + + + +### KongCredentialBasicAuth + + +KongCredentialBasicAuth is the schema for BasicAuth credentials API which defines a BasicAuth credential for consumers. + + + +| Field | Description | +| --- | --- | +| `apiVersion` _string_ | `configuration.konghq.com/v1alpha1` +| `kind` _string_ | `KongCredentialBasicAuth` +| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | +| `spec` _[KongCredentialBasicAuthSpec](#kongcredentialbasicauthspec)_ | Spec contains the BasicAuth credential specification. | +| `status` _[KongCredentialBasicAuthStatus](#kongcredentialbasicauthstatus)_ | Status contains the BasicAuth credential status. | + + + +### KongCredentialHMAC + + +KongCredentialHMAC is the schema for HMAC credentials API which defines a HMAC credential for consumers. + + + +| Field | Description | +| --- | --- | +| `apiVersion` _string_ | `configuration.konghq.com/v1alpha1` +| `kind` _string_ | `KongCredentialHMAC` +| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | +| `spec` _[KongCredentialHMACSpec](#kongcredentialhmacspec)_ | Spec contains the HMAC credential specification. | +| `status` _[KongCredentialHMACStatus](#kongcredentialhmacstatus)_ | Status contains the HMAC credential status. | + + + +### KongCredentialJWT + + +KongCredentialJWT is the schema for JWT credentials API which defines a JWT credential for consumers. + + + +| Field | Description | +| --- | --- | +| `apiVersion` _string_ | `configuration.konghq.com/v1alpha1` +| `kind` _string_ | `KongCredentialJWT` +| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | +| `spec` _[KongCredentialJWTSpec](#kongcredentialjwtspec)_ | Spec contains the JWT credential specification. | +| `status` _[KongCredentialJWTStatus](#kongcredentialjwtstatus)_ | Status contains the JWT credential status. | + + + + +### KongDataPlaneClientCertificate + + +KongDataPlaneClientCertificate is the schema for KongDataPlaneClientCertificate API which defines a KongDataPlaneClientCertificate entity. + + + +| Field | Description | +| --- | --- | +| `apiVersion` _string_ | `configuration.konghq.com/v1alpha1` +| `kind` _string_ | `KongDataPlaneClientCertificate` +| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | +| `spec` _[KongDataPlaneClientCertificateSpec](#kongdataplaneclientcertificatespec)_ | | +| `status` _[KongDataPlaneClientCertificateStatus](#kongdataplaneclientcertificatestatus)_ | | + + + +### KongKey + + +KongKey is the schema for KongKey API which defines a KongKey entity. + + + +| Field | Description | +| --- | --- | +| `apiVersion` _string_ | `configuration.konghq.com/v1alpha1` +| `kind` _string_ | `KongKey` +| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | +| `spec` _[KongKeySpec](#kongkeyspec)_ | | +| `status` _[KongKeyStatus](#kongkeystatus)_ | | + + + +### KongKeySet + + +KongKeySet is the schema for KongKeySet API which defines a KongKeySet entity. + + + +| Field | Description | +| --- | --- | +| `apiVersion` _string_ | `configuration.konghq.com/v1alpha1` +| `kind` _string_ | `KongKeySet` +| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | +| `spec` _[KongKeySetSpec](#kongkeysetspec)_ | | +| `status` _[KongKeySetStatus](#kongkeysetstatus)_ | | + + + +### KongLicense + + +KongLicense stores a Kong enterprise license to apply to managed Kong gateway instances. + + + +| Field | Description | +| --- | --- | +| `apiVersion` _string_ | `configuration.konghq.com/v1alpha1` +| `kind` _string_ | `KongLicense` +| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | +| `rawLicenseString` _string_ | RawLicenseString is a string with the raw content of the license. | +| `enabled` _boolean_ | Enabled is set to true to let controllers (like KIC or KGO) to reconcile it. Default value is true to apply the license by default. | +| `status` _[KongLicenseStatus](#konglicensestatus)_ | Status is the status of the KongLicense being processed by controllers. | + + + +### KongPluginBinding + + +KongPluginBinding is the schema for Plugin Bindings API which defines a Kong Plugin Binding. + + + +| Field | Description | +| --- | --- | +| `apiVersion` _string_ | `configuration.konghq.com/v1alpha1` +| `kind` _string_ | `KongPluginBinding` +| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | +| `spec` _[KongPluginBindingSpec](#kongpluginbindingspec)_ | | +| `status` _[KongPluginBindingStatus](#kongpluginbindingstatus)_ | | + + + +### KongRoute + + +KongRoute is the schema for Routes API which defines a Kong Route. + + + +| Field | Description | +| --- | --- | +| `apiVersion` _string_ | `configuration.konghq.com/v1alpha1` +| `kind` _string_ | `KongRoute` +| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | +| `spec` _[KongRouteSpec](#kongroutespec)_ | | +| `status` _[KongRouteStatus](#kongroutestatus)_ | | + + + +### KongSNI + + +KongSNI is the schema for SNI API which defines a Kong SNI. + + + +| Field | Description | +| --- | --- | +| `apiVersion` _string_ | `configuration.konghq.com/v1alpha1` +| `kind` _string_ | `KongSNI` +| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | +| `spec` _[KongSNISpec](#kongsnispec)_ | | +| `status` _[KongSNIStatus](#kongsnistatus)_ | | + + + +### KongService + + +KongService is the schema for Services API which defines a Kong Service. + + + +| Field | Description | +| --- | --- | +| `apiVersion` _string_ | `configuration.konghq.com/v1alpha1` +| `kind` _string_ | `KongService` +| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | +| `spec` _[KongServiceSpec](#kongservicespec)_ | | +| `status` _[KongServiceStatus](#kongservicestatus)_ | | + + + +### KongTarget + + +KongTarget is the schema for Target API which defines a Kong Target attached to a Kong Upstream. + + + +| Field | Description | +| --- | --- | +| `apiVersion` _string_ | `configuration.konghq.com/v1alpha1` +| `kind` _string_ | `KongTarget` +| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | +| `spec` _[KongTargetSpec](#kongtargetspec)_ | | +| `status` _[KongTargetStatus](#kongtargetstatus)_ | | + + + +### KongUpstream + + +KongUpstream is the schema for Upstream API which defines a Kong Upstream. + + + +| Field | Description | +| --- | --- | +| `apiVersion` _string_ | `configuration.konghq.com/v1alpha1` +| `kind` _string_ | `KongUpstream` +| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | +| `spec` _[KongUpstreamSpec](#kongupstreamspec)_ | | +| `status` _[KongUpstreamStatus](#kongupstreamstatus)_ | | + + + +### KongVault + + +KongVault is the schema for kongvaults API which defines a custom Kong vault. +A Kong vault is a storage to store sensitive data, where the values can be referenced in configuration of plugins. +See: https://docs.konghq.com/gateway/latest/kong-enterprise/secrets-management/ + + + +| Field | Description | +| --- | --- | +| `apiVersion` _string_ | `configuration.konghq.com/v1alpha1` +| `kind` _string_ | `KongVault` +| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | +| `spec` _[KongVaultSpec](#kongvaultspec)_ | | +| `status` _[KongVaultStatus](#kongvaultstatus)_ | | + + + +### Types + +In this section you will find types that the CRDs rely on. +#### ControlPlaneRef + + +ControlPlaneRef is the schema for the ControlPlaneRef type. +It is used to reference a Control Plane entity. + + + +| Field | Description | +| --- | --- | +| `type` _string_ | Type can be one of: - konnectID - konnectNamespacedRef | +| `konnectID` _string_ | KonnectID is the schema for the KonnectID type. This field is required when the Type is konnectID. | +| `konnectNamespacedRef` _[KonnectNamespacedRef](#konnectnamespacedref)_ | KonnectNamespacedRef is a reference to a Konnect Control Plane entity inside the cluster. It contains the name of the Konnect Control Plane. This field is required when the Type is konnectNamespacedRef. | + + +_Appears in:_ +- [KongCACertificateSpec](#kongcacertificatespec) +- [KongCertificateSpec](#kongcertificatespec) +- [KongDataPlaneClientCertificateSpec](#kongdataplaneclientcertificatespec) +- [KongKeySetSpec](#kongkeysetspec) +- [KongKeySpec](#kongkeyspec) +- [KongPluginBindingSpec](#kongpluginbindingspec) +- [KongRouteSpec](#kongroutespec) +- [KongServiceSpec](#kongservicespec) +- [KongUpstreamSpec](#kongupstreamspec) +- [KongVaultSpec](#kongvaultspec) + +#### ControllerReference + + +ControllerReference is a reference to a controller that reconciles the KongLicense. + + + +| Field | Description | +| --- | --- | +| `group` _[Group](#group)_ | Group is the group of referent. It should be empty if the referent is in "core" group (like pod). | +| `kind` _[Kind](#kind)_ | Kind is the kind of the referent. By default the nil kind means kind Pod. | +| `namespace` _[Namespace](#namespace)_ | Namespace is the namespace of the referent. It should be empty if the referent is cluster scoped. | +| `name` _[ObjectName](#objectname)_ | Name is the name of the referent. | + + +_Appears in:_ +- [KongLicenseControllerStatus](#konglicensecontrollerstatus) + +#### Group +_Underlying type:_ `string` + +Group refers to a Kubernetes Group. It must either be an empty string or a +RFC 1123 subdomain. + + + + + +_Appears in:_ +- [ControllerReference](#controllerreference) + +#### KeySetNamespacedRef + + +KeySetNamespacedRef is the schema for the KeySetNamespacedRef type. + + + +| Field | Description | +| --- | --- | +| `name` _string_ | Name is the name of the KeySet object. | + + +_Appears in:_ +- [KeySetRef](#keysetref) + +#### KeySetRef + + +KeySetRef is the schema for the KeySetRef type. +It is used to reference a KeySet entity. + + + +| Field | Description | +| --- | --- | +| `type` _[KeySetRefType](#keysetreftype)_ | Type defines type of the KeySet object reference. It can be one of: - konnectID - namespacedRef | +| `konnectID` _string_ | KonnectID is the schema for the KonnectID type. This field is required when the Type is konnectID. | +| `namespacedRef` _[KeySetNamespacedRef](#keysetnamespacedref)_ | NamespacedRef is a reference to a KeySet entity inside the cluster. This field is required when the Type is namespacedRef. | + + +_Appears in:_ +- [KongKeySpec](#kongkeyspec) + +#### KeySetRefType +_Underlying type:_ `string` + +KeySetRefType is the enum type for the KeySetRef. + + + + + +_Appears in:_ +- [KeySetRef](#keysetref) + +#### Kind +_Underlying type:_ `string` + +Kind refers to a Kubernetes kind. + + + + + +_Appears in:_ +- [ControllerReference](#controllerreference) + +#### KongCACertificateAPISpec + + +KongCACertificateAPISpec contains the API specification for the KongCACertificate. + + + +| Field | Description | +| --- | --- | +| `cert` _string_ | Cert is the PEM-encoded CA certificate. | +| `tags` _string array_ | Tags is an optional set of tags applied to the certificate. | + + +_Appears in:_ +- [KongCACertificateSpec](#kongcacertificatespec) + +#### KongCACertificateSpec + + +KongCACertificateSpec contains the specification for the KongCACertificate. + + + +| Field | Description | +| --- | --- | +| `controlPlaneRef` _[ControlPlaneRef](#controlplaneref)_ | ControlPlaneRef references the Konnect Control Plane that this KongCACertificate should be created in. | +| `cert` _string_ | Cert is the PEM-encoded CA certificate. | +| `tags` _string array_ | Tags is an optional set of tags applied to the certificate. | + + +_Appears in:_ +- [KongCACertificate](#kongcacertificate) + +#### KongCACertificateStatus + + +KongCACertificateStatus defines the observed state of KongCACertificate. + + + +| Field | Description | +| --- | --- | +| `konnect` _[KonnectEntityStatusWithControlPlaneRef](#konnectentitystatuswithcontrolplaneref)_ | Konnect contains the Konnect entity status. | +| `conditions` _[Condition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#condition-v1-meta) array_ | Conditions describe the status of the Konnect entity. | + + +_Appears in:_ +- [KongCACertificate](#kongcacertificate) + +#### KongCertificateAPISpec + + +KongCertificateAPISpec contains the API specification for the KongCertificate. + + + +| Field | Description | +| --- | --- | +| `cert` _string_ | Cert is the PEM-encoded certificate. | +| `cert_alt` _string_ | CertAlt is the PEM-encoded certificate. This should only be set if you have both RSA and ECDSA types of certificate available and would like Kong to prefer serving using ECDSA certs when client advertises support for it. | +| `key` _string_ | Key is the PEM-encoded private key. | +| `key_alt` _string_ | KeyAlt is the PEM-encoded private key. This should only be set if you have both RSA and ECDSA types of certificate available and would like Kong to prefer serving using ECDSA certs when client advertises support for it. | +| `tags` _string array_ | Tags is an optional set of tags applied to the certificate. | + + +_Appears in:_ +- [KongCertificateSpec](#kongcertificatespec) + +#### KongCertificateSpec + + +KongCertificateSpec contains the specification for the KongCertificate. + + + +| Field | Description | +| --- | --- | +| `controlPlaneRef` _[ControlPlaneRef](#controlplaneref)_ | ControlPlaneRef references the Konnect Control Plane that this KongCertificate should be created in. | +| `cert` _string_ | Cert is the PEM-encoded certificate. | +| `cert_alt` _string_ | CertAlt is the PEM-encoded certificate. This should only be set if you have both RSA and ECDSA types of certificate available and would like Kong to prefer serving using ECDSA certs when client advertises support for it. | +| `key` _string_ | Key is the PEM-encoded private key. | +| `key_alt` _string_ | KeyAlt is the PEM-encoded private key. This should only be set if you have both RSA and ECDSA types of certificate available and would like Kong to prefer serving using ECDSA certs when client advertises support for it. | +| `tags` _string array_ | Tags is an optional set of tags applied to the certificate. | + + +_Appears in:_ +- [KongCertificate](#kongcertificate) + +#### KongCertificateStatus + + +KongCertificateStatus defines the observed state of KongCertificate. + + + +| Field | Description | +| --- | --- | +| `konnect` _[KonnectEntityStatusWithControlPlaneRef](#konnectentitystatuswithcontrolplaneref)_ | Konnect contains the Konnect entity status. | +| `conditions` _[Condition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#condition-v1-meta) array_ | Conditions describe the status of the Konnect entity. | + + +_Appears in:_ +- [KongCertificate](#kongcertificate) + +#### KongCredentialACLAPISpec + + +KongCredentialACLAPISpec defines specification of an ACL credential. + + + +| Field | Description | +| --- | --- | +| `group` _string_ | Group is the name for the ACL credential. | +| `tags` _string array_ | Tags is a list of tags for the ACL credential. | + + +_Appears in:_ +- [KongCredentialACLSpec](#kongcredentialaclspec) + +#### KongCredentialACLSpec + + +KongCredentialACLSpec defines specification of Kong ACL. + + + +| Field | Description | +| --- | --- | +| `consumerRef` _[LocalObjectReference](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#localobjectreference-v1-core)_ | ConsumerRef is a reference to a Consumer this KongCredentialACL is associated with. | +| `group` _string_ | Group is the name for the ACL credential. | +| `tags` _string array_ | Tags is a list of tags for the ACL credential. | + + +_Appears in:_ +- [KongCredentialACL](#kongcredentialacl) + +#### KongCredentialACLStatus + + +KongCredentialACLStatus represents the current status of the ACL credential resource. + + + +| Field | Description | +| --- | --- | +| `konnect` _[KonnectEntityStatusWithControlPlaneAndConsumerRefs](#konnectentitystatuswithcontrolplaneandconsumerrefs)_ | Konnect contains the Konnect entity status. | +| `conditions` _[Condition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#condition-v1-meta) array_ | Conditions describe the status of the Konnect entity. | + + +_Appears in:_ +- [KongCredentialACL](#kongcredentialacl) + +#### KongCredentialAPIKeyAPISpec + + +KongCredentialAPIKeyAPISpec defines specification of an API Key credential. + + + +| Field | Description | +| --- | --- | +| `key` _string_ | Key is the key for the API Key credential. | +| `tags` _string array_ | Tags is a list of tags for the API Key credential. | + + +_Appears in:_ +- [KongCredentialAPIKeySpec](#kongcredentialapikeyspec) + +#### KongCredentialAPIKeySpec + + +KongCredentialAPIKeySpec defines specification of a Kong Route. + + + +| Field | Description | +| --- | --- | +| `consumerRef` _[LocalObjectReference](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#localobjectreference-v1-core)_ | ConsumerRef is a reference to a Consumer this KongCredentialAPIKey is associated with. | +| `key` _string_ | Key is the key for the API Key credential. | +| `tags` _string array_ | Tags is a list of tags for the API Key credential. | + + +_Appears in:_ +- [KongCredentialAPIKey](#kongcredentialapikey) + +#### KongCredentialAPIKeyStatus + + +KongCredentialAPIKeyStatus represents the current status of the API Key credential resource. + + + +| Field | Description | +| --- | --- | +| `konnect` _[KonnectEntityStatusWithControlPlaneAndConsumerRefs](#konnectentitystatuswithcontrolplaneandconsumerrefs)_ | Konnect contains the Konnect entity status. | +| `conditions` _[Condition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#condition-v1-meta) array_ | Conditions describe the status of the Konnect entity. | + + +_Appears in:_ +- [KongCredentialAPIKey](#kongcredentialapikey) + +#### KongCredentialBasicAuthAPISpec + + +KongCredentialBasicAuthAPISpec defines specification of a BasicAuth credential. + + + +| Field | Description | +| --- | --- | +| `password` _string_ | Password is the password for the BasicAuth credential. | +| `tags` _string array_ | Tags is a list of tags for the BasicAuth credential. | +| `username` _string_ | Username is the username for the BasicAuth credential. | + + +_Appears in:_ +- [KongCredentialBasicAuthSpec](#kongcredentialbasicauthspec) + +#### KongCredentialBasicAuthSpec + + +KongCredentialBasicAuthSpec defines specification of a Kong Route. + + + +| Field | Description | +| --- | --- | +| `consumerRef` _[LocalObjectReference](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#localobjectreference-v1-core)_ | ConsumerRef is a reference to a Consumer this CredentialBasicAuth is associated with. | +| `password` _string_ | Password is the password for the BasicAuth credential. | +| `tags` _string array_ | Tags is a list of tags for the BasicAuth credential. | +| `username` _string_ | Username is the username for the BasicAuth credential. | + + +_Appears in:_ +- [KongCredentialBasicAuth](#kongcredentialbasicauth) + +#### KongCredentialBasicAuthStatus + + +KongCredentialBasicAuthStatus represents the current status of the BasicAuth credential resource. + + + +| Field | Description | +| --- | --- | +| `konnect` _[KonnectEntityStatusWithControlPlaneAndConsumerRefs](#konnectentitystatuswithcontrolplaneandconsumerrefs)_ | Konnect contains the Konnect entity status. | +| `conditions` _[Condition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#condition-v1-meta) array_ | Conditions describe the status of the Konnect entity. | + + +_Appears in:_ +- [KongCredentialBasicAuth](#kongcredentialbasicauth) + +#### KongCredentialHMACAPISpec + + +KongCredentialHMACAPISpec defines specification of an HMAC credential. + + + +| Field | Description | +| --- | --- | +| `id` _string_ | ID is the unique identifier for the HMAC credential. | +| `secret` _string_ | Secret is the secret for the HMAC credential. | +| `tags` _string array_ | Tags is a list of tags for the HMAC credential. | +| `username` _string_ | Username is the username for the HMAC credential. | + + +_Appears in:_ +- [KongCredentialHMACSpec](#kongcredentialhmacspec) + +#### KongCredentialHMACSpec + + +KongCredentialHMACSpec defines specification of a Kong Route. + + + +| Field | Description | +| --- | --- | +| `consumerRef` _[LocalObjectReference](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#localobjectreference-v1-core)_ | ConsumerRef is a reference to a Consumer this KongCredentialHMAC is associated with. | +| `id` _string_ | ID is the unique identifier for the HMAC credential. | +| `secret` _string_ | Secret is the secret for the HMAC credential. | +| `tags` _string array_ | Tags is a list of tags for the HMAC credential. | +| `username` _string_ | Username is the username for the HMAC credential. | + + +_Appears in:_ +- [KongCredentialHMAC](#kongcredentialhmac) + +#### KongCredentialHMACStatus + + +KongCredentialHMACStatus represents the current status of the HMAC credential resource. + + + +| Field | Description | +| --- | --- | +| `konnect` _[KonnectEntityStatusWithControlPlaneAndConsumerRefs](#konnectentitystatuswithcontrolplaneandconsumerrefs)_ | Konnect contains the Konnect entity status. | +| `conditions` _[Condition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#condition-v1-meta) array_ | Conditions describe the status of the Konnect entity. | + + +_Appears in:_ +- [KongCredentialHMAC](#kongcredentialhmac) + +#### KongCredentialJWTAPISpec + + +KongCredentialJWTAPISpec defines specification of an JWT credential. + + + +| Field | Description | +| --- | --- | +| `algorithm` _string_ | Algorithm is the algorithm used to sign the JWT token. | +| `id` _string_ | ID is the unique identifier for the JWT credential. | +| `key` _string_ | Key is the key for the JWT credential. | +| `rsa_public_key` _string_ | RSA PublicKey is the RSA public key for the JWT credential. | +| `secret` _string_ | Secret is the secret for the JWT credential. | +| `tags` _string array_ | Tags is a list of tags for the JWT credential. | + + +_Appears in:_ +- [KongCredentialJWTSpec](#kongcredentialjwtspec) + +#### KongCredentialJWTSpec + + +KongCredentialJWTSpec defines specification of a Kong Route. + + + +| Field | Description | +| --- | --- | +| `consumerRef` _[LocalObjectReference](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#localobjectreference-v1-core)_ | ConsumerRef is a reference to a Consumer this KongCredentialJWT is associated with. | +| `algorithm` _string_ | Algorithm is the algorithm used to sign the JWT token. | +| `id` _string_ | ID is the unique identifier for the JWT credential. | +| `key` _string_ | Key is the key for the JWT credential. | +| `rsa_public_key` _string_ | RSA PublicKey is the RSA public key for the JWT credential. | +| `secret` _string_ | Secret is the secret for the JWT credential. | +| `tags` _string array_ | Tags is a list of tags for the JWT credential. | + + +_Appears in:_ +- [KongCredentialJWT](#kongcredentialjwt) + +#### KongCredentialJWTStatus + + +KongCredentialJWTStatus represents the current status of the JWT credential resource. + + + +| Field | Description | +| --- | --- | +| `konnect` _[KonnectEntityStatusWithControlPlaneAndConsumerRefs](#konnectentitystatuswithcontrolplaneandconsumerrefs)_ | Konnect contains the Konnect entity status. | +| `conditions` _[Condition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#condition-v1-meta) array_ | Conditions describe the status of the Konnect entity. | + + +_Appears in:_ +- [KongCredentialJWT](#kongcredentialjwt) + +#### KongDataPlaneClientCertificateAPISpec + + +KongDataPlaneClientCertificateAPISpec defines the attributes of a Kong DP certificate. + + + +| Field | Description | +| --- | --- | +| `cert` _string_ | Cert is the certificate in PEM format. Once the certificate gets programmed this field becomes immutable. | + + +_Appears in:_ +- [KongDataPlaneClientCertificateSpec](#kongdataplaneclientcertificatespec) + +#### KongDataPlaneClientCertificateSpec + + +KongDataPlaneClientCertificateSpec defines the spec for a KongDataPlaneClientCertificate. + + + +| Field | Description | +| --- | --- | +| `controlPlaneRef` _[ControlPlaneRef](#controlplaneref)_ | ControlPlaneRef is a reference to a Konnect ControlPlane this KongDataPlaneClientCertificate is associated with. | +| `cert` _string_ | Cert is the certificate in PEM format. Once the certificate gets programmed this field becomes immutable. | + + +_Appears in:_ +- [KongDataPlaneClientCertificate](#kongdataplaneclientcertificate) + +#### KongDataPlaneClientCertificateStatus + + +KongDataPlaneClientCertificateStatus defines the status for a KongDataPlaneClientCertificate. + + + +| Field | Description | +| --- | --- | +| `konnect` _[KonnectEntityStatusWithControlPlaneRef](#konnectentitystatuswithcontrolplaneref)_ | Konnect contains the Konnect entity status. | +| `conditions` _[Condition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#condition-v1-meta) array_ | Conditions describe the status of the Konnect entity. | + + +_Appears in:_ +- [KongDataPlaneClientCertificate](#kongdataplaneclientcertificate) + +#### KongKeyAPISpec + + +KongKeyAPISpec defines the attributes of a Kong Key. + + + +| Field | Description | +| --- | --- | +| `kid` _string_ | KID is a unique identifier for a key. When JWK is provided, KID has to match the KID in the JWK. | +| `name` _string_ | Name is an optional name to associate with the given key. | +| `jwk` _string_ | JWK is a JSON Web Key represented as a string. The JWK must contain a KID field that matches the KID in the KongKey. Either JWK or PEM must be set. | +| `pem` _[PEMKeyPair](#pemkeypair)_ | PEM is a keypair in PEM format. Either JWK or PEM must be set. | +| `tags` _string array_ | Tags is an optional set of strings associated with the Key for grouping and filtering. | + + +_Appears in:_ +- [KongKeySpec](#kongkeyspec) + +#### KongKeySetAPISpec + + +KongKeySetAPISpec defines the attributes of a Kong KeySet. + + + +| Field | Description | +| --- | --- | +| `name` _string_ | Name is a name of the KeySet. | +| `tags` _string array_ | Tags is an optional set of strings associated with the KeySet for grouping and filtering. | + + +_Appears in:_ +- [KongKeySetSpec](#kongkeysetspec) + +#### KongKeySetSpec + + +KongKeySetSpec defines the spec for a KongKeySet. + + + +| Field | Description | +| --- | --- | +| `controlPlaneRef` _[ControlPlaneRef](#controlplaneref)_ | ControlPlaneRef is a reference to a Konnect ControlPlane with which KongKeySet is associated. | +| `name` _string_ | Name is a name of the KeySet. | +| `tags` _string array_ | Tags is an optional set of strings associated with the KeySet for grouping and filtering. | + + +_Appears in:_ +- [KongKeySet](#kongkeyset) + +#### KongKeySetStatus + + +KongKeySetStatus defines the status for a KongKeySet. + + + +| Field | Description | +| --- | --- | +| `konnect` _[KonnectEntityStatusWithControlPlaneRef](#konnectentitystatuswithcontrolplaneref)_ | Konnect contains the Konnect entity status. | +| `conditions` _[Condition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#condition-v1-meta) array_ | Conditions describe the status of the Konnect entity. | + + +_Appears in:_ +- [KongKeySet](#kongkeyset) + +#### KongKeySpec + + +KongKeySpec defines the spec for a KongKey. + + + +| Field | Description | +| --- | --- | +| `controlPlaneRef` _[ControlPlaneRef](#controlplaneref)_ | ControlPlaneRef is a reference to a Konnect ControlPlane this KongKey is associated with. | +| `keySetRef` _[KeySetRef](#keysetref)_ | KeySetRef is a reference to a KongKeySet this KongKey is attached to. ControlPlane referenced by a KongKeySet must be the same as the ControlPlane referenced by the KongKey. | +| `kid` _string_ | KID is a unique identifier for a key. When JWK is provided, KID has to match the KID in the JWK. | +| `name` _string_ | Name is an optional name to associate with the given key. | +| `jwk` _string_ | JWK is a JSON Web Key represented as a string. The JWK must contain a KID field that matches the KID in the KongKey. Either JWK or PEM must be set. | +| `pem` _[PEMKeyPair](#pemkeypair)_ | PEM is a keypair in PEM format. Either JWK or PEM must be set. | +| `tags` _string array_ | Tags is an optional set of strings associated with the Key for grouping and filtering. | + + +_Appears in:_ +- [KongKey](#kongkey) + +#### KongKeyStatus + + +KongKeyStatus defines the status for a KongKey. + + + +| Field | Description | +| --- | --- | +| `konnect` _[KonnectEntityStatusWithControlPlaneAndKeySetRef](#konnectentitystatuswithcontrolplaneandkeysetref)_ | Konnect contains the Konnect entity status. | +| `conditions` _[Condition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#condition-v1-meta) array_ | Conditions describe the status of the Konnect entity. | + + +_Appears in:_ +- [KongKey](#kongkey) + +#### KongLicenseControllerStatus + + +KongLicenseControllerStatus is the status of owning KongLicense being processed +identified by the controllerName field. + + + +| Field | Description | +| --- | --- | +| `controllerName` _string_ | ControllerName is an identifier of the controller to reconcile this KongLicense. Should be unique in the list of controller statuses. | +| `controllerRef` _[ControllerReference](#controllerreference)_ | ControllerRef is the reference of the controller to reconcile this KongLicense. It is usually the name of (KIC/KGO) pod that reconciles it. | +| `conditions` _[Condition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#condition-v1-meta) array_ | Conditions describe the current conditions of the KongLicense on the controller. | + + +_Appears in:_ +- [KongLicenseStatus](#konglicensestatus) + +#### KongLicenseStatus + + +KongLicenseStatus stores the status of the KongLicense being processesed in each controller that reconciles it. + + + +| Field | Description | +| --- | --- | +| `controllers` _[KongLicenseControllerStatus](#konglicensecontrollerstatus) array_ | | + + +_Appears in:_ +- [KongLicense](#konglicense) + +#### KongObjectRef + + +KongObjectRef is a reference to another object representing a Kong entity with deterministic type.

+TODO: https://github.com/Kong/kubernetes-configuration/issues/96 +change other types to use the generic `KongObjectRef` and move it to a common package to prevent possible import cycles. + + + +| Field | Description | +| --- | --- | +| `name` _string_ | Name is the name of the entity.

NOTE: the `Required` validation rule does not reject empty strings so we use `MinLength` to reject empty string here. | + + +_Appears in:_ +- [KongSNISpec](#kongsnispec) + +#### KongPluginBindingSpec + + +KongPluginBindingSpec defines specification of a KongPluginBinding. + + + +| Field | Description | +| --- | --- | +| `pluginRef` _[PluginRef](#pluginref)_ | PluginReference is a reference to the KongPlugin or KongClusterPlugin resource. | +| `targets` _[KongPluginBindingTargets](#kongpluginbindingtargets)_ | Targets contains the targets references. It is possible to set multiple combinations of references, as described in https://docs.konghq.com/gateway/latest/key-concepts/plugins/#precedence The complete set of allowed combinations and their order of precedence for plugins configured to multiple entities is:

1. Consumer + route + service 2. Consumer group + service + route 3. Consumer + route 4. Consumer + service 5. Consumer group + route 6. Consumer group + service 7. Route + service 8. Consumer 9. Consumer group 10. Route 11. Service | +| `controlPlaneRef` _[ControlPlaneRef](#controlplaneref)_ | ControlPlaneRef is a reference to a ControlPlane this KongPluginBinding is associated with. | + + +_Appears in:_ +- [KongPluginBinding](#kongpluginbinding) + +#### KongPluginBindingStatus + + +KongPluginBindingStatus represents the current status of the KongBinding resource. + + + +| Field | Description | +| --- | --- | +| `konnect` _[KonnectEntityStatusWithControlPlaneRef](#konnectentitystatuswithcontrolplaneref)_ | Konnect contains the Konnect entity status. | +| `conditions` _[Condition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#condition-v1-meta) array_ | Conditions describe the status of the Konnect entity. | + + +_Appears in:_ +- [KongPluginBinding](#kongpluginbinding) + +#### KongPluginBindingTargets + + +KongPluginBindingTargets contains the targets references. + + + +| Field | Description | +| --- | --- | +| `routeRef` _[TargetRefWithGroupKind](#targetrefwithgroupkind)_ | RouteReference can be used to reference one of the following resouces: - networking.k8s.io/Ingress - gateway.networking.k8s.io/HTTPRoute - gateway.networking.k8s.io/GRPCRoute - configuration.konghq.com/KongRoute | +| `serviceRef` _[TargetRefWithGroupKind](#targetrefwithgroupkind)_ | ServiceReference can be used to reference one of the following resouces: - core/Service or /Service - configuration.konghq.com/KongService | +| `consumerRef` _[TargetRef](#targetref)_ | ConsumerReference is used to reference a configuration.konghq.com/Consumer resource. The group/kind is fixed, therefore the reference is performed only by name. | +| `consumerGroupRef` _[TargetRef](#targetref)_ | ConsumerGroupReference is used to reference a configuration.konghq.com/ConsumerGroup resource. The group/kind is fixed, therefore the reference is performed only by name. | + + +_Appears in:_ +- [KongPluginBindingSpec](#kongpluginbindingspec) + +#### KongRouteAPISpec + + +KongRouteAPISpec represents the configuration of a Route in Kong as defined by the Konnect API.

+These fields are mostly copied from sdk-konnect-go but some modifications have been made +to make the code generation required for Kubernetes CRDs work. + + + +| Field | Description | +| --- | --- | +| `destinations` _Destinations array_ | A list of IP destinations of incoming connections that match this Route when using stream routing. Each entry is an object with fields "ip" (optionally in CIDR range notation) and/or "port". | +| `headers` _object (keys:string, values:string)_ | One or more lists of values indexed by header name that will cause this Route to match if present in the request. The `Host` header cannot be used with this attribute: hosts should be specified using the `hosts` attribute. When `headers` contains only one value and that value starts with the special prefix `~*`, the value is interpreted as a regular expression. | +| `hosts` _string array_ | A list of domain names that match this Route. Note that the hosts value is case sensitive. | +| `https_redirect_status_code` _[HTTPSRedirectStatusCode](#httpsredirectstatuscode)_ | The status code Kong responds with when all properties of a Route match except the protocol i.e. if the protocol of the request is `HTTP` instead of `HTTPS`. `Location` header is injected by Kong if the field is set to 301, 302, 307 or 308. Note: This config applies only if the Route is configured to only accept the `https` protocol. | +| `methods` _string array_ | A list of HTTP methods that match this Route. | +| `name` _string_ | The name of the Route. Route names must be unique, and they are case sensitive. For example, there can be two different Routes named "test" and "Test". | +| `path_handling` _[PathHandling](#pathhandling)_ | Controls how the Service path, Route path and requested path are combined when sending a request to the upstream. See above for a detailed description of each behavior. | +| `paths` _string array_ | A list of paths that match this Route. | +| `preserve_host` _boolean_ | When matching a Route via one of the `hosts` domain names, use the request `Host` header in the upstream request headers. If set to `false`, the upstream `Host` header will be that of the Service's `host`. | +| `protocols` _RouteProtocols array_ | An array of the protocols this Route should allow. See the [Route Object](#route-object) section for a list of accepted protocols. When set to only `"https"`, HTTP requests are answered with an upgrade error. When set to only `"http"`, HTTPS requests are answered with an error. | +| `regex_priority` _integer_ | A number used to choose which route resolves a given request when several routes match it using regexes simultaneously. When two routes match the path and have the same `regex_priority`, the older one (lowest `created_at`) is used. Note that the priority for non-regex routes is different (longer non-regex routes are matched before shorter ones). | +| `request_buffering` _boolean_ | Whether to enable request body buffering or not. With HTTP 1.1, it may make sense to turn this off on services that receive data with chunked transfer encoding. | +| `response_buffering` _boolean_ | Whether to enable response body buffering or not. With HTTP 1.1, it may make sense to turn this off on services that send data with chunked transfer encoding. | +| `snis` _string array_ | A list of SNIs that match this Route when using stream routing. | +| `sources` _Sources array_ | A list of IP sources of incoming connections that match this Route when using stream routing. Each entry is an object with fields "ip" (optionally in CIDR range notation) and/or "port". | +| `strip_path` _boolean_ | When matching a Route via one of the `paths`, strip the matching prefix from the upstream request URL. | +| `tags` _string array_ | An optional set of strings associated with the Route for grouping and filtering. | + + +_Appears in:_ +- [KongRouteSpec](#kongroutespec) + +#### KongRouteSpec + + +KongRouteSpec defines specification of a Kong Route. + + + +| Field | Description | +| --- | --- | +| `controlPlaneRef` _[ControlPlaneRef](#controlplaneref)_ | ControlPlaneRef is a reference to a ControlPlane this KongRoute is associated with. Route can either specify a ControlPlaneRef and be 'serviceless' route or specify a ServiceRef and be associated with a Service. | +| `serviceRef` _[ServiceRef](#serviceref)_ | ServiceRef is a reference to a Service this KongRoute is associated with. Route can either specify a ControlPlaneRef and be 'serviceless' route or specify a ServiceRef and be associated with a Service. | +| `destinations` _Destinations array_ | A list of IP destinations of incoming connections that match this Route when using stream routing. Each entry is an object with fields "ip" (optionally in CIDR range notation) and/or "port". | +| `headers` _object (keys:string, values:string)_ | One or more lists of values indexed by header name that will cause this Route to match if present in the request. The `Host` header cannot be used with this attribute: hosts should be specified using the `hosts` attribute. When `headers` contains only one value and that value starts with the special prefix `~*`, the value is interpreted as a regular expression. | +| `hosts` _string array_ | A list of domain names that match this Route. Note that the hosts value is case sensitive. | +| `https_redirect_status_code` _[HTTPSRedirectStatusCode](#httpsredirectstatuscode)_ | The status code Kong responds with when all properties of a Route match except the protocol i.e. if the protocol of the request is `HTTP` instead of `HTTPS`. `Location` header is injected by Kong if the field is set to 301, 302, 307 or 308. Note: This config applies only if the Route is configured to only accept the `https` protocol. | +| `methods` _string array_ | A list of HTTP methods that match this Route. | +| `name` _string_ | The name of the Route. Route names must be unique, and they are case sensitive. For example, there can be two different Routes named "test" and "Test". | +| `path_handling` _[PathHandling](#pathhandling)_ | Controls how the Service path, Route path and requested path are combined when sending a request to the upstream. See above for a detailed description of each behavior. | +| `paths` _string array_ | A list of paths that match this Route. | +| `preserve_host` _boolean_ | When matching a Route via one of the `hosts` domain names, use the request `Host` header in the upstream request headers. If set to `false`, the upstream `Host` header will be that of the Service's `host`. | +| `protocols` _RouteProtocols array_ | An array of the protocols this Route should allow. See the [Route Object](#route-object) section for a list of accepted protocols. When set to only `"https"`, HTTP requests are answered with an upgrade error. When set to only `"http"`, HTTPS requests are answered with an error. | +| `regex_priority` _integer_ | A number used to choose which route resolves a given request when several routes match it using regexes simultaneously. When two routes match the path and have the same `regex_priority`, the older one (lowest `created_at`) is used. Note that the priority for non-regex routes is different (longer non-regex routes are matched before shorter ones). | +| `request_buffering` _boolean_ | Whether to enable request body buffering or not. With HTTP 1.1, it may make sense to turn this off on services that receive data with chunked transfer encoding. | +| `response_buffering` _boolean_ | Whether to enable response body buffering or not. With HTTP 1.1, it may make sense to turn this off on services that send data with chunked transfer encoding. | +| `snis` _string array_ | A list of SNIs that match this Route when using stream routing. | +| `sources` _Sources array_ | A list of IP sources of incoming connections that match this Route when using stream routing. Each entry is an object with fields "ip" (optionally in CIDR range notation) and/or "port". | +| `strip_path` _boolean_ | When matching a Route via one of the `paths`, strip the matching prefix from the upstream request URL. | +| `tags` _string array_ | An optional set of strings associated with the Route for grouping and filtering. | + + +_Appears in:_ +- [KongRoute](#kongroute) + +#### KongRouteStatus + + +KongRouteStatus represents the current status of the Kong Route resource. + + + +| Field | Description | +| --- | --- | +| `konnect` _[KonnectEntityStatusWithControlPlaneAndServiceRefs](#konnectentitystatuswithcontrolplaneandservicerefs)_ | Konnect contains the Konnect entity status. | +| `conditions` _[Condition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#condition-v1-meta) array_ | Conditions describe the status of the Konnect entity. | + + +_Appears in:_ +- [KongRoute](#kongroute) + +#### KongSNIAPISpec + + +KongSNIAPISpec defines specification of an SNI. + + + +| Field | Description | +| --- | --- | +| `name` _string_ | Name is the name of the SNI. Required and must be a host or wildcard host. | +| `tags` _string array_ | Tags is an optional set of strings associated with the SNI for grouping and filtering. | + + +_Appears in:_ +- [KongSNISpec](#kongsnispec) + +#### KongSNISpec + + +KongSNISpec defines specification of a Kong SNI. + + + +| Field | Description | +| --- | --- | +| `certificateRef` _[KongObjectRef](#kongobjectref)_ | CertificateRef is the reference to the certificate to which the KongSNI is attached. | +| `name` _string_ | Name is the name of the SNI. Required and must be a host or wildcard host. | +| `tags` _string array_ | Tags is an optional set of strings associated with the SNI for grouping and filtering. | + + +_Appears in:_ +- [KongSNI](#kongsni) + +#### KongSNIStatus + + +KongSNIStatus defines the status for a KongSNI. + + + +| Field | Description | +| --- | --- | +| `konnect` _[KonnectEntityStatusWithControlPlaneAndCertificateRefs](#konnectentitystatuswithcontrolplaneandcertificaterefs)_ | Konnect contains the Konnect entity status. | +| `conditions` _[Condition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#condition-v1-meta) array_ | Conditions describe the status of the Konnect entity. | + + +_Appears in:_ +- [KongSNI](#kongsni) + +#### KongServiceAPISpec + + +KongServiceAPISpec defines specification of a Kong Service. + + + +| Field | Description | +| --- | --- | +| `url` _string_ | Helper field to set `protocol`, `host`, `port` and `path` using a URL. This field is write-only and is not returned in responses. | +| `connect_timeout` _integer_ | The timeout in milliseconds for establishing a connection to the upstream server. | +| `enabled` _boolean_ | Whether the Service is active. If set to `false`, the proxy behavior will be as if any routes attached to it do not exist (404). Default: `true`. | +| `host` _string_ | The host of the upstream server. Note that the host value is case sensitive. | +| `name` _string_ | The Service name. | +| `path` _string_ | The path to be used in requests to the upstream server. | +| `port` _integer_ | The upstream server port. | +| `protocol` _[Protocol](#protocol)_ | The protocol used to communicate with the upstream. | +| `read_timeout` _integer_ | The timeout in milliseconds between two successive read operations for transmitting a request to the upstream server. | +| `retries` _integer_ | The number of retries to execute upon failure to proxy. | +| `tags` _string array_ | An optional set of strings associated with the Service for grouping and filtering. | +| `tls_verify` _boolean_ | Whether to enable verification of upstream server TLS certificate. If set to `null`, then the Nginx default is respected. | +| `tls_verify_depth` _integer_ | Maximum depth of chain while verifying Upstream server's TLS certificate. If set to `null`, then the Nginx default is respected. | +| `write_timeout` _integer_ | The timeout in milliseconds between two successive write operations for transmitting a request to the upstream server. | + + +_Appears in:_ +- [KongServiceSpec](#kongservicespec) + +#### KongServiceSpec + + +KongServiceSpec defines specification of a Kong Route. + + + +| Field | Description | +| --- | --- | +| `controlPlaneRef` _[ControlPlaneRef](#controlplaneref)_ | ControlPlaneRef is a reference to a ControlPlane this KongService is associated with. | +| `url` _string_ | Helper field to set `protocol`, `host`, `port` and `path` using a URL. This field is write-only and is not returned in responses. | +| `connect_timeout` _integer_ | The timeout in milliseconds for establishing a connection to the upstream server. | +| `enabled` _boolean_ | Whether the Service is active. If set to `false`, the proxy behavior will be as if any routes attached to it do not exist (404). Default: `true`. | +| `host` _string_ | The host of the upstream server. Note that the host value is case sensitive. | +| `name` _string_ | The Service name. | +| `path` _string_ | The path to be used in requests to the upstream server. | +| `port` _integer_ | The upstream server port. | +| `protocol` _[Protocol](#protocol)_ | The protocol used to communicate with the upstream. | +| `read_timeout` _integer_ | The timeout in milliseconds between two successive read operations for transmitting a request to the upstream server. | +| `retries` _integer_ | The number of retries to execute upon failure to proxy. | +| `tags` _string array_ | An optional set of strings associated with the Service for grouping and filtering. | +| `tls_verify` _boolean_ | Whether to enable verification of upstream server TLS certificate. If set to `null`, then the Nginx default is respected. | +| `tls_verify_depth` _integer_ | Maximum depth of chain while verifying Upstream server's TLS certificate. If set to `null`, then the Nginx default is respected. | +| `write_timeout` _integer_ | The timeout in milliseconds between two successive write operations for transmitting a request to the upstream server. | + + +_Appears in:_ +- [KongService](#kongservice) + +#### KongServiceStatus + + +KongServiceStatus represents the current status of the Kong Service resource. + + + +| Field | Description | +| --- | --- | +| `konnect` _[KonnectEntityStatusWithControlPlaneRef](#konnectentitystatuswithcontrolplaneref)_ | Konnect contains the Konnect entity status. | +| `conditions` _[Condition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#condition-v1-meta) array_ | Conditions describe the status of the Konnect entity. | + + +_Appears in:_ +- [KongService](#kongservice) + +#### KongTargetAPISpec + + +KongTargetAPISpec are the attributes of the Kong Target itself. + + + +| Field | Description | +| --- | --- | +| `target` _string_ | Target is the target address of the upstream. | +| `weight` _integer_ | Weight is the weight this target gets within the upstream loadbalancer. | +| `tags` _string array_ | Tags is an optional set of strings associated with the Target for grouping and filtering. | + + +_Appears in:_ +- [KongTargetSpec](#kongtargetspec) + +#### KongTargetSpec + + +KongTargetSpec defines the specification of a Kong Target. +KongTargetSpec defines the desired state of KongTarget. + + + +| Field | Description | +| --- | --- | +| `upstreamRef` _[TargetRef](#targetref)_ | UpstreamRef is a reference to a KongUpstream this KongTarget is attached to. | +| `target` _string_ | Target is the target address of the upstream. | +| `weight` _integer_ | Weight is the weight this target gets within the upstream loadbalancer. | +| `tags` _string array_ | Tags is an optional set of strings associated with the Target for grouping and filtering. | + + +_Appears in:_ +- [KongTarget](#kongtarget) + +#### KongTargetStatus + + +KongTargetStatus defines the observed state of KongTarget. + + + +| Field | Description | +| --- | --- | +| `konnect` _[KonnectEntityStatusWithControlPlaneAndUpstreamRefs](#konnectentitystatuswithcontrolplaneandupstreamrefs)_ | Konnect contains the Konnect entity status. | +| `conditions` _[Condition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#condition-v1-meta) array_ | Conditions describe the status of the Konnect entity. | + + +_Appears in:_ +- [KongTarget](#kongtarget) + +#### KongUpstreamAPISpec + + +KongUpstreamAPISpec defines specification of a Kong Upstream. + + + +| Field | Description | +| --- | --- | +| `algorithm` _[UpstreamAlgorithm](#upstreamalgorithm)_ | Which load balancing algorithm to use. | +| `client_certificate` _[UpstreamClientCertificate](#upstreamclientcertificate)_ | If set, the certificate to be used as client certificate while TLS handshaking to the upstream server. | +| `hash_fallback` _[HashFallback](#hashfallback)_ | What to use as hashing input if the primary `hash_on` does not return a hash (eg. header is missing, or no Consumer identified). Not available if `hash_on` is set to `cookie`. | +| `hash_fallback_header` _string_ | The header name to take the value from as hash input. Only required when `hash_fallback` is set to `header`. | +| `hash_fallback_query_arg` _string_ | The name of the query string argument to take the value from as hash input. Only required when `hash_fallback` is set to `query_arg`. | +| `hash_fallback_uri_capture` _string_ | The name of the route URI capture to take the value from as hash input. Only required when `hash_fallback` is set to `uri_capture`. | +| `hash_on` _[HashOn](#hashon)_ | What to use as hashing input. Using `none` results in a weighted-round-robin scheme with no hashing. | +| `hash_on_cookie` _string_ | The cookie name to take the value from as hash input. Only required when `hash_on` or `hash_fallback` is set to `cookie`. If the specified cookie is not in the request, Kong will generate a value and set the cookie in the response. | +| `hash_on_cookie_path` _string_ | The cookie path to set in the response headers. Only required when `hash_on` or `hash_fallback` is set to `cookie`. | +| `hash_on_header` _string_ | The header name to take the value from as hash input. Only required when `hash_on` is set to `header`. | +| `hash_on_query_arg` _string_ | The name of the query string argument to take the value from as hash input. Only required when `hash_on` is set to `query_arg`. | +| `hash_on_uri_capture` _string_ | The name of the route URI capture to take the value from as hash input. Only required when `hash_on` is set to `uri_capture`. | +| `healthchecks` _[Healthchecks](#healthchecks)_ | | +| `host_header` _string_ | The hostname to be used as `Host` header when proxying requests through Kong. | +| `name` _string_ | This is a hostname, which must be equal to the `host` of a Service. | +| `slots` _integer_ | The number of slots in the load balancer algorithm. If `algorithm` is set to `round-robin`, this setting determines the maximum number of slots. If `algorithm` is set to `consistent-hashing`, this setting determines the actual number of slots in the algorithm. Accepts an integer in the range `10`-`65536`. | +| `tags` _string array_ | An optional set of strings associated with the Upstream for grouping and filtering. | +| `use_srv_name` _boolean_ | If set, the balancer will use SRV hostname(if DNS Answer has SRV record) as the proxy upstream `Host`. | + + +_Appears in:_ +- [KongUpstreamSpec](#kongupstreamspec) + +#### KongUpstreamSpec + + +KongUpstreamSpec defines specification of a Kong Upstream. + + + +| Field | Description | +| --- | --- | +| `controlPlaneRef` _[ControlPlaneRef](#controlplaneref)_ | ControlPlaneRef is a reference to a ControlPlane this KongUpstream is associated with. | +| `algorithm` _[UpstreamAlgorithm](#upstreamalgorithm)_ | Which load balancing algorithm to use. | +| `client_certificate` _[UpstreamClientCertificate](#upstreamclientcertificate)_ | If set, the certificate to be used as client certificate while TLS handshaking to the upstream server. | +| `hash_fallback` _[HashFallback](#hashfallback)_ | What to use as hashing input if the primary `hash_on` does not return a hash (eg. header is missing, or no Consumer identified). Not available if `hash_on` is set to `cookie`. | +| `hash_fallback_header` _string_ | The header name to take the value from as hash input. Only required when `hash_fallback` is set to `header`. | +| `hash_fallback_query_arg` _string_ | The name of the query string argument to take the value from as hash input. Only required when `hash_fallback` is set to `query_arg`. | +| `hash_fallback_uri_capture` _string_ | The name of the route URI capture to take the value from as hash input. Only required when `hash_fallback` is set to `uri_capture`. | +| `hash_on` _[HashOn](#hashon)_ | What to use as hashing input. Using `none` results in a weighted-round-robin scheme with no hashing. | +| `hash_on_cookie` _string_ | The cookie name to take the value from as hash input. Only required when `hash_on` or `hash_fallback` is set to `cookie`. If the specified cookie is not in the request, Kong will generate a value and set the cookie in the response. | +| `hash_on_cookie_path` _string_ | The cookie path to set in the response headers. Only required when `hash_on` or `hash_fallback` is set to `cookie`. | +| `hash_on_header` _string_ | The header name to take the value from as hash input. Only required when `hash_on` is set to `header`. | +| `hash_on_query_arg` _string_ | The name of the query string argument to take the value from as hash input. Only required when `hash_on` is set to `query_arg`. | +| `hash_on_uri_capture` _string_ | The name of the route URI capture to take the value from as hash input. Only required when `hash_on` is set to `uri_capture`. | +| `healthchecks` _[Healthchecks](#healthchecks)_ | | +| `host_header` _string_ | The hostname to be used as `Host` header when proxying requests through Kong. | +| `name` _string_ | This is a hostname, which must be equal to the `host` of a Service. | +| `slots` _integer_ | The number of slots in the load balancer algorithm. If `algorithm` is set to `round-robin`, this setting determines the maximum number of slots. If `algorithm` is set to `consistent-hashing`, this setting determines the actual number of slots in the algorithm. Accepts an integer in the range `10`-`65536`. | +| `tags` _string array_ | An optional set of strings associated with the Upstream for grouping and filtering. | +| `use_srv_name` _boolean_ | If set, the balancer will use SRV hostname(if DNS Answer has SRV record) as the proxy upstream `Host`. | + + +_Appears in:_ +- [KongUpstream](#kongupstream) + +#### KongUpstreamStatus + + +KongUpstreamStatus represents the current status of the Kong Upstream resource. + + + +| Field | Description | +| --- | --- | +| `konnect` _[KonnectEntityStatusWithControlPlaneRef](#konnectentitystatuswithcontrolplaneref)_ | Konnect contains the Konnect entity status. | +| `conditions` _[Condition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#condition-v1-meta) array_ | Conditions describe the status of the Konnect entity. | + + +_Appears in:_ +- [KongUpstream](#kongupstream) + +#### KongVaultSpec + + +KongVaultSpec defines specification of a custom Kong vault. + + + +| Field | Description | +| --- | --- | +| `backend` _string_ | Backend is the type of the backend storing the secrets in the vault. The supported backends of Kong is listed here: https://docs.konghq.com/gateway/latest/kong-enterprise/secrets-management/backends/ | +| `prefix` _string_ | Prefix is the prefix of vault URI for referencing values in the vault. It is immutable after created. | +| `description` _string_ | Description is the additional information about the vault. | +| `config` _[JSON](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#json-v1-apiextensions-k8s-io)_ | Config is the configuration of the vault. Varies for different backends. | +| `tags` _string array_ | Tags are the tags associated to the vault for grouping and filtering. | +| `controlPlaneRef` _[ControlPlaneRef](#controlplaneref)_ | ControlPlaneRef is a reference to a Konnect ControlPlane this KongVault is associated with. | + + +_Appears in:_ +- [KongVault](#kongvault) + +#### KongVaultStatus + + +KongVaultStatus represents the current status of the KongVault resource. + + + +| Field | Description | +| --- | --- | +| `konnect` _[KonnectEntityStatusWithControlPlaneRef](#konnectentitystatuswithcontrolplaneref)_ | Konnect contains the Konnect entity status. | +| `conditions` _[Condition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#condition-v1-meta) array_ | Conditions describe the current conditions of the KongVaultStatus.

Known condition types are:

* "Programmed" | + + +_Appears in:_ +- [KongVault](#kongvault) + +#### KonnectNamespacedRef + + +KonnectNamespacedRef is the schema for the KonnectNamespacedRef type. + + + +| Field | Description | +| --- | --- | +| `name` _string_ | Name is the name of the Konnect Control Plane. | +| `namespace` _string_ | Namespace is the namespace where the Konnect Control Plane is in. Currently only cluster scoped resources (KongVault) are allowed to set `konnectNamespacedRef.namespace`. | + + +_Appears in:_ +- [ControlPlaneRef](#controlplaneref) + +#### Namespace +_Underlying type:_ `string` + +Namespace refers to a Kubernetes namespace. It must be a RFC 1123 label. + + + + + +_Appears in:_ +- [ControllerReference](#controllerreference) + +#### NamespacedServiceRef + + +NamespacedServiceRef is a namespaced reference to a KongService.

+NOTE: currently cross namespace references are not supported. + + + +| Field | Description | +| --- | --- | +| `name` _string_ | | + + +_Appears in:_ +- [ServiceRef](#serviceref) + +#### ObjectName +_Underlying type:_ `string` + +ObjectName refers to the name of a Kubernetes object. +Object names can have a variety of forms, including RFC1123 subdomains, +RFC 1123 labels, or RFC 1035 labels. + + + + + +_Appears in:_ +- [ControllerReference](#controllerreference) + +#### PEMKeyPair + + +PEMKeyPair defines a keypair in PEM format. + + + +| Field | Description | +| --- | --- | +| `private_key` _string_ | The private key in PEM format. | +| `public_key` _string_ | The public key in PEM format. | + + +_Appears in:_ +- [KongKeyAPISpec](#kongkeyapispec) +- [KongKeySpec](#kongkeyspec) + +#### PluginRef + + +PluginRef is a reference to a KongPlugin or KongClusterPlugin resource. + + + +| Field | Description | +| --- | --- | +| `name` _string_ | Name is the name of the KongPlugin or KongClusterPlugin resource. | +| `kind` _string_ | Kind can be KongPlugin or KongClusterPlugin. If not set, it is assumed to be KongPlugin. | + + +_Appears in:_ +- [KongPluginBindingSpec](#kongpluginbindingspec) + +#### ServiceRef + + +ServiceRef is a reference to a KongService. + + + +| Field | Description | +| --- | --- | +| `type` _string_ | Type can be one of: - namespacedRef | +| `namespacedRef` _[NamespacedServiceRef](#namespacedserviceref)_ | NamespacedRef is a reference to a KongService. | + + +_Appears in:_ +- [KongRouteSpec](#kongroutespec) + +#### TargetRef + + +TargetRef is a reference based on the object's name. + + + +| Field | Description | +| --- | --- | +| `name` _string_ | Name is the name of the entity. | + + +_Appears in:_ +- [KongPluginBindingTargets](#kongpluginbindingtargets) +- [KongTargetSpec](#kongtargetspec) + +#### TargetRefWithGroupKind + + +TargetRefWithGroupKind is a reference based on the object's group, kind, and name. + + + +| Field | Description | +| --- | --- | +| `name` _string_ | Name is the name of the entity. | +| `kind` _string_ | | +| `group` _string_ | | + + +_Appears in:_ +- [KongPluginBindingTargets](#kongpluginbindingtargets) + ## gateway-operator.konghq.com/v1alpha1 @@ -358,29 +2049,8 @@ such as "internet-accessible", "internal-only". _Appears in:_ - [AIGatewayEndpoint](#aigatewayendpoint) -#### ExtensionRef - - -ExtensionRef corresponds to another resource in the Kubernetes cluster which -defines extended behavior for a resource (e.g. ControlPlane). - - - -| Field | Description | -| --- | --- | -| `group` _string_ | Group is the group of the extension resource. | -| `kind` _string_ | Kind is kind of the extension resource. | -| `name` _string_ | Name is the name of the referred resource. | -| `namespace` _string_ | Namespace is the namespace of the referred resource.

For namespace-scoped resources if no Namespace is provided then the namespace of the parent object MUST be used.

This field MUST not be set when referring to cluster-scoped resources. | -_Appears in:_ -- [ControlPlaneOptions](#controlplaneoptions) -- [ControlPlaneSpec](#controlplanespec) -- [DataPlaneOptions](#dataplaneoptions) -- [DataPlaneSpec](#dataplanespec) -- [GatewayConfigDataPlaneOptions](#gatewayconfigdataplaneoptions) - @@ -741,7 +2411,7 @@ deploy and connect a ControlPlane to a DataPlane object. | --- | --- | | `deployment` _[ControlPlaneDeploymentOptions](#controlplanedeploymentoptions)_ | | | `dataplane` _string_ | DataPlanes refers to the named DataPlane objects which this ControlPlane is responsible for. Currently they must be in the same namespace as the DataPlane. | -| `extensions` _[ExtensionRef](#extensionref) array_ | Extensions provide additional or replacement features for the ControlPlane resources to influence or enhance functionality. | +| `extensions` _ExtensionRef array_ | Extensions provide additional or replacement features for the ControlPlane resources to influence or enhance functionality. | _Appears in:_ @@ -759,7 +2429,7 @@ ControlPlaneSpec defines the desired state of ControlPlane | --- | --- | | `deployment` _[ControlPlaneDeploymentOptions](#controlplanedeploymentoptions)_ | | | `dataplane` _string_ | DataPlanes refers to the named DataPlane objects which this ControlPlane is responsible for. Currently they must be in the same namespace as the DataPlane. | -| `extensions` _[ExtensionRef](#extensionref) array_ | Extensions provide additional or replacement features for the ControlPlane resources to influence or enhance functionality. | +| `extensions` _ExtensionRef array_ | Extensions provide additional or replacement features for the ControlPlane resources to influence or enhance functionality. | | `gatewayClass` _[ObjectName](#objectname)_ | GatewayClass indicates the Gateway resources which this ControlPlane should be responsible for configuring routes for (e.g. HTTPRoute, TCPRoute, UDPRoute, TLSRoute, e.t.c.).

Required for the ControlPlane to have any effect: at least one Gateway must be present for configuration to be pushed to the data-plane and only Gateway resources can be used to identify data-plane entities. | | `ingressClass` _string_ | IngressClass enables support for the older Ingress resource and indicates which Ingress resources this ControlPlane should be responsible for.

Routing configured this way will be applied to the Gateway resources indicated by GatewayClass.

If omitted, Ingress resources will not be supported by the ControlPlane. | @@ -833,7 +2503,7 @@ deploy the DataPlane. | `deployment` _[DataPlaneDeploymentOptions](#dataplanedeploymentoptions)_ | | | `network` _[DataPlaneNetworkOptions](#dataplanenetworkoptions)_ | | | `resources` _[DataPlaneResources](#dataplaneresources)_ | | -| `extensions` _[ExtensionRef](#extensionref) array_ | Extensions provide additional or replacement features for the DataPlane resources to influence or enhance functionality. NOTE: since we have one extension only (DataPlaneKonnectExtension), we limit the amount of extensions to 1. | +| `extensions` _ExtensionRef array_ | Extensions provide additional or replacement features for the DataPlane resources to influence or enhance functionality. NOTE: since we have one extension only (DataPlaneKonnectExtension), we limit the amount of extensions to 1. | | `pluginsToInstall` _[NamespacedName](#namespacedname) array_ | PluginsToInstall is a list of KongPluginInstallation resources that will be installed and available in the DataPlane. | @@ -969,7 +2639,7 @@ DataPlaneSpec defines the desired state of DataPlane | `deployment` _[DataPlaneDeploymentOptions](#dataplanedeploymentoptions)_ | | | `network` _[DataPlaneNetworkOptions](#dataplanenetworkoptions)_ | | | `resources` _[DataPlaneResources](#dataplaneresources)_ | | -| `extensions` _[ExtensionRef](#extensionref) array_ | Extensions provide additional or replacement features for the DataPlane resources to influence or enhance functionality. NOTE: since we have one extension only (DataPlaneKonnectExtension), we limit the amount of extensions to 1. | +| `extensions` _ExtensionRef array_ | Extensions provide additional or replacement features for the DataPlane resources to influence or enhance functionality. NOTE: since we have one extension only (DataPlaneKonnectExtension), we limit the amount of extensions to 1. | | `pluginsToInstall` _[NamespacedName](#namespacedname) array_ | PluginsToInstall is a list of KongPluginInstallation resources that will be installed and available in the DataPlane. | @@ -1045,7 +2715,7 @@ configure and deploy a DataPlane object. | --- | --- | | `deployment` _[DataPlaneDeploymentOptions](#dataplanedeploymentoptions)_ | | | `network` _[GatewayConfigDataPlaneNetworkOptions](#gatewayconfigdataplanenetworkoptions)_ | | -| `extensions` _[ExtensionRef](#extensionref) array_ | Extensions provide additional or replacement features for the DataPlane resources to influence or enhance functionality. NOTE: since we have one extension only (DataPlaneKonnectExtension), we limit the amount of extensions to 1. | +| `extensions` _ExtensionRef array_ | Extensions provide additional or replacement features for the DataPlane resources to influence or enhance functionality. NOTE: since we have one extension only (DataPlaneKonnectExtension), we limit the amount of extensions to 1. | | `pluginsToInstall` _[NamespacedName](#namespacedname) array_ | PluginsToInstall is a list of KongPluginInstallation resources that will be installed and available in the Gateways (DataPlanes) that use this GatewayConfig. | @@ -1372,3 +3042,200 @@ _Appears in:_ - [DataPlaneServiceOptions](#dataplaneserviceoptions) - [GatewayConfigServiceOptions](#gatewayconfigserviceoptions) + + +## konnect.konghq.com/v1alpha1 + +Package v1alpha1 contains API Schema definitions for the konnect.konghq.com v1alpha1 API group. + +- [KonnectAPIAuthConfiguration](#konnectapiauthconfiguration) +- [KonnectGatewayControlPlane](#konnectgatewaycontrolplane) +### KonnectAPIAuthConfiguration + + +KonnectAPIAuthConfiguration is the Schema for the Konnect configuration type. + + + +| Field | Description | +| --- | --- | +| `apiVersion` _string_ | `konnect.konghq.com/v1alpha1` +| `kind` _string_ | `KonnectAPIAuthConfiguration` +| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | +| `spec` _[KonnectAPIAuthConfigurationSpec](#konnectapiauthconfigurationspec)_ | Spec is the specification of the KonnectAPIAuthConfiguration resource. | +| `status` _[KonnectAPIAuthConfigurationStatus](#konnectapiauthconfigurationstatus)_ | Status is the status of the KonnectAPIAuthConfiguration resource. | + + + +### KonnectGatewayControlPlane + + +KonnectGatewayControlPlane is the Schema for the KonnectGatewayControlplanes API. + + + +| Field | Description | +| --- | --- | +| `apiVersion` _string_ | `konnect.konghq.com/v1alpha1` +| `kind` _string_ | `KonnectGatewayControlPlane` +| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | +| `spec` _[KonnectGatewayControlPlaneSpec](#konnectgatewaycontrolplanespec)_ | Spec defines the desired state of KonnectGatewayControlPlane. | +| `status` _[KonnectGatewayControlPlaneStatus](#konnectgatewaycontrolplanestatus)_ | Status defines the observed state of KonnectGatewayControlPlane. | + + + +### Types + +In this section you will find types that the CRDs rely on. +#### KonnectAPIAuthConfigurationRef + + +KonnectAPIAuthConfigurationRef is a reference to a KonnectAPIAuthConfiguration resource. + + + +| Field | Description | +| --- | --- | +| `name` _string_ | Name is the name of the KonnectAPIAuthConfiguration resource. | + + +_Appears in:_ +- [KonnectConfiguration](#konnectconfiguration) + +#### KonnectAPIAuthConfigurationSpec + + +KonnectAPIAuthConfigurationSpec is the specification of the KonnectAPIAuthConfiguration resource. + + + +| Field | Description | +| --- | --- | +| `type` _[KonnectAPIAuthType](#konnectapiauthtype)_ | | +| `token` _string_ | Token is the Konnect token used to authenticate with the Konnect API. | +| `secretRef` _[SecretReference](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#secretreference-v1-core)_ | SecretRef is a reference to a Kubernetes Secret containing the Konnect token. This secret is required to has the konghq.com/credential label set to "konnect". | +| `serverURL` _string_ | ServerURL is the URL of the Konnect server. | + + +_Appears in:_ +- [KonnectAPIAuthConfiguration](#konnectapiauthconfiguration) + +#### KonnectAPIAuthConfigurationStatus + + +KonnectAPIAuthConfigurationStatus is the status of the KonnectAPIAuthConfiguration resource. + + + +| Field | Description | +| --- | --- | +| `organizationID` _string_ | OrganizationID is the unique identifier of the organization in Konnect. | +| `serverURL` _string_ | ServerURL is configured server URL. | +| `conditions` _[Condition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#condition-v1-meta) array_ | Conditions describe the status of the Konnect configuration. | + + +_Appears in:_ +- [KonnectAPIAuthConfiguration](#konnectapiauthconfiguration) + +#### KonnectAPIAuthType +_Underlying type:_ `string` + +KonnectAPIAuthType is the type of authentication used to authenticate with the Konnect API. + + + + + +_Appears in:_ +- [KonnectAPIAuthConfigurationSpec](#konnectapiauthconfigurationspec) + +#### KonnectConfiguration + + +KonnectConfiguration is the Schema for the KonnectConfiguration API. + + + +| Field | Description | +| --- | --- | +| `authRef` _[KonnectAPIAuthConfigurationRef](#konnectapiauthconfigurationref)_ | APIAuthConfigurationRef is the reference to the API Auth Configuration that should be used for this Konnect Configuration. | + + +_Appears in:_ +- [KonnectGatewayControlPlaneSpec](#konnectgatewaycontrolplanespec) + +#### KonnectEntityStatus + + +KonnectEntityStatus represents the status of a Konnect entity. + + + +| Field | Description | +| --- | --- | +| `id` _string_ | ID is the unique identifier of the Konnect entity as assigned by Konnect API. If it's unset (empty string), it means the Konnect entity hasn't been created yet. | +| `serverURL` _string_ | ServerURL is the URL of the Konnect server in which the entity exists. | +| `organizationID` _string_ | OrgID is ID of Konnect Org that this entity has been created in. | + + +_Appears in:_ +- [KonnectEntityStatusWithControlPlaneAndCertificateRefs](#konnectentitystatuswithcontrolplaneandcertificaterefs) +- [KonnectEntityStatusWithControlPlaneAndConsumerRefs](#konnectentitystatuswithcontrolplaneandconsumerrefs) +- [KonnectEntityStatusWithControlPlaneAndKeySetRef](#konnectentitystatuswithcontrolplaneandkeysetref) +- [KonnectEntityStatusWithControlPlaneAndServiceRefs](#konnectentitystatuswithcontrolplaneandservicerefs) +- [KonnectEntityStatusWithControlPlaneAndUpstreamRefs](#konnectentitystatuswithcontrolplaneandupstreamrefs) +- [KonnectEntityStatusWithControlPlaneRef](#konnectentitystatuswithcontrolplaneref) +- [KonnectGatewayControlPlaneStatus](#konnectgatewaycontrolplanestatus) + + + + + + + + + + + + + +#### KonnectGatewayControlPlaneSpec + + +KonnectGatewayControlPlaneSpec defines the desired state of KonnectGatewayControlPlane. + + + +| Field | Description | +| --- | --- | +| `name` _string_ | The name of the control plane. | +| `description` _string_ | The description of the control plane in Konnect. | +| `cluster_type` _[ClusterType](#clustertype)_ | The ClusterType value of the cluster associated with the Control Plane. | +| `auth_type` _[AuthType](#authtype)_ | The auth type value of the cluster associated with the Runtime Group. | +| `cloud_gateway` _boolean_ | Whether this control-plane can be used for cloud-gateways. | +| `proxy_urls` _[ProxyURL](#proxyurl) array_ | Array of proxy URLs associated with reaching the data-planes connected to a control-plane. | +| `labels` _object (keys:string, values:string)_ | Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.

Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_". | +| `konnect` _[KonnectConfiguration](#konnectconfiguration)_ | | + + +_Appears in:_ +- [KonnectGatewayControlPlane](#konnectgatewaycontrolplane) + +#### KonnectGatewayControlPlaneStatus + + +KonnectGatewayControlPlaneStatus defines the observed state of KonnectGatewayControlPlane. + + + +| Field | Description | +| --- | --- | +| `id` _string_ | ID is the unique identifier of the Konnect entity as assigned by Konnect API. If it's unset (empty string), it means the Konnect entity hasn't been created yet. | +| `serverURL` _string_ | ServerURL is the URL of the Konnect server in which the entity exists. | +| `organizationID` _string_ | OrgID is ID of Konnect Org that this entity has been created in. | +| `conditions` _[Condition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#condition-v1-meta) array_ | Conditions describe the current conditions of the KonnectGatewayControlPlane.

Known condition types are:

* "Programmed" | + + +_Appears in:_ +- [KonnectGatewayControlPlane](#konnectgatewaycontrolplane) + diff --git a/scripts/apidocs-gen/config.yaml b/scripts/apidocs-gen/config.yaml index 08915f650..c182f389f 100755 --- a/scripts/apidocs-gen/config.yaml +++ b/scripts/apidocs-gen/config.yaml @@ -5,6 +5,11 @@ processor: # RE2 regular expressions describing type fields that should be excluded from the generated documentation. ignoreFields: - "TypeMeta$" + customMarkers: + - name: "apireference:kgo:include" + target: type + - name: "apireference:kgo:exclude" + target: field render: # Version of Kubernetes to use when generating links to Kubernetes API documentation. diff --git a/scripts/apidocs-gen/generate.sh b/scripts/apidocs-gen/generate.sh index 52b4c8cd7..1a2540198 100755 --- a/scripts/apidocs-gen/generate.sh +++ b/scripts/apidocs-gen/generate.sh @@ -7,11 +7,34 @@ set -o pipefail SCRIPT_ROOT="$(dirname "${BASH_SOURCE[0]}")/../.." CRD_REF_DOCS_BIN="$1" +# Create a temporary working directory where we'll copy the CRDs' definitions. +# It needs to be created in the repository tree so that crd-ref-docs can resolve Go module context. +WORK_DIR=$(mktemp -d -p "${SCRIPT_ROOT}") + +# Cleanup temporary working directory on exit. +function cleanup { + rm -rf "${WORK_DIR}" + echo "Cleaned up temporary working directory: ${WORK_DIR}" +} +trap cleanup EXIT + +# Resolve the path to the kubernetes-configuration module in Go modules' cache. +KUBERNETES_CONFIGURATION_CRDS_PACKAGE="github.com/kong/kubernetes-configuration" +KUBERNETES_CONFIGURATION_CRDS_VERSION=$(go list -m -f '{{ .Version }}' ${KUBERNETES_CONFIGURATION_CRDS_PACKAGE}) +KUBERNETES_CONFIGURATION_CRDS_CRDS_LOCAL_PATH="$(go env GOPATH)/pkg/mod/${KUBERNETES_CONFIGURATION_CRDS_PACKAGE}@${KUBERNETES_CONFIGURATION_CRDS_VERSION}" + +# Copy the CRDs' definitions to the working directory. +# We're copying from the local ./api directory and the one in the kubernetes-configuration module. +cp -r "${SCRIPT_ROOT}/api" "${WORK_DIR}/kgo" +# Using --no-preserve=mode,ownership to avoid permission issues when deleting files copied from the modules' cache. +cp --no-preserve=mode,ownership -r "${KUBERNETES_CONFIGURATION_CRDS_CRDS_LOCAL_PATH}/api" "${WORK_DIR}/kong" + +# Ensure the output directory exists. mkdir -p docs set -x ${CRD_REF_DOCS_BIN} \ - --source-path="${SCRIPT_ROOT}/api" \ + --source-path="${WORK_DIR}" \ --config="${SCRIPT_ROOT}/scripts/apidocs-gen/config.yaml" \ --templates-dir="${SCRIPT_ROOT}/scripts/apidocs-gen/template" \ --renderer=markdown \ diff --git a/scripts/apidocs-gen/template/gv_details.tpl b/scripts/apidocs-gen/template/gv_details.tpl index 0f7e03e24..ff006c4ff 100755 --- a/scripts/apidocs-gen/template/gv_details.tpl +++ b/scripts/apidocs-gen/template/gv_details.tpl @@ -7,15 +7,22 @@ {{- if $gv.Kinds }} {{- range $gv.SortedKinds }} +{{- $typ := $gv.TypeForKind . }} +{{- /* Display only KGO supported kinds */ -}} +{{- if index $typ.Markers "apireference:kgo:include" }} - {{ $gv.TypeForKind . | markdownRenderTypeLink }} {{- end }} +{{- end }} {{ end }} {{- /* Display exported Kinds first */ -}} {{- range $gv.SortedKinds -}} {{- $typ := $gv.TypeForKind . }} {{- $isKind := true -}} +{{- /* Display only KGO supported kinds */ -}} +{{- if index $typ.Markers "apireference:kgo:include" -}} {{ template "type" (dict "type" $typ "isKind" $isKind) }} +{{- end }} {{ end -}} ### Types @@ -30,7 +37,8 @@ In this section you will find types that the CRDs rely on. {{- $isKind = true -}} {{- end -}} {{- end -}} -{{- if not $isKind }} +{{- /* Display only KGO supported types */ -}} +{{- if and (not $isKind) (index $typ.Markers "apireference:kgo:include") }} {{ template "type" (dict "type" $typ "isKind" $isKind) }} {{ end -}} {{- end }} diff --git a/scripts/apidocs-gen/template/gv_list.tpl b/scripts/apidocs-gen/template/gv_list.tpl index 0ef2e3fae..5812e8a55 100755 --- a/scripts/apidocs-gen/template/gv_list.tpl +++ b/scripts/apidocs-gen/template/gv_list.tpl @@ -3,13 +3,31 @@ +{{- /* Prepare a GV -> hasSupportedTypes mapping for later lookups */ -}} +{{- $supportedTypesByGV := dict -}} +{{- range $groupVersions -}} + {{- $hasSupportedTypes := false -}} + {{- range $typ := .SortedTypes -}} + {{- if index $typ.Markers "apireference:kgo:include" -}} + {{- $hasSupportedTypes = true -}} + {{- end -}} + {{- end -}} + {{- if $hasSupportedTypes -}} + {{- $_ := set $supportedTypesByGV .GroupVersionString $hasSupportedTypes -}} + {{- end -}} +{{- end }} + ## Packages {{- range $groupVersions }} +{{- if hasKey $supportedTypesByGV .GroupVersionString }} - {{ markdownRenderGVLink . }} {{- end }} +{{- end }} {{ range $groupVersions }} +{{- if hasKey $supportedTypesByGV .GroupVersionString }} {{ template "gvDetails" . }} +{{- end }} {{ end }} {{- end -}} diff --git a/scripts/apidocs-gen/template/type.tpl b/scripts/apidocs-gen/template/type.tpl index 1b7dc6088..c0784566b 100755 --- a/scripts/apidocs-gen/template/type.tpl +++ b/scripts/apidocs-gen/template/type.tpl @@ -26,8 +26,10 @@ {{ end -}} {{ range $type.Members -}} +{{ if not (index .Markers "apireference:kgo:exclude") -}} | `{{ .Name }}` _{{ markdownRenderType .Type }}_ | {{ template "type_members" . }} | {{ end -}} +{{ end -}} {{ end }}