Expose metrics port for karmadactl installation
Signed-off-by: whitewindmills <jayfantasyhjh@gmail.com>
This commit is contained in:
parent
798227586e
commit
6158fd8af5
|
@ -46,6 +46,7 @@ spec:
|
|||
- /bin/karmada-descheduler
|
||||
- --kubeconfig=/etc/kubeconfig
|
||||
- --bind-address=0.0.0.0
|
||||
- --secure-port=10358
|
||||
- --leader-elect-resource-namespace={{ .Namespace }}
|
||||
- --scheduler-estimator-ca-file=/etc/karmada/pki/ca.crt
|
||||
- --scheduler-estimator-cert-file=/etc/karmada/pki/karmada.crt
|
||||
|
@ -60,6 +61,10 @@ spec:
|
|||
initialDelaySeconds: 15
|
||||
periodSeconds: 15
|
||||
timeoutSeconds: 5
|
||||
ports:
|
||||
- containerPort: 10358
|
||||
name: metrics
|
||||
protocol: TCP
|
||||
volumeMounts:
|
||||
- name: k8s-certs
|
||||
mountPath: /etc/karmada/pki
|
||||
|
|
|
@ -48,6 +48,8 @@ spec:
|
|||
- /bin/karmada-scheduler-estimator
|
||||
- --kubeconfig=/etc/{{ .MemberClusterName}}-kubeconfig
|
||||
- --cluster-name={{ .MemberClusterName}}
|
||||
- --bind-address=0.0.0.0
|
||||
- --secure-port=10351
|
||||
- --grpc-auth-cert-file=/etc/karmada/pki/karmada.crt
|
||||
- --grpc-auth-key-file=/etc/karmada/pki/karmada.key
|
||||
- --client-cert-auth=true
|
||||
|
@ -61,6 +63,10 @@ spec:
|
|||
initialDelaySeconds: 15
|
||||
periodSeconds: 15
|
||||
timeoutSeconds: 5
|
||||
ports:
|
||||
- containerPort: 10351
|
||||
name: metrics
|
||||
protocol: TCP
|
||||
volumeMounts:
|
||||
- name: k8s-certs
|
||||
mountPath: /etc/karmada/pki
|
||||
|
|
|
@ -35,6 +35,8 @@ const (
|
|||
deploymentAPIVersion = "apps/v1"
|
||||
deploymentKind = "Deployment"
|
||||
portName = "server"
|
||||
metricsPortName = "metrics"
|
||||
defaultMetricsPort = 8080
|
||||
|
||||
// KubeConfigSecretAndMountName is the secret and volume mount name of karmada kubeconfig
|
||||
KubeConfigSecretAndMountName = "kubeconfig"
|
||||
|
@ -461,6 +463,13 @@ func (i *CommandInitOption) makeKarmadaSchedulerDeployment() *appsv1.Deployment
|
|||
"--v=4",
|
||||
},
|
||||
LivenessProbe: livenessProbe,
|
||||
Ports: []corev1.ContainerPort{
|
||||
{
|
||||
Name: metricsPortName,
|
||||
ContainerPort: 10351,
|
||||
Protocol: corev1.ProtocolTCP,
|
||||
},
|
||||
},
|
||||
VolumeMounts: []corev1.VolumeMount{
|
||||
{
|
||||
Name: KubeConfigSecretAndMountName,
|
||||
|
@ -583,6 +592,7 @@ func (i *CommandInitOption) makeKarmadaControllerManagerDeployment() *appsv1.Dep
|
|||
"/bin/karmada-controller-manager",
|
||||
"--kubeconfig=/etc/kubeconfig",
|
||||
"--bind-address=0.0.0.0",
|
||||
"--metrics-bind-address=:8080",
|
||||
"--cluster-status-update-frequency=10s",
|
||||
"--secure-port=10357",
|
||||
fmt.Sprintf("--leader-elect-resource-namespace=%s", i.Namespace),
|
||||
|
@ -595,6 +605,11 @@ func (i *CommandInitOption) makeKarmadaControllerManagerDeployment() *appsv1.Dep
|
|||
ContainerPort: controllerManagerSecurePort,
|
||||
Protocol: corev1.ProtocolTCP,
|
||||
},
|
||||
{
|
||||
Name: metricsPortName,
|
||||
ContainerPort: defaultMetricsPort,
|
||||
Protocol: corev1.ProtocolTCP,
|
||||
},
|
||||
},
|
||||
VolumeMounts: []corev1.VolumeMount{
|
||||
{
|
||||
|
@ -702,6 +717,7 @@ func (i *CommandInitOption) makeKarmadaWebhookDeployment() *appsv1.Deployment {
|
|||
"/bin/karmada-webhook",
|
||||
"--kubeconfig=/etc/kubeconfig",
|
||||
"--bind-address=0.0.0.0",
|
||||
"--metrics-bind-address=:8080",
|
||||
fmt.Sprintf("--secure-port=%v", webhookTargetPort),
|
||||
fmt.Sprintf("--cert-dir=%s", webhookCertVolumeMountPath),
|
||||
"--v=4",
|
||||
|
@ -712,6 +728,11 @@ func (i *CommandInitOption) makeKarmadaWebhookDeployment() *appsv1.Deployment {
|
|||
ContainerPort: webhookTargetPort,
|
||||
Protocol: corev1.ProtocolTCP,
|
||||
},
|
||||
{
|
||||
Name: metricsPortName,
|
||||
ContainerPort: defaultMetricsPort,
|
||||
Protocol: corev1.ProtocolTCP,
|
||||
},
|
||||
},
|
||||
VolumeMounts: []corev1.VolumeMount{
|
||||
{
|
||||
|
|
|
@ -711,9 +711,17 @@ func (o *CommandRegisterOption) makeKarmadaAgentDeployment() *appsv1.Deployment
|
|||
fmt.Sprintf("--cluster-namespace=%s", o.ClusterNamespace),
|
||||
"--cluster-status-update-frequency=10s",
|
||||
"--bind-address=0.0.0.0",
|
||||
"--metrics-bind-address=:8080",
|
||||
"--secure-port=10357",
|
||||
"--v=4",
|
||||
},
|
||||
Ports: []corev1.ContainerPort{
|
||||
{
|
||||
Name: "metrics",
|
||||
ContainerPort: 8080,
|
||||
Protocol: corev1.ProtocolTCP,
|
||||
},
|
||||
},
|
||||
VolumeMounts: []corev1.VolumeMount{
|
||||
{
|
||||
Name: "kubeconfig",
|
||||
|
|
Loading…
Reference in New Issue