Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metrics-server: try replacing helm with kustomize #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions metrics-server/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
metrics-server
39 changes: 39 additions & 0 deletions metrics-server/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: metrics-server
spec:
template:
spec:
containers:
- name: metrics-server
command:
- /metrics-server
- --cert-dir=/tmp
- --logtostderr
- --secure-port=8443
- --kubelet-preferred-address-types=InternalIP
- --kubelet-insecure-tls
ports:
- containerPort: 8443
name: https
livenessProbe:
httpGet:
path: /healthz
port: https
scheme: HTTPS
initialDelaySeconds: 20
readinessProbe:
httpGet:
path: /healthz
port: https
scheme: HTTPS
initialDelaySeconds: 20
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["all"]
readOnlyRootFilesystem: true
runAsGroup: 10001
runAsNonRoot: true
runAsUser: 10001
13 changes: 13 additions & 0 deletions metrics-server/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
commonLabels:
variant: test
resources:
- metrics-server/deploy/1.8+/aggregated-metrics-reader.yaml
- metrics-server/deploy/1.8+/metrics-apiservice.yaml
- metrics-server/deploy/1.8+/metrics-server-deployment.yaml
- metrics-server/deploy/1.8+/metrics-server-service.yaml

- metrics-server/deploy/1.8+/auth-delegator.yaml
- metrics-server/deploy/1.8+/auth-reader.yaml
- metrics-server/deploy/1.8+/resource-reader.yaml
patches:
- deployment.yaml
20 changes: 11 additions & 9 deletions metrics-server/script/up
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,18 @@ CLUSTER_NAME=${1:-metrics-demo}
# Grab the cluster kubeconfig.
export KUBECONFIG="tmp/${CLUSTER_NAME}-kubeconfig.yaml"

# Install Helm/tiller and wait for it to be Ready.
(
cd ../helm
script/up ${CLUSTER_NAME}
)
git clone https://github.com/kubernetes-incubator/metrics-server \
|| true

# update to metrics-server upstream master at the time this script was updated
git -C metrics-server \
reset --hard ad1de3e56d98f25dc436ba08a6097d44375c8bc6

# Install metrics-server
NAMESPACE="metrics"
echo "Install metrics-server via Helm"
helm upgrade metrics-server --install --namespace ${NAMESPACE} -f ../metrics-server/values.yaml stable/metrics-server
NAMESPACE=kube-system
echo "Install metrics-server via kustomize + kubectl"
kubectl kustomize . | kubectl apply -f -

echo "Waiting for pods to be Ready"
kubectl wait --for=condition=Ready pods -l "release=metrics-server" -n ${NAMESPACE} --timeout=120s
kubectl wait --for=condition=Ready pods -l "k8s-app=metrics-server" -n ${NAMESPACE} --timeout=120s
echo "🎉"
5 changes: 0 additions & 5 deletions metrics-server/values.yaml

This file was deleted.