Skip to content

Add cluster domain cli flag#3360

Merged
ihcsim merged 3 commits intolinkerd:masterfrom
alfatraining:add-custom-cluster-domain-cli
Sep 19, 2019
Merged

Add cluster domain cli flag#3360
ihcsim merged 3 commits intolinkerd:masterfrom
alfatraining:add-custom-cluster-domain-cli

Conversation

@arminbuerkle
Copy link
Contributor

Closes #1720

Last PR for setting a cluster domain.

Introduces a CLI flag to set a custom cluster domain in the linkerd stack.


For reference:
#3278
#3148
#2950

@wmorgan
Copy link
Member

wmorgan commented Sep 2, 2019

Woot!

Copy link
Contributor

@ihcsim ihcsim left a comment

Choose a reason for hiding this comment

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

@arminbuerkle This is super awesome! I was able to install the Linkerd control plane on a k8s cluster with the cluster domain set to example.org:

✗ bin/linkerd version                                                                  
Client version: git-24b96b62
Server version: git-24b96b62

# install linkerd
✗ bin/linkerd install --cluster-domain=example.org --identity-trust-domain=example.org | k apply -f -

# deploy nginx and curl
✗ k run nginx --image=nginx --port=80 --restart=Always --expose 
✗ k run curl --image=appropriate/curl --restart=Never --command -- sleep 3600
 
✗ k exec curl -- curl -sI nginx                                                        
HTTP/1.1 200 OK
server: nginx/1.17.3
date: Tue, 03 Sep 2019 21:59:27 GMT
content-type: text/html
content-length: 612
last-modified: Tue, 13 Aug 2019 08:50:00 GMT
accept-ranges: bytes
etag: "5d5279b8-264"

✗ k exec curl -- curl -sI nginx.default.svc.example.org                 
HTTP/1.1 200 OK
server: nginx/1.17.3
date: Tue, 03 Sep 2019 21:59:59 GMT
content-type: text/html
content-length: 612
last-modified: Tue, 13 Aug 2019 08:50:00 GMT
accept-ranges: bytes
etag: "5d5279b8-264"

I'm gonna do some more testing on this with service profile and traffic split. Meanwhile, I left a comment on the linkerd install-sp command.

@arminbuerkle arminbuerkle force-pushed the add-custom-cluster-domain-cli branch 3 times, most recently from f87c86f to 50dea50 Compare September 6, 2019 10:30
@arminbuerkle
Copy link
Contributor Author

@ihcsim what's the status of this? Is there anything left for me to do?

@ihcsim
Copy link
Contributor

ihcsim commented Sep 16, 2019

@arminbuerkle Sorry for the delay. The code change LGTM. I want to do some more testing with service profiles and traffic split. (Curious if you have a chance to try these features in your environment. Any feedback?) I'm hopeful that we can merge this before this week's edge.

Meanwhile, if you haven't already, please fill up this form and we will send you some awesome Linkerd swags. Thanks again for all your help!

@arminbuerkle
Copy link
Contributor Author

@ihcsim first of all, thank you already in advance for the swag.

Secondly i'm using this branch in our clusters with traffic splitting and it works as expected. I have 4-5 traffic splits, each of them distributes traffic from 1 service to 2 with different weights. Nothing more. The only thing that's missing is the rebase on master so the web ui displays them correctly.

Concerning service profiles, i didn't get around to test / use them yet.

Signed-off-by: Armin Buerkle <armin.buerkle@alfatraining.de>
Signed-off-by: Armin Buerkle <armin.buerkle@alfatraining.de>
Signed-off-by: Armin Buerkle <armin.buerkle@alfatraining.de>
@arminbuerkle arminbuerkle force-pushed the add-custom-cluster-domain-cli branch from 50dea50 to 364f0fb Compare September 18, 2019 08:01
Copy link
Contributor

@ihcsim ihcsim left a comment

Choose a reason for hiding this comment

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

@arminbuerkle This is great! All the service profiles and traffic split stuff are working on my local cluster with a custom domain. Two things that I notice from my testing:

  • The --cluster-domain option has to match the --identity-trust-domain for mTLS to work:
✗ bin/linkerd install --cluster-domain=example.org --identity-trust-domain=example.org | kubectl apply -f -
  • Even though the --cluster-domain option is also available to the linkerd upgrade command, we won't be able to use it to change the cluster domain, because the identity trust domain isn't modifiable post-installation. Hence, this won't work:
✗ bin/linkerd upgrade --cluster-domain=example.org --identity-trust-domain=example.org | k apply -f -

I will create an issue on the website repo to add some documentation to this.

@ihcsim ihcsim merged commit 09114d4 into linkerd:master Sep 19, 2019
@olix0r
Copy link
Member

olix0r commented Sep 20, 2019

great work, @arminbuerkle! thanks for being so patient with our process to get all of this merged.

@ihcsim

Even though the --cluster-domain option is also available to the linkerd upgrade command, we won't be able to use it to change the cluster domain

We should probably make upgrade fail if the value is specified and it changes the existing value.

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.

Allow configuration of cluster base domain

5 participants