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

Control Plane Ingress IP managed by MetalLB #3418

Merged
merged 4 commits into from
Jul 2, 2021

Conversation

TeddyAndrieux
Copy link
Collaborator

@TeddyAndrieux TeddyAndrieux commented Jun 11, 2021

Component:

'salt', 'network'

Context:

Allow MetalK8s to manage Control Plane Ingress IP with MetalLB

Summary:

  • Ability to enabled MetalLB deployment from Bootstrap config
  • If MetalLB enabled deploy MetalLB and Control Plane Ingress Controller using a Deployment and a LoadBalancer service
  • If MetalLB disabled do not deploy MetalLB and deploy Control Plane Ingress Controller same way as before this PR
  • Allow switching from MetalLB to non-MetaLB (and the opposite)

Fixes: #2381

@TeddyAndrieux TeddyAndrieux requested a review from a team June 11, 2021 08:06
@TeddyAndrieux TeddyAndrieux force-pushed the improvement/ha-control-plane-ingress branch from e355e68 to a406960 Compare June 11, 2021 08:08
@TeddyAndrieux TeddyAndrieux linked an issue Jun 11, 2021 that may be closed by this pull request
@TeddyAndrieux TeddyAndrieux force-pushed the improvement/ha-control-plane-ingress branch 5 times, most recently from baeafb5 to a5cbc26 Compare June 21, 2021 09:28
@TeddyAndrieux TeddyAndrieux force-pushed the improvement/refactore-cp-ingress-ep-definition branch from 4eac18e to d3e36a4 Compare June 21, 2021 13:23
@TeddyAndrieux TeddyAndrieux force-pushed the improvement/ha-control-plane-ingress branch 4 times, most recently from 9fdc17e to dd0d8b8 Compare June 22, 2021 08:19
@TeddyAndrieux TeddyAndrieux force-pushed the improvement/refactore-cp-ingress-ep-definition branch from d3e36a4 to 4fe7cac Compare June 23, 2021 09:16
@TeddyAndrieux TeddyAndrieux force-pushed the improvement/ha-control-plane-ingress branch from dd0d8b8 to 218f9fe Compare June 23, 2021 12:42
Base automatically changed from improvement/refactore-cp-ingress-ep-definition to development/2.10 June 23, 2021 12:42
@bert-e
Copy link
Contributor

bert-e commented Jun 23, 2021

Hello teddyandrieux,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Status report is not available.

@bert-e
Copy link
Contributor

bert-e commented Jun 23, 2021

Conflict

There is a conflict between your branch improvement/ha-control-plane-ingress and the
destination branch development/2.10.

Please resolve the conflict on the feature branch (improvement/ha-control-plane-ingress).

 $ git fetch
 $ git checkout origin/improvement/ha-control-plane-ingress
 $ git merge origin/development/2.10
 $ # <intense conflict resolution>
 $ git commit
 $ git push origin HEAD:improvement/ha-control-plane-ingress

@TeddyAndrieux TeddyAndrieux force-pushed the improvement/ha-control-plane-ingress branch from 218f9fe to 52d3005 Compare June 23, 2021 12:44
@bert-e
Copy link
Contributor

bert-e commented Jun 23, 2021

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

Copy link
Contributor

@gdemonet gdemonet left a comment

Choose a reason for hiding this comment

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

Initial review, will go over the tests after lunch 🍖

buildchain/buildchain/salt_tree.py Show resolved Hide resolved
salt/metalk8s/addons/metallb/deployed/namespace.sls Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
charts/ingress-nginx-control-plane-deployment.yaml Outdated Show resolved Hide resolved
docs/installation/bootstrap.rst Outdated Show resolved Hide resolved
docs/installation/bootstrap.rst Show resolved Hide resolved
docs/operation/changing_control_plane_ingress_ip.rst Outdated Show resolved Hide resolved
docs/operation/changing_control_plane_ingress_ip.rst Outdated Show resolved Hide resolved
docs/operation/changing_control_plane_ingress_ip.rst Outdated Show resolved Hide resolved
docs/operation/changing_control_plane_ingress_ip.rst Outdated Show resolved Hide resolved
Copy link
Contributor

@gdemonet gdemonet left a comment

Choose a reason for hiding this comment

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

I think we can be more flexible on the tests, but overall approach LGTM 👌

salt/metalk8s/defaults.yaml Outdated Show resolved Hide resolved
tests/post/features/ingress.feature Outdated Show resolved Hide resolved
tests/post/features/ingress.feature Outdated Show resolved Hide resolved
tests/post/steps/test_ingress.py Outdated Show resolved Hide resolved
tests/post/steps/test_sanity.py Show resolved Hide resolved
@bert-e
Copy link
Contributor

bert-e commented Jun 25, 2021

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

The following reviewers are expecting changes from the author, or must review again:

@TeddyAndrieux TeddyAndrieux force-pushed the improvement/ha-control-plane-ingress branch 5 times, most recently from c1ffca8 to e8e5046 Compare June 28, 2021 19:20
@TeddyAndrieux TeddyAndrieux force-pushed the improvement/ha-control-plane-ingress branch 5 times, most recently from 041a5ab to 754dd18 Compare June 29, 2021 12:38
CHANGELOG.md Outdated Show resolved Hide resolved
buildchain/buildchain/salt_tree.py Show resolved Hide resolved
charts/metallb/templates/speaker/psp.yaml Show resolved Hide resolved
eve/main.yml Show resolved Hide resolved
tests/post/features/ingress.feature Outdated Show resolved Hide resolved
tests/post/features/ingress.feature Show resolved Hide resolved
tests/post/steps/test_ingress.py Outdated Show resolved Hide resolved
tests/post/steps/test_sanity.py Show resolved Hide resolved
@TeddyAndrieux TeddyAndrieux force-pushed the improvement/ha-control-plane-ingress branch 2 times, most recently from dd167cd to ac6c68b Compare June 29, 2021 20:30
@bert-e
Copy link
Contributor

bert-e commented Jul 2, 2021

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

The following reviewers are expecting changes from the author, or must review again:

In order to support HA control plane ingress and to make things
configurable to support different type of environment we need to deploy
this nginx ingress control plane as a DaemonSet in some case and as a
Deployment in some others

Render command:
```
./charts/render.py ingress-nginx-control-plane --namespace metalk8s-ingress \
  charts/ingress-nginx-control-plane-daemonset.yaml charts/ingress-nginx/ \
  > salt/metalk8s/addons/nginx-ingress-control-plane/deployed/chart-daemonset.sls
```
In order to do a "replace" on a Kubernetes Service of type
`LoadBalancer` we need to keep the old object `healthCheckNodePort`
otherwise apiserver will reject the "replace"
Commands:
```
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
helm fetch -d charts --untar bitnami/metallb
```
As part of MetalK8s we will use metallb for control plane ingress
if this one is enabled in the Bootstrap Config

Chart get rendered with this command:
```
./charts/render.py metallb --namespace metalk8s-loadbalancing \
  charts/metallb.yaml charts/metallb/ \
  > salt/metalk8s/addons/metallb/deployed/chart.sls
```

NOTE: When we use metallb we do not need to use Nginx Ingress as a
DaemonSet, instead we use a Deployment

Nginx Ingress Control Plane deployment get rendered with this command:
```
./charts/render.py ingress-nginx-control-plane --namespace metalk8s-ingress \
  charts/ingress-nginx-control-plane-deployment.yaml charts/ingress-nginx/ \
  > salt/metalk8s/addons/nginx-ingress-control-plane/deployed/chart-deployment.sls
```

Fixes: #2381
@TeddyAndrieux TeddyAndrieux force-pushed the improvement/ha-control-plane-ingress branch from ac6c68b to f58862d Compare July 2, 2021 06:53
Copy link
Contributor

@gdemonet gdemonet left a comment

Choose a reason for hiding this comment

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

Awesome, thanks again @TeddyAndrieux 🚀!

@bert-e
Copy link
Contributor

bert-e commented Jul 2, 2021

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

@TeddyAndrieux
Copy link
Collaborator Author

/approve

@bert-e
Copy link
Contributor

bert-e commented Jul 2, 2021

In the queue

The changeset has received all authorizations and has been added to the
relevant queue(s). The queue(s) will be merged in the target development
branch(es) as soon as builds have passed.

The changeset will be merged in:

  • ✔️ development/2.10

The following branches will NOT be impacted:

  • development/2.0
  • development/2.1
  • development/2.2
  • development/2.3
  • development/2.4
  • development/2.5
  • development/2.6
  • development/2.7
  • development/2.8
  • development/2.9

There is no action required on your side. You will be notified here once
the changeset has been merged. In the unlikely event that the changeset
fails permanently on the queue, a member of the admin team will
contact you to help resolve the matter.

IMPORTANT

Please do not attempt to modify this pull request.

  • Any commit you add on the source branch will trigger a new cycle after the
    current queue is merged.
  • Any commit you add on one of the integration branches will be lost.

If you need this pull request to be removed from the queue, please contact a
member of the admin team now.

The following options are set: approve

@bert-e
Copy link
Contributor

bert-e commented Jul 2, 2021

I have successfully merged the changeset of this pull request
into targetted development branches:

  • ✔️ development/2.10

The following branches have NOT changed:

  • development/2.0
  • development/2.1
  • development/2.2
  • development/2.3
  • development/2.4
  • development/2.5
  • development/2.6
  • development/2.7
  • development/2.8
  • development/2.9

Please check the status of the associated issue None.

Goodbye teddyandrieux.

@bert-e bert-e merged commit f58862d into development/2.10 Jul 2, 2021
@bert-e bert-e deleted the improvement/ha-control-plane-ingress branch July 2, 2021 08:16
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.

Control plane Ingress controller is tied to Bootstrap
3 participants