Documentation ¶
Overview ¶
+k8s:deepcopy-gen=package +k8s:openapi-gen=true +gencrdrefdocs:force=true
Index ¶
- Constants
- Variables
- func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
- func IsKnownAgentType(at AgentType) bool
- type Agent
- type AgentSpec
- func (in *AgentSpec) DeepCopy() *AgentSpec
- func (in *AgentSpec) DeepCopyInto(out *AgentSpec)
- func (*AgentSpec) Descriptor() ([]byte, []int)
- func (m *AgentSpec) Marshal() (dAtA []byte, err error)
- func (m *AgentSpec) MarshalTo(dAtA []byte) (int, error)
- func (m *AgentSpec) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*AgentSpec) ProtoMessage()
- func (m *AgentSpec) Reset()
- func (agent *AgentSpec) SetDefaults()
- func (m *AgentSpec) Size() (n int)
- func (this *AgentSpec) String() string
- func (m *AgentSpec) Unmarshal(dAtA []byte) error
- func (m *AgentSpec) XXX_DiscardUnknown()
- func (m *AgentSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AgentSpec) XXX_Merge(src proto.Message)
- func (m *AgentSpec) XXX_Size() int
- func (m *AgentSpec) XXX_Unmarshal(b []byte) error
- type AgentType
- type PrometheusExporterSpec
- func (in *PrometheusExporterSpec) DeepCopy() *PrometheusExporterSpec
- func (in *PrometheusExporterSpec) DeepCopyInto(out *PrometheusExporterSpec)
- func (*PrometheusExporterSpec) Descriptor() ([]byte, []int)
- func (m *PrometheusExporterSpec) Marshal() (dAtA []byte, err error)
- func (m *PrometheusExporterSpec) MarshalTo(dAtA []byte) (int, error)
- func (m *PrometheusExporterSpec) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PrometheusExporterSpec) ProtoMessage()
- func (m *PrometheusExporterSpec) Reset()
- func (m *PrometheusExporterSpec) Size() (n int)
- func (this *PrometheusExporterSpec) String() string
- func (m *PrometheusExporterSpec) Unmarshal(dAtA []byte) error
- func (m *PrometheusExporterSpec) XXX_DiscardUnknown()
- func (m *PrometheusExporterSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PrometheusExporterSpec) XXX_Merge(src proto.Message)
- func (m *PrometheusExporterSpec) XXX_Size() int
- func (m *PrometheusExporterSpec) XXX_Unmarshal(b []byte) error
- type PrometheusSpec
- func (in *PrometheusSpec) DeepCopy() *PrometheusSpec
- func (in *PrometheusSpec) DeepCopyInto(out *PrometheusSpec)
- func (*PrometheusSpec) Descriptor() ([]byte, []int)
- func (m *PrometheusSpec) Marshal() (dAtA []byte, err error)
- func (m *PrometheusSpec) MarshalTo(dAtA []byte) (int, error)
- func (m *PrometheusSpec) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PrometheusSpec) ProtoMessage()
- func (m *PrometheusSpec) Reset()
- func (m *PrometheusSpec) Size() (n int)
- func (this *PrometheusSpec) String() string
- func (m *PrometheusSpec) Unmarshal(dAtA []byte) error
- func (m *PrometheusSpec) XXX_DiscardUnknown()
- func (m *PrometheusSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PrometheusSpec) XXX_Merge(src proto.Message)
- func (m *PrometheusSpec) XXX_Size() int
- func (m *PrometheusSpec) XXX_Unmarshal(b []byte) error
- type ServiceMonitorSpec
- func (in *ServiceMonitorSpec) DeepCopy() *ServiceMonitorSpec
- func (in *ServiceMonitorSpec) DeepCopyInto(out *ServiceMonitorSpec)
- func (*ServiceMonitorSpec) Descriptor() ([]byte, []int)
- func (m *ServiceMonitorSpec) Marshal() (dAtA []byte, err error)
- func (m *ServiceMonitorSpec) MarshalTo(dAtA []byte) (int, error)
- func (m *ServiceMonitorSpec) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ServiceMonitorSpec) ProtoMessage()
- func (m *ServiceMonitorSpec) Reset()
- func (m *ServiceMonitorSpec) Size() (n int)
- func (this *ServiceMonitorSpec) String() string
- func (m *ServiceMonitorSpec) Unmarshal(dAtA []byte) error
- func (m *ServiceMonitorSpec) XXX_DiscardUnknown()
- func (m *ServiceMonitorSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ServiceMonitorSpec) XXX_Merge(src proto.Message)
- func (m *ServiceMonitorSpec) XXX_Size() int
- func (m *ServiceMonitorSpec) XXX_Unmarshal(b []byte) error
- type StatsAccessor
Constants ¶
const ( DefaultPrometheusKey = "monitoring.appscode.com/is-default-prometheus" DefaultAlertmanagerKey = "monitoring.appscode.com/is-default-alertmanager" DefaultGrafanaKey = "monitoring.appscode.com/is-default-grafana" )
const ( KeyAgent = "monitoring.appscode.com/agent" KeyService = "monitoring.appscode.com/service" VendorPrometheus = "prometheus.io" AgentPrometheus AgentType = VendorPrometheus AgentPrometheusBuiltin AgentType = VendorPrometheus + "/builtin" AgentPrometheusOperator AgentType = VendorPrometheus + "/operator" PrometheusExporterPortNumber = 56790 PrometheusExporterPortName = "metrics" )
Variables ¶
Functions ¶
func GetOpenAPIDefinitions ¶
func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
func IsKnownAgentType ¶
Types ¶
type Agent ¶
type Agent interface { GetType() AgentType CreateOrUpdate(sp StatsAccessor, spec *AgentSpec) (kutil.VerbType, error) Delete(sp StatsAccessor) (kutil.VerbType, error) }
type AgentSpec ¶
type AgentSpec struct { Agent AgentType `json:"agent,omitempty" protobuf:"bytes,1,opt,name=agent,casttype=AgentType"` Prometheus *PrometheusSpec `json:"prometheus,omitempty" protobuf:"bytes,2,opt,name=prometheus"` }
func (*AgentSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentSpec.
func (*AgentSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AgentSpec) Descriptor ¶
func (*AgentSpec) MarshalToSizedBuffer ¶
func (*AgentSpec) ProtoMessage ¶
func (*AgentSpec) ProtoMessage()
func (*AgentSpec) SetDefaults ¶
func (agent *AgentSpec) SetDefaults()
func (*AgentSpec) XXX_DiscardUnknown ¶
func (m *AgentSpec) XXX_DiscardUnknown()
func (*AgentSpec) XXX_Marshal ¶
func (*AgentSpec) XXX_Unmarshal ¶
type PrometheusExporterSpec ¶
type PrometheusExporterSpec struct { // Port number for the exporter side car. // +optional // +kubebuilder:default=56790 Port int32 `json:"port,omitempty" protobuf:"varint,1,opt,name=port"` // Arguments to the entrypoint. // The docker image's CMD is used if this is not provided. // Variable references $(VAR_NAME) are expanded using the container's environment. If a variable // cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax // can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, // regardless of whether the variable exists or not. // Cannot be updated. // More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell // +optional Args []string `json:"args,omitempty" protobuf:"bytes,2,rep,name=args"` // List of environment variables to set in the container. // Cannot be updated. // +optional // +patchMergeKey=name // +patchStrategy=merge Env []core.EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,3,rep,name=env"` // Compute Resources required by exporter container. // Cannot be updated. // More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ // +optional Resources core.ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,4,opt,name=resources"` // Security options the pod should run with. // More info: https://kubernetes.io/docs/concepts/policy/security-context/ // More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ // +optional SecurityContext *core.SecurityContext `json:"securityContext,omitempty" protobuf:"bytes,5,opt,name=securityContext"` }
func (*PrometheusExporterSpec) DeepCopy ¶
func (in *PrometheusExporterSpec) DeepCopy() *PrometheusExporterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusExporterSpec.
func (*PrometheusExporterSpec) DeepCopyInto ¶
func (in *PrometheusExporterSpec) DeepCopyInto(out *PrometheusExporterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PrometheusExporterSpec) Descriptor ¶
func (*PrometheusExporterSpec) Descriptor() ([]byte, []int)
func (*PrometheusExporterSpec) Marshal ¶
func (m *PrometheusExporterSpec) Marshal() (dAtA []byte, err error)
func (*PrometheusExporterSpec) MarshalTo ¶
func (m *PrometheusExporterSpec) MarshalTo(dAtA []byte) (int, error)
func (*PrometheusExporterSpec) MarshalToSizedBuffer ¶
func (m *PrometheusExporterSpec) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PrometheusExporterSpec) ProtoMessage ¶
func (*PrometheusExporterSpec) ProtoMessage()
func (*PrometheusExporterSpec) Reset ¶
func (m *PrometheusExporterSpec) Reset()
func (*PrometheusExporterSpec) Size ¶
func (m *PrometheusExporterSpec) Size() (n int)
func (*PrometheusExporterSpec) String ¶
func (this *PrometheusExporterSpec) String() string
func (*PrometheusExporterSpec) Unmarshal ¶
func (m *PrometheusExporterSpec) Unmarshal(dAtA []byte) error
func (*PrometheusExporterSpec) XXX_DiscardUnknown ¶
func (m *PrometheusExporterSpec) XXX_DiscardUnknown()
func (*PrometheusExporterSpec) XXX_Marshal ¶
func (m *PrometheusExporterSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PrometheusExporterSpec) XXX_Merge ¶
func (m *PrometheusExporterSpec) XXX_Merge(src proto.Message)
func (*PrometheusExporterSpec) XXX_Size ¶
func (m *PrometheusExporterSpec) XXX_Size() int
func (*PrometheusExporterSpec) XXX_Unmarshal ¶
func (m *PrometheusExporterSpec) XXX_Unmarshal(b []byte) error
type PrometheusSpec ¶
type PrometheusSpec struct { Exporter PrometheusExporterSpec `json:"exporter,omitempty" protobuf:"bytes,1,opt,name=exporter"` ServiceMonitor *ServiceMonitorSpec `json:"serviceMonitor,omitempty" protobuf:"bytes,2,opt,name=serviceMonitor"` }
func (*PrometheusSpec) DeepCopy ¶
func (in *PrometheusSpec) DeepCopy() *PrometheusSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusSpec.
func (*PrometheusSpec) DeepCopyInto ¶
func (in *PrometheusSpec) DeepCopyInto(out *PrometheusSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PrometheusSpec) Descriptor ¶
func (*PrometheusSpec) Descriptor() ([]byte, []int)
func (*PrometheusSpec) Marshal ¶
func (m *PrometheusSpec) Marshal() (dAtA []byte, err error)
func (*PrometheusSpec) MarshalToSizedBuffer ¶
func (m *PrometheusSpec) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PrometheusSpec) ProtoMessage ¶
func (*PrometheusSpec) ProtoMessage()
func (*PrometheusSpec) Reset ¶
func (m *PrometheusSpec) Reset()
func (*PrometheusSpec) Size ¶
func (m *PrometheusSpec) Size() (n int)
func (*PrometheusSpec) String ¶
func (this *PrometheusSpec) String() string
func (*PrometheusSpec) Unmarshal ¶
func (m *PrometheusSpec) Unmarshal(dAtA []byte) error
func (*PrometheusSpec) XXX_DiscardUnknown ¶
func (m *PrometheusSpec) XXX_DiscardUnknown()
func (*PrometheusSpec) XXX_Marshal ¶
func (m *PrometheusSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PrometheusSpec) XXX_Merge ¶
func (m *PrometheusSpec) XXX_Merge(src proto.Message)
func (*PrometheusSpec) XXX_Size ¶
func (m *PrometheusSpec) XXX_Size() int
func (*PrometheusSpec) XXX_Unmarshal ¶
func (m *PrometheusSpec) XXX_Unmarshal(b []byte) error
type ServiceMonitorSpec ¶
type ServiceMonitorSpec struct { // Labels are key value pairs that is used to select Prometheus instance via ServiceMonitor labels. // +optional Labels map[string]string `json:"labels,omitempty" protobuf:"bytes,1,rep,name=labels"` // Interval at which metrics should be scraped // +optional Interval string `json:"interval,omitempty" protobuf:"bytes,2,opt,name=interval"` }
func (*ServiceMonitorSpec) DeepCopy ¶
func (in *ServiceMonitorSpec) DeepCopy() *ServiceMonitorSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceMonitorSpec.
func (*ServiceMonitorSpec) DeepCopyInto ¶
func (in *ServiceMonitorSpec) DeepCopyInto(out *ServiceMonitorSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ServiceMonitorSpec) Descriptor ¶
func (*ServiceMonitorSpec) Descriptor() ([]byte, []int)
func (*ServiceMonitorSpec) Marshal ¶
func (m *ServiceMonitorSpec) Marshal() (dAtA []byte, err error)
func (*ServiceMonitorSpec) MarshalTo ¶
func (m *ServiceMonitorSpec) MarshalTo(dAtA []byte) (int, error)
func (*ServiceMonitorSpec) MarshalToSizedBuffer ¶
func (m *ServiceMonitorSpec) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ServiceMonitorSpec) ProtoMessage ¶
func (*ServiceMonitorSpec) ProtoMessage()
func (*ServiceMonitorSpec) Reset ¶
func (m *ServiceMonitorSpec) Reset()
func (*ServiceMonitorSpec) Size ¶
func (m *ServiceMonitorSpec) Size() (n int)
func (*ServiceMonitorSpec) String ¶
func (this *ServiceMonitorSpec) String() string
func (*ServiceMonitorSpec) Unmarshal ¶
func (m *ServiceMonitorSpec) Unmarshal(dAtA []byte) error
func (*ServiceMonitorSpec) XXX_DiscardUnknown ¶
func (m *ServiceMonitorSpec) XXX_DiscardUnknown()
func (*ServiceMonitorSpec) XXX_Marshal ¶
func (m *ServiceMonitorSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ServiceMonitorSpec) XXX_Merge ¶
func (m *ServiceMonitorSpec) XXX_Merge(src proto.Message)
func (*ServiceMonitorSpec) XXX_Size ¶
func (m *ServiceMonitorSpec) XXX_Size() int
func (*ServiceMonitorSpec) XXX_Unmarshal ¶
func (m *ServiceMonitorSpec) XXX_Unmarshal(b []byte) error