CrunchyData / pgmonitor

PostgreSQL Monitoring, Metrics Collection and Alerting Resources from Crunchy Data
Other
530 stars 87 forks source link

No arm64 image for latest PGO container (5.6.0 release). #416

Closed shrinedogg closed 2 weeks ago

shrinedogg commented 3 weeks ago

Describe the issue:

Following the latest docs from here: https://access.crunchydata.com/documentation/postgres-operator/latest

On MacOS with M1 attempting to create a local kind: PostgresCluster from the latest PGO release fails with this error:

time="2024-07-11T12:50:24Z" level=debug msg=Warning message="Missing image(s): [crunchy-postgres]" object="{PostgresCluster gravity hippo-ha 5ec4e707-49e4-4bd3-9b7f-e366416c4cd4 postgres-operator.crunchydata.com/v1beta1 3067 }" reason=MissingRequiredImage version=5.6.0-0-arm64

Here's the manifest for the cluster:

apiVersion: postgres-operator.crunchydata.com/v1beta1
kind: PostgresCluster
metadata:
  name: hippo-ha
  namespace: gravity
spec:
  monitoring:
    pgmonitor:
      exporter:
        image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-exporter:ubi8-0.15.0-7
  users:
    - name: hippo
      databases:
       - "zoo"
      options: "SUPERUSER"
  databaseInitSQL:
    key: init.sql
    name: hippo-init-sql
  postgresVersion: 14
  instances:
    - name: pgha1
      replicas: 2
      dataVolumeClaimSpec:
        accessModes:
        - "ReadWriteOnce"
        resources:
          requests:
            storage: 1Gi
      affinity:
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
          - weight: 1
            podAffinityTerm:
              topologyKey: kubernetes.io/hostname
              labelSelector:
                matchLabels:
                  postgres-operator.crunchydata.com/cluster: hippo-ha
                  postgres-operator.crunchydata.com/instance-set: pgha1
  backups:
    pgbackrest:
      repos:
      - name: repo1
        volume:
          volumeClaimSpec:
            accessModes:
            - "ReadWriteOnce"
            resources:
              requests:
                storage: 1Gi
  proxy:
    pgBouncer:
      image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer:ubi8-1.22-1
      replicas: 1
      affinity:
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
          - weight: 1
            podAffinityTerm:
              topologyKey: kubernetes.io/hostname
              labelSelector:
                matchLabels:
                  postgres-operator.crunchydata.com/cluster: hippo-ha
                  postgres-operator.crunchydata.com/role: pgbouncer

And the HelmRelease for PGO:

apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
  name: crunchy-pgo
  namespace: gravity
spec:
  targetNamespace: gravity
  chart:
    spec:
      chart: pgo
      version: 5.6.0
      sourceRef:
        kind: HelmRepository
        name: crunchy-pgo
        namespace: gravity
  interval: 1m0s
  valuesFrom:
    - name: crunchy-pgo-values
      kind: ConfigMap

This is part of an effort to install and demonstrate the monitoring stack for PGO as an evaluation along with latest kube-prometheus-stack, and has proven to be more of a pain than expected. Are there any actual up-to-date docs for this? All I can find is a 404 at: https://github.com/CrunchyData/pgmonitor/blob/v5.0.0/v5_upgrade

Describe the expected behavior:

Latest container for kind: PostgresCluster deploys normally in local environment on M1 Mac.

Tell us about your environment:

andrewlecuyer commented 3 weeks ago

Hi @shrinedogg!

The warning event you're seeing is actually unrelated to pgMonitor. Rather, it is because you are using Postgres 14, which is not included in Crunchy Postgres for Kubernetes (CPK) v5.6.0 release, as made available via the Crunchy Developer Program.

For additional details about exactly what versions of Postgres and CPK are currently supported, I recommend checking out the Supported Platforms page within the CPK docs.

As for what you can do to address the warning, simply switching to Postgres 15 or 16 for any new clusters should address the issue.

Otherwise (e.g. if this really has you stuck within any running PostgresCluster's, etc.), I'll also note that you can also simply specify a Postgres 14 image directly within your spec (e.g. the image any running Postgres 14 clusters are already using):

apiVersion: postgres-operator.crunchydata.com/v1beta1
kind: PostgresCluster
metadata:
  name: hippo-ha
spec:
  image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-14.11-0
  postgresVersion: 14

However, if you go this route, I also recommend checking out our Major PG Upgrade docs to get onto to a new major version of Postgres ASAP. This will ensure you're able to get the latest Postgres patches and fixes moving forward.

And if you have any additional questions, I recommend reaching out to the PGO community directly via Crunchy's Discord server.