Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
themue and kubermatic-bot Add docker registry mirror (#574)
* Add docker registry mirror flag (CentOS still open)

Signed-off-by: Frank Mueller <mail@themue.dev>

* Fix tests for CoreOS and Ubuntu

Signed-off-by: Frank Mueller <mail@themue.dev>

* Change handling for CentOS, additional tests still missing

Signed-off-by: Frank Mueller <mail@themue.dev>

* Add test for CentOS handling of registry mirrors

Signed-off-by: Frank Mueller <mail@themue.dev>

* Fix linter errors

Signed-off-by: Frank Mueller <mail@themue.dev>

* Generate testdata files after rebase

Signed-off-by: Frank Mueller <mail@themue.dev>

* Simplify statements for trimmed registries and mirrors

Signed-off-by: Frank Mueller <mail@themue.dev>

* Reset flag parsing and add exception for cyclomatic complexity of main

Signed-off-by: Frank Mueller <mail@themue.dev>
Latest commit 4c66cdc Jun 18, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Add release-note block to PR template (#367) Oct 20, 2018
cmd Add docker registry mirror (#574) Jun 18, 2019
docs Add proxy support (#559) Jun 11, 2019
examples Hcloud: Allow configuring labels (#576) Jun 17, 2019
hack Fix placeholder to project name (#567) Jun 6, 2019
image-builder Add template files and boilerplate headers (#498) Apr 24, 2019
pkg Add docker registry mirror (#574) Jun 18, 2019
test Add docker registry mirror (#574) Jun 18, 2019
vendor Add proxy support (#559) Jun 11, 2019
.gitignore Add UserData plugins (#473) Apr 8, 2019
.golangci.yml Add docker registry mirror (#574) Jun 18, 2019
.yamllint.conf Preparation for yamllint integration in infra (#513) May 2, 2019
CONTRIBUTING.md Fix placeholder to project name (#567) Jun 6, 2019
DCO Add template files and boilerplate headers (#498) Apr 24, 2019
Dockerfile Add proxy support (#559) Jun 11, 2019
Gopkg.lock Add proxy support (#559) Jun 11, 2019
Gopkg.toml Add proxy support (#559) Jun 11, 2019
LICENSE Initial commit Dec 24, 2017
Makefile Add proxy support (#559) Jun 11, 2019
NOTICE Add template files and boilerplate headers (#498) Apr 24, 2019
OWNERS Add team/lifecycle label to all PRs (#495) Apr 16, 2019
OWNERS_ALIASES Make nikhita and frank maintainers (#535) May 14, 2019
README.md Add proxy support (#559) Jun 11, 2019
Zenhub.md Add template files and boilerplate headers (#498) Apr 24, 2019
code-of-conduct.md Add template files and boilerplate headers (#498) Apr 24, 2019

README.md

Kubermatic machine-controller

Table of Contents

Features

What works

  • Creation of worker nodes on AWS, Digitalocean, Openstack, Azure, Google Cloud Platform, VMWare Vsphere, Linode, Hetzner cloud and Kubevirt (experimental)
  • Using Ubuntu, CoreOS/RedHat ContainerLinux or CentOS 7 distributions (not all distributions work on all providers)

What does not work

  • Master creation (Not planned at the moment)

Quickstart

Deploy the machine-controller

make deploy

Creating a machineDeployment

# edit examples/$cloudprovider-machinedeployment.yaml & create the machineDeployment
kubectl create -f examples/$cloudprovider-machinedeployment.yaml

Advanced usage

Specifying the apiserver endpoint

By default the controller looks for a cluster-info ConfigMap within the kube-public Namespace. If one is found which contains a minimal kubeconfig (kubeadm cluster have them by default), this kubeconfig will be used for the node bootstrapping. The kubeconfig only needs to contain two things:

  • CA-Data
  • The public endpoint for the Apiserver

If no ConfigMap can be found:

CA-data

The CA will be loaded from the passed kubeconfig when running outside the cluster or from /var/run/secrets/kubernetes.io/serviceaccount/ca.crt when running inside the cluster.

Apiserver endpoint

The first endpoint from the kubernetes endpoints will be taken. kubectl get endpoints kubernetes -o yaml

Example cluster-info ConfigMap

apiVersion: v1
kind: ConfigMap
metadata:
  name: cluster-info
  namespace: kube-public
data:
  kubeconfig: |
    apiVersion: v1
    clusters:
    - cluster:
        certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURHRENDQWdDZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREE5TVRzd09RWURWUVFERXpKeWIyOTAKTFdOaExtaG1kblEwWkd0bllpNWxkWEp2Y0dVdGQyVnpkRE10WXk1a1pYWXVhM1ZpWlhKdFlYUnBZeTVwYnpBZQpGdzB4TnpFeU1qS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ZwREt6aXJ1K2xDeFJWNzNJOGljWi9Tbk83c3VWa0xUNnoxcFBRCnlOby9zNXc3Ynp4ekFPdmFiWTVsa2VkVFNLKzAxSnZHby9LY3hsaTVoZ1NiMWVyOUR0VERXRjdHZjA5ZmdpWlcKcUd1NUZOOUFoamZodTZFcFVkMTRmdXVtQ2ttRHZIaDJ2dzhvL1E9PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
        server: https://hfvt4dkgb.europe-west3-c.dev.kubermatic.io:30002
      name: ""
    contexts: []
    current-context: ""
    kind: Config
    preferences: {}
    users: []

Development

Testing

Unittests

Simply run make test-unit

End-to-End

This project provides easy to use e2e testing using Hetzner cloud. To run the e2e tests locally, the following steps are required:

  • Populate the environment variable HZ_E2E_TOKEN with a valid Hetzner cloud token
  • Run make e2e-cluster to get a simple kubeadm cluster on Hetzner
  • Run hack/run-machine-controller.sh to locally run the machine-controller for your freshly created cluster

If you want to use an existing cluster to test against, you can simply set the KUBECONFIG environment variable. In this case, first make sure that a kubeconfig created by make e2e-cluster at $(go env GOPATH)/src/github.com/kubermatic/machine-controller/.kubeconfig doesn't exist, since the tests will default to this hardcoded path and only use the env var as fallback.

Now you can either

  • Run the tests for all providers via go test -race -tags=e2e -parallel 240 -v -timeout 30m ./test/e2e/... -identifier $USER
  • Check test/e2e/provisioning/all_e2e_test.go for the available tests, then run only a specific one via go test -race -tags=e2e -parallel 24 -v -timeout 20m ./test/e2e/... -identifier $USER -run $TESTNAME

Note: All e2e tests require corresponding credentials to be present, check test/e2e/provisioning/all_e2e_test.go for details

Note: After finishing testing, please clean up after yourself:

  • Execute ./test/tools/integration/cleanup_machines.sh while the machine-controller is still running
  • Execute make e2e-destroy to clean up the test control plane

You can also insert your ssh key into the created instances by editing the manifests in test/e2e/provisioning/testdata/

Troubleshooting

If you encounter issues file an issue or talk to us on the #kubermatic channel on the Kubermatic Slack.

Contributing

Thanks for taking the time to join our community and start contributing!

Before you start

Pull requests

  • We welcome pull requests. Feel free to dig through the issues and jump in.

Changelog

See the list of releases to find out about feature changes.

You can’t perform that action at this time.