Skip to content

Commit

Permalink
Removed Postgres upgrade code (12 to 15)
Browse files Browse the repository at this point in the history
Signed-off-by: Danny Zaken <[email protected]>
  • Loading branch information
dannyzaken committed Apr 2, 2024
1 parent e40e407 commit 997c693
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 340 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ gen-olm: gen

gen-odf-package: cli
rm -rf $(MANIFESTS)
MANIFESTS="$(MANIFESTS)" CSV_NAME="$(csv-name)" SKIP_RANGE="$(skip-range)" REPLACES="$(replaces)" CORE_IMAGE="$(core-image)" DB_IMAGE="$(db-image)" OPERATOR_IMAGE="$(operator-image)" COSI_SIDECAR_IMAGE="$(cosi-sidecar-image)" OBC_CRD="$(obc-crd)" PSQL_12_IMAGE="$(psql-12-image)" build/gen-odf-package.sh
MANIFESTS="$(MANIFESTS)" CSV_NAME="$(csv-name)" SKIP_RANGE="$(skip-range)" REPLACES="$(replaces)" CORE_IMAGE="$(core-image)" DB_IMAGE="$(db-image)" OPERATOR_IMAGE="$(operator-image)" COSI_SIDECAR_IMAGE="$(cosi-sidecar-image)" OBC_CRD="$(obc-crd)" build/gen-odf-package.sh
@echo "✅ gen-odf-package"
.PHONY: gen-odf-package

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ The following options can be passed to any command:
--pg-ssl-unauthorized=false: Allow the client to work with self-signed ssl (external postgres - server-side)
--postgres-url='': url for postgresql
--prometheus-namespace='': namespace with installed prometheus for autoscaler
--psql-12-image='centos/postgresql-12-centos7': The database old container image
--pv-pool-default-storage-class='': The default storage class name for BackingStores of type pv-pool
--s3-load-balancer-source-subnets=[]: The source subnets for the S3 service load balancer
--show-secrets=false: Show the secrets in the status output
Expand Down
5 changes: 1 addition & 4 deletions build/gen-odf-package.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

if [ "${MANIFESTS}" == "" ] || [ "${CSV_NAME}" == "" ] || [ "${CORE_IMAGE}" == "" ] || [ "${PSQL_12_IMAGE}" == "" ] || [ "${DB_IMAGE}" == "" ] || [ "${OPERATOR_IMAGE}" == "" ] || [ "${COSI_SIDECAR_IMAGE}" == "" ]
if [ "${MANIFESTS}" == "" ] || [ "${CSV_NAME}" == "" ] || [ "${CORE_IMAGE}" == "" ] || [ "${DB_IMAGE}" == "" ] || [ "${OPERATOR_IMAGE}" == "" ] || [ "${COSI_SIDECAR_IMAGE}" == "" ]
then
echo "gen-odf-package.sh: not all required envs were supplied"
exit 1
Expand All @@ -16,7 +16,6 @@ echo "--obc-crd=${OBC_CRD}"
--replaces "${REPLACES}" \
--noobaa-image ${CORE_IMAGE} \
--db-image ${DB_IMAGE} \
--psql-12-image ${PSQL_12_IMAGE} \
--operator-image ${OPERATOR_IMAGE} \
--cosi-sidecar-image ${COSI_SIDECAR_IMAGE} \
--obc-crd=${OBC_CRD}
Expand All @@ -35,8 +34,6 @@ cat >> ${temp_csv} << EOF
name: noobaa-core
- image: ${DB_IMAGE}
name: noobaa-db
- image: ${PSQL_12_IMAGE}
name: noobaa-psql-12
- image: ${OPERATOR_IMAGE}
name: noobaa-operator
EOF
Expand Down
4 changes: 0 additions & 4 deletions pkg/olm/olm.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,10 +293,6 @@ func GenerateCSV(opConf *operator.Conf, csvParams *generateCSVParams) *operv1.Cl
Name: "NOOBAA_DB_IMAGE",
Value: options.DBImage,
},
corev1.EnvVar{
Name: "NOOBAA_PSQL_12_IMAGE",
Value: options.Psql12Image,
},
corev1.EnvVar{
Name: "ENABLE_NOOBAA_ADMISSION",
Value: "true",
Expand Down
8 changes: 0 additions & 8 deletions pkg/options/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@ var NooBaaImage = ContainerImage
// it can be overridden for testing or different registry locations.
var DBImage = "quay.io/sclorg/postgresql-15-c9s"

// Psql12Image is the default postgres12 db image url
// currently it can not be overridden.
var Psql12Image = "centos/postgresql-12-centos7"

// DBType is the default db image type
// it can be overridden for testing or different types.
var DBType = "postgres"
Expand Down Expand Up @@ -218,10 +214,6 @@ func init() {
&DBImage, "db-image",
DBImage, "The database container image",
)
FlagSet.StringVar(
&Psql12Image, "psql-12-image",
Psql12Image, "The database old container image",
)
FlagSet.StringVar(
&CosiSideCarImage, "cosi-sidecar-image",
CosiSideCarImage, "The cosi side car container image",
Expand Down
Loading

0 comments on commit 997c693

Please sign in to comment.