Git Product home page Git Product logo

cloud-resource-operator's Issues

Create PVC finalizer

Issue

We need deletion protection on the PVC we create with both Redis and Postgres.

Currently when we create an openshift instance of Redis or Postgres we do not add a finalizer to the PVC. This could make it easier for accidental deletion of the PVC from the cluster.

Solution

We should add the finalizer when we create the PVC.

We will also need to remove the finalizer when DeletePostgres is called.

All logic can be found in pkg/providers/openshift/provider_postgres.go

Verify

  • Have an Openshift or Kubernetes cluster
  • Run make cluster/prepair
  • Make sure deploy/crds/integreatly_v1alpha_postgres_cr.yaml has the spec/type set to workshop
  • Run make cluster/seed/postgres
  • Run make run
  • A postgres instance should be created in the cloud-resource-operator
  • Ensure the finalizer has been added to the PVC
  • Search for postgres in cluster, and remove the resource this should tripper the operator to begin deletion of the postgres instance
  • Ensure the finalizer is removed and the postgres instance is removed completely from the cluster.

Contribution

  • Star Repo
  • Fork Repo
  • Create new branch on your fork
  • Run make test/unit before pushing changes to branch
  • Create PR against master branch on this Repo

De-duplicate create kubernetes secret function

Issue

Currently when creating a postgres resource in openshift and aws we need to pre create a secret within our cluster that will be used as the default user and password to the postgres instance. This work is duplicated in both aws/provider_postgres.go and openshift/provider_postgres.go

Solution

Create a postgres_util in the provider directory which will de-duplicate the buildDefaultPostgresSecret function

Verify

  • Have an Openshift or Kubernetes cluster
  • Run make cluster/prepair
  • Make sure deploy/crds/integreatly_v1alpha_postgres_cr.yaml has the spec/type set to workshop
  • Run make cluster/seed/postgres
  • Run make run
  • A postgres instance should be created in the cloud-resource-operator
  • Ensure the secret is created and contains user, password and database
  • Search for postgres in cluster, and remove the resource this should tripper the operator to begin deletion of the postgres instance
  • Ensure the finalizer is removed and the postgres instance is removed completely from the cluster.

Contribution

  • Star Repo
  • Fork Repo
  • Create new branch on your fork
  • Run make test/unit before pushing changes to branch
  • Create PR against master branch on this Repo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.