Documentation ¶
Index ¶
- Constants
- Variables
- func GenConfigMap(listArray []*ZkConfigMap, namespace string, labels map[string]string) []*corev1.ConfigMap
- func GenZkAgentConfig() string
- func GenZkConfig() string
- func PodName(ssetName string, ordinal int32) string
- func RenderPrepareFsScript() (string, error)
- func RenderScriptTemplate(params TemplateParams) (string, error)
- type CM
- type LinkedFile
- type LinkedFilesArray
- type SharedVolume
- type SharedVolumeArray
- type TemplateParams
- type ZkConfigMap
Constants ¶
View Source
const ( ConfigFileName = "zoo.cfg" ConfigVolumeName = "zookeeper-internal-config" ConfigVolumeMountPath = "/mnt/zookeeper/zookeeper-config" DynamicConfigFileVolumeName = "zookeeper-internal-dynamic-config" DynamicConfigFileVolumeMountPath = "/mnt/zookeeper/dynamic-config" DynamicConfigFile = "zoo_replicated1.cfg.dynamic" DataVolumeName = "zookeeper-data" DataMountPath = "/data" LogsVolumeName = "zookeeper-logs" LogsMountPath = "/logs" ScriptsVolumeName = "zookeeper-internal-scripts" ScriptsVolumeMountPath = "/mnt/zookeeper/scripts" AgentVolumeName = "zookeeper-agent-config" AgentVolumeMountPath = "/mnt/zookeeper/agent" )
View Source
const (
AgentConfigKey = "config.json"
)
View Source
const (
PrepareFsScriptConfigKey = "prepare-fs.sh"
)
Variables ¶
View Source
var ( ConfigVolume = SharedVolume{ Name: "zookeeper-internal-config-local", InitContainerMountPath: "/mnt/zookeeper/zookeeper-config-local", ContainerMountPath: volume.ConfigVolumeMountPath, } PluginVolumes = SharedVolumeArray{ Array: []SharedVolume{ ConfigVolume, }, } )
Functions ¶
func GenConfigMap ¶
func GenZkAgentConfig ¶
func GenZkAgentConfig() string
func GenZkConfig ¶
func GenZkConfig() string
func RenderPrepareFsScript ¶
func RenderScriptTemplate ¶
func RenderScriptTemplate(params TemplateParams) (string, error)
RenderScriptTemplate renders scriptTemplate using the given TemplateParams
Types ¶
type CM ¶
type CM struct { Workload *cachev1alpha1.Workload Labels map[string]string ExpectSts *appsv1.StatefulSet ActualSts *appsv1.StatefulSet }
func NewCM ¶
func NewCM(workload *cachev1alpha1.Workload, labels map[string]string, expectSTS, actualSTS *appsv1.StatefulSet) *CM
type LinkedFile ¶
LinkedFile describes a symbolic link with source and target.
type LinkedFilesArray ¶
type LinkedFilesArray struct {
Array []LinkedFile
}
LinkedFilesArray contains all files to be linked in the init container.
type SharedVolume ¶
type SharedVolume struct {}
SharedVolume between the init container and the ZK container.
type SharedVolumeArray ¶
type SharedVolumeArray struct {
}SharedVolumes represents a list of SharedVolume
func (SharedVolumeArray) Volumes ¶
func (v SharedVolumeArray) Volumes() []corev1.Volume
type TemplateParams ¶
type TemplateParams struct { // SharedVolumes are directories to persist in shared volumes PluginVolumes SharedVolumeArray // LinkedFiles are files to link individually LinkedFiles LinkedFilesArray // ChownToElasticsearch are paths that need to be chowned to the Elasticsearch user/group. ChownToZookeeper []string }
TemplateParams are the parameters manipulated in the scriptTemplate
type ZkConfigMap ¶
Click to show internal directories.
Click to hide internal directories.