mirror of https://github.com/kubernetes/kops.git
Expose Felix metrics
* Exposes Felix prometheus endpoint * Same as `networking.projectcalico.org.canal`
This commit is contained in:
parent
b2c161111f
commit
dd5713d5b4
|
@ -70,6 +70,16 @@ type FlannelNetworkingSpec struct {
|
|||
// CalicoNetworkingSpec declares that we want Calico networking
|
||||
type CalicoNetworkingSpec struct {
|
||||
CrossSubnet bool `json:"crossSubnet,omitempty"` // Enables Calico's cross-subnet mode when set to true
|
||||
// PrometheusMetricsEnabled can be set to enable the experimental Prometheus
|
||||
// metrics server (default: false)
|
||||
PrometheusMetricsEnabled bool `json:"prometheusMetricsEnabled,omitempty"`
|
||||
// PrometheusMetricsPort is the TCP port that the experimental Prometheus
|
||||
// metrics server should bind to (default: 9091)
|
||||
PrometheusMetricsPort int32 `json:"prometheusMetricsPort,omitempty"`
|
||||
// PrometheusGoMetricsEnabled enables Prometheus Go runtime metrics collection
|
||||
PrometheusGoMetricsEnabled bool `json:"prometheusGoMetricsEnabled,omitempty"`
|
||||
// PrometheusProcessMetricsEnabled enables Prometheus process metrics collection
|
||||
PrometheusProcessMetricsEnabled bool `json:"prometheusProcessMetricsEnabled,omitempty"`
|
||||
}
|
||||
|
||||
// CanalNetworkingSpec declares that we want Canal networking
|
||||
|
|
|
@ -70,6 +70,16 @@ type FlannelNetworkingSpec struct {
|
|||
// CalicoNetworkingSpec declares that we want Calico networking
|
||||
type CalicoNetworkingSpec struct {
|
||||
CrossSubnet bool `json:"crossSubnet,omitempty"` // Enables Calico's cross-subnet mode when set to true
|
||||
// PrometheusMetricsEnabled can be set to enable the experimental Prometheus
|
||||
// metrics server (default: false)
|
||||
PrometheusMetricsEnabled bool `json:"prometheusMetricsEnabled,omitempty"`
|
||||
// PrometheusMetricsPort is the TCP port that the experimental Prometheus
|
||||
// metrics server should bind to (default: 9091)
|
||||
PrometheusMetricsPort int32 `json:"prometheusMetricsPort,omitempty"`
|
||||
// PrometheusGoMetricsEnabled enables Prometheus Go runtime metrics collection
|
||||
PrometheusGoMetricsEnabled bool `json:"prometheusGoMetricsEnabled,omitempty"`
|
||||
// PrometheusProcessMetricsEnabled enables Prometheus process metrics collection
|
||||
PrometheusProcessMetricsEnabled bool `json:"prometheusProcessMetricsEnabled,omitempty"`
|
||||
}
|
||||
|
||||
// CanalNetworkingSpec declares that we want Canal networking
|
||||
|
|
|
@ -380,6 +380,10 @@ func Convert_v1alpha1_CalicoNetworkingSpec_To_kops_CalicoNetworkingSpec(in *Cali
|
|||
|
||||
func autoConvert_kops_CalicoNetworkingSpec_To_v1alpha1_CalicoNetworkingSpec(in *kops.CalicoNetworkingSpec, out *CalicoNetworkingSpec, s conversion.Scope) error {
|
||||
out.CrossSubnet = in.CrossSubnet
|
||||
out.PrometheusMetricsEnabled = in.PrometheusMetricsEnabled
|
||||
out.PrometheusMetricsPort = in.PrometheusMetricsPort
|
||||
out.PrometheusGoMetricsEnabled = in.PrometheusGoMetricsEnabled
|
||||
out.PrometheusProcessMetricsEnabled = in.PrometheusProcessMetricsEnabled
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
@ -70,6 +70,16 @@ type FlannelNetworkingSpec struct {
|
|||
// CalicoNetworkingSpec declares that we want Calico networking
|
||||
type CalicoNetworkingSpec struct {
|
||||
CrossSubnet bool `json:"crossSubnet,omitempty"` // Enables Calico's cross-subnet mode when set to true
|
||||
// PrometheusMetricsEnabled can be set to enable the experimental Prometheus
|
||||
// metrics server (default: false)
|
||||
PrometheusMetricsEnabled bool `json:"prometheusMetricsEnabled,omitempty"`
|
||||
// PrometheusMetricsPort is the TCP port that the experimental Prometheus
|
||||
// metrics server should bind to (default: 9091)
|
||||
PrometheusMetricsPort int32 `json:"prometheusMetricsPort,omitempty"`
|
||||
// PrometheusGoMetricsEnabled enables Prometheus Go runtime metrics collection
|
||||
PrometheusGoMetricsEnabled bool `json:"prometheusGoMetricsEnabled,omitempty"`
|
||||
// PrometheusProcessMetricsEnabled enables Prometheus process metrics collection
|
||||
PrometheusProcessMetricsEnabled bool `json:"prometheusProcessMetricsEnabled,omitempty"`
|
||||
}
|
||||
|
||||
// CanalNetworkingSpec declares that we want Canal networking
|
||||
|
|
|
@ -416,6 +416,10 @@ func Convert_v1alpha2_CalicoNetworkingSpec_To_kops_CalicoNetworkingSpec(in *Cali
|
|||
|
||||
func autoConvert_kops_CalicoNetworkingSpec_To_v1alpha2_CalicoNetworkingSpec(in *kops.CalicoNetworkingSpec, out *CalicoNetworkingSpec, s conversion.Scope) error {
|
||||
out.CrossSubnet = in.CrossSubnet
|
||||
out.PrometheusMetricsEnabled = in.PrometheusMetricsEnabled
|
||||
out.PrometheusMetricsPort = in.PrometheusMetricsPort
|
||||
out.PrometheusGoMetricsEnabled = in.PrometheusGoMetricsEnabled
|
||||
out.PrometheusProcessMetricsEnabled = in.PrometheusProcessMetricsEnabled
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
@ -182,6 +182,18 @@ spec:
|
|||
# Set Felix logging to "info"
|
||||
- name: FELIX_LOGSEVERITYSCREEN
|
||||
value: "info"
|
||||
# Set to enable the experimental Prometheus metrics server
|
||||
- name: FELIX_PROMETHEUSMETRICSENABLED
|
||||
value: "{{- or .Networking.Calico.PrometheusMetricsEnabled "false" }}"
|
||||
# TCP port that the Prometheus metrics server should bind to
|
||||
- name: FELIX_PROMETHEUSMETRICSPORT
|
||||
value: "{{- or .Networking.Calico.PrometheusMetricsPort "9091" }}"
|
||||
# Enable Prometheus Go runtime metrics collection
|
||||
- name: FELIX_PROMETHEUSGOMETRICSENABLED
|
||||
value: "{{- or .Networking.Calico.PrometheusGoMetricsEnabled "true" }}"
|
||||
# Enable Prometheus process metrics collection
|
||||
- name: FELIX_PROMETHEUSPROCESSMETRICSENABLED
|
||||
value: "{{- or .Networking.Calico.PrometheusProcessMetricsEnabled "true" }}"
|
||||
- name: FELIX_HEALTHENABLED
|
||||
value: "true"
|
||||
securityContext:
|
||||
|
|
|
@ -193,6 +193,18 @@ spec:
|
|||
# Set Felix logging to "info"
|
||||
- name: FELIX_LOGSEVERITYSCREEN
|
||||
value: "info"
|
||||
# Set to enable the experimental Prometheus metrics server
|
||||
- name: FELIX_PROMETHEUSMETRICSENABLED
|
||||
value: "{{- or .Networking.Calico.PrometheusMetricsEnabled "false" }}"
|
||||
# TCP port that the Prometheus metrics server should bind to
|
||||
- name: FELIX_PROMETHEUSMETRICSPORT
|
||||
value: "{{- or .Networking.Calico.PrometheusMetricsPort "9091" }}"
|
||||
# Enable Prometheus Go runtime metrics collection
|
||||
- name: FELIX_PROMETHEUSGOMETRICSENABLED
|
||||
value: "{{- or .Networking.Calico.PrometheusGoMetricsEnabled "true" }}"
|
||||
# Enable Prometheus process metrics collection
|
||||
- name: FELIX_PROMETHEUSPROCESSMETRICSENABLED
|
||||
value: "{{- or .Networking.Calico.PrometheusProcessMetricsEnabled "true" }}"
|
||||
- name: FELIX_HEALTHENABLED
|
||||
value: "true"
|
||||
securityContext:
|
||||
|
|
|
@ -100,6 +100,18 @@ spec:
|
|||
# Auto-detect the BGP IP address.
|
||||
- name: IP
|
||||
value: ""
|
||||
# Set to enable the experimental Prometheus metrics server
|
||||
- name: FELIX_PROMETHEUSMETRICSENABLED
|
||||
value: "{{- or .Networking.Calico.PrometheusMetricsEnabled "false" }}"
|
||||
# TCP port that the Prometheus metrics server should bind to
|
||||
- name: FELIX_PROMETHEUSMETRICSPORT
|
||||
value: "{{- or .Networking.Calico.PrometheusMetricsPort "9091" }}"
|
||||
# Enable Prometheus Go runtime metrics collection
|
||||
- name: FELIX_PROMETHEUSGOMETRICSENABLED
|
||||
value: "{{- or .Networking.Calico.PrometheusGoMetricsEnabled "true" }}"
|
||||
# Enable Prometheus process metrics collection
|
||||
- name: FELIX_PROMETHEUSPROCESSMETRICSENABLED
|
||||
value: "{{- or .Networking.Calico.PrometheusProcessMetricsEnabled "true" }}"
|
||||
securityContext:
|
||||
privileged: true
|
||||
volumeMounts:
|
||||
|
|
Loading…
Reference in New Issue