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

Fix the error of hostAliases when there are more than 2 hostnames #1209

Merged
merged 4 commits into from
Mar 26, 2021

Conversation

cdmikechen
Copy link
Contributor

@cdmikechen cdmikechen commented Mar 24, 2021

If there are more than 2 hostnames in hostAliases path, spec/hostAliases will only show the first and many last hostname. Like this:

hostAliases:
- ip: "10.1.1.1"
  hostnames:
  - "hostname1"
- ip: "10.1.1.3"
  hostnames:
  - "hostname3"
- ip: "10.1.1.3"
  hostnames:
  - "hostname3"

Now fix this problem.

@google-cla
Copy link

google-cla bot commented Mar 24, 2021

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@cdmikechen
Copy link
Contributor Author

@googlebot I signed it!

ops = append(ops, patchOperation{Op: "add", Path: "/spec/hostAliases/-", Value: &v})
}
if len(hostAliases) > 0 {
ops = append(ops, patchOperation{Op: "add", Path: "/spec/hostAliases", Value: hostAliases})
Copy link
Collaborator

Choose a reason for hiding this comment

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

If the pod already has some host alias, we should use /spec/hostAliases/- for the path.

@google-cla
Copy link

google-cla bot commented Mar 25, 2021

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@cdmikechen
Copy link
Contributor Author

@googlebot I fixed it.

@google-cla
Copy link

google-cla bot commented Mar 25, 2021

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

1 similar comment
@google-cla
Copy link

google-cla bot commented Mar 25, 2021

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@cdmikechen
Copy link
Contributor Author

@liyinan926 Hi~ Thanks for your review.
I've changed my code, and run test in my computer. But I've seen CI build failed. Can you help me find the cause of the specific error, please ? I haven't found the connection between my code and the CI build failed.

Merge new pr for build ci failed
@cdmikechen
Copy link
Contributor Author

@liyinan926 Hi~ CI have passed by PR #1210
I've merge this change to codes.

Copy link
Collaborator

@liyinan926 liyinan926 left a comment

Choose a reason for hiding this comment

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

LGTM

@liyinan926 liyinan926 merged commit 0f1afbd into kubeflow:master Mar 26, 2021
jbhalodia-slack pushed a commit to jbhalodia-slack/spark-operator that referenced this pull request Oct 4, 2024
…beflow#1209)

* Fix the error of hostAliases when there are more than 2 hostnames

* Fix the error of hostAliases when there are more than 2 hostnames

* "/spec/hostAliases/-" when existing hostAliases
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.

2 participants