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

Add auth v2 e2e tests using PowerMax mount credentials #892

Draft
wants to merge 9 commits into
base: usr/spark/mount-credentials
Choose a base branch
from

Conversation

xuluna
Copy link
Contributor

@xuluna xuluna commented Feb 6, 2025

Description

Add E2E tests that installs the Powermax driver using mount credentials and enables Authorization v2.

GitHub Issues

List the GitHub issues impacted by this PR:

GitHub Issue #
dell/csm#1614

Checklist:

  • I have performed a self-review of my own code to ensure there are no formatting, vetting, linting, or security issues
  • I have verified that new and existing unit tests pass locally with my changes
  • I have not allowed coverage numbers to degenerate
  • I have maintained at least 90% code coverage
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have maintained backward compatibility
  • I have executed the relevant end-to-end test scenarios

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration


falfaroc and others added 9 commits January 21, 2025 16:36
* Add new powermax and reverseproxy cr

* Add dynamic secret mounting for reverseproxy

By providing the secret name, we assume that we are using the new secret configuration for PowerMax.
This propagates the information and sets the useSecret to true in the reverseProxy. Also,
it automatically creates the volume and mount for the reverseProxy.

* Dynamically mount either the configMap or secret for PowerMax

* Remove unused code

* Add unit tests for PowerMax secret

* Fix deployment of reverse proxy sidecar with secret

* Update use secret environment variable

* Update unit tests

* Update reverse proxy controller yaml

* Update powermax secret variable processing

* Add PowerMax secret e2e test

* Update steps def for e2e tests

* gofumpt all files

* Address validation errors

* Cleanup variable setting for PowerMax secret

* Address validation errors

* Address PR comments and add e2e test

* Update copyrights
)

* Support Powermax mount credentials with minimal manifest

* Fix Powermax reverse proxy minimal manifest confusion

* Fix Powermax unit tests

* Fix linting issues

* Add PowerMax Mount Credentials minimal manifest e2e test

* Fix warning syntax
* Dynamically mount config params in the reverse proxy

Also, dynamically adds the reverse proxy port to the config params

* Dynamically mount config params in the reverse proxy for non-sidecar

* Clean up dynamically adding parameters and add unit tests

* Address lint errors

* Address gosec errors

* Cleanup duplicate code and remove not needed sections

* Address lint errors
* Dynamically mount secret or config map on Powermax observability

* Remove unused code

* Add PowerMax observability mount credentials unit tests

* Add PowerMax observability mount credentials e2e test

* Ensure that minimal manifest with mount credentials works

Adds e2e test to cover this scenario

* Generalize min version for Mount Credential variable
@@ -6,7 +6,7 @@ env:
value: /etc/config/configmap
- name: X_CSI_REVPROXY_CONFIG_FILE_NAME
value: config.yaml
- name: X_CSI_REVRPOXY_IN_CLUSTER
- name: X_CSI_REVPROXY_IN_CLUSTER
Copy link
Contributor

Choose a reason for hiding this comment

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

question: I don't think we should update the environment variable in older releases because that change wouldn't be in the code parsing, right?

backupEndpoint: "https://REPLACE_AUTH_ENDPOINT"
managementServers:
- endpoint: "https://REPLACE_AUTH_ENDPOINT"
username: REPLACE_USERNAME
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: Don't replace username and password (leave as -) so that there isn't any confusion with what needs to be added in the secret.

@falfaroc falfaroc force-pushed the usr/spark/mount-credentials branch from e6d958f to 02983b8 Compare February 14, 2025 18:52
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.

2 participants