91视频专区

妖精妖怪 ——锅庄往事之一

你就老老实实去买一台叁五万的车,全款拿下就可以了,什么新车啊,什么叠叠础,跟你没有关系。买车只是改善我们的生活方式,给我们提供更多的便利,而不是变成你前进的不端,拖垮你的稻草。

2025年01月15日,1908年的金胜寺山门遗迹,曾经的西安第一大寺,咸丰年间毁于战火

妖精妖怪 ——锅庄往事之一

很多明星一旦察觉自己和异性传出绯闻的时候就会和异性保持一定距离而言承旭却丝毫没有在意这一点

健身已成为很多人的在家中烹饪鱼类时,应该将鱼肉充分加热,内部温度至少要达到63°颁以上,持续15秒以上,这样可以有效杀死大多数寄生虫。

飞补颈测耻补苍蝉丑补苍驳诲别箩耻别诲耻颈测辞耻蝉丑颈,蝉丑颈辩颈苍驳诲补辞丑补颈苍颈耻肠颈蹿补苍办别锄丑补苍迟补颈蝉丑补苍诲耻颈诲别锄耻颈诲补诲颈辩颈。肠颈测颈,辩颈苍驳诲补辞丑补颈苍颈耻丑耻辞箩颈补苍驳5飞补颈测耻补苍迟辞苍驳蝉丑颈肠丑耻锄丑补苍,蝉丑颈濒颈产耻谤辞苍驳虫颈补辞锄耻辞。飞别颈濒颈补辞丑耻辞辩耻锄丑别苍驳箩耻,虫颈苍驳箩颈谤别苍测耻补苍锄补颈尘补诲别诲补苍蝉丑别苍蝉耻蝉丑别诲耻颈办别测颈虫耻别锄颈箩颈苍虫颈苍驳尘颈尘颈迟颈辩耻。箩颈苍驳锄丑别苍肠丑补测耻补苍尘别苍蝉丑别苍谤耻虫颈锄丑颈诲别诲颈补辞肠丑补锄丑别苍驳尘颈苍驳:尘补濒颈飞别颈飞补苍辩耻补苍箩耻产别颈蝉丑补丑补颈锄丑补辞谤辞苍驳诲别锄耻辞补苍诲辞苍驳箩颈、蝉丑颈箩颈补苍丑别诲颈诲颈补苍。

事(厂丑颈)实(厂丑颈)证(窜丑别苍驳)明(惭颈苍驳)国(骋耻辞)外(奥补颈)的(顿别)月(驰耻别)亮(尝颈补苍驳)并(叠颈苍驳)不(叠耻)比(叠颈)国(骋耻辞)内(狈别颈)圆(驰耻补苍),走(窜辞耻)到(顿补辞)这(窜丑别)一(驰颈)步(叠耻)也(驰别)只(窜丑颈)能(狈别苍驳)说(厂丑耻辞)是(厂丑颈)咎(闯颈耻)由(驰辞耻)自(窜颈)取(蚕耻)了(尝颈补辞)。

Apache Pulsarxuexibiji14: shiyongHelmzaiKubernetesjiqunzhongbushuPulsaryuanchuang2021-12-31 18:22·jiagouxiaobaishijianguodebijiaojiuliao,zaikaishijintiandexuexizhiqianxianhuiguyixiaqianmianyijingxuexide13jiedeneirong。0.jieduanfuxiPulsarshiyigezhichiduozuhude、gaoxingnengde、fenbushidePub-Subxiaoxixitong。liaojiePulsardejiagou。PulsartigongliaoyigebiClustergenggaojibiedechouxiangInstance。yigePulsar InstanceyouduogePulsar ClusterzuchengyigeInstancezhongdeClusterzhijiankeyixianghukuadiyufuzhishujudangePulsarjiqunyouyixiabufenzucheng:Pulsar Proxy: shiwuzhuangtaide,Proxyzuoweijiqundezhinengluyouceng,shifuzePulsarkehuduanyuPulsarjiqunjiaohudetongyiwangguanPulsar Brokers: yeshiwuzhuangtaide,shijiqundefuwuceng,ProxyhuijiangkehuduandefangwenqingqiuzhuanfadaozhengquedeBrokershang。BrokerzuoweifuwucengyuPulsardecunchucengjinxingjiaohuBookies: yigejiqunyouduogeBookiejiedian(zuchengBookeeperjiqun)fuzexiaoxidechijiuhuacunchuZookeeper: yongyujiqunjibiedepeizhihexiediao,bingcunchuPulsarjiqundesuoyouyuanshujuyidockerrongqiyunxingdanjiPulsarxuexishiyongminglingxinggongjupulsar-adminchuangjiantenant、namespace、topicliaojiePulsar Admin REST APItenant、namespace、topicdejibengainianPulsarjiyuzuhu、mingmingkongjian、zhutideluojicengcijiegouzhichiduozuhufenquTopicdegainianTopic URLgeshichijiuhuaTopichefeichijiuhuaTopicdegainianshengchanzhehexiaofeizhe、dingyuehedingyuemoshiPulsarzhichi: exclusive(duzhan), failover(guzhangzhuanyi/zaibei), shared(gongxiang), key-shared(jiyukeydegongxiangmoshi) 4zhongdingyuemoshishiyongminglingxinggongjupulsar-clientjinxingshengchanzhehexiaofeizheceshishiyongPulsar Javakehuduankuchuangjianshengchanzhe、xiaofeizhe、Readerxiaofeizheduankeyishiyong"tongbujieshouxiaoxi", "yibujieshouxiaoxi", "MessageListenerjieshou" 3zhongmoshi,qizhongMessageListenerzidaixianchengchichuangjianxiaofeizheshikeyishezhixiaofeizhedepiliangjieshoucelueduozhutidingyue: shezhidangexiaofeizhedingyueduogezhutixiaofeiyichangchulikeyishiyong"wuxianzhongshi", "bohuobinghulueyichang", "sixinzhuti(Dead Letter Topic)"sanzhongfangshishiyongxiaoxiReaderkeyiyouyonghuzijishoudongzaiTopiczhongdingwei,duquxiangyaoduqudexiaoxishiyongPulsar Gokehuduankuxiaofeizheduanzhichiconsumer.Receive()heconsumer.Chan()liangzhongfangshixiaofeixiaoxi。qianzheduichannelguanbihecontext canceldeqingkuangzuoliaofengzhuang,houzheyaowomenzijichulihechanneldejiaohu,danyetigongliaozuidadelinghuoxing。duozhutidingyuesixinceluehesixinzhutishiyongxiaoxiReadershiyongPulsar SchemaguanlixiaoxishujudeleixinganquanxingWebtuxinghuaguanligongjuPulsar ManageryanchixiaoxitouditexingzhidingduochangshijianhoutoudideliverAfterzhidingzaijianglaimougeshijiandiantoudideliverAtfenquTopicheluyoumoshirenzhengheshouquankaiqiJWTshenfenrenzhengshouquanhequanxianguanliqianmiandexuexiyizhishijiyuyidockerrongqiqidongdedanjiPulsar。jintianjiangxuexishiyongHelmzaiKubernetesjiqunzhongbushuPulsarjiqun。1.huanjingzhunbeizhelishiyongdeKubernetesjiqundebanbenshi1.22.4,Helmdebanbenshi3.7.1。1.1 PulsarjiqunzujianheK8S NodejiedianguihuaxiamianzuoyixiaPulsarjiqungegezujianbushujiediandeguihua。shiyongPulsarguanfangdeHelm Chartbushushi,kexuanzebushugegezujian。 zaihoubiandepeizhizhongjiangjinyongjiankongxiangguandezujian(promethues, grafanadeng),womenzhelixuanzeyihouchangshishiyongwaibudequanjuPrometheusshixianduiPulsarjiqundejiankong。benjiexuanzebushudejiqunzujianruxia:proxy: wuzhuangtai, danpulsardehelm chartshiyongStatefulSetbushubroker: wuzhuangtai, danpulsardehelm chartshiyongStatefulSetbushubookie: youzhuangtai, pulsardehelm chartshiyongStatefulSetbushuzookeeper: youzhuangtai, pulsardehelm chartshiyongStatefulSetbushurecovery: wuzhuangtai, danpulsardehelm chartshiyongStatefulSetbushutoolset: wuzhuangtai, danpulsardehelm chartshiyongStatefulSetbushupulsar-manager: wuzhuangtai, pulsardehelm chartshiyongDeploymentbushuzhuyi, pulsar-managerssuiranshiwuzhuangtaide,danyinweitaxuyaoshiyongPostgreSQLshujuku,pulsar-managersdedockerjingxiangzhongneizhiyigePostgreSQL, zhegewomenzaihoubiandepeizhizhongjianggaiweishiyongjiqunwaibudePostgreSQL。xiamianshuoyixiayishanggegezujiandebushujiedianxuanze。duiyuproxy, broker, recovery, toolset, pulsar-managerzhe5gewuzhuangtaizujian,keyirangk8sjiangqidiaodudaorenyijiedianshang。duiyubookie, zookeeperzhe2geyouzhuangtaizujian,xuyaowomengenjuqicunchujuandeleixing,jiangqiguihuadaoheshidek8sjiedian。womenzaixianshanghuanjingduiyuyouzhuangtaifuwudebushu,zaicunchujuandexuanzeshang,weiliaogenghaodexingneng,yibandushixuanzeLocal Persistent Volumes zai。yinci,ruguonizaiguihuayigexianshangbanbendePulsarjiqunbushudehua,duiyubookiehezookeeperkendingxuyaodandudedulidek8sjiedian,bingshiyongzhexiejiedianshangchuangjiandeLocal PV。 liru,yigexianshangshengchankeyongdePulsarjiqunkenengguihuaruxia:pulsar zookeeperjiqunzhishaoxuyao3gedulidek8sjiedian, zaizhexiejiedianshangchuangjianzookeeperdelocal pvpulsar bookeeperjiqun(bookiejiedianzucheng)genjuguihuaderongliangxuyaoNgedulidek8sjiedian, zaizhexiejiedianshangchuangjianbookiedelocal pv。ruguohouxuxuyaokuorongzengjiabookiejiedianshi,zhixuyaoyouxindechuangjianhaolocal pvdek8sjiedian,bingduibookiedeStatefulSetkuorongjike。pulsar proxy, brokerdengwuzhuangtaifuwu,zhixuyaoyouzugoudeshuliangdek8sjiedian,bingzaixuyaoshianxukuorongjikeyinbenwenzheliyongyushiyandek8sjiqunziyuanyouxian,suoyijinliangjiangshangmiangezujianzai3gek8sjiedianshanghunbu,jiangyigeyongyuceshihuanjingdedePulsarjiqunguihuaruxia:k8sjiedianbushupulsarzujianbeizhunode1zookeeper-0, bookie-0, broker-0, proxy-0xianshanghuanjingbookiehezookeeperyidingyaozaidandudejiedianshangnode2zookeeper-1, bookie-1, broker-1, proxy-1xianshanghuanjingbookiehezookeeperyidingyaozaidandudejiedianshangnode3zookeeper-2, bookie-2, broker-2, proxy-2xianshanghuanjingbookiehezookeeperyidingyaozaidandudejiedianshangnode1huonode2huonode3recovery-0, toolset-0, pulsar-managerjiyushangmianceshihuanjingdeguihua,womenjiangnode1~node3sangejiediandashangLabelheTaint:kubectl label node node1 node-role.kubernetes.io/pulsar=pulsarkubectl label node node2 node-role.kubernetes.io/pulsar=pulsarkubectl label node node3 node-role.kubernetes.io/pulsar=pulsarkubectl taint nodes node1 dedicated=pulsar:NoSchedulekubectl taint nodes node2 dedicated=pulsar:NoSchedulekubectl taint nodes node3 dedicated=pulsar:NoScheduleLabel node-role.kubernetes.io/pulsar=pulsaryongyubiaojijiedianshizhuanmenyongyuyunxingpulsarjiqunzujiandek8sjiedian。Taint dedicated=pulsar:NoSchedulebeidadaojiedianshanghou,morenpeizhixiak8sjiqunzhongdeqitabushuyupulsarjiqunzujiandepodjiangbuhuibeidiaodudaozhe3gejiedianshang,erhoubianwomenjiangyaobushudepulsarzujianshangjianghuishiyongTolerationpeizhiyunxudedicated=pulsar:NoScheduledeTaint。zhuyizhelizhishigenjuceshihuanjingPulsarjiqundeguihua,zuoliaoshangmiandeLabelheTaintdeshezhi,ruguoshishengchanhuanjing,zhelideLabelheTaintyinggaizuogenghelihexilidudeguihua,quebaoshixianshangmianshengchankeyongPulsarjiqundeNodejiedianguihua1.2 PulsarjiqunzujianrongqijingxiangzhunbeiqianmianwomenxuanzeyaobushuPulsarjiqundeproxy, broker, bookie, zookeeper, recovery, toolset, pulsar-manager 7dazujian。qizhongproxy, broker, bookie, zookeeper, recovery, toolsetdeguanfangrongqijingxiangdushiapachepulsar/pulsar-all。 pulsar-managerdeguanfangjingxiangshiapachepulsar/pulsar-manager。benwenshiyongdepulsarguanfangdehelm chart https://github.com/apache/pulsar-helm-chart/releases。pulsar-helm-chartdebanbenwei2.7.7,gaibanbenzhongpulsardebanbenwei2.7.4, pulsar-managerbanbenweiv0.1.0:apachepulsar/pulsar-all:2.7.4apachepulsar/pulsar-manager:v0.1.0zhuyiyinweipulsar-manager:v0.1.0youzhegeISSUE https://github.com/apache/pulsar-helm-chart/issues/133zhongmiaoshudewenti,suoyizaihoubiandebushujiangjingxiangpulsar-manager:v0.1.0genghuanchengliaopulsar-manager:v0.2.0。weiliaotigaoxiaolv,zhelijiangapachepulsar/pulsar-all:2.7.4heapachepulsar/pulsar-manager:v0.2.0zhelianggejingxiangzhuancundaoliaok8sjiqunsuoshiyongdesiyoujingxiangcangkuzhong,liru:harbor.example.com/library/apachepulsar/pulsar-all:2.7.4harbor.example.com/library/apachepulsar/pulsar-manager:v0.2.01.3 chuangjianJWTrenzhengsuoxudeK8S SecretzhelibushudePulsarjiqunxuyaozaianquanshangkaitongJWTrenzheng。genjuqianmianxuexideneirong,JWTzhichitongguoliangzhongbutongdemiyueshengchengheyanzhengToken:duichengmiyue:shiyongdangeSecret keylaishengchengheyanzhengTokenfeiduichengmiyue:baohanyousiyuehegongyuezuchengdeyiduimiyueshiyongPrivate keyshengchengTokenshiyongPublic keyyanzhengTokentuijianshiyongfeiduichengmiyuedefangshi,xuyaoxianshengchengmiyuedui,zaiyongmiyueshengchengtoken。yinweiPulsarbeibushuzaiK8Sjiqunzhong,zaiK8SjiqunzhongcunchuzhexiemiyueheTokendezuihaodefangshishishiyongK8SdeSecret。pulsar-helm-chartzhuanmentigongliaoyigeprepare_helm_release.shjiaoben,keyiyonglaishengchengzhexieSecret。xiamianwomenjiangpulsar-helm-chartdeyuanmaclonedaoK8Sdekongzhijiedianshang(kubectlhehelmkeyongdejiedian):git clone -b pulsar-2.7.7 --depth 1 https://github.com/apache/pulsar-helm-chart.gitcd pulsar-helm-chart/zhixingxiamiandeminglingshengchengmiyueduiheTokendeSecretdeManifest:./scripts/pulsar/prepare_helm_release.sh \ -n pulsar \ -k pulsar \ -lshangmiandeminglingzhong:-nzhidingdeshengchengSecret Manifestzhonganzhuangdemingmingkongjian,zheliwoshijiangqibushudaoK8Szhongdepulsar namespacezhong,suoyizhidingweipulsar,dangranyekeyizhidingbushudaoqitadenamespacezhong。-kzhidingdeshishiyonghelmbushushidehelm releasemingcheng,zhelizhidingweipulsar。-lzhidingzhijiangshengchengdeneirongshuchudadaobendi,erbuhuizidongbushudaoK8Szhong。bijiaoxihuanzhezhongshoudongdefangshi,yinweiyiqiebijiaokekong。zhuyizhegejiaobenhuanyouyige-s,--symmetriccanshu,ruguogeizhegecanshudehua,JWTrenzhengjiangshiyongduichengmiyuedefangshi,zhelimeiyougeizhegecanshu,jiushiyongfeiduichengmiyuedefangshi。zhixingshangmiandejiaobenhuishuchuyixianeirong:generate the token keys for the pulsar cluster---The private key and public key are generated to ... successfully.apiVersion: v1data: PRIVATEKEY: <...> PUBLICKEY: <...>kind: Secretmetadata: creationTimestamp: null name: pulsar-token-asymmetric-key namespace: pulsargenerate the tokens for the super-users: proxy-admin,broker-admin,admingenerate the token for proxy-admin---pulsar-token-asymmetric-keyapiVersion: v1data: TOKEN: <...> TYPE: YXN5bW1ldHJpYw==kind: Secretmetadata: creationTimestamp: null name: pulsar-token-proxy-admin namespace: pulsargenerate the token for broker-admin---pulsar-token-asymmetric-keyapiVersion: v1data: TOKEN: <...> TYPE: YXN5bW1ldHJpYw==kind: Secretmetadata: creationTimestamp: null name: pulsar-token-broker-admin namespace: pulsargenerate the token for admin---pulsar-token-asymmetric-keyapiVersion: v1data: TOKEN: <...> TYPE: YXN5bW1ldHJpYw==kind: Secretmetadata: creationTimestamp: null name: pulsar-token-admin namespace: pulsar-------------------------------------The jwt token secret keys are generated under: - 'pulsar-token-asymmetric-key'The jwt tokens for superusers are generated and stored as below: - 'proxy-admin':secret('pulsar-token-proxy-admin') - 'broker-admin':secret('pulsar-token-broker-admin') - 'admin':secret('pulsar-token-admin')congshuchukeyikanchu,gaijiaobenshengchengliao4geK8S SecretdeManifest:pulsar-token-asymmetric-keyzhegeSecretzhongshiyongyushengchengTokenheyanzhengTokendesiyuehegongyuepulsar-token-proxy-adminzhegeSecretzhongshiyongyuproxydechaojiyonghujiaoseTokenpulsar-token-broker-adminzhegeSecretzhongshiyongyubrokerdechaojiyonghujiaoseTokenpulsar-token-adminzhegeSecretzhongshiyongyuguanlikehuduandechaojiyonghujiaoseTokenjiexialaishoudongjiangzhe4geSecretshiyongkubectl applychuangjiandaoK8Sdepulsarmingmingkongjianzhong。 chuangjianwanchenghou,keyishiyongkubectlzhaodaotamen:kubectl get secret -n pulsar | grep pulsar-tokenpulsar-token-admin Opaque 2 5mpulsar-token-asymmetric-key Opaque 2 5mpulsar-token-broker-admin Opaque 2 5mpulsar-token-proxy-admin Opaque 2 5m1.4 chuangjianZookeeperheBookiedeLocal PVgenjubushuPulsardeK8Sjiediandeguihua,xiamianxuyaoweizookeeper, bookiesuozaidejiedianzaiK8SshangchuangjianLocal Persistent Volume。zhuyimeigezookeeperjiedianxuyaoyigedatadelocal volume,meigebookiejiedianxuyaojournalheledgersgonglianggelocal volume。zaichuangjianLocal PVzhiqian,xuyaoquerenyixiak8szhongcunzaiStorageClasslocal-storage,ruguomeiyoukeyishiyongxiamiandemanifestchuangjian。apiVersion: storage.k8s.io/v1kind: StorageClassmetadata: name: local-storageprovisioner: kubernetes.io/no-provisionervolumeBindingMode: WaitForFirstConsumerreclaimPolicy: RetainzhuyixianzaideK8Szhongbuzaizhijietigonglocal volumedeprovisioner,zheliyemeiyoushiyongprovisioner,yincihouxuduilocal volumedechuangjianheguanlidushixuyaoK8Sjiqunguanliyuandeshoudongjinxing。 yeshishuomuqianKuberneteshexinzhongbubaohanduiduibendijuanjinxingdongtaifafangheguanlideprovisioner,ruguoxiangyaotiyandongtaifafangheguanlidegongneng,keyishiyixiayouRanchertigongdeLocal Path Provisioner。wozheliyiranshiyongshoudongguanlidefangshi,jitongguoshoudongzaiK8SjiedianshangchuangjianLocal Volume,shoudongbangdingLocal VolumeyuPulsar ZookeeperheBookiedePVC(PersistentVolumeClaim)zhijiandeguanxi。xiamian,xianshoudongzainode1, node2, node3shangchuangjianlocal volumeduiyingdeshujumulu:mkdir -p /home/puslar/data/zookeeper-datamkdir -p /home/puslar/data/bookie-data/ledgersmkdir -p /home/puslar/data/bookie-data/journalzookeeper datadelocal pvdemanifestruxia:---apiVersion: v1kind: PersistentVolumemetadata: name: pulsar-zookeeper-data-pulsar-zookeeper-0spec: capacity: storage: 20Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain storageClassName: local-storage local: path: /home/puslar/data/zookeeper-data claimRef: name: pulsar-zookeeper-data-pulsar-zookeeper-0 namespace: pulsar nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - node1---apiVersion: v1kind: PersistentVolumemetadata: name: pulsar-zookeeper-data-pulsar-zookeeper-1spec: capacity: storage: 20Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain storageClassName: local-storage local: path: /home/puslar/data/zookeeper-data claimRef: name: pulsar-zookeeper-data-pulsar-zookeeper-1 namespace: pulsar nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - node2---apiVersion: v1kind: PersistentVolumemetadata: name: pulsar-zookeeper-data-pulsar-zookeeper-2spec: capacity: storage: 20Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain storageClassName: local-storage local: path: /home/puslar/data/zookeeper-data claimRef: name: pulsar-zookeeper-data-pulsar-zookeeper-2 namespace: pulsar nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - node3shangmiandemanifestrengzhongjiang3geLocal PVtongguonodeAffinitychuangjianbingguanliandaodaonode1~node3shang,tongshishiyongclaimRefjiangzhe3geLocal PVyujijiangzaiK8Sjiqunzhongbushudezookeeper SatefulSetzhongdePVCbangding。 shiyongkubectl applychuangjianshangmiandemanifest。bookie ledgershejournaldelocal pvdemanifestruxia:---apiVersion: v1kind: PersistentVolumemetadata: name: pulsar-bookie-ledgers-pulsar-bookie-0spec: capacity: storage: 50Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain storageClassName: local-storage local: path: /home/puslar/data/bookie-data/ledgers claimRef: name: pulsar-bookie-ledgers-pulsar-bookie-0 namespace: pulsar nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - node1---apiVersion: v1kind: PersistentVolumemetadata: name: pulsar-bookie-journal-pulsar-bookie-0spec: capacity: storage: 50Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain storageClassName: local-storage local: path: /home/puslar/data/bookie-data/journal claimRef: name: pulsar-bookie-journal-pulsar-bookie-0 namespace: pulsar nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - node1---apiVersion: v1kind: PersistentVolumemetadata: name: pulsar-bookie-ledgers-pulsar-bookie-1spec: capacity: storage: 50Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain storageClassName: local-storage local: path: /home/puslar/data/bookie-data/ledgers claimRef: name: pulsar-bookie-ledgers-pulsar-bookie-1 namespace: pulsar nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - node2---apiVersion: v1kind: PersistentVolumemetadata: name: pulsar-bookie-journal-pulsar-bookie-1spec: capacity: storage: 50Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain storageClassName: local-storage local: path: /home/puslar/data/bookie-data/journal claimRef: name: pulsar-bookie-journal-pulsar-bookie-1 namespace: pulsar nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - node2---apiVersion: v1kind: PersistentVolumemetadata: name: pulsar-bookie-ledgers-pulsar-bookie-2spec: capacity: storage: 50Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain storageClassName: local-storage local: path: /home/puslar/data/bookie-data/ledgers claimRef: name: pulsar-bookie-ledgers-pulsar-bookie-2 namespace: pulsar nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - node3---apiVersion: v1kind: PersistentVolumemetadata: name: pulsar-bookie-journal-pulsar-bookie-2spec: capacity: storage: 50Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain storageClassName: local-storage local: path: /home/puslar/data/bookie-data/journal claimRef: name: pulsar-bookie-journal-pulsar-bookie-2 namespace: pulsar nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - node3shangmiandemanifestrengzhongjiang6geLocal PVtongguonodeAffinitychuangjianbingguanliandaodaonode1~node3shang,tongshishiyongclaimRefjiangzhe3geLocal PVyujijiangzaiK8Sjiqunzhongbushudezookeeper SatefulSetzhongdePVCbangding。 shiyongkubectl applychuangjianshangmiandemanifest。1.5 zhunbeiPulsar ManagerdePostgreSQLshujukuzhelizhunbeirangPulsar Managershiyongwaibushujuku,xuyaotiqianzaiwaibudePostgreSQLzhongchuangjianhaoyonghuheshujukubiaojiegou。chuangjianshujukuheyonghu:CREATE USER pulsar_manager WITH PASSWORD '';CREATE DATABASE pulsar_manager OWNER pulsar_manager;GRANT ALL PRIVILEGES ON DATABASE pulsar_manager to pulsar_manager;GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA pulsar_manager TO pulsar_manager;ALTER SCHEMA public OWNER to pulsar_manager;GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO pulsar_manager;GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO pulsar_manager;chuangjianbiaojiegou(jianbiaojiaobenkeyizaipulsar-managerdejingxiangzhongzhaodao):CREATE TABLE IF NOT EXISTS environments ( name varchar(256) NOT NULL, broker varchar(1024) NOT NULL, CONSTRAINT PK_name PRIMARY KEY (name), UNIQUE (broker));CREATE TABLE IF NOT EXISTS topics_stats ( topic_stats_id BIGSERIAL PRIMARY KEY, environment varchar(255) NOT NULL, cluster varchar(255) NOT NULL, broker varchar(255) NOT NULL, tenant varchar(255) NOT NULL, namespace varchar(255) NOT NULL, bundle varchar(255) NOT NULL, persistent varchar(36) NOT NULL, topic varchar(255) NOT NULL, producer_count BIGINT, subscription_count BIGINT, msg_rate_in double precision , msg_throughput_in double precision , msg_rate_out double precision , msg_throughput_out double precision , average_msg_size double precision , storage_size double precision , time_stamp BIGINT);CREATE TABLE IF NOT EXISTS publishers_stats ( publisher_stats_id BIGSERIAL PRIMARY KEY, producer_id BIGINT, topic_stats_id BIGINT NOT NULL, producer_name varchar(255) NOT NULL, msg_rate_in double precision , msg_throughput_in double precision , average_msg_size double precision , address varchar(255), connected_since varchar(128), client_version varchar(36), metadata text, time_stamp BIGINT, CONSTRAINT fk_publishers_stats_topic_stats_id FOREIGN KEY (topic_stats_id) References topics_stats(topic_stats_id));CREATE TABLE IF NOT EXISTS replications_stats ( replication_stats_id BIGSERIAL PRIMARY KEY, topic_stats_id BIGINT NOT NULL, cluster varchar(255) NOT NULL, connected BOOLEAN, msg_rate_in double precision , msg_rate_out double precision , msg_rate_expired double precision , msg_throughput_in double precision , msg_throughput_out double precision , msg_rate_redeliver double precision , replication_backlog BIGINT, replication_delay_in_seconds BIGINT, inbound_connection varchar(255), inbound_connected_since varchar(255), outbound_connection varchar(255), outbound_connected_since varchar(255), time_stamp BIGINT, CONSTRAINT FK_replications_stats_topic_stats_id FOREIGN KEY (topic_stats_id) References topics_stats(topic_stats_id));CREATE TABLE IF NOT EXISTS subscriptions_stats ( subscription_stats_id BIGSERIAL PRIMARY KEY, topic_stats_id BIGINT NOT NULL, subscription varchar(255) NULL, msg_backlog BIGINT, msg_rate_expired double precision , msg_rate_out double precision , msg_throughput_out double precision , msg_rate_redeliver double precision , number_of_entries_since_first_not_acked_message BIGINT, total_non_contiguous_deleted_messages_range BIGINT, subscription_type varchar(16), blocked_subscription_on_unacked_msgs BOOLEAN, time_stamp BIGINT, UNIQUE (topic_stats_id, subscription), CONSTRAINT FK_subscriptions_stats_topic_stats_id FOREIGN KEY (topic_stats_id) References topics_stats(topic_stats_id));CREATE TABLE IF NOT EXISTS consumers_stats ( consumer_stats_id BIGSERIAL PRIMARY KEY, consumer varchar(255) NOT NULL, topic_stats_id BIGINT NOT NUll, replication_stats_id BIGINT, subscription_stats_id BIGINT, address varchar(255), available_permits BIGINT, connected_since varchar(255), msg_rate_out double precision , msg_throughput_out double precision , msg_rate_redeliver double precision , client_version varchar(36), time_stamp BIGINT, metadata text);CREATE TABLE IF NOT EXISTS tokens ( token_id BIGSERIAL PRIMARY KEY, role varchar(256) NOT NULL, description varchar(128), token varchar(1024) NOT NUll, UNIQUE (role));CREATE TABLE IF NOT EXISTS users ( user_id BIGSERIAL PRIMARY KEY, access_token varchar(256), name varchar(256) NOT NULL, description varchar(128), email varchar(256), phone_number varchar(48), location varchar(256), company varchar(256), expire BIGINT, password varchar(256), UNIQUE (name));CREATE TABLE IF NOT EXISTS roles ( role_id BIGSERIAL PRIMARY KEY, role_name varchar(256) NOT NULL, role_source varchar(256) NOT NULL, description varchar(128), resource_id BIGINT NOT NULL, resource_type varchar(48) NOT NULL, resource_name varchar(48) NOT NULL, resource_verbs varchar(256) NOT NULL, flag INT NOT NULL);CREATE TABLE IF NOT EXISTS tenants ( tenant_id BIGSERIAL PRIMARY KEY, tenant varchar(255) NOT NULL, admin_roles varchar(255), allowed_clusters varchar(255), environment_name varchar(255), UNIQUE(tenant));CREATE TABLE IF NOT EXISTS namespaces ( namespace_id BIGSERIAL PRIMARY KEY, tenant varchar(255) NOT NULL, namespace varchar(255) NOT NULL, UNIQUE(tenant, namespace));CREATE TABLE IF NOT EXISTS role_binding( role_binding_id BIGSERIAL PRIMARY KEY, name varchar(256) NOT NULL, description varchar(256), role_id BIGINT NOT NULL, user_id BIGINT NOT NULL);shangmianyijingzuohaoliaobushudezhunbeigongzuo,xiamianjiangshiyongHelmzaiK8SjiqunzhongbushuPulsarjiqun。2.shiyongHelmzaiK8SzhongbushuPulsarconghttps://github.com/apache/pulsar-helm-chart/releasesxiazaipulsar helm chart 2.7.7daoK8Sdekongzhijiedianshang(kubectlhehelmkeyong)。https://github.com/apache/pulsar-helm-chart/releases/download/pulsar-2.7.7/pulsar-2.7.7.tgz2.1 dingzhibianxiehelm chartdevalues.yamldingzhibianxiehelm chartdevalues.yamlwenjianruxia, dingzhideneirongbijiaoduo,jutijianxiamianwenjiandezhushi:auth: authentication: enabled: true # kaiqijwtrenzheng provider: "jwt" jwt: usingSecretKey: false # jwtrenzhengshiyongfeiduichengmiyuedui authorization: enabled: true # kaiqishouquan superUsers: # broker to broker communication broker: "broker-admin" # proxy to broker communication proxy: "proxy-admin" # pulsar-admin client to broker/proxy communication client: "admin"components: # qiyongdezujian autorecovery: true bookkeeper: true broker: true functions: true proxy: true pulsar_manager: true toolset: true zookeeper: truemonitoring: # guanbijiankongzujian, houxuchangshishiyongwaibuPrometheusduipulsarjiqunjinxingjiankong grafana: false prometheus: false node_exporter: falsevolumes: local_storage: true # shujujuanshiyonglocal storageproxy: # proxydepeizhi(zhelishiceshihuanjing, jiangproxyyediaodudaonode1huonode2huonode3) nodeSelector: node-role.kubernetes.io/pulsar: pulsar tolerations: - key: "dedicated" operator: "Equal" value: "pulsar" effect: "NoSchedule" configData: PULSAR_PREFIX_authenticateMetricsEndpoint: "false"broker: # brokerdepeizhi(zhelishiceshihuanjing, jiangproxyyediaodudaonode1huonode2huonode3) nodeSelector: node-role.kubernetes.io/pulsar: pulsar tolerations: - key: "dedicated" operator: "Equal" value: "pulsar" effect: "NoSchedule" zookeeper: # brokerdepeizhi replicaCount: 3 tolerations: - key: "dedicated" operator: "Equal" value: "pulsar" effect: "NoSchedule" volumes: data: # peizhishiyonglocal pv, xuyaoyuqianmianshoudongchuangjiandelocal pvxinxiyizhi local_storage: true size: 20Gibookkeeper: # bookkeeperdepeizhi replicaCount: 3 tolerations: - key: "dedicated" operator: "Equal" value: "pulsar" effect: "NoSchedule" volumes: journal: # peizhishiyonglocal pv, xuyaoyuqianmianshoudongchuangjiandelocal pvxinxiyizhi local_storage: true size: 50Gi ledgers: # peizhishiyonglocal pv, xuyaoyuqianmianshoudongchuangjiandelocal pvxinxiyizhi local_storage: true size: 50Gipulsar_manager: # pulsar_managerdepeizhi(zhelishiceshihuanjing, jiangpulsar_manageryediaodudaonode1huonode2huonode3) replicaCount: 1 admin: # wendangzhongmiaoshuzhelishipulsar manager webjiemiandengluyonghumima,danshijishangdangshiyongwaibuPostgreSQLshujukushi,zhelixuyaozhidingPostgreSQLdeshujukuhemima,buzhidaoshifoushipulsar-helm-chart 2.7.7dewenti user: pulsar_manager password: 05aM3Braz_M4RWpn configData: DRIVER_CLASS_NAME: org.postgresql.Driver URL: jdbc:postgresql://:5432/pulsar_manager # wendangzhongmiaoshuzheliPostgreSQLshujukudemima,danshijishangzhelibunengzhidingUSERNAMEhePASSWORD, buzhidaoshifoushipulsar-helm-chart 2.7.7dewenti # USERNAME: pulsar_manager # PASSWORD: 05aM3Braz_M4RWpn LOG_LEVEL: INFO ## kaiqiJWTrenzhenghou, zhelixuyaozhidingpulsar-token-adminzhegeSecretzhongdeJWT Token JWT_TOKEN: autorecovery: # autorecoverydepeizhi(zhelishiceshihuanjing, jiangautorecoveryyediaodudaonode1huonode2huonode3) replicaCount: 1 nodeSelector: node-role.kubernetes.io/pulsar: pulsar tolerations: - key: "dedicated" operator: "Equal" value: "pulsar" effect: "NoSchedule"toolset: # toolsetdepeizhi(zhelishiceshihuanjing, jiangtoolsetyediaodudaonode1huonode2huonode3) replicaCount: 1 nodeSelector: node-role.kubernetes.io/pulsar: pulsar tolerations: - key: "dedicated" operator: "Equal" value: "pulsar" effect: "NoSchedule"images: # duigezujianshiyongsiyoujingxiangcangkudepeizhi imagePullSecrets: - regsecret # siyoujingxiangcangkudeimage pull secret, xuyaotiqianzaik8smingmingkongjianzhongchuangjian autorecovery: repository: harbor.example.com/library/apachepulsar/pulsar-all tag: 2.7.4 bookie: repository: harbor.example.com/library/apachepulsar/pulsar-all tag: 2.7.4 broker: repository: harbor.example.com/library/apachepulsar/pulsar-all tag: 2.7.4 functions: repository: harbor.example.com/library/apachepulsar/pulsar-all tag: 2.7.4 proxy: repository: harbor.example.com/library/apachepulsar/pulsar-all tag: 2.7.4 pulsar_manager: repository: harbor.example.com/library/apachepulsar/pulsar-manager tag: v0.2.0 zookeeper: repository: harbor.example.com/library/apachepulsar/pulsar-all tag: 2.7.4pulsar_metadata: component: pulsar-init image: # the image used for running `pulsar-cluster-initialize` job repository: harbor.example.com/library/apachepulsar/pulsar-all tag: 2.7.4yinweidangqianzaipulsar-helm-chart 2.7.7 zhonghaoxiangbuzhichiweipulsar-initshezhisiyoucangkudeimagePullSecret,suoyixiamianweipulsar namespacezhongdedefault servcieaccount tianjiashangimagePullSecret。kubectl patch serviceaccount default -p '{"imagePullSecrets": [{"name": "regsecret"}]}' -n pulsar2.2 shiyonghelm installanzhuangpulsardingzhiwanvalue.yamlzhihou,shiyongxiamiandeminglingxiangK8Sjiqunbushupulsar。helm install \ --values values.yaml \ --set initialize=true \ --namespace pulsar \ pulsar pulsar-2.7.7.tgzanzhuangwanchenghoushiyongxiamiandeminglingchakanyixialianggechushihuajob pulsar-pulsar-inithepulsar-bookie-initdepodzhuangtaiweiComplete:kubectl get pod -n pulsar | grep initpulsar-bookie-init--1-h65bp 0/1 Completed 0 5m14spulsar-pulsar-init--1-t4thq 0/1 Completed 0 5m5sshiyongxiamiandeminglingchakanyixiapulsarjiqungegezujiandePodzhuangtaiquanbuduweiRunning:kubectl get pod -n pulsar -l cluster=pulsar -o wideNAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATESpulsar-bookie-0 1/1 Running 0 14m 10.244.226.91 node1 pulsar-bookie-1 1/1 Running 0 14m 10.244.63.90 node2 pulsar-bookie-2 1/1 Running 0 14m 10.244.46.92 node3 pulsar-broker-0 1/1 Running 0 14m 10.244.226.90 node1 pulsar-broker-1 1/1 Running 0 14m 10.244.63.89 node2 pulsar-broker-2 1/1 Running 0 14m 10.244.46.90 node3 pulsar-proxy-0 1/1 Running 0 14m 10.244.226.93 node1 pulsar-proxy-1 1/1 Running 0 14m 10.244.63.91 node2 pulsar-proxy-2 1/1 Running 0 14m 10.244.46.93 node3 pulsar-pulsar-manager-7b98666cff-5626f 1/1 Running 0 14m 10.244.63.88 node2 pulsar-recovery-0 1/1 Running 0 14m 10.244.46.89 node3 pulsar-toolset-0 1/1 Running 0 14m 10.244.46.91 node3 pulsar-zookeeper-0 1/1 Running 0 14m 10.244.226.92 node1 pulsar-zookeeper-1 1/1 Running 0 14m 10.244.63.92 node2 pulsar-zookeeper-2 1/1 Running 0 13m 10.244.46.94 node3 ruguohoubiandiaozhengliaovalues.yaml,xuyaogengxinbushushi,shiyongxiamiandemingling:helm upgrade pulsar pulsar-2.7.7.tgz \ --namespace pulsar \ -f values.yaml2.3 zaitoolset podzhongceshichuangjiantenant, namespacehetopictoolset podzhongbaohanliaogezhongguanliheceshipulsardeminglingxinggongju,lirupulsar-admin, pulsar-clientdeng。xiamianjinrutoolset podzhong,shiyongpulsar-adminminglingxinggongjuceshiyixiatenant, namespacehetopicdechuangjian,jinyibuquerenpulsarjiqungongzuozhengchang。kubectl exec -it -n pulsar pulsar-toolset-0 -- /bin/bashbin/pulsar-admin tenants create test-tenantbin/pulsar-admin tenants list"public""pulsar""test-tenant"bin/pulsar-admin namespaces create test-tenant/test-nsbin/pulsar-admin namespaces list test-tenant"test-tenant/test-ns"bin/pulsar-admin topics create-partitioned-topic test-tenant/test-ns/test-topic -p 3bin/pulsar-admin topics list-partitioned-topics test-tenant/test-ns"persistent://test-tenant/test-ns/test-topic"2.4 chuangjianpulsar-managerdeguanliyuanyonghubingdengluchakanxiamianceshiyixiapulsar managershifoukeyishiyong。qianmianshiyonghelm chartbushudepulsarjiqun,zaik8szhongchuangjianliaoxiamian7geService。kubectl get svc -l app=pulsar -n pulsarNAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGEpulsar-bookie ClusterIP None 3181/TCP,8000/TCP 40mpulsar-broker ClusterIP None 8080/TCP,6650/TCP 40mpulsar-proxy LoadBalancer 10.104.105.137 80:31970/TCP,6650:32631/TCP 40mpulsar-pulsar-manager LoadBalancer 10.110.207.9 9527:32764/TCP 40mpulsar-recovery ClusterIP None 8000/TCP 40mpulsar-toolset ClusterIP None 40mpulsar-zookeeper ClusterIP None 8000/TCP,2888/TCP,3888/TCP,2181/TCP 40mcongshangmianminglingdeshuchukeyikanchu,bookie, broker, recovery, toolset, zookeeperzhe5geServicedeleixingdushiClusterIPde,bingqiecluser-ipweiNone,dushiHeadlessdeService,yinweitamenzhixuyaozaik8sjiqunneibushiyong。pulsar-proxyhepulsar-pulsar-managerweiLoadBalancerleixing,bingqiedupeizhiliaoNodePort,tigongliaocongK8Sjiqunwaibufangwendenengli。congjiqunwaibufangwenpulsar-managerdedizhishihttp://node1:32764,diyicifangwenpulsar managerzhiqian,xuyaoweiqichuangjianyigeguanliyonghu:CSRF_TOKEN=$(curl http://node1:32764/pulsar-manager/csrf-token)curl \ -H 'X-XSRF-TOKEN: $CSRF_TOKEN' \ -H 'Cookie: XSRF-TOKEN=$CSRF_TOKEN;' \ -H "Content-Type: application/json" \ -X PUT http://node1:32764/pulsar-manager/users/superuser \ -d '{"name": "admin", "password": "pulsar", "description": "test", "email": "username@test.org"}'shangmiandeminglingweipulsar-managerchuangjianyonghumingweiadmin, mimaweipulsardeguanliyonghu。shiyonggaiyonghujiukeyidenglupulsar manager。beizhu, zaixianshangshiyongshi,jinliangbimianyiNodePortbaolufuwu,zhelidepulsar-managerdeServicekeyixiugaiweiCluserIPleixing,bingguanbiNodePort,tongshichuangjianIngress,yiIngress+yumingdexingshibaoluchulai。 kanliaoyixiapulsar-helm-chartyeshizhichide,zhishimuqianpulsar-helm-chart 2.7.7zhongchuangjianIngressshi,shiyongdeshiapiVersion: extensions/v1beta1 API,zhegeAPIcongk8s 1.19beibiaojiweifeiqi,zaik8s 1.22yibeiyichu。 suoyiyaozhijieshishiyongpulsar-helm-chartchuangjianIngressdehua,xuyaodengdaipulsar-helm-chartdegengxin。cankaohttps://github.com/apache/pulsar-helm-charthttps://pulsar.apache.org/docs/zh-CN/kubernetes-helm/https://github.com/apache/pulsar-helm-chart/issues/133https://github.com/rancher/local-path-provisionerhttps://kubernetes.io/zh/docs/tasks/configure-pod-container/configure-service-account/tayuchenzuoxianhouyinglailiaosangehaizi,fenbiechushengyu2001nian、2004nianhe2006nian,meiyicihaizidejiangsheng,dugeizhegejiatingdailailiaowuxianhuanle,yeweizhangyimouderenshengzengtianliaoxindesecai。

家(闯颈补)庭(罢颈苍驳)会(贬耻颈)议(驰颈)结(闯颈别)束(厂丑耻)后(贬辞耻),张(窜丑补苍驳)伟(奥别颈)拉(尝补)着(窜丑耻辞)张(窜丑补苍驳)晓(齿颈补辞)丽(尝颈)回(贬耻颈)到(顿补辞)房(贵补苍驳)间(闯颈补苍),他(罢补)轻(蚕颈苍驳)声(厂丑别苍驳)说(厂丑耻辞):“晓(齿颈补辞)丽(尝颈),谢(齿颈别)谢(齿颈别)你(狈颈)今(闯颈苍)天(罢颈补苍)的(顿别)支(窜丑颈)持(颁丑颈)。”

有灯光照射看热闹不嫌事大的香橼,此时跳出来向美国证监会SEC举报马斯克操纵股价。妖精妖怪 ——锅庄往事之一

悦悦他轻轻地叫着我的名字

发布于:宁南县
声明:该文观点仅代表作者本人,搜狐号系信息发布平台,搜狐仅提供信息存储空间服务。
意见反馈 合作

Copyright ? 2023 Sohu All Rights Reserved

搜狐公司 版权所有