monitoring-agent-api: kmodules.xyz/monitoring-agent-api/api/v1 Index | Files

package v1

import "kmodules.xyz/monitoring-agent-api/api/v1"

Copyright The Kmodules Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

+k8s:deepcopy-gen=package +k8s:openapi-gen=true

Index

Package Files

doc.go generated.pb.go helpers.go openapi_generated.go types.go zz_generated.deepcopy.go

Constants

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"
    // Deprecated
    AgentCoreOSPrometheus AgentType = VendorPrometheus + "/coreos-operator"
    // Deprecated
    DeprecatedAgentCoreOSPrometheus AgentType = "coreos-prometheus-operator"
)

Variables

var (
    ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowGenerated   = fmt.Errorf("proto: integer overflow")
)

func GetOpenAPIDefinitions Uses

func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition

type Agent Uses

type Agent interface {
    GetType() AgentType
    CreateOrUpdate(sp StatsAccessor, spec *AgentSpec) (kutil.VerbType, error)
    Delete(sp StatsAccessor) (kutil.VerbType, error)
}

type AgentSpec Uses

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"`

    // 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
    // Deprecated: use prometheus.exporter.args
    Args []string `json:"args,omitempty" protobuf:"bytes,3,rep,name=args"`

    // List of environment variables to set in the container.
    // Cannot be updated.
    // Deprecated
    // +optional
    // +patchMergeKey=name
    // +patchStrategy=merge
    // Deprecated: use prometheus.exporter.env
    Env []core.EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,4,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
    // Deprecated: use prometheus.exporter.resources
    Resources core.ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,5,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
    // Deprecated: use prometheus.exporter.securityContext
    SecurityContext *core.SecurityContext `json:"securityContext,omitempty" protobuf:"bytes,6,opt,name=securityContext"`
}

func (*AgentSpec) DeepCopy Uses

func (in *AgentSpec) DeepCopy() *AgentSpec

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

func (*AgentSpec) DeepCopyInto Uses

func (in *AgentSpec) DeepCopyInto(out *AgentSpec)

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

func (*AgentSpec) Descriptor Uses

func (*AgentSpec) Descriptor() ([]byte, []int)

func (*AgentSpec) Marshal Uses

func (m *AgentSpec) Marshal() (dAtA []byte, err error)

func (*AgentSpec) MarshalTo Uses

func (m *AgentSpec) MarshalTo(dAtA []byte) (int, error)

func (*AgentSpec) MarshalToSizedBuffer Uses

func (m *AgentSpec) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AgentSpec) ProtoMessage Uses

func (*AgentSpec) ProtoMessage()

func (*AgentSpec) Reset Uses

func (m *AgentSpec) Reset()

func (*AgentSpec) SetDefaults Uses

func (agent *AgentSpec) SetDefaults()

func (*AgentSpec) Size Uses

func (m *AgentSpec) Size() (n int)

func (*AgentSpec) String Uses

func (this *AgentSpec) String() string

func (*AgentSpec) Unmarshal Uses

func (m *AgentSpec) Unmarshal(dAtA []byte) error

func (*AgentSpec) XXX_DiscardUnknown Uses

func (m *AgentSpec) XXX_DiscardUnknown()

func (*AgentSpec) XXX_Marshal Uses

func (m *AgentSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AgentSpec) XXX_Merge Uses

func (m *AgentSpec) XXX_Merge(src proto.Message)

func (*AgentSpec) XXX_Size Uses

func (m *AgentSpec) XXX_Size() int

func (*AgentSpec) XXX_Unmarshal Uses

func (m *AgentSpec) XXX_Unmarshal(b []byte) error

type AgentType Uses

type AgentType string

func (AgentType) Vendor Uses

func (at AgentType) Vendor() string

type PrometheusExporterSpec Uses

type PrometheusExporterSpec struct {
    // Port number for the exporter side car.
    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 Uses

func (in *PrometheusExporterSpec) DeepCopy() *PrometheusExporterSpec

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

func (*PrometheusExporterSpec) DeepCopyInto Uses

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 Uses

func (*PrometheusExporterSpec) Descriptor() ([]byte, []int)

func (*PrometheusExporterSpec) Marshal Uses

func (m *PrometheusExporterSpec) Marshal() (dAtA []byte, err error)

func (*PrometheusExporterSpec) MarshalTo Uses

func (m *PrometheusExporterSpec) MarshalTo(dAtA []byte) (int, error)

func (*PrometheusExporterSpec) MarshalToSizedBuffer Uses

func (m *PrometheusExporterSpec) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PrometheusExporterSpec) ProtoMessage Uses

func (*PrometheusExporterSpec) ProtoMessage()

func (*PrometheusExporterSpec) Reset Uses

func (m *PrometheusExporterSpec) Reset()

func (*PrometheusExporterSpec) Size Uses

func (m *PrometheusExporterSpec) Size() (n int)

func (*PrometheusExporterSpec) String Uses

func (this *PrometheusExporterSpec) String() string

func (*PrometheusExporterSpec) Unmarshal Uses

func (m *PrometheusExporterSpec) Unmarshal(dAtA []byte) error

func (*PrometheusExporterSpec) XXX_DiscardUnknown Uses

func (m *PrometheusExporterSpec) XXX_DiscardUnknown()

func (*PrometheusExporterSpec) XXX_Marshal Uses

func (m *PrometheusExporterSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PrometheusExporterSpec) XXX_Merge Uses

func (m *PrometheusExporterSpec) XXX_Merge(src proto.Message)

func (*PrometheusExporterSpec) XXX_Size Uses

func (m *PrometheusExporterSpec) XXX_Size() int

func (*PrometheusExporterSpec) XXX_Unmarshal Uses

func (m *PrometheusExporterSpec) XXX_Unmarshal(b []byte) error

type PrometheusSpec Uses

type PrometheusSpec struct {
    // Port number for the exporter side car.
    // Deprecated: use exporter.port
    Port int32 `json:"port,omitempty" protobuf:"varint,1,opt,name=port"`

    // Namespace of Prometheus. Service monitors will be created in this namespace.
    // Deprecated: use prometheus.serviceMonitor.namespace
    Namespace string `json:"namespace,omitempty" protobuf:"bytes,2,opt,name=namespace"`

    // Labels are key value pairs that is used to select Prometheus instance via ServiceMonitor labels.
    // +optional
    // Deprecated: use prometheus.serviceMonitor.labels
    Labels map[string]string `json:"labels,omitempty" protobuf:"bytes,3,rep,name=labels"`

    // Interval at which metrics should be scraped
    // +optional
    // Deprecated: use prometheus.serviceMonitor.interval
    Interval string `json:"interval,omitempty" protobuf:"bytes,4,opt,name=interval"`

    ServiceMonitor *ServiceMonitorSpec `json:"serviceMonitor,omitempty" protobuf:"bytes,5,opt,name=serviceMonitor"`

    Exporter *PrometheusExporterSpec `json:"exporter,omitempty" protobuf:"bytes,6,opt,name=exporter"`
}

func (*PrometheusSpec) DeepCopy Uses

func (in *PrometheusSpec) DeepCopy() *PrometheusSpec

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

func (*PrometheusSpec) DeepCopyInto Uses

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 Uses

func (*PrometheusSpec) Descriptor() ([]byte, []int)

func (*PrometheusSpec) Marshal Uses

func (m *PrometheusSpec) Marshal() (dAtA []byte, err error)

func (*PrometheusSpec) MarshalTo Uses

func (m *PrometheusSpec) MarshalTo(dAtA []byte) (int, error)

func (*PrometheusSpec) MarshalToSizedBuffer Uses

func (m *PrometheusSpec) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PrometheusSpec) ProtoMessage Uses

func (*PrometheusSpec) ProtoMessage()

func (*PrometheusSpec) Reset Uses

func (m *PrometheusSpec) Reset()

func (*PrometheusSpec) Size Uses

func (m *PrometheusSpec) Size() (n int)

func (*PrometheusSpec) String Uses

func (this *PrometheusSpec) String() string

func (*PrometheusSpec) Unmarshal Uses

func (m *PrometheusSpec) Unmarshal(dAtA []byte) error

func (*PrometheusSpec) XXX_DiscardUnknown Uses

func (m *PrometheusSpec) XXX_DiscardUnknown()

func (*PrometheusSpec) XXX_Marshal Uses

func (m *PrometheusSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PrometheusSpec) XXX_Merge Uses

func (m *PrometheusSpec) XXX_Merge(src proto.Message)

func (*PrometheusSpec) XXX_Size Uses

func (m *PrometheusSpec) XXX_Size() int

func (*PrometheusSpec) XXX_Unmarshal Uses

func (m *PrometheusSpec) XXX_Unmarshal(b []byte) error

type ServiceMonitorSpec Uses

type ServiceMonitorSpec struct {
    // Namespace of Prometheus. Service monitors will be created in this namespace.
    Namespace string `json:"namespace,omitempty" protobuf:"bytes,1,opt,name=namespace"`

    // 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,2,rep,name=labels"`

    // Interval at which metrics should be scraped
    // +optional
    Interval string `json:"interval,omitempty" protobuf:"bytes,3,opt,name=interval"`
}

func (*ServiceMonitorSpec) DeepCopy Uses

func (in *ServiceMonitorSpec) DeepCopy() *ServiceMonitorSpec

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

func (*ServiceMonitorSpec) DeepCopyInto Uses

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 Uses

func (*ServiceMonitorSpec) Descriptor() ([]byte, []int)

func (*ServiceMonitorSpec) Marshal Uses

func (m *ServiceMonitorSpec) Marshal() (dAtA []byte, err error)

func (*ServiceMonitorSpec) MarshalTo Uses

func (m *ServiceMonitorSpec) MarshalTo(dAtA []byte) (int, error)

func (*ServiceMonitorSpec) MarshalToSizedBuffer Uses

func (m *ServiceMonitorSpec) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ServiceMonitorSpec) ProtoMessage Uses

func (*ServiceMonitorSpec) ProtoMessage()

func (*ServiceMonitorSpec) Reset Uses

func (m *ServiceMonitorSpec) Reset()

func (*ServiceMonitorSpec) Size Uses

func (m *ServiceMonitorSpec) Size() (n int)

func (*ServiceMonitorSpec) String Uses

func (this *ServiceMonitorSpec) String() string

func (*ServiceMonitorSpec) Unmarshal Uses

func (m *ServiceMonitorSpec) Unmarshal(dAtA []byte) error

func (*ServiceMonitorSpec) XXX_DiscardUnknown Uses

func (m *ServiceMonitorSpec) XXX_DiscardUnknown()

func (*ServiceMonitorSpec) XXX_Marshal Uses

func (m *ServiceMonitorSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServiceMonitorSpec) XXX_Merge Uses

func (m *ServiceMonitorSpec) XXX_Merge(src proto.Message)

func (*ServiceMonitorSpec) XXX_Size Uses

func (m *ServiceMonitorSpec) XXX_Size() int

func (*ServiceMonitorSpec) XXX_Unmarshal Uses

func (m *ServiceMonitorSpec) XXX_Unmarshal(b []byte) error

type StatsAccessor Uses

type StatsAccessor interface {
    GetNamespace() string
    ServiceName() string
    ServiceMonitorName() string
    Path() string
    // Scheme is used to determine url scheme /metrics endpoint
    Scheme() string
}

Package v1 imports 12 packages (graph) and is imported by 52 packages. Updated 2020-02-15. Refresh now. Tools for package owners.