Advertisement
Guest User

possu02

a guest
Dec 1st, 2021
21
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [root@dbaasjump002 postgresql_production_configuration]# cat possu02-cr_localstorage.yaml
  2. apiVersion: pg.percona.com/v1
  3. kind: PerconaPGCluster
  4. metadata:
  5. annotations:
  6. current-primary: possu02
  7. labels:
  8. crunchy-pgha-scope: possu02
  9. deployment-name: possu02
  10. name: possu02
  11. pg-cluster: possu02
  12. pgo-version: 1.0.0
  13. pgouser: admin
  14. name: possu02
  15. spec:
  16. database: pgdb
  17. namespace: dbaas-postgresql-possu02
  18. port: "5432"
  19. user: pguser
  20. disableAutofail: false
  21. tlsOnly: false
  22. standby: false
  23. pause: false
  24. # sslCA: cluster1-ssl-ca
  25. # sslSecretName: cluster1-ssl-keypair
  26. # sslReplicationSecretName: cluster1-ssl-keypair
  27. # keepData: true
  28. # keepBackups: true
  29. # pgDataSource:
  30. # restoreFrom: ""
  31. # restoreOpts: ""
  32. # tablespaceStorages:
  33. # lake:
  34. # volumeSpec:
  35. # size: 1G
  36. # accessmode: ReadWriteOnce
  37. # storagetype: dynamic
  38. # storageclass: ""
  39. # matchLabels: ""
  40. # walStorage:
  41. # volumeSpec:
  42. # size: 1G
  43. # accessmode: ReadWriteOnce
  44. # storagetype: dynamic
  45. # storageclass: ""
  46. # matchLabels: ""
  47. userLabels:
  48. pgo-version: "1.0.0"
  49. pgPrimary:
  50. image: percona/percona-postgresql-operator:1.0.0-ppg13-postgres-ha
  51. resources:
  52. requests:
  53. memory: "128Mi"
  54. tolerations: []
  55. volumeSpec:
  56. size: 30G
  57. accessmode: ReadWriteOnce
  58. storagetype: dynamic
  59. ## Changed 19.10.21
  60. storageclass: "openebs-hostpath"
  61. volumeName: local-pv-psql
  62. ##
  63. # matchLabels: ""
  64. expose:
  65. serviceType: ClusterIP
  66. # loadBalancerSourceRanges:
  67. # annotations:
  68. # pg-cluster-annot: cluster1
  69. # labels:
  70. # pg-cluster-label: cluster1
  71. pmm:
  72. enabled: false
  73. image: percona/pmm-client:2.15.1
  74. serverHost: monitoring-service
  75. serverUser: admin
  76. pmmSecret: cluster1-pmm-secret
  77. resources:
  78. requests:
  79. memory: 200M
  80. cpu: 500m
  81. # limits:
  82. # cpu: "1"
  83. # memory: "400M"
  84. backup:
  85. image: percona/percona-postgresql-operator:1.0.0-ppg13-pgbackrest
  86. backrestRepoImage: percona/percona-postgresql-operator:1.0.0-ppg13-pgbackrest-repo
  87. resources:
  88. requests:
  89. memory: "48Mi"
  90. # limits:
  91. # cpu: "1"
  92. # memory: "64Mi"
  93. volumeSpec:
  94. size: 30G
  95. accessmode: ReadWriteOnce
  96. storagetype: dynamic
  97. ## Changed 19.10.21
  98. storageclass: "openebs-hostpath"
  99. volumeName: local-pv-psql-backup
  100. ##
  101. # matchLabels: ""
  102. storages:
  103. # us-east-1:
  104. # type: s3
  105. # region: us-east-1
  106. # endpointUrl: s3endpoint
  107. # bucket: s3bucket
  108. # repoPath: ""
  109. schedule:
  110. # - name: "sat-night-backup"
  111. # schedule: "0 0 * * 6"
  112. # keep: 3
  113. # type: full
  114. # storage: us-east-1
  115. pgBouncer:
  116. image: percona/percona-postgresql-operator:1.0.0-ppg13-pgbouncer
  117. size: 1
  118. resources:
  119. requests:
  120. cpu: "1"
  121. memory: "128Mi"
  122. limits:
  123. cpu: "2"
  124. memory: "512Mi"
  125. expose:
  126. # serviceType: ClusterIP
  127. serviceType: LoadBalancer
  128. # loadBalancerSourceRanges:
  129. # annotations:
  130. # pg-cluster-annot: cluster1
  131. # labels:
  132. # pg-cluster-label: cluster1
  133. pgReplicas:
  134. hotStandby:
  135. size: 2
  136. resources:
  137. requests:
  138. # cpu: "1"
  139. memory: "128Mi"
  140. # limits:
  141. # cpu: "1"
  142. # memory: "128Mi"
  143. volumeSpec:
  144. accessmode: ReadWriteOnce
  145. size: 30G
  146. storagetype: dynamic
  147. ## Changed 19.10.21
  148. storageclass: "openebs-hostpath"
  149. volumeName: local-pv-psql-replica
  150. ##
  151. # matchLabels: ""
  152. # affinity:
  153. # default: null
  154. # labels:
  155. # pg-cluster-label: cluster1
  156. # annotations:
  157. # pg-cluster-annot: cluster1-1
  158. enableSyncStandby: false
  159. expose:
  160. serviceType: ClusterIP
  161. # loadBalancerSourceRanges:
  162. # annotations:
  163. # pg-cluster-annot: cluster1
  164. # labels:
  165. # pg-cluster-label: cluster1
  166. pgBadger:
  167. enabled: false
  168. image: percona/percona-postgresql-operator:1.0.0-ppg13-pgbadger
  169. port: 10000
  170. # securityContext:
  171. # fsGroup: 1001
  172. # supplementalGroups: [1001, 1002, 1003]
  173.  
  174. [root@dbaasjump002 postgresql_production_configuration]# cat possu02-operator.yaml
  175. apiVersion: v1
  176. kind: ServiceAccount
  177. metadata:
  178. name: pgo-deployer-sa
  179. namespace: dbaas-postgresql-possu02
  180. ---
  181. kind: ClusterRole
  182. apiVersion: rbac.authorization.k8s.io/v1
  183. metadata:
  184. name: pgo-deployer-cr
  185. rules:
  186. - apiGroups:
  187. - ''
  188. resources:
  189. - namespaces
  190. verbs:
  191. - get
  192. - list
  193. - create
  194. - patch
  195. - delete
  196. - apiGroups:
  197. - ''
  198. resources:
  199. - pods
  200. verbs:
  201. - list
  202. - apiGroups:
  203. - ''
  204. resources:
  205. - secrets
  206. verbs:
  207. - list
  208. - get
  209. - create
  210. - delete
  211. - patch
  212. - apiGroups:
  213. - ''
  214. resources:
  215. - configmaps
  216. - services
  217. - persistentvolumeclaims
  218. verbs:
  219. - get
  220. - create
  221. - delete
  222. - list
  223. - patch
  224. - apiGroups:
  225. - ''
  226. resources:
  227. - serviceaccounts
  228. verbs:
  229. - get
  230. - create
  231. - delete
  232. - patch
  233. - list
  234. - apiGroups:
  235. - apps
  236. - extensions
  237. resources:
  238. - deployments
  239. - replicasets
  240. verbs:
  241. - get
  242. - list
  243. - watch
  244. - create
  245. - delete
  246. - apiGroups:
  247. - apiextensions.k8s.io
  248. resources:
  249. - customresourcedefinitions
  250. verbs:
  251. - get
  252. - create
  253. - delete
  254. - apiGroups:
  255. - rbac.authorization.k8s.io
  256. resources:
  257. - clusterroles
  258. - clusterrolebindings
  259. - roles
  260. - rolebindings
  261. verbs:
  262. - get
  263. - create
  264. - delete
  265. - bind
  266. - escalate
  267. - apiGroups:
  268. - rbac.authorization.k8s.io
  269. resources:
  270. - roles
  271. verbs:
  272. - create
  273. - delete
  274. - apiGroups:
  275. - batch
  276. resources:
  277. - jobs
  278. verbs:
  279. - delete
  280. - list
  281. - apiGroups:
  282. - pg.percona.com
  283. resources:
  284. - perconapgclusters
  285. - pgclusters
  286. - pgreplicas
  287. - pgpolicies
  288. - pgtasks
  289. verbs:
  290. - delete
  291. - list
  292. ---
  293. apiVersion: v1
  294. kind: ConfigMap
  295. metadata:
  296. name: pgo-deployer-cm
  297. namespace: dbaas-postgresql-possu02
  298. data:
  299. values.yaml: |-
  300. # =====================
  301. # Configuration Options
  302. # More info for these options can be found in the docs
  303. # https://access.crunchydata.com/documentation/postgres-operator/latest/installation/configuration/
  304. # =====================
  305. archive_mode: "true"
  306. archive_timeout: "60"
  307. backrest_aws_s3_bucket: ""
  308. backrest_aws_s3_endpoint: ""
  309. backrest_aws_s3_key: ""
  310. backrest_aws_s3_region: ""
  311. backrest_aws_s3_secret: ""
  312. backrest_aws_s3_uri_style: ""
  313. backrest_aws_s3_verify_tls: "true"
  314. backrest_gcs_bucket: ""
  315. backrest_gcs_endpoint: ""
  316. backrest_gcs_key_type: ""
  317. backrest_port: "2022"
  318. badger: "false"
  319. ccp_image_prefix: "percona/percona-postgresql-operator"
  320. ccp_image_pull_secret: ""
  321. ccp_image_pull_secret_manifest: ""
  322. ccp_image_tag: "1.0.0-postgres-ha"
  323. create_rbac: "true"
  324. crunchy_debug: "false"
  325. db_name: ""
  326. db_password_age_days: "0"
  327. db_password_length: "24"
  328. db_port: "5432"
  329. db_replicas: "0"
  330. db_user: "testuser"
  331. default_instance_memory: "128Mi"
  332. default_pgbackrest_memory: "48Mi"
  333. default_pgbouncer_memory: "24Mi"
  334. default_exporter_memory: "24Mi"
  335. delete_operator_namespace: "false"
  336. delete_watched_namespaces: "false"
  337. disable_auto_failover: "false"
  338. disable_fsgroup: "false"
  339. reconcile_rbac: "true"
  340. exporterport: "9187"
  341. metrics: "false"
  342. namespace: "dbaas-postgresql-possu02"
  343. namespace_mode: "dynamic"
  344. pgbadgerport: "10000"
  345. pgo_add_os_ca_store: "false"
  346. pgo_admin_password: "examplepassword"
  347. pgo_admin_perms: "*"
  348. pgo_admin_role_name: "pgoadmin"
  349. pgo_admin_username: "admin"
  350. pgo_apiserver_port: "8443"
  351. pgo_apiserver_url: "https://postgres-operator"
  352. pgo_client_cert_secret: "pgo.tls"
  353. pgo_client_container_install: "false"
  354. pgo_client_install: "false"
  355. pgo_client_version: "4.7.1"
  356. pgo_cluster_admin: "false"
  357. pgo_disable_eventing: "false"
  358. pgo_disable_tls: "false"
  359. pgo_image_prefix: "percona/percona-postgresql-operator"
  360. pgo_image_pull_policy: "Always"
  361. pgo_image_pull_secret: ""
  362. pgo_image_pull_secret_manifest: ""
  363. pgo_image_tag: "1.0.0"
  364. pgo_installation_name: "devtest"
  365. pgo_noauth_routes: ""
  366. pgo_operator_namespace: "dbaas-postgresql-possu02"
  367. pgo_tls_ca_store: ""
  368. pgo_tls_no_verify: "false"
  369. pod_anti_affinity: "preferred"
  370. pod_anti_affinity_pgbackrest: ""
  371. pod_anti_affinity_pgbouncer: ""
  372. scheduler_timeout: "3600"
  373. service_type: "ClusterIP"
  374. sync_replication: "false"
  375. backrest_storage: "default"
  376. backup_storage: "default"
  377. primary_storage: "default"
  378. replica_storage: "default"
  379. pgadmin_storage: "default"
  380. wal_storage: ""
  381. storage1_name: "default"
  382. storage1_access_mode: "ReadWriteOnce"
  383. storage1_size: "1G"
  384. storage1_type: "dynamic"
  385. storage2_name: "hostpathstorage"
  386. storage2_access_mode: "ReadWriteMany"
  387. storage2_size: "1G"
  388. storage2_type: "create"
  389. storage3_name: "nfsstorage"
  390. storage3_access_mode: "ReadWriteMany"
  391. storage3_size: "1G"
  392. storage3_type: "create"
  393. storage3_supplemental_groups: "65534"
  394. storage4_name: "nfsstoragered"
  395. storage4_access_mode: "ReadWriteMany"
  396. storage4_size: "1G"
  397. storage4_match_labels: "crunchyzone=red"
  398. storage4_type: "create"
  399. storage4_supplemental_groups: "65534"
  400. storage5_name: "storageos"
  401. storage5_access_mode: "ReadWriteOnce"
  402. storage5_size: "5Gi"
  403. storage5_type: "dynamic"
  404. storage5_class: "fast"
  405. storage6_name: "primarysite"
  406. storage6_access_mode: "ReadWriteOnce"
  407. storage6_size: "4G"
  408. storage6_type: "dynamic"
  409. storage6_class: "primarysite"
  410. storage7_name: "alternatesite"
  411. storage7_access_mode: "ReadWriteOnce"
  412. storage7_size: "4G"
  413. storage7_type: "dynamic"
  414. storage7_class: "alternatesite"
  415. storage8_name: "gce"
  416. storage8_access_mode: "ReadWriteOnce"
  417. storage8_size: "300M"
  418. storage8_type: "dynamic"
  419. storage8_class: "standard"
  420. storage9_name: "rook"
  421. storage9_access_mode: "ReadWriteOnce"
  422. storage9_size: "1Gi"
  423. storage9_type: "dynamic"
  424. storage9_class: "rook-ceph-block"
  425. ---
  426. apiVersion: rbac.authorization.k8s.io/v1
  427. kind: ClusterRoleBinding
  428. metadata:
  429. name: pgo-deployer-crb
  430. roleRef:
  431. apiGroup: rbac.authorization.k8s.io
  432. kind: ClusterRole
  433. name: pgo-deployer-cr
  434. subjects:
  435. - kind: ServiceAccount
  436. name: pgo-deployer-sa
  437. namespace: dbaas-postgresql-possu02
  438. ---
  439. apiVersion: batch/v1
  440. kind: Job
  441. metadata:
  442. name: pgo-deploy
  443. namespace: dbaas-postgresql-possu02
  444. spec:
  445. backoffLimit: 0
  446. template:
  447. metadata:
  448. name: pgo-deploy
  449. spec:
  450. serviceAccountName: pgo-deployer-sa
  451. restartPolicy: Never
  452. containers:
  453. - name: pgo-deploy
  454. image: percona/percona-postgresql-operator:1.0.0-pgo-deployer
  455. imagePullPolicy: Always
  456. env:
  457. - name: DEPLOY_ACTION
  458. value: install
  459. volumeMounts:
  460. - name: deployer-conf
  461. mountPath: "/conf"
  462. volumes:
  463. - name: deployer-conf
  464. configMap:
  465. name: pgo-deployer-cm
Advertisement
RAW Paste Data Copied
Advertisement