Skip to content

Commit

Permalink
CR suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
programmer04 committed Jul 9, 2024
1 parent b75ee56 commit 6afbeba
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ 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
Expand Down Expand Up @@ -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.
Expand All @@ -99,31 +99,27 @@ 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"
// KongPluginInstallationReasonFailedParameters 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.
KongPluginInstallationReasonFailedParameters KongPluginInstallationConditionReason = "Failed"

// 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"

// 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 "Accepted" condition when the requested
// controller has started processing the KongPluginInstallation, but it hasn't yet finished.
KongPluginInstallationReasonPending KongPluginInstallationConditionReason = "Pending"
)
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ 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:
Expand Down

0 comments on commit 6afbeba

Please sign in to comment.