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

allow pre-existing floating IPs to be specified with k8s_master_fips #6755

Merged
merged 1 commit into from
Oct 12, 2020
Merged

allow pre-existing floating IPs to be specified with k8s_master_fips #6755

merged 1 commit into from
Oct 12, 2020

Conversation

rptaylor
Copy link
Contributor

@rptaylor rptaylor commented Sep 26, 2020

What type of PR is this?
/kind bug
/kind feature

What this PR does / why we need it:

See #6754

The logic works as follows.

If k8s_master_fips is defined as an input variable, then when the IP module runs, new floating IPs are not created, since the specified pre-existing ones will be used instead.

Then the IP module sets k8s_master_fips (or k8s_master_no_etcd_fips) as an output variable.
If new floating IPs were created it uses those values. Otherwise it retains the value that was set in the k8s_master_fips input variable.

Then when the compute module runs, the desired floating IPs are attached.

I have tested this on openstack with k8s_master node types and it works as expected. If I set
k8s_master_fips = ["1.2.92.165", "1.2.92.166", "1.2.92.167"]
then I get those floating IPs (which I already had allocated) on the masters.

If k8s_master_fips is not set I get new random FIPs.

Which issue(s) this PR fixes:

Fixes #6754

Special notes for your reviewer:

Requires TF >= 0.12 due to lazy operator evaluation
https://www.hashicorp.com/blog/terraform-0-12-conditional-operator-improvements

Does this PR introduce a user-facing change?:
No, if k8s_master_fips remains unspecified, the same behaviour occurs.
If k8s_master_fips is defined, then those floating IPs will be re-used. The documentation already claims this is the case.

The documented behaviour of k8s_master_fips is now honoured.

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Sep 26, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @rptaylor. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Sep 26, 2020
@k8s-ci-robot k8s-ci-robot requested review from bozzo and EppO September 26, 2020 02:30
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Sep 26, 2020
@rptaylor
Copy link
Contributor Author

/assign @Miouge1

k8s_master_no_etcd_fips should not be input var
@floryut
Copy link
Member

floryut commented Sep 28, 2020

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 28, 2020
@rptaylor
Copy link
Contributor Author

rptaylor commented Oct 1, 2020

@EppO @bozzo all the tests are succeeding and I believe this is good to go, any chance to review it before master changes?

Thanks!

@EppO
Copy link
Contributor

EppO commented Oct 10, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 10, 2020
@floryut
Copy link
Member

floryut commented Oct 12, 2020

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: floryut, rptaylor

The full list of commands accepted by this bot can be found here.

The pull request process is described 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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 12, 2020
@k8s-ci-robot k8s-ci-robot merged commit 07858e8 into kubernetes-sigs:master Oct 12, 2020
erulabs added a commit to kubesail/kubespray that referenced this pull request Oct 13, 2020
* 'master' of https://github.com/kubernetes-sigs/kubespray:
  change owner to root for bin_dir directory (kubernetes-sigs#6814)
  Modify imagepullpolicy (kubernetes-sigs#6816)
  fix: add tags for set facts nodelocaldns (kubernetes-sigs#6813)
  Make reset work for crio (kubernetes-sigs#6812)
  Added option to force apiserver and respective client certificate to … (kubernetes-sigs#6403)
  cleanup kubelet_deployment_type (kubernetes-sigs#6815)
  allow pre-existing floating IPs to be specified with k8s_master_fips (kubernetes-sigs#6755)
  Fix line-spacing in no_proxy.yml (kubernetes-sigs#6810)
  Fix handler naming issue for Kubeadm | kubelet (kubernetes-sigs#6803)
  Disable dashboard by default (kubernetes-sigs#6804)
  Chmod kubeconfig to avoid group-readable (kubernetes-sigs#6800)
  Update bunch of dependencies (kubernetes-sigs#6801)
  If no_proxy_exclude_workers is true, workers will be excluded from the no_proxy variable.  This prevents docker engine restarting when scaling workers. (kubernetes-sigs#6520)
@rptaylor rptaylor deleted the 20200925-k8s_master_fips branch December 2, 2020 05:00
@rptaylor rptaylor mentioned this pull request Jan 14, 2021
LuckySB pushed a commit to southbridgeio/kubespray that referenced this pull request Jan 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

master floating IPs can not be specified using k8s_master_fips
5 participants