v1

package
v0.1.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2026 License: MIT Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package v1 contains API Schema definitions for the apps v1 API group. +kubebuilder:object:generate=true +groupName=apps.shophub.local

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: "apps.shophub.local", Version: "v1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
	//
	//nolint:staticcheck // SA1019: scheme.Builder still scaffolded by kubebuilder; tracked upstream.
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type Availability

type Availability string

Availability picks how many replicas the Shop Deployment runs. +kubebuilder:validation:Enum=standard;high

const (
	AvailabilityStandard Availability = "standard"
	AvailabilityHigh     Availability = "high"
)

type DatabaseKind

type DatabaseKind string

DatabaseKind selects which database operator backs the Shop instance. +kubebuilder:validation:Enum=postgres;mongodb

const (
	DatabasePostgres DatabaseKind = "postgres"
	DatabaseMongoDB  DatabaseKind = "mongodb"
)

type Shop

type Shop struct {
	metav1.TypeMeta `json:",inline"`

	// metadata is a standard object metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitzero"`

	// spec defines the desired state of Shop
	// +required
	Spec ShopSpec `json:"spec"`

	// status defines the observed state of Shop
	// +optional
	Status ShopStatus `json:"status,omitzero"`
}

Shop is the Schema for the shops API

func (*Shop) DeepCopy

func (in *Shop) DeepCopy() *Shop

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Shop.

func (*Shop) DeepCopyInto

func (in *Shop) DeepCopyInto(out *Shop)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Shop) DeepCopyObject

func (in *Shop) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ShopList

type ShopList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitzero"`
	Items           []Shop `json:"items"`
}

ShopList contains a list of Shop

func (*ShopList) DeepCopy

func (in *ShopList) DeepCopy() *ShopList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShopList.

func (*ShopList) DeepCopyInto

func (in *ShopList) DeepCopyInto(out *ShopList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ShopList) DeepCopyObject

func (in *ShopList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ShopSpec

type ShopSpec struct {
	// Title is the storefront display name shown to buyers.
	Title string `json:"title"`

	// Availability maps to replica count: standard=2, high=3.
	// +kubebuilder:default:=standard
	Availability Availability `json:"availability"`

	// Replicas overrides the availability-derived replica count. When set
	// (e.g. by `kubectl scale shop` or an HPA via the scale subresource) it
	// wins; when nil, Availability decides.
	// +optional
	Replicas *int32 `json:"replicas,omitempty"`

	// Database picks the DB operator that provisions persistence for this shop.
	// +kubebuilder:default:=postgres
	Database DatabaseKind `json:"database"`

	// WalletAddress is the public crypto address where buyers send payment.
	// Owner-supplied; not validated on-chain by the operator.
	WalletAddress string `json:"walletAddress"`

	// DiscordWebhookSecretRef points to a Secret with the Discord webhook URL.
	// If nil, Discord notifications are skipped for this shop.
	// +optional
	DiscordWebhookSecretRef *corev1.SecretReference `json:"discordWebhookSecretRef,omitempty"`

	// Image overrides the default Shop container image.
	// Used by CI/CD to bump shop image without touching the operator chart.
	// +optional
	Image *string `json:"image,omitempty"`
}

ShopSpec defines the desired state of Shop.

func (*ShopSpec) DeepCopy

func (in *ShopSpec) DeepCopy() *ShopSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShopSpec.

func (*ShopSpec) DeepCopyInto

func (in *ShopSpec) DeepCopyInto(out *ShopSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ShopStatus

type ShopStatus struct {
	// Conditions track high-level reconcile state (Available, Progressing, Degraded).
	// +listType=map
	// +listMapKey=type
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`

	// URL is the ingress hostname where the storefront is reachable.
	// +optional
	URL string `json:"url,omitempty"`

	// DatabaseSecret is the name of the Secret holding DB credentials
	// (auto-created by CNPG for postgres or MongoDB operator for mongodb).
	// +optional
	DatabaseSecret string `json:"databaseSecret,omitempty"`

	// ReadyReplicas mirrors the Deployment's readyReplicas.
	// +optional
	ReadyReplicas int32 `json:"readyReplicas,omitempty"`

	// Selector is the label selector for the Shop's pods, as a string. The
	// scale subresource exposes it so an HPA can find the pods it scales.
	// +optional
	Selector string `json:"selector,omitempty"`
}

ShopStatus defines the observed state of Shop.

func (*ShopStatus) DeepCopy

func (in *ShopStatus) DeepCopy() *ShopStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShopStatus.

func (*ShopStatus) DeepCopyInto

func (in *ShopStatus) DeepCopyInto(out *ShopStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL