Fix broken metrics-server deployment not starting (#4651)
* Fix metrics-server deployment * Make metrics server work * Fix sample inventory
This commit is contained in:
parent
a4a35f8a4f
commit
3722acee85
3 changed files with 19 additions and 15 deletions
|
@ -246,8 +246,8 @@ registry_image_repo: "docker.io/registry"
|
||||||
registry_image_tag: "2.6"
|
registry_image_tag: "2.6"
|
||||||
registry_proxy_image_repo: "gcr.io/google_containers/kube-registry-proxy"
|
registry_proxy_image_repo: "gcr.io/google_containers/kube-registry-proxy"
|
||||||
registry_proxy_image_tag: "0.4"
|
registry_proxy_image_tag: "0.4"
|
||||||
metrics_server_version: "v0.3.1"
|
metrics_server_version: "v0.3.2"
|
||||||
metrics_server_image_repo: "k8s.gcr.io/metrics-server-amd64"
|
metrics_server_image_repo: "gcr.io/google_containers/metrics-server-amd64"
|
||||||
metrics_server_image_tag: "{{ metrics_server_version }}"
|
metrics_server_image_tag: "{{ metrics_server_version }}"
|
||||||
local_volume_provisioner_image_repo: "quay.io/external_storage/local-volume-provisioner"
|
local_volume_provisioner_image_repo: "quay.io/external_storage/local-volume-provisioner"
|
||||||
local_volume_provisioner_image_tag: "v2.1.0"
|
local_volume_provisioner_image_tag: "v2.1.0"
|
||||||
|
|
|
@ -32,6 +32,9 @@ spec:
|
||||||
image: {{ metrics_server_image_repo }}:{{ metrics_server_image_tag }}
|
image: {{ metrics_server_image_repo }}:{{ metrics_server_image_tag }}
|
||||||
command:
|
command:
|
||||||
- /metrics-server
|
- /metrics-server
|
||||||
|
- --logtostderr
|
||||||
|
- --cert-dir=/tmp
|
||||||
|
- --secure-port=8443
|
||||||
{% if metrics_server_kubelet_preferred_address_types %}
|
{% if metrics_server_kubelet_preferred_address_types %}
|
||||||
- --kubelet-preferred-address-types={{ metrics_server_kubelet_preferred_address_types }}
|
- --kubelet-preferred-address-types={{ metrics_server_kubelet_preferred_address_types }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -40,9 +43,12 @@ spec:
|
||||||
{% endif %}
|
{% endif %}
|
||||||
- --metric-resolution={{ metrics_server_metric_resolution }}
|
- --metric-resolution={{ metrics_server_metric_resolution }}
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 443
|
- containerPort: 8443
|
||||||
name: https
|
name: https
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
|
volumeMounts:
|
||||||
|
- name: tmp
|
||||||
|
mountPath: /tmp
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /healthz
|
path: /healthz
|
||||||
|
@ -55,23 +61,20 @@ spec:
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /healthz
|
path: /healthz
|
||||||
port: 443
|
port: https
|
||||||
scheme: HTTPS
|
scheme: HTTPS
|
||||||
successThreshold: 1
|
successThreshold: 1
|
||||||
initialDelaySeconds: 20
|
initialDelaySeconds: 20
|
||||||
failureThreshold: 3
|
failureThreshold: 3
|
||||||
timeoutSeconds: 10
|
timeoutSeconds: 10
|
||||||
securityContext:
|
securityContext:
|
||||||
# Currently non root is not supported:
|
allowPrivilegeEscalation: false
|
||||||
# https://github.com/kubernetes-incubator/metrics-server/issues/37
|
|
||||||
#
|
|
||||||
# runAsNonRoot: true
|
|
||||||
# runAsUser: 65534
|
|
||||||
capabilities:
|
capabilities:
|
||||||
drop:
|
drop: ["all"]
|
||||||
- ALL
|
readOnlyRootFilesystem: true
|
||||||
add:
|
runAsGroup: 10001
|
||||||
- NET_BIND_SERVICE
|
runAsNonRoot: true
|
||||||
|
runAsUser: 10001
|
||||||
- name: metrics-server-nanny
|
- name: metrics-server-nanny
|
||||||
image: {{ addon_resizer_image_repo }}:{{ addon_resizer_image_tag }}
|
image: {{ addon_resizer_image_repo }}:{{ addon_resizer_image_tag }}
|
||||||
resources:
|
resources:
|
||||||
|
@ -112,6 +115,8 @@ spec:
|
||||||
- name: metrics-server-config-volume
|
- name: metrics-server-config-volume
|
||||||
configMap:
|
configMap:
|
||||||
name: metrics-server-config
|
name: metrics-server-config
|
||||||
|
- name: tmp
|
||||||
|
emptyDir: {}
|
||||||
{% if not masters_are_not_tainted %}
|
{% if not masters_are_not_tainted %}
|
||||||
tolerations:
|
tolerations:
|
||||||
- key: node-role.kubernetes.io/master
|
- key: node-role.kubernetes.io/master
|
||||||
|
|
|
@ -17,8 +17,7 @@ dns_min_replicas: 1
|
||||||
kube_encrypt_secret_data: true
|
kube_encrypt_secret_data: true
|
||||||
ingress_nginx_enabled: true
|
ingress_nginx_enabled: true
|
||||||
cert_manager_enabled: true
|
cert_manager_enabled: true
|
||||||
# Disabled temporarily
|
metrics_server_enabled: true
|
||||||
metrics_server_enabled: false
|
|
||||||
metrics_server_kubelet_insecure_tls: true
|
metrics_server_kubelet_insecure_tls: true
|
||||||
kube_token_auth: true
|
kube_token_auth: true
|
||||||
kube_basic_auth: true
|
kube_basic_auth: true
|
||||||
|
|
Loading…
Reference in a new issue