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

Prepare shared code: Support running on non default dns settings #893

Merged
merged 30 commits into from
Oct 17, 2024

Conversation

maltesander
Copy link
Member

@maltesander maltesander commented Oct 16, 2024

Description

Part of stackabletech/issues#436.

Definition of Done Checklist

  • Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
  • Please make sure all these things are done and tick the boxes

Author

Reviewer

Acceptance

@Techassi Techassi self-requested a review October 16, 2024 12:37
@sbernauer sbernauer self-requested a review October 16, 2024 13:51
Copy link
Member

@Techassi Techassi left a comment

Choose a reason for hiding this comment

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

Partial review.

Would you mind if I added a bunch of commits to this PR to adjust a few things?

crates/stackable-operator/CHANGELOG.md Outdated Show resolved Hide resolved
crates/stackable-operator/src/utils/cluster_domain.rs Outdated Show resolved Hide resolved
crates/stackable-operator/src/utils/cluster_domain.rs Outdated Show resolved Hide resolved
crates/stackable-operator/src/utils/cluster_domain.rs Outdated Show resolved Hide resolved
crates/stackable-operator/src/utils/cluster_domain.rs Outdated Show resolved Hide resolved
@maltesander
Copy link
Member Author

Partial review.

Would you mind if I added a bunch of commits to this PR to adjust a few things?

Just pushed my test fix, did not look at your changes. Dont plan on pushing more today (do a little testing) so feel free to add :)

Techassi and others added 10 commits October 16, 2024 16:52
There is still some bits and pieces we want to change, mostly regarding
the error type / error handling.

This commit also moves the input fixtures for testing the resolv parser
into dedicated files and utilizies rstest's #[files] attribute to generate
tests based on these files.

Co-authored-by: Nick Larsen <[email protected]>
sbernauer
sbernauer previously approved these changes Oct 17, 2024
Copy link
Member

@sbernauer sbernauer left a comment

Choose a reason for hiding this comment

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

LGTM otherwise

crates/stackable-operator/src/utils/cluster_domain.rs Outdated Show resolved Hide resolved
crates/stackable-operator/src/utils/cluster_domain.rs Outdated Show resolved Hide resolved
Co-authored-by: Sebastian Bernauer <[email protected]>
sbernauer
sbernauer previously approved these changes Oct 17, 2024
Copy link
Member

@sbernauer sbernauer left a comment

Choose a reason for hiding this comment

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

Many thanks, looks good!

sbernauer
sbernauer previously approved these changes Oct 17, 2024
Copy link
Member

@NickLarsenNZ NickLarsenNZ left a comment

Choose a reason for hiding this comment

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

Left some suggestions about error handling. I'm happy to make the changes if you want?

crates/stackable-operator/src/utils/cluster_domain.rs Outdated Show resolved Hide resolved
crates/stackable-operator/src/utils/cluster_domain.rs Outdated Show resolved Hide resolved
crates/stackable-operator/src/utils/cluster_domain.rs Outdated Show resolved Hide resolved
crates/stackable-operator/src/utils/cluster_domain.rs Outdated Show resolved Hide resolved
crates/stackable-operator/src/utils/cluster_domain.rs Outdated Show resolved Hide resolved
crates/stackable-operator/src/utils/cluster_domain.rs Outdated Show resolved Hide resolved
crates/stackable-operator/src/utils/cluster_domain.rs Outdated Show resolved Hide resolved
Co-authored-by: Malte Sander <[email protected]>
Co-authored-by: Techassi <[email protected]>
Co-authored-by: Malte Sander <[email protected]>
Co-authored-by: Techassi <[email protected]>
Copy link
Member

@NickLarsenNZ NickLarsenNZ left a comment

Choose a reason for hiding this comment

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

LGTM

@maltesander maltesander added this pull request to the merge queue Oct 17, 2024
Merged via the queue into main with commit 5cf02b5 Oct 17, 2024
10 checks passed
@maltesander maltesander deleted the support-running-on-non-default-dns-settings branch October 17, 2024 15:48
Comment on lines +630 to +633
let _ = KUBERNETES_CLUSTER_DOMAIN
.set(retrieve_cluster_domain().context(ResolveKubernetesClusterDomainSnafu)?);
create_client(field_manager).await
}
Copy link
Member

Choose a reason for hiding this comment

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

Why is this a global?


match env::var(KUBERNETES_SERVICE_HOST_ENV) {
Ok(_) => {
let cluster_domain = retrieve_cluster_domain_from_resolv_conf(RESOLVE_CONF_FILE_PATH)?;
Copy link
Member

Choose a reason for hiding this comment

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

If we're going to do this hack (and I still don't think we should), can we please at least punt that until vNext instead of sneaking it in just before the release?

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.

5 participants