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

[Windows] Update helper.psm1 to set env var for Windows FQDN #2623

Merged
merged 1 commit into from
Aug 25, 2021

Conversation

lzhecheng
Copy link
Contributor

@lzhecheng lzhecheng commented Aug 20, 2021

  • When Windows agents are started with script, not in a pod,
    env var KUBE_DNS_SERVICE_HOST and KUBE_DNS_SERVICE_PORT
    need to be set.
  • Harmonize all '-o jsonpath' usage

Signed-off-by: Zhecheng Li lzhecheng@vmware.com

Comment on lines 146 to 147
$KUBE_DNS_SERVICE_HOST=$(kubectl get service -n kube-system kube-dns -ojsonpath='{.spec.clusterIP}')
$KUBE_DNS_SERVICE_PORT=$(kubectl get service -n kube-system kube-dns -ojsonpath='{.spec.ports[0].port}')
Copy link
Contributor

Choose a reason for hiding this comment

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

is -ojsonpath valid? you use -o jsonpath above

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tested on Windows VM and -ojsonpath did work. But let's make it better.

Copy link
Contributor

Choose a reason for hiding this comment

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

so now it's -o=jsonpath=?

Copy link
Contributor Author

@lzhecheng lzhecheng Aug 23, 2021

Choose a reason for hiding this comment

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

I followed the windows example here: https://kubernetes.io/docs/reference/kubectl/jsonpath/

Copy link
Contributor

Choose a reason for hiding this comment

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

could we just harmonize and use the same everywhere in the script? I don't really care whether it's -o jsonpath= or -o=jsonpath= as long as it works.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated. And other -o=jsonpath usage in the repo.

@codecov-commenter
Copy link

codecov-commenter commented Aug 20, 2021

Codecov Report

Merging #2623 (75940eb) into main (1829482) will decrease coverage by 1.19%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2623      +/-   ##
==========================================
- Coverage   60.79%   59.59%   -1.20%     
==========================================
  Files         285      286       +1     
  Lines       23049    23053       +4     
==========================================
- Hits        14012    13738     -274     
- Misses       7570     7890     +320     
+ Partials     1467     1425      -42     
Flag Coverage Δ
kind-e2e-tests 46.15% <ø> (-1.73%) ⬇️
unit-tests 41.69% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...g/agent/apiserver/handlers/featuregates/handler.go 0.00% <0.00%> (-82.36%) ⬇️
pkg/support/dump.go 0.00% <0.00%> (-65.12%) ⬇️
...kg/apiserver/registry/system/supportbundle/rest.go 19.65% <0.00%> (-55.93%) ⬇️
pkg/support/dump_others.go 0.00% <0.00%> (-50.00%) ⬇️
...g/agent/apiserver/handlers/addressgroup/handler.go 0.00% <0.00%> (-40.00%) ⬇️
...agent/apiserver/handlers/appliedtogroup/handler.go 0.00% <0.00%> (-40.00%) ⬇️
pkg/apiserver/handlers/loglevel/handler.go 0.00% <0.00%> (-38.47%) ⬇️
pkg/ovs/ovsctl/ofctl.go 18.51% <0.00%> (-19.76%) ⬇️
pkg/ovs/ovsctl/appctl.go 32.60% <0.00%> (-11.96%) ⬇️
pkg/log/log_level.go 0.00% <0.00%> (-10.00%) ⬇️
... and 24 more

antoninbas
antoninbas previously approved these changes Aug 20, 2021
@antoninbas
Copy link
Contributor

/test-all

@antoninbas antoninbas added this to the Antrea v1.3 release milestone Aug 23, 2021
* When Windows agents are started with script, not in a pod,
env var KUBE_DNS_SERVICE_HOST and KUBE_DNS_SERVICE_PORT
need to be set.
* Harmonize all '-o jsonpath' usage

Signed-off-by: Zhecheng Li <lzhecheng@vmware.com>
Copy link
Member

@tnqn tnqn left a comment

Choose a reason for hiding this comment

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

LGTM

@tnqn
Copy link
Member

tnqn commented Aug 24, 2021

/test-all

@lzhecheng
Copy link
Contributor Author

@tnqn @antoninbas could you help merge the PR. Thank you.

@antoninbas antoninbas merged commit 2c2f709 into antrea-io:main Aug 25, 2021
@lzhecheng lzhecheng deleted the fqdn_win branch August 25, 2021 05:38
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.

None yet

4 participants