rqcluster

package
v0.0.0-...-9e132e3 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2020 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigMapName = "rq-config"
View Source
const PodTemplateFile = "pod-template.json"
View Source
const ServiceAccountName = "default"

Variables

This section is empty.

Functions

func Add

func Add(mgr manager.Manager) error

Add creates a new Rqcluster Controller and adds it to the Manager. The Manager will set fields on the Controller and Start it when the Manager is Started.

Types

type AutoGenerated

type AutoGenerated struct {
	Build struct {
		Branch    string `json:"branch"`
		BuildTime string `json:"build_time"`
		Commit    string `json:"commit"`
		Version   string `json:"version"`
	} `json:"build"`
	HTTP struct {
		Addr     string `json:"addr"`
		Auth     string `json:"auth"`
		Redirect string `json:"redirect"`
	} `json:"http"`
	Mux struct {
		Addr      string `json:"addr"`
		Encrypted string `json:"encrypted"`
		Timeout   string `json:"timeout"`
	} `json:"mux"`
	Node struct {
		StartTime time.Time `json:"start_time"`
		Uptime    string    `json:"uptime"`
	} `json:"node"`
	Runtime struct {
		GOARCH       string `json:"GOARCH"`
		GOMAXPROCS   int    `json:"GOMAXPROCS"`
		GOOS         string `json:"GOOS"`
		NumCPU       int    `json:"numCPU"`
		NumGoroutine int    `json:"numGoroutine"`
		Version      string `json:"version"`
	} `json:"runtime"`
	Store struct {
		Addr         string `json:"addr"`
		ApplyTimeout string `json:"apply_timeout"`
		DbConf       struct {
			DSN    string `json:"DSN"`
			Memory bool   `json:"Memory"`
		} `json:"db_conf"`
		Dir              string `json:"dir"`
		ElectionTimeout  string `json:"election_timeout"`
		HeartbeatTimeout string `json:"heartbeat_timeout"`
		Leader           string `json:"leader"`
		Meta             struct {
			APIPeers struct {
				One032144002 string `json:"10.32.1.4:4002"`
				One032154002 string `json:"10.32.1.5:4002"`
				One032184002 string `json:"10.32.1.8:4002"`
			} `json:"APIPeers"`
		} `json:"meta"`
		OpenTimeout string   `json:"open_timeout"`
		Peers       []string `json:"peers"`
		Raft        struct {
			AppliedIndex      string `json:"applied_index"`
			CommitIndex       string `json:"commit_index"`
			FsmPending        string `json:"fsm_pending"`
			LastContact       string `json:"last_contact"`
			LastLogIndex      string `json:"last_log_index"`
			LastLogTerm       string `json:"last_log_term"`
			LastSnapshotIndex string `json:"last_snapshot_index"`
			LastSnapshotTerm  string `json:"last_snapshot_term"`
			NumPeers          string `json:"num_peers"`
			State             string `json:"state"`
			Term              string `json:"term"`
		} `json:"raft"`
		SnapshotThreshold int `json:"snapshot_threshold"`
		Sqlite3           struct {
			DNS           string `json:"dns"`
			FkConstraints string `json:"fk_constraints"`
			Path          string `json:"path"`
			Version       string `json:"version"`
		} `json:"sqlite3"`
	} `json:"store"`
}

AutoGenerated was generated from the json response of the status API call that rqlite publishes

type ConfigMapTemplates

type ConfigMapTemplates struct {
	PodTemplate *template.Template
}

type PVCFields

type PVCFields struct {
	Namespace        string
	ClaimName        string
	AccessMode       string
	StorageCapacity  string
	StorageClassName string
}

PVC template fields

type PodFields

type PodFields struct {
	Namespace      string
	PodName        string
	ServiceAccount string
	ClusterName    string
	JoinAddress    string
}

rqlite pod template fields

type ReconcileRqcluster

type ReconcileRqcluster struct {
	// contains filtered or unexported fields
}

ReconcileRqcluster reconciles a Rqcluster object

func (*ReconcileRqcluster) Reconcile

func (r *ReconcileRqcluster) Reconcile(request reconcile.Request) (reconcile.Result, error)

Reconcile reads that state of the cluster for a Rqcluster object and makes changes based on the state read and what is in the Rqcluster.Spec a Pod as an example Note: The Controller will requeue the Request to be processed again if the returned error is non-nil or Result.Requeue is true, otherwise upon completion it will remove the work from the queue.

type ServiceFields

type ServiceFields struct {
	Namespace    string
	ServiceName  string
	ClusterName  string
	LeaderStatus string
	PodNameMatch string
}

rqlite service template fields

Jump to

Keyboard shortcuts

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