forked from kubernetes/kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add launching Cluster Autoscaler in Kubemark
- Loading branch information
Showing
5 changed files
with
171 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
{ | ||
"kind": "Pod", | ||
"apiVersion": "v1", | ||
"metadata": { | ||
"name": "cluster-autoscaler", | ||
"namespace": "kubemark", | ||
"labels": { | ||
"tier": "cluster-management", | ||
"component": "cluster-autoscaler" | ||
} | ||
}, | ||
"spec": { | ||
"hostNetwork": true, | ||
"containers": [ | ||
{ | ||
"name": "cluster-autoscaler", | ||
"image": "gcr.io/google_containers/cluster-autoscaler:v1.0.0", | ||
"command": [ | ||
"./run.sh", | ||
"--kubernetes=https://{{master_ip}}:443?inClusterConfig=0&useServiceAccount=0&auth=/kubeconfig/cluster_autoscaler.kubeconfig", | ||
"--v=4", | ||
"--logtostderr=true", | ||
"--write-status-configmap=true", | ||
"--cloud-provider=kubemark", | ||
"--nodes={{kubemark_autoscaler_min_nodes}}:{{kubemark_autoscaler_max_nodes}}:{{kubemark_autoscaler_mig_name}}" | ||
], | ||
"env": [ | ||
{ | ||
"name": "LOG_OUTPUT", | ||
"value": "/var/log/cluster-autoscaler.log" | ||
} | ||
], | ||
"resources": { | ||
"requests": { | ||
"cpu": "10m", | ||
"memory": "300Mi" | ||
} | ||
}, | ||
"volumeMounts": [ | ||
{"name": "cloudconfigmount","mountPath": "/etc/gce.conf", "readOnly": true}, | ||
{ | ||
"name": "ssl-certs", | ||
"readOnly": true, | ||
"mountPath": "/etc/ssl/certs" | ||
}, | ||
{ | ||
"name": "usrsharecacerts", | ||
"readOnly": true, | ||
"mountPath": "/usr/share/ca-certificates" | ||
}, | ||
{ | ||
"name": "logdir", | ||
"mountPath": "/var/log", | ||
"readOnly": false | ||
}, | ||
{ | ||
"name": "kubeconfig-volume", | ||
"mountPath": "/kubeconfig" | ||
} | ||
], | ||
"terminationMessagePath": "/dev/termination-log", | ||
"imagePullPolicy": "Always" | ||
} | ||
], | ||
"volumes": [ | ||
{"name": "cloudconfigmount","hostPath": {"path": "/etc/gce.conf"}}, | ||
{ | ||
"name": "ssl-certs", | ||
"hostPath": { | ||
"path": "/etc/ssl/certs" | ||
} | ||
}, | ||
{ | ||
"name": "usrsharecacerts", | ||
"hostPath": { | ||
"path": "/usr/share/ca-certificates" | ||
} | ||
}, | ||
{ | ||
"name": "logdir", | ||
"hostPath": { | ||
"path": "/var/log" | ||
} | ||
}, | ||
{ | ||
"name": "kubeconfig-volume", | ||
"secret": { | ||
"secretName": "kubeconfig" | ||
} | ||
} | ||
], | ||
"restartPolicy": "Always" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...ubemark/resources/manifests/addons/kubemark-rbac-bindings/cluster-autoscaler-binding.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# This is the role binding for the kubemark cluster autoscaler. | ||
# TODO: Use proper Cluster Autoscaler role (github.com/kubernetes/autoscaler/issues/383) | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: cluster-autoscaler-view-binding | ||
labels: | ||
kubernetes.io/cluster-service: "true" | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: cluster-admin | ||
subjects: | ||
- apiGroup: rbac.authorization.k8s.io | ||
kind: User | ||
name: system:cluster-autoscaler |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters