configmap

package
v0.0.0-...-f5de34e Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ConfigDataKeyForLogback refers to the configuration file name of logback
	ConfigDataKeyForLogback = "logback.xml"
	// ConfigDataKeyForServer refers to the configuration file name of server
	ConfigDataKeyForServer = "server.yaml"
	// ConfigDataKeyForAgent refers to the configuration file name of agent
	ConfigDataKeyForAgent = "agent.yaml"

	// AnnoClusterRepoConfig refers to the content of logback.xml
	AnnoLogbackConfig = "computenode.shardingsphere.org/logback"

	// DefaultLogback contains the default logback config
	DefaultLogback = `` /* 1076-byte string literal not displayed */

	// DefaultServerConfig contains the default server config
	DefaultServerConfig = "# Empty file is needed"
)
View Source
const (
	// DefaultConfigMapName is the data key name
	DefaultConfigMapName = "ssChaos-configmap"
)

Variables

This section is empty.

Functions

func DefaultConfigMap

func DefaultConfigMap(meta metav1.Object, gvk schema.GroupVersionKind) *corev1.ConfigMap

DefaultConfigMap returns a ConfigMap filling with default expected values

func NewConfigMap

func NewConfigMap(obj runtime.Object) *corev1.ConfigMap

NewConfigMap returns a new ConfigMap

func UpdateComputeNodeConfigMap

func UpdateComputeNodeConfigMap(cn *v1alpha1.ComputeNode, cur *corev1.ConfigMap) *corev1.ConfigMap

UpdateConfigMap returns a new ConfigMap

func UpdateShardingSphereChaosConfigMap

func UpdateShardingSphereChaosConfigMap(ssChaos *v1alpha1.Chaos, cur *corev1.ConfigMap) *corev1.ConfigMap

UpdateConfigMap returns a new ConfigMap

Types

type Builder

type Builder interface {
	Build(context.Context, runtime.Object) *corev1.ConfigMap
}

Builder build ConfigMap from given ComputeNode

type ConfigMap

type ConfigMap interface {
	Builder
	Getter
	Setter
}

ConfigMap interface contains setter and getter

func NewConfigMapClient

func NewConfigMapClient(c client.Client) ConfigMap

NewConfigMapClient returns a new ConfigMap client

type ConfigMapBuilder

type ConfigMapBuilder interface {
	SetName(name string) ConfigMapBuilder
	SetNamespace(namespace string) ConfigMapBuilder
	SetLabels(labels map[string]string) ConfigMapBuilder
	SetAnnotations(annos map[string]string) ConfigMapBuilder
	SetBinaryData(binaryData map[string][]byte) ConfigMapBuilder
	SetData(data map[string]string) ConfigMapBuilder
	Build() *v1.ConfigMap
}

ConfigMapBuilder generic configmap interface

func NewConfigMapBuilder

func NewConfigMapBuilder(configmap *v1.ConfigMap) ConfigMapBuilder

NewConfigMapBuilder Create a new common configmap builder

type ConfigMapFactory

type ConfigMapFactory interface {
	NewConfigMapBuilder(metav1.Object, schema.GroupVersionKind) ConfigMapBuilder
}

ConfigMapFactory generic configmap factory interface

func NewConfigMapFactory

func NewConfigMapFactory(obj runtime.Object) ConfigMapFactory

NewConfigMapFactory Create a new common configmap factory

type Getter

type Getter interface {
	GetByNamespacedName(context.Context, types.NamespacedName) (*corev1.ConfigMap, error)
}

Getter get ConfigMap from different parameters

type Setter

type Setter interface {
	Create(context.Context, *corev1.ConfigMap) error
	Update(context.Context, *corev1.ConfigMap) error
}

Setter set ConfigMap from different parameters

Jump to

Keyboard shortcuts

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