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 ability to disable connection info secret creation #599

Merged
merged 8 commits into from
Jan 26, 2024

Conversation

rriski
Copy link
Contributor

@rriski rriski commented Jan 23, 2024

Adds a connInfoSecretTargetDisabled field to resources that generate connection info secrets.

The following restrictions apply:

  • connInfoSecretTargetDisabled can only be set on newly created resources
  • connInfoSecretTargetDisabled cannot be mutated once set

These restrictions are in place due to the following factors because we don't want to delete secrets of previously created resources that may be depended on. For the same reason, we don't allow mutating the field once set so as to not delete secrets. In theory, we could allow changing the value from true to false, which would have the effect of 1) not creating the secret at resource provisioning time because connInfoSecretTargetDisabled: true and 2) at update time, the secret would be created. We decided to not implement this behaviour at this time.

Resolves #541

@rriski rriski force-pushed the rriski-optionally-disable-conninfosecret branch 9 times, most recently from 66ad1e4 to 3fe621f Compare January 25, 2024 15:13
@rriski rriski marked this pull request as ready for review January 25, 2024 15:40
@rriski rriski requested a review from a team January 25, 2024 15:40
@rriski
Copy link
Contributor Author

rriski commented Jan 25, 2024

tests

@rriski rriski force-pushed the rriski-optionally-disable-conninfosecret branch from 3fe621f to 6cfd938 Compare January 25, 2024 15:53
Copy link
Contributor

@byashimov byashimov left a comment

Choose a reason for hiding this comment

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

Only docstrings are mandatory to fix. Otherwise, looks great to me.

api/v1alpha1/serviceuser_types.go Outdated Show resolved Hide resolved
api/v1alpha1/serviceuser_types.go Show resolved Hide resolved
tests/service_opts_test.go Outdated Show resolved Hide resolved
tests/service_opts_test.go Outdated Show resolved Hide resolved
@rriski rriski force-pushed the rriski-optionally-disable-conninfosecret branch from 6cfd938 to 6e7334d Compare January 26, 2024 09:49
@rriski rriski force-pushed the rriski-optionally-disable-conninfosecret branch from 6e7334d to 35ed541 Compare January 26, 2024 10:02
Copy link
Contributor

@byashimov byashimov left a comment

Choose a reason for hiding this comment

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

lgtm

@byashimov byashimov merged commit 00d48c6 into main Jan 26, 2024
7 of 8 checks passed
@byashimov byashimov deleted the rriski-optionally-disable-conninfosecret branch January 26, 2024 10:08
@Serpentiel Serpentiel added the enhancement New feature or request label Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A way to disable creation of connInfoSecret
3 participants