是否有一个示例,说明如何设置KubeDB PostgreSQL流复制群集,其中每个Pod的数据都使用Google Cloud的Local SSDs(每个PG节点需要合并2x375GB SSD)。
我知道本地SSD是临时的-对于我的用例而言,性能和扩展性的简化更为重要,并且我的数据可以在一天内重新生成。
第一个链接中的KubeDB文档具有这两个设置,但是我不确定如何配置pod亲和力,以及如何将两个本地SSD初始化(合并)为一个PostgreSQL的一部分。
Widget wartawanBuilderSearch(BuildContext context, int index) { ThemeData localTheme = Theme.of(context); return Container( margin: EdgeInsets.all(8), child: Column( crossAxisAlignment: CrossAxisAlignment.center, children: <Widget>[ Expanded( child: Container( child: Hero( tag: wartawans[index].idWartawan, child: Material( color: Colors.transparent, child: InkWell( onTap: () => Navigator.push( context, PageTransition( type: PageTransitionType.downToUp, child: WartawanDetail( idWartawan:wartawans[index].idWartawan, gambarWartawan: wartawans[index].gambarWartawan, namaWartawan: wartawans[index].namaWartawan, ), ), ), child: CircleAvatar( backgroundColor: Colors.red, radius: 50, backgroundImage: AssetImage(wartawans[index].gambarWartawan), ), ), ), ), ), ), Container( child: Align( alignment: Alignment.bottomLeft, child: Text( wartawans[index].namaWartawan, style: localTheme.textTheme.caption .copyWith(fontSize: 14, fontWeight: FontWeight.bold), overflow: TextOverflow.ellipsis, ), ), ) ], ), ); }
指定将用于的存储类型 Postgres数据库。它可以是spec.storageType
或Durable
。的默认值 这个领域是持久的。如果使用临时的,那么KubeDB将创建 使用EmptyDir卷的Postgres数据库。在这种情况下,您没有 指定spec.storage字段。这对于测试很有用。
Ephemeral
指定PVC的大小和StorageClass。 动态分配以存储此数据库的数据。该存储 规范将传递给由KubeDB运算符创建的StatefulSet,以 运行数据库容器。您可以指定任何可用的StorageClass 具有适当资源请求的集群。如果您不指定spec.storage
,则此字段为必填。