Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the pulsar v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=pulsar.apache.org
Package v1alpha1 contains API Schema definitions for the pulsar v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=pulsar.apache.org
Index ¶
- Constants
- Variables
- func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
- func MakeAllLabels(c *PulsarCluster, component string, childComponent string) map[string]string
- func MakeComponentLabels(c *PulsarCluster, component string) map[string]string
- type AutoRecovery
- type Bookie
- type Broker
- type ContainerImage
- type Grafana
- type Manager
- type Monitor
- type MonitorIngress
- type PodPolicy
- type Prometheus
- type Proxy
- type PulsarCluster
- type PulsarClusterList
- type PulsarClusterSpec
- type PulsarClusterStatus
- type Zookeeper
Constants ¶
const ( // Initing phase PulsarClusterInitingPhase = "Initing" // Launching phase PulsarClusterLaunchingPhase = "Launching" // Running phase PulsarClusterRunningPhase = "Running" )
pulsar cluster phase
const ( // Zookeeper component ZookeeperComponent = "zookeeper" // Broker component BrokerComponent = "broker" // AutoRecovery component AutoRecoveryComponent = "autoRecovery" // Bookie component BookieComponent = "bookie" // Proxy component ProxyComponent = "proxy" // Monitor component MonitorComponent = "monitor" // Manager component ManagerComponent = "manager" )
pulsar cluster components
const ( // Monitor prometheus component MonitorPrometheusComponent = "monitor-prometheus" // Monitor grafana component MonitorGrafanaComponent = "monitor-grafana" )
monitor child component
const ( // DefaultAllPulsarContainerRepository is the default docker repo for components DefaultAllPulsarContainerRepository = "apachepulsar/pulsar-all" // DefaultAllPulsarContainerVersion is the default tag used for components DefaultAllPulsarContainerVersion = "latest" // DefaultPulsarManagerRepository is default docker image name of pulsar manager DefaultPulsarManagerContainerRepository = "apachepulsar/pulsar-manager" // DefaultPulsarManagerContainerVersion is DefaultPulsarManagerContainerVersion = "v0.1.0" // DefaultZkContainerPolicy is the default container pull policy used DefaultContainerPolicy = "Always" )
const ( // App LabelService = "app" // Cluster LabelCluster = "cluster" // Component LabelComponent = "component" // ChildComponent LabelChildComponent = "child-component" )
Labels
const ( // Zookeeper number default num is 3 ZookeeperClusterDefaultNodeNum = 3 // Broker number default num is 3 BrokerClusterDefaultNodeNum = 3 // Bookie number default num is 3 BookieClusterDefaultNodeNum = 3 // Proxy number default num is 3 ProxyClusterDefaultNodeNum = 3 )
default number
const ( // Container client default port ZookeeperContainerClientDefaultPort = 2181 // Container server default port ZookeeperContainerServerDefaultPort = 2888 // Container leader election port ZookeeperContainerLeaderElectionPort = 3888 // Broker server port PulsarBrokerPulsarServerPort = 6650 // Broker http server port PulsarBrokerHttpServerPort = 8080 // Bookie server port PulsarBookieServerPort = 3181 // Grafana server port PulsarGrafanaServerPort = 3000 // Prometheus server port PulsarPrometheusServerPort = 9090 // Manager server port PulsarManagerServerPort = 9527 )
All component ports
const ( // journal storage default capacity JournalStorageDefaultCapacity = 1 // ledgers storage default capacity LedgersStorageDefaultCapacity = 10 )
Storage default capacity
const ( // manager user default name ManagerDefaultUserName = "pulsar" // manager user default password ManagerDefaultUserPassword = "pulsar" )
Manager component default user name and user password
const ( // Prometheus image MonitorPrometheusImage = "prom/prometheus:v1.6.3" // Grafana image MonitorGrafanaImage = "apachepulsar/pulsar-grafana:latest" )
const (
Service = "pulsar"
)
service
const (
// service domain
ServiceDomain = "svc.cluster.local"
)
service
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: "pulsar.apache.org", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} )
Functions ¶
func GetOpenAPIDefinitions ¶
func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
func MakeAllLabels ¶
func MakeAllLabels(c *PulsarCluster, component string, childComponent string) map[string]string
func MakeComponentLabels ¶
func MakeComponentLabels(c *PulsarCluster, component string) map[string]string
Types ¶
type AutoRecovery ¶
type AutoRecovery struct { // Image is the container image. default is apachepulsar/pulsar-all:latest Image ContainerImage `json:"image,omitempty"` // Labels specifies the labels to attach to pods the operator creates for // the bookie cluster. Labels map[string]string `json:"labels,omitempty"` // Size (DEPRECATED) is the expected size of the bookie cluster. Size int32 `json:"size,omitempty"` // Pod defines the policy to create pod for the bookie cluster. // // Updating the pod does not take effect on any existing pods. Pod PodPolicy `json:"pod,omitempty"` }
AutoRecovery defines the desired state of AutoRecovery +k8s:openapi-gen=true
func (*AutoRecovery) SetDefault ¶
func (b *AutoRecovery) SetDefault(cluster *PulsarCluster) bool
type Bookie ¶
type Bookie struct { // Image is the container image. default is apachepulsar/pulsar-all:latest Image ContainerImage `json:"image,omitempty"` // Labels specifies the labels to attach to pods the operator creates for // the bookie cluster. Labels map[string]string `json:"labels,omitempty"` // Size (DEPRECATED) is the expected size of the bookie cluster. Size int32 `json:"size,omitempty"` // Pod defines the policy to create pod for the bookie cluster. // // Updating the pod does not take effect on any existing pods. Pod PodPolicy `json:"pod,omitempty"` // Storage class name // // PVC of storage class name StorageClassName string `json:"storageClassName,omitempty"` // Storage request capacity(Gi unit) for journal JournalStorageCapacity int32 `json:"journalStorageCapacity,omitempty"` // Storage request capacity(Gi unit) for ledgers LedgersStorageCapacity int32 `json:"ledgersStorageCapacity,omitempty"` }
Bookie defines the desired state of Bookie +k8s:openapi-gen=true
func (*Bookie) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Bookie.
func (*Bookie) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Bookie) SetDefault ¶
func (b *Bookie) SetDefault(cluster *PulsarCluster) bool
type Broker ¶
type Broker struct { // Image is the container image. default is apachepulsar/pulsar-all:latest Image ContainerImage `json:"image,omitempty"` // Labels specifies the labels to attach to pods the operator creates for // the broker cluster. Labels map[string]string `json:"labels,omitempty"` // Size (DEPRECATED) is the expected size of the broker cluster. Size int32 `json:"size,omitempty"` // Pod defines the policy to create pod for the broker cluster. // // Updating the pod does not take effect on any existing pods. Pod PodPolicy `json:"pod,omitempty"` }
Broker defines the desired state of Broker +k8s:openapi-gen=true
func (*Broker) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Broker.
func (*Broker) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Broker) SetDefault ¶
func (b *Broker) SetDefault(cluster *PulsarCluster) bool
type ContainerImage ¶
type ContainerImage struct { Repository string `json:"repository,omitempty"` Tag string `json:"tag,omitempty"` PullPolicy corev1.PullPolicy `json:"pullPolicy,omitempty"` }
ContainerImage defines the fields needed for a Docker repository image. The format here matches the predominant format used in Helm charts. +k8s:openapi-gen=true
func (*ContainerImage) DeepCopy ¶
func (in *ContainerImage) DeepCopy() *ContainerImage
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerImage.
func (*ContainerImage) DeepCopyInto ¶
func (in *ContainerImage) DeepCopyInto(out *ContainerImage)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (ContainerImage) GenerateImage ¶
func (c ContainerImage) GenerateImage() string
func (*ContainerImage) SetDefault ¶
func (c *ContainerImage) SetDefault(cluster *PulsarCluster, component string) bool
type Grafana ¶
type Grafana struct { // Host (DEPRECATED) is the expected host of the pulsar grafana. Host string `json:"host,omitempty"` // NodePort (DEPRECATED) is the expected port of the pulsar grafana. NodePort int32 `json:"nodePort,omitempty"` }
Pulsar cluster grafana spec +k8s:openapi-gen=true
func (*Grafana) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Grafana.
func (*Grafana) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Manager ¶
type Manager struct { // Is enable pulsar cluster manager flag. Enable bool `json:"enable,omitempty"` // Image is the container image. default is apachepulsar/pulsar-all:latest Image ContainerImage `json:"image,omitempty"` // Labels specifies the labels to attach to pods the operator creates for // the broker cluster. Labels map[string]string `json:"labels,omitempty"` // User Name UserName string `json:"userName,omitempty"` // User Password UserPassword string `json:"userPassword,omitempty"` // Host (DEPRECATED) is the expected host of the pulsar manager. Host string `json:"host,omitempty"` // Ingress additional annotation Annotations map[string]string `json:"annotations,omitempty"` // NodePort (DEPRECATED) is the expected port of the pulsar manager. NodePort int32 `json:"nodePort,omitempty"` }
Manager defines the desired state of Manager +k8s:openapi-gen=true
func (*Manager) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Manager.
func (*Manager) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Manager) SetDefault ¶
func (m *Manager) SetDefault(cluster *PulsarCluster) bool
type Monitor ¶
type Monitor struct { // Is enable pulsar cluster monitor flag. Enable bool `json:"enable,omitempty"` // Prometheus Prometheus Prometheus `json:"prometheus,omitempty"` // Grafana Grafana Grafana `json:"grafana,omitempty"` // Ingress Ingress MonitorIngress `json:"ingress,omitempty"` }
Monitor defines the desired state of Monitor +k8s:openapi-gen=true
func (*Monitor) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Monitor.
func (*Monitor) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Monitor) SetDefault ¶
func (m *Monitor) SetDefault(cluster *PulsarCluster) bool
type MonitorIngress ¶
type MonitorIngress struct { // enable ingress Enable bool `json:"enable,omitempty"` // Ingress additional annotation Annotations map[string]string `json:"annotations,omitempty"` }
MonitorIngress defines the pulsar cluster exposed +k8s:openapi-gen=true
func (*MonitorIngress) DeepCopy ¶
func (in *MonitorIngress) DeepCopy() *MonitorIngress
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MonitorIngress.
func (*MonitorIngress) DeepCopyInto ¶
func (in *MonitorIngress) DeepCopyInto(out *MonitorIngress)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodPolicy ¶
type PodPolicy struct { // Labels specifies the labels to attach to pods the operator creates for // the pulsar cluster. Labels map[string]string `json:"labels,omitempty"` // NodeSelector specifies a map of key-value pairs. For the pod to be // eligible to run on a node, the node must have each of the indicated // key-value pairs as labels. NodeSelector map[string]string `json:"nodeSelector,omitempty"` // The scheduling constraints on pods. Affinity *corev1.Affinity `json:"affinity,omitempty"` // Resources is the resource requirements for the container. // This field cannot be updated once the cluster is created. Resources corev1.ResourceRequirements `json:"components,omitempty"` // Tolerations specifies the pod's tolerations. Tolerations []corev1.Toleration `json:"tolerations,omitempty"` // List of environment variables to set in the container. // This field cannot be updated. Env []corev1.EnvVar `json:"env,omitempty"` // Annotations specifies the annotations to attach to pods the operator // creates. Annotations map[string]string `json:"annotations,omitempty"` // SecurityContext specifies the security context for the entire pod // More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context SecurityContext *corev1.PodSecurityContext `json:"securityContext,omitempty"` // TerminationGracePeriodSeconds is the amount of time that kubernetes will // give for a pod instance to shutdown normally. // The default value is 1800. TerminationGracePeriodSeconds int64 `json:"terminationGracePeriodSeconds,omitempty"` }
PodPolicy defines the common pod configuration for Pods, including when used in deployments, stateful-sets, etc. +k8s:openapi-gen=true
func (*PodPolicy) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodPolicy.
func (*PodPolicy) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PodPolicy) SetDefault ¶
func (p *PodPolicy) SetDefault(cluster *PulsarCluster, component string) bool
type Prometheus ¶
type Prometheus struct { // Host (DEPRECATED) is the expected host of the pulsar prometheus. Host string `json:"host,omitempty"` // NodePort (DEPRECATED) is the expected port of the pulsar prometheus. NodePort int32 `json:"nodePort,omitempty"` }
Pulsar cluster prometheus spec +k8s:openapi-gen=true
func (*Prometheus) DeepCopy ¶
func (in *Prometheus) DeepCopy() *Prometheus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Prometheus.
func (*Prometheus) DeepCopyInto ¶
func (in *Prometheus) DeepCopyInto(out *Prometheus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Proxy ¶
type Proxy struct { // Image is the container image. default is apachepulsar/pulsar:latest Image ContainerImage `json:"image,omitempty"` // Labels specifies the labels to attach to pods the operator creates for // the proxy cluster. Labels map[string]string `json:"labels,omitempty"` // Size (DEPRECATED) is the expected size of the proxy cluster. Size int32 `json:"size,omitempty"` // Pod defines the policy to create pod for the proxy cluster. // // Updating the pod does not take effect on any existing pods. Pod PodPolicy `json:"pod,omitempty"` }
Proxy defines the desired state of Proxy +k8s:openapi-gen=true
func (*Proxy) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Proxy.
func (*Proxy) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Proxy) SetDefault ¶
func (b *Proxy) SetDefault(cluster *PulsarCluster) bool
type PulsarCluster ¶
type PulsarCluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec PulsarClusterSpec `json:"spec,omitempty"` Status PulsarClusterStatus `json:"status,omitempty"` }
PulsarCluster is the Schema for the pulsarclusters API +k8s:openapi-gen=true +kubebuilder:subresource:status
func (*PulsarCluster) DeepCopy ¶
func (in *PulsarCluster) DeepCopy() *PulsarCluster
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PulsarCluster.
func (*PulsarCluster) DeepCopyInto ¶
func (in *PulsarCluster) DeepCopyInto(out *PulsarCluster)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PulsarCluster) DeepCopyObject ¶
func (in *PulsarCluster) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*PulsarCluster) SpecSetDefault ¶
func (c *PulsarCluster) SpecSetDefault() bool
func (*PulsarCluster) StatusSetDefault ¶
func (c *PulsarCluster) StatusSetDefault() bool
type PulsarClusterList ¶
type PulsarClusterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []PulsarCluster `json:"items"` }
PulsarClusterList contains a list of PulsarCluster
func (*PulsarClusterList) DeepCopy ¶
func (in *PulsarClusterList) DeepCopy() *PulsarClusterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PulsarClusterList.
func (*PulsarClusterList) DeepCopyInto ¶
func (in *PulsarClusterList) DeepCopyInto(out *PulsarClusterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PulsarClusterList) DeepCopyObject ¶
func (in *PulsarClusterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PulsarClusterSpec ¶
type PulsarClusterSpec struct { // Zookeeper defines the desired state of Zookeeper Zookeeper Zookeeper `json:"zookeeper,omitempty"` // Bookie defines the desired state of Bookie Bookie Bookie `json:"bookie,omitempty"` // AutoRecovery defines the desired state of AutoRecovery AutoRecovery AutoRecovery `json:"autoRecovery,omitempty"` // Broker defines the desired state of Broker Broker Broker `json:"broker,omitempty"` // Proxy defines the desired state of Proxy Proxy Proxy `json:"proxy,omitempty"` // Monitor defines the desired state of Monitor Monitor Monitor `json:"monitor,omitempty"` // Manager defines the desired state of Manager Manager Manager `json:"manager,omitempty"` }
PulsarClusterSpec defines the desired state of PulsarCluster +k8s:openapi-gen=true
func (*PulsarClusterSpec) DeepCopy ¶
func (in *PulsarClusterSpec) DeepCopy() *PulsarClusterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PulsarClusterSpec.
func (*PulsarClusterSpec) DeepCopyInto ¶
func (in *PulsarClusterSpec) DeepCopyInto(out *PulsarClusterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PulsarClusterSpec) SetDefault ¶
func (s *PulsarClusterSpec) SetDefault(cluster *PulsarCluster) bool
type PulsarClusterStatus ¶
type PulsarClusterStatus struct { // Pulsar cluster phase Phase string `json:"phase,omitempty"` }
PulsarClusterStatus defines the observed state of PulsarCluster +k8s:openapi-gen=true
func (*PulsarClusterStatus) DeepCopy ¶
func (in *PulsarClusterStatus) DeepCopy() *PulsarClusterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PulsarClusterStatus.
func (*PulsarClusterStatus) DeepCopyInto ¶
func (in *PulsarClusterStatus) DeepCopyInto(out *PulsarClusterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PulsarClusterStatus) SetDefault ¶
func (s *PulsarClusterStatus) SetDefault(cluster *PulsarCluster) bool
type Zookeeper ¶
type Zookeeper struct { // Image is the container image. default is apachepulsar/pulsar-all:latest Image ContainerImage `json:"image,omitempty"` // Labels specifies the labels to attach to pods the operator creates for // the zookeeper cluster. Labels map[string]string `json:"labels,omitempty"` // Size (DEPRECATED) is the expected size of the zookeeper cluster. Size int32 `json:"size,omitempty"` // Pod defines the policy to create pod for the zookeeper cluster. // // Updating the pod does not take effect on any existing pods. Pod PodPolicy `json:"pod,omitempty"` }
Zookeeper defines the desired state of Zookeeper +k8s:openapi-gen=true
func (*Zookeeper) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Zookeeper.
func (*Zookeeper) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Zookeeper) SetDefault ¶
func (s *Zookeeper) SetDefault(cluster *PulsarCluster) bool
Source Files ¶
- constant.go
- doc.go
- image_types.go
- pod_types.go
- pulsarcluster_autorecovery.go
- pulsarcluster_bookie.go
- pulsarcluster_broker.go
- pulsarcluster_manager.go
- pulsarcluster_monitor.go
- pulsarcluster_proxy.go
- pulsarcluster_types.go
- pulsarcluster_zookeeper.go
- register.go
- zz_generated.deepcopy.go
- zz_generated.openapi.go