Workload Prediction
#!/bin/bash
echo "SOURCE_COMMIT: $SOURCE_COMMIT"
if [[ -z "$SOURCE_COMMIT" ]]; then
export SOURCE_COMMIT="${SOURCE_COMMIT:-$(git rev-parse HEAD)}"
echo "Updating SOURCE_COMMIT from git rev-parse HEAD"
the all-in-one yaml file for deploying kubeturbo. Dry run
kubectl --dry-run=true apply -f all.yaml
---
apiVersion: v1
kind: Namespace
language: go | |
# Only the last two Go releases are supported by the Go team with security | |
# updates. Any versions older than that should be considered deprecated. | |
# Don't bother testing with them. tip builds your code with the latest | |
# development version of Go. This can warn you that your code will break | |
# in the next version of Go. Don't worry! Later we declare that test runs | |
# are allowed to fail on Go tip. | |
go: | |
- 1.9 |
This article is copied from mockito
Tests in any project are a valuable asset, so is a clean version history. Having a proper and clean commits helps to review and understand changes. Git is an awesome tool that let you control how you want your history. GitHub just use the history of the branch, so each time the history is changed the PR is updated with the actual history. GitHub PR is a fantastic way to have changes review before merge.
The following tips may help you if you are not proficient in git, but they consists hardly in a bullet proof tutorial, knowing git is the most bullet proof skill. But the steps of the following options can guide you to have a clean history.
There are multiple blog entries explaining git, I find the following two quite compelling and showing a modern way to do things right in git, of course [StackOverflow](http://stackov
Kubernetes 1.6 offers some advanced scheduling features, including cutomer scheduler. User can set schedulerName when creating new Pod. Before reading the code of Kubernetes ApiServer and kubelete, some tests are done to have a initial understanding of Kubernetes scheduling policies.
This experiments will test the behaviour of Pod scheduluation in different situations:
-
- create a Pod without setting the schedulerName;
-
- create a Pod with schedulerName to "default-scheduler";
OpsMgr always wants to move the pod to achieve desired state. But currently, Kubernetes does not offer an API to move a Pod.
So we use a Copy--Delete--Create method to implement the Move operation, by calling Kubernetes APIserver.
In the Copy-Kill-Create method, before the third step "Create", we assign the new destination host NodeName for the new pod: Pod.Spec.NodeName, so the new Pod will be binded to that desired host directly, without the necessary to wait
Reflector is a key component for Kubernetes clients, kube-scheduler and Replication Controller. Reflector is in the middle between client and Kubernetes API-server. It provides a framework to monitor the changes of the Kubernetes cluster.
Here is the definition of Reflector.
As shown in the definition, there are two important compoents of a Reflector: