Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Travis Raines <[email protected]>
  • Loading branch information
programmer04 and rainest authored Jul 10, 2024
1 parent e6a3ccb commit 6286ec0
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions api/v1alpha1/kongplugin_installation_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@ type KongPluginInstallationList struct {
Items []KongPluginInstallation `json:"items"`
}

// KongPluginInstallationSpec defines the desired state of KongPluginInstallation.
// KongPluginInstallationSpec provides the information necessary to retrieve and install a Kong custom plugin.
type KongPluginInstallationSpec struct {

// The image is an 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 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.
// SecretRef 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
SecretRef *corev1.SecretReference `json:"secretRef,omitempty"`
Expand All @@ -79,13 +79,14 @@ type KongPluginInstallationStatus struct {
Conditions []metav1.Condition `json:"conditions,omitempty"`
}

// KongPluginInstallationConditionType is the type for status conditions on
// KongPluginInstallation resources. This type should be used with the
// KongPluginInstallationStatus.Conditions field.
// The following areKongPluginInstallation specific types for
// https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#condition-v1-meta fields

// KongPluginInstallationConditionType is the type for Conditions in a KongPluginInstallation's
// Status.Conditions array.
type KongPluginInstallationConditionType string

// KongPluginInstallationConditionReason defines the set of reasons that explain why
// a particular KongPluginInstallation condition type has been raised.
// KongPluginInstallationConditionReason is a reason for the KongPluginInstallation condition's last transition.
type KongPluginInstallationConditionReason string

const (
Expand Down

0 comments on commit 6286ec0

Please sign in to comment.