Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fixes #105] Task:make postgres operator installation optional #150

Merged

Conversation

mwallschlaeger
Copy link
Contributor

@mwallschlaeger mwallschlaeger commented Feb 26, 2024

Description

CHANGED VALUES.YAML. This may not be compatible with previous versions.

This issue target the situation that you already have a postgres-operator running in your cluster and want to use it without using the external database configuration in geonode-k8s.

So from now on user can choose what kind of postgres type the gonna use by setting the postgres.type variable ether to operator or external. If your're using the operator you can further decide to install the postgres-operator into your cluster by setting the postgres-operator.enabled = True, if not geonode-k8s expects a postgres operator to be available inside your cluster.
When setting postgres.type to external you need to set your database passwords inside the values.yaml like describe in docs/external_database or provide an self spinned secret set defined in: postgres.external.secret.existingSecretName.

  1. operator example without installing the operator when installing geonode-k8s:
postgres-operator:
  enabled: False

postgres:
  type: operator
  operator:
    storageSize: 2Gi
    numberOfInstances: 1
    postgres_version: 15
  1. operator example with installing the operator when installing geonode-k8s (default in minikube-values.yaml):
postgres-operator:
  enabled: True

postgres:
  type: operator
  operator:
    storageSize: 2Gi
    numberOfInstances: 1
    postgres_version: 15
  1. external example setting db passwords in values.yaml (default in minikube-values-external-db.yaml):
postgres:
  type: external
  username: postgres
  geonode_databasename_and_username: geonode
  geodata_databasename_and_username: geodata

  external:
    hostname: "external-postgres.com"
    port: 5432
    secret:
      postgres_password: please-fill-out
      geonode_password: please-fill-out
      geodata_password: please-fill-out

postgres-operator:
  enabled: False
  1. external example setting db passwords in beforehand configured secret:
postgres:
  type: external
  username: postgres
  geonode_databasename_and_username: geonode
  geodata_databasename_and_username: geodata

  external:
    hostname: "external-postgres.com"
    port: 5432
    secret:
      existingSecretName: "geonode-postgres-db-passwords"

postgres-operator:
  enabled: False

Type of Change

Please select the relevant option:

  • Bug fix
  • New feature
  • Documentation update
  • Refactoring
  • Other (please describe)

Related Issue

If there is an existing issue related to this pull request, please reference it here.

closes #105

Checklist

Please ensure that your pull request meets the following requirements:

  • The pull request is limited to one type (docs, feature, bug fix, etc.)
  • The pull request is as small as possible. Consider opening multiple pull requests instead of one large one.
  • The feature or bug fix has been discussed and documented in an issue beforehand.

Additional Notes

Any additional information or context regarding the pull request can be provided here.

Thank you for creating this pull request

@mwallschlaeger mwallschlaeger added documentation Improvements or additions to documentation feature new required feature 1.1.0 labels Feb 26, 2024
@mwallschlaeger mwallschlaeger self-assigned this Feb 26, 2024
Copy link

gitguardian bot commented Feb 26, 2024

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
9671131 Triggered Generic Database Assignment 1a6c222 minikube-values-external-db.yaml View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Our GitHub checks need improvements? Share your feedbacks!

@AlexGacon
Copy link
Collaborator

Quite a breaking change but you documented it clearly. I would have avoid to bring not related stuff in the PR (like renaming unrelated fields or removing postgres operatore UI) but looking good to me.

Copy link
Collaborator

@AlexGacon AlexGacon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my previous comment.

Looking good to me

@mwallschlaeger mwallschlaeger merged commit a836e56 into main Feb 27, 2024
2 checks passed
@mwallschlaeger mwallschlaeger deleted the issue_#105_Task_postgres-operator_installation_optional branch February 27, 2024 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation feature new required feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Task: postgres-operator installation optional
2 participants