Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the observability v1alpha1 API group +kubebuilder:object:generate=true +groupName=observability.aggregator.io
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "observability.aggregator.io", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme 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 APIInfo ¶
type APIInfo struct { // Name is the name of the API (usually same as deployment name) Name string `json:"name"` // URL is the full URL where the OpenAPI spec can be accessed URL string `json:"url"` // LastUpdated is when the spec was last successfully collected LastUpdated string `json:"lastUpdated"` // Error is set if there was an error collecting the spec Error string `json:"error,omitempty"` // ResourceType is the type of the kubernetes resource (Deployment) ResourceType string `json:"resourceType"` // ResourceName is the name of the kubernetes resource ResourceName string `json:"resourceName"` // Namespace is the namespace of the kubernetes resource Namespace string `json:"namespace"` // Path is the OpenAPI spec path for this service Path string `json:"path"` // Port is the port for this service's OpenAPI spec Port string `json:"port"` // Annotations stores relevant annotations from the resource Annotations map[string]string `json:"annotations,omitempty"` // AllowedMethods stores the allowed HTTP methods for Swagger UI AllowedMethods []string `json:"allowedMethods,omitempty"` }
APIInfo contains information about a collected OpenAPI spec
func (*APIInfo) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIInfo.
func (*APIInfo) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OpenAPIAggregator ¶
type OpenAPIAggregator struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec OpenAPIAggregatorSpec `json:"spec,omitempty"` Status OpenAPIAggregatorStatus `json:"status,omitempty"` }
OpenAPIAggregator is the Schema for the openapiaggregators API
func (*OpenAPIAggregator) DeepCopy ¶
func (in *OpenAPIAggregator) DeepCopy() *OpenAPIAggregator
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenAPIAggregator.
func (*OpenAPIAggregator) DeepCopyInto ¶
func (in *OpenAPIAggregator) DeepCopyInto(out *OpenAPIAggregator)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*OpenAPIAggregator) DeepCopyObject ¶
func (in *OpenAPIAggregator) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type OpenAPIAggregatorList ¶
type OpenAPIAggregatorList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []OpenAPIAggregator `json:"items"` }
OpenAPIAggregatorList contains a list of OpenAPIAggregator
func (*OpenAPIAggregatorList) DeepCopy ¶
func (in *OpenAPIAggregatorList) DeepCopy() *OpenAPIAggregatorList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenAPIAggregatorList.
func (*OpenAPIAggregatorList) DeepCopyInto ¶
func (in *OpenAPIAggregatorList) DeepCopyInto(out *OpenAPIAggregatorList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*OpenAPIAggregatorList) DeepCopyObject ¶
func (in *OpenAPIAggregatorList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type OpenAPIAggregatorSpec ¶
type OpenAPIAggregatorSpec struct { // LabelSelector selects target deployments to collect OpenAPI specs from // This field is currently not used if WatchNamespaces is implemented as primary. // Consider removing or marking as deprecated if WatchNamespaces becomes the sole method. LabelSelector map[string]string `json:"labelSelector,omitempty"` // WatchNamespaces specifies a list of namespaces to watch for services. // If empty or not provided, the controller will watch services in the same namespace as the OpenAPIAggregator CR. // If set to [""] (a list containing a single empty string), the controller will watch services in all namespaces. // Requires appropriate RBAC permissions for watching services in the specified namespaces (e.g., ClusterRole for all namespaces). // +optional WatchNamespaces []string `json:"watchNamespaces,omitempty"` // DefaultPath is the default path for OpenAPI documentation // +kubebuilder:default="/v2/api-docs" DefaultPath string `json:"defaultPath,omitempty"` // DefaultPort is the default port for OpenAPI documentation // +kubebuilder:default="8080" DefaultPort string `json:"defaultPort,omitempty"` // SwaggerAnnotation is the annotation key that indicates if the Service should be included // +kubebuilder:default="openapi.aggregator.io/swagger" SwaggerAnnotation string `json:"swaggerAnnotation,omitempty"` // PathAnnotation is the annotation key for OpenAPI path // +kubebuilder:default="openapi.aggregator.io/path" PathAnnotation string `json:"pathAnnotation,omitempty"` // PortAnnotation is the annotation key for OpenAPI port // +kubebuilder:default="openapi.aggregator.io/port" PortAnnotation string `json:"portAnnotation,omitempty"` // AllowedMethodsAnnotation is the annotation key for allowed HTTP methods in Swagger UI // +kubebuilder:default="openapi.aggregator.io/allowed-methods" AllowedMethodsAnnotation string `json:"allowedMethodsAnnotation,omitempty"` }
OpenAPIAggregatorSpec defines the desired state of OpenAPIAggregator
func (*OpenAPIAggregatorSpec) DeepCopy ¶
func (in *OpenAPIAggregatorSpec) DeepCopy() *OpenAPIAggregatorSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenAPIAggregatorSpec.
func (*OpenAPIAggregatorSpec) DeepCopyInto ¶
func (in *OpenAPIAggregatorSpec) DeepCopyInto(out *OpenAPIAggregatorSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OpenAPIAggregatorStatus ¶
type OpenAPIAggregatorStatus struct { // CollectedAPIs contains information about the OpenAPI specs that have been collected CollectedAPIs []APIInfo `json:"collectedAPIs,omitempty"` }
OpenAPIAggregatorStatus defines the observed state of OpenAPIAggregator
func (*OpenAPIAggregatorStatus) DeepCopy ¶
func (in *OpenAPIAggregatorStatus) DeepCopy() *OpenAPIAggregatorStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenAPIAggregatorStatus.
func (*OpenAPIAggregatorStatus) DeepCopyInto ¶
func (in *OpenAPIAggregatorStatus) DeepCopyInto(out *OpenAPIAggregatorStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceList ¶ added in v0.3.0
ResourceList is a map of resource names to quantities
func (ResourceList) DeepCopy ¶ added in v0.3.0
func (in ResourceList) DeepCopy() ResourceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceList.
func (ResourceList) DeepCopyInto ¶ added in v0.3.0
func (in ResourceList) DeepCopyInto(out *ResourceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceRequirements ¶ added in v0.3.0
type ResourceRequirements struct { // Limits describes the maximum amount of compute resources allowed // +optional Limits ResourceList `json:"limits,omitempty"` // Requests describes the minimum amount of compute resources required // +optional Requests ResourceList `json:"requests,omitempty"` }
ResourceRequirements describes the compute resource requirements
func (*ResourceRequirements) DeepCopy ¶ added in v0.3.0
func (in *ResourceRequirements) DeepCopy() *ResourceRequirements
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRequirements.
func (*ResourceRequirements) DeepCopyInto ¶ added in v0.3.0
func (in *ResourceRequirements) DeepCopyInto(out *ResourceRequirements)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SwaggerServer ¶ added in v0.3.0
type SwaggerServer struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec SwaggerServerSpec `json:"spec,omitempty"` Status SwaggerServerStatus `json:"status,omitempty"` }
SwaggerServer is the Schema for the swaggerservers API
func (*SwaggerServer) DeepCopy ¶ added in v0.3.0
func (in *SwaggerServer) DeepCopy() *SwaggerServer
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SwaggerServer.
func (*SwaggerServer) DeepCopyInto ¶ added in v0.3.0
func (in *SwaggerServer) DeepCopyInto(out *SwaggerServer)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SwaggerServer) DeepCopyObject ¶ added in v0.3.0
func (in *SwaggerServer) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SwaggerServerList ¶ added in v0.3.0
type SwaggerServerList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []SwaggerServer `json:"items"` }
SwaggerServerList contains a list of SwaggerServer
func (*SwaggerServerList) DeepCopy ¶ added in v0.3.0
func (in *SwaggerServerList) DeepCopy() *SwaggerServerList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SwaggerServerList.
func (*SwaggerServerList) DeepCopyInto ¶ added in v0.3.0
func (in *SwaggerServerList) DeepCopyInto(out *SwaggerServerList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SwaggerServerList) DeepCopyObject ¶ added in v0.3.0
func (in *SwaggerServerList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SwaggerServerSpec ¶ added in v0.3.0
type SwaggerServerSpec struct { // ConfigMapName is the name of the ConfigMap containing the OpenAPI specifications. // +kubebuilder:validation:Required ConfigMapName string `json:"configMapName"` // Port is the port number on which the Swagger UI will be exposed. // +kubebuilder:validation:Required // +kubebuilder:validation:Minimum=1 // +kubebuilder:validation:Maximum=65535 Port int32 `json:"port"` // Image is the Docker image to use for the Swagger UI server. // If not specified, defaults to "ghcr.io/hellices/openapi-multi-swagger:latest". // +optional Image string `json:"image,omitempty"` // ImagePullPolicy defines the policy for pulling the Docker image. // Defaults to "IfNotPresent". // +optional // +kubebuilder:validation:Enum=Always;Never;IfNotPresent ImagePullPolicy string `json:"imagePullPolicy,omitempty"` // Resources defines the CPU and memory resources for the Swagger UI server. // +optional Resources ResourceRequirements `json:"resources,omitempty"` // WatchIntervalSeconds is the interval in seconds for the server to check for updates to the ConfigMap. // Defaults to "10". // +optional WatchIntervalSeconds string `json:"watchIntervalSeconds,omitempty"` // LogLevel is the logging level for the Swagger UI server. // Valid values are: "trace", "debug", "info", "warn", "error", "fatal", "panic". // Defaults to "info". // +optional // +kubebuilder:validation:Enum=trace;debug;info;warn;error;fatal;panic LogLevel string `json:"logLevel,omitempty"` // DevMode enables or disables development mode for the Swagger UI server, which provides more verbose logging. // Valid values are: "true", "false". // Defaults to "false". // +optional // +kubebuilder:validation:Enum="true";"false" DevMode string `json:"devMode,omitempty"` }
SwaggerServerSpec defines the desired state of SwaggerServer
func (*SwaggerServerSpec) DeepCopy ¶ added in v0.3.0
func (in *SwaggerServerSpec) DeepCopy() *SwaggerServerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SwaggerServerSpec.
func (*SwaggerServerSpec) DeepCopyInto ¶ added in v0.3.0
func (in *SwaggerServerSpec) DeepCopyInto(out *SwaggerServerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SwaggerServerStatus ¶ added in v0.3.0
type SwaggerServerStatus struct { // Ready indicates whether the Swagger UI server is ready to serve requests Ready bool `json:"ready"` // URL is the URL where the Swagger UI is accessible URL string `json:"url,omitempty"` // Conditions represent the latest available observations of an object's state // +optional Conditions []metav1.Condition `json:"conditions,omitempty"` }
SwaggerServerStatus defines the observed state of SwaggerServer
func (*SwaggerServerStatus) DeepCopy ¶ added in v0.3.0
func (in *SwaggerServerStatus) DeepCopy() *SwaggerServerStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SwaggerServerStatus.
func (*SwaggerServerStatus) DeepCopyInto ¶ added in v0.3.0
func (in *SwaggerServerStatus) DeepCopyInto(out *SwaggerServerStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.