logset

package
v0.0.0-...-d35dad9 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2026 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Overview

Copyright 2025 Matrix Origin

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	PodNameEnvKey     = "POD_NAME"
	HeadlessSvcEnvKey = "HEADLESS_SERVICE_NAME"
	NamespaceEnvKey   = "NAMESPACE"
	PodIPEnvKey       = "POD_IP"
)

Variables

This section is empty.

Functions

func HaKeeperSvcAddrs

func HaKeeperSvcAddrs(ls *v1alpha1.LogSet, reservedOrdinals []int) []string

HaKeeperSvcAddrs returns the HAKeeper service addresses for the currently running LogStore pods, correctly skipping ordinal holes specified by reservedOrdinals (mirrors StatefulSet.spec.reserveOrdinals set during failover). Use this instead of HaKeeperAdds when the caller can supply the reserved-ordinal list from the underlying kruise StatefulSet (sts.Spec.ReserveOrdinals).

func LogSetStsName

func LogSetStsName(ls *v1alpha1.LogSet) string

LogSetStsName returns the name of the kruise StatefulSet managed for the given LogSet. Exported so that other controllers (e.g. dnset, cnset) can look up the STS to read ReserveOrdinals without requiring a CRD change.

Types

type Actor

type Actor struct {
	FailoverEnabled bool
}

func (*Actor) Create

func (r *Actor) Create(ctx *recon.Context[*v1alpha1.LogSet]) error

func (*Actor) Finalize

func (r *Actor) Finalize(ctx *recon.Context[*v1alpha1.LogSet]) (bool, error)

func (*Actor) Observe

func (r *Actor) Observe(ctx *recon.Context[*v1alpha1.LogSet]) (recon.Action[*v1alpha1.LogSet], error)

func (*Actor) Reconcile

func (r *Actor) Reconcile(mgr manager.Manager) error

type WithResources

type WithResources struct {
	*Actor
	// contains filtered or unexported fields
}

func (*WithResources) Repair

func (r *WithResources) Repair(ctx *recon.Context[*v1alpha1.LogSet]) error

Repair repairs failed log set pods to match the desired state

func (*WithResources) Scale

func (r *WithResources) Scale(ctx *recon.Context[*v1alpha1.LogSet]) error

Scale scale-out/in the log set pods to match the desired state TODO(aylei): special treatment for scale-in

func (*WithResources) Update

func (r *WithResources) Update(ctx *recon.Context[*v1alpha1.LogSet]) error

Update rolling-update the log set pods to match the desired state TODO(aylei): should logset controller take care of graceful rolling?

Jump to

Keyboard shortcuts

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