Crunchy pgo安裝

zchbaby2000發表於2022-10-04

最近需要在專案中安裝Crunchy pgo (postgres operator),使用的是來自於private Registry的docker images

我們根據Crunchy的官方說明文件

https://access.crunchydata.com/documentation/postgres-operator/5.2.0/guides/private-registries/ 

來實踐,發現其實有2個方法實現,其中第一個方法完全參考官方說明文件,第二個方法是參考Kubernets Deployment yaml檔案的寫法。


方法一:

vi kustomize/install/default/kustomization.yaml

==============================================================

namespace: crunchy-postgres-operator

commonLabels:
  app.kubernetes.io/name: pgo
  # The version below should match the version on the PostgresCluster CRD
  app.kubernetes.io/version: 5.2.0

bases:
- ../crd
- ../rbac/cluster
- ../manager

images:
- name: postgres-operator
  newName: xxxxxx/xxxxxx/postgres-operator
  newTag: ubi8-5.2.0-0
- name: postgres-operator-upgrade
  newName: xxxxxx/xxxxxx/postgres-operator-upgrade
  newTag: ubi8-5.2.0-0

patchesJson6902:
- target: { group: apps, version: v1, kind: Deployment, name: pgo }
  path: selectors.yaml
- target: { group: apps, version: v1, kind: Deployment, name: pgo-upgrade }
  path: selectors.yaml
- target:
    group: apps
    version: v1
    kind: Deployment
    name: pgo
  patch: |-
    - op: add
      path: /spec/template/spec/imagePullSecrets
      value:
        - name: access-aws-cr
- target:
    group: apps
    version: v1
    kind: Deployment
    name: pgo-upgrade
  patch: |-
    - op: add
      path: /spec/template/spec/imagePullSecrets
      value:
        - name: access-aws-cr

==============================================================

方法二: 修改下面的兩個檔案

./manager/manager-upgrade.yaml

      serviceAccountName: postgres-operator-upgrade
      imagePullSecrets:
      - name: access-aws-cr


./manager/manager.yaml

      serviceAccountName: pgo
      imagePullSecrets:
      - name: access-aws-cr



來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/725820/viewspace-2917054/,如需轉載,請註明出處,否則將追究法律責任。

相關文章