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

feat: add persistentVolumeClaimRetentionPolicy #1633

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

lenglet-k
Copy link

@lenglet-k lenglet-k commented Oct 17, 2024

Summary:

Add persistentVolumeClaimRetentionPolicy

Resolve this: #1391
And my issue: #1632
closes #1632

All Submissions:

@lenglet-k lenglet-k force-pushed the feat/add-persistentVolumeClaimRetentionPolicy branch from 5f82b5f to ba6a98b Compare October 24, 2024 08:46
@lenglet-k
Copy link
Author

Hello,

I need information for run e2e localy. I'm stuck because I can't construct the images:

Traceback (most recent call last):
  File "/home/klenglet/Documents/git/github/mongodb-kubernetes-operator/pipeline.py", line 294, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/klenglet/Documents/git/github/mongodb-kubernetes-operator/pipeline.py", line 287, in main
    build_and_push_image(
  File "/home/klenglet/Documents/git/github/mongodb-kubernetes-operator/pipeline.py", line 100, in build_and_push_image
    process_image(
  File "/home/klenglet/Documents/git/github/mongodb-kubernetes-operator/venv/lib/python3.11/site-packages/sonar/sonar.py", line 737, in process_image
    task_docker_build(ctx)
  File "/home/klenglet/Documents/git/github/mongodb-kubernetes-operator/venv/lib/python3.11/site-packages/sonar/sonar.py", line 577, in task_docker_build
    image = docker_build(docker_context, dockerfile, buildargs=buildargs, labels=labels, platform=platform)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/klenglet/Documents/git/github/mongodb-kubernetes-operator/venv/lib/python3.11/site-packages/sonar/builders/docker.py", line 36, in docker_build
    docker_build_cli(
  File "/home/klenglet/Documents/git/github/mongodb-kubernetes-operator/venv/lib/python3.11/site-packages/sonar/builders/docker.py", line 76, in docker_build_cli
    raise SonarAPIError(cp.stderr)
sonar.builders.SonarAPIError: b'#0 building with "objective_aryabhata" instance using docker-container driver\n\n#1 [internal] load build definition from Dockerfile.operator-f97ce7fe-91f5-45b2-9a24-a755cdce4d1b\n#1 transferring dockerfile: 470B done\n#1 WARN: InvalidDefaultArgInFrom: Default value for ARG ${imagebase} results in empty or invalid base image name (line 2)\n#1 DONE 0.0s\n\n#2 [internal] load metadata for localhost:5000/mongodb-kubernetes-operator:f97ce7fe-91f5-45b2-9a24-a755cdce4d1b-context-arm64\n#2 ERROR: failed to do request: Head "http://localhost:5000/v2/mongodb-kubernetes-operator/manifests/f97ce7fe-91f5-45b2-9a24-a755cdce4d1b-context-arm64": dial tcp [::1]:5000: connect: connection refused\n\n#3 [internal] load metadata for registry.access.redhat.com/ubi8/ubi-minimal:latest\n#3 CANCELED\n------\n > [internal] load metadata for localhost:5000/mongodb-kubernetes-operator:f97ce7fe-91f5-45b2-9a24-a755cdce4d1b-context-arm64:\n------\n\n \x1b[33m1 warning found (use docker --debug to expand):\n\x1b[0m - InvalidDefaultArgInFrom: Default value for ARG ${imagebase} results in empty or invalid base image name (line 2)\nDockerfile.operator-f97ce7fe-91f5-45b2-9a24-a755cdce4d1b:2\n--------------------\n   1 |     ARG imagebase\n   2 | >>> FROM ${imagebase} AS builder\n   3 |     \n   4 |     FROM registry.access.redhat.com/ubi8/ubi-minimal:latest\n--------------------\nERROR: failed to solve: localhost:5000/mongodb-kubernetes-operator:f97ce7fe-91f5-45b2-9a24-a755cdce4d1b-context-arm64: failed to resolve source metadata for localhost:5000/mongodb-kubernetes-operator:f97ce7fe-91f5-45b2-9a24-a755cdce4d1b-context-arm64: failed to do request: Head "http://localhost:5000/v2/mongodb-kubernetes-operator/manifests/f97ce7fe-91f5-45b2-9a24-a755cdce4d1b-context-arm64": dial tcp [::1]:5000: connect: connection refused\n'
docker ps
49f80741b06e   registry:2                      "/entrypoint.sh /etc…"   47 hours ago   Up 47 hours   127.0.0.1:5000->5000/tcp    kind-registry

@lucian-tosa
Copy link
Collaborator

Hello @lenglet-k! Thank you for your contribution.
Have you followed the steps in https://github.com/mongodb/mongodb-kubernetes-operator/blob/master/docs/contributing.md?
Also take into account the IMG_BUILD_ARGS=--insecure argument that you should pass when you build the images.

@lenglet-k
Copy link
Author

Hell @lucian-tosa , yes it's good for me. I'll write the endToend tests and that'll be it for me.

Let me know if there are any returns.

@lenglet-k
Copy link
Author

Hello @lucian-tosa what's the next for this pull request ?

@lenglet-k
Copy link
Author

Hello @lucian-tosa, have you any news for this PR ?

@lucian-tosa lucian-tosa added the safe-to-test Add this label to PRs from forks to trigger E2E tests label Nov 25, 2024
@lucian-tosa
Copy link
Collaborator

lucian-tosa commented Nov 27, 2024

Thanks for your contribution @lenglet-k! Could you please add a line in the release notes mentioning this feature?
Also, please modify the github actions template so that it runs the e2e test you created.

@lenglet-k
Copy link
Author

Thanks for your contribution @lenglet-k! Could you please add a line in the release notes mentioning this feature? Also, please modify the github actions template so that it runs the e2e test you created.

@lucian-tosa it's done :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe-to-test Add this label to PRs from forks to trigger E2E tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Need to change persistentVolumeClaimRetentionPolicy
2 participants