Advertisement
Guest User

postgresql

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