PostgresContainerImage returns the container image to use for PostgreSQL.
(cluster *v1beta1.PostgresCluster)
| 92 | |
| 93 | // PostgresContainerImage returns the container image to use for PostgreSQL. |
| 94 | func PostgresContainerImage(cluster *v1beta1.PostgresCluster) string { |
| 95 | image := cluster.Spec.Image |
| 96 | key := "RELATED_IMAGE_POSTGRES_" + fmt.Sprint(cluster.Spec.PostgresVersion) |
| 97 | |
| 98 | if version := cluster.Spec.PostGISVersion; version != "" { |
| 99 | key += "_GIS_" + version |
| 100 | } |
| 101 | |
| 102 | return defaultFromEnv(image, key) |
| 103 | } |
| 104 | |
| 105 | // PGONamespace returns the namespace where the PGO is running, |
| 106 | // based on the env var from the DownwardAPI |