Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
55c21ac8
Commit
55c21ac8
authored
Aug 30, 2017
by
Piotr Szczesniak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Introduced Metrics Server
parent
0596891e
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
114 additions
and
0 deletions
+114
-0
auth-delegator.yaml
cluster/addons/metrics-server/auth-delegator.yaml
+12
-0
auth-reader.yaml
cluster/addons/metrics-server/auth-reader.yaml
+13
-0
metrics-apiservice.yaml
cluster/addons/metrics-server/metrics-apiservice.yaml
+13
-0
metrics-server-deployment.yaml
cluster/addons/metrics-server/metrics-server-deployment.yaml
+42
-0
metrics-server-service.yaml
cluster/addons/metrics-server/metrics-server-service.yaml
+14
-0
common.sh
cluster/common.sh
+1
-0
config-default.sh
cluster/gce/config-default.sh
+6
-0
config-test.sh
cluster/gce/config-test.sh
+6
-0
configure-vm.sh
cluster/gce/configure-vm.sh
+1
-0
configure-helper.sh
cluster/gce/container-linux/configure-helper.sh
+3
-0
configure-helper.sh
cluster/gce/gci/configure-helper.sh
+3
-0
No files found.
cluster/addons/metrics-server/auth-delegator.yaml
0 → 100644
View file @
55c21ac8
apiVersion
:
rbac.authorization.k8s.io/v1
kind
:
ClusterRoleBinding
metadata
:
name
:
metrics-server:system:auth-delegator
roleRef
:
apiGroup
:
rbac.authorization.k8s.io
kind
:
ClusterRole
name
:
system:auth-delegator
subjects
:
-
kind
:
ServiceAccount
name
:
metrics-server
namespace
:
kube-system
cluster/addons/metrics-server/auth-reader.yaml
0 → 100644
View file @
55c21ac8
apiVersion
:
rbac.authorization.k8s.io/v1
kind
:
RoleBinding
metadata
:
name
:
metrics-server-auth-reader
namespace
:
kube-system
roleRef
:
apiGroup
:
rbac.authorization.k8s.io
kind
:
Role
name
:
extension-apiserver-authentication-reader
subjects
:
-
kind
:
ServiceAccount
name
:
metrics-server
namespace
:
kube-system
cluster/addons/metrics-server/metrics-apiservice.yaml
0 → 100644
View file @
55c21ac8
apiVersion
:
apiregistration.k8s.io/v1beta1
kind
:
APIService
metadata
:
name
:
v1alpha1.metrics
spec
:
service
:
name
:
metrics-server
namespace
:
kube-system
group
:
metrics
version
:
v1alpha1
insecureSkipTLSVerify
:
true
groupPriorityMinimum
:
100
versionPriority
:
100
cluster/addons/metrics-server/metrics-server-deployment.yaml
0 → 100644
View file @
55c21ac8
apiVersion
:
v1
kind
:
ServiceAccount
metadata
:
name
:
metrics-server
namespace
:
kube-system
---
apiVersion
:
extensions/v1beta1
kind
:
Deployment
metadata
:
name
:
metrics-server
namespace
:
kube-system
labels
:
k8s-app
:
metrics-server
spec
:
selector
:
matchLabels
:
k8s-app
:
metrics-server
template
:
metadata
:
name
:
metrics-server
labels
:
k8s-app
:
metrics-server
spec
:
serviceAccountName
:
metrics-server
containers
:
-
name
:
metrics-server
image
:
gcr.io/google_containers/metrics-server-amd64:dev
imagePullPolicy
:
Always
# TODO(piosz): revisit resources
resources
:
requests
:
memory
:
100Mi
command
:
-
/metrics-server
-
--source=kubernetes.summary_api:''
ports
:
-
containerPort
:
443
name
:
https
protocol
:
TCP
tolerations
:
-
key
:
"
CriticalAddonsOnly"
operator
:
"
Exists"
cluster/addons/metrics-server/metrics-server-service.yaml
0 → 100644
View file @
55c21ac8
apiVersion
:
v1
kind
:
Service
metadata
:
name
:
metrics-server
namespace
:
kube-system
labels
:
kubernetes.io/name
:
"
Metrics-server"
spec
:
selector
:
k8s-app
:
metrics-server
ports
:
-
port
:
443
protocol
:
TCP
targetPort
:
https
cluster/common.sh
View file @
55c21ac8
...
@@ -619,6 +619,7 @@ SERVICE_CLUSTER_IP_RANGE: $(yaml-quote ${SERVICE_CLUSTER_IP_RANGE})
...
@@ -619,6 +619,7 @@ SERVICE_CLUSTER_IP_RANGE: $(yaml-quote ${SERVICE_CLUSTER_IP_RANGE})
KUBERNETES_MASTER_NAME:
$(
yaml-quote
${
KUBERNETES_MASTER_NAME
})
KUBERNETES_MASTER_NAME:
$(
yaml-quote
${
KUBERNETES_MASTER_NAME
})
ALLOCATE_NODE_CIDRS:
$(
yaml-quote
${
ALLOCATE_NODE_CIDRS
:-
false
})
ALLOCATE_NODE_CIDRS:
$(
yaml-quote
${
ALLOCATE_NODE_CIDRS
:-
false
})
ENABLE_CLUSTER_MONITORING:
$(
yaml-quote
${
ENABLE_CLUSTER_MONITORING
:-
none
})
ENABLE_CLUSTER_MONITORING:
$(
yaml-quote
${
ENABLE_CLUSTER_MONITORING
:-
none
})
ENABLE_METRICS_SERVER:
$(
yaml-quote
${
ENABLE_METRICS_SERVER
:-
false
})
DOCKER_REGISTRY_MIRROR_URL:
$(
yaml-quote
${
DOCKER_REGISTRY_MIRROR_URL
:-})
DOCKER_REGISTRY_MIRROR_URL:
$(
yaml-quote
${
DOCKER_REGISTRY_MIRROR_URL
:-})
ENABLE_L7_LOADBALANCING:
$(
yaml-quote
${
ENABLE_L7_LOADBALANCING
:-
none
})
ENABLE_L7_LOADBALANCING:
$(
yaml-quote
${
ENABLE_L7_LOADBALANCING
:-
none
})
ENABLE_CLUSTER_LOGGING:
$(
yaml-quote
${
ENABLE_CLUSTER_LOGGING
:-
false
})
ENABLE_CLUSTER_LOGGING:
$(
yaml-quote
${
ENABLE_CLUSTER_LOGGING
:-
false
})
...
...
cluster/gce/config-default.sh
View file @
55c21ac8
...
@@ -123,6 +123,12 @@ ENABLE_L7_LOADBALANCING="${KUBE_ENABLE_L7_LOADBALANCING:-glbc}"
...
@@ -123,6 +123,12 @@ ENABLE_L7_LOADBALANCING="${KUBE_ENABLE_L7_LOADBALANCING:-glbc}"
# standalone - Heapster only. Metrics available via Heapster REST API.
# standalone - Heapster only. Metrics available via Heapster REST API.
ENABLE_CLUSTER_MONITORING
=
"
${
KUBE_ENABLE_CLUSTER_MONITORING
:-
influxdb
}
"
ENABLE_CLUSTER_MONITORING
=
"
${
KUBE_ENABLE_CLUSTER_MONITORING
:-
influxdb
}
"
# Optional: Enable Metrics Server. Metrics Server should be enable everywhere,
# since it's a critical component, but in the first release we need a way to disable
# this in case of stability issues.
# TODO(piosz) remove this option once Metrics Server became a stable thing.
ENABLE_METRICS_SERVER
=
"
${
KUBE_ENABLE_METRICS_SERVER
:-
true
}
"
# One special node out of NUM_NODES would be created of this type if specified.
# One special node out of NUM_NODES would be created of this type if specified.
# Useful for scheduling heapster in large clusters with nodes of small size.
# Useful for scheduling heapster in large clusters with nodes of small size.
HEAPSTER_MACHINE_TYPE
=
"
${
HEAPSTER_MACHINE_TYPE
:-}
"
HEAPSTER_MACHINE_TYPE
=
"
${
HEAPSTER_MACHINE_TYPE
:-}
"
...
...
cluster/gce/config-test.sh
View file @
55c21ac8
...
@@ -134,6 +134,12 @@ ENABLE_L7_LOADBALANCING="${KUBE_ENABLE_L7_LOADBALANCING:-glbc}"
...
@@ -134,6 +134,12 @@ ENABLE_L7_LOADBALANCING="${KUBE_ENABLE_L7_LOADBALANCING:-glbc}"
# standalone - Heapster only. Metrics available via Heapster REST API.
# standalone - Heapster only. Metrics available via Heapster REST API.
ENABLE_CLUSTER_MONITORING
=
"
${
KUBE_ENABLE_CLUSTER_MONITORING
:-
influxdb
}
"
ENABLE_CLUSTER_MONITORING
=
"
${
KUBE_ENABLE_CLUSTER_MONITORING
:-
influxdb
}
"
# Optional: Enable Metrics Server. Metrics Server should be enable everywhere,
# since it's a critical component, but in the first release we need a way to disable
# this in case of stability issues.
# TODO(piosz) remove this option once Metrics Server became a stable thing.
ENABLE_METRICS_SERVER
=
"
${
KUBE_ENABLE_METRICS_SERVER
:-
true
}
"
# One special node out of NUM_NODES would be created of this type if specified.
# One special node out of NUM_NODES would be created of this type if specified.
# Useful for scheduling heapster in large clusters with nodes of small size.
# Useful for scheduling heapster in large clusters with nodes of small size.
HEAPSTER_MACHINE_TYPE
=
"
${
HEAPSTER_MACHINE_TYPE
:-}
"
HEAPSTER_MACHINE_TYPE
=
"
${
HEAPSTER_MACHINE_TYPE
:-}
"
...
...
cluster/gce/configure-vm.sh
View file @
55c21ac8
...
@@ -420,6 +420,7 @@ enable_node_problem_detector: '$(echo "$ENABLE_NODE_PROBLEM_DETECTOR" | sed -e "
...
@@ -420,6 +420,7 @@ enable_node_problem_detector: '$(echo "$ENABLE_NODE_PROBLEM_DETECTOR" | sed -e "
enable_l7_loadbalancing: '
$(
echo
"
$ENABLE_L7_LOADBALANCING
"
|
sed
-e
"s/'/''/g"
)
'
enable_l7_loadbalancing: '
$(
echo
"
$ENABLE_L7_LOADBALANCING
"
|
sed
-e
"s/'/''/g"
)
'
enable_node_logging: '
$(
echo
"
$ENABLE_NODE_LOGGING
"
|
sed
-e
"s/'/''/g"
)
'
enable_node_logging: '
$(
echo
"
$ENABLE_NODE_LOGGING
"
|
sed
-e
"s/'/''/g"
)
'
enable_metadata_proxy: '
$(
echo
"
$ENABLE_METADATA_PROXY
"
|
sed
-e
"s/'/''/g"
)
'
enable_metadata_proxy: '
$(
echo
"
$ENABLE_METADATA_PROXY
"
|
sed
-e
"s/'/''/g"
)
'
enable_metrics_server: '
$(
echo
"
$ENABLE_METRICS_SERVER
"
|
sed
-e
"s/'/''/g"
)
'
enable_rescheduler: '
$(
echo
"
$ENABLE_RESCHEDULER
"
|
sed
-e
"s/'/''/g"
)
'
enable_rescheduler: '
$(
echo
"
$ENABLE_RESCHEDULER
"
|
sed
-e
"s/'/''/g"
)
'
logging_destination: '
$(
echo
"
$LOGGING_DESTINATION
"
|
sed
-e
"s/'/''/g"
)
'
logging_destination: '
$(
echo
"
$LOGGING_DESTINATION
"
|
sed
-e
"s/'/''/g"
)
'
elasticsearch_replicas: '
$(
echo
"
$ELASTICSEARCH_LOGGING_REPLICAS
"
|
sed
-e
"s/'/''/g"
)
'
elasticsearch_replicas: '
$(
echo
"
$ELASTICSEARCH_LOGGING_REPLICAS
"
|
sed
-e
"s/'/''/g"
)
'
...
...
cluster/gce/container-linux/configure-helper.sh
View file @
55c21ac8
...
@@ -1312,6 +1312,9 @@ function start-kube-addons {
...
@@ -1312,6 +1312,9 @@ function start-kube-addons {
sed
-i
-e
"s@{{ *metrics_cpu_per_node *}}@
${
metrics_cpu_per_node
}
@g"
"
${
controller_yaml
}
"
sed
-i
-e
"s@{{ *metrics_cpu_per_node *}}@
${
metrics_cpu_per_node
}
@g"
"
${
controller_yaml
}
"
update-prometheus-to-sd-parameters
${
controller_yaml
}
update-prometheus-to-sd-parameters
${
controller_yaml
}
fi
fi
if
[[
"
${
ENABLE_METRICS_SERVER
:-}
"
==
"true"
]]
;
then
setup-addon-manifests
"addons"
"metrics-server"
fi
if
[[
"
${
ENABLE_CLUSTER_DNS
:-}
"
==
"true"
]]
;
then
if
[[
"
${
ENABLE_CLUSTER_DNS
:-}
"
==
"true"
]]
;
then
setup-addon-manifests
"addons"
"dns"
setup-addon-manifests
"addons"
"dns"
local
-r
dns_controller_file
=
"
${
dst_dir
}
/dns/kubedns-controller.yaml"
local
-r
dns_controller_file
=
"
${
dst_dir
}
/dns/kubedns-controller.yaml"
...
...
cluster/gce/gci/configure-helper.sh
View file @
55c21ac8
...
@@ -1740,6 +1740,9 @@ function start-kube-addons {
...
@@ -1740,6 +1740,9 @@ function start-kube-addons {
sed
-i
-e
"s@{{ *metrics_cpu_per_node *}}@
${
metrics_cpu_per_node
}
@g"
"
${
controller_yaml
}
"
sed
-i
-e
"s@{{ *metrics_cpu_per_node *}}@
${
metrics_cpu_per_node
}
@g"
"
${
controller_yaml
}
"
update-prometheus-to-sd-parameters
${
controller_yaml
}
update-prometheus-to-sd-parameters
${
controller_yaml
}
fi
fi
if
[[
"
${
ENABLE_METRICS_SERVER
:-}
"
==
"true"
]]
;
then
setup-addon-manifests
"addons"
"metrics-server"
fi
if
[[
"
${
ENABLE_CLUSTER_DNS
:-}
"
==
"true"
]]
;
then
if
[[
"
${
ENABLE_CLUSTER_DNS
:-}
"
==
"true"
]]
;
then
setup-addon-manifests
"addons"
"dns"
setup-addon-manifests
"addons"
"dns"
local
-r
dns_controller_file
=
"
${
dst_dir
}
/dns/kubedns-controller.yaml"
local
-r
dns_controller_file
=
"
${
dst_dir
}
/dns/kubedns-controller.yaml"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment