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

CORS-3709: GCP: Update Master pointer Ignition with API-Int IP #9085

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sadasu
Copy link
Contributor

@sadasu sadasu commented Oct 9, 2024

When userProvisionedDNS(custom-dns) is configured, the Master Pointer Ignition needs to be updated with the API-INT IP in place of the API-Int URL because at this stage in-cluster DNS is not running yet and the full Ignition needs to be downloaded.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 9, 2024
Copy link
Contributor

openshift-ci bot commented Oct 9, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from sadasu. For more information see the Kubernetes Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sadasu sadasu changed the title WIP: CORS 3709: GCP: Update Master pointer Ignition with API-Int IP CORS 3709: GCP: Update Master pointer Ignition with API-Int IP Oct 9, 2024
@sadasu
Copy link
Contributor Author

sadasu commented Oct 9, 2024

/jira refresh

@openshift-ci-robot
Copy link
Contributor

@sadasu: No Jira issue is referenced in the title of this pull request.
To reference a jira issue, add 'XYZ-NNN:' to the title of this pull request and request another refresh with /jira refresh.

In response to this:

/jira refresh

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 9, 2024
@sadasu sadasu changed the title CORS 3709: GCP: Update Master pointer Ignition with API-Int IP CORS-3709: GCP: Update Master pointer Ignition with API-Int IP Oct 10, 2024
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Oct 10, 2024
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Oct 10, 2024

@sadasu: This pull request references CORS-3709 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.18.0" version, but no target version was set.

In response to this:

When userProvisionedDNS(custom-dns) is configured, the Master Pointer Ignition needs to be updated with the API-INT IP in place of the API-Int URL because at this stage in-cluster DNS is not running yet and the full Ignition needs to be downloaded.

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 openshift-eng/jira-lifecycle-plugin repository.

@sadasu
Copy link
Contributor Author

sadasu commented Oct 10, 2024

/jira refresh

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Oct 10, 2024

@sadasu: This pull request references CORS-3709 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.18.0" version, but no target version was set.

In response to this:

/jira refresh

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 openshift-eng/jira-lifecycle-plugin repository.

return nil, fmt.Errorf("failed to unmarshal master ignition: %w", err)
}

ignitionHost := net.JoinHostPort(privateLBs[0], "22623")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
ignitionHost := net.JoinHostPort(privateLBs[0], "22623")
if len(privateLBs) == 0 {
return nil, fmt.Errorf("no private load balancer ip address found")
}
ignitionHost := net.JoinHostPort(privateLBs[0], "22623")

@@ -35,7 +41,8 @@ const (
// EditIgnition attempts to edit the contents of the bootstrap ignition when the user has selected
// a custom DNS configuration. Find the public and private load balancer addresses and fill in the
// infrastructure file within the ignition struct.
func EditIgnition(ctx context.Context, in clusterapi.IgnitionInput) ([]byte, error) {
func EditIgnition(ctx context.Context, in clusterapi.IgnitionInput) ([]byte, []byte, error) {
// Why do we need another context here?
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't this is going away I believe.

@@ -35,7 +41,8 @@ const (
// EditIgnition attempts to edit the contents of the bootstrap ignition when the user has selected
// a custom DNS configuration. Find the public and private load balancer addresses and fill in the
// infrastructure file within the ignition struct.
func EditIgnition(ctx context.Context, in clusterapi.IgnitionInput) ([]byte, error) {
func EditIgnition(ctx context.Context, in clusterapi.IgnitionInput) ([]byte, []byte, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any scenario the installer has where the bootstrap AND master don't need to both be edited? Wondering If this needs to be separated into two functions for EditBootstrapIgnition and EditControlPlaneIgnition.

Copy link
Contributor Author

@sadasu sadasu Oct 11, 2024

Choose a reason for hiding this comment

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

The control-plane pointer ignition is updated in its own method updatePointerIgnition().
I had considered the scenario that you mentioned. I am sure there might be times when only one Ignition needs to be updated. But, I am unable to come up with an example now.

These methods to manipulate the ignition are very specific to the exact changes needed for custom-dns. I think it is OK to design these just for this purpose without worrying about other scenarios where we might need Ignition editing functions that are completely generic and independent of each other.

Copy link
Contributor

Choose a reason for hiding this comment

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

I am ok with this. I just thought we should consider it.

When userProvisionedDNS(custom-dns) is configured, the Master
Pointer Ignition needs to be updated with the API-INT IP in place
of the API-Int URL because at this stage in-cluster DNS is not
running yet and the full Ignition needs to be downloaded.
When Master Pointer Ignition is updated with the API-Int IP address
in place of the API-Int URL, update the Master Machine Configs
within the Bootstrap Ignition with this new Master Pointer Ignition.
@sadasu sadasu force-pushed the sdasu-update-pointer-ignition branch from 5bbfb16 to 463285c Compare October 11, 2024 21:45
Copy link
Contributor

openshift-ci bot commented Oct 12, 2024

@sadasu: all tests passed!

Full PR test history. Your PR dashboard.

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-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants