Skip to content

Conversation

@kevin-messer-jemmic
Copy link

Description

In this PR, support has been added to delete the database when deleting the CRD.

It is similar to what https://cloudnative-pg.io/documentation/current/declarative_database_management/#deleting-a-database is doing.

Related Issue(s)

Checklist

  • I have tested my changes locally.
  • My code follows the project's coding guidelines.
  • I have updated documentation, if needed.

Screenshots

N/A

Additional context

Dockerfile has been modified as well since I had this error while trying to build the dockerfile locally:

[+] Building 1.0s (11/21)                                                                                                                                                                                                                               docker:default
 => [internal] load build definition from Containerfile                                                                                                                                                                                                           0.0s
 => => transferring dockerfile: 1.04kB                                                                                                                                                                                                                            0.0s
 => [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:10.0                                                                                                                                                                                             0.1s
 => [internal] load metadata for mcr.microsoft.com/dotnet/sdk:10.0                                                                                                                                                                                                0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                                                 0.0s
 => => transferring context: 2B                                                                                                                                                                                                                                   0.0s
 => [build  1/11] FROM mcr.microsoft.com/dotnet/sdk:10.0                                                                                                                                                                                                          0.0s
 => [final 1/5] FROM mcr.microsoft.com/dotnet/aspnet:10.0@sha256:7c4246c1c384319346d45b3e24a10a21d5b6fc9b36a04790e1588148ff8055b0                                                                                                                                 0.0s
 => [internal] load build context                                                                                                                                                                                                                                 0.0s
 => => transferring context: 16.87kB                                                                                                                                                                                                                              0.0s
 => CACHED [build  2/11] WORKDIR /operator                                                                                                                                                                                                                        0.0s
 => [build  3/11] COPY . .                                                                                                                                                                                                                                        0.0s
 => [build  4/11] WORKDIR /operator/src/OperatorTemplate.Operator                                                                                                                                                                                                 0.1s
 => ERROR [build  5/11] RUN dotnet restore                                                                                                                                                                                                                        0.7s
------                                                                                                                                                                                                                                                                 
 > [build  5/11] RUN dotnet restore:
0.702 MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.
------
Containerfile:10
--------------------
   8 |     # Restore dependencies and build the operator
   9 |     WORKDIR /operator/src/OperatorTemplate.Operator
  10 | >>> RUN dotnet restore
  11 |     RUN curl -L -o cfssl https://github.com/cloudflare/cfssl/releases/download/v1.5.0/cfssl_1.5.0_linux_amd64
  12 |     RUN curl -L -o cfssljson https://github.com/cloudflare/cfssl/releases/download/v1.5.0/cfssljson_1.5.0_linux_amd64
--------------------
ERROR: failed to solve: process "/bin/sh -c dotnet restore" did not complete successfully: exit code: 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add option to delete the database when deleting the CRD

1 participant