kubermatic

module
v3.0.0-...-d6c4d9c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2023 License: Apache-2.0

README

last stable release go report card godoc

Overview / User Guides

Kubermatic Kubernetes Platform is in an open source project to centrally manage the global automation of thousands of Kubernetes clusters across multicloud, on-prem and edge with unparalleled density and resilience.

All user documentation is available at the Kubermatic Kubernetes Platform docs website.

Editions

There are two editions of Kubermatic Kubernetes Platform:

Kubermatic Kubernetes Platform Community Edition (CE) is available freely under the Apache License, Version 2.0. Kubermatic Kubernetes Platform Enterprise Edition (EE) includes premium features that are most useful for organizations with large-scale Kubernetes installations with more than 50 clusters. To access the Enterprise Edition and get official support please become a subscriber.

Licensing

See the LICENSE file for licensing information as it pertains to files in this repository.

Installation

We strongly recommend that you use an official release of Kubermatic Kubernetes Platform. Follow the instructions under the Installation section of our documentation to get started.

The code and sample YAML files in the main branch of the kubermatic repository are under active development and are not guaranteed to be stable. Use them at your own risk!

More information

The documentation provides a getting started guide, plus information about building from source, architecture, extending kubermatic, and more.

Please use the version selector at the top of the site to ensure you are using the appropriate documentation for your version of kubermatic.

Troubleshooting

If you encounter issues file an issue or talk to us on the #kubermatic channel on the Kubermatic Community Slack (click here to join).

Contributing

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

Before you start

Repository layout

├── addons    # Default Kubernetes addons
├── charts    # The Helm charts we use to deploy
├── cmd       # Various Kubermatic binaries for the controller-managers, operator etc.
├── codegen   # Helper programs to generate Go code and Helm charts
├── docs      # Some basic developer-oriented documentation
├── hack      # scripts for development and CI
└── pkg       # most of the actual codebase

Development environment

git clone git@github.com:kubermatic/kubermatic.git
cd kubermatic

There are a couple of scripts in the hacks directory to aid in running the components locally for testing purposes.

Running components locally
user-cluster-controller-manager

In order to instrument the seed-controller to allow for a local user-cluster-controller-manager, you need to add a worker-name label with your local machine's name as its value. Additionally, you need to scale down the already running deployment.

# Using a kubeconfig, which points to the seed-cluster
export cluster_id="<id-of-your-user-cluster>"
kubectl label cluster ${cluster_id} worker-name=$(uname -n)
kubectl scale deployment -n cluster-${cluster_id} usercluster-controller --replicas=0

Afterwards, you can start your local user-cluster-controller-manager.

# Using a kubeconfig, which points to the seed-cluster
./hack/run-user-cluster-controller-manager.sh
seed-controller-manager
./hack/run-seed-controller-manager.sh
Run linters

Before every push, make sure you run:

make lint
Run tests
make test
Update code generation

The Kubernetes code-generator tool does not work outside of GOPATH (upstream issue), so the script below will automatically run the code generation in a Docker container.

hack/update-codegen.sh

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.

Directories

Path Synopsis
cmd
codegen
pkg
applications
Package applications contains logic to download the source of an application (e.g.
Package applications contains logic to download the source of an application (e.g.
applications/helmclient
Package helmclient contains tools to interact with Helm API for downloading, installing, upgrading, and uninstalling Helm Chart.
Package helmclient contains tools to interact with Helm API for downloading, installing, upgrading, and uninstalling Helm Chart.
applications/providers
Package providers provide the different implementations to download the application's source and install / uninstall the application into the user-cluster.
Package providers provide the different implementations to download the application's source and install / uninstall the application into the user-cluster.
applications/test
Package test contains helper functions for tests related to helm.
Package test contains helper functions for tests related to helm.
cni
Package cni contains supported CNI version definitions and helpers for managing CNIs in KKP.
Package cni contains supported CNI version definitions and helpers for managing CNIs in KKP.
cni/cilium
Package cilium contains Cilium CNI related helpers for managing CNI using Applications infra.
Package cilium contains Cilium CNI related helpers for managing CNI using Applications infra.
controller
Package controller contains all our controllers.
Package controller contains all our controllers.
controller/kubeletdnat-controller
Package kubeletdnatcontroller contains the kubeletdnat controller which:
Package kubeletdnatcontroller contains the kubeletdnat controller which:
controller/operator
Package operator contains all controllers that run within the kubermatic operator binary.
Package operator contains all controllers that run within the kubermatic operator binary.
controller/operator/seed/resources/nodeportproxy
Package nodeportproxy is responsible for reconciling a seed-cluster-wide proxy based on Envoy and a custom envoy-manager/lb-updater tools.
Package nodeportproxy is responsible for reconciling a seed-cluster-wide proxy based on Envoy and a custom envoy-manager/lb-updater tools.
controller/seed-controller-manager
Package seedcontrollermanager contains a package for each controller that runs within the seed controller manager binary.
Package seedcontrollermanager contains a package for each controller that runs within the seed controller manager binary.
controller/seed-controller-manager/addon-controller
Package addoncontroller contains a controller that applies addons based on a Addon CRD.
Package addoncontroller contains a controller that applies addons based on a Addon CRD.
controller/seed-controller-manager/addon-installer-controller
Package addon-installer-controller contains a controller that is responsible for making sure a set of addons that are configured via a flag on the controller-manager and are required for basic cluster functionality exist for all clusters.
Package addon-installer-controller contains a controller that is responsible for making sure a set of addons that are configured via a flag on the controller-manager and are required for basic cluster functionality exist for all clusters.
controller/seed-controller-manager/application-secret-cluster-controller
Package applicationsecretclustercontroller contains a controller that ensure ApplicationSecrets are synced from kubermatic namespace to the user cluster namespaces.
Package applicationsecretclustercontroller contains a controller that ensure ApplicationSecrets are synced from kubermatic namespace to the user cluster namespaces.
controller/seed-controller-manager/auto-update-controller
Package autoupdatecontroller contains a controller that auto applies updates to the cluster version and potentially to the MachineDeployments inside the usercluster.
Package autoupdatecontroller contains a controller that auto applies updates to the cluster version and potentially to the MachineDeployments inside the usercluster.
controller/seed-controller-manager/cloud-controller
Package cloud contains a controller that is responsible for creating cluster-level resources at the cloud provider, like networks, subnets or security groups.
Package cloud contains a controller that is responsible for creating cluster-level resources at the cloud provider, like networks, subnets or security groups.
controller/seed-controller-manager/cluster-credentials-controller
Package clustercredentialscontroller contains a controller that watches Cluster objects and is responsible for moving inline credentials (from the CloudSpec) into dedicated Kubernetes Secrets.
Package clustercredentialscontroller contains a controller that watches Cluster objects and is responsible for moving inline credentials (from the CloudSpec) into dedicated Kubernetes Secrets.
controller/seed-controller-manager/cluster-phase-controller
Package clusterphasecontroller contains a controller that updates the Phase on a Cluster object, based on the ClusterStatus.
Package clusterphasecontroller contains a controller that updates the Phase on a Cluster object, based on the ClusterStatus.
controller/seed-controller-manager/cluster-stuck-controller
Package clusterstuckcontroller contains a controller that is only useful during development.
Package clusterstuckcontroller contains a controller that is only useful during development.
controller/seed-controller-manager/cluster-template-controller
Package clustertemplatecontroller contains a controller that is responsible for managing cluster template instances.
Package clustertemplatecontroller contains a controller that is responsible for managing cluster template instances.
controller/seed-controller-manager/cluster-update-controller
Package clusterupdatecontroller contains a controller that coordinates the upgrade of clusters.
Package clusterupdatecontroller contains a controller that coordinates the upgrade of clusters.
controller/seed-controller-manager/cluster-usersshkeys-controller
The clusterusersshkeyscontroller controller is responsible for synchronizing usersshkeys into a secret in the cluster namespace.
The clusterusersshkeyscontroller controller is responsible for synchronizing usersshkeys into a secret in the cluster namespace.
controller/seed-controller-manager/cni-application-installation-controller
Package cniapplicationinstallationcontroller contains a controller that watches Cluster resources, and if the CNI for the Cluster is manged by the Applications infra, reconciles ApplicationInstallation Resources in the user cluster with necessary CNI configuration in ApplicationInstallation's Values.
Package cniapplicationinstallationcontroller contains a controller that watches Cluster resources, and if the CNI for the Cluster is manged by the Applications infra, reconciles ApplicationInstallation Resources in the user cluster with necessary CNI configuration in ApplicationInstallation's Values.
controller/seed-controller-manager/control-plane-controller
Package controlplanecontroller contains a controller that reconciles all controlplane components in the seed needed for Kubernetes clusters.
Package controlplanecontroller contains a controller that reconciles all controlplane components in the seed needed for Kubernetes clusters.
controller/seed-controller-manager/control-plane-status-controller
Package controlplanestatuscontroller contains a controller that is responsible for:
Package controlplanestatuscontroller contains a controller that is responsible for:
controller/seed-controller-manager/datacenter-status-controller
Package datacenterstatuscontroller contains a controller that is responsible for managing the basic parts of the SeedStatus:
Package datacenterstatuscontroller contains a controller that is responsible for managing the basic parts of the SeedStatus:
controller/seed-controller-manager/initial-application-installation-controller
Package initialapplicationinstallationcontroller contains a controller that watches Cluster resources that have the InitialApplicationInstallations annotation.
Package initialapplicationinstallationcontroller contains a controller that watches Cluster resources that have the InitialApplicationInstallations annotation.
controller/seed-controller-manager/initial-machinedeployment-controller
Package initialmachinedeploymentcontroller contains a controller that watches Cluster resources and will transform the InitialMachineDeployment annotation into an actual MachineDeployment once the cluster has become ready.
Package initialmachinedeploymentcontroller contains a controller that watches Cluster resources and will transform the InitialMachineDeployment annotation into an actual MachineDeployment once the cluster has become ready.
controller/seed-controller-manager/ipam-controller
Package ipam contains a controller that is responsible for managing IPAM (Multi-Cluster IP Address Management) pools.
Package ipam contains a controller that is responsible for managing IPAM (Multi-Cluster IP Address Management) pools.
controller/seed-controller-manager/kc-status-controller
Package kcstatuscontroller contains a controller that is responsible for managing the basic parts of the KubermaticConfigurationStatus:
Package kcstatuscontroller contains a controller that is responsible for managing the basic parts of the KubermaticConfigurationStatus:
controller/seed-controller-manager/mla-controller
Package mlacontroller contains controllers that are responsible for configuring MLA (Monitoring, Logging, and Alerting) for user clusters.
Package mlacontroller contains controllers that are responsible for configuring MLA (Monitoring, Logging, and Alerting) for user clusters.
controller/seed-controller-manager/monitoring-controller
package monitoringcontroller contains a controller that reconciles all monitoring-related components for all cluster types in the seed.
package monitoringcontroller contains a controller that reconciles all monitoring-related components for all cluster types in the seed.
controller/seed-controller-manager/operating-system-profile-synchronizer
Package operatingsystemprofilesynchronizer contains a controller that is responsible for ensuring that OperatingSystemProfiles are synced from the seed namespace to the user cluster namespace.
Package operatingsystemprofilesynchronizer contains a controller that is responsible for ensuring that OperatingSystemProfiles are synced from the seed namespace to the user cluster namespace.
controller/seed-controller-manager/preset-controller
Package presetcontroller contains a controller that is responsible for managing presets.
Package presetcontroller contains a controller that is responsible for managing presets.
controller/seed-controller-manager/pvwatcher-controller
Package pvwatchercontroller contains a controller that is responsible for monitoring and recovering users' clusters etcd plane PVs.
Package pvwatchercontroller contains a controller that is responsible for monitoring and recovering users' clusters etcd plane PVs.
controller/user-cluster-controller-manager
Package userclustercontrollermanager contains all controllers running in the usercluster controller manager binary.
Package userclustercontrollermanager contains all controllers running in the usercluster controller manager binary.
controller/user-cluster-controller-manager/application-installation-controller
Package applicationinstallationcontroller contains a controller that is responsible for reconciling ApplicationInstallation (ie install, update or uninstall applications into the user-cluster)
Package applicationinstallationcontroller contains a controller that is responsible for reconciling ApplicationInstallation (ie install, update or uninstall applications into the user-cluster)
controller/user-cluster-controller-manager/ccm-csi-migrator
Package ccmcsimigrator contains a controller that is responsible to ensure the cluster status related to CCM/CSI machine migration.
Package ccmcsimigrator contains a controller that is responsible to ensure the cluster status related to CCM/CSI machine migration.
controller/user-cluster-controller-manager/cluster-role-labeler
Package clusterrolelabeler contains a controller that is responsible for ensuring that the viewer, editor and admin clusterroles have a `component: userClusterRole` label associated.
Package clusterrolelabeler contains a controller that is responsible for ensuring that the viewer, editor and admin clusterroles have a `component: userClusterRole` label associated.
controller/user-cluster-controller-manager/flatcar
Package flatcar linux contains the flatcar linux controller that is responsible for deploying the [Flatcar Linux Update Operator](https://github.com/kinvolk/flatcar-linux-update-operator) operator and DaemonSet
Package flatcar linux contains the flatcar linux controller that is responsible for deploying the [Flatcar Linux Update Operator](https://github.com/kinvolk/flatcar-linux-update-operator) operator and DaemonSet
controller/user-cluster-controller-manager/ipam
Package ipam contains a controller responsible for assigning IP addresses from a configured pool to machines that have an annotation keyed `machine-controller.kubermatic.io/initializers` which contains the value ipam.
Package ipam contains a controller responsible for assigning IP addresses from a configured pool to machines that have an annotation keyed `machine-controller.kubermatic.io/initializers` which contains the value ipam.
controller/user-cluster-controller-manager/kubevirt-vmi-eviction
Package kubevirtvmieviction contains a controller that is responsible for handling bare-metal nodes draining: - watches in the KubeVirt infra cluster the VMI status.evacuationNodeName.
Package kubevirtvmieviction contains a controller that is responsible for handling bare-metal nodes draining: - watches in the KubeVirt infra cluster the VMI status.evacuationNodeName.
controller/user-cluster-controller-manager/node-labeler
Package nodelabeler contains a controller that ensures Nodes have various labels present at all times:
Package nodelabeler contains a controller that ensures Nodes have various labels present at all times:
controller/user-cluster-controller-manager/node-version-controller
Package nodeversioncontroller contains a controller that watches Nodes and updates the Cluster's status with the oldestNodeVersion.
Package nodeversioncontroller contains a controller that watches Nodes and updates the Cluster's status with the oldestNodeVersion.
controller/user-cluster-controller-manager/owner-binding-creator
The ownerbindingcreator controller is responsible for making sure that the binding exists and if it doesn't, will create it and use the cluster owner as subject.
The ownerbindingcreator controller is responsible for making sure that the binding exists and if it doesn't, will create it and use the cluster owner as subject.
controller/user-cluster-controller-manager/resources
Package resources contains the resources controller responsible for making sure the various Kubernetes resources we need in the usercluster like RBAC, Deployments, ServiceAccounts and much more are present.
Package resources contains the resources controller responsible for making sure the various Kubernetes resources we need in the usercluster like RBAC, Deployments, ServiceAccounts and much more are present.
controller/user-cluster-controller-manager/role-cloner-controller
Package roleclonercontroller contains a controller that duplicates all roles with the `component=userClusterRole` label that are in the kube-system namespace into all other namespaces.
Package roleclonercontroller contains a controller that duplicates all roles with the `component=userClusterRole` label that are in the kube-system namespace into all other namespaces.
controller/util
Package util contains helpers for building controllers.
Package util contains helpers for building controllers.
crd
log
provider
Package provider contains abstract cloud provider types and interfaces.
Package provider contains abstract cloud provider types and interfaces.
provider/cloud/aws
Package aws contains the Amazon Web Services (AWS) cloud provider implementation.
Package aws contains the Amazon Web Services (AWS) cloud provider implementation.
provider/cloud/aws/data
Package data is separate from the regular AWS provider package because it initializes a large chunk of data that might not be relevant to everyone using the AWS provider code.
Package data is separate from the regular AWS provider package because it initializes a large chunk of data that might not be relevant to everyone using the AWS provider code.
resources/certificates/triple
Package triple generates key-certificate pairs for the triple (CA, Server, Client).
Package triple generates key-certificate pairs for the triple (CA, Server, Client).
resources/registry
Package registry groups all container registry related types and helpers in one place.
Package registry groups all container registry related types and helpers in one place.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL