agent

command module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: MIT Imports: 1 Imported by: 0

README

mariadb

CI Release Go Report Card Go Reference

🤖 agent

Sidecar agent for MariaDB that co-operates with mariadb-operator. Remotely manage Galera via HTTP instead of configuration *.cnf files.

  • HTTP API to manage Galera and expose the MariaDB state to mariadb-operator
  • Query and update Galera state without mounting /var/lib/mysql/grastate.dat
  • Perform Galera cluster recovery remotely
  • Bootstrap new Galera cluster as a result of the cluster recovery
  • Idiomatic Go HTTP client pkg/client
  • TODO: Authentication using Kubernetes service accounts via TokenReview API
How to use it

Specify the agent image in the MariaDB spec.galera.agent field.

apiVersion: mariadb.mmontes.io/v1alpha1
kind: MariaDB
metadata:
  name: mariadb-galera
spec:
  ...
  image:
    repository: mariadb
    tag: "10.11.3"
    pullPolicy: IfNotPresent
  port: 3306
  replicas: 3

  galera:
    sst: mariabackup
    replicaThreads: 1

    agent:
      image:
        repository: ghcr.io/mariadb-operator/agent
        tag: "v0.0.1"
        pullPolicy: IfNotPresent
      port: 5555
      gracefulShutdownTimeout: 5s
    
    recovery:
      clusterHealthyTimeout: 3m
      clusterBootstrapTimeout: 5m
      podRecoveryTimeout: 3m
      podSyncTimeout: 3m
  ...
HTTP API

You can consume the agent API using the pkg/client. Alternatively, take a look at our Postman collection.

Run in Postman

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
pkg

Jump to

Keyboard shortcuts

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