mirror of https://github.com/kubernetes/kops.git
Canal Typha spec and apimachinery
This commit is contained in:
parent
9b7a798136
commit
fcf6f0098c
|
@ -24,8 +24,6 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"k8s.io/kops/pkg/validation"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
@ -39,6 +37,7 @@ import (
|
|||
"k8s.io/kops/pkg/featureflag"
|
||||
"k8s.io/kops/pkg/instancegroups"
|
||||
"k8s.io/kops/pkg/pretty"
|
||||
"k8s.io/kops/pkg/validation"
|
||||
"k8s.io/kops/upup/pkg/fi/cloudup"
|
||||
"k8s.io/kops/util/pkg/tables"
|
||||
"k8s.io/kubernetes/pkg/kubectl/util/i18n"
|
||||
|
|
|
@ -134,6 +134,14 @@ type CanalNetworkingSpec struct {
|
|||
PrometheusMetricsPort int32 `json:"prometheusMetricsPort,omitempty"`
|
||||
// PrometheusProcessMetricsEnabled enables Prometheus process metrics collection
|
||||
PrometheusProcessMetricsEnabled bool `json:"prometheusProcessMetricsEnabled,omitempty"`
|
||||
// TyphaPrometheusMetricsEnabled enables Prometheus metrics collection from Typha
|
||||
// (default: false)
|
||||
TyphaPrometheusMetricsEnabled bool `json:"typhaPrometheusMetricsEnabled,omitempty"`
|
||||
// TyphaPrometheusMetricsPort is the TCP port the typha Prometheus metrics server
|
||||
// should bind to (default: 9093)
|
||||
TyphaPrometheusMetricsPort int32 `json:"typhaPrometheusMetricsPort,omitempty"`
|
||||
// TyphaReplicas is the number of replicas of Typha to deploy
|
||||
TyphaReplicas int32 `json:"typhaReplicas,omitempty"`
|
||||
}
|
||||
|
||||
// KuberouterNetworkingSpec declares that we want Kube-router networking
|
||||
|
|
|
@ -134,6 +134,14 @@ type CanalNetworkingSpec struct {
|
|||
PrometheusMetricsPort int32 `json:"prometheusMetricsPort,omitempty"`
|
||||
// PrometheusProcessMetricsEnabled enables Prometheus process metrics collection
|
||||
PrometheusProcessMetricsEnabled bool `json:"prometheusProcessMetricsEnabled,omitempty"`
|
||||
// TyphaPrometheusMetricsEnabled enables Prometheus metrics collection from Typha
|
||||
// (default: false)
|
||||
TyphaPrometheusMetricsEnabled bool `json:"typhaPrometheusMetricsEnabled,omitempty"`
|
||||
// TyphaPrometheusMetricsPort is the TCP port the typha Prometheus metrics server
|
||||
// should bind to (default: 9093)
|
||||
TyphaPrometheusMetricsPort int32 `json:"typhaPrometheusMetricsPort,omitempty"`
|
||||
// TyphaReplicas is the number of replicas of Typha to deploy
|
||||
TyphaReplicas int32 `json:"typhaReplicas,omitempty"`
|
||||
}
|
||||
|
||||
// KuberouterNetworkingSpec declares that we want Kube-router networking
|
||||
|
|
|
@ -1180,6 +1180,9 @@ func autoConvert_v1alpha1_CanalNetworkingSpec_To_kops_CanalNetworkingSpec(in *Ca
|
|||
out.PrometheusMetricsEnabled = in.PrometheusMetricsEnabled
|
||||
out.PrometheusMetricsPort = in.PrometheusMetricsPort
|
||||
out.PrometheusProcessMetricsEnabled = in.PrometheusProcessMetricsEnabled
|
||||
out.TyphaPrometheusMetricsEnabled = in.TyphaPrometheusMetricsEnabled
|
||||
out.TyphaPrometheusMetricsPort = in.TyphaPrometheusMetricsPort
|
||||
out.TyphaReplicas = in.TyphaReplicas
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -1198,6 +1201,9 @@ func autoConvert_kops_CanalNetworkingSpec_To_v1alpha1_CanalNetworkingSpec(in *ko
|
|||
out.PrometheusMetricsEnabled = in.PrometheusMetricsEnabled
|
||||
out.PrometheusMetricsPort = in.PrometheusMetricsPort
|
||||
out.PrometheusProcessMetricsEnabled = in.PrometheusProcessMetricsEnabled
|
||||
out.TyphaPrometheusMetricsEnabled = in.TyphaPrometheusMetricsEnabled
|
||||
out.TyphaPrometheusMetricsPort = in.TyphaPrometheusMetricsPort
|
||||
out.TyphaReplicas = in.TyphaReplicas
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
@ -134,6 +134,14 @@ type CanalNetworkingSpec struct {
|
|||
PrometheusMetricsPort int32 `json:"prometheusMetricsPort,omitempty"`
|
||||
// PrometheusProcessMetricsEnabled enables Prometheus process metrics collection
|
||||
PrometheusProcessMetricsEnabled bool `json:"prometheusProcessMetricsEnabled,omitempty"`
|
||||
// TyphaPrometheusMetricsEnabled enables Prometheus metrics collection from Typha
|
||||
// (default: false)
|
||||
TyphaPrometheusMetricsEnabled bool `json:"typhaPrometheusMetricsEnabled,omitempty"`
|
||||
// TyphaPrometheusMetricsPort is the TCP port the typha Prometheus metrics server
|
||||
// should bind to (default: 9093)
|
||||
TyphaPrometheusMetricsPort int32 `json:"typhaPrometheusMetricsPort,omitempty"`
|
||||
// TyphaReplicas is the number of replicas of Typha to deploy
|
||||
TyphaReplicas int32 `json:"typhaReplicas,omitempty"`
|
||||
}
|
||||
|
||||
// KuberouterNetworkingSpec declares that we want Kube-router networking
|
||||
|
|
|
@ -1222,6 +1222,9 @@ func autoConvert_v1alpha2_CanalNetworkingSpec_To_kops_CanalNetworkingSpec(in *Ca
|
|||
out.PrometheusMetricsEnabled = in.PrometheusMetricsEnabled
|
||||
out.PrometheusMetricsPort = in.PrometheusMetricsPort
|
||||
out.PrometheusProcessMetricsEnabled = in.PrometheusProcessMetricsEnabled
|
||||
out.TyphaPrometheusMetricsEnabled = in.TyphaPrometheusMetricsEnabled
|
||||
out.TyphaPrometheusMetricsPort = in.TyphaPrometheusMetricsPort
|
||||
out.TyphaReplicas = in.TyphaReplicas
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -1240,6 +1243,9 @@ func autoConvert_kops_CanalNetworkingSpec_To_v1alpha2_CanalNetworkingSpec(in *ko
|
|||
out.PrometheusMetricsEnabled = in.PrometheusMetricsEnabled
|
||||
out.PrometheusMetricsPort = in.PrometheusMetricsPort
|
||||
out.PrometheusProcessMetricsEnabled = in.PrometheusProcessMetricsEnabled
|
||||
out.TyphaPrometheusMetricsEnabled = in.TyphaPrometheusMetricsEnabled
|
||||
out.TyphaPrometheusMetricsPort = in.TyphaPrometheusMetricsPort
|
||||
out.TyphaReplicas = in.TyphaReplicas
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
@ -21,12 +21,11 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"k8s.io/kops/pkg/validation"
|
||||
|
||||
"k8s.io/client-go/kubernetes"
|
||||
"k8s.io/klog"
|
||||
api "k8s.io/kops/pkg/apis/kops"
|
||||
"k8s.io/kops/pkg/cloudinstances"
|
||||
"k8s.io/kops/pkg/validation"
|
||||
"k8s.io/kops/upup/pkg/fi"
|
||||
)
|
||||
|
||||
|
|
|
@ -486,6 +486,9 @@ spec:
|
|||
# production, we recommend running at least 3 replicas to reduce the impact of rolling upgrade.
|
||||
replicas: {{ or .Networking.Canal.TyphaReplicas 0 }}
|
||||
revisionHistoryLimit: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
k8s-app: calico-typha
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
|
|
Loading…
Reference in New Issue