cmapisrv-mock

command module
v0.0.0-...-83003d0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

README

Cilium Cluster Mesh API Server Mock (cmapisrv-mock)

A component which mocks the behavior of the Cilium Cluster Mesh API Server. It supports mocking a user-configurable number of clusters, each composed of a given number of nodes, endpoints, identities and services, initialized at start-up time. Subsequently, at run-time, it additionally generates insertion, update (where appropriate) and deletion churn, depending on the configured QPS values.

How to deploy cmapisrv-mock

cmapisrv-mock can be deployed leveraging the provided helm chart, which exposes the main configuration options through the values file:

helm upgrade --install cmapisrv-mock -n kube-system ./deploy/cmapisrv-mock \
    --set image.repository=...

The helm chart assumes that Cilium has already been deployed in the same cluster, and that it exists a Secret named cilium-ca containing the Cilium's CA ( automatically created by Cilium when either the clustermesh-apiserver or Hubble Relay are enabled).

How to configure Cilium to connect to cmapisrv-mock

Cilium agents can be configured to connect to the clusters mocked by cmapisrv-mock through a configuration resembling the following (unrelated settings are omitted for the sake of brevity):

cluster:
  name: real-cluster
  id: 255

clustermesh:
  # We enable the real clustermesh-apiserver to force the creation of the TLS certificates.
  useAPIServer: true

  config:
    enabled: true
    domain: mesh.cilium.io
    clusters:
    - name: cluster-001
      address: cmapisrv-mock.kube-system.svc
      port: 2379
    - name: cluster-002
      address: cmapisrv-mock.kube-system.svc
      port: 2379
    ... # Depending on the number of mocked clusters

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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