Documentation
¶
Overview ¶
Package v1beta3 is the v1beta3 version of the API.
Package v1beta3 contains API Schema definitions for the troubleshoot v1beta3 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/replicatedhq/troubleshoot/pkg/apis/troubleshoot +k8s:defaulter-gen=TypeMeta +groupName=troubleshoot.sh
Index ¶
- Variables
- func ConvertToV1Beta2WithResolution(ctx context.Context, v3spec *SupportBundleSpec, client kubernetes.Interface, ...) (*troubleshootv1beta2.SupportBundleSpec, error)
- func ResolveStringOrValueFrom(ctx context.Context, sov StringOrValueFrom, client kubernetes.Interface, ...) (string, error)
- func Resource(resource string) schema.GroupResource
- type AfterCollection
- type Analyze
- type Collect
- type CollectorMeta
- type ConfigMapKeyRef
- type Database
- type HostAnalyze
- type HostCollect
- type SecretKeyRef
- type StringOrValueFrom
- type SupportBundle
- type SupportBundleList
- type SupportBundleSpec
- type SupportBundleStatus
- type TLSParams
- type TLSSecret
- type ValueFromSource
Constants ¶
This section is empty.
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: "troubleshoot.sh", Version: "v1beta3"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} // AddToScheme is required by pkg/client/... AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
func ConvertToV1Beta2WithResolution ¶
func ConvertToV1Beta2WithResolution( ctx context.Context, v3spec *SupportBundleSpec, client kubernetes.Interface, defaultNamespace string, ) (*troubleshootv1beta2.SupportBundleSpec, error)
ConvertToV1Beta2WithResolution converts a v1beta3 SupportBundleSpec to v1beta2 by resolving all StringOrValueFrom fields to their actual values
func ResolveStringOrValueFrom ¶
func ResolveStringOrValueFrom( ctx context.Context, sov StringOrValueFrom, client kubernetes.Interface, defaultNamespace string, ) (string, error)
ResolveStringOrValueFrom resolves a StringOrValueFrom to its actual string value by fetching from Secrets or ConfigMaps as needed.
Parameters:
- ctx: Context for the resolution operation
- sov: The StringOrValueFrom to resolve
- client: Kubernetes client for fetching Secrets/ConfigMaps
- defaultNamespace: Namespace to use when not specified in the reference
Returns:
- The resolved string value
- An error if resolution fails (unless Optional is true)
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource is required by pkg/client/listers/...
Types ¶
type AfterCollection ¶
type AfterCollection struct {
CollectorMeta `json:",inline" yaml:",inline"`
}
Temporary placeholder types for minimal v1beta3 implementation These will be properly defined as we expand v1beta3 support
func (*AfterCollection) DeepCopy ¶
func (in *AfterCollection) DeepCopy() *AfterCollection
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AfterCollection.
func (*AfterCollection) DeepCopyInto ¶
func (in *AfterCollection) DeepCopyInto(out *AfterCollection)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Analyze ¶
type Analyze struct {
}
func (*Analyze) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Analyze.
func (*Analyze) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Collect ¶
type Collect struct {
// Database collectors with v1beta3 StringOrValueFrom support
Postgres *Database `json:"postgres,omitempty" yaml:"postgres,omitempty"`
Mssql *Database `json:"mssql,omitempty" yaml:"mssql,omitempty"`
Mysql *Database `json:"mysql,omitempty" yaml:"mysql,omitempty"`
Redis *Database `json:"redis,omitempty" yaml:"redis,omitempty"`
}
Collect contains all collector definitions For phase 1, we're focusing on Database collectors with StringOrValueFrom support
func (*Collect) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Collect.
func (*Collect) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CollectorMeta ¶
type CollectorMeta struct {
CollectorName string `json:"collectorName,omitempty" yaml:"collectorName,omitempty"`
// +optional
Exclude *multitype.BoolOrString `json:"exclude,omitempty" yaml:"exclude,omitempty"`
}
CollectorMeta contains metadata for collectors
func (*CollectorMeta) DeepCopy ¶
func (in *CollectorMeta) DeepCopy() *CollectorMeta
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CollectorMeta.
func (*CollectorMeta) DeepCopyInto ¶
func (in *CollectorMeta) DeepCopyInto(out *CollectorMeta)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConfigMapKeyRef ¶
type ConfigMapKeyRef struct {
// Name is the name of the ConfigMap
Name string `json:"name" yaml:"name"`
// Key is the key within the ConfigMap to read
Key string `json:"key" yaml:"key"`
// Namespace is the namespace of the ConfigMap
// If not specified, defaults to the namespace where the SupportBundle is running
// +optional
Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"`
// Optional specifies whether the ConfigMap must exist
// If true and the ConfigMap or key doesn't exist, resolves to empty string
// If false (default) and the ConfigMap or key doesn't exist, resolution fails
// +optional
Optional *bool `json:"optional,omitempty" yaml:"optional,omitempty"`
}
ConfigMapKeyRef references a specific key in a Kubernetes ConfigMap
func (*ConfigMapKeyRef) DeepCopy ¶
func (in *ConfigMapKeyRef) DeepCopy() *ConfigMapKeyRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapKeyRef.
func (*ConfigMapKeyRef) DeepCopyInto ¶
func (in *ConfigMapKeyRef) DeepCopyInto(out *ConfigMapKeyRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Database ¶
type Database struct {
CollectorMeta `json:",inline" yaml:",inline"`
// URI can be a literal value or reference to a Secret/ConfigMap
URI StringOrValueFrom `json:"uri" yaml:"uri"`
// Parameters for the database connection
Parameters []string `json:"parameters,omitempty"`
// TLS configuration with support for valueFrom references
TLS *TLSParams `json:"tls,omitempty" yaml:"tls,omitempty"`
}
Database represents database collectors (PostgreSQL, MySQL, Redis, MSSQL) In v1beta3, URI and TLS fields support valueFrom references
func (*Database) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Database.
func (*Database) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HostAnalyze ¶
type HostAnalyze struct {
}
func (*HostAnalyze) DeepCopy ¶
func (in *HostAnalyze) DeepCopy() *HostAnalyze
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostAnalyze.
func (*HostAnalyze) DeepCopyInto ¶
func (in *HostAnalyze) DeepCopyInto(out *HostAnalyze)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HostCollect ¶
type HostCollect struct {
}
func (*HostCollect) DeepCopy ¶
func (in *HostCollect) DeepCopy() *HostCollect
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostCollect.
func (*HostCollect) DeepCopyInto ¶
func (in *HostCollect) DeepCopyInto(out *HostCollect)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SecretKeyRef ¶
type SecretKeyRef struct {
// Name is the name of the Secret
Name string `json:"name" yaml:"name"`
// Key is the key within the Secret to read
Key string `json:"key" yaml:"key"`
// Namespace is the namespace of the Secret
// If not specified, defaults to the namespace where the SupportBundle is running
// +optional
Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"`
// Optional specifies whether the Secret must exist
// If true and the Secret or key doesn't exist, resolves to empty string
// If false (default) and the Secret or key doesn't exist, resolution fails
// +optional
Optional *bool `json:"optional,omitempty" yaml:"optional,omitempty"`
}
SecretKeyRef references a specific key in a Kubernetes Secret
func (*SecretKeyRef) DeepCopy ¶
func (in *SecretKeyRef) DeepCopy() *SecretKeyRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretKeyRef.
func (*SecretKeyRef) DeepCopyInto ¶
func (in *SecretKeyRef) DeepCopyInto(out *SecretKeyRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StringOrValueFrom ¶
type StringOrValueFrom struct {
// Value is a literal string value
// +optional
Value *string `json:"value,omitempty" yaml:"value,omitempty"`
// ValueFrom is a reference to a value in a Secret or ConfigMap
// +optional
ValueFrom *ValueFromSource `json:"valueFrom,omitempty" yaml:"valueFrom,omitempty"`
}
StringOrValueFrom represents a string value that can either be specified directly or sourced from a Kubernetes Secret or ConfigMap
func (*StringOrValueFrom) DeepCopy ¶
func (in *StringOrValueFrom) DeepCopy() *StringOrValueFrom
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StringOrValueFrom.
func (*StringOrValueFrom) DeepCopyInto ¶
func (in *StringOrValueFrom) DeepCopyInto(out *StringOrValueFrom)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SupportBundle ¶
type SupportBundle struct {
metav1.TypeMeta `json:",inline" yaml:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`
Spec SupportBundleSpec `json:"spec,omitempty" yaml:"spec,omitempty"`
Status SupportBundleStatus `json:"status,omitempty"`
}
SupportBundle is the Schema for the SupportBundles API +k8s:openapi-gen=true
func (*SupportBundle) DeepCopy ¶
func (in *SupportBundle) DeepCopy() *SupportBundle
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SupportBundle.
func (*SupportBundle) DeepCopyInto ¶
func (in *SupportBundle) DeepCopyInto(out *SupportBundle)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SupportBundle) DeepCopyObject ¶
func (in *SupportBundle) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SupportBundleList ¶
type SupportBundleList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []SupportBundle `json:"items"`
}
SupportBundleList contains a list of SupportBundle
func (*SupportBundleList) DeepCopy ¶
func (in *SupportBundleList) DeepCopy() *SupportBundleList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SupportBundleList.
func (*SupportBundleList) DeepCopyInto ¶
func (in *SupportBundleList) DeepCopyInto(out *SupportBundleList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SupportBundleList) DeepCopyObject ¶
func (in *SupportBundleList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SupportBundleSpec ¶
type SupportBundleSpec struct {
AfterCollection []*AfterCollection `json:"afterCollection,omitempty" yaml:"afterCollection,omitempty"`
Collectors []*Collect `json:"collectors,omitempty" yaml:"collectors,omitempty"`
HostCollectors []*HostCollect `json:"hostCollectors,omitempty" yaml:"hostCollectors,omitempty"`
Analyzers []*Analyze `json:"analyzers,omitempty" yaml:"analyzers,omitempty"`
HostAnalyzers []*HostAnalyze `json:"hostAnalyzers,omitempty" yaml:"hostAnalyzers,omitempty"`
// URI optionally defines a location which is the source of this spec to allow updating of the spec at runtime
Uri string `json:"uri,omitempty" yaml:"uri,omitempty"`
RunHostCollectorsInPod bool `json:"runHostCollectorsInPod,omitempty" yaml:"runHostCollectorsInPod,omitempty"`
}
SupportBundleSpec defines the desired state of SupportBundle
func (*SupportBundleSpec) DeepCopy ¶
func (in *SupportBundleSpec) DeepCopy() *SupportBundleSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SupportBundleSpec.
func (*SupportBundleSpec) DeepCopyInto ¶
func (in *SupportBundleSpec) DeepCopyInto(out *SupportBundleSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SupportBundleStatus ¶
type SupportBundleStatus struct {
}
SupportBundleStatus defines the observed state of SupportBundle
func (*SupportBundleStatus) DeepCopy ¶
func (in *SupportBundleStatus) DeepCopy() *SupportBundleStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SupportBundleStatus.
func (*SupportBundleStatus) DeepCopyInto ¶
func (in *SupportBundleStatus) DeepCopyInto(out *SupportBundleStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TLSParams ¶
type TLSParams struct {
// SkipVerify disables TLS verification
SkipVerify bool `json:"skipVerify,omitempty" yaml:"skipVerify,omitempty"`
// Secret references a Kubernetes Secret containing TLS materials (v1beta2 compatibility)
Secret *TLSSecret `json:"secret,omitempty" yaml:"secret,omitempty"`
// CACert can be a literal value or reference to a Secret/ConfigMap
CACert StringOrValueFrom `json:"cacert,omitempty" yaml:"cacert,omitempty"`
// ClientCert can be a literal value or reference to a Secret/ConfigMap
ClientCert StringOrValueFrom `json:"clientCert,omitempty" yaml:"clientCert,omitempty"`
// ClientKey can be a literal value or reference to a Secret/ConfigMap
ClientKey StringOrValueFrom `json:"clientKey,omitempty" yaml:"clientKey,omitempty"`
}
TLSParams contains TLS configuration In v1beta3, certificate fields support valueFrom references
func (*TLSParams) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSParams.
func (*TLSParams) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TLSSecret ¶
type TLSSecret struct {
Name string `json:"name" yaml:"name"`
Namespace string `json:"namespace" yaml:"namespace"`
}
TLSSecret references a Kubernetes Secret containing TLS materials Maintained for backward compatibility
func (*TLSSecret) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSSecret.
func (*TLSSecret) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ValueFromSource ¶
type ValueFromSource struct {
// SecretKeyRef references a key in a Secret
// +optional
SecretKeyRef *SecretKeyRef `json:"secretKeyRef,omitempty" yaml:"secretKeyRef,omitempty"`
// ConfigMapKeyRef references a key in a ConfigMap
// +optional
ConfigMapKeyRef *ConfigMapKeyRef `json:"configMapKeyRef,omitempty" yaml:"configMapKeyRef,omitempty"`
}
ValueFromSource represents the source of a value from a Secret or ConfigMap
func (*ValueFromSource) DeepCopy ¶
func (in *ValueFromSource) DeepCopy() *ValueFromSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValueFromSource.
func (*ValueFromSource) DeepCopyInto ¶
func (in *ValueFromSource) DeepCopyInto(out *ValueFromSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.