diff --git a/api/v1alpha1/kongplugin_installation.go b/api/v1alpha1/kongplugin_installation_types.go similarity index 65% rename from api/v1alpha1/kongplugin_installation.go rename to api/v1alpha1/kongplugin_installation_types.go index 3c4d6a5df..3ca16f8a5 100644 --- a/api/v1alpha1/kongplugin_installation.go +++ b/api/v1alpha1/kongplugin_installation_types.go @@ -31,11 +31,11 @@ func init() { //+kubebuilder:subresource:status //+kubebuilder:resource:shortName=kpi,categories=kong;all //+kubebuilder:subresource:status -//+kubebuilder:printcolumn:name="Programmed",type=string,JSONPath=`.status.conditions[?(@.type=="Programmed")].status` +//+kubebuilder:printcolumn:name="Ready",type=string,JSONPath=`.status.conditions[?(@.type=="Ready")].status` -// KongPluginInstallation allows to use a custom Kong Plugin distributed as a container image available in a registry. -// Such plugin can be associated with GatewayConfiguration or DataPlane to be available for particular Kong Gateway -// and to be configured with KongPlugin CRD. +// 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. type KongPluginInstallation struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -56,14 +56,14 @@ type KongPluginInstallationList struct { // KongPluginInstallationSpec defines the desired state of KongPluginInstallation. type KongPluginInstallationSpec struct { - // Image is OCI image URL for a packaged Custom Kong Plugin. + // The image is an OCI image URL for a packaged Custom Kong Plugin. // //+kubebuilder:validation:Required Image string `json:"image"` - // SecretRef allows specifying secret to be used for OCI registry authentication to pull the image with custom Kong Plugin. + // SecretRef allows referring specific Kubernetes Secret to use for OCI registry authentication for pulling an image with Custom Kong Plugin. // The Secret format should follow https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry. - // When field is omitted it is assumed that the image is public and can be fetched without providing any credentials. + // When the field is omitted it is assumed that the image is public and can be fetched without providing credentials. // //+optional SecretRef *corev1.SecretReference `json:"secretRef,omitempty"` @@ -90,7 +90,7 @@ type KongPluginInstallationConditionReason string const ( // This condition indicates whether the controller has fetched the plugin image - // and made it available for use as a specific Custom Kong Plugin. + // and made it available for use as a specific Custom Kong Plugin. // // It is a positive-polarity summary condition, and so should always be // present on the resource with ObservedGeneration set. @@ -99,31 +99,31 @@ const ( // status before it has all the information it needs to be able to determine // if the condition is true. // - // Possible reasons for this condition to be True are: + // Possible reasons for this condition to be "True" are: // - // * "Programmed" + // * "Ready" // - // Possible reasons for this condition to be False are: + // Possible reasons for this condition to be "False" are: // - // * "Invalid" - // * "Fetching" + // * "Failed" + // * "Pending" // - // Possible reasons for this condition to be Unknown are: + // Possible reasons for this condition to be "Unknown" are: // - // * "Fetching". + // * "Pending". // + KongPluginInstallationConditionStatusAccepted KongPluginInstallationConditionType = "Ready" - // Controllers should prefer to use the values of KongPluginInstallationConditionReason - // for the corresponding Reason, where appropriate. - KongPluginInstallationConditionStatusAccepted KongPluginInstallationConditionType = "Accepted" + // KongPluginInstallationReasonReady is used with the "Ready" condition when + // the condition is "True". + KongPluginInstallationReasonReady KongPluginInstallationConditionReason = "Ready" - // This reason is used with the "Accepted" condition when the KongPluginInstallation - // was not accepted because image can't be fetched, more details can be obtained from the - // condition's message. - KongPluginInstallationReasonInvalidParameters KongPluginInstallationConditionReason = "Invalid" + // KongPluginInstallationReasonFailed is used with the "Ready" condition when + // the KongPluginInstallation can't be configured e.g. image can't be fetched. + // More details can be obtained from the condition's message. + KongPluginInstallationReasonFailed KongPluginInstallationConditionReason = "Failed" - // This reason is used with the "Accepted" condition when the - // requested controller has started processing the KongPluginInstallation, - // but it haven't yet finished. - KongPluginInstallationReasonPending KongPluginInstallationConditionReason = "Fetching" + // KongPluginInstallationReasonPending is used with the "Ready" condition when the requested + // controller has started processing the KongPluginInstallation, but it hasn't finished yet. + KongPluginInstallationReasonPending KongPluginInstallationConditionReason = "Pending" ) diff --git a/config/crd/bases/gateway-operator.konghq.com_kongplugininstallations.yaml b/config/crd/bases/gateway-operator.konghq.com_kongplugininstallations.yaml index 058dad253..15c0868e3 100644 --- a/config/crd/bases/gateway-operator.konghq.com_kongplugininstallations.yaml +++ b/config/crd/bases/gateway-operator.konghq.com_kongplugininstallations.yaml @@ -20,16 +20,16 @@ spec: scope: Namespaced versions: - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=="Programmed")].status - name: Programmed + - jsonPath: .status.conditions[?(@.type=="Ready")].status + name: Ready type: string name: v1alpha1 schema: openAPIV3Schema: description: |- - KongPluginInstallation allows to use a custom Kong Plugin distributed as a container image available in a registry. - Such plugin can be associated with GatewayConfiguration or DataPlane to be available for particular Kong Gateway - and to be configured with KongPlugin CRD. + 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. properties: apiVersion: description: |- @@ -52,13 +52,14 @@ spec: description: KongPluginInstallationSpec defines the desired state of KongPluginInstallation. properties: image: - description: Image is OCI image URL for a packaged Custom Kong Plugin. + description: The image is an OCI image URL for a packaged Custom Kong + Plugin. type: string secretRef: description: |- - SecretRef allows specifying secret to be used for OCI registry authentication to pull the image with custom Kong Plugin. + SecretRef allows referring specific Kubernetes Secret to use for OCI registry authentication for pulling an image with Custom Kong Plugin. The Secret format should follow https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry. - When field is omitted it is assumed that the image is public and can be fetched without providing any credentials. + When the field is omitted it is assumed that the image is public and can be fetched without providing credentials. properties: name: description: name is unique within a namespace to reference a diff --git a/docs/api-reference.md b/docs/api-reference.md index e89278beb..1258bcbd5 100644 --- a/docs/api-reference.md +++ b/docs/api-reference.md @@ -84,9 +84,9 @@ the EE version of Kong Gateway Operator with a valid license. ### KongPluginInstallation -KongPluginInstallation allows to use a custom Kong Plugin distributed as a container image available in a registry. -Such plugin can be associated with GatewayConfiguration or DataPlane to be available for particular Kong Gateway -and to be configured with KongPlugin CRD. +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. @@ -321,8 +321,8 @@ KongPluginInstallationSpec defines the desired state of KongPluginInstallation. | Field | Description | | --- | --- | -| `image` _string_ | Image is OCI image URL for a packaged Custom Kong Plugin. | -| `secretRef` _[SecretReference](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#secretreference-v1-core)_ | SecretRef allows specifying secret to be used for OCI registry authentication to pull the image with custom Kong Plugin. The Secret format should follow https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry. When field is omitted it is assumed that the image is public and can be fetched without providing any credentials. | +| `image` _string_ | The image is an OCI image URL for a packaged Custom Kong Plugin. | +| `secretRef` _[SecretReference](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#secretreference-v1-core)_ | SecretRef allows referring specific Kubernetes Secret to use for OCI registry authentication for pulling an image with Custom Kong Plugin. The Secret format should follow https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry. When the field is omitted it is assumed that the image is public and can be fetched without providing credentials. | _Appears in:_