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

CLOUDP-237545: Ignore tenant readonly fields for Kubernetes generation #2771

Merged
merged 6 commits into from Mar 19, 2024

Conversation

roothorp
Copy link
Collaborator

@roothorp roothorp commented Mar 15, 2024

Proposed changes

When generating configuration/YAML for the Atlas Kubernetes Operator via the CLI, and the deployment is a shared/tenant cluster, read only fields (such as biConnector) are still exported and the operator tries to apply them. This results in an error from the Atlas API, as readonly attributes cannot be set.

This change means that when we are generating configuration for a shared cluster, we remove the readonly fields to avoid this issue; replicating the logic already used in the CLI here.

Jira ticket: CLOUDP-237545

Checklist

  • I have signed the MongoDB CLA
  • I have added tests that prove my fix is effective or that my feature works
  • I have added any necessary documentation in document requirements section listed in CONTRIBUTING.md (if appropriate)
  • I have addressed the @mongodb/docs-cloud-team comments (if appropriate)
  • I have updated test/README.md (if an e2e test has been added)
  • I have run make fmt and formatted my code

Further comments

@roothorp roothorp requested a review from a team as a code owner March 15, 2024 12:23
@igor-karpukhin igor-karpukhin requested a review from a team March 15, 2024 12:38
Copy link
Collaborator

@s-urbaniak s-urbaniak left a comment

Choose a reason for hiding this comment

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

see comment

Copy link
Collaborator

@s-urbaniak s-urbaniak left a comment

Choose a reason for hiding this comment

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

one change please as this can panic.

Copy link
Collaborator

@s-urbaniak s-urbaniak left a comment

Choose a reason for hiding this comment

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

one change, else LGTM

internal/kubernetes/operator/deployment/deployment_test.go Outdated Show resolved Hide resolved
Co-authored-by: Sergiusz Urbaniak <sergiusz.urbaniak@gmail.com>
@roothorp roothorp merged commit b6d1f93 into master Mar 19, 2024
19 checks passed
@roothorp roothorp deleted the CLOUDP-237545-kubernetes-ignore-readonly branch March 19, 2024 10:38
@fmenezes fmenezes mentioned this pull request Apr 5, 2024
6 tasks
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.

None yet

3 participants