Categorygithub.com/mlavacca/kubermatic
modulepackage
1.2.1
Repository: https://github.com/mlavacca/kubermatic.git
Documentation: pkg.go.dev

# README

Kubermatic API

Development environment

Due to the big dependency tree derived from Kubernetes it is strongly recommended to set up a separate GOPATH environment for Kubermatic:

$ mkdir $HOME/src/kubermatic
$ cd $HOME/src/kubermatic
$ export GOPATH=$PWD
$ mkdir -p bin pkg src
$ cd src/kubermatic
$ git clone [email protected]:kubermatic/api
$ git clone [email protected]:kubermatic/config
$ cd api
$ echo 'dummy: dummy' > secrets.yaml

mkdir -p template/coreos &&
pushd template/coreos &&
ln -sf ../../../config/kubermatic/static/nodes/aws/template/coreos/cloud-config-node.yaml aws-cloud-config-node.yaml &&
ln -sf ../../../config/kubermatic/static/nodes/digitalocean/template/coreos/cloud-config-node.yaml do-cloud-config-node.yaml &&
popd

Dependencies

Install dependencies

glide install --strip-vendor

Update dependencies

glide update --strip-vendor

Building locally

In order to use incremental compilation one can compile a binary as follows:

$ make GOBUILD="go install" build

Running locally

kubermatic-api

./kubermatic-api \
--worker-name="unique-label-abcdef123" \
--kubeconfig=$GOPATH/src/github.com/kubermatic/config/seed-clusters/dev.kubermatic.io/kubeconfig \
--datacenters=$GOPATH/src/github.com/kubermatic/config/seed-clusters/dev.kubermatic.io/datacenters.yaml \
--jwt-key=RE93Ef1Yt5-mrp2asikmfalfmcRaaa27gpH8hTAlby48LQQbUbn9d4F7yh01g_cc \
--logtostderr \
--v=8 \
--address=127.0.0.1:8080 \

kubermatic-cluster-controller

./kubermatic-cluster-controller \
--datacenters=$GOPATH/src/github.com/kubermatic/config/seed-clusters/dev.kubermatic.io/datacenters.yaml \
--kubeconfig=$GOPATH/src/github.com/kubermatic/config/seed-clusters/dev.kubermatic.io/kubeconfig \
--worker-name="unique-label-abcdef123" \
--logtostderr=1 \
--master-resources=$GOPATH/src/github.com/kubermatic/config/kubermatic/static/master \
--v=4 \
--addon-resources=$GOPATH/src/github.com/kubermatic/api/addon-charts \
--external-url=dev.kubermatic.io

Valid worker-name label value must be 63 characters or less and must be empty or begin and end with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. The dev label should be also unique between a pair of api<->controller.

Linting / Testing

Install linters

go get -u github.com/golang/lint/golint
go get -u github.com/client9/misspell/cmd/misspell
go get -u github.com/kisielk/errcheck
go get -u github.com/Masterminds/glide
go get -u github.com/opennota/check/cmd/varcheck
go get -u github.com/opennota/check/cmd/structcheck
go get -u honnef.co/go/tools/cmd/unused
go get -u honnef.co/go/tools/cmd/gosimple

Run linters

Before every push, make sure you run:

make check

gofmt errors can be automatically fixed by running

make fix

Run tests

make test

CI/CD

Currently: Wercker - Which uses the wercker.yaml & does a build on every push. Future: Jenkins which uses the Jenkinsfile & also does a build on every push.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Package provider contains abstract cloud provider types and interfaces.
No description provided by the author
No description provided by the author

# Functions

NewBytes creates a Bytes instance from a base64 string, returning nil for an empty base64 string.

# Constants

APIServerMasterUpdatePhase means that the update controller is waiting for the apiserver and updating the controllers.
ControllersMasterUpdatePhase means that the update controller is waiting for the controllers.
DeletingClusterStatusPhase means that the cluster controller is deleting the cluster.
EtcdClusterUpdatePhase means that the update controller is waiting for etcd cluster and updating the API server.
EtcdOperatorUpdatePhase means that the update controller is waiting for etcd operator and updating the etcd cluster.
FailedClusterStatusPhase means that the cluster controller time out launching the cluster.
FinishMasterUpdatePhase means that the update controller has finished the update.
LaunchingClusterStatusPhase means that the cluster controller starts up the cluster.
PausedClusterStatusPhase means that the cluster was paused after the idle time.
PendingClusterStatusPhase means that the cluster controller hasn't picked the cluster up.
RunningClusterStatusPhase means that the cluster is cluster is up and running.
StartMasterUpdatePhase means that the update controller is updating etcd operator.
UnknownClusterStatusPhase means that the phase label is missing on the Namespace.
UpdatingMasterClusterStatusPhase means that the cluster controller is updating the master components of the cluster.
UpdatingNodesClusterStatusPhase means that the cluster controller is updating the nodes of the cluster.

# Structs

AWSCloudSpec specifies access data to Amazon Web Services.
AWSDatacenterSpec specifies a data center of Amazon Web Services.
AWSNodeSpec specifies an aws node.
BareMetalCloudSpec specifies access to a bare metal datacenter.
BareMetalDatacenterSpec specifies a generic bare metal datacenter.
BareMetalNodeSpec specifies a node instanciated by the bare-metal-provider.
BringYourOwnCloudSpec specifies access data for a bring your own cluster.
BringYourOwnDatacenterSpec specifies a data center with bring-your-own nodes.
BringYourOwnNodeSpec specifies a bring your own node.
CloudSpec mutually stores access data to a cloud provider.
Cluster is the object representing a cluster.
ClusterAddress stores access and address information of a cluster.
ClusterHealth stores health information of a cluster and the timestamp of the last change.
ClusterHealthStatus stores health information of the components of a cluster.
ClusterSpec specifies the data for a new cluster.
ClusterStatus stores status information about a cluster.
ContainerLinuxClusterSpec specifies container linux configuration for nodes - cluster wide.
ContainerLinuxNodeSpec specifies container linux configuration for individual nodes.
CPU represents the CPU resources available on a node.
Datacenter is the object representing a Kubernetes infra datacenter.
DatacenterSpec specifies the data for a datacenter.
DigitaloceanCloudSpec specifies access data to digital ocean.
DigitaloceanNodeSpec specifies a digital ocean node.
DigitialoceanDatacenterSpec specifies a data center of digital ocean.
FakeCloudSpec specifies access data for a fake cloud.
FakeNodeSpec specifies a fake node.
FlannelNetworkSpec specifies a deployed flannel network.
KeyCert is a pair of key and cert.
MasterUpdate represents an update option for K8s master components.
MasterVersion is the object representing a Kubernetes Master version.
Metadata is an object storing common metadata for persistable objects.
NetworkSpec specifies the deployed network.
Node is the object representing a cluster node.
NodeAddresses stores the IP addresses associated with a node.
NodeCondition stores information about the node condition.
NodeSpec mutually stores data of a cloud specific node.
NodeStatus stores status information about a node.
NodeUpdate represents an update option for K8s node components.
NodeVersion is the object representing a Kubernetes Kubelet version.
NodeVersions stores information about the node operating system.
SecretKeyCert is a pair of key and cert where the key is not published to the API client.

# Type aliases

No description provided by the author
ClusterPhase is the life cycle phase of a cluster.
MasterUpdatePhase represents the current master update phase.