mirror of https://github.com/kubernetes/kops.git
Merge pull request #4529 from atopuzov/calico-metrics
Expose Felix metrics
This commit is contained in:
commit
edfa0b242e
|
@ -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
|
||||
|
|
|
@ -402,6 +402,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
|
||||
|
|
|
@ -438,6 +438,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:
|
||||
|
|
|
@ -468,9 +468,9 @@ func (b *BootstrapChannelBuilder) buildManifest() (*channelsapi.Addons, map[stri
|
|||
if b.cluster.Spec.Networking.Calico != nil {
|
||||
key := "networking.projectcalico.org"
|
||||
versions := map[string]string{
|
||||
"pre-k8s-1.6": "2.4.1",
|
||||
"k8s-1.6": "2.6.6",
|
||||
"k8s-1.7": "2.6.6",
|
||||
"pre-k8s-1.6": "2.4.2-kops.1",
|
||||
"k8s-1.6": "2.6.7-kops.1",
|
||||
"k8s-1.7": "2.6.7-kops.1",
|
||||
}
|
||||
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue