huanwei / rocketmq-operator Goto Github PK
View Code? Open in Web Editor NEWCreate, operate and scale self-healing RocketMQ clusters on Kubernetes.
License: Apache License 2.0
Create, operate and scale self-healing RocketMQ clusters on Kubernetes.
License: Apache License 2.0
What would you like to be added:
The isolation of data and logs for different Broker pods.
Why is this needed:
So that we can run RocketMQ cluster on a single node.
/kind feature
pod启动的时候,创建broker.conf报 Permisson denied,请问要如何处理?
What happened:
What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:
kubectl version
):uname -a
):/kind bug
What would you like to be added:
Why is this needed:
阿里云动态申请pv 时生成的云盘最小为20g, 默认申请的是5g,申请失败
/kind feature
新加的broker 配置参数里的rocketmq的id或者name都是自动生成的吗
看到一些简单的配置可以通过types.go里面的变量传入。
那更具体的配置如何传入呢?
比如
#在发送消息时,自动创建服务器不存在的topic,默认创建的队列数
defaultTopicQueueNums=4
#是否允许 Broker 自动创建Topic
autoCreateTopicEnable=true
clusterTopicEnable=true
brokerTopicEnable=true
#是否允许 Broker 自动创建订阅组
autoCreateSubscriptionGroup=true
/triage support
/pkg/resources/statefulsets/statefulset.go:
加载pvc存储配置的时候,logSize和storeSize的判断貌似有误:
logSize := cluster.Spec.ContainerSpec.Requests.LogStorage
if logSize == "" {
logQuantity, err = resource.ParseQuantity(logSize)
if err != nil {
glog.Errorf("failed to parse log size %s to quantity: %v", logSize, err)
return nil
}
}
应该是logSize != ""吧?
另外,存储能否做成支持emptyDir的形式?
请问:tutorial.md里这句话“Create a deployment for namesrv, and expose namesrv service with NodePort.”的意思是需要在deploy/00-namesrv.yaml里加上service的定义吗?
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: rocketmq-namesrv
namespace: rocketmq-operator
labels:
app: rocketmq-namesrv
spec:
replicas: 2
selector:
matchLabels:
app: rocketmq-namesrv
template:
metadata:
labels:
app: rocketmq-namesrv
spec:
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
containers:
- name: namesrv
image: rocketmqinc/rocketmq:4.3.2
command: ["sh","mqnamesrv"]
imagePullPolicy: Always
ports:
- containerPort: 9876
volumeMounts:
- mountPath: /home/rocketmq/logs
name: namesrvlogs
- mountPath: /home/rocketmq/store
name: namesrvstore
volumes:
- name: namesrvlogs
hostPath:
path: /data/namesrv/logs
- name: namesrvstore
hostPath:
path: /data/namesrv/store
#nodeSelector:
#rocketmq-operator: "on"
---
apiVersion: v1
kind: Service
metadata:
name: rocketmq-namesrv
namespace: rocketmq-operator
labels:
app: rocketmq-namesrv
spec:
ports:
- port: 9876
protocol: TCP
targetPort: 9876
selector:
app: rocketmq-namesrv
type: NodePort
还有就是deploy/04-cluster-2m.yaml里的spec.nameServers参数传递的是namesrv的pod的节点IP+port,还是service的clusterIP+port?
What happened:
When I run kubectl create -f deploy/04-cluster-2m.yaml
, exception happens.
error: unable to recognize "deploy/04-cluster-2m.yaml": no matches for kind "BrokerCluster" in version "rocketmq.huanwei.io/v1alpha1"
What you expected to happen:
pods created
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:
kubectl version
): 1.16.3uname -a
): core-4.1-amd64:core-4.1-noarch/kind bug
What would you like to be added:
To build and upgrade the latest RocketMQ Docker images both for NameServer and Broker.
Why is this needed:
To catch up the latest RocketMQ features.
/kind feature
What would you like to be added: Add doc for storageClass.
Why is this needed: To help on production usage for this operator.
/kind document
需求:rocketmq-operator
部署在独立的namespace,比如rktmq-operator
中,
期望部署多个独立的rocketmq(nameserver+brokers)集群在不同的namespace中:
例如:
命名空间 ns1
中部署 nameserver1
和brokerCluster1
命名空间 ns2
中部署 nameserver2
和brokerCluster2
我试了一下,目前brokerCluster
必须和rokcetmq-operator
部署在同一个namespace中,operator才处理请求,不然只是创建一个空的brokerCluster的CR,相关的资源并没有创建。
不知道我这里是不是部署不当,期待回复,谢谢!
/triage support
使用kubectl delete -f deploy/03-deploymentWithConfig.yaml后
ocketmq-operator rocketmq-operator-5657b85cf9-kxjv7 0/1 Pending 0
使用kubectl describe pod rocketmq-operator-5657b85cf9-kxjv7后
发现Warning FailedScheduling default-scheduler 0/3 nodes are available: 3 node(s) didn't match node selector.
What happened:
What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:
kubectl version
):uname -a
):/kind bug
What would you like to be added:
To support the upgrade of RocketMQ Broker Docker image
Why is this needed:
So we can upgrade the Broker image in a Kubernetes cluster.
/kind feature
Describe your support request, or any question relating to RocketMQ Operator:
rocketmq-operator namesapce 的service 能被其它 namespace 访问么,多环境下只想部署一个mq集群
/triage support
What happened:
Failed to create PVC, error in broker statefulset controller:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedCreate 37m (x7 over 37m) statefulset-controller create Pod mybrokercluster-0-0 in StatefulSet mybrokercluster-0 failed error: [Failed to create PVC brokerlogs-mybrokercluster-0-0: PersistentVolumeClaim "brokerlogs-mybrokercluster-0-0" is invalid: spec.resources[storage]: Invalid value: "0": must be greater than zero, Failed to create PVC brokerstore-mybrokercluster-0-0: PersistentVolumeClaim "brokerstore-mybrokercluster-0-0" is invalid: spec.resources[storage]: Invalid value: "0": must be greater than zero]
Warning FailedCreate 37m statefulset-controller create Pod mybrokercluster-0-0 in StatefulSet mybrokercluster-0 failed error: [Failed to create PVC brokerstore-mybrokercluster-0-0: PersistentVolumeClaim "brokerstore-mybrokercluster-0-0" is invalid: spec.resources[storage]: Invalid value: "0": must be greater than zero, Failed to create PVC brokerlogs-mybrokercluster-0-0: PersistentVolumeClaim "brokerlogs-mybrokercluster-0-0" is invalid: spec.resources[storage]: Invalid value: "0": must be greater than zero]
Warning FailedCreate 6m (x77 over 37m) statefulset-controller create Claim brokerlogs-mybrokercluster-0-0 for Pod mybrokercluster-0-0 in StatefulSet mybrokercluster-0 failed error: PersistentVolumeClaim "brokerlogs-mybrokercluster-0-0" is invalid: spec.resources[storage]: Invalid value: "0": must be greater than zero
Warning FailedCreate 1m (x87 over 37m) statefulset-controller create Claim brokerstore-mybrokercluster-0-0 for Pod mybrokercluster-0-0 in StatefulSet mybrokercluster-0 failed error: PersistentVolumeClaim "brokerstore-mybrokercluster-0-0" is invalid: spec.resources[storage]: Invalid value: "0": must be greater than zero
What you expected to happen:
There should be no error events, and Statefulsets should be created successfully.
How to reproduce it (as minimally and precisely as possible):
Deploy operator and broker Statefulset when using storageCalss.
Anything else we need to know?:
None
Environment:
kubectl version
):1.9.2uname -a
):/kind bug
需求是 rocketmq cluster 搭建在一个 k8s 集群中,客户端运行在 k8s 集群外部,请问这种情况如何正确访问 mq 集群呢?
比如:
[root@mybrokercluster-1-0 bin]# ./mqadmin clusterList -n 10.224.xx.xx:32730
OpenJDK 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
#Cluster Name #Broker Name #BID #Addr #Version #InTPS(LOAD) #OutTPS(LOAD) #PCWait(ms) #Hour #SPACE
DefaultCluster mybrokercluster-0-0.mybrokercluster-svc-0.rocketmq-operator.svc.cluster.local 0 10.42.0.112:10911 V4_3_2 0.00(0,0ms) 0.00(0,0ms) 0 443671.72 0.4013
DefaultCluster mybrokercluster-1-0.mybrokercluster-svc-1.rocketmq-operator.svc.cluster.local 0 10.42.0.113:10911 V4_3_2 0.00(0,0ms) 0.00(0,0ms) 0 443671.72 0.4013
当客户端在 k8s 集群外部时,dial pod IP 一定会失败。如下:
WARN[0003] send heart beat to broker error underlayError="dial tcp 10.42.0.112:10911: i/o timeout"
WARN[0006] send heart beat to broker error underlayError="dial tcp 10.42.0.113:10911: i/o timeout"
ERRO[0009] get consumer list of group from broker error broker="10.42.0.112:10911" consumerGroup=test underlayError="dial tcp 10.42.0.112:10911: i/o timeout"
ERRO[0013] get consumer list of group from broker error broker="10.42.0.113:10911" consumerGroup=test underlayError="dial tcp 10.42.0.113:10911: i/o timeout"
期待回复,谢谢~
/triage support
broker storage 怎么调整
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.