-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
New txt registry format #3774
base: master
Are you sure you want to change the base?
New txt registry format #3774
Conversation
2dab263
to
ca4b495
Compare
The code also needs to be able to read the metadata format. The code does not need to support all possible combinatorics of generating old, new, and metadata. There are only two possible states needed: transition and metadata-only. In transition (default) it should generate metadata format for all records, old format for non-AAAA records, and new format for AAAA records. In metadata-only, it should only generate metadata-format records. In all cases it should read all three formats. If it reads a format it is configured to not generate, it matches the owner, and it has also read a corresponding metadata-format record, then it should return an Endpoint so the older record gets deleted. See #3726. |
65c013f
to
84c7061
Compare
@johngmyers I hope I have understood this correctly. I have to think about how to solve it better in extractRecordType.
CNAME should also use the new format. This is because it is not possible to create a TXT and CNAME record for the same name. It may be better to change the type to bool and rename the flag to TXTFormatTransitionEnabled. |
2fa0d02
to
b7b38db
Compare
@cgroschupp are you able to rebase? |
3d1a9d4
to
d32b169
Compare
d32b169
to
be7d243
Compare
@johngmyers done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're getting close. Consider taking this out of Draft state.
registry/txt.go
Outdated
@@ -215,7 +219,7 @@ func (im *TXTRegistry) generateTXTRecord(r *endpoint.Endpoint) []*endpoint.Endpo | |||
|
|||
endpoints := make([]*endpoint.Endpoint, 0) | |||
|
|||
if !im.mapper.recordTypeInAffix() && r.RecordType != endpoint.RecordTypeAAAA { | |||
if !im.mapper.recordTypeInAffix() && im.txtFormat == "transition" && r.RecordType != endpoint.RecordTypeAAAA && r.RecordType != endpoint.RecordTypeCNAME { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we should suppress these for type CNAME. I've seen cases where the "new" format wasn't created because the domain got too long. The old format was created because the CNAME was really a Route53 alias record. Perhaps we just need to make this dependent on #3910.
registry/txt_test.go
Outdated
@@ -451,6 +471,7 @@ func testTXTRegistryApplyChanges(t *testing.T) { | |||
t.Run("With Templated Suffix", testTXTRegistryApplyChangesWithTemplatedSuffix) | |||
t.Run("With Suffix", testTXTRegistryApplyChangesWithSuffix) | |||
t.Run("No prefix", testTXTRegistryApplyChangesNoPrefix) | |||
t.Run("No prefix Metadata Only", testTXTRegistryApplyChangesNoPrefixMetadataOnly) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Call this just "Metadata only". The results should be the same for with-prefix and with-suffix and the code should test those cases as well.
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold for #3910 |
@cgroschupp please update to account for changes in #3910. /hold cancel |
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/label tide/merge-method-squash |
@cgroschupp are you able to rebase and adjust for changes from #3910? |
@cgroschupp Do you think you can rebase this PR ? |
@cgroschupp: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
@cgroschupp Are you still planning to continue with this PR? @johngmyers Were the changes required to account for #3910 the only outstanding actions stopping this being merged? Keen to see a resolution to #3757 and this PR seems like the best approach so far |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
/remove-lifecycle rotten |
Description
Added new txt format metadata
Fixes #3757
Checklist